*class.c:
[mono.git] / mono / metadata / ChangeLog
1 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2         *class.c:
3         mono_generic_class_get_class: hook profiler events.
4         mono_field_get_offset: added to support heap-shot in the new profiler.
5         *class.h: exported mono_field_get_offset.
6         * reflection.c:
7         mono_reflection_setup_internal_class: hook profiler events.
8
9 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
10
11         * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
12         argument here too and use it to avoid checking for pending exceptions if 
13         possible.
14
15 2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>
16
17         * assembly.c (build_assembly_name): add arg for passing the assembly
18         flags. Do not consider a PublicKey with value "null" valid.
19         (mono_assembly_name_parse_full): added boolean argument that will be
20         set if the assembly name contains a PublicKeyToken spec. Added support
21         for the Retargetable spec for which only Yes or No are allowed as valid
22         value. Consider assembly name invalid if Retargetable spec is set, but
23         either version, culture or public key (token) are not specified.
24         * metadata-internals.h: sync signature of mono_assembly_name_parse_full
25         with implementation in assembly.c.
26         * icall.c (fill_reflection_assembly_name): also copy assembly flags
27         from MonoAssemblyName.
28         (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
29         introduced argument for mono_assembly_name_parse_full to know if the
30         assembly name has a PublicKeyToken spec, and if it has instruct
31         fill_reflection_assembly_name to use default value for keyToken (if
32         PublicKeyToken is null).
33
34 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
35
36         * verify.c (mono_method_verify): fixed ovf ops with
37         float values. They are unverifiable now.
38
39 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
40
41         * class.c (set_failure_from_loader_error): add BadImageException to the
42         list of exceptions that can cause a type to fail to load.
43
44         * class.c (mono_class_get_exception_for_failure): same.
45
46 2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
47
48         * verify.c (in_any_exception_block): added, check if offset
49         is part of any exception handling clause.
50
51         * verify.c (get_stack_type): added VAR and MVAR types.
52
53         * verify.c (do_stobj): better error messages.
54
55         * verify.c (do_cpobj): added, check cpobj.
56
57         * verify.c (do_initobj): added, check initobj.
58
59         * verify.c (do_sizeof): added, check sizeof.
60
61         * verify.c (do_localloc): added, check localloc.
62
63         * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
64
65 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
66
67         * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
68         save_lmf/restore_lmf opcodes.
69
70         * threads.c (mono_threads_install_notify_pending_exc): New function to
71         install a callback notifying the JIT there is a pending exception on a thread.
72         (mono_thread_request_interruption): Call the new callback.
73         (mono_thread_get_and_clear_pending_exception): New function to return the
74         exception pending on a thread.
75
76         * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
77         to turn off checking for pending exceptions.
78         (mono_marshal_get_native_wrapper): Ditto.
79
80 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
81
82         * threads-types.h: Get rid of the unnecessary extern declarations.
83
84 2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>
85
86         * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
87         return field from parent class if not private.
88         (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
89         returns fields from parent class if they are not private.
90         (method_nonpublic): added function to determine if a given method
91         should be considered non-public. Returns false for private methods
92         on parent class, and internal methods from parent on the 1.0 profile.
93         (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
94         use method_nonpublic function to determine whether method should be
95         returned.
96         (property_accessor_public): use newly introduced method_nonpublic
97         function to determine whether accessor is non-public. 
98         (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
99         event from parent class if not private. Only return static event if
100         Static flag is set, and only return static event from parent class if
101         FlattenHierarchy flag is set.
102         (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
103         include non-private events from parent class.
104
105 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
106
107         * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
108         warning.
109
110 2008-01-16  Wade Berrier <wberrier@novell.com>
111
112         * security.c: Add assembly.h header to appease some warnings
113
114 2008-01-16  Dick Porter  <dick@ximian.com>
115
116         * process.c (process_module_string_read): Remove trailing null
117         when saving string.
118
119 2008-01-16  Mark Probst  <mark.probst@gmail.com>
120
121         * class-internals.h: A new data structure describing the layout of
122         a runtime generic context (MonoRuntimeGenericContextTemplate).
123
124         * metadata-internals.h: Added a hash table to MonoDomain that maps
125         from open generic classes to their runtime generic context
126         templates.
127
128         * object.c: Building of the runtime generic context, including
129         proper handling of generic type arguments of superclasses.
130         Building of the runtime generic context according to the template.
131
132 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
133
134         * class.c (mono_class_setup_fields): Set field.count for generic instances.
135         Fixes #350856.
136
137         * image.c (do_mono_image_open): Pass TRUE as last_exists to 
138         mono_portability_find_file (). Fixes #325466.
139         (mono_image_get_public_key): Fix a warning.
140
141 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
142
143         * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
144         Fixes #353550.
145         (mono_class_from_name_case): Ditto.
146
147 2008-01-13  Eyal Alaluf <eyala@mainsoft.com>
148
149         * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
150           common storage for the tables used in the System/NumberFormatter class.
151
152 2008-01-13  Zoltan Varga  <vargaz@gmail.com>
153
154         * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
155
156 2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
157
158         * verify.c (get_boxable_mono_type): check if the token is valid.
159
160         * verify.c (set_stack_value): changed to add an error if an
161         invalid type is set on stack. Changed all callers due to signature change.
162
163         * verify.c (do_stobj): implement stobj validation.
164
165 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
166
167         * reflection.c (reflection_methodbuilder_to_mono_method): No need to
168         set container->is_method, it was set earlier.
169
170         * metadata.c (type_in_image): Handle MVARs which belong to not finished
171         generic methods.
172
173         * reflection.c (mono_reflection_initialize_generic_parameter): Set
174         is_method of the generic container to TRUE for methods.
175
176 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
177
178         * metadata.c (type_in_image): Handle type parameters properly.
179
180         * class-internals.h (MonoGenericParam): Add an 'image' argument to track
181         memory ownership of this structure.
182
183 2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
184
185         * verify.c (get_boxable_mono_type): make typedref types been just
186         unverifiable. check for void type.
187
188         * verify.c (do_unbox_any): added, verify opcode unbox.any.
189
190         * verify.c (do_load_function_ptr): accept method spec tokens.
191
192 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
193
194         * marshal.c (mono_class_native_size): Always set *align even if this is called
195         recursively.
196
197 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
198
199         * verify.c (mono_verify_corlib): Remove this as it was not used and was 
200         out-of-date.
201
202 2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
203
204         * verify.c: removed some old unused tables. A huge bunch of small fixes
205         to things found while testing the verifier with mono basic.
206
207         * verify.c (dump_stack_value): dump null literal flag to.
208
209         * verify.c (verify_type_compatibility_full): fix comparison
210         for types that have a generic super type.
211
212         * verify.c (verify_stack_type_compatibility): fix compatibility
213         between null literals and reference types. fix compatibility between
214         boxed valuetypes and object. fix corner case test for enums.
215
216         * verify.c (do_cmp_op): proper verification of cgt.un in case
217         of reference types.
218
219         * verify.c (do_invoke_method): fix error message.
220
221         * verify.c (do_store_indirect
222
223         * verify.c (check_is_valid_type_for_field_ops): proper verification
224         of managed pointers to valuetypes and boxed valuetypes. proper verification
225         of null literals.
226
227         * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
228         allow token to be a reference type.
229
230         * verify.c (do_cast): proper handling of boxes valuetypes.
231
232         * verify.c (do_stelem): proper handling of storing a boxed valuetype
233         in object[].
234
235         * verify.c (mono_method_verify): pass the opcode to do_cmp_op
236         to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
237         fixed the decoding of unbox_any
238
239 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
240
241         * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
242
243 2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
244
245         * verify.c (do_newobj): do delegate verification.
246
247         * verify.c (verify_delegate_compatibility): perform delegate
248         verification.
249
250         * verify.c (verify_ldftn_delegate): perform tests related to
251         ldftn delegates.
252
253         * verify.c (mono_delegate_signature_equal): perform the
254         slightly diferent signature comparison required by delegates.
255
256         * metadata.c (mono_metadata_type_equal_full): added and exported
257         as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
258         allows signature only comparison.
259
260         * metadata-internal.h (mono_metadata_type_equal_full): added and exported
261         as MONO_INTERNAL.
262
263 2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
264
265         * verify.c: added a bunch of stack_slot_* functions to
266         make access to stack slot type easier. This is required to
267         allow optional flags, like null literal, boxed value and
268         this pointer.
269         All access paths to IlStackDesc::stype have been changed 
270         to use these new funcions.
271         Removed a bunch of unused functions and cleared all warnings.
272         This patch introduces the usage of the this pointer and 
273         boxed value flags.
274
275 2008-01-07  Zoltan Varga  <vargaz@gmail.com>
276
277         * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
278
279 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
280
281         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
282         match managed version.
283
284         * appdomain.c: Bump corlib version.
285         
286         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
287         argument.
288
289 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
290
291         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
292         Set public key token to zero-length byte array if assembly is not
293         strongnamed.
294
295 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
296
297         * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
298         writing a vtype array elem.
299
300 2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
301
302         * assembly.c (build_assembly_name): return FALSE if length of token is
303         not 16 (if not "null").
304         (mono_assembly_name_parse_full): return FALSE if value of version,
305         culture, token or key is 0.
306         * icall.c (fill_reflection_assembly_name): add boolean arguments to
307         specify whether public key and public key token must be set to default
308         value (zero-length byte array) if not available. Set versioncompat to
309         SameMachine. If public key is available or the default is set, then
310         set PublicKey flag.
311         (ves_icall_System_Reflection_Assembly_FillName): if no public key
312         is available, use empty byte array as default value. On the 2.0
313         profile, use default value for public key token if not set.
314         (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
315         profile, use default value for public key if not set. On the 2.0
316         profile, use default value for public key token if not set.
317         (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
318         default values for public key and public key token.
319
320 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
321
322         * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
323         field to keep it in synch with the managed object.
324
325         * marshal.c (emit_marshal_object): Add support for byref marshalling of
326         delegates. Fixes #351520.
327
328         * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
329         contains defined memory.
330         
331         * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
332
333         * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
334         
335         * sgen-gc.c (check_consistency): New helper function to do a consistency check
336         of the GC data structures.
337
338         * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
339
340         * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
341         
342         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
343         barrier.
344         (mono_array_clone_in_domain): Ditto.
345         (mono_array_clone_in_domain): Ditto.
346
347         * threads.c (start_wrapper): Register the thread start argument as a GC root.
348         (cache_culture): Use a write barrier.
349
350         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
351         (ves_icall_get_property_info): Ditto.
352
353         * object.h (MONO_STRUCT_SETREF): New macro.
354
355         * class-internals.h (MonoStats): Add some GC statistics.
356
357         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
358
359 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
360
361         * exception.c (mono_exception_from_name_two_strings):
362         Break from loop after method is found.
363
364 2008-01-04  Dick Porter  <dick@ximian.com>
365
366         * process.c (process_module_string_read): Rename variable to
367         reflect correct usage, after fixing bug 345972.
368
369 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
370
371         * verify.c (mono_type_create_fnptr_from_mono_method): 
372         created a MonoType function pointer instance to be used during
373         verification. The verifier releases this memory at end.
374
375         * verify.c (mono_method_is_constructor): extracted repeated
376         checks for constructor into a single class.
377
378         * verify.c (do_push_field): use new extracted method
379         for constructor check.
380
381         * verify.c (do_newobj): same.
382
383         * verify.c (do_ldftn): renamed to do_load_function_ptr
384         and make it verify ldvirtftn too.
385
386         * verify.c (mono_method_verify: proper verification
387         of ldvirtftn. release created MonoMethod instances.
388
389 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
390
391         * verify.c (token_bounds_check): added.
392
393         * verify.c (do_ldftn): added.
394
395         * verify.c (mono_method_verify): proper verificartion of ldftn.
396
397 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
398
399         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
400         than the table row count. It's the resposibility of the caller to
401         make the bounds check and raise the correct error.
402
403         * metadata.c (mono_metadata_decode_row_col): Same.
404
405         * loader.c (mono_get_method_from_token): perform bounds check
406         on token for methoddef table.
407
408 2007-12-29  Miguel de Icaza  <miguel@novell.com>
409
410         * icall.c
411         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
412         assert into a negative result, the managed code already coped with
413         that.
414
415         Some folks on Windows reported this error. 
416
417 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
418
419         * appdomain.c: Bump corlib version.
420         * icall.c:
421         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
422         CultureInfo.CreateCulture to create CultureInfo for name.
423         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
424         create CultureInfo for name. Fixes bug #347174.
425
426 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
427
428         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
429         flags.
430
431         * verify.c (is_valid_branch_instruction): allow branching to the
432         first instruction of the protected block.
433
434         * verify.c (is_valid_cmp_branch_instruction): same.
435
436         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
437         avoid double initialization.
438
439         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
440         detect which cases the eval stack should just be copied.
441
442         * verify.c (mono_method_verify): check if the eval stack
443         is empty when entering a protected block.
444
445 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
446
447         * verify.c: added is_clause_in_range, is_clause_inside_range,
448         is_clause_nested and verify_clause_relationship. They perform
449         the verifications stated in P1 12.4.2.7.
450
451         * verify.c (mono_method_verify): remove some unused variables,
452         add the new exception clause checks, add instruction border
453         checks for protected block start/end, improved some error 
454         messages and fixed a bug in the way invalid instruction access
455         is detected.
456
457 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
458
459         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
460         from GC 7.0 if available.
461
462         * object.c: Remove an unused define.
463         
464         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
465
466         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
467
468         * null-gc.c (mono_gc_make_descr_for_array): Implement.
469
470         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
471
472         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
473         to take the same arguments as the other make_descr functions.
474
475         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
476
477         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
478         directly.
479
480         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
481         mini.c.
482
483         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
484         call to boehm-gc.c.
485
486         * boehm-gc.c (mono_gc_register_root): Fix a warning.
487
488         * null-gc.c (mono_gc_register_root): Fix a warning.
489
490         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
491
492         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
493         (mono_gc_base_init): Call GC_init ().
494
495         * null-gc.c: Define mono_gc_register_root () as a no-op.
496
497         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
498
499 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
500
501         * verify.c: add prototype for merge_stacks at top
502
503         * verify.c (do_switch): added.
504
505         * verify.c (merge_stacks): on some cases the stack merging
506         was not happening properly. Unequal stack sizes at merge
507         points should be invalid.
508
509         * verify.c (mono_method_verify): added more debug info on stack state.
510         verify switch properly.
511
512 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
513
514         * method-builder.h: New file, moved the mono_mb_ declarations here from 
515         marshal.h.
516
517         * boehm-gc.c marshal.c: Include method-builder.h.
518
519         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
520
521         * marshal.c: Remove some code which is now in method-builder.c.
522
523 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
524
525         * method-builder.c: New file, extraction of the method builder functionality 
526         from marshal.c.
527
528         * marshal.c: Move the mb functions into method-builder.c.
529
530         * marshal.h marshal.c: Export some mono_mb_... functions.
531
532         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
533
534         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
535         the caller.
536
537         * class.c (mono_class_get_full): Check the token type in the dynamic case.
538
539         * loader.c (mono_field_from_token): Ditto.      
540
541         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
542         type as well.
543         
544         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
545         Fixes #342565.
546
547         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
548         a helper function for setting it.
549
550         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
551
552         
553         * assembly.c: Significally simplify code now that referenced assemblies are 
554         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
555
556         * threads.h: Don't include  the internal threads-types.h header file. Fixes
557         #349952.
558
559 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
560
561         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
562         instructions that were target of branches or are at protected block boundaries.
563
564         * verify.c (in_same_block): handle filter clauses.
565
566         * verify.c (is_valid_branch_instruction): added. checks the target of
567         instructions br or brtrue/false.
568
569         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
570         binary branch instructions such as beq and bge.
571
572         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
573         and made it pin the instruction as been part of the exception block.
574
575         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
576         of in_same_block.
577
578         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
579         of in_same_block.
580
581         * verify.c (do_ret): ret from a protected block is unverifiable and
582         not invalid.
583
584         * verify.c (do_static_branch): verify br and br.s instructions.
585
586         * verify.c (merge_stacks): add extra param to support detection
587         of branches in the middle of instructions.
588         
589         * verify.c (mono_method_verify): verify branches and exception blocks
590         that target the middle of instructions. Proper verification of br and br.s.
591
592 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
593
594         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
595         skip_visibility field.
596         (reflection_methodbuilder_from_dynamic_method): Ditto.
597
598         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
599         registrations. Fixes #348193.
600
601         * threads.h: Move the internal mono_thread_get_pending_exception () to
602         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
603
604 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
605
606         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
607         icall registration. Fixes #348193.
608
609         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
610         for corlib classes into object. Fixes #349621.
611
612 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
613
614         * icall.c (property_accessor_nonpublic): new function to determine
615         whether an accessor allows a property to be considered non-public.
616         Returns false for private accessor(s) from parent class, and internal
617         accessor(s) from parent on 2.0 profile (and higher).
618         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
619         to determine whether property should be included if NonPublic flag
620         is set. Fixes bug #349078.
621
622 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
623
624         * verify.c (init_stack_with_value): added.
625
626         * verify.c (mono_method_verify): extracted common
627         code for exception initialization into init_stack_with_value.
628
629         * verify.c (mono_method_verify): initialize the exception
630         for handler clauses as well.
631
632         * verify.c (mono_method_verify): fix the exception clause
633         ordering rules, it should use handler end offset and not
634         start offset.
635
636 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
637
638         * rawbuffer.c: remove useless warning.
639
640 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
641
642         * threads.h, threads-types.h: move functions to the correct header
643         (fixes bug#349952).
644
645 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
646
647         * verify.c (mono_method_verify): proper verification
648         of exception handling clauses ranges and fallthru in
649         and out of protected blocks.
650
651 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
652
653         * verify.c (mono_method_verify): fixed compilation issue.
654
655 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
656
657         * verify.c (mono_method_verify): a printf slipped in, changed
658         to use verifier debug macro.
659
660 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
661
662         * verify.c (is_correct_leave): check for filter clauses.
663
664         * verify.c (do_filter): added.
665
666         * verify.c (mono_method_verify): property verification of leave.
667
668
669 2007-12-18  Mark Probst  <mark.probst@gmail.com>
670
671         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
672         Win32 build, until we figure out how to do the proper thing on
673         Win32.
674
675 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
676
677         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
678         by the previous patch.
679         
680         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
681         the assembly resolve handler for refonly assemblies.
682
683 2007-12-17  Mark Probst  <mark.probst@gmail.com>
684
685         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
686         Make sure only one thread is allowed to commence shutdown, and
687         don't allow new threads to be started once shutdown is in
688         progress.
689
690 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
691
692         * verify.c (is_correct_endfilter): added.
693
694         * verify.c (is_unverifiable_endfilter): added.
695
696         * verify.c (do_endfilter): added.
697
698         * verify.c (mono_method_verify): property verification of endfilter
699         and fixed a corner case or endfinally.
700
701 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
702
703         * verify.h: new flags to support fail fast of unverifiable code and
704         do non-strict verification. Non-strict verification is required to
705         have MS runtime compatibility. There are a huge amount of unverifiable
706         code that it accepts as verifiable. The strict mode verifies the code
707         as the specs says.
708         Non-strict mode will be required in cases where code needs to be
709         accepted as verifiable but fails under strict mode.
710
711         * pedump.c: added support to fail fast and non-strict verification.
712
713         * verify.c: added support for both fail fast and non-strict verification.
714
715 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
716
717         * verify.c (is_correct_endfinally): added.
718
719         * verify.c (mono_method_verify): property verification of endfinally.
720
721 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
722
723         * verify.c (in_any_block): check for filter clauses.
724
725         * verify.c (is_correct_rethrow): added.
726
727         * verify.c (mono_method_verify): property verification of rethrow.
728
729         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
730
731 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
732
733         * verify.c (do_throw): added.
734
735         * verify.c (mono_method_verify): property verification of throw
736
737 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
738
739         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
740         assemblies. Fixes #346425.
741
742 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
743
744         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
745         FieldBuilders.
746
747         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
748
749         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
750         prevent asserts when this is called with a token which might not be valid.
751
752         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
753         lookup_dynamic_token_class with valid_token == FALSE.
754
755         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
756
757         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
758
759         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
760         
761 2007-12-10  Mark Probst  <mark.probst@gmail.com>
762
763         * gc.c: Don't delay threadpool thread finalization unless Mono is
764         shutting down.
765
766 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
767
768         * threads.c: turn an assert into a non-fatal warning.
769
770 2007-12-09  Robert Jordan  <robertj@gmx.net>
771
772         * icall.c (GetVirtualMethod): Add missing argument validation.
773
774 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
775
776         * verify.c (do_cast): added.
777
778         * verify.c (mono_method_verify): property verification of castclass and isinst.
779
780
781 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
782
783         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
784
785         * verify.c (do_stelem): added.
786
787         * verify.c (mono_method_verify): property verification of stelem.X.
788
789 2007-12-07  Mark Probst  <mark.probst@gmail.com>
790
791         * class.c, class-internals.h: Introduce an environment variable
792         (MONO_GENERIC_SHARING) through which the extent of generic code
793         sharing can be controlled (share all classes, share only corlib
794         classes, or share nothing).
795
796         * object.c: Only create runtime generic context for classes for
797         which sharing is enabled.
798
799 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
800
801         * verify.c (do_ldelem): refactor it to work with ldelem.any.
802
803         * verify.c (mono_method_verify): property verification of ldelem.any.
804
805 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
806
807         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
808         added ldelem.X opcodes.
809
810         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
811
812         * verify.c: proper verification of ldelem.X 
813
814 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
815
816         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
817
818 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
819
820         * verify.c (mono_method_verify): null literal requires special handling,
821         the value pushed on stack need to be flagged as so.
822
823         * verify.c (do_ldelema): Verify ldelema properly.
824
825 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
826
827         * verify.c: Verify ldlen properly.
828
829 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
830
831         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
832         to the target object's type. Fixes #346160.
833
834 2007-12-05  Dick Porter  <dick@ximian.com>
835
836         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
837         Solaris needs the same workaround as BSD-derived systems.  Fixes
838         bug 323524, patch by Burkhard Linke
839         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
840
841 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
842
843         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
844         handle to use when error dialog is shown; otherwise, update mask
845         to show no error dialog when an error occurs.
846
847 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
848
849         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
850
851         * class.c (mono_class_get_field_default_value): New helper function to initialize
852         field->def_type and field->data.
853
854 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
855
856         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
857         the general one.
858
859         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
860
861         * marshal.c: Avoid depending on delegate->method_info being set.
862
863         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
864         
865         * object.c (mono_delegate_ctor): Set delegate->method.
866
867         * object-internals.h (struct _MonoDelegate): Add 'method' field.
868
869         * appdomain.c: Bump corlib version.
870
871 2007-11-27  Raja R Harinath  <harinath@gmail.com>
872
873         * metadata.c (mono_generic_inst_equal_full): Short-circuit
874         equality check if we're comparing canonicalized MonoGenericInsts.
875
876 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
877
878         * class.c (generic_array_methods): Call mono_class_setup_methods () before
879         accessing class->methods.
880
881 2007-11-22  Dick Porter  <dick@ximian.com>
882
883         * threads.c: Ensure that the synch_cs is set before trying to use
884         it.
885
886 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
887
888         * profiler.c: r89126 broke the statistial profiler, unbreak.
889
890 2007-11-22  Martin Baulig  <martin@ximian.com>
891
892         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
893
894         * mono-debug.c
895         (mono_debug_debugger_version): Bump to 3.
896         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
897         -> mono_debugger_class_initialized().
898
899         * mono-debug-debugger.c
900         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
901
902         * class.c
903         (mono_debugger_start_class_init_func): Removed.
904         (mono_debugger_class_loaded_methods_func): Added.
905         (mono_class_setup_methods): Call it here.
906
907 2007-11-22  Martin Baulig  <martin@ximian.com>
908
909         * mono-debug.c
910         (mono_debug_add_delegate_trampoline): New public method.
911         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
912
913         * mono-debug.h
914         (MonoSymbolTable): Added `global_data_table'.
915         (MonoDebuggerTypeKind): Removed.
916
917 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
918
919         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
920         these methods.
921
922         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
923         
924 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
925
926         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
927
928 2007-11-20  Martin Baulig  <martin@ximian.com>
929
930         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
931
932         * mono-debug-debugger.c
933         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
934         (mono_debugger_remove_breakpoint): Likewise.
935         (mono_debugger_check_breakpoints): Likewise.
936         (mono_debugger_register_class_init_callback): New public method.
937         (mono_debugger_remove_class_init_callback): Likewise.
938         (mono_debugger_add_type): Likewise.
939
940         * mono-debug-debugger.h
941         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
942
943 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
944
945         * class.c: more interface implementations needed for the
946         array enumerator (fixes bug #341112).
947
948 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
949
950         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
951         fix ParamName of ArgumentNullExceptions.
952
953 2007-11-17  Miguel de Icaza  <miguel@novell.com>
954
955         * reflection.c (mono_reflection_encode_sighelper): Generate the
956         modopts and modreqs.   I have a useless test that crashes monodis,
957         but that shows the code working.
958
959 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
960
961         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
962         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
963
964 2007-11-15  Dick Porter  <dick@ximian.com>
965
966         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
967         When joining a thread, it's the thread that's calling Join that
968         gets WaitSleepJoin state not the target.  Fixes the standalone
969         test case in bug 334740, and hopefully the whole bug too.
970
971 2007-11-15  Dick Porter  <dick@ximian.com>
972
973         * process.c: Read file version info from the files pointed at by
974         process modules, not the current process.  Fixes bug 315969.
975
976         Use windows typedef names in some places to fix warnings on the
977         windows build.
978
979 2007-11-15  Mark Probst  <mark.probst@gmail.com>
980
981         * image.c, metadata-internals.h: Added a generic_class_cache hash
982         to MonoImage for looking up generic classes when sharing generics.
983
984 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
985
986         * sgen-gc.c: warning cleanups.
987
988 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
989
990         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
991         inherited properties.
992
993 2007-11-14  Mark Probst  <mark.probst@gmail.com>
994
995         * object.c, class-internals.h: Added more information to the
996         runtime generic context.
997
998 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
999
1000         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
1001         instead of just the target method. Generalize the abstract method handling to
1002         handle any non-static method.
1003
1004         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
1005         mono_marshal_get_delegate_invoke () signature change.
1006
1007 2007-11-13  Mark Probst  <mark.probst@gmail.com>
1008
1009         * class.c, class-internals.h: Made
1010         mono_type_get_basic_type_from_generic () public.  Fixed member
1011         access check for shared generics.
1012
1013         * loader.c: Don't insert field into field cache if it's part of a
1014         non-inflated generic class.
1015
1016         * domain.c, domain-internals.h: The generic sharing context is now
1017         part of the jit info data structure.  Added two accessor
1018         functions.
1019
1020 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
1021
1022         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
1023         the array Get/Set/Address methods, since the JIT inlines them.
1024
1025         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
1026
1027         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
1028         (mono_image_init): Initialize runtime_invoke_direct_cache.      
1029
1030         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
1031         mono_marshal_get_delegate_invoke signature change.
1032
1033         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
1034         an additional argument. Add support for invoking abstract methods.
1035
1036         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
1037
1038         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
1039
1040 2007-11-09  Mark Probst  <mark.probst@gmail.com>
1041
1042         * class.c: Do field layout for open generic classes as well.
1043
1044 2007-11-09  Mark Probst  <mark.probst@gmail.com>
1045
1046         * gc.c, gc-internal.h: Don't finalize threadpool threads with
1047         other objects, because the threadpool is still around.  Put them
1048         in a list instead and after finalizing all other objects in the
1049         root domain shut down the thread pool and then finalize the
1050         threads.  Fixes bug #337383.
1051
1052         * threads.c, thread-types.h: New mono_thread_create_internal()
1053         function for marking a thread with the threadpool flag before it
1054         started.  Set synch_cs to NULL after freeing it.
1055
1056         * threadpool.c: Mark threadpool threads before they start.
1057
1058 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
1059
1060         * reflection.h, reflection.c: don't export random functions
1061         and lazy load dbnull and missing objects.
1062
1063 2007-11-07  Jonathan Chambers <joncham@gmail.com>
1064
1065         * class.c: Initialize COM types if COM interfaces
1066         are present (not just COM classes).
1067         
1068         Code is contributed under MIT/X11 license.
1069
1070 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
1071         * reflection.c:
1072         create_dynamic_mono_image: hook module profiler events (dynamic case).
1073         mono_image_basic_init: hook assembly profiler events (dynamic case).
1074
1075 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
1076         * profiler.c:
1077         simple_appdomain_unload: completely terminate the profiler
1078         instead of only processing the statistical samples.
1079         simple_shutdown: make sure this is really called exactly once,
1080         even in multithreaded applications, and always listen to
1081         appdomain events.
1082         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
1083         here, the "[un]load" functions will do it.
1084         Fixes bugs #333791 and #325261.
1085
1086 2007-11-07  Geoff Norton  <gnorton@novell.com>
1087
1088         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
1089         rather than depend on __APPLE__.
1090
1091 2007-11-07  Mark Probst  <mark.probst@gmail.com>
1092
1093         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
1094
1095 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
1096
1097         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
1098         UTF16 MonoString. Fix the crash from bug #335488
1099
1100 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
1101
1102         * marshal.c: Correct (for non-Win32 OS) length != size in 
1103         mono_string_from_bstr. Fix #339530.
1104
1105 2007-11-06  Geoff Norton  <gnorton@novell.com>
1106
1107         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
1108         to succeed
1109
1110 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
1111
1112         * process.c: Added run-time GetProcessId API detection for Windows.
1113
1114 2007-11-04  Miguel de Icaza  <miguel@novell.com>
1115
1116         * reflection.c  (mono_param_get_objects): If a parameter has the
1117         attribute [System.Runtime.InteropServices.Optional] we should
1118         set the DefaultValue of the ParameterInfo to be
1119         System.Reflection.Missing instead of DBNull.
1120
1121         See bug #339013.
1122
1123         (mono_get_reflection_missing_object): New method,
1124         returns the System.Reflection.Missing.Value singleton instance.
1125
1126 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
1127
1128         * culture-info-table.h : regenerated.
1129
1130 2007-11-02  Jonathan Chambers <joncham@gmail.com>
1131
1132         * icall.c: Use GetEnvironmentStrings on windows
1133         so we are using the same environment block as 
1134         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
1135         #333740.
1136         
1137         Code is contributed under MIT/X11 license.
1138
1139 2007-10-31  Martin Baulig  <martin@ximian.com>
1140
1141         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
1142
1143         * mono-debug-debugger.h
1144         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
1145
1146 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
1147
1148         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
1149         classes.
1150
1151 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
1152
1153         * culture-info-table.h : regenerated.
1154
1155 2007-10-30  Robert Jordan  <robertj@gmx.net>
1156
1157         * icall-def.h, icall.c:
1158         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
1159
1160         Code is contributed under MIT/X11 license.
1161
1162 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
1163
1164         * class.c (mono_class_setup_vtable): Find the inflated methods in the
1165         inflated class instead of inflating them again.
1166         
1167         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
1168         dynamic case.
1169
1170         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
1171         Call setup_supertypes () after klass->parent is set.
1172         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
1173
1174         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
1175         for inflated instances of not yet created dynamic generic classes.
1176         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
1177         times from inflated_method.
1178         (methodbuilder_to_mono_method): Ditto.
1179
1180 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
1181
1182         * gc.c: code cleanup and removed old untested option of not creating the
1183         finalizer thread.
1184
1185 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
1186
1187         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
1188         creating a jump trampoline for dynamic methods.
1189
1190 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
1191
1192         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
1193         generic TypeBuilders when called from another method of the same type (bug #335131).
1194
1195
1196 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
1197
1198         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
1199         doesn't seem to work perfectly.
1200         
1201         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
1202         called multiple times.
1203         (methodbuilder_to_mono_method): Ditto.
1204         (resolve_object): Inflate FieldBuilder's.
1205
1206 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1207
1208         * string-icalls.c, string-icalls.h, appdomain.c: patch from
1209         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
1210         RemoveEmptyEntries in the string.Split implementation (bug #322375).
1211
1212 2007-10-26  Dick Porter  <dick@ximian.com>
1213
1214         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
1215         Thread initialisation changes
1216
1217 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
1218
1219         * verify.c: fix compatibility check between arrays and System.Array
1220
1221 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
1222
1223         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
1224         too. Fixes #336999.
1225
1226 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
1227
1228         * object.c (mono_value_box): Use typed allocation here.
1229
1230 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
1231
1232         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
1233         trampoline instead of compiling the method right away.
1234
1235         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
1236
1237 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
1238
1239         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
1240         related fields for dynamic classes. Fixes #334493.
1241
1242 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
1243
1244         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
1245         
1246         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
1247
1248         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
1249         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
1250
1251         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
1252
1253         * reflection.c (create_generic_typespec): Initialize klass->generic_container
1254         if needed.
1255         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
1256
1257 2007-10-18  Jonathan Chambers <joncham@gmail.com>
1258
1259         * marshal.c: Use correct key when removing item
1260         from ccw_hash.
1261         
1262         Code is contributed under MIT/X11 license.
1263
1264 2007-10-17  William Holmes  <billholmes54@gmail.com>
1265
1266         *marshal.c: Adding a case to marshal booleans to U1
1267
1268         Code is contributed under MIT/X11 license.
1269
1270 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
1271
1272         * class.c (mono_class_from_name): Search the modules compromising dynamic
1273         assemblies. Fixes #331601.
1274
1275 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
1276
1277         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
1278         exception if the type name contains an assembly component. Fixes #334203.
1279
1280         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
1281         modules inside dynamic assemblies. Fixes #334200.
1282         
1283         * reflection.c: Set image->public_key and image->public_key_length;
1284
1285         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
1286         fields.
1287
1288         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
1289         
1290 2007-10-16  Mark Probst  <mark.probst@gmail.com>
1291
1292         * metadata.c: Implemented correct comparing of generic classes.
1293         An inflated generic class can be equal to a non-inflated one if it
1294         is inflated with generic type variables as type arguments.  Fixes
1295         bug #333798.
1296
1297 2007-10-15  Dick Porter  <dick@ximian.com>
1298
1299         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
1300         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
1301         81646.
1302
1303         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
1304         instead of a monitor lock.  This means that monitor_try_enter and
1305         co can set the thread state safely.
1306         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
1307         thread_interrupt_requested, so interrupt actually works.
1308
1309         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
1310         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
1311         state accessor function
1312
1313 2007-10-15  Martin Baulig  <martin@ximian.com>
1314
1315         * mono-debug.h
1316         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
1317         the debugger with the current runtime.
1318
1319 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
1320
1321         * object.c, object-internals.h: added the ability to set a single
1322         trampoline for all the slots in a vtable.
1323
1324 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1325
1326         * marshal.c: deal with a possible race condition during multicast
1327         delegate invocation.
1328
1329 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1330
1331         * class.c: ensure value type methods don't have the synchronized
1332         flag set.
1333
1334 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
1335
1336         * string-icalls.c, string-icalls.h: reverted unapproved patch that
1337         breaks the build.
1338
1339 2007-10-11  Joel Reed  <joelwreed@comcast.com>
1340
1341         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
1342         to take an options parameter so that empty entries can be removed during
1343         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
1344
1345 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1346
1347         * marshal.c: make sure we don't store the signature from a dynamic
1348         method into the runtime invoke cache (bug #327189).
1349
1350 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1351
1352         * marshal.c: make sure the wrapper methods are properly initialized.
1353
1354 2007-10-11  Mark Probst  <mark.probst@gmail.com>
1355
1356         * metadata.c, metadata-internals.h: Generalized
1357         mono_type_stack_size() to mono_type_stack_size_internal() which
1358         takes an additional argument specifying whether it allows open
1359         types.
1360
1361 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1362
1363         * verify.c (do_invoke_method): handle typedbyref params
1364         correctly and check for unverifiable return values.
1365
1366         * verify.c (do_newobj): fix a warning.
1367
1368 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1369
1370         * verify.c: don't tread typedbyref as allways unverifable,
1371         so uses, like (ld/st)loc.0 are valid. verify for the cases
1372         that it matters, like boxing related operations.
1373
1374 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1375
1376         * verify.c: add verification of the newobj opcode. verification
1377         of delegate instantation still missing due ldftn and virldftn not
1378         pushing the function type on stack
1379
1380 2007-10-08  Mark Probst  <mark.probst@gmail.com>
1381
1382         * class-internals.h: Runtime generic context data structure
1383         definition.
1384
1385         * object.c: Initialization of runtime generic context at runtime
1386         vtable creation time.
1387
1388 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
1389         * class.c (mono_class_create_from_typedef,
1390         mono_class_from_generic_parameter, mono_ptr_class_get,
1391         mono_fnptr_class_get, mono_bounded_array_class_get)
1392         * domain.c (mono_domain_create, mono_domain_free)
1393         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
1394         * image.c (do_mono_image_load, mono_image_close):
1395         Hooked up load-unload profiler events.
1396
1397 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1398
1399         * domain.c: track statistics about the actual amount of native code
1400         allocated.
1401
1402 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1403
1404         * class.c: the valuetype enumerators don't have the additional
1405         supertypes interfaces.
1406
1407 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1408
1409         * class.c: need more interfaces setup for the IEnumerator<T>
1410         object created for arrays (tests/ienumerator-interfaces.2.cs).
1411
1412 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
1413
1414         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
1415
1416 2007-10-05  Alp Toker  <alp@atoker.com>
1417
1418         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
1419         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
1420         #315863.
1421
1422 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
1423
1424         * verify.c (verify_type_compatibility_full): verification of
1425         compatibility improved, validates correctly non-strict checks between
1426         native int and I4 types different than (unsigned)int32.
1427
1428         * verify.c (do_store_indirect): added, do all verification of
1429         ldind.X opcodes. 
1430
1431         * verify.c (get_load_indirect_mono_type): renamed to
1432         get_indirect_op_mono_type, as it now returns the MonoType for 
1433         ldind.X and stind.X opcodes.
1434
1435 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
1436
1437         * reflection.c: Fix the encoding of generic type definition for
1438         TypeBuilders.
1439
1440         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
1441         mono_image_typedef_or_ref but allows to specify if typespec lookups should
1442         be made. Typespec check is done prior to typeref cache lookup.
1443
1444         * reflection.c (mono_image_typedef_or_ref): now just delegate to
1445         mono_image_typedef_or_ref_full.
1446
1447         * reflection.c (encode_generic_class): encode the generic class
1448         directly instead of calling encode_type.
1449
1450         * reflection.c (encode_type): encode the generic type definition
1451         MonoClass as a generic instantiation.
1452
1453         * reflection.c (create_typespec): cache typespec tokens in
1454         the assembly->typespec cache. Don't create typespec for a generic
1455         instance MonoClass. Create typespec for the generic type defintion.
1456
1457         * reflection.c (create_generic_typespec): encode the generic
1458         class directly instead of calling encode_type.
1459
1460         * reflection.c (mono_image_create_token): encode the generic
1461         type definition not using a typespec for MonoType instances.
1462
1463
1464 2007-10-04  Raja R Harinath  <rharinath@novell.com>
1465
1466         Fix #328812
1467         * class.c (mono_image_init_name_cache): Don't return nested
1468         'protected internal' classes.
1469         (mono_class_from_name_case): Likewise.
1470
1471 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
1472
1473         * icall-def.h, icall.c : get_bundled_machine_config() is now the
1474           common function used by both DefaultConfig in System.dll and
1475           InternalConfigurationHost in System.Configuration.dll.
1476
1477 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1478
1479         * class.c: automatically add to vectors only a few essential explicit
1480         generic interfaces. The rest of the interfaces that arrays should
1481         provide are currently implicitly added (but still not lazily, see the
1482         design in the discussion of bug#325495 for the details of what is
1483         needed for that). Additionally, implicit interfaces are assigned the
1484         same vtable slot as the explicit interfaces (as they are compatible):
1485         this enables huge memory savings since we don't need to instantiate
1486         as many memthods and as large vtables anymore. Also, Since
1487         GetEnumerator<T> returns an instance of a type that is required to
1488         support a similarly large set of interfaces as arrays, we add
1489         implicit interfaces and interface offset sharing support to those
1490         types, too. This change adds all the required interfaces so that
1491         the anonarray.cs test case in the bug report works (we don't add
1492         all the interfaces to arrays of arrays 3-level deep and more because
1493         of the memory requirements explained in the bug and since they are much
1494         less common: the lazy-loading support will enabled them to work, too).
1495
1496 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
1497
1498         * verify.c (merge_stacks): major clean up, all type compatibility
1499         checks are done by verify_type_compatibility. This fix my earlier lack
1500         of understanding of the CLR type system and merge_stacks no longer looks
1501         scary.
1502
1503         * verify.c: fixed some bad spelling.
1504
1505 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
1506
1507         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
1508         a given stack slock.
1509         
1510         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
1511         verify_type_compatibility_full. This removed a near indentical function and fixed
1512         handling of Int32 and IntPtr across all opcodes.
1513
1514 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1515
1516         * class.c: only vectors have the additional generic interfaces.
1517
1518 2007-10-01  Jonathan Chambers <joncham@gmail.com>
1519
1520         * mono-config.c: Use g_strcasecmp instead of
1521         strcasecmp like everywhere else to fix
1522         compilation with MSVC.
1523         
1524         Code is contributed under MIT/X11 license.
1525
1526 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1527
1528         * object.c, object-internals.h: refactored the IMT code to enable
1529         building a single slot at a time and lazily creating the IMT trampolines
1530         and thunks.
1531
1532 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
1533
1534         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
1535
1536         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
1537         Fixes #328501.
1538         
1539 2007-09-29  Raja R Harinath  <harinath@gmail.com>
1540
1541         * loader.c (method_from_methodspec): Rearrange to avoid
1542         un-necessary exposition.  Don't assert out if the method's
1543         declaring type is a generic type definition.
1544
1545 2007-09-28  Martin Baulig  <martin@ximian.com>
1546
1547         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
1548
1549 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
1550
1551         * class-internals.h: optimize field layout of MonoClass to
1552         requires less cachelines at runtime and save a few bytes on 64 bit
1553         systems.
1554
1555 2007-09-28  Jb Evain  <jbevain@novell.com>
1556
1557         * reflection.c: when encoding type names in custom attributes,
1558         if the type is a closed generic type, its generic arguments
1559         have to be serialized as AssemblyQualifiedName, so that when
1560         they are deserialized, it's possible to re-create them properly.
1561         Fixes #329450.
1562
1563
1564 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1565
1566         * object.c, class-internals.h: added delegate-creation counter.
1567
1568 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1569
1570         * class.c: cleanup of the code that synthetizes interfaces for
1571         arrays in 2.0: saves quit a bit of corlib mempool memory.
1572         Code to fix bug #325495 ifdeffed out for now until the issues
1573         with memory usage and O(n^2) behaviour are fixed.
1574
1575 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1576
1577         * marshal.c: when possible, do not duplicate the name of the methods
1578         in the method builder and in the generated MonoMethod.
1579
1580 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
1581         * verify.c: added support for type checking ldind_* opcodes.
1582
1583 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
1584
1585         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
1586         which is used to distinguish the fully open instantiation of a TypeBuilder
1587         with the rest. This temporary hack is required to restore the property that
1588         the fully open instantiation is the same type of the generic type definition.
1589
1590         * class-internals.h (mono_generic_class_is_generic_type_definition):
1591         new function as part of the internal API.
1592
1593         * class.c (inflate_generic_type): return NULL when the generic inst is
1594         fully open. The fully open generic type is now the same as the generic type
1595         definition for non TypeBuilder types.
1596
1597         * class.c (mono_generic_class_get_class): removed assert since it is
1598         no longer valid, gklass->cached_class can point to the generic type definition.
1599
1600         * class.c (mono_generic_class_is_generic_type_definition): new.
1601
1602         * metadata.c (mono_generic_class_hash): added is_tb_open field
1603         to the hash calculation.
1604
1605         * metadata.c (free_generic_class): if the generic class is associated
1606         with the generic type definition, its field will come from the mempool and
1607         must not be freed.
1608
1609         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
1610         new, this function identifies the corner case of a TypeBuilder fully open
1611         instantiation.
1612
1613         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
1614         for lookup. Set gclass->cached_class to be the container class in case of
1615         the fully open instantiation of non TypeBuilder types.
1616
1617         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
1618         to compare generic classes.
1619
1620         * reflection.c (method_encode_methodspec): remove assert that
1621         no longer is valid.
1622
1623         * reflection.c (mono_reflection_generic_class_initialize): add
1624         an aditional assert to ensure the proper type is used.
1625
1626 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
1627
1628         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
1629         to enjoy it.
1630
1631 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
1632
1633         * verify.c (push_arg): Fixed support for ldarga
1634         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
1635         MonoType used as first arg in case of instance calls.
1636
1637 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
1638
1639         * verify.c: Support for verifying VAR and MVAR types, 
1640
1641 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
1642
1643         * icall.c (ves_icall_get_property_info): Set the reflected type of the
1644         accessors correctly.
1645
1646 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
1647
1648         * threads.c: support OSX and other systems in
1649         mono_thread_get_stack_bounds (bug #328026).
1650
1651 2007-09-25  Martin Baulig  <martin@ximian.com>
1652
1653         * mono-debug.h
1654         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
1655
1656 2007-09-24  Martin Baulig  <martin@ximian.com>
1657
1658         * mono-debug.h
1659         (MonoDebugClassEntry): Moved the definition of this struct into
1660         mono-debug.c to make it private.
1661
1662         * mono-debug.c
1663         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
1664         type table per symbol file, we don't need to store the symfile id
1665         any longer.
1666
1667 2007-09-24  Martin Baulig  <martin@ximian.com>
1668
1669         Create one type table per symbol file, since a `MonoClass *' gets
1670         invalid when its image is unloaded.
1671
1672         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
1673         (MonoDebugHandle): Added `type_table'.
1674
1675 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
1676
1677         * mempool.c, mempool.h: added mono_mempool_new_size () API
1678         to be able to specify a smaller initial size for the pool.
1679         Adjusted the code to slowly increase pool size before using
1680         the previous default size.
1681         * image.c: use a small initial size for image mempools.
1682
1683 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
1684
1685         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
1686         Fixes ##320990.
1687
1688         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
1689         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
1690
1691 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
1692
1693         * metadata.c (mono_type_create_from_typespec): Remove an invalid
1694         free. Fixes #327438.
1695
1696 2007-09-21  Raja R Harinath  <harinath@gmail.com>
1697
1698         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
1699         generic instantiations, etc.
1700         <MONO_TYPE_ARRAY>: Likewise.
1701
1702 2007-09-21  Martin Baulig  <martin@ximian.com>
1703
1704         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
1705         these structs were never defined.
1706         (MonoDebugHandle): Removed the `_priv' field, it was never used.
1707
1708 2007-09-21  Martin Baulig  <martin@ximian.com>
1709
1710         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
1711
1712 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
1713
1714         * image.c: removed the guid hash tables: we can get the same info
1715         without the additional memory usage hit (partially fixes also bug #327052).
1716
1717 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
1718
1719         * profiler.h, profiler-private.h, profiler.c: add a new profiler
1720         event to handle unloading methods. After the event is called, the
1721         corresponding MonoMethod* must be considered invalid.
1722         * loader.c (mono_free_method): call the new mono_profiler_method_free
1723         event.
1724
1725 2007-09-20  Mark Probst  <mark.probst@gmail.com>
1726
1727         * domain-internals.h: New flag in MonoJitInfo which marks shared
1728         generic methods.  New hash table (shared_generics_hash) in
1729         MonoDomain to keep track of shared generic methods.  Prototypes
1730         for functions to register and lookup shared generic methods.
1731
1732         * domain.c: Support for registering and looking up shared generic
1733         methods via a hash table (shared_generics_hash) in MonoDomain.
1734
1735         * class-internals.h: New exception to signal failure of shared
1736         compilation of a generic method.  New counters for generics
1737         sharing in MonoStats.
1738
1739 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
1740
1741         * image.c, metadata-internals.h: don't keep a file descriptor open
1742         for loaded assemblies (bug#325988).
1743
1744 2007-09-19  Raja R Harinath  <rharinath@novell.com>
1745
1746         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
1747         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
1748         use the corresponding datatypes.
1749         (type_in_image): Update to changes.
1750         (CleanForImageUserData): Simplify.
1751         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
1752         Avoid quadratic behaviour in handling the "stolen" list by
1753         separating the filter predicate out, and by prepending the stolen
1754         items rather than appending them.
1755         (steal_ginst_in_image): Likewise.
1756         (mono_metadata_clean_for_image): Update to changes.
1757
1758 2007-09-19  Martin Baulig  <martin@ximian.com>
1759
1760         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
1761
1762 2007-09-19  Martin Baulig  <martin@ximian.com>
1763
1764         * mono-debug.c (mono_debug_cleanup): Don't call
1765         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
1766
1767 2007-09-19  Raja R Harinath  <harinath@gmail.com>
1768
1769         Fix crash on 'make run-test' in mcs/errors
1770         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
1771         Avoid more potential allocations in mono_class_from_mono_type.
1772         (ginst_in_image): Update to changes.
1773         (gclass_in_image): Rearrange slightly.
1774
1775 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
1776
1777         * class.c (mono_class_init): Move the code that sets up class->methods to 
1778         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
1779
1780         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
1781         canonical instance of an inflated generic signature.
1782         (mono_type_create_from_typespec): Remove an invalid free.
1783
1784         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
1785
1786 2007-09-18  Marek Habersack  <mhabersack@novell.com>
1787
1788         * domain-internals.h: added a declaration of the
1789         mono_assembly_load_full_nosearch internal function.
1790
1791         * assembly.c (mono_assembly_load_with_partial_name): use
1792         mono_try_assembly_resolve return value properly.
1793         (mono_assembly_load_full_nosearch): copied the function body from
1794         mono_assembly_load_full, without the code to invoke assembly
1795         search hooks.
1796         (mono_assembly_load_full): calls the above new function and if the
1797         assembly is not resolved, invokes the search hooks.
1798
1799         * appdomain.c (mono_runtime_init): restore the global postload
1800         assembly search handlers.
1801
1802 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
1803
1804         * class.c (mono_class_init): Make sure class->methods and class->properties
1805         are never NULL in the generics case.
1806
1807         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
1808
1809 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
1810
1811         * metadata.c (free_generic_class): Disable some code to fix the build.
1812
1813         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
1814
1815         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
1816         from the image mempool.
1817
1818         * metadata.c (free_generic_class): Free more data from the inflated class.
1819
1820         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
1821
1822         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
1823         mempool.
1824         (mono_type_create_from_typespec): Ditto.
1825
1826         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
1827         MonoImage to the caller.
1828         (mono_init_internal): Save the opened image in a global variable.
1829         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
1830
1831         * reflection.c (resolve_object): Fix a leak.
1832
1833         * metadata.c: Fix the freeing of data in the generics caches.
1834         
1835         * metadata.c (free_generic_inst): Comment this out to fix the build.
1836         (free_generic_class): Ditto.
1837
1838         * metadata.c: Free cached generic methods, instantinations and classes when
1839         they are removed from the caches.
1840         (mono_metadata_free_type): Free the type itself.
1841
1842         * class.c: Free the result of mono_class_inflate_generic_type () in a few
1843         places.
1844
1845 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1846
1847         * boehm-gc.c: restrict managed allocs to __thread supporting
1848         architectures.
1849
1850 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
1851
1852         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
1853         (mono_generic_class_get_class): Fix a leak.
1854
1855         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
1856         mono_metadata_free_type ().
1857         (mono_metadata_inflate_generic_inst): Fix a leak.
1858
1859 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1860
1861         * mono-debug.c (free_header_data): Fix a leak missed earlier.
1862
1863         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
1864         mempool.
1865
1866         * mono-debug.c (mono_debug_close_image): Fix call to 
1867         g_hash_table_remove ().
1868
1869 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1870
1871         * icall-def.h: redirect all the string ctor to the managed
1872         CreateString () methods.
1873         * string-icalls.c, string-icalls.h: removed dead code for string
1874         ctors and icalls.
1875
1876 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1877
1878         * mono-debug.c: Fix memory leaks.
1879
1880 2007-09-14  Jonathan Chambers <joncham@gmail.com>
1881
1882         * threads-types.h: Implement mono_hazard_pointer_set and 
1883         mono_hazard_pointer_clear macros using do/while(0) to fix
1884         compilation with MSVC.
1885         
1886         Code is contributed under MIT/X11 license.
1887
1888 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1889
1890         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
1891         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
1892
1893 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1894
1895         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
1896         icalls.
1897
1898 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1899
1900         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
1901         managed-code allocated as well.
1902
1903 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
1904
1905         * class.c (mono_class_is_assignable_from): Add support for generic variance.
1906
1907 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
1908
1909         * boehm-gc.c: fixed the build after the AOT changes.
1910
1911 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
1912
1913         * wrapper-types.h: Add an ALLOC wrapper type.
1914
1915         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
1916         reference managed allocator methods.
1917
1918 2007-09-12  Marek Safar  <marek.safar@gmail.com>
1919
1920         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
1921         of Type array and not MonoType, a fix suggested by Hari.
1922         
1923 2007-09-12  Jonathan Chambers <joncham@gmail.com>
1924
1925         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
1926         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
1927         
1928         Code is contributed under MIT/X11 license.
1929
1930 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
1931
1932         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
1933
1934 2007-09-12  Marek Habersack  <mhabersack@novell.com>
1935
1936         * image.c (do_mono_image_open): if assembly file fails to open and
1937         MONO_IOMAP is in effect, try to find the path in a
1938         case-insensitive way.
1939
1940         * appdomain.c (mono_runtime_init): do not install postload hooks -
1941         tests show that MS.NET doesn't use anything of that sort to
1942         trigger the AppDomain.AssemblyResolve event.
1943         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
1944         made non-static.
1945         (mono_runtime_init): init portability helpers here.
1946
1947         * assembly.c (mono_assembly_load_with_partial_name): if other   
1948         attempts fail, trigger the AppDomain.AssemblyResolve event handler
1949         to resolve the assembly.
1950
1951         * domain-internals.h: added mono_try_assembly_resolve and marked
1952         it as internal.
1953
1954 2007-09-11  Jb Evain  <jbevain@novell.com>
1955
1956         * object-internals.h (MonoReflectionDynamicMethod): add
1957         a `MonoReflectionType *owner` field. The owner is used
1958         * reflection.c:
1959         (mono_reflection_create_dynamic_method): use the owner of the dynamic
1960         method as the class declaring the dynamic method.
1961         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
1962         dynamic method to the declaring type of the methodbuilder.
1963
1964 2007-09-11  Mark Probst  <mark.probst@gmail.com>
1965
1966         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
1967         rules for calling methods via reflection.
1968
1969 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
1970
1971         * reflection.c (resolve_object): Add support for MonoGenericClass. 
1972         Inflate MonoType's.
1973
1974 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
1975
1976         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
1977         provide a managed method that does fast allocations without needing
1978         a managed->unmanaged transition. Boehm GC implementation currently
1979         enabled for ptrfree objects on sane architectures.
1980
1981 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1982
1983         * marshal.c, marshal.h: exported a couple of useful functions and
1984         added mono_mb_get_label () to easily handle backward branches.
1985
1986 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
1987
1988         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
1989
1990 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
1991
1992         * loader.c (find_method): Fixed the regression introduced while
1993         fixing bug #81466.
1994
1995 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
1996
1997         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
1998         well.
1999         
2000         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
2001         icall.c reflection.c: Pass a MonoGenericContext argument to 
2002         mono_lookup_dynamic_token ().
2003
2004         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
2005         #82744.
2006         
2007 2007-09-09  Robert Jordan  <robertj@gmx.net>
2008
2009         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
2010         for generic methods.
2011
2012         * object.c (mono_object_get_virtual_method): Handle generic methods.
2013         Fixes bug #78882.
2014
2015         Code is contributed under MIT/X11 license.
2016
2017 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
2018
2019         * image.c: fix locking in mono_image_load_file_for_image ().
2020
2021 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
2022
2023         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
2024         used only as a cache: added an icall to fill it.
2025
2026 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
2027
2028         * reflection.h: exposed mono_reflection_free_type_info
2029         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
2030         since mono_reflection_bind_generic_parameters makes a copy of it.
2031         * reflection.c (free_type_info): subinfos should be freed.
2032         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
2033         made non static.
2034         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
2035         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
2036         this fixes #82695 and #81726.
2037    
2038
2039 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
2040
2041         * process.h, process.c:  added support for user profile/info in
2042           ProcessStartInfo. For now only Windows works.
2043
2044 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2045
2046         * metadata.c: consider the generic arguments when comparing
2047         signatures (bug #82614).
2048
2049 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2050
2051         * cil-coff.h, image.c: updated assembly loader to cope with the
2052         PE32+ 64 bit file format.
2053
2054 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2055
2056         * assembly.c, class.c, domain.c, loader.c: remove useless
2057         inclusion of cil-coff.h.
2058
2059 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
2060
2061         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
2062         if interface is marked with CoClassAttribute. 
2063    
2064         Code is contributed under MIT/X11 license.
2065
2066 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
2067
2068         * sgen-gc.c: ensure no object from the to space is copied again or finalized
2069         if it's seen twice in major collections.
2070
2071 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2072
2073         * sgen-gc.c: big objects are not copied to the gray area, but they
2074         need to be considered for scanning, too, if they are brought alive
2075         by an object ready for finalizations or a survived one.
2076
2077 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2078
2079         * sgen-gc.c: properly account the number of disappearing links when
2080         they are nullified.
2081
2082 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
2083
2084         * sgen-gc.c: share the code to scan the registered roots between the
2085         different types of collections.
2086
2087 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2088
2089         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
2090
2091 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
2092
2093         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
2094         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
2095
2096 2007-08-28  Mark Probst  <mark.probst@gmail.com>
2097
2098         * security-manager.c (mono_security_manager_get_methods):
2099         LinkDemandSecurityException now has 2 arguments instead of 3.
2100
2101 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
2102
2103         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
2104         platforms which need it.
2105
2106 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2107
2108         * sgen-gc.c: unregister thread data structures with a pthread_key_t
2109         dtor.
2110
2111 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
2112
2113         * threads.c: free the thread static data on thread exit.
2114
2115 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
2116
2117         * class.c: walk the hierarchy to find the generic definition for
2118         a class (fixes runtime part of bug #82498).
2119
2120 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
2121
2122         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
2123         ...
2124
2125         * image.c (mono_image_close): Here. Hopefully fixes #82510.
2126
2127 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2128
2129         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
2130
2131 2007-08-24  Robert Jordan  <robertj@gmx.net>
2132
2133         * appdomain.c: don't perform the ':'->';' substitution on Win32.
2134
2135 2007-08-24  Jb Evain  <jbevain@novell.com>
2136
2137         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
2138         for byref types.
2139
2140 2007-08-24  Mark Probst  <mark.probst@gmail.com>
2141
2142         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
2143         #82286.
2144
2145 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
2146
2147         * assembly.c: Fix a warning.
2148         
2149 2007-08-23  Marek Habersack  <mhabersack@novell.com>
2150
2151         * appdomain.c: parse the <runtime> section looking for the probing
2152         element with the 'privatePath' attribute, which sets additional
2153         directories in which the runtime should look for assemblies.
2154
2155 2007-08-23  Robert Jordan  <robertj@gmx.net>
2156
2157         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
2158         Fixes #82499.
2159
2160 2007-08-23  Martin Baulig  <martin@ximian.com>
2161
2162         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
2163         _mono_debug_init_corlib() and remove it from the header file.
2164
2165 2007-08-23  Martin Baulig  <martin@ximian.com>
2166
2167         * mono-debug-debugger.c
2168         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
2169         don't notify the debugger about it.
2170
2171         * mono-debug-debugger.h
2172         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
2173
2174 2007-08-23  Robert Jordan  <robertj@gmx.net>
2175
2176         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
2177         Code is contributed under MIT/X11 license.
2178
2179 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2180
2181         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
2182
2183 2007-08-22  Martin Baulig  <martin@ximian.com>
2184
2185         * mono-debug.c: Store debugging info on a per-domain basis and
2186         free it on domain unload.  Add support for unloading symbol files.
2187
2188         * mono-debug.h
2189         (MonoDebugList): New typedef.
2190         (MonoSymbolTable):
2191         - add `data_tables and `type_table'.
2192         - replace 'symbol_files' and `num_symbol_files' with a
2193           `MonoDebugList *'.
2194         (mono_debug_data_table): Removed.
2195         (mono_debug_list_add): New public function.
2196         (mono_debug_list_remove): New public function.
2197         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
2198         (mono_debug_init_2_memory): Renamed into
2199         mono_debug_open_image_from_memory().
2200         (mono_debug_close_image): New public function.
2201         (mono_debug_domain_create): Likewise.
2202         (mono_debug_domain_unload): Likewise.
2203         (MONO_DEBUGGER_VERSION): Bump to 60.
2204
2205         * mono-debug-debugger.h
2206         (MonoDebuggerEvent):
2207         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
2208         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
2209         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
2210         - rename `THREAD_CREATED' and `THREAD_EXITED' into
2211           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
2212         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
2213           meaning.
2214         (mono_debugger_add_symbol_file): Removed.
2215         (mono_debugger_add_type): Removed.
2216         (mono_debugger_lookup_type): Removed.
2217         (mono_debugger_lookup_assembly): Removed.
2218
2219         * domain.c
2220         (mono_domain_create): Call mono_debug_domain_create().
2221         (mono_init_internal): Call mono_debug_init_corlib().
2222
2223         * assembly.c
2224         (mono_assembly_close): Call mono_debug_close_image().
2225
2226 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2227
2228         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
2229         mmap call.
2230
2231 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
2232
2233         * sgen-gc.c: ensure section->pin_queue_end is initialized
2234         correctly when non pinning objects in the section have been found.
2235
2236 2007-08-22  Marek Habersack  <mhabersack@novell.com>
2237
2238         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
2239         containing a list of directories separated by ':'. MSDN docs say
2240         the directories should be separated with ';'. Part of a bugfix for
2241         bug #81446
2242
2243 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
2244
2245         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
2246         it should MonoType and not MonoClass.
2247
2248 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
2249
2250         * culture-info-table.h : regenerated.
2251
2252 2007-08-20  William Holmes  <billholmes54@gmail.com>
2253
2254         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
2255          to call ReplaceFile Kernel32 on windows or in io-layer.
2256         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
2257         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
2258          as an internal call.
2259
2260         Code is contributed under MIT/X11 license.
2261
2262 2007-08-20  Jb Evain  <jbevain@novell.com>
2263
2264         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
2265         and MONO_EXCEPTION_FIELD_ACCESS.
2266
2267         * debug-helpers.[c|h]: new mono_field_full_name function.
2268
2269 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2270
2271         * class.c: Removed class_security_level() and moved it to
2272         security-core-clr.c.
2273
2274         * security-core-clr.c, security-core-clr.h: class_security_level()
2275         is now public and renamed to mono_security_core_clr_class_level().
2276         It also looks for security attributes in the classes a class is
2277         nested in.
2278
2279 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2280
2281         * security-core-clr.c, security-core-clr.h: CoreCLR security
2282         utility functions.
2283
2284         * Makefile.am: Added security-core-clr.[ch].
2285
2286         * security-manager.c, security-manager.h: Functions and enum for
2287         setting and getting the security mode.
2288
2289         * class.c: CoreCLR security checks.
2290
2291 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2292
2293         * icall-def.h, process.c, process.h: implemented icall to get
2294         user/system processor times.
2295
2296 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2297
2298         * domain.c, threads.c, class-internals.h, domain-internals.h: New
2299         reader-lock-free jit_info_table.
2300
2301 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
2302
2303         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
2304
2305         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
2306
2307         * object-internals.h (MonoException): Add missing _data member.
2308
2309 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
2310
2311         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
2312         checking that only methods with matching qname or fqname are picked
2313         from implemented interfaces.
2314
2315 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
2316
2317         * verify.c (do_newarr):added, do type verification of
2318         newarr ops, push the right value on the eval stack.
2319         * verify.c (mono_method_verify): use do_newarr
2320
2321
2322 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
2323
2324         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
2325         factored the common code into get_boxable_mono_type, which
2326         is now using mono_type_get_full, this fixed byref related tests.
2327
2328 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
2329
2330         * class.c: added mono_type_get_full, this function has the same
2331         behavior of mono_class_get_full but the returned MonoType has
2332         all metadata of the associated token in case of a typespec token.
2333         * class.c: added mono_type_retrieve_from_typespec, used by 
2334         mono_type_get_full to retrieve the token type.
2335         * class.c (mono_class_create_from_typespec): changed to use
2336         mono_type_retrieve_from_typespec.
2337         * class.c (mono_ldtoken): changed to use mono_type_get_full
2338         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
2339         * class-internals.h: exported mono_type_get_full for internal use.
2340
2341 2007-08-16  Jb Evain  <jbevain@novell.com>
2342
2343         * domain.c (supported_runtimes): add entry for
2344         the 'moonlight' runtime version.
2345
2346 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2347
2348         * verify.c (mono_method_verify): small typo sliped in.  
2349
2350 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2351
2352         * verify.c (do_unbox_value): added, do type verification of
2353         unboxing ops
2354         * verify.c (mono_method_verify): use do_unbox_value
2355
2356
2357 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2358
2359         * verify.c (dump_stack_value): fixed typo, was printing string
2360         instead of object on stack.
2361         * verify.c (do_box_value): moved the byref check up as it leads
2362         to invalid code and should be done earlier.
2363         * verify.c: improved error messages for and ldobj
2364
2365 2007-08-15  William Holmes  <billholmes54@gmail.com>
2366
2367         * marshal.c (emit_marshal_custom): Omit the call to 
2368           marshal_native_to_managed when calling native to managed 
2369           and the argument is specified as an out argument.
2370
2371         Code is contributed under MIT/X11 license.
2372
2373 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2374
2375         * verify.c: fixed the type checks for generics, function pointers and vectors.
2376         Added type verification for ldobj and ldtoken. The verifier
2377         would segfault if header or signature of a method contained references
2378         to non-existant types.
2379
2380 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
2381
2382         * marshal.c (cominterop_get_ccw): Patch from
2383         Bill Holmes to no walk up interface hierarchy. 
2384         All parent methods should be present in the interface for COM.
2385    
2386         Code is contributed under MIT/X11 license.
2387
2388 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
2389
2390         * marshal.c (emit_marshal_com_interface): Patch from
2391         Bill Holmes to handle COM Interfaces as return values
2392         for native->managed calls.
2393    
2394         Code is contributed under MIT/X11 license.
2395
2396 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
2397
2398         * marshal.c (cominterop_get_idispatch_for_object): Implement
2399         for runtime callable wrappers.
2400    
2401         Code is contributed under MIT/X11 license.
2402
2403 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
2404
2405         * pedump.c (main): changed from mono_init to mono_init_from_assembly
2406         so 2.0 types are accessible
2407
2408
2409 2007-08-13  Miguel de Icaza  <miguel@novell.com>
2410
2411         * domain.c (mono_init_internal): Call mono_assembly_load_friends
2412         once we load mscorlib.   Due to the order in which we initialize,
2413         the mono_assembly_load_full routine that loads mscorlib did not
2414         load friends.   We now load it once we load the
2415         mono_defaults.internals_visible_class class. 
2416
2417         * assembly.c: Expose the mono_load_friend_assemblies method.
2418
2419 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
2420
2421         * verify.c: improved the handling of boxing, better
2422         type checking for unary ops and conversion. Fix bug
2423         regarding managed pointer compatibility checking
2424
2425 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2426
2427         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
2428
2429         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
2430
2431 2007-08-09  Raja R Harinath  <rharinath@novell.com>
2432
2433         * reflection.c (dup_type): Remove.
2434         * class.c (dup_type): Remove.
2435         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
2436         instead of the dodgy 'dup_type'.
2437         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
2438         handle the case where 'dup_type' needed the second argument.
2439
2440 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2441
2442         * domain.c: Fix a warning.
2443
2444 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
2445
2446         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
2447         checking that methods with the same fqname are not overridden
2448         with a method from an ancestor.
2449
2450 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
2451
2452         * threads.c (free_thread_static_data_helper): Avoid a crash if
2453         thread->static_data is not yet set.
2454
2455 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
2456
2457         * marshal.c: Use correct image when emitting
2458         native wrapper for COM calls.
2459    
2460         Code is contributed under MIT/X11 license.
2461
2462 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
2463
2464         * icall-def.h, security.c, security.h :
2465           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
2466
2467 2007-08-07  Martin Baulig  <martin@ximian.com>
2468
2469         * mono-debug-debugger.h
2470         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
2471
2472         * domain.c (mono_domain_free): Call
2473         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
2474
2475 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2476
2477         * verify.c (check_underflow, check_overflow): error message now returns IL offset
2478         * verify.c (in_same_block): code should test if either offset is inside the clauses
2479         * verify.c (mono_method_verify): push the exception into the eval stack of exception
2480         and filter blocks
2481
2482 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
2483
2484         * image.c (mono_image_close): Fix a leak.
2485
2486         * object.c (mono_runtime_invoke_array): Avoid using alloca.
2487
2488         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
2489
2490 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2491
2492         * domain.c, threads.c, threads-types.h: fix memory retention issue
2493         with thread static variables not being cleared on domain unload.
2494         Reuse thread static slots after domain unload.
2495
2496 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
2497
2498         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
2499         nullable type.
2500
2501         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
2502         now done in mono_runtime_invoke_array.
2503
2504         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
2505         receiver is a nullable type.
2506
2507         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
2508         generic parameter.
2509
2510 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
2511
2512         * marshal.c: Implement COM Objects as return type for 
2513         managed->unmanaged calls. Added Release calls for COM Object
2514         out/return values in managed->unmanaged calls.
2515
2516         Code is contributed under MIT/X11 license.
2517
2518 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2519
2520         * threads.h, threads-type.h: move the hazard pointer declarations
2521         to the private header.
2522
2523 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2524
2525         * file-io.c, appdomain.c: memory leak fixes.
2526
2527 2007-08-02  Dick Porter  <dick@ximian.com>
2528
2529         * socket-io.c
2530         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
2531         SO_REUSEADDR setting into io-layer/sockets.c.
2532
2533 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
2534
2535         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
2536         from Object when called on a generic parameter. Fixes #82211.
2537
2538 2007-08-01  Dick Porter  <dick@ximian.com>
2539
2540         * file-io.c (convert_share): Test FileShare values bit-by-bit.
2541         Fixes bug 79250 yet again.
2542
2543 2007-07-30  Martin Baulig  <martin@ximian.com>
2544
2545         Merged the `debugger-dublin' branch.
2546
2547         * mono-debug.h
2548         (MonoDebugDataTable): New typedef.
2549         (MonoDebugMethodAddressList): New typedef.
2550         (MonoDebugWrapperData): Removed.
2551         (MonoDebugSymbolTable): Removed `current_data_table',
2552         `current_data_table_size', `current_data_table_offset'.
2553         (MonoDebugDataItemType): Moved into mono-debug.c.
2554         (MonoDebugMethodJitInfo): Remove `address'.
2555         (mono_debug_data_table): New global variable.
2556         (mono_debug_lookup_method_addresses): New public function.
2557         (mono_debug_find_method): Take a `MonoMethod *', not a
2558         `MonoDebugMethodInfo *'.
2559
2560         * mono-debug.c: Drop support for the old symbol tables.
2561
2562 2007-06-28  Martin Baulig  <martin@ximian.com>
2563
2564         * mono-debug.c (mono_debug_debugger_version): New public variable.
2565
2566 2007-07-31  William Holmes  <billholmes54@gmail.com>
2567
2568         * metadata.c Changed mono_type_create_from_typespec to not insert
2569           the type into the hash map until after
2570           do_mono_metadata_parse_type has completed.
2571         Fixes Bug #82194
2572         Code is contributed under MIT/X11 license.
2573
2574 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
2575
2576         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
2577         generic parameter. Fixes #82211.
2578
2579 2007-07-27  Jb Evain  <jbevain@novell.com>
2580
2581         * pedump.c (dump_metadata, dump_metadata_header): dump
2582         versions contained in the metadata header.
2583
2584 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2585
2586         * threads.c: register small_id_table with the GC.
2587
2588 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2589
2590         * threads.c, threads.h, class-internals.h, object-internals.h:
2591         Hazard pointers, to be used by lock-free parallel algorithms.
2592
2593 2007-07-26  Dick Porter  <dick@ximian.com>
2594
2595         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
2596         routine on non-windows platforms, as I've not managed to think of
2597         a non-kludgy way of doing this.  Finishes off bug 78739.
2598
2599 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2600
2601         * object.c: properly setup interface_bitmap in proxy vtables.
2602
2603 2007-07-25  Marek Habersack  <mhabersack@novell.com>
2604
2605         * appdomain.c (get_shadow_assembly_location): do not use TickCount
2606         to create unique shadow copy target directories, use the domain's
2607         serial number instead. Each domain gets a unique target directory
2608         that way.
2609
2610         * domain.c (mono_domain_create): added code to increment domain
2611         shadow copy serial number and cache the value in the current
2612         domain structure.
2613
2614         * domain-internals.h (struct _MonoDomain): added a new field -
2615         shadow_serial to hold the serial number used in generation of
2616         shadow-copy directories. This is to make sure that the directory
2617         name is unique for each and every domain created. We avoid a race
2618         condition with overriding assemblies already in use by other app
2619         domains.
2620
2621 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
2622
2623         * class.c (mono_bounded_array_class_get): fixed memory leak when 
2624         binding generic parameters.
2625
2626 2007-07-24  Raja R Harinath  <rharinath@novell.com>
2627
2628         * metadata.c (do_mono_metadata_parse_generic_class): Use
2629         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
2630         error.
2631
2632 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2633
2634         * loader.c, class-internals.h, reflection.c: removed the per-method
2635         generics hashtable: we use the global one through the call of
2636         mono_class_inflate_generic_method ().
2637
2638 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2639
2640         * class.c, metadata.c, class-internals.h: introduce yet another
2641         generics global cache for inflated methods (fixes 98% of the perf
2642         issue in bug #81806).
2643
2644 2007-07-23  Raja R Harinath  <rharinath@novell.com>
2645
2646         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
2647         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
2648         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
2649         return a MonoGenericInst containing (a copy) of those types.
2650         (mono_metadata_inflate_generic_inst): Update to changes.
2651         (mono_metadata_parse_generic_inst): Likewise.
2652         (mono_get_shared_generic_inst): Likewise.
2653         * reflection.c (mono_class_bind_generic_parameters): Likewise.
2654         (mono_reflection_bind_generic_method_parameters): Likewise.
2655         * metadata-internals.h: Likewise.
2656         * icall.c (free_generic_context): Kill.
2657         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
2658
2659         * reflection.c (reflection_methodbuilder_to_mono_method): Use
2660         mono_metadata_type_dup.
2661         * marshal.c (mono_mb_create_method): Likewise.
2662
2663         * metadata.c (mono_metadata_type_dup): Rename from
2664         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
2665         MonoImage.  Handle a few more cases, esp. when no mempool is given.
2666         * marshal.c, metadata-internals.h: Update to changes.
2667
2668 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
2669
2670         * class.c: fixed a small leak for array classes and removed warning.
2671
2672 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2673
2674         * loader.c (mono_method_get_param_token): Make this work on generic methods.
2675         Return 0x8000000 for return parameters. Fixes #82161.
2676
2677 2007-07-21  Marek Habersack  <grendello@gmail.com>
2678
2679         * appdomain.c (get_shadow_assembly_location): append the current
2680         ticks value to the path. Avoids overwriting the same assemblies by
2681         several threads at the same time.
2682
2683 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
2684         and Raja R Harinath  <rharinath@novell.com>
2685
2686         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2687         Simplify slightly.
2688         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
2689         property for testing if a method is a generic method definition.
2690
2691 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
2692
2693         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
2694
2695 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2696
2697         * verify.c: used function from private branch, reverted to the one in class.h 
2698
2699 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2700
2701         * verify.c: a typo slipped in and the code wont compile
2702
2703 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2704
2705         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
2706         disabled box instruction as it is doing the wrong thing
2707         improved stack dump messages, now it is easier to debug type related issues
2708
2709
2710 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
2711
2712         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
2713
2714 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2715
2716         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
2717         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
2718         grouped with class and valuetype. This change will simply 
2719         the code as it should be handled just like unmanaged pointers.
2720
2721 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2722
2723         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
2724
2725 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2726
2727         * verify.c: several stack merge issues fixed, reference comparisons now
2728         check the type size. strict type check now works correctly.
2729         added more uses of IS_MANAGED_POINTER macro.
2730         fixed issues pointed by running the test suite against .net.
2731         
2732
2733 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2734
2735         * class.c, loader.c, class-internals.h: Removed the
2736         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
2737         defines.
2738
2739         * icall.c: Better error checking in some internal reflection
2740         methods.
2741
2742 2007-07-18  William Holmes  <billholmes54@gmail.com>
2743
2744         * filewatcher.c : removed unused variable 'filename' in 
2745           ves_icall_System_IO_FSW_SupportsFSW
2746
2747 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2748
2749         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
2750         obsolete, removed.
2751
2752 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
2753
2754         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
2755         
2756         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
2757
2758 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
2759
2760         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
2761         Implement generics support.
2762         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2763
2764         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
2765         type_args and method_args arguments.
2766         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
2767         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2768         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
2769
2770 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
2771
2772         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
2773           It adds a rootimage parameter to mono_reflection_get_type_internal,
2774           adds new function mono_reflection_get_type_with_rootimage and use
2775           the rootimage to resolve the types instead of the current image
2776
2777 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
2778
2779         * culture-info-table.h: Forgot to update after r78304.
2780
2781 2007-07-13  Raja R Harinath  <rharinath@novell.com>
2782
2783         * class.c (mono_class_is_open_constructed_type)
2784         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
2785
2786 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
2787
2788         * class.c (mono_bounded_array_class_get):  method fails if used with
2789         an incomplete TypeBuilder enum (no basetype field), fixed it by 
2790         avoiding calculating the size for such array as it cannot be instantiated.
2791         Fix bug #82015
2792
2793 2007-07-12  Raja R Harinath  <rharinath@novell.com>
2794
2795         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
2796         field.
2797         * metadata.c, reflection.c: Update to changes.
2798
2799 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
2800
2801         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
2802         mono_class_is_valid_enum, they are used to valide a enum when loading.
2803         * reflection.c: used new functions to throw TypeLoadException when and
2804         invalid enum is build with TypeBuilder. Fixes #82018
2805   
2806 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
2807
2808         * object.c: forgot commit of mono_class_setup_methods () to access
2809         iface->methods.
2810         * object-internals.h: added a few more handy fields to
2811         MonoIMTCheckItem.
2812
2813 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2814
2815         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
2816         iface->methods.
2817
2818 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
2819
2820         * class-internals.h, object-internals.h, object.c: IMT-based
2821         interface invocation core from Massimiliano Mantione
2822         (massi@ximian.com) with a reworked arch-specific interface,
2823         bsearch implementation and a few bugfixes and memory savings by me.
2824
2825 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
2826
2827         * class.c (mono_class_create_from_typedef): mono would segfault if 
2828         an enum did not have a __value field. It now throws a TypeLoadException
2829         for such cases. Fix bug #82022
2830
2831 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2832
2833         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
2834
2835 2007-07-09  Mark Probst  <mark.probst@gmail.com>
2836
2837         * class.c (mono_class_init): If a class is already inited but has
2838         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
2839
2840 2007-07-09  Mark Probst  <mark.probst@gmail.com>
2841
2842         * class.c: Properly handle the case of an unimplemented interface
2843         method.  Fixes: 81673.
2844
2845 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
2846
2847         * class-internals.h, object.c: cleanup patch from massi: use
2848         MonoVTable->interface_bitmap since the vtable interfaces offset array
2849         is going away.
2850
2851 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2852
2853         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
2854         GetMDStreamVersion icall instead.
2855
2856 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2857
2858         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
2859         not use mono_dl_build_path() with a full library name: makes
2860         fallbacks to libgaim and libfam work.
2861
2862 2007-07-06  William Holmes  <billholmes54@gmail.com>
2863
2864         * assembly.c: Added a continue statement in probe_for_partial_name when
2865          parse_assembly_directory_name fails.  Fixes : 82002
2866
2867 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
2868
2869         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
2870         and added a verification  for TYPEDBYREF.
2871         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
2872         make native int interchangeable with int32 and some small cleanup and formating.
2873         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
2874         handle byref of byref.
2875         * verify.c (push_local): handle byref of byref.
2876         * verify.c (do_binop): invalid mix of values is unverifiable
2877         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
2878         added visibility checks
2879         * verify.c (field related method): added visibility checks
2880         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
2881
2882 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
2883
2884         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
2885         string.
2886
2887 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
2888
2889         * profiler.c (mono_profiler_load): Fix an off-by-one error.
2890
2891         * marshal.c (emit_marshal_string): When returning a string from managed code,
2892         allways make a copy even for unicode strings. Fixes #81990.
2893
2894 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
2895
2896         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
2897         of byref generic inst types (bug #81997).
2898
2899 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
2900
2901         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
2902         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
2903
2904 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
2905
2906         * marshal.c (emit_marshal_string): Add support for unicode strings in
2907         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
2908
2909 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
2910
2911         * verify.c: field load/store are now verified, missing only access checks now
2912
2913 2007-06-28  Martin Baulig  <martin@ximian.com>
2914
2915         * mono-debug.c (mono_debug_debugger_version): New public variable.
2916
2917 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
2918
2919         * locales.c: When constructing DateTimeFormat or NumberFormat for
2920         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
2921         MonoCultureInfo contructed from the current locale is always
2922         read-only and has UseUserOverride set to true. All MonoCultureInfo
2923         instances returned for GetCultures have both IsReadOnly and
2924         UseUserOverride set to true. Fixes part of bug #81930.
2925
2926 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
2927
2928        * icall-def.h: Update System.__ComObject icalls
2929        * marshal.c: Avoid managed transition (and object creation)
2930        when looking up COM interface in RCW.
2931        * marshal.h: Ditto.
2932        
2933        Code is contributed under MIT/X11 license.
2934
2935 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
2936
2937         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
2938         to avoid crashes during assembly unloading.
2939
2940 2007-06-22  Raja R Harinath  <rharinath@novell.com>
2941
2942         Fix MethodInfo.IsGenericMethodDefinition
2943         * reflection.c (mono_reflection_bind_generic_method_parameters):
2944         Rearrange code to ensure we always uses a generic method definition.
2945         * class.c (mono_class_inflate_generic_method_full): Set
2946         'generic_container' field only for generic method definitions.
2947         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2948         Use presense of 'generic_container' field as indication of being a
2949         generic method definition.
2950
2951 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
2952
2953         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2954
2955         * object-internals.h: Reflect changes in the layout of the managed Delegate
2956         class.
2957         
2958         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
2959         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
2960         runtime memory used by the dynamic method. Fixes #77146.
2961
2962 2007-06-21  Dick Porter  <dick@ximian.com>
2963
2964         * file-io.h: 
2965         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
2966         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
2967         81767.
2968
2969 2007-06-21  Raja R Harinath  <rharinath@novell.com>
2970
2971         * reflection.c (method_encode_methodspec): Add a tripwire.
2972         * class.c (inflate_generic_type): The fully open generic type is
2973         not the same as the generic type definition.
2974
2975 2007-06-21  Martin Baulig  <martin@ximian.com>
2976
2977         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
2978
2979         * mono-debug-debugger.h
2980         (MonoDebuggerBreakpointInfo): Removed.
2981         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
2982         (mono_debugger_remove_breakpoint): Likewise.
2983         (mono_debugger_breakpoint_callback): Likewise.
2984         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
2985
2986 2007-06-21  Raja R Harinath  <rharinath@novell.com>
2987
2988         * metadata.c (mono_metadata_lookup_generic_class): The fully open
2989         generic type is not the same as the generic type definition.
2990         * class.c (mono_generic_class_get_class): Likewise.
2991
2992 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
2993
2994         * icall.c: The second argument to 
2995         System.Reflection.MethodBase.GetMethodFromHandleInternalType
2996         is a MonoType not a MonoClass.
2997
2998 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
2999
3000         * verify.c: support for function pointers in the verifier
3001
3002 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
3003
3004         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
3005
3006 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
3007
3008         * assembly.c: removed Mono.Data.SqliteClient from the list of
3009         forward-compatible assemblies as it breaks the ABI (bug #81899).
3010
3011 2007-06-19  Raja R Harinath  <rharinath@novell.com>
3012
3013         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
3014         lookup/update with the loader lock.
3015         * reflection.c (mono_class_bind_generic_parameters): No need to
3016         protect mono_metadata_lookup_* with the loader lock.
3017         * class.c (inflate_generic_type): Likewise.
3018         
3019         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
3020         on a generic instantiated type.
3021
3022 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
3023
3024         *verify.c: produce meanfull error messages on verification error
3025         *verify.c: fixed some cases of verification errors reported as validation errors
3026         *pedump.c: fixed the error name array, now it shows validation errors properly
3027         *verify.h: fixed the contant that should be used for verification errors
3028
3029 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3030
3031         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
3032         for bug #77596, 81858 and 80743 (generics data structures on domain
3033         unload).
3034
3035 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3036
3037         Avoid allocating 'MonoGenericContext' on the heap.
3038         * class-internals (_MonoMethodInflated::context): Make field
3039         inline, not a pointer.
3040         * loader.c (method_from_methodspec): Allocate 'new_context' on the
3041         stack.  Use the context embedded within the inflated method as the
3042         hash key, rather than 'new_context'.
3043         * class.c (inflate_generic_context): Simplify.  Return a struct
3044         rather than allocating on the heap.
3045         (mono_class_inflate_generic_method_full): Update to changes.  Now,
3046         doesn't salt away a copy of the context -- simplifying the
3047         lifetime rules of a 'MonoGenericContext *'.
3048         (mono_method_get_context): Return pointer to embedded context.
3049         (setup_generic_array_ifaces): Allocate temporary context on stack.
3050         * reflection.c (inflate_mono_method): Likewise.
3051         (mono_reflection_bind_generic_method_parameters): Likewise.
3052         Use the context embedded within the inflated method as the hash key.
3053
3054         Avoid a source of allocation of 'MonoGenericContext'.
3055         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
3056         and 'cached_context' fields into embedded 'MonoGenericContext' field.
3057         * class.c: Update to changes.
3058         (mono_generic_class_get_context): Simplify drastically.  Now just
3059         returns a pointer to the field.
3060         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
3061         argument as a const pointer.
3062         (mono_metadata_generic_context_equal): Likewise.
3063         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
3064         Update to changes.
3065
3066 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
3067
3068         * verify.c improved the handling of brtrue/brfalse, factored out common code
3069
3070 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3071
3072         Kill MonoGenericMethod.
3073         * class-internals.h (MonoGenericContext::method_inst): Rename from
3074         'gmethod' and convert to a MonoGenericInst.
3075         (MonoGenericMethod): Remove.
3076         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
3077         * loader.c (method_from_methodspec): Update to changes.  Use a
3078         MonoGenericContext as the key to the hashtable.
3079         * metadata.c (mono_metadata_generic_context_equal): Rename from 
3080         'mono_metadata_generic_method_equal' and take MonoGenericContext.
3081         (mono_metadata_generic_context_hash): Likewise from
3082         'mono_metadata_generic_method_hash'.  Change hash function.
3083         (mono_metadata_load_generic_params): Update to changes.
3084         (mono_get_shared_generic_method): Remove.
3085         * metadata-internals.h (mono_get_shared_generic_method): Remove.
3086         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
3087         (inflate_generic_context): Likewise.
3088         (mono_class_inflate_generic_method_full): Likewise.
3089         (setup_generic_array_ifaces): Likewise.
3090         (mono_class_create_from_typespec): Likewise.
3091         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
3092         (method_encode_methodspec): Update callsite.
3093         (reflection_methodbuilder_to_mono_method): Update to changes.
3094         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
3095         MonoGenericContext as the key to the hashtable.
3096         (inflate_mono_method): Update to changes.
3097
3098         * class-internals.h (MonoGenericMethod::container): Remove.
3099         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
3100
3101 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
3102
3103         * profiler-private.h, profiler.c, profiler.h: added API to profile
3104         exception events.
3105
3106 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
3107
3108         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
3109
3110 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
3111
3112         * verify.c: method invocation is now validated, now we verify parameter types on stack.
3113         Fixed overflow and underflow not aborting the verification process.
3114
3115 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3116
3117         * class-internals.h (MonoStats): Added stats entries for dynamic
3118         code allocations.
3119
3120 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
3121
3122         * loader.c (mono_free_method): Free header->locals and header->clauses.
3123
3124         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
3125         dynamic case.
3126
3127         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
3128
3129         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
3130
3131 2007-06-12  Raja R Harinath  <rharinath@novell.com>
3132
3133         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
3134         the tables.
3135
3136 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
3137
3138         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
3139
3140 2007-06-11  Raja R Harinath  <harinath@gmail.com>
3141
3142         MonoGenericMethod on a diet
3143         * class-internals.h (_MonoMethodInflated::reflection_info): Move
3144         here ...
3145         (_MonoGenericMethod::reflection_info): ... from here.
3146         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
3147         Update to changes.
3148         * reflection.c (inflate_mono_method): Likewise.
3149         (mono_reflection_bind_generic_method_parameters): Likewise.
3150
3151 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
3152
3153         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
3154         *verify.c: factored long ldarg forms to share code with short forms
3155
3156 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
3157
3158         *verify.c: fixed code formating factored some duplicate code
3159         into a new function
3160
3161         *verify.h: fixed binary incompatibility introduced earlier
3162
3163         *pedump.c: fixed formating
3164
3165 2007-06-11  Raja R Harinath  <harinath@gmail.com>
3166
3167         Fix assertion when disassembling Mono.C5.dll
3168         * loader.c (method_from_methodspec): Avoid inflating a method
3169         twice with the same context.  If the methodref is inflated, use
3170         the declaring method instead.
3171
3172         * class.c (mono_class_from_generic_parameter): Fix case similar to
3173         bug #81830 handled below, but for method containers.
3174
3175 2007-06-10  Raja R Harinath  <harinath@gmail.com>
3176
3177         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
3178         get_shared_generic_class.  Directly inflate the instance.
3179         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
3180         (inflate_generic_class): Delete.
3181         (get_shared_generic_class): Delete.  Move setting of
3182         'cached_class' and 'cached_context' ...
3183         * metadata.c (mono_metadata_lookup_generic_class): ... here.
3184
3185         * metadata.c (mono_metadata_lookup_generic_class): Change
3186         signature to take the components of a MonoGenericClass rather than
3187         an allocated MonoGenericClass.  Change semantics to be intern-like.
3188         * reflection.c (mono_class_bind_generic_parameters): Update to
3189         changes.  Make locking region tighter.
3190         * class.c (inflate_generic_class): Update to changes.
3191         (get_shared_generic_class): Likewise.
3192         * metadata-internals.h: Likewise.
3193
3194         * reflection.c (mono_class_bind_generic_parameters): Take and
3195         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
3196         (mono_reflection_bind_generic_parameters): Use
3197         'mono_class_bind_generic_parameters' rather than duplicate the code.
3198         * class.c (mono_bounded_array_class_get): Update to changes.
3199         * object-internals.h: Likewise.
3200
3201         * reflection.c (mono_class_bind_generic_parameters): Only support
3202         parameterizing generic type definitions.  Remove support for other
3203         open types.
3204
3205 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
3206
3207         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
3208
3209         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
3210         in the dynamic case.
3211
3212 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
3213
3214         * threads.c: When cleaning up thread, reset the Background bit.
3215         Fixes bug #81720.
3216
3217 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
3218
3219        * metadata.c: Move variable declarations to top of scope.
3220        * verify.c: Move variable declarations to top of scope.
3221
3222        Code is contributed under MIT/X11 license.
3223
3224 2007-06-08  Raja R Harinath  <rharinath@novell.com>
3225
3226         * reflection.c (mono_class_bind_generic_parameters): Replace
3227         open-coded loop with mono_metadata_inflate_generic_inst.
3228
3229         * class.c (get_shared_generic_class): Don't call
3230         mono_get_shared_generic_inst.  Use the container's own
3231         'class_inst'.
3232
3233         * metadata.c (mono_metadata_load_generic_params): Move
3234         initialization of 'context' field here from ...
3235         * class.c (mono_class_create_from_typedef): ... here, and ...
3236         * loader.c (mono_get_method_from_token): ... here.
3237
3238         * class.c (get_shared_generic_class): Rename from
3239         mono_get_shared_generic_class and make static.
3240         (mono_get_shared_generic_inst): Move to metadata.c.
3241         * loader.c (mono_get_shared_generic_method): Likewise.
3242         * class-internals.h, metadata-internals.h: Update to changes.
3243
3244         Fix #81830
3245         * class.c (mono_class_from_generic_parameter): Don't assume a
3246         generic container owner exists.  Generic containers from monodis
3247         don't have any.
3248
3249 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
3250
3251         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
3252         * verify.h: new typedefs to returns the non-verifiable status
3253         * verify.c: initial implementation of generics, stack merging and object compatibility check
3254
3255 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3256
3257         * class.c, image.c, class-internals.h (MonoImage): class_cache is
3258         a MonoInternalHashTable again (fixed bug in internal hash table
3259         code).
3260
3261 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3262
3263         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
3264         MonoInternalHashTable again (fixed bug in internal hash table
3265         code).
3266
3267 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3268
3269         * class.c, image.c, class-internals.h, domain.c,
3270         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
3271         changes.  Have to figure out what makes them break the SWF
3272         regression.
3273
3274 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3275
3276         * class.c, image.c, class-internals.h (MonoImage): class_cache is
3277         a MonoInternalHashTable now.
3278
3279 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3280
3281         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
3282         MonoInternalHashTable now.
3283
3284 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3285
3286         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
3287         invoke_impl code.
3288
3289         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
3290
3291         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
3292         dependent trampoline.
3293
3294         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3295
3296         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
3297
3298 2007-05-29  Robert Jordan  <robertj@gmx.net>
3299
3300         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
3301
3302 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
3303
3304         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
3305
3306 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
3307
3308        * marshal.c: Fix interface lookup loops for
3309        cominterop_get_com_slot_for_method and 
3310        cominterop_get_method_interface. Only need to lookup
3311        if type is a class, else use interface type method is on.
3312
3313        Code is contributed under MIT/X11 license.
3314
3315 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
3316
3317         * reflection.c: HasSecurity can be present even if no specially 
3318         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
3319         SecurityAttribute). Fix CAS regression tests on buildbot.
3320
3321 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3322
3323        * appdomain.c: Add configure checks for header files.
3324        * image.c: Add configure checks for header files.
3325        * file-io.c: Add configure checks for header files.
3326        * debug-mono-symfile.c: Add configure checks for header files.
3327        * threadpool.c: Add configure checks for header files.
3328        * console-io.c: Add configure checks for header files.
3329        * profiler.c: Add configure checks for header files.
3330        * rawbuffer.c: Add configure checks for header files.
3331        * icall.c: Add configure checks for header files.
3332        * rand.c: Add configure checks for header files.
3333        * socket-io.c: Add configure checks for header files.
3334
3335        Code is contributed under MIT/X11 license.
3336
3337 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
3338
3339         * reflection.c (mono_custom_attrs_from_builders): Remove the 
3340         assertion as it breaks the build.
3341         
3342         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
3343
3344         * reflection.c (lookup_custom_attr): Make a copy here too.
3345
3346         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
3347         dynamic images.
3348
3349         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
3350         images.
3351
3352         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
3353         info.
3354
3355 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3356
3357         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
3358         (load_cattr_value): Ditto.
3359
3360 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
3361
3362         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
3363
3364 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
3365
3366         * threads.c: In "start_wrapper", set apartment_state to MTA if
3367         apartment_state is Unknown and we're running on 2.0 profile or
3368         higher.
3369         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
3370         to main method, then set apartment_state to Unknown on 1.0 profile,
3371         and MTA on 2.0 profile.
3372
3373 2007-05-16  Jb Evain  <jb@nurv.fr>
3374
3375         * class-internals.h (MonoDefaults): Add an attribute_class and
3376           customattribute_data_class.
3377         * domain.c (mono_init_internal): Populate them.
3378         * reflection.c: Use them to remove duplicates. Make a vew
3379         MonoClass variables `static'.
3380
3381 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3382
3383         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
3384         step in implementing IMT, so that all isinst checks now can go
3385         through the bitmap.
3386         This was needed because vtables for TransparentProxy need to look
3387         like the vtable of the "target" class, so they need to point to
3388         its interface bitmap directly.
3389
3390         * object.c: inside "mono_class_create_runtime_vtable" and
3391         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
3392
3393 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
3394
3395         * object-internals.h
3396           culture-info.h : added territory field in MonoCulture and
3397           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
3398         * locales.c : fill territory field above too.
3399         * culture-info-table.h : regenerated.
3400
3401 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3402
3403         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
3404         Fixes #81599.
3405
3406 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
3407
3408         * object.c: Always initialize apartment, even if 
3409         there is no custom attributes on entry point.
3410         
3411         Code is contributed under MIT/X11 license.
3412
3413 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
3414
3415         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
3416         * metadata.c: If no encoding is set, check for unicode
3417         on class.
3418         
3419         Code is contributed under MIT/X11 license.
3420
3421 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
3422
3423         * threads.c: Handle if mono_thread_current returns NULL 
3424         
3425         Code is contributed under MIT/X11 license.
3426
3427 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
3428
3429         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
3430         in start_wrapper. Added mono_thread_init_apartment_state and
3431         mono_thread_cleanup_apartment_state.
3432         * object.c: Initialize thread apartment state on main thread
3433         by checking for STAThreadAttribute on entry point.
3434         * object-internals.h: Add apartment_state field to MonoThread.
3435         * threads-types.h: Add unmanaged definition of 
3436         System.Threading.ApartmentState, MonoThreadApartmentState.
3437         
3438         Code is contributed under MIT/X11 license.
3439         
3440 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
3441
3442         * class.c: Fix windows build.
3443         * class-internals.h: Fix windows build.
3444         
3445         Code is contributed under MIT/X11 license.
3446
3447 2007-05-08  Robert Jordan  <robertj@gmx.net>
3448
3449         * process.c (CreateProcess_internal):
3450         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
3451         .CreateNoWindow was specified. Fixes #81496.
3452
3453 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3454
3455         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
3456         step in implementing IMT, replaced it with two compact arrays
3457         (interfaces_packed and interface_offsets_packed) and a bitmap that
3458         is used for isinst checks (interface_bitmap).
3459
3460         * class.c: (compare_interface_ids): compare function to pass to
3461         bsearch when looking for an interface with a given id.
3462         (mono_class_interface_offset): reimplemented using bsearch on
3463         interfaces_packed, getting the offset from interface_offsets_packed.
3464         (print_implemented_interfaces): utility debugging function.
3465         (setup_interface_offsets): reworked to initialize interfaces_packed,
3466         interface_offsets_packed and interface_bitmap.
3467
3468         * object.c: replaced all accesses to "MonoClass.interface_offsets"
3469         with uses of interfaces_packed and interface_offsets_packed.
3470
3471 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3472
3473         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
3474         mono_class_interface_offset prototype to wrap all accesses to
3475         "MonoClass.interface_offsets".
3476
3477         * class.c: Implemented mono_class_interface_offset, and wrapped all
3478         accesses to "MonoClass.interface_offsets".
3479
3480         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
3481         "MonoClass.interface_offsets".
3482
3483 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
3484
3485         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
3486         GetMethodFromHandle overloads (bug #78637).
3487
3488 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3489
3490         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
3491         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
3492
3493 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
3494
3495         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
3496         #81498.
3497
3498         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
3499         gracefully.
3500         (mono_custom_attrs_from_index): Ditto.
3501
3502         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
3503         Fixes #81501.
3504
3505 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3506
3507         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
3508         is now allocated from a mempool.
3509
3510 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
3511
3512         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
3513         caller holds threads_lock, leading to deadlocks. Fixes #81476.
3514
3515 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3516
3517         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
3518         mono_loader_clear_error () too late. Fixes #81463.
3519
3520 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
3521
3522         * culture-info-table.h : regenerated.
3523
3524 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3525
3526         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
3527         is missing.
3528
3529 2007-04-25  Dick Porter  <dick@ximian.com>
3530
3531         * Makefile.am: Put the mingw enforced-optimisation back into the
3532         PLATFORM_WIN32 section.
3533
3534 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3535
3536         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
3537         patch.
3538
3539         * image.c (mono_image_load_module): New API function to load a module reference.
3540
3541         * image.c (load_modules): Load modules lazily. Fixes #80812.
3542
3543         * class.c (mono_class_from_typeref): Use mono_image_load_module.
3544         
3545         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
3546
3547         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
3548         to mono_image_load_module_dynamic.
3549
3550 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
3551
3552         * marshal.c: Fix calling convention for CCW on non-windows
3553         platforms. STDCALL on windows, CDECL everywhere else to work 
3554         with XPCOM and MainWin COM.
3555         
3556         Code is contributed under MIT/X11 license.
3557
3558 2007-04-23  Martin Baulig  <martin@ximian.com>
3559
3560         Fix #80969.
3561
3562         * loader.c
3563         (method_from_memberref): Added `gboolean *used_context' argument.
3564         (mono_get_method_from_token): Likewise.
3565         (mono_get_method_full): Don't insert the method in the cache when
3566         `used_context' is true.
3567
3568 2007-04-23  Raja R Harinath  <rharinath@novell.com>
3569
3570         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
3571
3572         * reflection.c (mono_reflection_bind_generic_parameters): Don't
3573         create new MonoTypes for returned types.
3574         * class.c (mono_generic_class_get_class): Export mono-internal.
3575         * class-internals.h: Update to changes.
3576
3577 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
3578
3579         * threadpool.c, threadpool.h, icall-def.h: patch from
3580         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
3581
3582 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
3583
3584         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
3585         
3586         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
3587
3588         * threads.c (mono_thread_get_stack_bounds): New helper function.
3589
3590         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
3591         Correctly compute stack bounds when attaching. Fixes #81394.
3592
3593 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
3594
3595         * reflection.c: fix handling of doubles in custom attributes
3596         for the arm-fpa format (bug #81368).
3597
3598 2007-04-18  Raja R Harinath  <rharinath@novell.com>
3599
3600         * reflection.c (assembly_add_win32_resources): Mildly relax an
3601         bounds check to let the end pointer point just past the end of the
3602         allocated buffer.  (may fix #81384)
3603
3604 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
3605
3606         * culture-info-table.h : regenerated.
3607
3608 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
3609
3610         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
3611         the thread is aborted early.
3612
3613 2007-04-05  Dick Porter  <dick@ximian.com>
3614
3615         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
3616         FindFirstFile()/FindNextFile() to find entries.  This lets the
3617         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
3618         81038.
3619
3620         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
3621         the parameters of
3622         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
3623
3624 2007-04-04  Martin Baulig  <martin@ximian.com>
3625
3626         * debug-helpers.c
3627         (mono_method_desc_full_match): Add support for nested classes.
3628
3629 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
3630
3631         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
3632
3633 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
3634
3635         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
3636         waiting for too many threads.
3637
3638 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
3639
3640         * environment.c: Fix return value check on uname so we can get the 
3641         executing version on Solaris operating systems.
3642
3643 2007-03-28  Jb Evain  <jbevain@gmail.com>
3644
3645         * class.c (mono_type_get_name_recurse): Complete the
3646         fix for the creation of assembly qualified names for
3647         pointer types. Fixes #81208.
3648
3649 2007-03-27  Dick Porter  <dick@ximian.com>
3650
3651         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
3652         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
3653         changed.
3654
3655         * threads.c
3656         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
3657         the value of ReleaseMutex().
3658
3659 2007-03-27  Dick Porter  <dick@ximian.com>
3660
3661         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
3662         in little-endian order, not network endian, so must be converted
3663         to host endian here.  Fixes bug 80593.
3664
3665 2007-03-22  Jb Evain  <jbevain@gmail.com>
3666
3667         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
3668         qualified names for pointer types. Fixes #81208.
3669
3670 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
3671
3672         * marshal.c: Add support for PreserveSigAttribute. 
3673         
3674         Code is contributed under MIT/X11 license.
3675
3676 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
3677
3678         * process.c: Fix endianness issues. Fixes #81126.
3679
3680         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
3681         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
3682
3683         * image.c (mono_image_lookup_resource): Make this work on big-endian
3684         machines.Change API contract so the caller needs to free the return value.
3685         
3686         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
3687         API change.
3688         
3689 2007-03-14  Martin Baulig  <martin@ximian.com>
3690
3691         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
3692         mono_type_get_desc() as well.
3693
3694 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3695
3696         * icall.c:  Fix environ access in VS.  
3697         
3698 2007-03-13  Alp Toker  <alp@atoker.com>
3699
3700         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
3701         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
3702         #63841.
3703
3704 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
3705
3706         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
3707         circular references among dynamic methods. Fixes #81091.
3708
3709         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
3710
3711 2007-03-09  Martin Baulig  <martin@ximian.com>
3712
3713         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
3714
3715 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
3716
3717         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
3718         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
3719         
3720         Code is contributed under MIT/X11 license.
3721         
3722 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
3723
3724         * loader.c: Reapply patch for bug #79424.
3725
3726 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3727
3728         * metadata.c (mono_type_to_unmanaged): Only convert object to
3729         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
3730
3731 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
3732
3733         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
3734         (and incorrectly set) is_reference field from MonoGenericInst.
3735
3736 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3737
3738         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
3739         a little earlier.
3740
3741         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
3742
3743         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
3744
3745 2007-03-05  Miguel de Icaza  <miguel@novell.com>
3746
3747         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
3748         FileOptions.1 value to mean "temporary", map that to
3749         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
3750
3751         Fixes 80688
3752
3753 2007-03-03  Marek Habersack  <mhabersack@novell.com>
3754
3755         * appdomain.c: implement MS .Net style shadow copying. Copies of
3756         the assemblies are made in a subdirectory of the dynamic base
3757         directory, the assembly names are preserved.
3758         Copy .mdb and .config files along with the assemblies being shadowed.
3759
3760 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
3761
3762         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
3763         (emit_marshal_handleref): Ditto.
3764
3765         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
3766         on Visual C++. Fixes #80671.
3767
3768 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3769
3770         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
3771         for clone operations.
3772
3773 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
3774
3775         * marshal.c: Fix warnings.
3776
3777 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
3778
3779         * loader.c: allow case-insensitive matching of the dll name
3780         in dllmap handling when prefixed with "i:".
3781
3782 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
3783
3784         * threads.c: Fix #ifdef for dummy_apc function for VS.
3785
3786 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3787
3788         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
3789
3790 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
3791         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
3792         giving precedence to the methods with a fully qualified name
3793         (InterfaceName.MethodName) when building the interface sections
3794         of the vtable.
3795
3796 2007-02-16  Dick Porter  <dick@ximian.com>
3797
3798         * threadpool.c (append_job): Fix fast-path array handling, so it's
3799         less likely the array will grow exponentially when the load is
3800         heavy.
3801
3802 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3803
3804         * metadata-internals.h, loader.c: fix dllmap lookup order
3805         for non-function maps, too, and prepare for fallback code.
3806
3807 2007-02-12  Robert Jordan  <robertj@gmx.net>
3808
3809         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
3810         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
3811         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
3812         GlobalFree. Fixes a part of bug #77075.
3813
3814 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
3815
3816         * loader.c: implemented typedef parent in field memberref.
3817
3818 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
3819
3820         * marshal.c: Fix warnings and remember to call Release on
3821         IUnknown of RCW.
3822         
3823         Code is contributed under MIT/X11 license.
3824
3825 2007-02-10  Miguel de Icaza  <miguel@novell.com>
3826
3827         * class-internals.h: Add MonoHandleRef definition, and
3828         handleref_class to mono_defaults. 
3829
3830         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
3831         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
3832
3833         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
3834         (do nothing on this stage)
3835         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
3836         (emit_marshal_handleref): New method, used for argument handling
3837         of HandleRefs. 
3838
3839 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
3840
3841         * class.c (mono_class_setup_parent): Lazily init com types.
3842         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
3843         init com types.
3844         * object.c (mono_remote_class_vtable): Lazily init com types.
3845         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
3846         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
3847         * domain-internals.h: Expose mono_init_com_types.
3848         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
3849         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
3850         Add support for COM Callable Wrapper marshalling.
3851         * marshal.h: Add icall definitions.
3852         * gc.c: Handle freeing of CCWs in finalizer code.
3853         
3854         Code is contributed under MIT/X11 license.
3855
3856 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
3857
3858         * reflection.c: changed all the signature encoding code to use
3859         a variable-sized buffer.
3860
3861 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3862
3863         * marshal.c: locking fixes: never take the loader lock
3864         or other runtime locks when holding the marshal lock
3865         (fixes bug#80664).
3866
3867 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
3868
3869         * marshal.c: make the delegate function pointer mapping
3870         work for the moving GC.
3871
3872 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
3873
3874         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
3875         for bug #80618.
3876
3877 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3878
3879         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
3880         gmodule.
3881
3882 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3883
3884         * threadpool.c: made the code moving-GC safe.
3885
3886 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
3887
3888         * assembly.c, boehm-gc.c, class-internals.h, class.c,
3889         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
3890         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
3891         warning cleanup.
3892         * reflection.c: warning cleanup, some threading and moving GC fixes.
3893
3894 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
3895
3896         * class.c, loader.c: create the needed Set/Get/Address array methods
3897         as well as the .ctors in mono_class_init (), fixes bug #80567.
3898
3899 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3900
3901         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
3902         we doesn't decrease its alignment. Should fix the sparc build.
3903
3904 2007-01-24  Dick Porter  <dick@ximian.com>
3905
3906         * socket-io.c
3907         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3908         Create the returned object if we need to ignore an unsupported
3909         socket option.  Fixes a segfault reported by Atsushi.
3910
3911 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3912
3913         * class.c, object.c: restrict GC-tracked fields to
3914         UIntPtr fields used inside corlib, so we provide better
3915         type info to the GC and also allow broken packing as in
3916         bug #80580.
3917
3918 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
3919
3920         * sgen-gc.c: removed duplicated function.
3921
3922 2007-01-19  Miguel de Icaza  <miguel@novell.com>
3923
3924         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
3925         value that means that the value is not supported, but that we
3926         should not return a failure, but instead report this as a
3927         successful operation.
3928
3929 2007-01-19  Raja R Harinath  <rharinath@novell.com>
3930
3931         Fix tests/bug79956.2.il
3932         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
3933         (mono_generic_class_get_class): If the generic definition in an
3934         enum, copy over other fields related to it.
3935
3936 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3937
3938         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
3939         genericinst enums (bug #79215).
3940
3941 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
3942         * class.c: Fix bug 80307.
3943
3944 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
3945
3946         * image.c: if the file table is not present, try to load
3947         all the modules, since we don't have info about them
3948         having or not metadata (bug #80517).
3949         * assembly.c: allow mono_assembly_load_references () to
3950         work for netmodules.
3951
3952 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3953
3954         * image.c, metadata-internals.h, object.c: execute module
3955         cctors when running on the 2 runtime if present (bug #80487).
3956
3957 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
3958
3959         * icall.c: optimized InitializeArray() on bigendian.
3960
3961 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
3962
3963         * icall.c: fix for the broken ARM FPA double format.
3964
3965 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3966
3967         * icall.c: handle endian issues for r4 and r8 types, too, in
3968         the InitializeArray() icall.
3969
3970 2007-01-15  Miguel de Icaza  <miguel@novell.com>
3971
3972         * loader.c (mono_loader_error_prepare_exception): Clear the error
3973         once we have extracted the information from it, do this before we
3974         call into the JIT's class loading mechanisms.
3975
3976         * object.c (mono_class_create_runtime_vtable): Do not clear the
3977         loader error before calling mono_class_get_exception_for_failure
3978         as the loader error is needed inside
3979         mono_class_get_exception_for_failure to throw the error (thinko).
3980
3981         Fixes #80521
3982         
3983 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3984
3985         * reflection.c: align fields rva data so it's faster to load at
3986         runtime.
3987
3988 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3989
3990         Prepare to simplify GenericMethod handling.
3991         * class-internals.h (mono_method_get_context): New accessor function.
3992         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
3993         rather than directly accessing '->context' field.
3994
3995         * class-internals.h (_MonoGenericParam.method): Move ...
3996         (_MonoGenericContainer): ... here.  Add into union with klass field.
3997         * class.c, icall.c, loader.c, metadata.c, reflection.c:
3998         Update to changes.
3999
4000 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
4001
4002         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
4003         the wrapper type enum and reduce relocations.
4004
4005 2007-01-12  Raja R Harinath  <rharinath@novell.com>
4006
4007         * reflection.c (inflate_mono_method): Reuse method instantiation
4008         from the generic method, if available.
4009
4010 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
4011
4012         * marshal.c (emit_marshal_variant): Fix conv_arg
4013         type in last commit, based on whether parameter is byref.
4014         
4015 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
4016
4017         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
4018         marshalling.
4019         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
4020         MONO_TYPE_OBJECT back for VARIANT support.
4021
4022 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
4023
4024         * marshal.c, marshal.h, icall-def.h: Implement 
4025         Marshal.ReAllocCoTaskMem.
4026
4027 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
4028
4029         * marshal.c: memory retention fixes: use the proper
4030         image cache for runtime_invoke method lookups.
4031
4032 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4033
4034         * mempool.c: added code to help debug mempool allocations.
4035
4036 2007-01-11  Dick Porter  <dick@ximian.com>
4037
4038         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
4039         support (experimenting with faking it with IP_MTU_DISCOVER for
4040         systems that don't have IP_DONTFRAGMENT.)
4041         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
4042         icall.
4043
4044         * icall-def.h: new System.Net.Sockets.Disconnect icall.
4045
4046         * socket-io.h: Add new fields to MonoSocketAsyncResult
4047         corresponding to the new ones in Socket.cs.
4048
4049 2007-01-11  Raja R Harinath  <rharinath@novell.com>
4050
4051         Fix IronPython regression mentioned in #80249
4052         * metadata.c (do_mono_metadata_parse_generic_class): Clear
4053         'cached_context' field, since it may have been initialized as a
4054         side-effect of metadata parsing.
4055
4056         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
4057         (_MonoGenericClass.cached_class): Move here and rename from lone
4058         remaining field of ...
4059         (_MonoInflatedGenericClass): ... this.  Remove.
4060         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
4061         to changes.
4062
4063         Fix mcs/tests/test-128.cs regression.
4064         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
4065         2007-01-10 change below.
4066         [MONO_TYPE_OBJECT]: Recurse into array case.
4067
4068 2007-01-11  Raja R Harinath  <harinath@gmail.com>
4069
4070         * class-internals.h (mono_get_inflated_generic_class): Remove.
4071         * class.c (mono_get_inflated_generic_class): Remove.
4072         (mono_generic_class_get_class): Rename from
4073         mono_class_create_generic.
4074         (mono_class_from_mono_type) [GENERICINST]: Use it.
4075         * reflection.c, metadata.c: Update to changes.  Use
4076         'mono_class_from_mono_type'.
4077
4078 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
4079
4080         * reflection.c: use passed type when encoding an array element
4081         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
4082
4083 2007-01-09  Robert Jordan  <robertj@gmx.net>
4084
4085         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
4086         result arguments (someDelegate.EndInvoke (unrelatedAres)).
4087         Fixes bug #80392.
4088
4089 2007-01-09  Raja R Harinath  <rharinath@novell.com>
4090
4091         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
4092
4093         * object.c (set_value): Avoid aliasing between type->data.klass
4094         and type->data.generic_class.
4095
4096         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
4097
4098 2007-01-08  Raja R Harinath  <rharinath@novell.com>
4099
4100         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
4101         between type->data.klass and type->data.generic_class.
4102
4103 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
4104
4105         * marshal.c: In MS.NET, StringBuilder objects are not copied by
4106         value in out parameters.
4107
4108 2007-01-08  Raja R Harinath  <rharinath@novell.com>
4109
4110         Simplify invariant for MonoGenericClass::klass field.
4111         * class.c (mono_class_create_generic): Verify 'klass' is null.
4112         * metadata.c (do_mono_metadata_parse_generic_class): Don't
4113         initialize 'klass' field.
4114
4115 2007-01-05  Raja R Harinath  <rharinath@novell.com>
4116
4117         Ongoing work to avoid redundant data and simplify invariants.
4118         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
4119         'generic_class', and change type to a GenericInst.
4120         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
4121         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
4122
4123 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
4124
4125         * class.c : skip io-layer under PLATFORM_WIN32.
4126
4127 2007-01-03  Tor Lillqvist  <tml@novell.com>
4128
4129         Fix #80305: In a bundled executable, look in the bundled exe
4130         assembly to determine the runtime version. Add the possibility to
4131         bundle also the machine.config file.
4132         
4133         * assembly.c (mono_assembly_open_from_bundle): Make
4134         non-static. Allow being called even if we have no bundled
4135         assemblies, and return NULL right away in that case.
4136
4137         * domain-internals.h: Declare mono_assembly_open_from_bundle()
4138         here.
4139
4140         * domain.c (app_config_parse): Take an assembly exe file name as
4141         parameter instead of a config file name. Check for a bundled
4142         config file for that assembly by calling
4143         mono_config_string_for_assembly_file() (see below) before looking
4144         for one in the file system.
4145         (get_runtimes_from_exe): Corrsponding change to call of
4146         app_config_parse().
4147         (get_runtimes_from_exe): Check for bundled assembly exe file first
4148         by calling mono_assembly_open_from_bundle(). If no bundled
4149         assembly exe file is found, call mono_image_open() as before to
4150         look it up in the file system.
4151
4152         * mono-config.c: Add variable bundled_machinec_onfig.
4153         (mono_config_string_for_assembly_file): New function.
4154         (mono_config_for_assembly): Move code snippet that looks for a
4155         bundled assembly .config file into the above new function. Call
4156         it.
4157         (mono_register_machine_config, mono_get_machine_config): New
4158         functions to set and retrieve
4159
4160         * assembly.h: Declare mono_register_machine_config().
4161
4162         * mono-config.h: Declare mono_get_machine_config() and
4163         mono_config_string_for_assembly_file().
4164
4165         * icall.c: No declaration of environ necessary on Win32. It is
4166         declared (as a macro expanding to a function call) in stdlib.h.
4167         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
4168         New internal mono function. Returns the value of
4169         mono_get_machine_config() as a Mono string.
4170
4171         * icall-def.h: Add get_bundled_machine_config().
4172
4173 2007-01-04  Raja R Harinath  <rharinath@novell.com>
4174
4175         Remove redundant field
4176         * class-internals.h (_MonoGenericContext.container): Remove field.
4177         * loader.c (mono_method_get_signature_full): Don't parse a
4178         "container" for a signature parse when the signature is inflated
4179         immediately.
4180         (method_from_methodspec): Likewise, for a generic_inst.
4181         * class.c, metadata.c, reflection.c: Update to changes.
4182
4183 2006-01-04  Raja R Harinath  <rharinath@novell.com>
4184
4185         * class-internals.h (_MonoGenericClass): Rename 'context' field to
4186         'cached_context', and change semantics -- it starts off NULL, and
4187         is initialized on demand.
4188         * class.c (mono_generic_class_get_context): New accessor to
4189         replace 'context' field accesses.
4190         (mono_class_get_context): New helper.
4191         (*): Update to changes.
4192         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
4193
4194 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4195
4196         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
4197         before the memcpy.   Fixes Marshal2 regression.
4198
4199 2007-01-02  Jb Evain  <jbevain@gmail.com>
4200
4201         * blob.h: add a MONO_TYPE_ENUM definition
4202         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
4203         fix the encoding of arrays of enums in custom attributes.
4204
4205         Fixes #79666.
4206
4207 2007-01-01  Miguel de Icaza  <miguel@novell.com>
4208
4209         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
4210         string is null terminated, but only cut the string short if it
4211         overflows the buffer.   
4212         
4213         (mono_string_to_byvalstr): Also fix this routine.   The code here
4214         was not properly terminating a string (it was only terminated
4215         because of the previous catch-all memset). 
4216
4217         I left the memset, because I do not know if applications expect
4218         the runtime to clear this region. 
4219
4220         Fixes #79944.
4221
4222         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4223         Clear the error before returning to unmanaged code to prevent the
4224         runtime from being confused later on (fixes  80420).
4225         (ves_icall_type_from_name): Always call mono_loader_clear_error
4226         after parsing a type that could have failed.
4227         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
4228
4229         * loader.c (mono_loader_clear_error): Fix indentation.
4230
4231 2006-12-28  Martin Baulig  <martin@ximian.com>
4232
4233         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
4234
4235 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
4236
4237         * reflection.c: patch from Rolf Bjarne Kvinge to fix
4238         getting a token for an EnumBuilder.
4239
4240 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
4241
4242         * reflection.c: be more careful in case resource generation
4243         fails to create the data array.
4244
4245 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
4246
4247         * sgen-gc.c: write barrier for clone and fix unregister handles.
4248
4249 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4250
4251         * reflection.c: some fixes needed in the generics code for the moving GC.
4252
4253 2006-12-22  Robert Jordan  <robertj@gmx.net>
4254
4255         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
4256         account. Fixes bug #80299.
4257
4258 2006-12-21  Raja R Harinath  <rharinath@novell.com>
4259
4260         Fix WaitHandle usage in delegates.
4261         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
4262         * object.c (mono_wait_handle_new): Use the property set method to
4263         initialize the handle.
4264         (mono_wait_handle_get_handle): New.
4265         * threadpool.c (mono_async_invoke): Use it.
4266         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
4267         Likewise.
4268         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
4269
4270 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
4271
4272         * marshal.c (emit_marshal): Call emit_marshal_variant and
4273         emit_marshal_com_interface when applicable.
4274         (emit_marshal_variant, emit_marshal_com_interface): Add
4275         methods for this case and remove if's from emit_marshal_object.
4276         
4277 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
4278
4279         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
4280
4281 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
4282
4283         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
4284         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
4285         and GlobalFree on Windows. Remove FIXME.
4286
4287 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4288
4289         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
4290         implementation for managed objects.
4291
4292 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4293
4294         * object.c: implemented code to be used for checking
4295         that no reference field overlaps with non-references.
4296
4297 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4298
4299         * threadpool.c: fix queue code to be compatible with the
4300         moving GC.
4301
4302 2006-12-18  Miguel de Icaza  <miguel@novell.com>
4303
4304         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
4305         in structures by throwing ArgumentNullException.
4306
4307         (emit_marshal_safehandle): Also when they are null parameters.
4308
4309         (emit_marshal_safehandle): Add support for ref
4310         SafeHandles parameters
4311
4312 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4313
4314         * profiler.c: updated to use the mono-dl API instead of
4315         gmodule.
4316
4317 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4318
4319         * profiler.c: updated to use the mono-dl dynamic loading
4320         API instead of gmodule.
4321
4322 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
4323
4324         * profiler.c: use readlink, older versions of glib don't have
4325         g_file_read_link ().
4326
4327 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4328
4329         * profiler.c: try to detect the path to mono if libc fails to provide
4330         a useful name (bug #80286).
4331
4332 2006-12-16  Raja R Harinath  <rharinath@novell.com>
4333
4334         Fix #80242
4335         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
4336         instance, use the generic type definition instead.
4337         (ves_icall_Type_GetNestedTypes): Likewise.
4338         * class.c (mono_class_create_generic): Always set the
4339         nested_classes of a generic instance to NULL, even if the generic
4340         type definition has nested types.
4341
4342 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
4343
4344         * marshal.c (mono_string_from_bstr): Revert previous Windows change
4345         and fix on Linux.
4346         
4347 2006-12-15  Miguel de Icaza  <miguel@novell.com>
4348
4349         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
4350         my arguments were in the wrong order.   I also fixed the Windows
4351         version which seems to have had the same issue.
4352
4353         (mono_free_bstr): On Unix, this is g_free.
4354         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
4355         conversions (for the tests in corlib to pass).
4356
4357 2006-12-14  Miguel de Icaza  <miguel@novell.com>
4358
4359         * marshal.c (emit_ptr_to_object_conv): For now, ignore
4360         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
4361         exception if a ref SafeHandle in a struct has changed).
4362         
4363         (emit_struct_conv): Do not perform layout checks for classes
4364         derived from SafeHandle, as those are specially handled. 
4365
4366         (emit_object_to_ptr_conv): Add support for
4367         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
4368
4369         (emit_marshal_safehandle): Implement conversion of return values
4370         of safehandles (MARSHAL_ACTION_CONV_RESULT).
4371         
4372         * threads.c: WaitHandle now is compiled with two different handles
4373         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
4374         for 2.0.
4375         
4376         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
4377         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
4378         these routines to cope with both kinds of fields.
4379
4380 2006-12-12  Miguel de Icaza  <miguel@novell.com>
4381
4382         * metadata.c (mono_type_to_unmanaged): Handle the case where
4383         type->data.klass is a SafeHandle, and in that case, return the
4384         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
4385         MONO_MARSHAL_CONV_SAFEHANDLE. 
4386
4387 2006-12-11  Miguel de Icaza  <miguel@novell.com>
4388
4389         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
4390         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
4391         calling emit_marshal_object.
4392
4393         (emit_marshal_safehandle): Implement marshalling of
4394         SafeHandle parameters (no ref support yet).
4395
4396         (MarshalAction): Document the defines as I implement
4397         them for SafeHandle.
4398
4399         (emit_marshal_object): indentation police.
4400
4401         * class-internals.h: Define MonoSafeHandle.
4402         Add safehandle_class to MonoDefaults type.
4403
4404         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
4405         list of classes to check for fields. 
4406
4407         * domain.c (mono_init_internal): Add SafeHandle to the list of
4408         mono_defaults loaded.
4409
4410 2006-12-15  Raja R Harinath  <rharinath@novell.com>
4411
4412         Fix #80253
4413         * reflection.c (mono_reflection_bind_generic_parameters): If the
4414         generic type definition is a type builder, ensure that it is fully
4415         initialized before instantiating it.  Kill some dead code.
4416
4417 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
4418
4419         * object.c: clear the loader_error () before loading
4420         more metadata stuff (bug #80258).
4421
4422 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
4423
4424         * icall.c, icall-defs.h: type modifiers icalls for
4425         parameters and properties.
4426
4427 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4428
4429         * object.c, icall.c: fixed warnings.
4430
4431 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4432
4433         * marshal.c: fixed a couple of leaks and coding style in a few places.
4434
4435 2006-12-08  Dick Porter  <dick@ximian.com>
4436
4437         * process.c: Cope with NULL ProcessStartInfo arguments on windows
4438         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
4439         80173.
4440
4441 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4442
4443         * process.c: ProcessStartInfo may have only filename set and
4444         arguments can be NULL.
4445
4446 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4447
4448         * icall.c: fix leak found by Robert Jordan.
4449
4450 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4451
4452         * marshal.c, marshal.h: generate managed method to access an element
4453         of a multi-dimensional array.
4454
4455 2006-11-30  Paolo Molaro (lupus@ximian.com)
4456
4457         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
4458
4459 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4460
4461         * icall.c: back out GetFields () fix until the serialization code is
4462         fixed to not depend on the incorrect behaviour.
4463
4464 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
4465
4466         * profiler.c: provide defaults if none are set.
4467
4468 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4469
4470         * Makefile.am, attrdefs.h: new public header file with
4471         constants for attributes for use by embedders.
4472
4473 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4474
4475         * icall.c: GetFields () fix for bug #80064.
4476
4477 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
4478
4479         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
4480         removed long unused icalls.
4481
4482 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
4483   
4484         * marshal.c: 
4485                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
4486                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
4487                 can be generated without a delegate class.
4488                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
4489         
4490         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4491
4492 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4493
4494         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
4495         #80069.
4496
4497 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4498
4499         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
4500         icall-def.h: added icalls needed by System.GC.
4501
4502 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
4503
4504         * loader.c: ensure the class in catch clauses is handled
4505         correctly for generics methods (fixes bug#79980).
4506
4507 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4508
4509         * monitor.h, monitor.c: added mono_locks_dump () function
4510         to help debug deadlocks involving managed locks.
4511
4512 2006-11-13  Dick Porter  <dick@ximian.com>
4513
4514         * file-io.c (get_file_attributes): If the file is a symlink try
4515         and get the stat data for the target, but also add the
4516         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
4517         the specs for the windows symlink support, but will probably have
4518         to be reworked when I have test data from a vista machine.  Fixes
4519         bug 79887.
4520
4521 2006-11-13  Dick Porter  <dick@ximian.com>
4522
4523         * gc.c (mono_domain_finalize): 
4524         * marshal.c (mono_delegate_begin_invoke): 
4525         * threadpool.c (socket_io_init, mono_thread_pool_init)
4526         (mono_thread_pool_finish): 
4527         * monitor.c (mono_monitor_try_enter_internal): 
4528         * threads.c (mono_thread_resume, mono_thread_init)
4529         (mono_thread_suspend_all_other_threads)
4530         (mono_thread_execute_interruption): 
4531         * appdomain.c (mono_domain_unload): Check for NULL error returns
4532         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
4533         75733.
4534
4535 2006-11-11  Miguel de Icaza  <miguel@novell.com>
4536
4537         * process.c
4538         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
4539         Only close the handle if the value of the handle is not
4540         INVALID_HANDLE_VALUE.  This just makes the process a bit more
4541         robust.
4542
4543         Improvement for #75733, so that we do not run into this problem. 
4544
4545         
4546         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
4547         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
4548         internal variables.  Fixes #79462 
4549         
4550
4551 2006-11-09  Dick Porter  <dick@ximian.com>
4552
4553         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4554         Use poll() not select().  Fixes bug 79397.
4555
4556 2006-11-09  Raja R Harinath  <rharinath@novell.com>
4557
4558         Fix #79872
4559         * assembly.c (mono_assembly_load_from_full): Check that the given
4560         image has an assembly manifest.
4561
4562 2006-11-09  Ankit Jain  <jankit@novell.com>
4563
4564         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
4565         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
4566         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
4567
4568 2006-11-07  Dick Porter  <dick@ximian.com>
4569
4570         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4571         Put the old resolver behaviour back for pre-2.0 profiles.
4572
4573 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
4574
4575         * threadpool.c: precise GC and locking fixes.
4576
4577 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
4578
4579         * class.c: don't load types that have an explicit unaligned
4580         managed reference. Provide better info in the TypeLoad exception.
4581         Part of the fix for bug #79744.
4582         * object.c: use the correct check for class type load issues.
4583
4584 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4585
4586         * class.c: enforce alignment of fields with managed references
4587         even when Pack=1 is forced by the user (bug #77788).
4588
4589 2006-11-03  Dick Porter  <dick@ximian.com>
4590
4591         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4592         If the address reverse lookup fails, return it as the hostname
4593         anyway.  Fixes bug 79721.
4594
4595 2006-11-03  Dick Porter  <dick@ximian.com>
4596
4597         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
4598         Fix build on Windows.
4599
4600 2006-11-02  Dick Porter  <dick@ximian.com>
4601
4602         * icall-def.h: 
4603         * object-internals.h: 
4604         * exception.c (mono_get_exception_thread_interrupted): 
4605         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
4606         Fixes bug 74525.
4607
4608         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
4609         Check for pending Thread.Interrupt.
4610
4611 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
4612         * loader.c: Fixed bug 79684.
4613
4614 2006-10-27  Dick Porter  <dick@ximian.com>
4615
4616         * file-io.c (get_file_attributes): Force symlinks to directories
4617         to be returned as a regular file.  Fixes bug 79733.
4618 2006-10-26  Dick Porter  <dick@ximian.com>
4619
4620         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
4621         CreateFile to open a directory then we need to set the
4622         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
4623
4624 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4625
4626         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
4627         friends.
4628
4629 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4630
4631         * sgengc.c: small cleanup of timer code.
4632
4633 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4634
4635         * sgen-gc.c: fix some warnings and start adding support for
4636         complete object removal on domain unload.
4637
4638 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
4639
4640         * assembly.c: build_assembly_name should not consider a version
4641         number without build or revision number invalid. Fixes bug #79715.
4642
4643 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
4644
4645         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
4646         call kernel32 function OutputDebugString directly.
4647         
4648         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4649         
4650 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
4651
4652         * reflection.c: small cleanup, using a function to insert a MonoString
4653         in the string heap.
4654
4655 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
4656
4657         * reflection.c: moving GC fixes.
4658
4659 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4660
4661         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
4662         all the objects with finalizers belonging to an unloading appdomain.
4663
4664 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4665
4666         * sgen-gc.c: added ability to allocate even when the nursery is fully
4667         pinned and fixed a couple of bugs.
4668
4669 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4670
4671         * threads.h: Revert the last change for now.
4672
4673         * threads.h (mono_thread_get_pending_exception): Rename this to
4674         mono_thread_get_undeniable_exception ().
4675
4676 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
4677
4678         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
4679         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
4680         when fname does not refer to valid assembly. This result in a more
4681         meaningful error message.
4682         * exception.c: added mono_get_exception_bad_image_format2 which 
4683         constructs a BadImageFormatException using the ctor taking a custom
4684         message and the file name. Passing in a NULL msg results in a default
4685         message.
4686         * exception.h: define mono_get_exception_bad_image_format2 function.
4687         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
4688         when file name pointed to an invalid IL image. Use 
4689         mono_get_exception_file_not_found2 to construct FileNotFoundException,
4690         as this results in a more meaningful error message.
4691
4692 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4693
4694         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
4695         #79465.
4696
4697 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4698
4699         * metadata.c (mono_type_size): Change the align parameter to guint32 for
4700         consistency with the other _size functions.
4701         (mono_type_stack_size): Ditto.
4702
4703         * class.c object.c icall.c: Fix warnings caused by the above change.
4704
4705         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
4706
4707         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
4708
4709         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
4710
4711 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
4712
4713         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
4714         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
4715         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
4716         threadpool.h, threads-types.h: mark more internal functions.
4717
4718 2006-10-11  Dick Porter  <dick@ximian.com>
4719
4720         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4721         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
4722         reproduce the bug even before applying the fix.)
4723
4724 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
4725
4726         * reflection.c: allow retrieving attributes for arguments in generic
4727         methods (bug #79241).
4728
4729 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
4730
4731         * debug-mono-symfile.c: properly check fopen () result (found by
4732         coverity).
4733
4734 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
4735
4736         * reflection.c: make error message clearer and fixed two
4737         issuelets found by Coverity.
4738
4739 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
4740
4741         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
4742
4743 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
4744
4745         * object-internals.h, gc-internal.h, profiler-private.h:
4746         mark internal functions.
4747
4748 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4749
4750         * reflection.c: put data in the text section.
4751         * icall.c: recognize more types in type_from_typename ().
4752         * process.c, marshal.c: added some GC FIXMEs.
4753
4754 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4755
4756         * loader.c: check for NULL before initializing.
4757
4758 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
4759
4760         * gc.c (finalizer_thread): Use a non-alertable wait here.
4761
4762         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
4763         until the correct solution is found.
4764
4765 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
4766
4767         * reflection.c (mono_module_get_object): Avoid an assert when operating on
4768         modules with no metadata. Fixes #79596.
4769
4770         * image.c (load_metadata_ptrs): Put back the error message when
4771         the #- heap is encountered since the support is not complete yet.
4772
4773 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4774
4775         * gc.c: do not allow the user to SuppressFinalize () a
4776         delegate because it would leak the trampoline if present.
4777
4778 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
4779
4780         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
4781         PropertyPtr table.
4782
4783 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4784
4785         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
4786
4787         * metadata.c (mono_metadata_get_param_attrs): Ditto.
4788
4789         * row-indexes.h: Add definitions for *Ptr tables.
4790
4791         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
4792
4793         * metadata.c (mono_metadata_translate_token_index): New helper function to
4794         translate table indexes used in uncompressed metadata.
4795         (mono_metadata_decode_table_row): Ditto.
4796         (mono_metadata_decode_table_row_col): Ditto.
4797
4798         * metadata.c: Add table schema for *Ptr tables.
4799
4800         * class.c loader.c: Use the new helper function to access the affected metadata
4801         tables.
4802         
4803         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
4804         #38532.
4805         
4806 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
4807
4808         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
4809         sequences which can be unbounded in size. Fixes #79583.
4810
4811 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4812
4813         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
4814         static initialization.
4815
4816         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
4817
4818         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
4819
4820         * domain.c (mono_domain_free): Free up type_init_exception_hash.
4821
4822         * object.c (mono_runtime_class_init): Implement correct semantics when a static
4823         ctor fails, i.e. throw the same exception on subsequent accesses.
4824         
4825 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
4826
4827         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
4828         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
4829         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
4830         Handle marshalling of interfaces and VARIANTs contained in structs.
4831         
4832         Code is contributed under MIT/X11 license.
4833         
4834 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4835
4836         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
4837         
4838         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
4839         mempool.
4840
4841 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4842
4843         * console-io.c: ignore previous SIGINT handler.
4844
4845 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4846
4847         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
4848         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
4849         #79460, #79461, #79485.
4850
4851         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
4852
4853         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
4854         #79217.
4855
4856 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4857
4858         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
4859         could be generated from it.
4860
4861 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
4862
4863         * rand.c: fix read loop to correctly handle EINTR.
4864
4865 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4866
4867         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
4868         internal calls are defined to keep methods closer to the declaring
4869         type and allow a significant reduction in runtime relocations and
4870         memory usage.
4871
4872 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
4873
4874         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
4875         exception message to have FileNotFoundException use the default
4876         assembly load error message. Fixes bug #79426.
4877         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
4878
4879 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4880
4881         * threadpool.c: (start_thread_or_queue) use the root domain when
4882         creating the thread instead of the async object one.
4883
4884 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
4885
4886         * class.c, object.c, class-internals.h, reflection.c:
4887         for arrays, store element_size inside MonoClass (speedup
4888         for array object creation).
4889
4890 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
4891
4892         * icall.c: fixed CodeBase to use the file name and not the module
4893         name (bug #79365).
4894
4895 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
4896
4897         * mono-debug.c, mono-debug.h: export find_method as
4898         mono_debug_find_method ().
4899
4900 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4901
4902         * debug-helpers.c, class-internals.h: added a few functions useful
4903         when debugging under gdb.
4904
4905 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4906
4907         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
4908         characters that need special handling.
4909
4910 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4911
4912         * mono-config.c: make the os/cpu specification more flexible,
4913         allowing lists and negation.
4914
4915 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
4916
4917         * marshal.c: COM Interop fixes. Handle case where method->klass.
4918         is interface. Handle BSTR/MonoString when null. Use CDECL as 
4919         calling convention on non-windows platforms. This is for
4920         compatibility with XPCOM and MainWin COM.
4921         
4922         Code is contributed under MIT/X11 license.
4923         
4924
4925 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
4926
4927         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
4928         correctly. Fixes #79217.
4929
4930         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
4931
4932 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
4933
4934         * mono-config.c: allow both an os and cpu attribute for dllmap
4935         and dllentry elemnets to enable a single config file to be used
4936         for multiple architectures.
4937
4938 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
4939
4940         * loader.c: MonoLoaderError was cleared too soon on load failure.
4941         Fixes bug #79424.
4942
4943 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
4944
4945         * icall.c: use the defining class vtable when accessing a
4946         static field, not a pobblibly derived class.
4947
4948 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4949
4950         * icall.c string-icalls.c: Remove references to unicode.h.
4951
4952         * unicode.h unicode.c Makefile.am: Remove these unused source files.
4953
4954         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
4955
4956         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
4957         indicating the image where custom marshaller types should be looked up.
4958         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
4959         custom marshallers, instead of corlib. Fixes #79425.
4960
4961 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
4962
4963         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
4964
4965 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
4966
4967         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
4968         Implement Environment.ProcessorCount.
4969         
4970         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
4971         Implement Environment.ProcessorCount.
4972         
4973         * icall.c: 
4974         Add Environment.ProcessorCount icall.
4975         
4976         Patch by Jason McFall.
4977
4978 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4979
4980         * assembly.c: don't append .exe/.dll when the filename already contains
4981         one of those extensions.
4982
4983 2006-09-12  Martin Baulig  <martin@ximian.com>
4984
4985         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
4986         to array interfaces.
4987
4988 2006-09-11  Martin Baulig  <martin@ximian.com>
4989
4990         * reflection.c (mono_image_build_metadata): Create the
4991         MethodImpl's after emitting all types and methods, so we don't
4992         need another fixup pass for them.
4993
4994 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4995
4996         * class.c (mono_class_from_name_case): Fix regression introduced by the last
4997         change.
4998
4999 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
5000
5001         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
5002         unload.
5003
5004 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
5005
5006         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
5007         args is not set. Fixes #78926.
5008
5009 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
5010
5011         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
5012
5013         * image.c (load_class_names): Move this to class.c, and rename it to 
5014         'mono_image_init_name_cache'.
5015         (load_modules): Fix a warning.
5016
5017         * class.c icall.c image.c: Initialize image->name_cache lazily.
5018
5019         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
5020         on its name using information in the AOT file.
5021
5022         * class.c (mono_class_from_name): Use the new hook function.
5023
5024 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
5025
5026         * reflection.c (mono_param_get_objects): Handle enum default parameter values
5027         correctly.
5028
5029         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
5030         Fixes #79289.
5031         
5032 2006-09-06  Martin Baulig  <martin@ximian.com>
5033
5034         * icall.c (mono_lookup_internal_call): Small fix.
5035
5036 2006-09-05  Raja R Harinath  <rharinath@novell.com>
5037
5038         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
5039         double g_free.
5040
5041 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
5042
5043         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
5044         when --debug is specified.
5045
5046 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
5047
5048         * class.c (setup_generic_array_ifaces): Fix a warning.
5049
5050 2006-09-04  Miguel de Icaza  <miguel@novell.com>
5051
5052         * Temporarily remove the patch to assemly.c that checks the
5053         assembly versions as it breaks our gacutil.
5054
5055 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
5056
5057         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
5058
5059         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
5060         a net 1.0 runtime.
5061
5062         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
5063         created using the default ctor. Fixes #79152.
5064         (mono_string_builder_to_utf16): Ditto.
5065
5066 2006-09-01  Martin Baulig  <martin@ximian.com>
5067
5068         Fix handling of the generic array interfaces.
5069
5070         * class-internals.h
5071         (MonoDefaults): Removed `generic_array_class' and added
5072         `generic_ilist' class.
5073
5074         * class.c
5075         (mono_bounded_array_class_get): Add the new generic array interfaces.
5076         (setup_generic_array_ifaces): New static method; create vtable
5077         entries for each method in the generic array interfaces.
5078
5079         * metadata.c
5080         (select_container): Allow "parent-less" generic methods.
5081
5082         * marshal.c
5083         (mono_marshal_get_generic_array_helper): New public method.
5084
5085         * icall.c
5086         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
5087         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
5088         moved the interncall into System.Array.
5089
5090 2006-09-01  Raja R Harinath  <rharinath@novell.com>
5091
5092         A few more cases of avoiding work on types with ->byref set.
5093         Has the real fix for #79238
5094         * icall.c (is_generic_parameter): New helper.
5095         (ves_icall_Type_GetGenericParameterPosition): Use it.
5096         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
5097         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
5098         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
5099         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
5100         reference types.
5101         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
5102         reference types.
5103         (ves_icall_Type_get_IsGenericInstance): Likewise.
5104         (ves_icall_Type_get_IsGenericType): Likewise.
5105
5106 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
5107
5108         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
5109         class if possible.
5110
5111         * mempool.h (mono_mempool_get_allocated): New helper function.
5112
5113         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
5114         change.
5115
5116         * mempool.c: Fix warnings and the calculation of stats.
5117
5118         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
5119
5120         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
5121
5122         * loader.c (mono_get_method_from_token): Update method_count stat.
5123
5124         * class-internals.h (MonoStats): Add some stats.
5125
5126 2006-08-31 Robert Jordan  <robertj@gmx.net>
5127
5128         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
5129         with managed variants.
5130         All code is contributed under the MIT/X11 license.
5131         
5132 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
5133
5134         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
5135         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
5136
5137         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
5138
5139         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
5140         with cycles in classes.
5141
5142         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
5143
5144         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
5145         missing a [MarshalAs] directive. Fixes #79203.
5146
5147         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
5148         klass->marshal_info. Fixes #79217.
5149
5150 2006-08-30  Martin Baulig  <martin@ximian.com>
5151
5152         Committing a patch from Joachim Ante <joe@otee.dk>:
5153         Add support for binary data symbol stores.
5154
5155         * debug-mono-symfile.c
5156         (mono_debug_open_mono_symbol_file): Renamed into
5157         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
5158         arguments.
5159
5160         * mono-debug.c
5161         (mono_debug_open_image): Added `raw_contents' and `size' args.
5162         (mono_debug_init_2_memory): New public function.
5163
5164 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
5165
5166         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
5167
5168 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5169
5170         * appdomain.c: implement support for ShadowCopyFiles.
5171
5172 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
5173
5174         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
5175         when value is NULL (and should remove CID #51).
5176
5177 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5178
5179         * image.c: moved 2 functions to ../utils.
5180
5181 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5182
5183         * gc.c: cope with the target object of a GC handle being NULL
5184         (bug #78877).
5185
5186 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5187
5188         * class.c: recursively check parent's explicit implementations
5189         of interface methods (fixes bug #79125).
5190
5191 2006-08-19  Miguel de Icaza  <miguel@novell.com>
5192
5193         * filewatcher.c: Avoid warnings when building, do not redefine
5194         constants that are defined.
5195
5196         Remove warnings.
5197
5198 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5199
5200         * image.c: don't fail when the link points to an absolute path.
5201
5202 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
5203
5204         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
5205         Fix CID #3.
5206
5207 2006-08-17  Miguel de Icaza  <miguel@novell.com>
5208
5209         * image.c (full_path): A new method used to obtain the actual path
5210         of an assembly even in the presence of symbolic links.  
5211
5212         This is necessary for the case where we are running a binary that
5213         has been GACed, but we are using the "published" path name
5214         ($prefix/mono/1.0/blah.exe) which happens to point to the real
5215         file in the GAC.
5216
5217         This was the source of the failure for the `xsp' command with the
5218         recent AppDomain changes, as far as the runtime was concerned,
5219         there were two different assemblies: $prefix/mono/1.0/blah.exe and
5220         $prefix/mono/gac/blah/version/blah.exe.
5221
5222         (do_mono_image_open): use full path
5223
5224 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
5225
5226         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
5227
5228 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
5229
5230         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
5231         domain_id is supplied. Fix CID #241 and corlib's unit tests.
5232
5233 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
5234
5235         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
5236         small structures. Fixes #78990.
5237
5238 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
5239
5240         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
5241
5242         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
5243
5244 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5245
5246         * appdomain.c:
5247         * marshal.c: don't load all the assemblies from a domain into newly
5248         created ones. The new domains might have different rules and load
5249         assemblies from different locations. Fixes bug #76757.
5250
5251         Patch by Lluis. Conflicts resolved by Brian Crowell.
5252
5253 2006-08-16  Alp Toker  <alp@atoker.com>
5254
5255         * socket-io.c: First half of the fix for #79084.
5256         Set sa_size to the length of the content, not that of the struct.
5257         Don't add NULL suffix to the content, this should be done in
5258         managed code if needed.
5259
5260 2006-08-14  Raja R Harinath  <rharinath@novell.com>
5261
5262         Fix part of #79012
5263         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
5264         mono_metadata_parse_type returns NULL.
5265
5266 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
5267
5268         * normalization-tables.h : new file for string normalization data.
5269         * locales.c, locales.h, icall.c :
5270           added load_normalization_resource() for string normalization,
5271           and icall as well.
5272         * Makefile.am : added normalization-tables.h to the sources.
5273
5274 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
5275
5276         * marshal.c: Add more helper functions to reduce code duplication and use them
5277         everywhere.
5278
5279 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
5280
5281         * marshal.c: Fix non-x86 stdcall warnings.
5282         
5283         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
5284         them everywhere.
5285
5286 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
5287
5288         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
5289         type check on multi-dimensional arrays. Fixes #79000.
5290
5291 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
5292
5293         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
5294         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
5295         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
5296         * class-internals.h: add is_com_object to class structure.
5297         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
5298         null checks to COM object marshalling. Fix .ctor call on RCW.
5299         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
5300         
5301         All code is contributed under the MIT/X11 license.
5302
5303 2006-08-09  Dick Porter  <dick@ximian.com>
5304
5305         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
5306         racing mono_monitor_allocator_lock() somewhere, so don't delete
5307         the critical section for now.  Found by running and exiting
5308         monodevelop.
5309
5310 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
5311
5312         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
5313         (ves_icall_System_ComObject_FindInterface): Ditto.
5314         (ves_icall_System_ComObject_CacheInterface): Ditto.
5315
5316         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
5317         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
5318
5319 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5320
5321         * threadpool.c: treat pipes from process asynchronous reads as sockets
5322         when reading from them, so we get select/poll or epoll to wait for
5323         data.
5324
5325 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
5326
5327         * loader.c: Fix a typo (CID #233) in the null check.
5328
5329 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
5330
5331         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
5332         Hopefully fixes #78949.
5333         
5334         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
5335         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
5336         bytes. Fixes #78972.
5337
5338 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5339
5340         * filewatcher.c: we need to set errno here.
5341
5342 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5343
5344         * filewatcher.c: let Win32Exception get the error value.
5345
5346 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5347
5348         * filewatcher.c: translate errno into win32 errors for Win32Exception
5349         to know what happened.
5350
5351 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
5352
5353         * threadpool.c: Fix more warnings.
5354
5355         * assembly.c (search_loaded): Fix warnings.
5356
5357         * threadpool.c (mono_thread_pool_finish): Fix warnings.
5358         (mono_async_invoke): Ditto.
5359
5360 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
5361
5362         * object.c (mono_remote_class_vtable): Need to create proxy vtable
5363         entries for __ComObject type in addition to ComImport types.
5364         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
5365         about hash table.
5366         
5367         All code is contributed under the MIT/X11 license.
5368
5369 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
5370
5371         * image.c: avoid tentative loading of modulerefs that contain
5372         no metadata (P/Invoke library names).
5373
5374 2006-07-28  Dick Porter  <dick@ximian.com>
5375
5376         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
5377         mono_loader_lock() somewhere, so don't delete the critical section
5378         for now.  Found by running and exiting monodevelop.
5379
5380 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5381
5382         * filewatcher.c: define the inotify syscalls when we're building on
5383         linux and have sys/syscall.h. The build system might not have support
5384         for inotify but the target system might have it.
5385
5386 2006-07-26  Miguel de Icaza  <miguel@novell.com>
5387
5388         * domain.c: Documentation updates.
5389
5390         * loader.c (mono_free_method): Do not release the method
5391         information if we are being profiled, as profilers will use this
5392         information at shut down to present some data to the user.
5393
5394         This is needed so that the profiler does not crash, as the
5395         profiler tends to keep MonoMethods around, and they might become
5396         invalid if we free these.
5397
5398         (mono_get_method_constrained): Return the original CIL stream
5399         method as well, so verification can be performed against it.
5400
5401 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5402
5403         * filewatcher.[ch]: support for inotify file system watcher.
5404         * icall.c: add new internal calls for the inotify file system watcher.
5405
5406 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5407
5408         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
5409         #78888.
5410
5411 2006-07-20  Dick Porter  <dick@ximian.com>
5412
5413         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
5414         warning.
5415
5416 2006-07-20  Dick Porter  <dick@ximian.com>
5417
5418         * threads.c (start_wrapper): Do the thread cleanup while we still
5419         hold a reference to its object.  Fixes bug 78123.
5420
5421 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
5422
5423         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
5424         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
5425           "managed-to-managed".
5426         * icall.c: Redirect string constructors that take sbyte* to
5427           ves_icall_System_String_ctor_RedirectToCreateString.
5428         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
5429           to CreateString () methods with matching signature.
5430         * reflection.c: Use original security informations for
5431           MONO_WRAPPER_MANAGED_TO_MANAGED.
5432         * security-manager.c: Use original security informations for
5433           MONO_WRAPPER_MANAGED_TO_MANAGED.
5434         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
5435           that is a placeholder and only its address should be used.
5436         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
5437           that is a placeholder and only its address should be used.
5438
5439 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
5440
5441         Begin implementing COM Interop.
5442         * appdomain.c: Increment corlib version.
5443         * class.c: Set ComImport classes' parent to __ComObject.
5444         * loader.c: Mark cominterop methods as such.
5445         * domain.c: Add __ComObject class to MonoDefaults structure.
5446         * image.c: Add 2 hashtables to the image for COM Interop related methods
5447         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
5448         using the mempool allocator
5449         
5450         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
5451         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
5452         declaration for mono_metadata_type_dup_mp.
5453         
5454         * debug-helpers.c: Added strings for two additional wrapper types
5455         * object.c: Create proxy objects for ComImport classes
5456         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
5457         and added __ComObject class to MonoDefaults structure.
5458         
5459         * object-internals.h: Finish MonoRealProxy definition, and add definition of
5460         MonoComInteropProxy and MonoComObject.
5461         
5462         * marshal.c: Added support for COM Interop
5463         (signature_cominterop): Converts managed signature to corresponding
5464         unmanaged COM signature.
5465         (cominterop_get_function_pointer): gets unmanaged function pointer via
5466         COM object vtable
5467         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
5468         (cominterop_get_method_interface): returns interface type that method is defined on
5469         (mono_mb_emit_cominterop_call): emits native call to function pointer
5470         gotten from vtable
5471         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
5472         that matches signature of unmanaged function.
5473         (cominterop_get_native_wrapper): wrapper around adjusted method call.
5474         (cominterop_get_invoke): forwards call from proxy to __ComObject
5475         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
5476         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
5477         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
5478         
5479         * marshal.h: Added Marshal icall declarations.
5480         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
5481         so we can access them in finalizer
5482         
5483 2006-07-14  Dick Porter  <dick@ximian.com>
5484
5485         * object.c (mono_type_initialization_cleanup): Fix a race
5486         condition by temporarily commenting out the critical section
5487         deletion.
5488
5489 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
5490
5491         * reflection.c (create_custom_attr): Fix some warnings.
5492         (create_custom_attr_data): Ditto.
5493         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
5494         types. Fixes #78855.
5495
5496 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
5497
5498         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
5499
5500         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
5501
5502 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
5503
5504         * reflection.c (resolve_object): Add support for DynamicMethod.
5505
5506         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
5507         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
5508
5509 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
5510
5511         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
5512         don't leak GPtrArray's pdata has we have no use (nor free) for it.
5513
5514 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
5515
5516         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
5517         Fixes #77888.
5518
5519 2006-06-30  Raja R Harinath  <rharinath@novell.com>
5520
5521         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
5522         slightly: remove a shadow local variable.
5523
5524 2006-06-29  Raja R Harinath  <rharinath@novell.com>
5525
5526         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
5527         definition that introduces the virtual function slot.
5528         Also fix Coverity #105.
5529
5530 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
5531
5532         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
5533         for dynamic assemblies. Fixes #78724.
5534
5535 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
5536
5537         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
5538         Fixes #78722.
5539
5540 2006-06-21  Martin Baulig  <martin@ximian.com>
5541
5542         * reflection.c
5543         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
5544         fixes #76484.
5545
5546 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
5547
5548         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
5549
5550 2006-06-20  Raja R Harinath  <rharinath@novell.com>
5551
5552         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
5553         nor TYPEREFs.
5554         * class.c (mono_class_create_from_typespec): Add 'context' argument.
5555         Inflate result if necessary.
5556         (mono_class_get_full): Remove old version.  Rename from
5557         'mono_class_get' and add 'context' argument.  Pass it to
5558         ..._create_from_typespec.
5559         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
5560         (mono_ldtoken): Revert change below.
5561
5562 2006-06-20  Martin Baulig  <martin@ximian.com>
5563
5564         * class.c (mono_ldtoken): Don't pass the generic context to
5565         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
5566
5567 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
5568
5569         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
5570         and later freeing it. Fixes #78638.
5571
5572 2006-06-15  Miguel de Icaza  <miguel@novell.com>
5573
5574         * icall.c (mono_class_get_throw): Revert over-zealous error
5575         throwing, the caller for mono_class_get_throw will cope with
5576         errors when classes are not properly initialized already.
5577
5578         The code still copes with loader exceptions though.
5579
5580         Fixes the regression in reftype1 and reftype3 from the CAS tests.
5581         
5582 2006-06-14  Miguel de Icaza  <miguel@novell.com>
5583
5584         Fixes the `make run1' version of RuntimeAbort (to be commited,
5585         source is in Bugzilla).
5586         
5587         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
5588         FALSE on class loading failure instead of returning true.
5589
5590         * class.c (mono_class_create_from_typedef): It is possible for
5591         mono_metadata_interfaces_from_typedef_full to fail if a class is
5592         not found, cope with this.
5593         
5594
5595 2006-06-14  Dick Porter  <dick@ximian.com>
5596
5597         * socket-io.c: 
5598         * process.c: Fix a bunch of signed/unsigned warnings from gcc
5599         4.1.1
5600
5601 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
5602
5603         * culture-info-table.h : oops, forgot to make it nsync with r61548.
5604
5605 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5606
5607         * icall.c: Another fix for building mono in Visual Studio.
5608
5609 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5610
5611         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
5612         
5613 2006-06-09  Martin Baulig  <martin@ximian.com>
5614
5615         * debug-mono-symfile.c: Put this back and really fix it this
5616         time. Sorry for all the trouble.
5617
5618 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
5619
5620         * icall.c (mono_class_get_throw): Fix a warning.
5621         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
5622         ReflectionTypeLoadException if needed. Fixes #78606.
5623
5624         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
5625         (mono_class_init): Ditto.
5626
5627         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
5628         ref_only exceptions.
5629         (mono_loader_clear_error): Make this work even if there is no error.
5630
5631 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
5632
5633         * object-internals.h marshal.c marshal.h icall.c: Implement method 
5634         Marshal.GetComSlotForMethodInfo using internal call.
5635
5636 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
5637
5638         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
5639         a function for signalling it.
5640
5641         * class.c (mono_class_from_typeref): Use the new kind of loader error when
5642         a referenced assembly is not found.
5643
5644         * loader.c (mono_loader_error_prepare_exception): Add support for 
5645         LOADER_ERROR_ASSEMBLY. Fix formatting.
5646
5647 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
5648
5649         * domain.c appdomain.c class-internals.h marshal.c: Add support 
5650         for VARIANT marshalling on windows and increment corlib version
5651         since Variant struct was added.
5652
5653 2006-06-03  Miguel de Icaza  <miguel@novell.com>
5654
5655         * debug-mono-symfile.c: Revert Martin's previous patch which broke
5656         stack trace line information:
5657
5658         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
5659         (Martin) when looking up B which is between A and C, return A not C.
5660
5661         Bug is #78573.
5662
5663         Thanks to Alexander Olk for tracking this down.
5664
5665 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5666
5667         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
5668         
5669         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
5670         avoid clobbering its value.
5671         (mono_string_to_lpstr): Fix a warning on windows.
5672
5673 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
5674
5675         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
5676
5677         * reflection.c loader.c: Removed references to 'dummy' flag.
5678
5679         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
5680
5681         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
5682         it gets GC tracking.
5683
5684         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
5685         GC tracking.
5686         
5687         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
5688
5689         * marshal.c threadpool.c: Update callers of mono_async_result_new.
5690
5691         * appdomain.c: Bump corlib version.
5692
5693 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
5694
5695         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5696         CEE_STIND_REF when working with object references.
5697
5698 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
5699
5700         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
5701         Fixes #78539.
5702
5703 2006-05-30  Miguel de Icaza  <miguel@novell.com>
5704
5705         * loader.c (method_from_memberref): Fix argument value for
5706         mono_loader_set_error_method_load (I was passing the MonoClass
5707         instead of the class name char *).
5708
5709 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
5710
5711         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5712         CEE_STIND_REF when working with object references.
5713
5714 2006-05-30  Martin Baulig  <martin@ximian.com>
5715
5716         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
5717         mono_method_full_name() change and replace the ':' with a '.'
5718         here.
5719
5720 2006-05-30  Martin Baulig  <martin@ximian.com>
5721
5722         * debug-mono-symfile.c
5723         (mono_debug_symfile_lookup_location): Fix the algorithm:
5724         when looking up B which is between A and C, return A not C.
5725
5726 2006-05-29  Martin Baulig  <martin@ximian.com>
5727
5728         * mono-debug.h
5729         (MonoDebugMethodInfo): Make the typedef public.
5730         (MonoDebugSourceLocation): New public struct.
5731
5732         * mono-debug.c
5733         (mono_debug_source_location_from_address): Removed.
5734         (mono_debug_source_location_from_il_offset): Removed.
5735         (mono_debug_il_offset_from_address): Removed.
5736         (mono_debug_address_from_il_offset): Removed.
5737         (mono_debug_lookup_method): New public function.
5738         (mono_debug_lookup_source_location): New public function; replaces
5739         the old mono_debug_source_location_from_*() functions; see the
5740         inline documentation.
5741         (mono_debug_free_source_location): New public function.
5742         (mono_debug_print_stack_frame): New public function; see the
5743         inline documentation.
5744
5745         * debug-mono-symfile.c
5746         (mono_debug_find_source_location): Renamed into
5747         mono_debug_symfile_lookup_location(); only take a
5748         `MonoDebugMethodInfo *' and an `offset' argument; added inline
5749         documentation.
5750         (mono_debug_find_method): Renamed into
5751         mono_debug_symfile_lookup_method().
5752
5753 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5754
5755         * assembly.c (mono_assembly_open_full): Dont overwrite the status
5756         returned by mono_image_open_full ().
5757
5758         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
5759         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
5760         #78517.
5761
5762         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
5763         #78518.
5764
5765 2006-05-27  Miguel de Icaza  <miguel@novell.com>
5766
5767         * class.c (mono_class_from_typeref): handle missing images
5768         earlier, deals with bug #78418.   Refactor code; 
5769
5770         Fix a warning introduced in my previous commit (some stale code
5771         from before I revisited my patch).
5772
5773         * class.c (mono_class_create_from_typedef): On failure, remove the
5774         class from the MonoImage->class_cache as the class is not
5775         initialized;   Fixes the leak pointed out by Paolo.
5776
5777 2006-05-25  Dick Porter  <dick@ximian.com>
5778
5779         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
5780         DeleteCriticalSections until I figure out which one may still be
5781         sometimes locked when mono_thread_cleanup is called.
5782
5783 2006-05-24  Dick Porter  <dick@ximian.com>
5784
5785         * threads.c (mono_thread_cleanup): Move the threading cleanup out
5786         of mono_thread_manage and back into its own function, so it can be
5787         called after the finalizer thread has finished.
5788
5789         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
5790
5791 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
5792
5793         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
5794         Fixes #78495.
5795
5796         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
5797         with non-blittable elements.
5798         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
5799
5800 2006-05-24  Martin Baulig  <martin@ximian.com>
5801
5802         * mono-debug-debugger.h (MonoDebuggerEvent): Added
5803         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
5804
5805         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
5806         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
5807         `mono_debugger_event_handler' to NULL.
5808
5809 2006-05-24  Martin Baulig  <martin@ximian.com>
5810
5811         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
5812
5813 2006-05-24  Martin Baulig  <martin@ximian.com>
5814
5815         * mono-debug-debugger.h
5816         (mono_debugger_create_notification_function): Added
5817         `MonoCodeManager *' argument.
5818
5819 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
5820
5821         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
5822
5823 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
5824
5825         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
5826         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
5827         implementation.
5828
5829 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
5830
5831         * icall.c: precise GC support: objects can't be stored in unmanaged
5832         memory anymore, even if they are kept alive by other references: since
5833         they can move the GC needs to be able to always find them.
5834
5835 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5836
5837         * object.c: precise GC support for static fields. Support
5838         for moving GCs: write barriers and pinned allocation for interned
5839         strings.
5840
5841 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
5842
5843         * domain.c, domain-internals.h: precise GC support for the MonoDomain
5844         structure.
5845
5846 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5847
5848         * class.c, gc.c: sgen and precise GC updates.
5849
5850 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5851
5852         * marshal.h, marshal.c: added write barrier wrapper and precise type
5853         fixes.
5854
5855 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
5856
5857         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
5858         support.
5859
5860 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5861
5862         * reflection.c: precise and sgen GC updates.
5863
5864 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5865
5866         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
5867
5868 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
5869
5870         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
5871
5872 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
5873
5874         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
5875         MONO_TYPE_OBJECT. Fixes #78462.
5876
5877 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5878
5879         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
5880         and blittable types.
5881
5882 2006-05-17  Miguel de Icaza  <miguel@novell.com>
5883
5884         * class.c (mono_class_get_exception_for_failure): Implement parts
5885         of a TODO: if the loader error is set (instead of the class
5886         error), we return a Loader exception that can be properly thrown
5887         elsewhere.
5888
5889         This was exposed by some Winforms 2.0 code that I tried to run
5890         (Atsushi pointed me to it).
5891
5892 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
5893
5894         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
5895         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
5896         
5897         * marshal.c (emit_marshal_vtype): Add limited support for 
5898         UnmanagedType.LPStruct. Fixes #78427.
5899
5900         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
5901         Applied a patch from kangaroo to fix #77523.
5902
5903 2006-05-17  Martin Baulig  <martin@ximian.com>
5904
5905         * threads.c
5906         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
5907         (debugger_thread_created): Removed.
5908         (debugger_thread_exited): Removed.
5909
5910 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
5911
5912         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5913
5914         * object-internals.h (MonoReflectionResource): Sync with managed version.
5915
5916 2006-05-12  Wade Berrier <wberrier@novell.com>
5917
5918         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
5919
5920 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
5921
5922         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
5923         functions try to allocate from the image mempool.
5924
5925 2006-05-12  Dick Porter  <dick@ximian.com>
5926
5927         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
5928
5929 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
5930
5931         * object.c: The FieldGetter and FieldSetter methods require the full
5932         name of the class, not only the name. Fixes bug #78277.
5933
5934 2006-05-11  Miguel de Icaza  <miguel@novell.com>
5935
5936         * loader.c (method_from_memberref): Do not pass the NULL klass to
5937         mono_loader_set_error_() methods.  Pass the non-NULL value
5938         (class). 
5939
5940 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5941
5942         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
5943         (mono_assembly_close): Null out assembly->image->references after freeing it.
5944
5945         * image.c (mono_image_close): Free image->references.
5946         
5947         * reflection.c (mono_image_basic_init): Fix a small memory leak.
5948
5949 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
5950
5951         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
5952         before checking if it's NULL (g_assert).
5953
5954 2006-05-10  Martin Baulig  <martin@ximian.com>
5955
5956         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
5957         I thought I already killed that two months ago, but now it somehow reappeared.
5958
5959 2006-05-10  Martin Baulig  <martin@ximian.com>
5960
5961         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
5962
5963 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5964
5965         * reflection.c: Allocate memory for dynamically created methods in the image
5966         mempools.
5967
5968 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
5969
5970         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
5971         don't use the ad pointer before checking if it's NULL (g_assert).
5972
5973 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5974
5975         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
5976         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
5977
5978         * marshal.c: Allocate all signatures from mempools.
5979
5980         * marshal.c: Allocate some more signatures from mempools.
5981
5982 2006-05-09  Miguel de Icaza  <miguel@novell.com>
5983
5984         * object.c (mono_load_remote_field): The code used to provide a
5985         temporary variable for returning results if the user did not
5986         provide a result pointer.  But our temporary variable was allocted
5987         on the satck.
5988
5989         Fix calling code to always pass a result area.   Coverity ID 103.
5990
5991 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5992
5993         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
5994         value, not the old. Fixes #78312.
5995         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
5996
5997         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
5998         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
5999         per-image cache.
6000
6001         * assembly.c (mono_assembly_close): Free image->references.
6002
6003         * assembly.c (mono_assembly_names_equal): Fix a warning.
6004         (mono_assemblies_cleanup): Cleanup more global data.
6005
6006         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
6007
6008         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
6009         ptr_cache and image->modules.
6010
6011         * image.c (mono_image_init): Allocate array_cache lazily.
6012         
6013 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6014
6015         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
6016         behavior was changed recently and has bad side effects.
6017
6018 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
6019
6020         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
6021         
6022         * assembly.c (mono_assembly_close): Remove a debug printf.
6023
6024         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
6025
6026         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
6027         to also allow for temporary references between mono_image_open ()/close ().
6028
6029         * domain.c (get_runtimes_from_exe): Add a FIXME.        
6030
6031 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
6032
6033         * marshal.c: Fix support for dynamic methods.
6034
6035         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
6036
6037         * marshal.c (mono_marshal_cleanup): New cleanup function.
6038
6039         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
6040         image mempools.
6041
6042         * class.c (mono_class_init): Fix leaking class->nested_classes.
6043
6044         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
6045
6046         * image.c (mono_image_init): Initialize the new cashes.
6047
6048         * image.c (mono_image_close): Destroy the new cashes.
6049
6050         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
6051
6052         * mempool.c (mono_mempool_strdup): New helper function.
6053
6054         * class-internals.h: Add prototype for mono_loader_unlock ().
6055
6056         * domain.c (mono_jit_info_table_find): Fix a warning.
6057         (mono_debugger_check_runtime_version): Ditto.
6058
6059         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
6060         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
6061         functions to these modules.
6062
6063         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
6064         metadata modules.
6065         
6066         * marshal.c (mono_free_bstr): Fix a warning.
6067
6068         * assembly.c (mono_assembly_open_full): Fix another small leak.
6069
6070         * object.c: Fix some unload leaks in the remoting code.
6071
6072         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
6073         function.
6074
6075         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
6076
6077         * reflection.c: Fix some unload leaks in dynamic assemblies.
6078
6079 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
6080
6081         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
6082         * marshal.h: Add BSTR support on Win32
6083         * icall.c: Add BSTR icalls
6084         * metadata.h: Add BSTR enums
6085
6086 2006-04-28  Miguel de Icaza  <miguel@novell.com>
6087
6088         Work to catch the crash from #76795 and turn it into an
6089         exception.   As I stubbed out pieces of the VisualBasic support,
6090         I found a number of places where the code was failing and I added
6091         checks to those places. 
6092         
6093         * metadata.c (do_mono_metadata_parse_generic_class): Make this
6094         function return a status code.  If we fail to parse the signature
6095         from mono_metadata_parse_generic_inst, return FALSE.
6096
6097         * loader.c (mono_get_method_from_token): If we fail to load the
6098         method (mono_class_get) return NULL.   
6099
6100         * (method_from_memberref): Return NULL if we are unable to parse
6101         the method signature
6102
6103         (mono_loader_error_prepare_exception): Since we now use the
6104         loader_error flag internally to stop processing, and obtaining
6105         exceptions that might be thrown will walk this code path the
6106         proper way of going from a MonoLoaderError into a
6107         MonoException was convoluted.   This new routine encapsulates the
6108         process of turning the error into an exception and *clearing* the
6109         error afterwards.
6110         
6111 2006-04-27  Miguel de Icaza  <miguel@novell.com>
6112
6113         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
6114         with missing assemblies), and to cope with:
6115
6116                 * Missing fieldref from a non-existing assembly.
6117                 * Missing methodref from a non-existing assembly.
6118
6119         The first batch of work to address *some* of the issues from 76661.
6120         
6121         * object.c (mono_class_create_runtime_vtable): If we fail to
6122         initialize the class raise the exception here. 
6123
6124         * metadata.c (mono_class_get_overrides_full): If any methods fail
6125         to load return the failure to the caller.
6126
6127         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
6128         flagging assemblies that failed to load.   
6129
6130         Do not crash if we are unable to load the assembly.
6131
6132         (mono_assembly_close): Do nothing with REFERENCE_MISSING
6133         assemblies. 
6134
6135         * loader.c (mono_loader_set_error_type_load): Change the
6136         convention to always pass unallocated strings, so we make our own
6137         copies (I know our own code had duplicated strings before, but
6138         this keeps the normal conventions).
6139         (method_from_memberref): Call mono_loader_set_error_method_load
6140         for all possible failures of loading the class. 
6141         Remove assert, turn into a loader error.
6142
6143         (mono_loader_error_to_exception): Move this routine from mini
6144         (mini_loader_error_to_exception) there was no need to have that in
6145         mini. 
6146
6147         * class.c (mono_class_from_typeref): If we were not able to load
6148         the assembly with mono_assembly_load_reference, call the
6149         mono_loader_set_error_type_load to register the problem.
6150
6151         (mono_class_setup_fields): If we fail to load the type from
6152         mono_metadata_parse_type_full, call mono_class_set_failure and
6153         break from the loop.
6154
6155         If class->exception_type is set, we do not layout the fields as
6156         that might crash the runtime, and instead return (from breaking
6157         from the previous loop).
6158
6159         (mono_class_setup_vtable): This now returns a boolean indicating
6160         whether the table was properly setup.   The decision is driven by
6161         mono_class_get_overrides_full which might run into non-existing
6162         methods. 
6163         
6164         (mono_class_init): Returns TRUE on success or FALSE if there was a
6165         problem in loading the type (incorrect assemblies, missing
6166         assemblies, methods, etc).
6167
6168         When we call mono_class_setup_fields we also check for a potential
6169         error inside this call (either a class exception or a general
6170         loader exception).
6171
6172         (mono_class_create_from_typedef): If the parent fails to load
6173         (calling mono_class_get_full) return NULL.
6174         
6175         ** Important **
6176
6177         calls to mono_metadata_parse_type_full should be checked
6178         everywhere and set the mono_class_set_failure
6179         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
6180
6181         The current patch checks the places where my manually constructed
6182         tests show the errors are showing up, but we should do it
6183         everywhere. 
6184
6185         ** Important2 **
6186
6187         mono_class_init return values should be tested everywhere, like
6188         the previous case this is something that we should audit
6189         everywhere and not only on the cases exposed by the tests I
6190         created. 
6191
6192 2006-04-26  Miguel de Icaza  <miguel@novell.com>
6193
6194         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
6195         boolean parameter and instead pass the information on `options'
6196         parameter (FileOptions).
6197
6198         * icall.c: Register the new signature for MonoIO.Open.
6199
6200         * debug-helpers.c (dis_one): Trying to understand how coverity
6201         works.  Fix Run 5, item 78.
6202
6203 2006-04-26  Dick Porter  <dick@ximian.com>
6204
6205         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
6206         dereference.
6207
6208 2006-04-25  Martin Baulig  <martin@ximian.com>
6209
6210         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
6211
6212         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
6213         debugger_thread_created().
6214         (debugger_gc_push_all_stacks): Don't handle the main thread in any
6215         special way.
6216         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
6217         (mono_debugger_finalize_threads): New function; undo the effects
6218         of mono_debugger_init_threads().
6219         (mono_debugger_create_all_threads): Removed.
6220
6221 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
6222
6223         * image.c (mono_image_close): Tidy up trace messages.
6224
6225         * assembly.c (mono_assembly_close): Ditto.
6226
6227         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
6228         no longer references an already freed assembly. Fixes #78168.
6229
6230 2006-04-21  Dick Porter  <dick@ximian.com>
6231
6232         * threads.c (mono_thread_detach): Fix reference counting when
6233         detaching threads.
6234
6235 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
6236
6237         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
6238         #78155.
6239
6240 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
6241
6242         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
6243         (mono_type_to_stind): Ditto.
6244
6245         * marshal.c: Use the new helper functions to simplify code.
6246
6247         * image.c (mono_image_close): Add some code for help debug assembly unloading
6248         problems.
6249
6250         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
6251         image mempool.
6252
6253         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
6254         assembly was already loaded in another appdomain. Fixes #78083.
6255
6256 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
6257
6258         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
6259         referenced assemblies.
6260         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
6261
6262         * domain.c (mono_domain_free): Add a trace message.
6263
6264         * appdomain.c (add_assemblies_to_domain): Ditto.        
6265
6266         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
6267         field.  
6268
6269 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
6270
6271         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
6272
6273 2006-04-12  Martin Baulig  <martin@ximian.com>
6274
6275         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
6276         `USE_INCLUDED_LIBGC'.   
6277
6278 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
6279
6280         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
6281         the patch contains ../ and a small directory name later. Hopefully fixes
6282         #78035.
6283
6284 2006-04-10  Martin Baulig  <martin@ximian.com>
6285
6286         Clean up the debugger's thread-handling code.
6287
6288         The debugger's thread-handling code has been moved from
6289         ../mini/debug-debugger.c to threads.c.  We now iterate directly
6290         over the `threads' hash, keep track of exiting threads and also
6291         use proper locking.
6292
6293         We can now debug XSP and XSP based applications with the debugger.
6294
6295         * object-internals.h (MonoThread): Added `gpointer end_stack'.
6296
6297         * threads.h
6298         (MonoThreadCallbacks): Removed; this was only used by the debugger.
6299         (mono_install_thread_callbacks): Likewise.      
6300
6301         * threads.c (mono_thread_callbacks): Removed.
6302         (debugger_thread_created, debugger_thread_exited): New static functions.
6303         (start_wrapper): Call debugger_thread_created().
6304         (thread_cleanup): Call debugger_thread_exited().
6305         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
6306         (mono_debugger_init_threads): New public function.
6307         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
6308         iterate directly over the `threads' hash and also use proper locking.
6309
6310         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
6311
6312         * mono-debug-debugger.h
6313         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
6314
6315 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6316
6317         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
6318         argument type=array. Fixes #78057.
6319
6320 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
6321
6322         * culture-info-table.h : regenerated. Fixed bug #69652.
6323
6324 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
6325
6326         * loader.c metadata.c: Reapply a variant r59116.
6327         
6328         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
6329
6330         * class.c (mono_class_setup_interface_offsets): New internal function.
6331
6332         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
6333         interfaces too. Fixes #77398.
6334
6335         * reflection.c (encode_cattr_value): Add support for 
6336         parameter type=object, argument type=array.
6337         (load_cattr_value): Ditto. Fixes #77916.
6338
6339         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
6340         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
6341
6342         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
6343         a byval char array and CharSet is Ansi.
6344
6345         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
6346
6347 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
6348
6349         * metadata.c: Add some locking comments.
6350         
6351         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
6352         mempool.
6353         (mono_metadata_free_method_signature): Don't free the signature itself.
6354
6355         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
6356
6357         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
6358         reference the same MonoImage.
6359         (mono_assembly_load_from_full): Add an assert.
6360
6361 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
6362
6363         * image.c (mono_image_close): Don't put the image we are about to free into the
6364         loaded_images_guid_hash.
6365
6366         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
6367         to reduce code duplication.
6368
6369         * marshal.c: Register the native functions called by this module as icalls, to
6370         somewhat centralize the creation of MonoMethodSignature's.
6371
6372         * loader.c (mono_method_signature): Add a cache for method signatures.
6373
6374         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
6375         the parameter attributes of a method.
6376         (mono_metadata_parse_method_signature_full): Refactored the computation of
6377         parameter attributes into a separate function. Also avoid one allocation in
6378         most cases.
6379
6380         * assembly.c (mono_assembly_close): Ditto.
6381
6382         * image.c (mono_image_close): Log trace messages with INFO level.
6383
6384         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
6385
6386         * image.c reflection.c: Correct reference counting of image modules.
6387         
6388         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
6389         of this function from the image mempool.
6390         
6391         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
6392         to allow more cached types to be used.
6393
6394         * mono-debug.c (mono_debug_add_method): Appled patch from
6395         David S. Miller  <davem@sunset.davemloft.net>: Access 
6396         minfo->lexical_blocks[] entry elements using read32().
6397
6398 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
6399
6400         * loader.c (mono_free_method): No longer free the method header for non-dynamic
6401         methods as it is allocated from the mempool.
6402
6403         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
6404         image mempool.
6405
6406         * metadata-internals.h: Add comments describing the reference counting scheme
6407         used for MonoImage and MonoAssembly.
6408
6409         * image.c assembly.c reflection.c: Rework reference counting of images and 
6410         assemblies so they are freed when the runtime is shut down. Free some 
6411         additional memory structures when an image is unloaded.
6412         
6413 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
6414
6415         * class.c loader.c reflection.c: Allocate more data structures in
6416         the image mempool.
6417
6418 2006-03-31  Miguel de Icaza  <miguel@novell.com>
6419
6420         * icall.c
6421         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
6422         build on pre glib 2.4 systems.
6423
6424 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
6425
6426         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
6427
6428         * icall.c: Fix some warnings.
6429
6430 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
6431
6432         * culture-info-table.h : regenerated.
6433
6434 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
6435
6436         * threads.c, object-internals.h, verify.c: changed the culture caching
6437         code to use a normal MonoArray for storage so the GC can keep track of
6438         them easily. Fixed bits of the cache logic, too and simplified the
6439         code.
6440
6441 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
6442
6443         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
6444         thread for non-Boehm GCs.
6445
6446 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
6447
6448         * domain.c, object.c, domain-internals.h: reduce the amount of memory
6449         needed to keep track of the data for static fields.
6450
6451 2006-03-29  Raja R Harinath  <rharinath@novell.com>
6452
6453         Fix #75172
6454         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
6455         for interface classes.  Use 'num_methods' instead.
6456         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
6457         before using '->vtable_size' field.
6458
6459 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6460
6461         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
6462         doesn't contain managed pointers, so use a normal hashtable.
6463
6464 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6465
6466         * reflection.c, class-internals.h, domain.c: fixed handling of types
6467         used as values for objects in custom attributes (bug #77915):
6468
6469 2006-03-24  Martin Baulig  <martin@ximian.com>
6470
6471         * class.c (mono_class_setup_fields): Added support for generic
6472         instances; fixes #77580.
6473
6474 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6475
6476         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
6477
6478 2006-03-24  Dick Porter  <dick@ximian.com>
6479
6480         * file-io.c (get_file_attributes): More stat macro breakage.
6481         Fixes bug 77759.
6482
6483 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
6484
6485         * profiler.c: added the file=filename option in the default profiler
6486         to output the profile data to filename.
6487
6488 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6489
6490         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
6491         bug #77877.
6492
6493 2006-03-22  Martin Baulig  <martin@ximian.com>
6494
6495         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
6496         allocated `MonoClassField *' in `fb->handle'.
6497
6498 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6499
6500         * class.c, image.c, metadata-internals.h: implemented new mechanism to
6501         allocate interface ID to save memory and allow better ID reuse on
6502         appdomain unload. setup_generic_vtable () removal from Martin.
6503
6504 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6505
6506         * object.h, appdomain.c, domain.c, exception.c, icall.c,
6507         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
6508         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
6509         write barriers for reference stores with managed objects accessed with
6510         C structures in the runtime and in embedding programs.
6511
6512 2006-03-20  Raja R Harinath  <rharinath@novell.com>
6513
6514         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
6515         'interface_id' and 'max_interface_id' fields of MonoClasses
6516         representing open generic types.
6517
6518 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
6519
6520         * object.h, object.c, icall.c: added functions to deal with
6521         storing valuetypes that contain references in managed objects.
6522         * reflection.c, string-icalls.c, threads.c, marshal.c: small
6523         fixes and comments around uses of mono_array_addr ().
6524
6525 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
6526
6527         * object.h, icall.c, monitor.c: object.GetHashCode ()
6528         implementation that supports the moving garbage collector.
6529
6530 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6531
6532         * icall.c, threads-types.h, threads.c: implemented finalizer for
6533         LocalDataStoreSlot.
6534
6535 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
6536
6537         * metadata.c (mono_type_size): Add a fixme.
6538         (mono_type_stack_size): Ditto.
6539
6540         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
6541         'type_forwarders' field.
6542
6543         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
6544         attribute from net 2.0.
6545
6546         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
6547         from class.c.
6548
6549         * class.c (mono_class_setup_fields): Fix a warning.
6550         
6551         * class.c (mono_class_from_name): Add support for assemblyref entries
6552         in the EXPORTEDTYPE table.
6553
6554         * reflection.c: Add support for handling type forwarders under net 2.0.
6555
6556         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
6557         
6558 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
6559
6560         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
6561         overwriting entries in ModuleBuild->types, also clean up the code
6562         a little. Fixes #77774.
6563
6564 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6565
6566         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
6567         load friend assembly info when present.
6568
6569 2006-03-14  Raja R Harinath  <rharinath@novell.com>
6570
6571         Fix crasher on gtest-158.cs.
6572         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
6573         the return value if the MonoClass we want is yet in an
6574         inconsistent state.
6575         * class.c (mono_class_create_from_typedef): Add an comment
6576         explaining an order dependency between mono_class_setup_parent and
6577         mono_class_setup_mono_type.
6578
6579 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6580
6581         * class.c: documentation updates and events bug fix.
6582
6583 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
6584
6585         * class.c: some cleanup, locking fixes.
6586
6587 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6588
6589         * class.c: fix the generics code to setup nested
6590         type info to the instantiated type (bug #77770).
6591
6592 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6593
6594         * marshal.c: fixed a few type correctness issues.
6595
6596 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6597
6598         * loader.c: the Set/Get/Addrtess array methods should be public.
6599
6600 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6601
6602         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
6603         
6604         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
6605         info->wrapper.
6606
6607 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
6608
6609         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
6610
6611         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
6612
6613         * mempool.c (mono_mempool_alloc): Speed this up a bit.
6614         (mono_mempool_alloc0): Ditto.
6615
6616 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6617
6618         * socket-io.c:
6619         (create_object_from_sockaddr): it was allocating 4 extra bytes
6620         for the AF_UNIX data. Fixes bug #77747.
6621
6622 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
6623
6624         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
6625
6626 2006-03-09  Dick Porter  <dick@ximian.com>
6627
6628         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
6629         Fixes bug 76966 again.
6630
6631 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
6632
6633         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
6634         names from r57532
6635         * appdomain.c: Bumped corlib version to 48 (due to r57532)
6636
6637 2006-03-07  Martin Baulig  <martin@ximian.com>
6638
6639         * object.c
6640         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
6641
6642 2006-03-07  Martin Baulig  <martin@ximian.com>
6643
6644         * class.c
6645         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
6646         regression introduced in r56970; see gtest-252.cs.
6647
6648         * loader.c (mono_get_method_constrained): Correctly handle generic
6649         methods; see gtest-253.cs.
6650
6651 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
6652
6653         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
6654
6655 2006-03-04  Martin Baulig  <martin@ximian.com>
6656
6657         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
6658         compute the parent type at runtime, just like we're already doing
6659         it for interfaces.
6660
6661         * reflection.c
6662         (mono_reflection_bind_generic_parameters): Don't compute the
6663         parent type anymore.
6664
6665         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
6666
6667 2006-03-04  Martin Baulig  <martin@ximian.com>
6668
6669         * mono-debug-debugger.h
6670         (mono_debugger_create_notification_function): Allocate memory at
6671         runtime and return a pointer to it.
6672
6673 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
6674
6675         * assembly.c: Fix windows build.
6676         
6677         * assembly.c: Fix build.
6678
6679         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
6680
6681         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
6682         
6683 2006-03-03  Dick Porter  <dick@ximian.com>
6684
6685         * process.c
6686         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
6687         Check parameters before dereferencing them.  Fixes Aaron's part of
6688         bug 77393.
6689
6690 2006-03-03  Raja R Harinath  <rharinath@novell.com>
6691
6692         Fix performance regression.
6693         * loader.c (find_method_in_class): Add 'from_class' argument.
6694         Rename 'klass' argument to 'in_class'.  The signature is compared
6695         against the method in 'in_class', and the corresponding method is
6696         returned from 'from_class'.
6697         (find_method): Walk both 'in_class' and 'from_class' in parallel.
6698         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
6699         type definition and generic instantiation in parallel.
6700         (mono_get_method_constrained): Update to changes.
6701
6702 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6703
6704         * threads.c: make sure the domain is correct, too when doing
6705         mono_thread_attach ().
6706
6707 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
6708
6709         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
6710         windows. Fixes #77683.
6711
6712 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6713
6714         * object.h, *: introduced specific way to set elements of an array
6715         of references to be used as write barrier. Still need to audit the
6716         uses of mono_array_addr.
6717
6718 2006-03-01  Miguel de Icaza  <miguel@novell.com>
6719
6720         * object-internals.h: New field to cache the assmebly name, patch
6721         from Tambet Ingo (tambet@ximian.com)
6722
6723 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6724
6725         * decimal.h, class-internals.h, metadata-internals.h,
6726         file-io.h: mark a few function declarations as internal, to
6727         reduce the number of PLT entries.
6728
6729 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6730
6731         * file-io.c: fix typo in warning message.
6732
6733 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
6734
6735         * loader.c: on unix, lookup the "*A" version of a function
6736         if charset is auto as a second option before failing.
6737
6738 2006-02-28  Raja R Harinath  <rharinath@novell.com>
6739
6740         * class.h (mono_class_inflate_generic_method): Revert to two
6741         argument version.
6742         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
6743         (mono_class_inflate_generic_method_full): Add.
6744         * class.c (mono_class_inflate_generic_method_full): Rename from
6745         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
6746         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
6747         * loader.c, reflection.c: Update to changes.
6748
6749 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6750
6751         * icall.c: const fixes and small improvements.
6752
6753 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6754
6755         * threadpool.c: for asynchronous connect(), enable the same workaround
6756         for BSD 6 as for the Mac. Fixes bug #77637.
6757
6758 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
6759
6760         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
6761         formatted classes. Fixes #77524.
6762
6763 2006-02-24  Raja R Harinath  <rharinath@novell.com>
6764
6765         * class.c (inflate_generic_type): Add a couple more
6766         micro-optimizations.
6767         (inflate_generic_context): Don't use the 'gmethod' from
6768         'inflate_with'.
6769         (mono_class_inflate_generic_method): If the method has generic
6770         parameters, but the passed-in context doesn't have a 'gmethod',
6771         create one.  Use the possibly simplified generic instantiation
6772         from the declaring class instead of the one passed in.
6773
6774 2006-02-24  Raja R Harinath  <harinath@gmail.com>
6775
6776         Make generic method signature and method header handling lazy.
6777         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
6778         (inflate_generic_header): Likewise.
6779         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
6780         parameter to avoid inflating types.
6781         (mono_get_inflated_method): Empty out.
6782         * class.h (mono_class_inflate_generic_method): Update to changes.
6783         * loader.c (mono_get_method_from_token): Don't parse signature for
6784         generic methods, nor methods of generic classes.
6785         (mono_method_signature): Rename from 'mono_method_signature'.
6786         Inflate signature on demand.
6787         (mono_method_get_header): Inflate method header on demand.
6788         * reflection.c: Update to changes.
6789
6790 2006-02-23  Raja R Harinath  <rharinath@novell.com>
6791
6792         * metadata.c (mono_metadata_inflate_generic_inst): If the
6793         instantiation is closed, don't bother expanding it in the new
6794         context.
6795         * class.c (inflate_generic_class): If the generic instantiation
6796         doesn't change after inflation, return the argument itself.
6797         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
6798         Add bounds checks.
6799         (inflate_generic_context): If neither the generic class nor the
6800         generic method instantiations change, return the original context.
6801         * reflection.c (mono_method_get_object): Do
6802         'mono_get_inflated_method' before accessing the ->klass field.
6803         (inflate_mono_method): Don't create a MonoGenericMethod unless
6804         necessary.
6805         (inflate_method): Don't pass a constructed type as the declaring
6806         type of a methodbuilder.
6807
6808 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
6809
6810         * object.c: fix memory overwrite.
6811
6812 2006-02-22  Dick Porter  <dick@ximian.com>
6813
6814         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
6815         it doesn't work any more.
6816         (mono_threads_request_thread_dump): Fix unused variable warnings.
6817
6818 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6819
6820         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
6821         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
6822         the public header file.
6823
6824 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
6825
6826         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
6827
6828 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6829
6830         * class-internals.h, object.c: reduce the size of MonoVTable
6831         and store the interface_offsets array at negative offsets.
6832
6833 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6834
6835         * metadata.c: tweak table descriptors data structures to reduce
6836         size and runtime relocations.
6837
6838 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6839
6840         * marshal.c: fix some types and opcodes to be type-safe
6841         in marshaling wrappers.
6842
6843 2006-02-21  Ankit Jain  <jankit@novell.com>
6844
6845         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
6846
6847 2006-02-21  Raja R Harinath  <rharinath@novell.com>
6848
6849         * metadata.c (get_constraints): Relax debugging checks for monodis.
6850
6851 2006-02-21  Ankit Jain  <jankit@novell.com>
6852
6853         * metadata.c (mono_metadata_load_generic_params): Move the code
6854         checking for ambiguous generic params from here to mono/dis/get.c
6855         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
6856
6857 2006-02-21  Raja R Harinath  <harinath@gmail.com>
6858
6859         Fix assertion triggered when compiling nemerle.
6860         * class.c (mono_get_shared_generic_inst): Rename from
6861         get_shared_inst and make non-static.
6862         * loader.c (mono_get_shared_generic_method): New.  Used to create
6863         the MonoGenericContext-equivalent of a MonoGenericContainer.
6864         (mono_get_method_from_token): Initialize the 'context' field of
6865         the created MonoGenericContainer.
6866         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
6867         * metadata.c (get_constraints): Add sanity check.
6868         * class-internals.h: Add new internal methods.
6869
6870         * reflection.c (verify_safe_for_managed_space): New sanity check.
6871         Currently checks that owner-less generic parameters aren't allowed
6872         in managed space.
6873         (mono_type_get_object): Use it.
6874         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
6875         that are now in mono_type_get_object.
6876         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
6877
6878 2006-02-19  Raja R Harinath  <harinath@gmail.com>
6879
6880         * metadata.c (mono_type_create_from_typespec): Rename from
6881         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
6882         argument and caching of types in the generic container.
6883         (unwrap_arrays, find_generic_param): Remove.
6884         * metadata-internals.h: Update.
6885         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
6886
6887 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
6888
6889         * class.c (mono_class_get_exception_for_failure): Fix a warning.
6890
6891         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
6892         return values. Fixes #77581.
6893
6894         * class.c (mono_fnptr_class_get): Switch name and name_space.
6895
6896         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
6897         classes and add support for [In, Out] attributes.
6898         (mono_marshal_free_asany): Ditto. Fixes #77524.
6899
6900 2006-02-18  Raja R Harinath  <harinath@gmail.com>
6901
6902         * class.c (mono_class_from_generic_parameter): Make more robust to
6903         incomplete MonoGenericContainers from monodis.
6904
6905 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6906
6907         * class-internals.h: added some more exception types.
6908         * class.c, metadata.c: added a few checks to handle missing
6909         types.
6910
6911 2006-02-17  Raja R Harinath  <rharinath@novell.com>
6912
6913         Use owner-less generic-params some more.
6914         * class.c (my_mono_class_from_generic_parameter): Remove.
6915         (mono_class_from_generic_parameter): Handle null image,
6916         param->name and param->owner.
6917         (mono_class_from_mono_type): Update.
6918         (mono_class_create_from_typespec): Remove 'container' parameter.
6919         If that parameter is non-null, the result is always inflated by
6920         'mono_class_get_full' anyway.
6921         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
6922         parameter.
6923         (mono_class_get_full): Update.
6924
6925         * class.c (inflate_generic_type) [GENERICINST]: If the generic
6926         instance is not open, don't bother inflating.
6927         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
6928         parse metadata for inflated classes.
6929         (_mono_class_get): Change GenericContext* parameter to
6930         GenericContainer*.
6931         (mono_class_create_from_typespec): Likewise.  Simplify, and
6932         implement trivially.  All the cases are handled in
6933         mono_class_from_mono_type.  Don't inflate returned class.
6934         (mono_class_get_full): Delegate GENERICINST optimization to
6935         inflate_generic_type.
6936         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
6937
6938 2006-02-16  Dick Porter  <dick@ximian.com>
6939
6940         * socket-io.c (create_object_from_sockaddr): Fix typo.
6941         (create_sockaddr_from_object): Check array lengths before
6942         potentially accessing items off the end.
6943         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
6944         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
6945         (ves_icall_System_Net_Sockets_Socket_Send_internal)
6946         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
6947         length checks to avoid wraparound overflows.
6948         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
6949         contents of the array of sockets
6950         (hostent_to_IPHostEntry2)
6951         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
6952         Check return value of inet_ntop ().
6953         (addrinfo_to_IPHostEntry): Fix typo
6954
6955 2006-02-16  Raja R Harinath  <rharinath@novell.com>
6956
6957         Type metadata parsing doesn't use generic-instantiation information.
6958         * metadata.c (mono_metadata_parse_array_full): Change
6959         MonoGenericContext* parameter to MonoGenericContainer*.
6960         (mono_metadata_parse_type_full): Likewise.
6961         (mono_type_create_from_typespec_full): Likewise.
6962         (mono_metadata_parse_mh_full): Likewise.
6963         (mono_metadata_parse_generic_inst): Likewise.
6964         (do_mono_metadata_parse_generic_class): Likewise.
6965         (do_mono_metadata_parse_type): Likewise.
6966         * metadata-internals.h: Update to changes.
6967         * class.c (mono_class_find_enum_basetype): Likewise.
6968         (mono_class_setup_fields): Likewise.
6969         (mono_class_create_from_typespec): Likewise.
6970         * loader.c (method_from_methodspec): Likewise.
6971         (mono_get_method_from_token): Likewise.
6972         (mono_method_get_header): Likewise.
6973
6974 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6975
6976         * marshal.c: handle additional GENERICINST case (patch from
6977         Thong Nguyen <tum@veridicus.com>).
6978         Fix a few cases where LDIND_I/STIND_I was used for references.
6979
6980 2006-02-16  Raja R Harinath  <rharinath@novell.com>
6981
6982         * reflection.c (mono_reflection_get_token): Remove unused variable.
6983
6984 2006-02-16  Martin Baulig  <martin@ximian.com>
6985
6986         * reflection.c (mono_reflection_get_token): Add support for fields
6987         in instantiated generic types.
6988
6989         * icall.c
6990         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
6991
6992 2006-02-15  Martin Baulig  <martin@ximian.com>
6993
6994         * icall.c
6995         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
6996         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
6997         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
6998         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
6999
7000 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
7001
7002         * class.c, metadata.c, metadata.h, object.c, icall.c,
7003         marshal.c: changed mono_type_get_underlying_type () to do
7004         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
7005         Fixed handling of instantiated generic valuetypes (bug #75479).
7006
7007 2006-02-15  Raja R Harinath  <rharinath@novell.com>
7008
7009         * metadata.c (mono_metadata_decode_signed_value): Simplify.
7010         Delegate to mono_metadata_decode_value, and work on the returned value.
7011
7012         * icall.c (ves_icall_MonoType_GetGenericArguments):
7013         Add consistency check here too.
7014         
7015 2006-02-15  Ankit Jain  <jankit@novell.com>
7016
7017         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
7018         char/short etc.
7019
7020 2006-02-15  Ankit Jain  <jankit@novell.com>
7021
7022         * metadata.c (mono_metadata_decode_signed_value): New function to decode
7023         signed values, used only for representing lower bounds of arrays.
7024         (mono_metadata_parse_array_full): Use new
7025         mono_metadata_decode_signed_value to decode lower bounds.
7026
7027 2006-02-14  Martin Baulig  <martin@ximian.com>
7028
7029         * reflection.c
7030         (mono_reflection_get_token): Support "MonoGenericMethod" and
7031         "MonoGenericCMethod" and allow generic instances / methods.
7032
7033 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
7034
7035         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
7036         to obtain the terminal size using an ioctl.
7037
7038         * object.c (mono_nullable_init): Revert this as nullable reference
7039         types are not valid.
7040         (mono_nullable_box): Ditto.
7041
7042 2006-02-09  Dick Porter  <dick@ximian.com>
7043
7044         * threads.c (mono_thread_detach): Drop a reference to the thread
7045         we're detaching.
7046
7047 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
7048
7049         * object.c (mono_nullable_init): Handle nullable reference types.
7050         (mono_nullable_box): Ditto. Fixes #77446.
7051
7052 2006-02-07  Martin Baulig  <martin@ximian.com>
7053
7054         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
7055
7056 2006-02-07  Ankit Jain  <jankit@novell.com>
7057
7058         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
7059         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
7060         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
7061         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
7062         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
7063         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
7064
7065 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
7066
7067         * class.c (mono_class_create_generic): Set type_token as well.
7068
7069         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
7070         compatible with MS.
7071
7072 2006-02-02  Martin Baulig  <martin@ximian.com>
7073
7074         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
7075         has never been used so far.
7076
7077 2006-02-02  Martin Baulig  <martin@ximian.com>
7078
7079         * mono-debug-debugger.h: Changed comment at the top of this file;
7080         the header is not installed, but it's safe to #include it from
7081         within the JIT.
7082
7083         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
7084         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
7085
7086 2006-02-02  Martin Baulig  <martin@ximian.com>
7087
7088         * mono-debug.h
7089         (MonoSymbolTable): Removed the `metadata_info' field.
7090
7091         * mono-debug.c
7092         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
7093
7094         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
7095         (mono_debugger_add_builtin_types): Removed.
7096         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
7097         (mono_debugger_create_notification_function): We now operate on a
7098         pre-allocated area; take a `gpointer' and return `void'.
7099
7100         * mono-debug-debugger.c
7101         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
7102         (mono_debugger_add_builtin_types): Removed.
7103
7104 2006-02-02  Martin Baulig  <martin@ximian.com>
7105
7106         * threads.c (mono_debugger_create_all_threads): New public method.
7107
7108 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
7109
7110         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
7111         breaks on several platforms.
7112
7113 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
7114
7115         * assembly.c: the VS.NET build doesn't supply default values for
7116         MONO_ASSEMBLIES and MONO_CFG_DIR.
7117
7118 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
7119
7120         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
7121         helper function.
7122
7123         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
7124
7125         * loader.c (method_from_memberref): Fix a warning.
7126
7127         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
7128
7129         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
7130         with explicit layout. Fixes #77433.
7131
7132 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
7133
7134         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
7135         max_interface_id is initialized before using it. Fixes #77398.
7136         (ves_icall_Type_GetInterfaces): Ditto.
7137
7138 2006-01-30  Raja R Harinath  <rharinath@novell.com>
7139
7140         * metadata.c (mono_metadata_parse_method_signature_full): Don't
7141         allocate memory for parameter attributes when parsing memberref
7142         signatures.
7143         * loader.c (mono_loader_set_error_method_load): Don't warn.
7144         (method_from_memberref): Ensure MissingMethodException gets thrown
7145         if method is not found.  Make warning more informative.
7146
7147 2006-01-29  Raja R Harinath  <harinath@gmail.com>
7148
7149         Fix #77397
7150         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
7151         return true if is byref.
7152         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
7153         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
7154         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7155
7156 2006-01-27  Raja R Harinath  <rharinath@novell.com>
7157
7158         Fix tests/find-method.2.il
7159         * loader.c (find_method, find_method_in_class): Remove is_inflated
7160         argument.  Revert 2006-01-18 change.
7161         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
7162         is generic, search for method in its generic definition.
7163         * class.c (mono_class_setup_vtable_general): Print generic
7164         arguments of generic types in debugging printf.
7165
7166 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
7167
7168         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
7169
7170         * threads.c (mono_threads_request_thread_dump): New helper function.
7171
7172 2006-01-25  Raja R Harinath  <rharinath@novell.com>
7173
7174         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
7175
7176 2006-01-25  Ankit Jain  <jankit@novell.com>
7177
7178         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
7179         move definition to ..
7180         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
7181         
7182 2006-01-25  Ankit Jain  <jankit@novell.com>
7183             Raja R Harinath  <rharinath@novell.com>
7184
7185         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
7186         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
7187         as necessary.
7188
7189 2006-01-25  Martin Baulig  <martin@ximian.com>
7190
7191         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
7192         `MonoDebuggerThread' into debug-debugger.c.
7193
7194 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7195
7196         * profiler.c: fix printing of data.
7197
7198 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
7199
7200         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
7201           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
7202
7203 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7204
7205         * object.c: fix deadlock related to string interning.
7206
7207 2006-01-23  Martin Baulig  <martin@ximian.com>
7208
7209         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
7210
7211         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
7212
7213 2006-01-23  Martin Baulig  <martin@ximian.com>
7214
7215         * mono-debug.h: Moved the prototypes of some functions which are
7216         used by the JIT here from mono-debug-debugger.h.
7217
7218 2006-01-21  Martin Baulig  <martin@ximian.com>
7219
7220         * Makefile.am: Don't install mono-debug-debugger.h.
7221
7222 2006-01-21  Martin Baulig  <martin@ximian.com>
7223
7224         * mono-debug-debugger.h: Enforce the private status of this header
7225         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
7226         Moved some stuff from mono-debugger-jit-wrapper.h here.
7227
7228 2006-01-20  Raja R Harinath  <rharinath@novell.com>
7229
7230         * class.c (mono_class_from_typeref): Add a sanity test to help
7231         catch lack of assembly load/search hooks.
7232
7233 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
7234
7235         * marshal.c (emit_struct_conv): Relax the fields with same offset
7236         check even more. Fixes #77230.
7237
7238 2006-01-18  Martin Baulig  <martin@ximian.com>
7239
7240         * loader.c (find_method_in_class): Added `gboolean is_inflated'
7241         argument; if false, we compare the uninstantiated signatures.
7242         (method_from_memberref): Compare the uninstantiated signatures;
7243         fixes #76417.
7244
7245 2006-01-18  Robert Jordan  <robertj@gmx.net>
7246
7247         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
7248         Clear the weak link. Fixes bug #77170.
7249
7250         * gc.c (mono_gchandle_free):
7251         Reflect *-gc.c changes (tiny optimization).
7252
7253 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
7254
7255         * metadata.c (mono_metadata_signature_dup): Applied patch from
7256         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
7257         Fixes #77288.
7258
7259 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
7260
7261         * marshal.c (emit_struct_conv): Allow fields with the same offset when
7262         marshalling from native to managed code. Fixes #77230.
7263
7264 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7265
7266         * threadpool.c: fix problem (Mac only) when more than one asynchronous
7267         connect. Fixes bug #77020.
7268
7269 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7270
7271         * class.c: fixed id assignement for nested interfaces (bug #77275).
7272         Added also better info for --print-vtable debugging.
7273
7274 2006-01-12  Martin Baulig  <martin@ximian.com>
7275
7276         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
7277         interfaces on-the-fly; fixes #76625.
7278
7279         * class-internals.h
7280         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
7281         don't need that anymore.
7282
7283 2006-01-12  Miguel de Icaza  <miguel@novell.com>
7284
7285         * socket-io.c
7286         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
7287         To avoid initing the nested_classes when not needed I turned the
7288         PeerCredData as a toplevel internal class, as it has to be shared
7289         anyways. 
7290
7291         Fixes the CASA issue.
7292
7293 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
7294
7295         * domain.c: Accessors for MonoJitInfo
7296
7297         * profiler-private.h: Add jitinfo to the end jit hook
7298
7299         * profiler.[ch]: Define new hooks, called after jitting which give
7300         the MonoJitInfo that was compiled
7301
7302 2006-01-10  Martin Baulig  <martin@ximian.com>
7303
7304         * class.c (mono_class_setup_events): Add support for generic
7305         classes; fixes #76440.
7306
7307 2006-01-06  Raja R Harinath  <rharinath@novell.com>
7308
7309         Fix #77160.
7310         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
7311         on passed-in method.
7312
7313 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7314
7315         * object.c (mono_runtime_invoke_array): Add Nullable support.
7316
7317         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
7318
7319 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
7320
7321         * file-io.c: Don't consider sockets as directory and avoid an endless
7322         loop. Fix bug #76966.
7323
7324 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7325
7326         * object.c (mono_nullable_init): New helper function.
7327         (mono_nullable_box): Ditto.
7328
7329         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
7330
7331         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
7332
7333         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
7334         
7335 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
7336
7337         * class.c (mono_class_is_assignable_from): Make T assignable to 
7338         Nullable<T>.
7339
7340 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
7341
7342         * appdomain.c: Bump corlib version to 46.
7343         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
7344         serialization purpose) and changed ves_icall_System_Reflection_
7345         Assembly_get_code_base signature to accept a boolean (to escape, or 
7346         not, the assembly code base).
7347
7348 2005-12-23  Dick Porter  <dick@ximian.com>
7349
7350         * icall.c: 
7351         * threads-types.h: 
7352         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
7353         CreateEvent icall now returns "created" boolean parameter.
7354
7355 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
7356
7357         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
7358         #76967.
7359
7360         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
7361         when attr_klass is an interface. Fixes #77045.
7362
7363 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
7364
7365         * marshal.c (emit_struct_conv): Fix previous patch.
7366         
7367         * marshal.c (emit_struct_conv): Add a check for fields with the same
7368         offset.
7369
7370 2005-12-20  Raja R Harinath  <rharinath@novell.com>
7371
7372         Fix regression in Mono.C5.
7373         * class.c (mono_class_create_generic): If 'klass' is an interface
7374         set up the interface offsets.
7375         (mono_class_is_assignable_from): Don't throw away generic arguments.
7376
7377 2005-12-19  Raja R Harinath  <rharinath@novell.com>
7378
7379         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
7380         type parameters.
7381
7382 2005-12-15  Raja R Harinath  <rharinath@novell.com>
7383
7384         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
7385         dead store.
7386         (do_mono_metadata_parse_generic_class): Don't pass the current
7387         generic context when parsing the type being instantiated: it
7388         cannot use it, anyway.
7389
7390         * loader.c (method_from_memberref): Don't inflate a signature if
7391         it doesn't contain any type parameters.
7392
7393 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
7394
7395         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
7396
7397 2005-12-14  Martin Baulig  <martin@ximian.com>
7398
7399         * class.c
7400         (mono_type_get_name_recurse): Don't return null for type
7401         parameters and open generic classes.
7402         (mono_class_setup_methods): Don't exclude generic instances.
7403         (mono_get_unique_iid): Use different IDs for different
7404         instantiations of the same generic type.
7405         (mono_class_setup_vtable): Only use setup_generic_vtable() for
7406         open generic instances; create a normal vtable for closed generic
7407         instances.
7408         (mono_class_setup_vtable_general): We're now also called for
7409         closed generic instances.
7410
7411         * reflection.c
7412         (mono_reflection_bind_generic_parameters): Correctly use
7413         mono_metadata_lookup_generic_inst() everywhere.
7414
7415 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
7416
7417         * object.c (mono_class_create_runtime_vtable): Call 
7418         mono_class_setup_vtable ().
7419
7420         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
7421         function.
7422         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
7423         #76959.
7424
7425         * loader.c (mono_loader_set_error_type_load): Print the type load
7426         warnings to the console so they are more visible to the user.
7427         (mono_loader_set_error_method_load): Ditto.
7428
7429         * reflection.c (ensure_runtime_vtable): Revert the last change as it
7430         is still broken.
7431         
7432         * reflection.c (ensure_runtime_vtable): Fix build.
7433
7434         * reflection.c (ensure_runtime_vtable): Disable an optimization which
7435         doesn't work in all cases.
7436
7437 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
7438
7439         * object.c (mono_array_new_full): Treat a single dimensional array
7440         with 0 lower bounds as an szarray. Fixes #76973.
7441
7442         * reflection.c (custom_attr_visible): Really fix this.
7443
7444 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
7445
7446         * reflection.c (custom_attr_visible): Allow nested public attributes
7447         as well.
7448
7449         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
7450         interface check.
7451
7452 2005-12-12  Raja R Harinath  <harinath@gmail.com>
7453
7454         * class.c (set_generic_param_owner): Delete.
7455         (mono_class_create_from_typedef): Don't set ->owner field of
7456         generic parameters to "param containers" of enclosing classes.
7457         * reflection.c (mono_reflection_initialize_generic_parameter):
7458         Likewise.
7459
7460 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
7461
7462         * reflection.c (custom_attr_visible): Fix build.
7463
7464 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
7465
7466         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
7467         private attributes.
7468         
7469         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
7470         handling of null parameter defaults.
7471
7472 2005-12-09  Raja R Harinath  <rharinath@novell.com>
7473
7474         * class.c (mono_class_from_generic_parameter): Don't set
7475         klass->generic_container.
7476         (my_mono_class_from_generic_parameter): Likewise.
7477
7478 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
7479
7480         * reflection.c (load_public_key): Fix a warning.
7481         (method_encode_code): Fix unaligned accesses.
7482
7483 2005-12-07  Martin Baulig  <martin@ximian.com>
7484
7485         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
7486
7487         * reflection.c
7488         (write_generic_param_entry): Encode our custom attrs.
7489
7490         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
7491
7492 2005-12-07  Martin Baulig  <martin@ximian.com>
7493
7494         * reflection.c (encode_new_constraint): Removed; we don't use the
7495         `NewConstraintAttribute' anymore.
7496
7497 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
7498
7499         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
7500         not fire a TypeResolve event when Assembly.GetType () is called.
7501
7502 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
7503
7504         Beginning of support for nullable types in the runtime. Parts of
7505         this patch are from Martin.
7506
7507         * appdomain.c (MONO_CORLIB_VERSION): Bump
7508
7509         * domain.c (mono_init_internal): get the nullable type
7510
7511         * class.c (mono_class_is_nullable): New method
7512         (mono_class_get_nullable_param): New mehod
7513         (mono_class_create_generic): In types T? set cast_class to T
7514
7515         * class-internals.h (MonoDefaults): new nullable default class
7516         (mono_class_get_nullable_param, mono_class_get_nullable_param):
7517         new methods.
7518
7519 2005-12-05  Raja R Harinath  <rharinath@novell.com>
7520
7521         * metadata.c (select_container): New.  Refactor code to select the
7522         appropriate GenericContainer given the type of generic parameter
7523         we are looking for.
7524         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
7525         not a MonoGenericContext.  Use select_container.  Update parameters.
7526         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
7527         and MONO_TYPE_MVAR.
7528         (unwrap_arrays): Remove duplicate tests.
7529         (find_generic_param): Rename from 'has_same_context'.  Now walks a
7530         generic instantiated class to find any arguments that are generic
7531         parameters.
7532         (mono_type_create_from_typespec_full): Use find_generic_param to
7533         avoid evicting some generic instantiations from the typespec
7534         cache.
7535
7536 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
7537
7538         * reflection.c: fixed writing of doubles on ARM FPA.
7539
7540 2005-12-02  Robert Jordan  <robertj@gmx.net>
7541
7542         * icall.c: Fixed EventInfo.ReflectedType (#76829).
7543
7544 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7545
7546         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
7547         least on SUSE 10 they are not the same (on debian, they are just the
7548         same thing).
7549
7550 2005-12-01  Raja R Harinath  <rharinath@novell.com>
7551
7552         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
7553         DeclaringType for VARs and MVARs.
7554         * class.c (set_generic_param_owner): Fix initialization of owner
7555         fields.
7556
7557 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7558
7559         * icall.c: fixed Enum.ToObject() to correctly convert the values.
7560
7561 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7562
7563         * threadpool.c: workaround for a bug that shows up on the Mac:
7564         select()+connect() on a blocking socket is not like it should
7565         be, so we proceed to connect() in that case, wasting the I/O
7566         threadpool thread until connect succeedes. Fixes bug #75436.
7567
7568 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7569
7570         * threadpool.c: fix typo when setting file descriptor states.
7571
7572 2005-11-28  Raja R Harinath  <rharinath@novell.com>
7573
7574         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
7575         * metadata.c (mono_metadata_parse_method_signature_full): Don't
7576         create a temporary signature container.
7577         (mono_metadata_parse_generic_param): Update to changes.
7578         (mono_type_create_from_typespec_full): Update to changes.
7579         * loader.c (method_from_memberref): Don't use a
7580         MonoGenericContainer while parsing a memberref signature.
7581         (method_from_methodspec): Remove dead-store of the 'container'
7582         variable.  It's overwritten before use.
7583
7584         * metadata.c (mono_type_create_from_typespec_full): Make debugging
7585         checks tighter.
7586         (mono_metadata_parse_generic_param): Likewise.
7587         * loader.c (find_method_in_class): Does not need a
7588         MonoGenericContainer.  Use 'mono_method_signature' rather than
7589         'mono_method_signature_full'.
7590         (find_method, mono_get_method_constrained, method_from_memberref):
7591         Update to changes.
7592
7593         * metadata.c (mono_type_create_from_typespec_full): Ensure that
7594         owner-less generic-parameters are never evicted from the typespec
7595         cache.
7596
7597         * loader.c (method_from_memberref): Don't use the current context
7598         when parsing signatures.
7599         (method_from_methodspec, mono_get_method_from_token): Update to changes.
7600
7601         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
7602         side-effects in g_assert.
7603         * loader.c (mono_get_method_from_token): Resolve klass earlier so
7604         that we don't potentially lose information.
7605
7606 2005-11-26  Dick Porter  <dick@ximian.com>
7607
7608         * icall.c:
7609         * threads.c: icalls to implement basic (ie, not named)
7610         System.Threading.Semaphore.
7611
7612 2005-11-24  Dick Porter  <dick@ximian.com>
7613
7614         * process.c
7615         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
7616         Use GetProcessId() if it's available.
7617
7618 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
7619
7620         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
7621
7622 2005-11-23  Raja R Harinath  <rharinath@novell.com>
7623             Ankit Jain  <jankit@novell.com>
7624
7625         * loader.c (mono_get_method_from_token): Initialize 'method' field
7626         of all generic parameters before parsing the signature.  Remove
7627         code that "fixed"-up MVAR references.
7628
7629 2005-11-23  Ankit Jain  <jankit@novell.com>
7630
7631         * metadata.c (mono_metadata_has_generic_params):
7632         (mono_metadata_load_generic_param_constraints):
7633         (mono_metadata_load_generic_params): Move duplicate code ...
7634         (mono_metadata_get_generic_param_row): ... here. Returns the
7635         first row-id in GenericParam table for a given owner (token).
7636         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
7637         prototype.
7638
7639 2005-11-23  Raja R Harinath  <rharinath@novell.com>
7640             Ankit Jain  <jankit@novell.com>
7641
7642         * metadata.c (mono_metadata_class_equal): Pass signature_only when
7643         comparing VARs too.
7644         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
7645         type->data.generic_param only if the type is an MVAR.
7646         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
7647         leak owner-less VARs and MVARs into managed space.
7648
7649 2005-11-21  Martin Baulig  <martin@ximian.com>
7650
7651         * class-internals.h
7652         (MonoMethod): Moved the `generic_container' here from
7653         `MonoMethodNormal' since we now also need it for
7654         `MonoMethodPInvoke';
7655         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
7656         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
7657         an union containing both `MonoMethodNormal' and
7658         `MonoMethodPInvoke'.
7659
7660         * loader.c
7661         (mono_get_method_from_token): Allow implementing generic methods
7662         as interncalls.
7663
7664         * threads.c
7665         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
7666         icall.
7667
7668 2005-11-17  Dick Porter  <dick@ximian.com>
7669
7670         * icall.c: 
7671         * process.h: 
7672         * process.c: Split the Process Start_internal icall into
7673         ShellExecuteEx_internal and CreateProcess_internal, which are
7674         called depending on whether UseShellExecute is true.  Fixes bug
7675         76670.
7676
7677         * appdomain.c (MONO_CORLIB_VERSION): Incremented
7678
7679 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
7680
7681         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
7682         'msize' parameters, use the information in 'mspec' instead.
7683         (emit_object_to_ptr_conv): Ditto.
7684
7685         * marshal.c (emit_struct_conv): Handle explicit layout structs with
7686         fields out of order. Fixes #76733.
7687
7688 2005-11-17  Ankit Jain  <jankit@novell.com>
7689
7690         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
7691
7692 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
7693
7694         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
7695           bug #76575.
7696
7697 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
7698
7699         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
7700         for types with non-auto layout. Fixes #76717.
7701
7702 2005-11-16  Ankit Jain  <jankit@novell.com>
7703
7704         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
7705         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
7706         if generic_context is null.
7707           (mono_metadata_generic_param_equal): param->owner can be null.
7708           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
7709         null.
7710
7711 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
7712
7713         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
7714         the correct value.
7715
7716 2005-11-15  Martin Baulig  <martin@ximian.com>
7717
7718         * object.c (set_value): Use mono_class_from_mono_type() instead of
7719         the hack for generic instances; fixes #76136.
7720
7721 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
7722
7723         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
7724         fields.
7725
7726         * image.c (load_metadata_ptrs): Initialize the new fields.
7727
7728         * reflection.c (create_dynamic_mono_image): Ditto.
7729
7730         * reflection.c (build_compressed_metadata): Use the new fields.
7731
7732         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
7733         icall.
7734
7735         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
7736         icall.
7737         
7738 2005-11-15  Ankit Jain  <jankit@novell.com>
7739             Raja R Harinath  <harinath@gmail.com>
7740
7741         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
7742         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
7743         new per-generic_container cache if the cached MonoType's context matches
7744         the current context.
7745           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
7746         to the expected context.
7747           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
7748
7749 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7750
7751         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
7752         we changed the signature of an icall.
7753         * icall.c: Modify to mono_double_ParseImpl return true/false 
7754         depending on the success, instead of throwing the exception. This will
7755         help us in Double.TryParse methods.
7756         
7757 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
7758
7759         * marshal.c (emit_marshal_object): Throw an exception when
7760         marshalling 'object' instead of crashing. Fixes #76696.
7761
7762 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7763
7764         * class-internals.h: Add prototype for mono_type_get_full_name ().
7765
7766 2005-11-11  Dick Porter  <dick@ximian.com>
7767
7768         * threads.c (mono_thread_manage): Make sure the main thread has
7769         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
7770
7771 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7772
7773         * loader.c (mono_loader_set_error_type_load): Log a warning to the
7774         console about the missing type.
7775         (mono_loader_set_error_method_load): Ditto.
7776
7777 2005-11-09  Miguel de Icaza  <miguel@novell.com>
7778
7779         * mono-config.c (mono_get_config_dir): Set the system defaults if
7780         none is specified.
7781
7782         * assembly.c (mono_set_dirs): New API entry point to set the
7783         assembly and the config directory in one call
7784
7785 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
7786
7787         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
7788         the ftnptr was created from a delegate in a domain other than the
7789         current domain. Fixes #75377.
7790
7791         * exception.h exception.c: Add mono_get_exception_not_supported ().
7792
7793 2005-11-08  Martin Baulig  <martin@ximian.com>
7794
7795         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
7796
7797 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
7798
7799         * security-manager.h: Added definitions to deal with strongname key 
7800         pairs bigger (and smaller) than 1024 bits.
7801         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
7802         adjust wrt the public key length being used.
7803
7804 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
7805
7806         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
7807           Windows build (r51396-51397).
7808
7809 2005-11-03  Martin Baulig  <martin@ximian.com>
7810
7811         * class.c (mono_class_setup_vtable_general): Also add generic
7812         methods to the vtable; fixes #76581.
7813
7814 2005-11-01  Miguel de Icaza  <miguel@novell.com>
7815
7816         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
7817         sure that we lookup GetString method from the System.Text.Encoding
7818         class, not the derived class or we get an empty method.
7819
7820         Fixed class #76612.
7821
7822 2005-10-25  Miguel de Icaza  <miguel@novell.com>
7823
7824         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
7825         if it has been previously set (embedders). 
7826
7827         Make mono_set_rootdir available also on Unix.
7828
7829 005-10-24  Robert Jordan  <robertj@gmx.net>
7830
7831         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
7832
7833 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7834
7835         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
7836         only calls which are made to native code use this flag.
7837
7838         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
7839
7840 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
7841
7842         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7843         Add support for FieldBuilders.
7844
7845 2005-10-29  Martin Baulig  <martin@ximian.com>
7846
7847         * mono-debug.c
7848         (mono_debug_using_mono_debugger): New public method; returns
7849         whether we're running inside the debugger.
7850
7851 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
7852
7853         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
7854         for Method/Constructor/FieldBuilders.
7855
7856 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
7857
7858         * reflection.c (module_add_cattrs): Save custom attributes for global methods
7859         and fields as well.
7860
7861 2005-10-26  Martin Baulig  <martin@ximian.com>
7862
7863         * mono-debug-debugger.c
7864         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
7865
7866 2005-10-24  Raja R Harinath  <harinath@gmail.com>
7867
7868         * icall.c (base64_to_byte_array): Don't pass an out-of-range
7869         integer to isspace.
7870
7871 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
7872
7873         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
7874         when passing valuetypes byref. Fixes #76502.
7875
7876 2005-10-19  Jackson Harper  <jackson@ximian.com>
7877
7878         * profiler.c: Don't put a . in front of types that are not in a
7879         namespace.
7880
7881 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
7882
7883         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
7884
7885 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
7886
7887         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
7888         #76436.
7889         (mono_marshal_get_ldflda_wrapper): Fix a warning.
7890
7891 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7892
7893         * assembly.c metadata-internals.h icall.c: Define an additional
7894         parameter for mono_assembly_name_parse_full, so we can avoid creating
7895         S.R.AssemblyName.Version when no version info wasn't passed.
7896         
7897 2005-10-09  Miguel de Icaza  <miguel@novell.com>
7898
7899         * class.c (mono_type_get_full_name): Reimplement method that was
7900         removed. 
7901
7902         * image.c: Some docs
7903
7904 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
7905
7906         * profiler.c (output_newobj_profile): Fix printing of Total memory
7907         on x86.
7908
7909 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7910
7911         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
7912
7913 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
7914
7915         * threads.c: remove debug output.
7916
7917 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7918
7919         * threads.c (mono_thread_manage): Fix crashes if more than 64
7920         threads need to be aborted. Hopefully fixes #75899.
7921
7922         * assembly.c (mono_stringify_assembly_name): New helper function.
7923
7924         * class.c: Use mono_stringify_assembly_name instead of the similar
7925         static function.
7926
7927         * assembly.h assembly.c: Add support for calling a postload search 
7928         hook if an assembly cannot be loaded.
7929
7930         * appdomain.c: Register new search hooks which call the AssemblyResolve
7931         events in AppDomain. Fixes #75231
7932
7933 2005-10-07  Martin Baulig  <martin@ximian.com>
7934
7935         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
7936         methods without debug info.
7937
7938 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
7939
7940         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
7941         wrappers.
7942
7943 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7944
7945         * file-io.c: now that we return symlinks, use lstat and, when the file
7946         is a symbolic link, stat, to get the file attributes. Also avoid the
7947         conversion to/from utf16/external.
7948
7949 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
7950
7951         * class.c (mono_class_layout_fields): Compute klass->has_references
7952         correctly if an embedded valuetype is not yet initialized. Fixes
7953         #76331.
7954
7955 2005-10-04  Martin Baulig  <martin@ximian.com>
7956
7957         * metadata.c
7958         (mono_metadata_load_generic_param_constraints): New public
7959         function; splitted the constraints loading out from
7960         mono_metadata_load_generic_params().
7961
7962         * class.c (mono_class_create_from_typedef): Call
7963         mono_metadata_load_generic_param_constraints() after setting up
7964         the type and creating our parent; fixes #75329.
7965
7966 2005-10-04  Martin Baulig  <martin@ximian.com>
7967
7968         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
7969         non-dynamic parent classes.
7970
7971 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
7972
7973         * file-io.c : win32 build fix (ETXTBSY seems not found).
7974
7975 2005-10-04  Martin Baulig  <martin@ximian.com>
7976
7977         * reflection.c
7978         (mono_image_get_methodspec_token): Make the cache actually work;
7979         fixes #75974.
7980
7981 2005-10-04  Martin Baulig  <martin@ximian.com>
7982
7983         * class.c (mono_class_name_from_token): Removed the unneccessary
7984         `MonoGenericContext *' argument.
7985
7986 2005-10-04  Martin Baulig  <martin@ximian.com>
7987
7988         * loader.c
7989         (method_from_methodspec): Make the caching work again; fixes the
7990         performance regression from #76262.
7991
7992 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7993
7994         * file-io.c:
7995         * file-io.h:
7996         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
7997         GetFileSystemEntries that performs the same work but without going
7998         into io-layer, locking, etc.
7999
8000 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
8001
8002         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
8003         ThreadState_Stopped as well. Fixes #76047.
8004
8005 2005-09-29  Martin Baulig  <martin@ximian.com>
8006
8007         * class.c
8008         (inflate_generic_context): If the new context has a `gmethod', set
8009         its `container' that that gmethod's `container'.
8010
8011         * metadata.c
8012         (mono_metadata_parse_generic_param): Simplify things;
8013         `generic_container = generic_context->container;' is just fine.
8014
8015         * loader.c (method_from_methodspec): Code cleanups.
8016
8017 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
8018
8019         * decimal.c: fix warning (and let gcc generate correct
8020         code on ARM with optimizations).
8021
8022 2005-09-28  Martin Baulig  <martin@ximian.com>
8023
8024         * loader.c
8025         (method_from_memberref): Added `MonoGenericContext *class_context'
8026         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
8027         (method_from_methodspec): If we're a memberref, use the enclosing
8028         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
8029
8030 2005-09-28  Martin Baulig  <martin@ximian.com>
8031
8032         * object.c (mono_runtime_invoke_array): Added support for
8033         MONO_TYPE_GENERICINST; fixes #75917.
8034
8035 2005-09-27  Martin Baulig  <martin@ximian.com>
8036
8037         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
8038         `k->byval_arg.type' to determine the actual type.
8039
8040         * loader.c (method_from_methodspec): Removed some hacks.
8041
8042 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
8043
8044         * class-internals.h (mono_field_is_deleted): Do the test for
8045         rtspecialname before we check the actual name of the field. This
8046         prevents us from dereferencing a pointer into the string table,
8047         saving us from accessing a few pages
8048
8049         * *.c: Replace the use of {Enter,Leave}CriticalSection with
8050         macros. This will allow a deadlock debugger to easily be plugged
8051         in.
8052
8053 2005-09-27  Martin Baulig  <martin@ximian.com>
8054
8055         * loader.c (method_from_methodspec): Create a "signature"
8056         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
8057
8058 2005-09-27  Martin Baulig  <martin@ximian.com>
8059
8060         * class.c
8061         (inflate_generic_class): Correctly set the new context's
8062         container.
8063
8064         * loader.c
8065         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
8066         instead of a `MonoGenericContext *'.
8067         (mono_method_signature_full): Take a `MonoGenericContainer *'
8068         instead of a `MonoGenericContext *'.
8069
8070         * metadata.c
8071         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
8072         instead of a `MonoGenericContext *'.
8073         (mono_metadata_parse_method_signature_full): Likewise.
8074
8075 2005-09-26  Martin Baulig  <martin@ximian.com>
8076
8077         * class.c
8078         (mono_class_from_generic_parameter): Set `klass->generic_container'
8079         (mono_class_from_generic_parameter): Likewise.
8080         (mono_bounded_array_class_get): We inherit the generic container
8081         from the element class.
8082
8083         * loader.c
8084         (find_method, find_method_in_class): Take a `MonoGenericContext *'
8085         argument rather than computing it here.
8086         (method_from_memberref): Correctly set the generic context before
8087         parsing the signature.  Fixes #75681.
8088
8089 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
8090
8091         * object.c (mono_class_has_special_static_fields): Fix warnings.
8092
8093 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8094
8095         * assembly.c: Add parse_public_key function, to
8096         par the public keys. Also added mono_assembly_name_parse_full,
8097         to define it the parsed key should be freed or not.
8098         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
8099         to parse a long format assembly name.
8100         * metadata-internals.h: Keep mono_assembly_name_parse_full as
8101         private, since calling it to preserve the key requires
8102         freeing it manually.
8103         
8104 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
8105
8106         * locales.c : removed HAVE_ICU part.
8107
8108 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8109
8110         * object.c (mono_class_create_runtime_vtable): Avoid calling 
8111         field_is_special_static if the klass has no special static fields.
8112
8113         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
8114         (MonoCachedClassInfo): Likewise.
8115
8116         * object.c (mono_class_has_special_static_fields): New helper function.
8117
8118 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8119
8120         * class.c (mono_class_create_from_typedef): Don't call 
8121         interfaces_from_typedef_full for enums.
8122         (mono_class_create_from_typedef): Compute the base types of enums directly
8123         without calling mono_class_setup_fields ().
8124         (mono_class_find_enum_basetype): New helper function.
8125
8126         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
8127         one place inside the string heap.
8128         
8129 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
8130
8131         * class.c: locking fixes, code cleanups, some docs added.
8132         Allocate some data structures in the image mempool.
8133
8134 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8135
8136         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
8137         the example code.
8138         
8139 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
8140
8141         * class-internals.h, class.c, reflection.c: reduce memory taken by
8142         MonoClass.
8143
8144 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
8145
8146         * metadata.c, metadata.h, loader.h: documentation updates, code and
8147         API cleanups.
8148
8149 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8150
8151         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
8152         the example code.
8153
8154         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
8155         page faults caused by the runtime while reading metadata.
8156
8157 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8158
8159         * socket-io.c: the field names were changed 3 months ago and no one
8160         realized until bug #76077 got filed!
8161
8162 2005-09-20  Martin Baulig  <martin@ximian.com>
8163
8164         * icall.c (assembly_icalls): Removed some unused debugger icalls.
8165
8166 2005-09-20  Martin Baulig  <martin@ximian.com>
8167
8168         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
8169         write the rank into the class entry.
8170
8171 2005-09-20  Martin Baulig  <martin@ximian.com>
8172
8173         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
8174
8175 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
8176
8177         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8178
8179         * icall.c (custom_attrs_defined_internal): New icall.
8180
8181         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
8182         function.
8183         (mono_custom_attrs_construct_by_type): New helper function.
8184
8185 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
8186
8187         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
8188         terminate the resulting string. Fixes #76123.
8189
8190 2005-09-16  Martin Baulig  <martin@ximian.com>
8191
8192         * mono-debug.c
8193         (mono_debug_add_method): Ignore inflated methods for the moment.
8194
8195 2005-09-14  Martin Baulig  <martin@ximian.com>
8196
8197         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
8198
8199 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
8200
8201         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
8202         return a success/failure indication.
8203         (mono_metadata_interfaces_from_typedef_full): Ditto.
8204         (get_constraints): Ditto.
8205
8206 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
8207
8208         * marshal.c (emit_marshal_array): Fix handling of null arrays.
8209         
8210         * marshal.c (emit_marshal_array): Add support for returning string
8211         arrays from delegates. Fixes #76063.
8212
8213         * marshal.c: Use the emit_ldloc/stloc macros where possible.
8214
8215 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8216
8217         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
8218         icall.
8219
8220 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
8221
8222         * reflection.c icall.c: Fix after mono_get_exception_type_load
8223         signature change.
8224
8225         * assembly.c (mono_assembly_get_assemblyref): New helper function.
8226         (mono_assembly_load_reference): Use the new helper.
8227
8228         * class-internals.h (MonoLoaderError): New structure containing 
8229         information about type loading errors.
8230
8231         * class-internals.h loader.c: Add APIs to store per-thread loader
8232         error information.
8233
8234         * loader.c class.c: Set the loader error if needed.
8235
8236         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
8237
8238 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
8239
8240         * decimal.c: fixed to handle the broken ARM fp format.
8241
8242 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
8243
8244         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
8245         broken.
8246
8247 2005-09-06  Martin Baulig  <martin@ximian.com>
8248
8249         * domain.c (supported_runtimes): Added v2.0.50727.
8250
8251 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
8252
8253         * culture-info.h: reduce the size of some structures.
8254
8255 2005-09-05  Martin Baulig  <martin@ximian.com>
8256
8257         Reflect latest API changes in the August CTP.
8258
8259         * icall.c
8260         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
8261         ("MonoType.HasGenericArguments"): Removed.
8262         ("MonoMethod.BindGenericParameters"): Renamed to
8263         "MakeGenericMethod".
8264         ("MethodBuilder.BindGenericParameters"): Renamed to
8265         "MakeGenericMethod".    
8266
8267 2005-09-05  Martin Baulig  <martin@ximian.com>
8268
8269         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
8270
8271 2005-09-05  Martin Baulig  <martin@ximian.com>
8272
8273         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8274
8275         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
8276         generic_container is non-NULL.
8277
8278 2005-09-05  Martin Baulig  <martin@ximian.com>
8279
8280         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8281
8282         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
8283
8284 2005-08-29  Michal Moskal  <malekith@nemerle.org>
8285
8286         * reflection.c (encode_locals,
8287         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
8288         for large generic types.
8289
8290 2005-09-05  Martin Baulig  <martin@ximian.com>
8291
8292         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8293
8294         * class.c (mono_dup_array_type): New public method.
8295         (mono_metadata_signature_deep_dup): New public method.
8296         (dup_type): Correctly duplicate array and function types.
8297
8298 2005-09-05  Martin Baulig  <martin@ximian.com>
8299
8300         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8301
8302         * reflection.c (get_default_param_value_blobs): Handle generic types
8303         and generic methods.
8304
8305 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
8306
8307         * class.c: Fixed error reporting (method/class were inversed) for 
8308         inheritance demands.
8309         * security-manager.c|h: Added the AppDomain when calling the managed
8310         System.Security.SecurityManager.InheritanceDemand method.
8311
8312 2005-09-01  Raja R Harinath  <rharinath@novell.com>
8313
8314         * reflection.c (encode_marshal_blob): 'marshaltype' and
8315         'marshaltyperef' are alternate sources for the custom marshaler
8316         name.
8317
8318 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
8319
8320         * class.c: fix creation of array classes with rank == 1
8321         (patch by Ankit Jain <jankit@novell.com>).
8322
8323 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
8324
8325         * object.c: fix check for creating the bound data for arrays vs
8326         szarrays.
8327
8328 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8329
8330         * object.c: configuration file name is now based on the executable name,
8331         not the image name. Fixes bug #75931.
8332
8333 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
8334
8335         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
8336         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
8337
8338 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
8339
8340         * rand.c: Use wincrypt.h instead of WinCrypt.h.
8341
8342 2005-08-24  Ankit Jain  <jankit@novell.com>
8343             Raja R Harinath  <rharinath@novell.com>
8344
8345         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
8346           called by it recursively.
8347           (mono_class_init): Remove special case in pending_init handling, since it's
8348           superseded by the fix to mono_class_from_typeref.
8349
8350 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8351
8352         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
8353         BROKEN_THREAD_START stuff.
8354
8355 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
8356
8357         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
8358         trampoline.
8359
8360         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
8361         
8362         * object.c (mono_delegate_ctor): Replace the original function address with
8363         a delegate trampoline.
8364
8365 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
8366
8367         * icall.c: add boolean argument to base64_to_byte_array and 
8368         InternalFromBase64String to control whether a whitespace-only string
8369         is allowed (or should casue a FormatException to be thrown). We need
8370         this as the behavior has changed between MS.NET 1.x and 2.0, and we
8371         to match the MS behaviour in both profiles.
8372         * appdomain.c: Bump corlib version.
8373
8374 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8375
8376         This patch implements a big portion of publisher policy
8377         support, used to bind assembly versions and redirect
8378         one assembly from version A to version B.
8379
8380         * assembly.c:
8381         New GSList loaded_assembly_bindings, for storing the cached
8382         assembly bindings.
8383         (assembly_binding_maps_name): New static function for checking if a 
8384         assembly binding information maps an assembly name.
8385         (mono_assembly_binding_info_free): New function for freeing
8386         assembly binding information resources.
8387         (get_publisher_policy_info): New static function for retrieving 
8388         assembly binding information from a MonoImage.
8389         (compare_versions): New static function for comparing an assembly
8390         binding information data and the version of an assembly name.
8391         (check_policy_versions): New static function for checking if an
8392         assembly binding info mapping an assembly name is valid for it.
8393         (mono_assembly_load_publisher_policy): New static function for
8394         loading the 'policy.major.minor.MyAssembly' image for an assembly
8395         with an assembly name 'aname'.
8396         (mono_assembly_bind_version): New static function for updating
8397         assembly redirection.
8398         (mono_assembly_apply_binding): New static function for applying
8399         assembly binding.
8400         (search_binding_loaded): New static function for searching 
8401         loaded assembly binding infos in the cache domain.
8402         (mono_assembly_load_full): Don't apply assembly binding for
8403         reflection only assemblies.
8404
8405         * metadata-internals.h: Add MonoAssemblyBindingInfo,
8406         which contains information about assembly binding. Also
8407         declare signature for mono_config_parse_publisher_policy ()
8408         function, used to retrieve pub policy info.
8409         
8410         * mono-config.c:
8411         (publisher_policy_start): New static function used to parse publisher 
8412         policy config files.
8413         (publisher_policy_parser): New static MonoParseHandler containing 
8414         the functions used when parsing config files.
8415         (mono_config_parse_publisher_policy): New function for parsing
8416         publisher policy files.
8417         
8418 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
8419
8420         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
8421
8422         * marshal.c (mono_delegate_free_ftnptr): Ditto.
8423
8424         * object.c (mono_get_addr_from_ftnptr): New helper function.
8425
8426         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
8427
8428         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8429
8430 2005-08-19  Dick Porter  <dick@ximian.com>
8431
8432         * threads.c, threads.h, appdomain.c, appdomain.h,
8433         profiler-private.h, monitor.c, object.c, object-internals.h,
8434         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
8435         store the thread ID, so it can hold a 64 bit value if needed.
8436
8437 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
8438
8439         * reflection.c (mono_reflection_create_dynamic_method): Store the
8440         handle class into the method references as well so ldtoken works in
8441         dynamic methods.
8442
8443         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
8444         types.
8445
8446 2005-08-19  Ankit Jain <jankit@novell.com>
8447
8448         Fix #75847.
8449         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
8450           here rather than using the method signature of a arbitrary function
8451           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
8452           two arguments.
8453           Hack done with Harinath.
8454
8455 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8456
8457         * threadpool.c: disable printing stack traces when we get a exception
8458         in a threadpool thread. I need to do more testing to figure out which
8459         cases actually print this. Fixes bug #75828.
8460
8461 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8462
8463         * icall.c: there might be ignored whitespace after the last '='. This
8464         fixes length computation and bug #75840.
8465
8466 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
8467
8468         * assembly.c (mono_assembly_load_full): Consider .exe extension as
8469         well. Fixes #75809.
8470
8471         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
8472         #75784.
8473         
8474         * reflection.c (create_custom_attr_data): Ditto.
8475
8476 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
8477
8478         * locales.c, culture-info.h : removed RegionLCIDMap.
8479         * culture-info-tables.h : regenerated.
8480
8481 2005-08-16  Martin Baulig  <martin@ximian.com>
8482
8483         * class.c (mono_type_get_name_recurse): Small fix.
8484
8485 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
8486
8487         * locales.c : indentation fixie.
8488
8489 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
8490
8491         * object-internals.h,
8492           locales.h,
8493           locales.c,
8494           culture-info.h,
8495           icall.c : added RegionInfo table support.
8496         * culture-info-table.h : regenerated for region support.
8497
8498 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
8499
8500         * reflection.c (resolve_object): handle all kinds of MonoMethod
8501         including generic ones
8502
8503 2005-08-12  Ankit Jain <jankit@novell.com>
8504
8505         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
8506           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
8507
8508 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
8509
8510         * process.c: Don't close a thread handle when it's NULL. This is a
8511         workaround for bug #75733.
8512
8513 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
8514
8515         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
8516
8517 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
8518
8519         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
8520
8521 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8522
8523         * threadpool.c: if a work item in the thread pool has a callback that
8524         catches a exception, don't propagate it after invoking the callback.
8525         Fixes bug #75336.
8526
8527 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
8528
8529         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
8530
8531         * class-internals.h (MonoCachedClassInfo): Add some new fields.
8532
8533         * class.c (mono_class_init): Load field info lazily in the AOT case.    
8534
8535         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
8536
8537 2005-08-03  Ankit Jain  <jankit@novell.com>
8538
8539         Fix #75683.
8540         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
8541           PInvoke calling convention is 0.
8542
8543 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
8544
8545         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
8546         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
8547
8548 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
8549
8550         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
8551         to handle threads not started by the GC (patch by Michael Meeks
8552         <michael.meeks@novell.com>).
8553
8554 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
8555
8556         * reflection.c: Make buffer used in emitting types larger for some
8557         big generic types (patch by Michal Moskal).
8558
8559 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
8560
8561         * mono-debug.c: Fix some (not all) alignment problems.
8562
8563 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8564
8565         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
8566         Invoke mono_image_load_from_data_full passing the refonly
8567         parameter.
8568
8569         * assembly.c
8570         (mono_assembly_open_from_bundle): Add the refonly argument, 
8571         in order to pass it to other methods it calls to.
8572         (do_mono_assembly_open): Add the refonly argument, in order 
8573         to pass it to other methods it calls to.
8574         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
8575         the refonly parameter to it.
8576
8577         * image.c: Add loaded_images_refonly_hash and
8578         loaded_images_refonly_guid_hash to cache the reflection
8579         only loaded images.
8580         (mono_images_init): Initialize the hash tables used for
8581         caching the reflection only images.
8582         (load_modules): Invoke mono_image_open_full passing the refonly
8583         parameter to load the modules the correct way.
8584         (build_guid_table): Add the refonly argument, to re-build the 
8585         correct hash table.
8586         (do_mono_image_open): Added the refonly argument, in order to
8587         define it for the loaded image.
8588         (mono_image_loaded_full): New function, which receives an
8589         additional parameter to look for the image in the refonly or
8590         non-refonly section.
8591         (mono_image_loaded): Updated, using mono_image_loaded_full.
8592         (mono_image_loaded_by_guid_full): The same case that happens
8593         with mono_image_loaded_full.
8594         (mono_image_loaded_by_guid): Likewise.
8595         (register_image): Use the ref_only variable inside MonoImage
8596         to decide in which hash table store the current image.
8597         (mono_image_open_from_data_full): Rename
8598         mono_image_open_from_data to mono_image_open_from_data_full,
8599         adding the refonly argument, to define the ref_only variable 
8600         inside MonoImage.
8601         (mono_image_open_from_data): Return 
8602         mono_image_open_from_data_full.
8603         (mono_image_open_full): Rename mono_image_open to
8604         mono_image_open_full, receiving the new refonly argument,
8605         to pass it to inner methods.
8606         (mono_pe_file_open): Update this function, to open
8607         a MonoImage as a non-refonly image.
8608         (mono_image_close): Use the refonly variable inside
8609         MonoImage to remove the image from the correct caches.
8610
8611         * image.h: Add the signatures of mono_image_open_full,
8612         mono_image_open_from_data_full, mono_image_loaded_full,
8613         mono_image_loaded_by_guid_full.
8614
8615         * metadata-internals.h: Add the ref_only field to 
8616         MonoImage.
8617         
8618 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8619
8620         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
8621         Fix the last behavior, which used to load the assemblies and
8622         extract MonoReflectionAssemblyName information, instead of
8623         extract it from the metadata tables. Needed for Reflection
8624         Only assemblies.
8625         
8626 2005-07-29  Martin Baulig  <martin@ximian.com>
8627
8628         * mono-debug-debugger.c
8629         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
8630         not initialized.
8631
8632         * mono-debug.c
8633         (mono_debug_address_from_il_offset): Check whether we have
8634         debugging support before attempting to take the lock.
8635         (mono_debug_source_location_from_address): Likewise.
8636         (mono_debug_source_location_from_il_offset): Likewise.
8637         (mono_debug_il_offset_from_address): Likewise.
8638         (mono_debug_address_from_il_offset): Likewise.
8639
8640 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
8641
8642         * class.c (mono_class_from_name_case): Add support for dynamic images.
8643         Fixes #75650.
8644
8645         * object.c (mono_class_compute_gc_descriptor): Add a workaround
8646         for #75479.
8647
8648 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8649         
8650         * reflection.c (mono_method_get_object): Fix warning.
8651
8652 2005-07-28  Martin Baulig  <martin@ximian.com>
8653
8654         * mono-debug.c
8655         (mono_debug_add_wrapper): Also write the wrapper type.
8656
8657 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8658
8659         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
8660         
8661         * class.c (mono_class_init): Avoid reading nested classes if the AOT
8662         data indicates the class has none.
8663
8664 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
8665
8666         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
8667         loader lock with the debugger lock. Prevents deadlocks for beagle.
8668
8669         Beagle can now run on an smp box for a weekend without any
8670         issues. Woohoo!
8671
8672 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
8673
8674         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
8675         in a module. Fixes #75629.
8676
8677 2005-07-26  Martin Baulig  <martin@ximian.com>
8678
8679         * mono-debug.c (mono_debug_add_wrapper): New static method.
8680         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
8681         interncall or a wrapper.
8682
8683         * mono-debug.h (MonoDebugWrapperData): New public typedef.
8684         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
8685         (MONO_DEBUGGER_VERSION): Bump to 51.
8686
8687         * mono-debug-debugger.c
8688         (mono_debugger_add_type): Removed this empty function.
8689         (mono_debugger_add_method): Likewise.
8690
8691 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
8692
8693         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
8694         before accessing method->slot.
8695
8696 2005-07-21  Jb Evain  <jbevain@gmail.com>
8697
8698         * reflection.c (method_encode_clauses/class): Handle filters clauses.
8699         Fixes #75010.
8700
8701 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
8702
8703         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
8704         #75587.
8705
8706 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8707
8708         * image.h image.c: Add mono_image_get_guid () API function.
8709
8710 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
8711
8712         There were issues when multiple threads tried to load
8713         assemblies. A deadlock was created between assemblies_mutex and
8714         mono_domain_assemblies_lock. This fixes the issue by making the
8715         assembly ref counting be lock free. See bug 75586.
8716         
8717         * image.c (mono_image_close): The add ref function here was using
8718         Interlocked operations while the unref was using a mutex and a
8719         --. I don't think this was ever a bug that would be exposed in a
8720         non-pendantic way (ie, by an embedder doing a ref on one thread
8721         and an unref on another), but for the sake of correctness, this is
8722         now Interlocked.
8723
8724         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
8725         (mono_assembly_load_reference): Call mono_assembly_addref rather
8726         than touching the refcount ourselves.
8727         (mono_assembly_close): Use InterlockedDecrement to unref the
8728         assembly. Don't acquire the lock unless it is actually needed.
8729
8730 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
8731
8732         * class.c (mono_class_layout_fields): Fix calculation of has_references
8733         for generic types.
8734
8735 2005-07-12  Martin Baulig  <martin@ximian.com>
8736
8737         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8738
8739         * metadata.c
8740         (mono_type_hash): Provide better hashing for generic instances.
8741         (mono_generic_inst_hash): Improve hashing.
8742         (mono_generic_class_hash): Likewise.
8743
8744         * reflection.c (mymono_metadata_type_hash): Improve hashing for
8745         generic instances.
8746
8747 2005-07-12  Martin Baulig  <martin@ximian.com>
8748
8749         * reflection.c (mono_reflection_create_runtime_class): Remove the
8750         hack for generic type definitions and non-`Run' assemblies.
8751         (mono_reflection_bind_generic_parameters): Also use
8752         `klass->wastypebuilder' to check for TypeBuilders.
8753
8754 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
8755
8756         * class.c (mono_class_layout_fields): Fix calculation of has_references
8757         for generic types.
8758
8759         * class.c (inflate_generic_class): Fix a leak.
8760         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
8761         for generic types.
8762
8763 2005-07-11  Martin Baulig  <martin@ximian.com>
8764
8765         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
8766         on error.
8767
8768 2005-07-11  Martin Baulig  <martin@ximian.com>
8769
8770         * loader.c (find_method): Also lookup in
8771         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
8772
8773 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8774
8775         * appdomain.c (mono_domain_unload): Don't free the error message
8776         before passing it to mono_get_exception_...
8777
8778         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
8779         
8780 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
8781
8782         * threads.c: try to better guess an available RT signal (bug #75387).
8783
8784 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8785
8786         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
8787         and CACHE_OBJECT.
8788
8789 2005-07-07  Martin Baulig  <martin@ximian.com>
8790
8791         * class.c (mono_type_get_name_full): Return NULL for
8792         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
8793         fixes #75408.
8794
8795 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8796
8797         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
8798         exit the appdomain as well being aborted.
8799
8800         * threadpool.c: Create all threadpool threads inside the root appdomain, and
8801         change back to the root domain after calling managed code. This enables
8802         appdomains using threadpools to be unloaded.
8803
8804 2005-07-07  Martin Baulig  <martin@ximian.com>
8805
8806         * class-internals.h
8807         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
8808         into `MonoDynamicGenericClass' since we only need it for dynamic
8809         types.
8810
8811         * reflection.c (mono_class_bind_generic_parameters): We don't need
8812         to compute the `parent' here.
8813
8814 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
8815
8816         * culture-info-table.h : regenerated.
8817
8818 2005-07-06  Martin Baulig  <martin@ximian.com>
8819
8820         * icall.c
8821         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
8822
8823         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
8824
8825 2005-07-06  Martin Baulig  <martin@ximian.com>
8826
8827         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
8828         we're doing a signature-only comparision; fixes #74945.
8829
8830 2005-07-06  Martin Baulig  <martin@ximian.com>
8831
8832         * class-internals.h (MonoGenericClass): Moved some things out into
8833         a new `MonoInflatedGenericClass' type.  
8834         (MonoInflatedGenericClass): New type; the `klass' of a
8835         `MonoGenericClass' is now computed lazyly in
8836         mono_get_inflated_generic_class().      
8837
8838         * class.c (mono_get_inflated_generic_class): New public function.
8839         (mono_class_inflate_generic_method): Removed the unused
8840         `MonoClass *' argument.
8841         (setup_generic_vtable): Don't call mono_get_inflated_method() on
8842         all the methods.
8843         (mono_class_create_generic): Make this static and merge it with
8844         mono_class_create_generic_2(); we're now called automatically from
8845         mono_get_inflated_generic_class().
8846
8847         * loader.c (mono_method_signature): Call
8848         mono_get_inflated_method() here.
8849
8850 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
8851
8852         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
8853         type of fields with RVA.
8854
8855         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
8856         for this pseudo class.
8857         (my_mono_class_from_generic_parameter): Likewise.
8858         (mono_class_init): Allow interfaces to have cctors.
8859
8860 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8861
8862         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
8863         lazily for AOT methods.
8864
8865 2005-07-05  Martin Baulig  <martin@ximian.com>
8866
8867         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
8868         returns FALSE for a successful match, not TRUE.
8869
8870 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8871
8872         * loader.c (mono_method_get_index): Optimize this a bit.
8873
8874 2005-07-04  Martin Baulig  <martin@ximian.com>
8875
8876         * class.c
8877         (class_compute_field_layout): Move the check for generic type
8878         definitions into mono_class_layout_fields().  Fixes #74684.
8879         (mono_class_from_generic_parameter): Correctly compute
8880         `klass->parent'; fixes #75457.
8881
8882         * reflection.c (register_assembly, register_module): Make sure
8883         `domain->rejobject_hash' is already created.
8884
8885 2005-07-02  Martin Baulig  <martin@ximian.com>
8886
8887         * class-internals.h
8888         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
8889         `MonoDynamicGenericClass'.      
8890
8891 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
8892
8893         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
8894         returned by a field getter is null, since null is a valid value.
8895
8896 2005-07-01  Martin Baulig  <martin@ximian.com>
8897
8898         * reflection.c (mono_reflection_generic_class_initialize): Update
8899         the `dgclass->fields [i].parent' to the correct class.
8900         (mono_image_get_fieldref_token): Use the declaring type, not the
8901         reflected type.
8902
8903 2005-07-01  Martin Baulig  <martin@ximian.com>
8904
8905         * loader.c (find_method): Also look in the interfaces; fixes #75429.
8906
8907 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
8908
8909         * threads.c (thread_cleanup): assert that thread != NULL
8910         (wait_for_tids_or_state_change): We were using the wrong variable
8911         when accessing wait->threads. `i' was always out of the bounds of
8912         the array.
8913
8914 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8915
8916         * loader.c: map user32 and kernel32 to libMonoSupportW
8917
8918 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
8919
8920         * appdomain.c (unload_thread_main): Mark this as WINAPI.
8921
8922 2005-06-28  Martin Baulig  <martin@ximian.com>
8923
8924         * loader.c (method_from_methodspec): Fix #75334.
8925
8926 2005-06-28  Martin Baulig  <martin@ximian.com>
8927
8928         Fix #74953 - Arrays now implement the generic IList<T> interface
8929         on the 2.0 platform.
8930
8931         * class-internals.h (MonoDefaults): Added `generic_array_class'.
8932
8933         * reflection.c (mono_class_bind_generic_parameters): New public
8934         function; similar to mono_reflection_bind_generic_parameters(),
8935         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
8936
8937         * domain.c (mono_init_internal): Try to initialize.
8938         `mono_defaults.generic_array_class' here; this'll only succeed if
8939         we're using the 2.0 corlib.
8940
8941         * icall.c
8942         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
8943         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
8944         (mono_lookup_internal_call): Added support for nested classes.
8945
8946         * loader.c
8947         (mono_get_method_from_token): Set `result->signature->pinvoke' if
8948         we're an interncall and have generic arguments.
8949
8950         * class.c
8951         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
8952         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
8953         instance of System.Array.InternalArray<T> for arrays, so they
8954         implement the generic IList<T> interface.
8955
8956 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
8957
8958         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
8959         (chastamar@yahoo.com). Fixes #75374.    
8960
8961 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
8962
8963         * culture-info-table.h: regenerated.
8964
8965 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8966
8967         * icall.c: handle spaces correctly for base64 strings.
8968
8969 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
8970
8971         * *.c: Kill some warnings.
8972
8973 2005-06-23  Duncan Mak  <duncan@novell.com>
8974
8975         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
8976         that this builds on Solaris 10 (x86).
8977
8978 2005-06-23  Martin Baulig  <martin@ximian.com>
8979
8980         * class.c
8981         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
8982         generic type definitions.
8983
8984 2005-06-23  Martin Baulig  <martin@ximian.com>
8985
8986         Fix #75331.
8987
8988         * metadata.c (mono_class_get_overrides): Renamed to
8989         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
8990         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
8991         pass it to mono_get_method_full().
8992
8993 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
8994
8995         * reflection.c (mono_reflection_create_runtime_class): take the
8996         mono_domain_lock in this method. Prevents deadlocks
8997
8998 2005-06-22  Martin Baulig  <martin@ximian.com>
8999
9000         * loader.c (method_from_methodspec): Fix #75330.
9001
9002 2005-06-22  Martin Baulig  <martin@ximian.com>
9003
9004         * reflection.c (type_get_qualified_name): Use
9005         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
9006         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
9007         argument; use it if we don't have an assembly name.
9008
9009 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
9010
9011         * object.c: In mono_message_init, set "copy out" flag for in
9012         parameters with the [Out] flag.
9013
9014 2005-06-21  Martin Baulig  <martin@ximian.com>
9015
9016         * class.c
9017         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
9018         and MONO_TYPE_PTR.
9019
9020 2005-06-21  Martin Baulig  <martin@ximian.com>
9021
9022         * class.c (mono_class_init): Don't initialize `class->fields' for
9023         generic instances since they're initialized again in
9024         compute_field_layout(). 
9025         (compute_field_layout): Set the field's `generic_info' here; fix
9026         #75320. 
9027
9028 2005-06-21  Martin Baulig  <martin@ximian.com>
9029
9030         * class-internals.h
9031         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
9032
9033         * metadata.c (mono_metadata_generic_method_equal): Also
9034         distinguish the `generic_class'; fixes #75334.
9035
9036 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9037
9038         * domain.c:
9039         * appdomain.c:
9040         * domain-internals.h:
9041         * reflection.c: 'domain_assemblies' field is now protected by its own
9042         lock. Don't call into managed code to run the AssemblyLoad event if we
9043         now there are no registered delegates for it.
9044
9045 2005-06-20  Martin Baulig  <martin@ximian.com>
9046
9047         * class.c (mono_class_is_assignable_from): Use a custom version of
9048         mono_class_has_parent() to make things work for generic instances;
9049         fix #75300.
9050
9051 2005-06-20  Martin Baulig  <martin@ximian.com>
9052
9053         * loader.c (method_from_methodspec): Apply a patch from
9054         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
9055
9056 2005-06-20  Martin Baulig  <martin@ximian.com>
9057
9058         * class.c (mono_class_init): Reverted Zoltan's last change; it
9059         breaks generics.
9060
9061 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9062
9063         * threads.c (wait_for_tids_or_state_change): Add missing locking.
9064
9065 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9066
9067         * socket-io.c: fix the index in the socket array for writable/error
9068         sockets. Fixes bug #75306.
9069
9070 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9071
9072         * class.c (mono_class_init): Allow interfaces to have static ctors.
9073
9074 2005-06-17  Martin Baulig  <martin@ximian.com>
9075
9076         * loader.c (method_from_methodspec): Use `context->container' when
9077         parsing the `gmethod->inst'.
9078
9079 2005-06-17  Martin Baulig  <martin@ximian.com>
9080
9081         * class.c (mono_type_get_name_recurse): Don't add the assembly
9082         name for type arguments.
9083
9084 2005-06-15  Martin Baulig  <martin@ximian.com>
9085
9086         * reflection.c (mono_image_get_inflated_method_token): Encode
9087         correct klass; fixes #75260.
9088
9089 2005-06-13 Michal Moskal <malekith@nemerle.org>
9090
9091         * icall.c: Make GetCorrespondingMethod/Constructor take
9092         MonoReflectionMethod method not MonoMethod. Removed
9093         MonoType.GetCorrespondingField, and make
9094         MonoGenericType.GetCorrespondingField take name not
9095         MonoClassField.
9096
9097 2005-06-13  Michal Moskal <malekith@nemerle.org>
9098
9099         * reflection.c (field_encode_signature, encode_locals):
9100          Make sizes of buffers for types larger (for big generic types).
9101          (create_generic_typespec,
9102          mono_reflection_sighelper_get_signature_local,
9103          mono_reflection_sighelper_get_signature_field):
9104          Add asserts for too small buffers.
9105
9106 2005-06-15  Martin Baulig  <martin@ximian.com>
9107
9108         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
9109         if our parent is not a dynamic type.
9110
9111 2005-06-15  Martin Baulig  <martin@ximian.com>
9112
9113         * class-internals.h (MonoTypeNameFormat): New enum.
9114
9115         * class.c
9116         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
9117         (mono_type_get_full_name): Removed.
9118         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
9119         argument instead of the boolean's.
9120
9121         * icall.c (ves_icall_System_MonoType_getFullName):
9122         Added `gboolean assembly_qualified'.    
9123
9124         * reflection.h
9125         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
9126
9127         * reflection.c (mono_reflection_parse_type): Parse the new type
9128         name format.
9129
9130 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9131
9132         * icall.c: no need to convert from utf16 to utf8 and then back again
9133         after the call to GetLogicalDrives.
9134
9135 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9136
9137         * icall.c: frombase64. Fix problems exposed by new tests.
9138
9139 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9140
9141         * icall.c: added internal calls for converting char [] and strings in
9142         base64 into byte [].
9143
9144 2005-06-10  Martin Baulig  <martin@ximian.com>
9145
9146         * class.c (mono_class_create_generic_2): Read the nested classes
9147         from the metadata rather than from `gklass->nested_classes' since
9148         `gklass' might not be initialized yet.
9149
9150 2005-06-09  Duncan Mak  <duncan@novell.com>
9151
9152         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
9153         all public headers. Fixes #74919.
9154
9155 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
9156
9157         * domain.c: The key for proxy_vtable_hash is now a pointer
9158         array. Added new GHashFunc and GCompareFunc functions for this.
9159
9160         * class.h: The list of interfaces in MonoRemoteClass is known in
9161         advance and can't grow (we create a new MonoRemoteClass if needed),
9162         so now the interface array can be allocated together with
9163         MonoRemoteClass.
9164         
9165         * object.c: Added a new method create_remote_class_key.
9166         Fixed mono_remote_class so it does not depend on
9167         mono_upgrade_remote_class.
9168         Removed extend_interface_array.
9169         Added new method clone_remote_class(), which makes a copy of a remote
9170         class and adds a new interface or class to it.
9171         mono_upgrade_remote_class() now creates a new remote class (or gets
9172         it from the cache) if an vtable upgrade is needed. In this way
9173         we make sure that other objects sharing the same remote class
9174         don't get the new vtable with unwanted interfaces.
9175         
9176         * object-internals.h:
9177         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
9178         
9179         * marshal.c: Track changes in mono_upgrade_remote_class().
9180
9181 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
9182         * icall.c: Add runtime methods for obtaining members of inflated
9183         class, which were created from supplied non-inflated members. It
9184         is used in internal Get{Method,Constructor,Field} methods in
9185         System.Type
9186
9187 2005-06-09  Martin Baulig  <martin@ximian.com>
9188
9189         * reflection.c
9190         (mono_reflection_bind_generic_method_parameters): Fix #75169.
9191
9192 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
9193         * reflection.c (mono_image_basic_init): Define
9194         Version in MonoDynamicAssembly. 
9195         
9196 2005-06-08  Martin Baulig  <martin@ximian.com>
9197
9198         Fix #75136.
9199
9200         * loader.c
9201         (mono_method_signature_full): New public method; takes a
9202         `MonoGenericContext *'.
9203         (find_method): Use mono_method_signature_full() and pass the
9204         klass'es context to it.
9205
9206         * class.c (mono_class_is_inflated_method): Use
9207         mono_method_signature_full() and pass the context to it.
9208
9209 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
9210
9211         * object.c: add proper locking in mono_remote_class_vtable(),
9212         fixes possible memory corruption.
9213
9214 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
9215
9216         * marshal.c (mono_remoting_marshal_init): set
9217         initialized after initialization.
9218
9219 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9220
9221         * locales.c : hush.
9222
9223 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
9224
9225         * object.c (extend_interface_array): fix really silly
9226         memory corrupting / comparison bug.
9227
9228 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
9229
9230         * reflection.c: Functions added to support the creation
9231         of CustomAttributeData, which includes Attribute data
9232         used by ReflectionOnly methods.
9233
9234         * reflection.h:  mono_reflection_get_custom_attrs_data and
9235          mono_custom_attrs_data_construct added (functions exposed).
9236
9237          * icall.c: Added mono_reflection_get_custom_attrs_data
9238          as icall.
9239         
9240 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9241
9242         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
9243         lupus's request.
9244
9245 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
9246
9247         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
9248
9249         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
9250         dynamic DllImportAttribute.
9251
9252         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
9253         dynamic DllImportAttribute.
9254
9255         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
9256         Fixes #75162.
9257
9258 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9259
9260         * threads.c: avoid segfault when an unstarted thread is aborted.
9261
9262 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
9263
9264         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
9265         Returns the name and version of the runtime for reporting.
9266
9267 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9268
9269         * appdomain.c: bump corlib version.
9270         * object-internals.h: new field in MonoReflectionAssembly.
9271
9272 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9273
9274         * object-internals.h: Carlos forgot to add this field.
9275
9276 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
9277
9278         * icall.c: Added create_version to create instances
9279         of Version of MonoReflectionAssemblyName. This change helps
9280         the AssemblyName tests to keep running fine.
9281         
9282 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
9283   
9284         * object.c (mono_method_return_message_restore): A somehow less
9285         intrusive fix for #75138.
9286
9287 2005-06-03  Raja R Harinath  <rharinath@novell.com>
9288
9289         * object.c (mono_method_return_message_restore): Fix computation
9290         of expected number of out args.
9291
9292 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
9293
9294         * reflection.c (mono_image_get_method_info): Fix the case when the
9295         charset is empty.
9296
9297 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
9298
9299         * object.c: Added missing null check in
9300           mono_method_return_message_restore.
9301
9302 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
9303
9304         * reflection.c (mono_image_get_method_info): Handle the case when
9305         dllentry is empty.
9306
9307 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
9308
9309         * object.c: When creating the vtable for a proxy, take into account
9310         all inherited interfaces, not only the ones registered in
9311         iclass->interfaces. This fixs bug #74996.
9312         Also, in mono_method_return_message_restore, verify that the array
9313         of out args has the expected lengh.
9314
9315 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9316
9317         * socket-io.c: update the timeout in Poll when the call is interrupte.
9318
9319 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9320
9321         * socket-io.c: support abort/suspend in Select_internal after last
9322         change.
9323
9324 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9325
9326         * threadpool.c: remove warning.
9327
9328 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9329
9330         * icall.c:
9331         * socket-io.[ch]: Select_internal uses poll() now when available, thus
9332         removing the 1024 limit from select(). Runtime part of the fix for
9333         bug #71203.
9334
9335 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9336
9337         * socket-io.c: when resolving the addresses for the same
9338         host returned by gethostname(), get the local IPs from the interface
9339         list. Loopback addresses are discarded if the are interfaces up with
9340         non-loopback ones. Fixes bug #63265.
9341
9342 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
9343
9344         * appdomain.c, verify.c, object-internals.h, reflection.c:
9345         bumped corlib number to 36, and added new extra_flags field
9346         to ReflectionMethodBuilder and friends.  Fixes #75060.
9347
9348 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
9349
9350         * gc.c: register a new weak link only if the object is non-null
9351         (fixes bug#75047).
9352
9353 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9354
9355         * culture-info.h : short time pattern too.
9356
9357 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9358
9359         * culture-info.h : expand long time pattern string length.
9360
9361 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9362
9363         * culture-info-table.h : update (more French date format; #72788).
9364
9365 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
9366
9367         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
9368         the method is static. Fixes #75029.
9369
9370 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
9371
9372         * reflection.c: Update the table_idx field of method builders after
9373         saving the module, since it can change. This is a workaround for
9374         bug #74914. 
9375
9376 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9377
9378         * culture-info-table.h : update (additional French date format).
9379
9380 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9381
9382         * icall.c (ves_icall_type_Equals): Revert last change.
9383         
9384         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
9385
9386         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
9387
9388 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
9389
9390         * class-internals.h: Added executioncontext_class field to 
9391         MonoDefaults structure.
9392         * domain.c: Cache System.Threading.ExecutionContext class in 
9393         mono_defaults.
9394         * object.c: Capture the ExecutionContext for asynchroneous calls in
9395          mono_async_result_new.
9396         * object-internals.h: Added execution_context and original_context 
9397         fields to MonoAsyncResult. Added execution_context to MonoThread.
9398         * security-manager.c|.h: Added mono_get_context_capture_method to 
9399         return the capture method (if required by the security manager or by
9400         the framework version used).
9401         * threadpool.c: Apply capture (if present) ExecutionContext in 
9402         mono_async_invoke and revert to original context after it completes.
9403
9404 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
9405
9406         * culture-info-table.h : updated (real hacky solution for zh-CHT).
9407
9408 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
9409
9410         * culture-info-table.h : zh-CHT related workaround.
9411
9412 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
9413
9414         * marshal.c (emit_marshal_custom): Add some error checking and call the
9415         methods in the ICustomMarshaler interface. Fixes #74875.
9416         
9417         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
9418         native->managed wrappers.
9419
9420 2005-05-12  Martin Baulig  <martin@ximian.com>
9421
9422         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
9423         here and use the loader lock.
9424
9425         * mono-debug.c: Properly lock when the debugger is not attached.
9426         (mono_debug_init): Release the initial lock if we're not running
9427         in the debugger.
9428
9429 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
9430
9431         * marshal.c (emit_marshal_custom): Pass through NULL values without
9432         calling the custom marshalling routines.
9433
9434         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
9435         conversion in structures. Fixes #74882.
9436
9437 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
9438
9439         * culture-info-table.h : zh-* cultures were missing.
9440
9441 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
9442
9443         * threads.c: Added a new event background_change_event which is signaled
9444         when a thread changes its background mode.
9445         Moved here several checks previously done in managed code. The checks
9446         require the thread lock, and using the thread lock in managed code
9447         can result in deadlocks.
9448         Merged Start_internal and Thread_internal into a single method. Now 
9449         Thread_internal does all work of creating and starting a thread.
9450         Added icalls for setting and getting the state of the object. Moved from
9451         managed code to avoid locking there.
9452         Added wait_for_tids_or_state_change() which is called instad of
9453         wait_for_tids when waiting for non-backround threads to end. This method
9454         will return if one of the threads ends or the background_change_event
9455         is signaled.
9456         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
9457         the background mode. This method signals the background_change_event
9458         event.
9459         * icall.c:
9460         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
9461         removed Start_internal.
9462         
9463 2005-05-11  Martin Baulig  <martin@ximian.com>
9464
9465         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
9466         to order of some fields to get proper alignment on 64-bit machines.
9467
9468 2005-05-11  Martin Baulig  <martin@ximian.com>
9469
9470         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
9471         changes as they're broken and completely fuck up the debugger.
9472
9473         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
9474
9475 2005-05-10  Martin Baulig  <martin@ximian.com>
9476
9477         * reflection.c (mono_reflection_generic_class_initialize): Don't
9478         call mono_class_setup_parent() here.
9479
9480 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9481
9482         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
9483         send/receive timeout use an integer in milliseconds. We were using a
9484         struct timeval.
9485
9486 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9487
9488         * locales.c:
9489         (internal_get_cultures): reserve the first slot of the array for the
9490         InvariantCulture, which will be filled in managed code.
9491
9492 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
9493
9494         * reflection.c (mono_image_fill_module_table): Initialize the
9495         GENERATION field as well.
9496
9497 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9498
9499         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
9500         Monitor.Enter on the object.
9501
9502 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9503
9504         * threads.c: Enable the wait for running threads when exiting.
9505         * icall.c: Suspend all threads before exiting.
9506
9507 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9508
9509         * assembly.c (mono_assembly_load_reference): Fix warning.
9510
9511 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9512
9513         * threadpool.c: changed the default number of threads per cpu. From now
9514         on, the default will be 20 + (5 * number of cpus) instead of 50.
9515
9516 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
9517
9518         * loader.c (mono_method_get_signature_full): Add locking here.
9519
9520 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
9521
9522         * appdomain.c: Moved methods for parsing and freeing assembly
9523         names to assembly.c.
9524         * assembly.c, domain-internals.h: Created public methods for parsing
9525         assembly names. Fixed mono_assembly_load_with_partial_name:
9526         it now finds the best match, taking into account the version,
9527         token and culture specified in the partial name. Also return
9528         the latest version if no version information is specified.
9529
9530 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
9531
9532         * threadpool.c: replace check for SocketAsyncCall class.
9533
9534 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9535
9536         * threadpool-internals.h:
9537         * Makefile.am: added threadpool-internals.h
9538
9539         * threadpool.c: call mono_unhandled_exception on exceptions not handled
9540         that happen in threadpool threads (tested on MS).
9541         (mono_thread_pool_remove_socket): new function that dispatch any pending
9542         AIO call on a socket that is closing. By now only epoll really needs it,
9543         as select/poll wake up when the socket closes.
9544
9545
9546         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
9547
9548 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
9549
9550         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
9551
9552 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
9553
9554         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
9555
9556 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
9557
9558         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
9559         has an abort request, convert it into a suspend request.
9560
9561 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
9562
9563         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
9564         warning for the usage of `UnmanagedFunctionPointerAttribute' which
9565         is not supported yet.
9566
9567 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9568
9569         * image.c: register assemblies loaded from data (bundles) in the loaded
9570         assemblies hash. Fixes bug #74772.
9571
9572 2005-04-29  Martin Baulig  <martin@ximian.com>
9573
9574         * class.c (mono_type_get_name_recurse): Update to the new naming
9575         schema from the latest .NET 2.x beta2.
9576         (mono_class_setup_vtable_general): If we're a generic instance,
9577         copy the vtable from our generic type definition and inflate all
9578         the methods in it.
9579
9580         * loader.c (find_method): Update to the new naming schema from the
9581         latest .NET 2.x beta2.
9582
9583 2005-04-29  Raja R Harinath  <harinath@gmail.com>
9584
9585         * class.c (mono_class_init): Add a mono_loader_unlock to the
9586         #74734 fix.
9587
9588 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9589
9590         * icall.c (ves_icall_System_Environment_Exit): Remove the 
9591         suspend_all_other_threads () call for the time being, since it can hang.
9592
9593         * threads.c (mono_thread_manage): Similarly, disable the waiting for
9594         the background threads to exit, since it can also hang.
9595
9596         * class.c (mono_class_init): Applied patch from Ankit Jain 
9597         (radical@gmail.com). Avoid pending init errors when a field refers
9598         to a nested class using a typeref. Fixes #74734.
9599
9600         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
9601         this for dynamic modules.
9602
9603 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9604
9605         * threads.c: don't wait for threads that are in the process of aborting
9606         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
9607         and waiting for background threads to finish. This makes xsp and
9608         mod-mono-server exit without random length delays and/or hangs.
9609
9610 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9611
9612         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
9613
9614 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
9615
9616         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
9617         dynamic types to prevent infinite loops. Fixes #74727.
9618
9619         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
9620         ..._is_assignable_to.
9621
9622 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
9623
9624         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
9625
9626 2005-04-25  Martin Baulig  <martin@ximian.com>
9627
9628         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
9629
9630         * domain.c
9631         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
9632
9633         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
9634
9635         * reflection.c (build_compressed_metadata): Set metadata header
9636         version to 2.0.
9637
9638 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9639
9640         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
9641         number into an integral and a decimal part. Fixes #70473.
9642
9643         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
9644
9645 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
9646
9647         * culture-info-table.h : reflected the latest locale-builder output.
9648
9649 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9650
9651         * threadpool.c: check for SuspendRequested too when deciding if
9652         mono_thread_interruption_checkpoint should be called.
9653
9654 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9655
9656         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
9657         * threads.c: remove interruption_mutex and use Interlocked instead. When
9658         suspending all the threads, wait for all the suspended events at once.
9659         If we're shutting down and get an APC that is going to be queued,
9660         call mono_thread_execute_interruption immediately, as the thread might
9661         be sleeping on a pthread condition or mutex.
9662
9663         * icall.c: call mono_runtime_set_shutting_down before suspending the
9664         threads.
9665
9666         Fixes bug #74693. And now xsp is happier when exiting.
9667
9668 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9669
9670         * loader.c (mono_stack_walk): Fix #74690.
9671
9672 2005-04-22  Martin Baulig  <martin@ximian.com>
9673
9674         * mono-debug.h (MonoDebugMethodJitInfo): Added
9675         `MonoDebugMethodJitInfo *jit'.
9676
9677         * mono-debug.c (mono_debug_read_method): Cache the
9678         MonoDebugMethodJitInfo in `address->jit'.
9679         (mono_debug_free_method_jit_info): New public method.
9680
9681 2005-04-22  Martin Baulig  <martin@ximian.com>
9682
9683         * class.c (mono_class_is_assignable_from): Disallow
9684         type parameter -> interface.
9685
9686 2005-04-21  Dick Porter  <dick@ximian.com>
9687
9688         * threads.c (mono_thread_create): Turn an assertion into an error.
9689
9690 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9691
9692         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
9693         
9694         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
9695         Fix some gcc 4.0 warnings.
9696
9697 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
9698
9699         * file-io.c: fix alt dir separator char on unix systems
9700         and cleanup (fixes bug #71214).
9701
9702 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
9703
9704         * marshal.c: Use CALLVIRT instead of CALL when dispatching
9705         a call to a remote domain, since the method may be an
9706         interface method in the client domain. This fixes bug #74192.
9707
9708 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9709
9710         * threadpool.c: recv/send are now performed before going back to managed
9711         code to save one transition.
9712
9713 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9714
9715         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
9716
9717         * metadata/threadpool.c: removed hack to workaround the bug above.
9718
9719         Fixes bug #74618.
9720
9721 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9722
9723         * reflection.c reflection.h: Fix handling of parameter defaults in
9724         dynamic methods. Also fixes handling of parameter attributes.
9725         Fixes #74609.
9726
9727         * mono-debug.c (mono_debug_close_image): Fix warning.
9728
9729 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9730
9731         * socket-io.h: replaced old unused field with new 'blocking'.
9732         * threadpool.c: restore socket blocking state on windows(tm).
9733
9734 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
9735
9736         * icall.c: don't return the codebase in the AssemblyName[] returned by
9737         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
9738         * object-internals.h: Removed FIXME (fields were presents) and fixed
9739         versioncompat declaration.
9740
9741 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9742
9743         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
9744         not closed, so don't cleanup when it happens.
9745
9746 2005-04-13  Chris Toshok  <toshok@ximian.com>
9747
9748         * mono-debug-debugger.h: change prototype for
9749         mono_debugger_lookup_type.
9750
9751         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
9752         this function, although it should probably be named
9753         mono_debugger_init_type.
9754
9755 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9756
9757         * threadpool.c: fix non-AIO case.
9758
9759 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9760
9761         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
9762         the built-in profiler to measure just JIT compilation times.
9763
9764 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9765
9766         * threadpool.c: the epollfd might be closed by another thread at
9767         any time, so ignore EBADF at treat it as a "we're closing" sign.
9768
9769 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9770
9771         * threadpool.c: release the semaphores with a count equals to the number
9772         of working threads in both IO and regular pools. Fixed typo that messed
9773         up the count of IO pool threads. Don't initialize the pipe handles if
9774         we're using epoll.
9775
9776 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9777
9778         * threadpool.c: some systems don't like a NULL when deleting the socket
9779         from epoll.
9780
9781 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9782
9783         * threadpool.c: fix semaphore allocation.
9784
9785 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9786
9787         * threadpool.c: added epoll() based implementation for asynchronous IO
9788         that is used instead of the default poll() when available.
9789         It can be disabled by setting MONO_DISABLE_AIO.
9790
9791 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9792
9793         * threadpool.c: windows needs 'closesocket' and instead of returning
9794         0 when the stream is closed while in select, it returns -1. Fixes bug
9795         #74573.
9796
9797 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
9798
9799         * class.c (class_compute_field_layout): Fix the regression caused by
9800         the previous try.
9801
9802 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9803
9804         * threadpool.c: separate pool for socket async. IO.
9805         * threadpool.h: mono_max_worker_threads is not a global any more.
9806
9807 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9808
9809         * class.c (class_compute_field_layout): Fix #74549.
9810
9811 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9812
9813         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
9814         use 2 connected sockets instead.
9815
9816 2005-04-08  Miguel de Icaza  <miguel@novell.com>
9817
9818         * mono-config.c: Add new entry point for mkbundle
9819         mono_config_parse_memory. 
9820
9821 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9822
9823         * threadpool.c: removed another unused function.
9824
9825 2005-04-08  Ankit Jain  <radical@corewars.org>
9826
9827         * reflection.c (get_default_param_value_blobs): Add 'types'
9828         parameter to get the types encoded in the constant table.
9829         (mono_param_get_objects): Use the type from the constant table,
9830         not the type of the parameter, when creating default values.
9831         Handle null default values correctly.
9832
9833 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9834
9835         * file-io.c:
9836         * file-io.h:
9837         * threadpool.c:
9838         * threadpool.h:
9839         * icall.c:
9840         * socket-io.c: removed dead code for async IO.
9841
9842 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9843
9844         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
9845
9846         * threadpool.c: intercept socket async. calls and pass them to a thread
9847         that is polling and dispatching the job items to the threadpool as
9848         socket become ready. Fixes bugs #71217, #71933.
9849
9850         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
9851         between char and short/ushort arrays.
9852
9853         * socket-io.c: remove dead code.
9854
9855 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
9856
9857         * locales.c,
9858           icall.c : removed InternalToUpper_Comp() and
9859           InternalToLower_Comp().
9860
9861 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
9862
9863         * char-conversions.h : The tables were incorrectly generated. Should
9864           be generated against invariant culture.
9865
9866 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9867
9868         * object.c (mono_runtime_invoke_array): Fix return value when 
9869         passing pre-created valuetype objects to ctors.
9870
9871         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
9872         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
9873         Fixes #74338.
9874
9875 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
9876
9877         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
9878         only used with --security and hides the wrong corlib version error.
9879
9880 2005-03-30  Joshua Tauberer  <tauberer@for.net>
9881
9882         * class.c: Changed mono_class_name_from_token so that types
9883         outside of a namespace don't have an initial period.  Improved
9884         the g_warning message used in _mono_class_get when loading
9885         fails.
9886         * assembly.c: In mono_assembly_load_reference, when an assembly
9887         can't be found, "No such file or directory" is misleading and
9888         unhelpful because a few paths were checked for the presence of
9889         the assembly.  When that happens (ENOENT), display a nicer
9890         message indicating the directories that were searched.  In all
9891         cases, the warning is made easier to read for non-hackers.
9892
9893 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9894
9895         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
9896         project/solution.
9897         * appdomain.h|domain.c: Removed inline from functions.
9898         * appdomain.c: Reduced warnings when compiling on windows.
9899         * icall.c: Fixed output_debug declaration to gunichar2*.
9900         * mono-config.c: Reduced warnings when compiling on windows.
9901         * rand.c: Added missing "windows.h". Added missing return value.
9902         * rawbuffer.c: Added missing winsock2.h for windows.
9903         * sysmath.h: Added mono-compiler.h header to allow/ease 
9904         compilation with non-GCC compilers.
9905         * threads.c: Fixed declarations to compile with VS.NET C compiler.
9906         Removed cast warnings.
9907
9908         Adapted from the work of J Lothian (for VC6).
9909
9910 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9911
9912         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
9913         from default_path.
9914
9915 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9916
9917         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
9918         the 2.0 profile.
9919
9920 2005-03-27  Raja R Harinath  <harinath@gmail.com>
9921
9922         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
9923         has to be in $(exec_prefix).  $(prefix) is for arch-independent
9924         stuff, and it would probably use $(prefix)/share rather than
9925         $(prefix)/lib.
9926
9927 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9928
9929         * console-io.c: added 2 includes that might be missing.
9930
9931 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9932
9933         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
9934         profile.
9935
9936         * reflection.c (create_custom_attr): Allocate the params array using
9937         alloca so it gets GC tracking.
9938
9939 2005-03-23  Chris Toshok  <toshok@ximian.com>
9940
9941         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
9942         out some spew.
9943
9944 2005-03-24  Raja R Harinath  <rharinath@novell.com>
9945
9946         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
9947         changes to pick up any changes in prefix, etc.
9948
9949 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9950
9951         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
9952         
9953         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
9954         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
9955
9956 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9957
9958         * class-internals.h object-internals.h class.c reflection.c: Extend the
9959         mono_lookup_dynamic_token () function to return the class of the
9960         token as well. 
9961
9962         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
9963         well. Fixes #73848.
9964
9965 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
9966
9967         * security-manager.c: Skip inheritance checks for intra-corlib
9968         class inheritance and method overrides. This skips a lot of checks
9969         and (anyway) permissions cannot work until corlib is loaded.
9970
9971 2005-03-23  Martin Baulig  <martin@ximian.com>
9972
9973         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
9974         MONO_TYPE_GENERICINST.  
9975
9976 2005-03-23  Martin Baulig  <martin@ximian.com>
9977
9978         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
9979
9980 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9981
9982         * class.c: added locking comments to some functions.
9983         Cache the interface offsets arrays (saves about 20 KB
9984         of runtime memory in a typical app).
9985         Reduce the time overhead in mono_class_setup_supertypes ().
9986
9987 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
9988
9989         * icall.c: speedup and fix leaks in GetMethodsByName and
9990         GetPropertiesByName.
9991
9992 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9993
9994         * reflection.c: some locking fixes.
9995
9996 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9997
9998         * metadata.c: added missing break in case statement.
9999
10000 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
10001
10002         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
10003         typedbyref return values. Fixes #73941.
10004
10005 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10006
10007         * security-manager.c|h: Added demandunmanaged method and 
10008         suppressunmanagedcodesecurity class to MonoSecurityManager.
10009         Renamed aptc class to allowpartiallytrustedcallers.
10010
10011 2005-03-17  Martin Baulig  <martin@ximian.com>
10012
10013         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
10014
10015 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10016
10017         * file-io.c: disabled file async. IO using aio_*. It uses the
10018         threadpool now. Workaround for bug #73718.
10019
10020 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10021
10022         * assembly.h, mono-config.c: added code to deal with bundled configs
10023         for bundled assemblies.
10024
10025 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
10026
10027         * *.c, private.h: cleanup, removing old private.h header file.
10028
10029 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10030
10031         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
10032         and throw_on_unmappable_char attributes.
10033
10034 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
10035
10036         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
10037         _ProcessName_internal.
10038
10039 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10040
10041         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
10042         #73631.
10043
10044         * icall.c threads.c threads-types.h: Remove slothash icalls as they
10045         are no longer used.
10046
10047 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10048
10049         * object.c (compute_class_bitmap): Add support for generics. Fixes
10050         #73527.
10051
10052 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
10053
10054         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
10055
10056 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10057
10058         * filewatcher.c: commented out the code for windows watcher, as we don't
10059         use it (we use the managed implementation instead).
10060
10061 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
10062
10063         * object-internals.h (MonoThread): Remove 'unused1' field.
10064
10065         * appdomain.c: Bump corlib version.
10066
10067         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
10068
10069         * reflection.c (mono_reflection_create_runtime_class): Remove the
10070         AssemblyBuilder.Save optimization since it causes too many problems.
10071
10072 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
10073
10074         * exception.c|h: Added mono_get_exception_reflection_type_load to
10075         create a ReflectionTypeLoadException object.
10076         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
10077         to return NULL is a InheritanceDemand fails during reflection. Updated
10078         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
10079         ReflectionTypeLoadException if an InheritanceDemand fails during 
10080         reflection. Added icall mapping for GetLinkDemandSecurity.
10081         * security-manager.c|h: Added ves_icall_System_Security_
10082         SecurityManager_GetLinkDemandSecurity internal call to return the
10083         class and methods permissions set for a LinkDemand. Removed unused
10084         fields in MonoSecurityManager.
10085
10086 2005-03-10  Martin Baulig  <martin@ximian.com>
10087
10088         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
10089         it's a generic instance.
10090
10091 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
10092
10093         * reflection.c (mono_get_object_from_blob): Applied patch from
10094         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
10095
10096         * class.c (mono_class_is_assignable_from): Another try at fixing 
10097         #73469 without breaking anything.
10098
10099 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10100
10101         * class.c: (mono_class_is_assignable_from): Revert the last changes
10102         since they don't work with generics.
10103         
10104         * class.c (mono_class_is_assignable_from): Fix build bustage.
10105
10106         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
10107         the managed IsAssignableFrom method. Fixes #73469.
10108
10109         * reflection.c (mono_reflection_call_is_assignable_from): New helper
10110         function.
10111
10112 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10113
10114         * object.c (mono_load_remote_field_new): Fix returning uninitialized
10115         memory when the remoting callback does not sets the out arguments.
10116         Fixes #73007.
10117
10118         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
10119         by mistake.
10120
10121         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
10122
10123         * object-internals.h (MonoStackFrame): Sync with managed object layout.
10124
10125         * appdomain.c: Bump corlib version.
10126
10127 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10128
10129         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
10130         function.
10131
10132         * threads.c (mono_thread_attach): Detect threads which are not started
10133         by the GC pthread wrappers.
10134
10135 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
10136
10137         * icall.c: Added new icall for RNG.
10138         * rand.c|h: Added new icall to open the RNG. This allows to share a 
10139         single handle on Linux to access /dev/urandom and fix #73183.
10140
10141 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10142
10143         * object.c: setting the new vtable in a transparent proxy object must
10144         not change the GC descriptor.
10145
10146 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10147
10148         * object.c: fixed compilation without GCJ support.
10149         * reflection.c: for runtime-created types ensure klass->has_references
10150         is correct (bug #73215).
10151
10152 2005-03-02  Martin Baulig  <martin@ximian.com>
10153
10154         * class.c (mono_class_is_assignable_from): Make this work if
10155         `oklass' is a generic instance; fixes #72831.
10156
10157 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
10158
10159         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
10160         with hasthis set.
10161         
10162         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
10163
10164         * marshal.c: Reorganize native->managed marshalling code to also use
10165         the emit_marshal_... functions.
10166
10167 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
10168
10169         * object.c: typed allocs have issues with bitmap sizes > 30,
10170         so check for max_set >= 30.
10171
10172 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
10173
10174         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
10175         managed code. Fixes #73012.
10176
10177         * metadata.h (MonoMarshalSpec): Add elem_mult field.
10178
10179         * metadata.c reflection.c: Load/Emit elem_mult as well.
10180         
10181         * metadata.h (MonoMarshalSpec): Add comment.
10182
10183         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
10184
10185         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
10186         num_elem to -1 if not given.
10187
10188         * object-internals.h (MonoReflectionMarshal): Add has_size field.
10189
10190         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
10191         given values.
10192
10193 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
10194
10195         * null-gc.c (mono_gc_free_fixed): Was not compilable.
10196
10197 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
10198
10199         * reflection.c (encode_marshal_blob): Encode param_num field as well.
10200
10201         * object-internals.h (MonoReflectionMarshal): Add param_num field.
10202
10203 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
10204
10205         * object.c: generalized the reference bitmap creation
10206         and added hooks for the new GC.
10207         * class-internals.c: removed the gc_bitmap field from MonoClass.
10208
10209 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10210
10211         * domain.c: help the compiler to produce better code
10212         in mono_jit_info_table_find ().
10213
10214 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
10215
10216         * object.c: make all allocations look typed.
10217
10218 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10219
10220         * socket-io.c: load Mono.Posix if it's not loaded already
10221         (fixes bug#73033).
10222
10223 2005-02-24  Martin Baulig  <martin@ximian.com>
10224
10225         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
10226         * reflection.c (dup_type): Likewise.
10227
10228 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
10229
10230         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
10231         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
10232
10233 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10234
10235         * domain.c, threads.c, object-internals.h: make the critical thread
10236         local vars use the fast access mode (even when we're compiled in
10237         a lib). Provide accessors to be used by the jit during codegen.
10238
10239 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
10240
10241         * appdomain.c: Changed hook functios behavior to include
10242         support for the reflection only assemblies. Some icalls were changed
10243         to support the mentioned assemblies too. Signatures of static methods
10244         try_assembly_resolve and real_load now have an additional parameter:
10245         refonly.
10246
10247         * assembly.c: General changes to mono_assembly_ methods to support
10248         reflection only api. Functions mono_assembly_open, mono_assembly_load,
10249         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
10250         suffix, to support an additional gbool parameter to specify whether
10251         the assembli is reflection only or not. Created some new hook functions 
10252         to add support for reflection only assemblies. Signatures of static 
10253         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
10254         have now an additional parameter: refonly.
10255
10256         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
10257         indicating whether the assembly is reflection only or not.
10258
10259         * exception.c: Add mono_get_exception_invalid_operation.
10260
10261         * icall.c: Throw an InvalidOperationException when trying to invoke
10262         a property/method/event, or trying to set/get the value of a field.
10263         Also add an icall to retrieve the ref_only flag to the
10264         MonoReflectionAssembly.
10265
10266 2005-02-23  Chris Toshok  <toshok@ximian.com>
10267
10268         Part of fix for #72827.
10269         * mono-debug.c (mono_debug_add_method): add lexical block data to
10270         the info we write.  Kind of a hack at the moment - we copy the
10271         lexical block info from the MonoDebugMethodInfo to the
10272         MonoDebugMethodJitInfo here, before writing it.
10273         (mono_debug_read_method): read the lexical block info.
10274
10275         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
10276
10277         * debug-mono-symfile.h: add lexical block support.
10278
10279         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
10280         support.
10281
10282 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10283
10284         * loader.c (mono_lookup_pinvoke_call): Fix warning.
10285
10286         * object.c (mono_runtime_free_method): Call mono_free_method () and
10287         put the TODOs there.
10288
10289         * loader.c (mono_free_method): Free up most memory allocated for 
10290         dynamic methods.
10291
10292 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10293
10294         * reflection.c: properly flag a Type argument to a
10295         named custom attr value (bug #72248).
10296
10297 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10298
10299         * reflection.c: reduce code duplication in named custom
10300         attribute encoding.
10301
10302 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
10303
10304         * reflection.c: properly encode custom attrs of type object
10305         (bug #72649).
10306
10307 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10308
10309         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
10310
10311 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
10312
10313         * socket-io.c: load System.dll if it's not loaded already
10314         (bug #72850 and #70477).
10315
10316 2005-02-21  Martin Baulig  <martin@ximian.com>
10317
10318         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
10319         generic instances.
10320
10321 2005-02-21  Martin Baulig  <martin@ximian.com>
10322
10323         * reflection.c (mono_image_build_metadata): We also need to
10324         "fixup" the MethodImpl table after we computed the final method
10325         indices.  Call fixup_methodimpl() to do that.
10326         (fixup_methodimpl): New private method.
10327
10328 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
10329
10330         * assembly.c: special case mscorlib.dll (bug#72536),
10331         patch from Carlos Alberto Cortez.
10332
10333 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10334
10335         * threads-types.h threads.c: Fix build bustage.
10336
10337         * threads.c: Use a union for long<->double conversions.
10338
10339         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
10340         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
10341
10342         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
10343         containing the checkpoint call with NOT_TAKEN.
10344         
10345         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
10346         checkpoint before pushing the arguments, so they won't have to be
10347         spilled to stack.
10348
10349 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10350
10351         * domain.c, assembly.c, domain-internals.h: make some data
10352         const and relocation-free.
10353
10354 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10355
10356         * object.c, appdomain.c, class-internals.h: introduce the
10357         MonoClassRuntimeInfo structure to hold the info needed to
10358         use a class at runtime. Made mono_class_vtable() lock-free
10359         for all the appdomains.
10360
10361 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
10362
10363         * metadata-internals.h, image.c: introduce a per-image mempool to
10364         be used for memory that has the same lifetime as the image.
10365
10366 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
10367
10368         * domain.c: In mono_init_internal(), instead of selecting the first
10369         runtime version supported by an executable, get a list of all
10370         supported versions and select the one for which an mscorlib exists
10371         (since even if the runtime supports a given version, it doesn't mean
10372         that the framework for that version is installed).
10373         Modified get_runtimes_from_exe to support this behavior.
10374         In supported_runtimes, added information about additional system
10375         assembly versions.
10376         
10377         * assembly.c: Added support for more than one system assembly version
10378         per runtime version. Updated the assembly list.
10379         In mono_assembly_remap_version, removed the initial version check,
10380         since we don't know to which version we need to compare until we
10381         get the version set on which the assembly is based.
10382         Moved the code for loading corlib into the new method
10383         mono_assembly_load_corlib(), so it can be used by the initialization
10384         code.
10385         
10386         * domain-internals.h: Updated data structures and added declaration
10387         for mono_assembly_load_corlib.
10388
10389 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10390
10391         * reflection.c (resolve_object): Fix the creation of the signature in 
10392         the SignatureHelper case.
10393
10394         * assembly.c (mono_assembly_remap_version): Fix binary search.
10395         
10396 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
10397  
10398         * class.c: Added inheritance check when a method is overloaded (from a
10399         virtual method or when implementing an interface) and when a class is
10400         inherited. Added functions to set a failure for a class and to 
10401         retreive the exception from a failure.
10402         * class-internals.h: Added fields to MonoClass to keep the exception
10403         information status for inheritance (or other exceptions) to be thrown
10404         later (i.e. not at load time).
10405         * object.c: Throw the inheritance SecurityException when a type is to 
10406         be created with either class or method inheritance violations.
10407         * reflection.c|h: Fix when getting declsec from a class. Removed 
10408         unrequired code for class. Improved sanity in parameter naming.
10409         * security-manager.c|h: Added functions to check for class and method
10410         inheritance.
10411
10412 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10413
10414         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
10415         and has_finalize in dynamic types as well.
10416
10417 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
10418
10419         * culture-info-table.h : fixed currency format for en-GB (and so on).
10420
10421 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
10422
10423         * gc.c: ensure the GC handles never have 0 as a value.
10424
10425 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
10426
10427         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
10428         a pointer to a struct to unmanaged code. Fixes #72625.
10429
10430 2005-02-16  Martin Baulig  <martin@ximian.com>
10431
10432         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
10433
10434 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
10435
10436         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
10437
10438 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
10439
10440         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
10441
10442         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
10443         UnmanagedFunctionPointerAttribute, use it for determining calling convention
10444         etc. Fixes #71471.
10445
10446         * reflection.c (mono_custom_attrs_get_attr): New helper function.
10447
10448         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
10449
10450 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
10451
10452         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
10453         changes to make the current context a field in MonoThread.
10454
10455 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
10456
10457         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
10458         the last change.
10459         
10460         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
10461         extracted from mono_marshal_get_native_wrapper.
10462
10463         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
10464         to create wrappers around native functions.
10465
10466         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
10467         delegates for arbitrary function pointers. Fixes #71472.
10468
10469 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10470
10471         * threads.c: cleaned up the code a little.
10472
10473 2005-02-15  Martin Baulig  <martin@ximian.com>
10474
10475         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
10476         the data table.
10477
10478         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
10479         allocate larger chunks if needed.
10480
10481 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10482
10483         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
10484         in by mistake.
10485
10486 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
10487
10488         * domain.c: keep the domains in an array and ensure the domain ids
10489         are kept small, so they can be used as indexes to domain-specific data
10490         with a small memory overhead.
10491
10492 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10493
10494         * icall.c: Handle byref types in Type icalls. Fixes #72544.
10495
10496 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
10497
10498         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
10499
10500 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10501
10502         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
10503
10504         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
10505         values.
10506
10507         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
10508         
10509 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10510
10511         * domain-internals.h: add the hashtable here.
10512
10513         * class-internals.h: Remove `info' from MonoMethod
10514
10515         * domain.c: Add a new hashtable, jit_trampoline_hash
10516
10517 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10518
10519         * object.c: don't set the value of static fields
10520         (fixes bug#72494).
10521
10522 2005-02-11  Martin Baulig  <martin@ximian.com>
10523
10524         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
10525         (mono_debug_add_method): Silently ignore the method if it's too big.
10526         (mono_debug_add_type): Likewise.
10527
10528 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
10529
10530         * threads.c, appdomain.c: remove #ifdefs from the code.
10531
10532 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10533
10534         * metadata-internals.h: Added flags to MonoAssembly to cache the most
10535         common security informations. This allows us to stay in unmanaged code
10536         when doing LinkDemand and it's special cases (except for the first 
10537         time for initialization). The flags a very much used with --security.
10538         * reflection.c|h: Added code to get declarative security attributes 
10539         for LinkDemand and InheritanceDemand. This required to refactor the
10540         existing code for Demand.
10541         * security-manager.c|h: Added new method fields for the special cases
10542         of LinkDemand.
10543
10544 2005-02-10  Martin Baulig  <martin@ximian.com>
10545
10546         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
10547         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
10548
10549 2005-02-10  Martin Baulig  <martin@ximian.com>
10550
10551         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
10552         debugging code; this is almost a complete rewrite.
10553
10554         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
10555
10556 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10557
10558         * domain.c, object.h: expose mono_string_equal () and 
10559         mono_string_hash ().
10560         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
10561         it's implemented in managed code.
10562
10563 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10564
10565         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
10566         lo leak objects between appdomains.
10567
10568 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10569
10570         * assembly.c: old compilers compilation fix from 
10571         robertj@gmx.net (Robert Jordan).
10572
10573 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
10574
10575         * class-internals.h: Little reminder for the future.
10576
10577         * debug-helpers.c: Fix up wrapper_type_names
10578
10579 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10580
10581         * image.c, metadata-internals.h: when loading an image from a file,
10582         mmap all of it and use the same codepaths as when using a
10583         in-memory image: the code is simpler and we use less memory
10584         (both writable and readonly).
10585
10586 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10587
10588         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
10589         API to alloc runtime data structures that need to be tracked by the
10590         GC and contain pointers.
10591         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
10592         make the code more readable and eventually use a different GC.
10593
10594 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
10595
10596         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
10597         for out arguments.
10598         
10599 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
10600
10601         * object.c: In release_type_locks(), don't release the cctor lock
10602         if it has already been released. This fixes a crash in the
10603         thread5 test.
10604
10605 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10606
10607         * gc.c, marshal.c, icall.c: register a delegate for finalization
10608         only when the native function pointer has been allocated for it.
10609
10610 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10611
10612         * object.c: cleaned up some code, allocate objects that are
10613         pointer free with the atomic malloc variant. Allocate memory
10614         for static data from the mempool if it's pointer-free.
10615         Allocate the bounds array at the end of the array data, when needed.
10616         * object-internals.h, object.h: move a private function in a private
10617         header.
10618         * class.c: handle missing case in tracking references in fields.
10619
10620 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10621
10622         * class.c, class-internals.h: keep track if a type has
10623         reference fields in either the instance or static fields.
10624
10625 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
10626
10627         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
10628         and renamed to MonoRuntimeInfo. Added fields to store the expected
10629         framework assembly version. Changed mono_get_framework_version and
10630         mono_get_runtime_version for a single mono_get_runtime_info method.
10631         
10632         * assembly.c: Added method to remap system assembly versions to the
10633         current executing runtime version. Removed old mapping code.
10634         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
10635         
10636         * icall.c, reflection.c: Track api changes.
10637
10638 2005-02-06  Miguel de Icaza  <miguel@novell.com>
10639
10640         * loader.c (method_from_memberref): Improve error reporting,
10641         produce the class name instead of the typeref/typedef index. 
10642
10643 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
10644
10645         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
10646
10647 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10648
10649         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
10650         stdcall and charset name mangling.  Reorganize the code and add
10651         some tracing stuff.
10652
10653 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
10654
10655         * monodiet.c: More iters!
10656
10657         * marshal.c: Iter usage.
10658
10659         * icall.c: Iter usage.
10660
10661         * object.c: Use iters.
10662
10663         * debug-helpers.c: More iters
10664
10665 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10666
10667         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
10668         under win32.
10669
10670 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
10671
10672         * mono-debug-debugger.c: use iters
10673
10674         * class.c, class-internals.h: mono_class_setup_events is static
10675         now
10676
10677         * All callers: use iters
10678
10679 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10680
10681         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
10682         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10683
10684 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10685
10686         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
10687
10688         * marshal.h: Add prototypes for ldfld/stfld_remote.
10689
10690         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
10691         this is called during startup.
10692         
10693 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10694
10695         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
10696         MonoThreadsSync struct private in monitor.c. Changed the way
10697         MonoThreadsSync is allocated so it's faster and there is no
10698         need to keep track of it with a finalizer and it uses less memory.
10699         This also finally allows us to allocate mono objects as ptrfree when
10700         there are no reference fields.
10701
10702 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
10703
10704         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
10705         disappearing link to the GC interface and use them to simplify
10706         the gchandles code.
10707
10708 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10709
10710         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
10711         stfld_remote which call mono_load/store_field_new. This allows methods
10712         calling ldfld/stfld wrappers to be AOTed.
10713
10714         * console-io.c: Include sys/filio.h under solaris.
10715         
10716         * console-io.c: Include curses.h if needed correctly.
10717
10718 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10719         
10720         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
10721         method->klass as well.
10722
10723         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
10724
10725         * class.c (mono_class_init): Switch on lazy initialization of 
10726         methods.
10727
10728         * class.c (mono_class_get_finalizer): Handle the case when the 
10729         finalizer is inherited.
10730
10731 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10732
10733         * console-io.c: <curses.h> is needed by term.h on solaris.
10734
10735 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
10736
10737         * icall.c, class-internals.h, monodiet.c, class.c: Remove
10738         mono_class_setup_properties where possible. Remove this ftn from
10739         the header file, and make it static.
10740
10741 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10742
10743         * loader.c: Add missing setup_... call.
10744
10745         * class.c: Add missing setup_... calls.
10746
10747         * class.c (mono_class_init): Switch on lazy initialization of 
10748         the generic vtable.
10749         
10750         * class.c (mono_class_init): Fix generics broken by the recent changes.
10751
10752         * monodiet.c (handle_type): Add missing setup_... calls.
10753
10754         * class.c: Back out garbage in previous patch.
10755         
10756         * class.c: Add missing setup_... calls.
10757
10758         * class.c (mono_class_get_method_from_name_flags): Avoid calling
10759         mono_class_setup_methods () if possible.
10760
10761         * class-internals.h (MonoClass): Add 'has_cctor' flag.
10762
10763         * class-internals.h (MonoCachedClassInfo): New structure.
10764
10765         * class.c: Initialize properties and events fields of MonoClass lazily.
10766
10767         * class.c: Add infrastructure for lazily initializing the methods and
10768         vtable fields of MonoClass. Not yet used.
10769
10770         * class.c (mono_class_get_finalizer): New helper function.
10771
10772         * class.c: Add infrastructure for loading some class related data from
10773         an AOT file.
10774
10775         * object.c: Add infrastructure for initializing the vtable from data
10776         in the AOT file.
10777
10778         * gc.c (run_finalize): Use mono_class_get_finalizer ().
10779
10780         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
10781         appropriate initialization function before accessing parts of the
10782         MonoClass structure.
10783
10784         * marshal.c: Fix warnings.
10785         
10786         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
10787
10788         * mono-debug-debugger.c (get_exception_message): Use 
10789         mono_class_get_method_from_name_flags ().
10790
10791 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
10792
10793         * reflection.c, appdomain.c: Replace a few manual searches that
10794         Zoltan missed. (Paolo approved this part of my initial patch).
10795
10796 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
10797
10798         * profiler.c: disable recording statistical events at report time.
10799
10800 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10801
10802         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
10803         to byteswap arrays of enum values, too (bug #72080).
10804
10805 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10806
10807         * appdomain.c (set_domain_search_path): Allow this to be called if
10808         domain->setup is not yet set.
10809
10810         * loader.c (mono_method_get_index): New helper function.
10811
10812         * loader.c reflection.c: Use mono_method_get_index ().
10813
10814         * class.c (mono_class_get_method_from_name_flags): New helper method.
10815
10816         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
10817         this.
10818
10819         * class.c (mono_class_get_cctor): New helper method.
10820
10821         * string-icalls.c object.c class.c marshal.c reflection.c: Use
10822         mono_class_get_method () to look up methods.
10823
10824 2005-02-01  Miguel de Icaza  <miguel@novell.com>
10825
10826         * console-io.c: Fix the build, this should work on Windows.
10827
10828 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
10829
10830         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
10831         be set to null to keep things valid
10832
10833 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10834
10835         * icall.c: added Console 2.0 icalls.
10836         * Makefile.am: added console-io.[ch]
10837         * console-io.[ch]: internal calls for Console 2.0 API.
10838
10839 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10840
10841         * class.c: make sure we consider all the interfaces
10842         when calculating max_interface_id (bug found by
10843         Jeroen Frijters running ikvm).
10844
10845 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10846
10847         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
10848         valuetype fields to null.
10849
10850         * object.c (set_value): Ditto. Fixes #71669.    
10851
10852 2005-01-31  Martin Baulig  <martin@ximian.com>
10853
10854         * metadata.c (mono_metadata_has_generic_params): New public
10855         function; checks whether something is a generic method.
10856
10857 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10858
10859         * appdomain.c: fix infinite recursion when adding assemblies.
10860
10861 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
10862
10863         * object.c: Fix small typo to return all items for Environment.
10864         GetCommandLineArgs.
10865
10866 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10867
10868         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
10869         reflection.c: more domain and assembly-unload related fixes
10870         and memory leaks plugs.
10871
10872 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10873
10874         * 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.
10875
10876 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10877
10878         * loader.c (mono_method_signature): Make this method lazy
10879         (mono_get_method_from_token): Don't computate the signature here.
10880
10881         Doing this saves quite a bit of memory. I got 90 kb on starting up
10882         monodoc. It should also save some disk reads on startup.
10883
10884         * *: MonoMethod->signature might be NULL now. You *MUST* use
10885         mono_method_signature.
10886
10887 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
10888
10889         * object.c (mono_runtime_get_main_args): Return an array from the
10890         current domain here. Fixes #71938.
10891
10892 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10893
10894         * monitor.c: formatting changes to comply with the
10895         mono coding style and remove #ifdefs from the code.
10896
10897 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10898
10899         * metadata.c, private.h: remove some unneeded data
10900         and use a more compact representation for table schemas.
10901
10902 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10903
10904         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
10905         to get a better distribution in hash tables.
10906         * *.c: use mono_aligned_addr_hash() where appropriate.
10907         * assembly.c: make var static.
10908
10909 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10910
10911         * domain-internals.h: Put MonoJitInfo on a diet.
10912
10913         * domain.c: Fix a warning.
10914
10915 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10916
10917         * gc.c: rework the gc handles code to reuse handles
10918         when freed.
10919
10920 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10921
10922         * domain.c: fixed long standing bug in mono_string_equal() which
10923         was brought to light with the ldstr changes.
10924
10925 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10926
10927         * reflection.c: Remove warning by adding missing include for marshal.h
10928
10929 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10930
10931         * domain.c, object.c: change the ldstr_table to hold
10932         MonoString* as keys: makes the runtime isinterned lookup
10933         faster and simplifies memory management.
10934
10935 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
10936  
10937         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
10938         possible to add imperative security checks before calling the icall.
10939         * reflection.c: Return security attributes on the original MonoMethod
10940         (and not the wrapped one). This fix permissions on icalls.
10941
10942 2005-01-25  Dick Porter  <dick@ximian.com>
10943
10944         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
10945         the check for mktime() support actually test the mktime() return
10946         value.  "Fixes" bug 71682, though the output is still different to
10947         MS.
10948
10949 2005-01-25  Martin Baulig  <martin@ximian.com>
10950
10951         * class.c (mono_class_is_assignable_from): Make this work for
10952         generic instances.
10953
10954 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
10955
10956         * marshal.c (mono_string_utf8_to_builder)
10957         (mono_string_builder_to_utf16): We might not have ownership of the
10958         string. In thise case, we need to create a new buffer.
10959
10960         * object-internals.h (mono_stringbuilder_capacity): sb->str might
10961         be null, in which case, use the default capacity.
10962
10963 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10964
10965         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
10966         GC events to the profiler.
10967
10968 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10969
10970         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
10971         if you don't want the GC to run.
10972
10973 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
10974
10975         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
10976         start providing a GC API and keeping different implementations in
10977         their own file.
10978         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
10979
10980 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10981
10982         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
10983         mmap rather than allocating a huge buffer.
10984         (mono_debug_close_mono_symbol_file): Free the buffer allocated
10985         above.
10986
10987 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10988
10989         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
10990         and CheckExecutionRights.
10991         * reflection.c|h: Keep the index of the declarative security to be 
10992         used, instead of the pointer, when AOT compiler is used. Also add 
10993         class initialization when requesting demands.
10994         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
10995         CheckExecutionRights. Both properties are now FALSE by default, and
10996         unmodifiable, unless the --security option is used.
10997
10998 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10999
11000         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
11001         reflection.c: properly refcount images and assemblies, many leaks fixed.
11002
11003 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11004
11005         * threadpool.c: increase the timeout for threads in the thread pool to
11006         10s.  Fixes bug #67159.
11007
11008 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
11009
11010         * class-internals.h: Sun's compiler insists on explicit
11011         signed on bit fields to handle then correctly.
11012
11013 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
11014
11015         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
11016         Make the size of the array fit only the number of invalid path
11017         chars that we have.
11018
11019         * class.c (_mono_class_get): Improve the error reporting when a
11020         class referenced is not found, to assist debugging. 
11021
11022 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
11023
11024         * threads.c: fix off-by-one error.
11025         * domain.c: free data allocated in the domain.
11026
11027 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
11028
11029         * reflection.c (mono_method_body_get_object): Fill out exception info
11030         as well.
11031
11032         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
11033         structure.
11034         
11035 2005-01-19  Martin Baulig  <martin@ximian.com>
11036
11037         * loader.c (mono_get_method_constrained): Make this work again.
11038
11039 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
11040
11041         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
11042         guint16 to match the managed side.
11043
11044         * reflection.c (mono_reflection_body_get_object): Fill out local
11045         variables array.
11046
11047         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
11048         as well.
11049
11050         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
11051         'local_var_sig_token'.
11052
11053 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11054
11055         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
11056         System.Drawing.
11057
11058         * reflection.c (mono_method_body_get_object): Handle abstract and
11059         runtime methods.
11060
11061 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
11062
11063         * marshal.c, loader.c, class-internals.h, reflection.c:
11064         store the emthod data for a wrapper in an array instead of a list.
11065
11066 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
11067
11068         * marshal.c: change the code to allocate memory more
11069         conservatively for method wrappers.
11070
11071 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11072
11073         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
11074         fields from MonoClass to the marshal info structure where they belong.
11075
11076 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
11077
11078         * class.c, object.c, class-internals.h, marshal.c: rearrange
11079         some fields and tweak some types to lower memory usage.
11080
11081 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11082
11083         * threads.c (signal_thread_state_change): Handle the case when the
11084         target thread is the current thread.
11085
11086         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
11087
11088         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
11089         emit_ptr_to_object_conv. 
11090
11091         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
11092         marshalling. Fixes #71352.
11093
11094 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11095
11096         * metadata.h, blob.h: move table enum to blob.h so it can be included
11097         in any header.
11098         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
11099         cut the size of MonoImage/MonoDynamicImage.
11100
11101 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
11102
11103         * profiler.c (mono_profiler_install_simple): Fix default arguments.
11104
11105 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
11106
11107         * reflection.c, reflection.h, icall.c: add a function to check
11108         if an attribute type is defined for a metadata object.
11109
11110 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
11111
11112         * object-internals.h: Added some needed fields from StringBuilder class.
11113         * marshal.c: Set the maxCapacity when creating a StringBuilder.
11114
11115 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
11116
11117         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
11118         threads before shutting down the runtime.
11119
11120         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
11121
11122 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11123
11124         * object-internal.h, threads.c: implement stacksize and 
11125         parameterized thread start functionality (requires
11126         matching corlib). Marked broken code for later removal.
11127
11128 2005-01-12  Martin Baulig  <martin@ximian.com>
11129
11130         * class-internals.h (MonoGenericClass): Moved the `initialized'
11131         flag to MonoDynamicGenericClass, removed `init_pending'.
11132         (MonoGenericInst): Added `is_reference' flag.
11133
11134 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
11135
11136         * reflection.c (mono_image_create_pefile): Only set the pe_offset
11137         inside the MSDOS header. Fixes #71201.
11138
11139         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
11140         gc thread.
11141         (mono_domain_finalize): Ditto.
11142
11143 2005-01-12  Martin Baulig  <martin@ximian.com>
11144
11145         * class.c (mono_get_shared_generic_class): Use the cache for
11146         non-dynamic generic classes.
11147
11148         * class-internals.h (mono_class_create_generic_2): Removed
11149         function prototype, this function is now static inside class.c.
11150
11151         * class.c (mono_class_create_generic_2): Made this static, only
11152         call it from mono_class_init() and mono_class_setup_parent().
11153         (collect_implemented_interfaces_aux): Call mono_class_init() on
11154         the interfaces we collect.
11155         (mono_class_setup_vtable): Call mono_class_init (class->parent).
11156
11157 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11158
11159         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
11160         it a real thread handle.
11161
11162         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
11163         MonoJitExceptionInfo, since each catch clause needs its own variable.
11164         
11165 2005-01-11  Dick Porter  <dick@ximian.com>
11166
11167         * image.c (mono_pe_file_open): New variant on mono_image_open()
11168         that does not set up the CLI metadata; used for FileVersionInfo so
11169         it can get the data for windows binaries too.
11170         
11171         * process.c (process_read_string_block): Don't read off the end of
11172         the StringTable block.
11173
11174         These both fix bug 70766.
11175
11176 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
11177
11178         * gc.c: set some fields to NULL at GC cleanup time.
11179         * threads.c: if we quit the main thread, call exit ().
11180
11181 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11182
11183         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
11184
11185 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
11186
11187         * threads.h, threads.c, object.c: added accessor and settor for
11188         main_thread. Handle it specially when exiting from it: wait
11189         for other foreground threads to exit.
11190
11191 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11192
11193         * process.c, verify.c: remove some bloat.
11194
11195 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11196
11197         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
11198         the calling convention to cdecl under win32.
11199
11200 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
11201
11202         * object.c (mono_object_get_size): New function to get the size of
11203         an object instance.
11204
11205         * profiler.c (simple_allocation): Use above.
11206
11207 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
11208
11209         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
11210         ves_icall_System_AppDomain_getRootDomain (as it's not required to
11211         get an appdomain by it's id and we can't assume the root's id is 0).
11212         * domain-internals.h: Change the function prototype to match.
11213         * icall.c: Change the icall table for AppDomain.
11214
11215 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
11216
11217         * locales.c (string_invariant_compare_char): Only compute
11218         GUnicodeTypes in the case where we need them.  Test for ordinality
11219         first and return if so.
11220
11221         From the commit:
11222
11223                 /*
11224                  * FIXME: here we must use the information from c1type and c2type
11225                  * to find out the proper collation, even on the InvariantCulture, the
11226                  * sorting is not done by computing the unicode values, but their
11227                  * actual sort order.
11228                  */
11229
11230 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11231
11232         * loader.c: for P/Invoke methods, allow the "Internal" shared
11233         library name to refer to the calling process symbol namespace.
11234
11235 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11236
11237         * Makefile.am: Add the security manager to the build.
11238         * security-manager.c|h: New. Initialization of the security manager.
11239
11240 2005-01-07  Dick Porter  <dick@ximian.com>
11241
11242         * threads.c: 
11243         * monitor.c: Update thread state during Monitor and WaitHandle
11244         waits.  Fixes bug 71031.
11245
11246 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11247
11248         * reflection.c (property_encode_signature): Correctly handle when the
11249         property has no methods.
11250
11251 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11252
11253         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
11254         
11255         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
11256         fields from mb, not rmb. Fixes #71017.
11257
11258         * marshal.c (emit_ptr_to_str_conv): Add support for 
11259         ByValTStr -> string conversion. Fixes #71015.
11260
11261         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
11262
11263         * mempool.c (mono_mempool_contains_addr): New helper function.
11264
11265 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11266
11267         * metadata.c (mono_metadata_compute_size): Fix size calculation of
11268         HasSematics encoded fields.
11269         
11270         * metadata.c (mono_type_to_unmanaged): Improve error message for 
11271         invalid string marshalling.
11272
11273         * metadata.c: Fix warnings.
11274         
11275 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11276
11277         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
11278         profiler support.
11279
11280 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11281
11282         * domain.c object.c domain-internals.h: Revert part of r38077 since the
11283         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
11284         tests.
11285
11286 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11287
11288         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
11289         so methods containing these can be AOTed.
11290
11291 2005-01-03  Martin Baulig  <martin@ximian.com>
11292
11293         * loader.c (find_method): Removed the hack for generic instances.
11294         (method_from_memberref): If our parent is a generic instance, pass
11295         its generic type definition to find_method() and then inflate the
11296         method.
11297         (mono_get_method_constrained): Pass the generic type definition to
11298         find_method() and inflate the method later.
11299
11300         * class-internals.h (MonoStats): Added `generic_class_count'.
11301
11302         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
11303         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
11304
11305         * reflection.c (mono_custom_attrs_from_params): Don't ignore
11306         generic type definitions.
11307
11308 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11309
11310         * loader.c icall.c: Fix warnings.
11311
11312 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
11313
11314         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
11315         blittable types. Fixes #70864.
11316
11317 2004-12-29  Martin Baulig  <martin@ximian.com>
11318
11319         * icall.c
11320         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
11321
11322         * reflection.c (mono_method_get_object): Create a
11323         "System.Reflection.MonoGenericMethod" for inflated methods; don't
11324         call mono_get_inflated_method().
11325
11326         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
11327
11328 2004-12-27  Martin Baulig  <martin@ximian.com>
11329
11330         * class-internals.h (MonoMethod): Added `is_inflated' flag.
11331         (MonoMethodInflated): Added `inflated' field.
11332
11333         * class.c (mono_class_inflate_generic_method): Don't really
11334         inflate the method here; just set the `is_inflated' flag in the
11335         MonoMethod.
11336         (mono_class_get_inflated_method): Actually inflate the method here
11337         if it's not already inflated; we use the MonoMethodInflated's new
11338         `inflated' field as a cache.
11339
11340 2004-12-26  Martin Baulig  <martin@ximian.com>
11341
11342         * class.c
11343         (inflate_generic_class): Moved some code out of inflate_generic_type().
11344         (mono_class_inflate_generic_method): If we're already inflated,
11345         inflate the context and use the declaring method; ie. make sure
11346         the declaring method of an inflated method is always the generic
11347         method definition.
11348         (mono_class_create_from_typedef): Create
11349         `class->generic_container->context->gclass'.
11350
11351 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11352
11353         * metadata-internals.h, marshal.c, reflection.c: More
11354         MonoGHashTable->GHashTable.
11355
11356         * domain-internals.h, class.c: Change MonoGHashTable's into
11357         GHashTables for some cases where no gc stuff is used
11358
11359         All users: update apis
11360
11361 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
11362
11363         * metadata.c (builtin_types): Make this `const'. Makes this get
11364         put into the shareable section.
11365         (mono_metadata_init): Casts to make gcc happy.
11366
11367 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
11368
11369         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
11370
11371 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
11372
11373         * icall.c: Added an internal call to retrieve the position and length
11374         of assembly-level declarative security attributes (RequestMinimum, 
11375         RequestOptional and RequestRefuse). This is used by the Assembly class
11376         to re-create the corresponding permission sets.
11377
11378 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11379
11380         * marshal.c: fix the stelemref wrapper to be type correct
11381         (and faster).
11382
11383 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11384
11385         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
11386         to do key & 0x7fffffff. Hashtable already does this. It just
11387         results in longer code.
11388
11389 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11390
11391         * appdomain.c: Bump corlib version.
11392         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
11393         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
11394         * reflection.c|h: Add functions to get declarative security infos
11395         (blob position and length) for assemblies, classes and methods.
11396
11397 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
11398
11399         * reflection.c: sort the constant table (bug #70693).
11400
11401 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
11402
11403         * object-internals.h, threads.c, domain.c: add accessors for
11404         the MonoThread and MonoDomain tls keys.
11405
11406 2004-12-18  Martin Baulig  <martin@ximian.com>
11407
11408         * class.c (inflate_generic_type): If we're inflating a generic
11409         instance, set `ngclass->context->container = context->container';
11410         ie. the container we inflated into.
11411
11412         * metadata.c (mono_metadata_parse_generic_param): Reflect above
11413         inflate_generic_type() changes.
11414
11415 2004-12-17  Martin Baulig  <martin@ximian.com>
11416
11417         * class-internals.h
11418         (MonoGenericClass): Replaced `MonoType *generic_type' with
11419         `MonoClass *generic_class'.  Removed `dynamic_info'; if
11420         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
11421         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
11422
11423 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11424
11425         * exception.c (mono_exception_from_token): New helper function.
11426
11427 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11428
11429         * assembly.c (mono_assembly_load_with_partial_name): Call 
11430         mono_assembly_loaded before invoking the preload hooks. Fixes
11431         #70564.
11432
11433         * object-internals.h (MonoThread): Change culture_info and 
11434         ui_culture_info into an array.
11435
11436         * threads.c: Cache culture info objects from more than one appdomain.
11437
11438         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
11439         current UI culture.
11440
11441 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11442
11443         * threads.h threads.c appdomain.c: Clear the culture_info field of
11444         all threads during unloading if they point to an object in the dying
11445         appdomain.
11446
11447 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
11448
11449         * culture-info.h (TextInfoEntry): New struct
11450         * object-internals.h: sync with managed
11451         * locales.c: fill the `text_info_data' field
11452         * culture-info-tables.h: update
11453
11454 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11455
11456         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
11457         collector.
11458
11459 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
11460
11461         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
11462         (ves_icall_ModuleBuilder_getMethodToken): Ditto
11463
11464 2004-12-12  Martin Baulig  <martin@ximian.com>
11465
11466         * mono-debug-debugger.c (write_type): If we're an enum and the
11467         builtin types have already been initialized, call mono_class_init().
11468
11469 2004-12-11  Martin Baulig  <martin@ximian.com>
11470
11471         * metadata.c (mono_metadata_load_generic_params): Added
11472         `MonoGenericContainer *parent_container' argument; automatically
11473         compute `container->is_method'; pass the correct owner to
11474         get_constraints().      
11475
11476         * reflection.c (compare_genericparam): Sort the GenericParam table
11477         according to increasing owners. 
11478
11479 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11480
11481         * profiler.c: allow disabling the default profiler.
11482
11483 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
11484
11485         * decimal.c, icall.c: allow disabling System.Decimal support.
11486
11487 2004-12-09  Marek Safar <marek.safar@seznam.cz>
11488
11489         * reflection.c: Add support for null attribute arguments.
11490
11491 2004-12-09  Martin Baulig  <martin@ximian.com>
11492
11493         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
11494         names to get rid of compiler warnings.
11495
11496 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11497
11498         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
11499         mono_marshal_load_type_info (). Fixes #69625.
11500         (mono_marshal_get_ptr_to_struct): Likewise.
11501
11502 2004-12-08  Martin Baulig  <martin@ximian.com>
11503
11504         * mono-debug.h: Bumped version number to 47.
11505
11506         * mono-debug-debugger.c
11507         (mono_debugger_event_handler, mono_debugger_event): Take two
11508         guint64 arguments insteed of a gpointer and a guint32.  
11509
11510 2004-12-08  Martin Baulig  <martin@ximian.com>
11511
11512         * debug-mono-symfile.h
11513         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
11514         `address' to `native_offset'.
11515
11516 2004-12-08  Martin Baulig  <martin@ximian.com>
11517
11518         * class.c (mono_class_create_from_typespec): Only inflate if we
11519         either have `context->gclass' or `context->gmethod'.
11520
11521 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11522
11523         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
11524
11525         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
11526
11527         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
11528
11529         * reflection.c (mono_assembly_get_object): Remove the workaround put
11530         in for the release.
11531         
11532         * appdomain.c: Use the corlib_internal field from MonoAssembly.
11533
11534         * appdomain.c: Bump corlib version.
11535
11536         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
11537         be visible in other appdomains.
11538
11539 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
11540
11541         * threads.c: Interlocked inc and dec for longs were messed up,
11542         use a KISS based impl for this. Fixes 70234
11543
11544 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11545
11546         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
11547
11548 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11549
11550         * icall.c: fix to follow policy not to allow struct
11551         arguments in icalls.
11552
11553 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11554
11555         * process.c: make the patch that handles spaces in file paths work
11556         on mono/windows too.
11557
11558 2004-12-06  Martin Baulig  <martin@ximian.com>
11559
11560         * class.c (mono_class_create_generic): Call
11561         mono_class_setup_supertypes() if we're dynamic.
11562         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
11563
11564 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11565
11566         * object-internals.h: Add new fields to MonoThread.
11567
11568         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11569
11570         * icall.c threads-types.h threads.c: Add new icalls.
11571
11572         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
11573
11574         * object-internals.h (MonoReflectionAssembly): Sync object layout with
11575         managed side.
11576
11577         * appdomain.c: Bump corlib version.
11578
11579         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
11580         internal assemblies. Fixes #69181.
11581
11582 2004-12-05  Martin Baulig  <martin@ximian.com>
11583
11584         * class.c (mono_class_inflate_generic_signature): Make this a
11585         no-op if `context' is NULL or we don't have any type parameters;
11586         also copy `sentinelpos'.        
11587
11588 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
11589
11590         * image.c: Add unbox_wrapper_cache.
11591
11592         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
11593
11594         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
11595         function generator.
11596         
11597         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
11598         Fixes #70173.
11599
11600         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
11601         
11602 2004-12-04  Martin Baulig  <martin@ximian.com>
11603
11604         * loader.c (mono_method_get_signature_full): New public function;
11605         like mono_method_get_signature(), but with an additional
11606         `MonoGenericContext *' argument.
11607
11608         * class.c (mono_class_inflate_generic_signature): Formerly known
11609         as inflate_generic_signature(); make this public.
11610
11611 2004-12-04  Martin Baulig  <martin@ximian.com>
11612
11613         * metadata.c
11614         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
11615         instead of a `MonoGenericContainer *'.  
11616         (mono_metadata_parse_array_full): Likewise.
11617         (mono_metadata_parse_signature_full): Likewise.
11618         (mono_metadata_parse_method_signature_full): Likewise.
11619         (mono_metadata_parse_generic_inst): Likewise.
11620         (mono_metadata_parse_generic_param): Likewise.
11621         (mono_metadata_parse_mh_full): Likewise.
11622         (mono_type_create_from_typespec_full): Likewise.
11623
11624 2004-12-03  Martin Baulig  <martin@ximian.com>
11625
11626         * class-internals.h (MonoGenericContainer): Replaced the
11627         `MonoGenericContext * pointer with a `MonoGenericContext'
11628         structure and made it the first element.
11629
11630 2004-12-03  Martin Baulig  <martin@ximian.com>
11631
11632         * class.c
11633         (inflate_generic_type): Set the `context->container' when creating
11634         a new MonoGenericContext.
11635         (mono_class_inflate_generic_method): Likewise.
11636         (mono_class_create_from_typespec): Just use `context->container'
11637         to get the container.
11638
11639         * loader.c (method_from_methodspec): Set `context->parent' from
11640         `context->container' - and if that's a method container, use its
11641         parent.  Also set the `context->container' when creating a new
11642         MonoGenericContext.
11643         (mono_get_method_from_token): Use just `context->container' to get
11644         the container.
11645
11646         * metadata.c (do_mono_metadata_parse_generic_class): Also set
11647         `gclass->context->container'.
11648
11649         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
11650         the `context->container' when creating a new MonoGenericContext.
11651
11652 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
11653
11654         * reflection.c (compare_genericparam): Sort params with identical
11655         owner by their number. Fixes gen-111 on sparc.
11656
11657 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11658
11659         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
11660         around the domain changes.
11661
11662         * appdomain.c (mono_domain_unload): Handle the case when the thread
11663         calling Unload is itself being aborted during unloading. Fixes #70022.
11664
11665         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
11666
11667         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
11668         checkpoint_func as an icall so it gets a wrapper.
11669         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
11670         in the cross-appdomain wrappers too.
11671
11672         * threads.c (mono_thread_has_appdomain_ref): Make this public.
11673
11674         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
11675
11676         * reflection.c: Fix some memory leaks.
11677         
11678 2004-12-02  Martin Baulig  <martin@ximian.com>
11679
11680         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
11681
11682         * metadata.c (generic_class_cache): New static hashtable.
11683         (mono_metadata_lookup_generic_class): New public method.
11684
11685 2004-12-02  Martin Baulig  <martin@ximian.com>
11686
11687         * class.c (mono_class_create_from_typedef): Call
11688         mono_class_setup_parent() and mono_class_create_mono_type() before
11689         parsing the interfaces.
11690
11691 2004-12-02  Martin Baulig  <martin@ximian.com>
11692
11693         * metadata.c (generic_inst_cache): New static hashtable.
11694         (mono_metadata_lookup_generic_inst): New public function.
11695         (mono_metadata_inflate_generic_inst): New public function.
11696         (mono_metadata_parse_generic_inst): New public function.
11697         (do_mono_metadata_parse_generic_class): Use the new
11698         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
11699         since this'll also use the cache.
11700
11701         * reflection.c (mono_reflection_bind_generic_method_parameters):
11702         Use mono_metadata_lookup_generic_inst() to use the new cache.
11703
11704         * class.c (inflate_mono_type): Use
11705         mono_metadata_inflate_generic_inst() to inflate a generic
11706         instance; this'll also use the new cache.
11707
11708         * loader.c (method_from_methodspec): Use
11709         mono_metadata_parse_generic_inst() and
11710         mono_metadata_inflate_generic_inst() rather than parsing it
11711         manually, so we can use the new cache.
11712
11713 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11714
11715         * threads.c (wait_for_tids): Do not incorrectly free threads when 
11716         the wait times out.
11717
11718 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11719
11720         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
11721         iter->args based on whether parameters are passed in registers (i.e.
11722         MONO_ARCH_REGPARMS is defined)
11723
11724 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
11725
11726         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
11727         the exception message. Fixes #70070.
11728         (method_from_methodspec): Fix warnings.
11729
11730 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11731
11732         * process.c: (complete_path) return the path quoted
11733
11734 2004-12-01  Martin Baulig  <martin@ximian.com>
11735
11736         * class-internals.h (MonoGenericInst): New structure.
11737         (MonoGenericClass): Replaced `type_argc', `type_argv' and
11738         `is_open' with `MonoGenericInst *inst'.
11739         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
11740         `is_open' with `MonoGenericInst *inst'.
11741
11742 2004-11-30  Martin Baulig  <martin@ximian.com>
11743
11744         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
11745
11746         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
11747         to `generic_class_cache'.
11748
11749         * metadata.c
11750         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
11751         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
11752         (mono_generic_inst_is_valuetype): Renamed to
11753         mono_generic_class_is_valuetype().
11754
11755         * class-internals.h
11756         (MonoGenericInst): Renamed to MonoGenericClass.
11757         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
11758         (MonoClass): Renamed `generic_inst' to `generic_class'.
11759         (MonoGenericContext): Renamed `ginst' to `gclass'.
11760
11761         * object-internals.h
11762         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
11763
11764         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
11765         mono_reflection_generic_class_initialize().
11766
11767         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
11768         now known as "System.Reflection.MonoGenericClass".
11769         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
11770
11771 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
11772
11773         * class-internals.h: Added a flag field to MonoClass to cache the
11774         declarative security attributes actions associated with the class.
11775         * domain-internals.h: Added booleans to MonoJitInfo to cache the
11776         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
11777         applicable to the JITted method.
11778         * reflection.c|h: Added functions to extract (as flags) which security
11779         actions are available (declaratively) for a method, class or assembly.
11780         * metadata.c|h: Added functions to search the declarative security
11781         table in the metadata.
11782         
11783 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
11784
11785         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
11786         EXPORTEDTYPES are already in the class name cache, so there is no
11787         need to add extra code here to look at them. Just removes a bit of
11788         cruft.
11789
11790         (ves_icall_System_Environment_get_TickCount): No need for #if
11791         WINDOWS. We already have the code in io-layer.
11792
11793 2004-11-28  Martin Baulig  <martin@ximian.com>
11794
11795         * loader.c
11796         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
11797         Fixes gen-112.cs.
11798
11799 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
11800
11801         * assembly.c (do_mono_assembly_open): Instead of having a
11802         conditional WITH_BUNDLE, incorporate support for bundles here, by
11803         having a global `bundles' variable holding a pointer to the actual
11804         bundles. 
11805
11806         (mono_register_bundled_assemblies): New API call used by the
11807         bundle code. 
11808
11809         See mkbundle.1 for details.
11810         
11811 2004-11-27  Martin Baulig  <martin@ximian.com>
11812
11813         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
11814         the vtable for generic methods.
11815
11816 2004-11-26  Martin Baulig  <martin@ximian.com>
11817
11818         * metadata.c
11819         (mono_metadata_generic_method_hash): New public function.
11820         (mono_metadata_generic_method_equal): Likewise.
11821
11822         * class-internals.h
11823         (MonoGenericContainer): Added `GHashTable *method_hash'.
11824
11825         * reflection.c (ReflectionMethodBuilder): Added
11826         `MonoGenericContainer *generic_container'.
11827         (reflection_methodbuilder_to_mono_method): Don't create a new
11828         MonoGenericContainer each time we're called.
11829         (mono_reflection_bind_generic_method_parameters): Use
11830         `container->method_hash' to cache the results so we don't create a
11831         different method if we're called several times with the same
11832         arguments.
11833
11834         * loader.c (method_from_methodspec): Use the new
11835         `container->method_hash' here, too.
11836
11837 2004-11-26  Martin Baulig  <martin@ximian.com>
11838
11839         * class.c (inflate_generic_signature): Correctly compute
11840         `res->has_type_parameters'.
11841         (mono_class_vtable): Use the `has_type_parameters' flag to
11842         determine whether we're a generic method.
11843
11844         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
11845
11846 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11847
11848         * object.c (mono_runtime_run_main): Fix a small memory leak.
11849
11850 2004-11-25  Martin Baulig  <martin@ximian.com>
11851
11852         * class.c (set_generic_param_owner): Fixed the loop.
11853
11854 2004-11-25  Martin Baulig  <martin@ximian.com>
11855
11856         * object.c (mono_class_vtable): Don't create any JIT wrappers for
11857         generic methods.
11858
11859 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11860
11861         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
11862         names. Fixes #69787.
11863
11864 2004-11-24  Martin Baulig  <martin@ximian.com>
11865
11866         * class.c (mono_class_create_generic_2): If we don't have a
11867         `ginst->parent', inflate `gklass->parent' to get our parent.
11868
11869 2004-11-24  Martin Baulig  <martin@ximian.com>
11870
11871         * reflection.c (compare_genericparam): Correctly sort the
11872         GenericParam table; fixes #69779.
11873
11874 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
11875
11876         * reflection.c: When writing a PE file, don't create a huge
11877         buffer in memory. Just write the arrays we have to the file.
11878         This reduces memory usage.
11879
11880         * metadata-internals.h: MonoDynamicStream pefile is no longer used
11881         globally.
11882
11883 2004-11-17  Martin Baulig  <martin@ximian.com>
11884
11885         * class.c (mono_class_init): Don't setup `class->parent' for
11886         dynamic instances; moved this to mono_class_generic_2().
11887         (mono_class_create_generic): Also set `klass->inited' for dynamic
11888         generic instances.
11889         (mono_class_create_generic_2): Don't do anything for dynamic
11890         generic instances.  Set `klass->parent' here and also call
11891         mono_class_setup_parent() here. 
11892
11893         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
11894         `MonoType *parent' argument; set `ginst->parent' before calling
11895         mono_class_create_generic_2(), so we set the correct parent.
11896
11897 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
11898
11899         * reflection.c: allow getting attributes from ModuleBuilder
11900         (used by ikvm).
11901
11902 2004-11-17  Martin Baulig  <martin@ximian.com>
11903
11904         * class.c (mono_class_create_from_typedef): If a type parameter is
11905         inherited from an outer class, set its owner to that class.
11906
11907 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
11908
11909         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
11910           for (int*) written size. This fixes bug #69592.
11911
11912 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11913
11914         * icall.c: Added IsAuthenticodePresnet internal call.
11915         * image.c|h: New function that check a MonoImage for an Authenticode
11916         signature in the certificate PE data directory.
11917         * security.c|h: New internal call to ask the runtime if an 
11918         Authenticode signature seems referenced in the PE header.
11919
11920 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
11921
11922         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
11923
11924         * reflection.c (mono_image_create_pefile): Free the assembly streams
11925         after writing out the assembly file.
11926
11927         * object.c (mono_runtime_run_main): Fix small memory leak.
11928
11929         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
11930         property access modifiers. Fixes #69389.
11931
11932 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11933
11934         * domain.c, object.c, object-internals.h, domain-internals.h,
11935         object.h, marshal.c: keep dynamic code info per domain.
11936
11937 2004-11-15  Martin Baulig  <martin@ximian.com>
11938
11939         * class.c (mono_type_get_name_recurse): Put type arguments in
11940         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
11941         see bug #68387.
11942
11943 2004-11-15  Martin Baulig  <martin@ximian.com>
11944
11945         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
11946         (mono_class_setup_vtable): When computing `the_cname' for a
11947         generic instance, don't include the namespace since we'd otherwise
11948         add it twice.
11949
11950 2004-11-15  Martin Baulig  <martin@ximian.com>
11951
11952         * class.c (mono_class_create_generic): Changed return type to void.
11953         (mono_class_create_generic_2): New public function; setup
11954         `class->method', `class->field' and `class->interfaces' here
11955         instead of in mono_class_init().
11956
11957         * class.h (mono_class_create_generic): Moved to class-internals.h.
11958
11959 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
11960
11961         * reflection.c (mono_image_create_pefile): take a file HANDLE.
11962         rather than writing to memory, write to this file. Right now,
11963         we are just writting into a buffer, and copying that. However
11964         we can avoid the buffer later.
11965
11966         (mono_dynamic_stream_reset): new function
11967
11968         * icall.c, object-internals.h: update for the above.
11969
11970 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
11971
11972         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
11973         have been using gc'd memory. First it is slower, unlikely
11974         the comment in the source code said, secondly, it increases
11975         our footprint to do it in the gc.
11976
11977         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
11978         the method so that it does not have to copy to managed code.
11979
11980 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11981
11982         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
11983
11984 2004-11-12  Martin Baulig  <martin@localhost>
11985
11986         * reflection.c (mono_image_create_token): Allow generic method
11987         definitions here, since they may appear in an `.override'; see
11988         gen-98/gen-99 for an example.
11989
11990 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
11991
11992         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
11993         #69365.
11994
11995         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
11996         descriptive.
11997
11998 2004-11-11  Martin Baulig  <martin@ximian.com>
11999
12000         * class.c (mono_class_setup_vtable): In an explicit interface
12001         implementation, the method name now includes the arity.
12002
12003 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
12004
12005         * object.c (mono_array_full_copy): Fix warning.
12006
12007 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
12008
12009         * appdomain.c: Removed look_for_method_by_name(). Use the new method
12010         mono_class_get_method_from_name() instead.
12011         
12012         * class-internals.h: Added two new types of wrappers. 
12013         Added MonoRemotingTarget enum. Added new trampoline function type, which
12014         takes an additional MonoRemotingTarget value as parameter, so it is
12015         possible to request a trampoline for a specific target.
12016         
12017         * class.c: Added new mono_class_get_method_from_name() method.
12018         
12019         * class.h: In MonoRemoteClass, we can have now to vtables, one for
12020         general remoting sinks and one specific for cross domain calls.
12021         
12022         * debug-helpers.c: Added new wrapper names.
12023         
12024         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
12025         of a remote class.
12026         
12027         * image.c: Porperly delete value objects form the remoting invoke hashtable.
12028         
12029         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
12030         with several other methods (mono_marshal_get_xappdomain_dispatch,
12031         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
12032         and others) can generate a fast remoting wrapper for cross domain calls.
12033         More information can be found in docs/remoting.
12034         Other changes: Removed mono_find_method_by_name, and used
12035         mono_class_get_method_from_name instead.
12036         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
12037         is stored in the remoting invoke hashtable.
12038         
12039         * marshal.h: published the new method for getting the xdomain wrapper,
12040         and also added a method for getting the adequate wrapper for a given
12041         method and target.
12042         
12043         * object-internals.h, object.c: Added a couple of methods for capying and
12044         cloning arrays.
12045         Modified mono_install_remoting_trampoline, which takes the new remoting
12046         trampoline that has a remoting target as parameter.
12047         mono_class_proxy_vtable now also takes a remoting target as parameter, and
12048         will return the most suitable vtable for the target.
12049         Added mono_remote_class_vtable, which returns the vtable of a remote class
12050         (which can be the normal remoting vtable or the xdomain vtable).
12051         
12052         * threads.c: the xdomain invoke and dispatch wrappers must also be
12053         protected against interruptions.
12054
12055 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12056
12057         * icall.c: use memmove in BlockCopyInternal when the source and
12058         destination arrays are the same.
12059
12060 2004-11-09  Martin Baulig  <martin@ximian.com>
12061
12062         * class-internals.h (MonoGenericContainer): Removed `method' and
12063         `signature', replaced them with `is_method' and `is_signature'
12064         flags.  Added `context'.
12065
12066         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
12067         instead of a `MonoGenericContainer *'.
12068
12069         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
12070         for dynamic type parameters.
12071         (mono_metadata_load_generic_params): Setup `container->context'.
12072
12073         * reflection.c (mono_reflection_setup_generic_class): Setup
12074         `tb->generic_container->context'.
12075         (do_mono_reflection_bind_generic_parameters): Use
12076         mono_class_inflate_generic_type() to correctly inflate types,
12077         rather than using our own hack just for MONO_TYPE_VAR.
12078
12079 2004-11-09  Martin Baulig  <martin@ximian.com>
12080
12081         * class.c (mono_class_inflate_generic_method): Small fix; don't
12082         crash here.
12083
12084         * icall.c
12085         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
12086         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
12087         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
12088         (ves_icall_Type_BindGenericParameters): Likewise.
12089         (ves_icall_Type_get_IsGenericInstance): Likewise.
12090         (ves_icall_Type_GetGenericParameterPosition): Likewise.
12091         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
12092         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
12093         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
12094
12095 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
12096
12097         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
12098         assembly versions and public key tokens. Fixes #69113.
12099
12100 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
12101
12102         * metadata.c: fix bug introduced with the type cache changes
12103         on 2004-11-06.
12104
12105 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
12106
12107         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
12108         the MonoClass pointer instead of the token in exception clauses.
12109         * reflection.c: updates for the above and make the code not depend
12110         on the structure of MonoExceptionClause.
12111
12112 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12113
12114         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
12115         Add support for dynamic assemblies. Fixes #69114.
12116
12117         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
12118
12119 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
12120
12121         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
12122         since most only those methods use it. the code member of
12123         MonoMethodPInvoke was dead, so that can be removed too. Also,
12124         remove inline_count (again, not used), and move slot so that it
12125         can share bits with some other flags. This saves 8 bytes in the
12126         structure and gives us about 50 kb back for mcs helloworld.cs
12127
12128         * *.[ch]: Do naming changes for the above.
12129
12130         * loader.c (mono_method_get_header): Lazily init the header
12131         on first access.
12132         (mono_get_method_from_token): don't init the header here
12133         (mono_free_method): the header may never be allocated
12134
12135         Overall, this saves 150 kb of unmanaged allocations
12136         for mcs helloworld.cs. That accounts for 10% of the unmanaged
12137         memory at runtime.
12138         
12139         * loader.c, loader.h (mono_method_get_header): new accessor.
12140
12141         * *.[ch]: use the above method. Prepares us to lazily load
12142         the header.
12143
12144         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
12145         three warnings, which are actual bugs (see 69206).
12146
12147         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
12148         unused. Saves a cool 4 bytes / method.
12149
12150 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
12151
12152         * metadata.c (builtin_types): Add types for System.Object here.
12153         (mono_metadata_parse_type_full): Cache MonoType*'s that are
12154         for a class or valuetype from klass->this_arg or klass->byval_arg.
12155
12156         On mcs for a hello world, this gets us down from 21836 MonoType's
12157         to 14560.
12158
12159         (mono_metadata_free_type): Account for the above change.
12160
12161 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
12162
12163         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
12164         exception instead of asserting if name is null.
12165         (ves_icall_System_AppDomain_GetData): Ditto.
12166
12167 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12168
12169         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
12170         EnumBuilder.
12171
12172         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
12173         Return NULL when the domain does not have entry_assembly set.
12174
12175         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
12176         Add a 'resource_modules' argument.
12177         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
12178
12179         * reflection.c (mono_reflection_create_runtime_class): Move setting
12180         of wastypebuilder here, so mono_get_type_object () returns a MonoType
12181         for enums too.
12182
12183         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
12184         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
12185         Throw an ArgumentNullException if 'ptr' is null.
12186
12187         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
12188         assemblies here. Fixes #69020.
12189
12190 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12191
12192         * reflection.c (build_compressed_metadata): Fix the previous patch for
12193         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
12194         the stack.
12195
12196 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
12197
12198         * assembly.c (mono_assembly_names_equal): Allow a match if one of
12199         the cultures is false. Fixes #69090.
12200
12201         * reflection.c (build_compressed_metadata): Fix invalid memory read 
12202         detected by valgrind.
12203         
12204         * reflection.c (mono_reflection_get_type): Avoid triggering a 
12205         TypeResolve multiple times for the same type. Fixes #65577.
12206
12207 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
12208
12209         * marshal.c: Avoid using ldftn to call managed functions. It is
12210         much slower than just a call.
12211
12212         * reflection.c (mono_module_get_object): free the basename we
12213         allocate here from glib.
12214         
12215         * reflection.c (ensure_runtime_vtable): make sure to free
12216         overrides.  Also, we were allocating an array of MonoMethod not an
12217         array of MonoMethod*.
12218
12219         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
12220
12221         * image.c (mono_image_close): free image->guid here.
12222
12223 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12224
12225         * reflection.c: Fix some spec conformance issues with the PE file
12226         structures so mcs compiled apps run on the Net 2.0 beta.
12227
12228 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
12229
12230         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
12231         Implement this. Fixes #67264.
12232
12233         * debug-helpers.h debug-helpers.c marshal.c: Move 
12234         mono_find_method_by_name to debug-helpers.c.
12235
12236 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
12237
12238         * object.c (mono_release_type_locks): type_initialization_hash is
12239         a GHashTable.
12240
12241         * reflection.c object.c object-internals.h: Fix warnings.
12242
12243         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
12244         without accessors. Fixes #61561.
12245
12246         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
12247         application base from the root domain if not set. Fixes #65641.
12248         (mono_runtime_init): Fix warning.
12249
12250 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12251
12252         * appdomain.c: call mono_thread_pool_init.
12253         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
12254         of worker threads based on the number of CPUs and the environment
12255         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
12256         for non-windows (windows) systems.
12257
12258 2004-10-27  Chris Toshok  <toshok@ximian.com>
12259
12260         * mono-debug-debugger.c (write_class): don't call mono_class_init
12261         here, as even with the check for (!klass->init_pending), we get
12262         into a situation where we're hitting cycles in class
12263         initialization.  Fixes #68816.
12264
12265 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
12266
12267         * image.c: Avoid overwriting values in the loaded_images_hash when an
12268         assembly is loaded multiple times. Fixes #61152.
12269
12270         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
12271         so multiple satellite assemblies for the same name can be loaded.
12272         Fixes #68259.
12273
12274         * mono_domain_assembly_preload: Actually return the loaded assembly, 
12275         not NULL.
12276
12277         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
12278         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
12279
12280         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
12281         pending finalizers are not invoked after the appdomain has been 
12282         unloaded. Fixes #67862.
12283
12284 2004-10-22  Martin Baulig  <martin@ximian.com>
12285
12286         * mono-debug-debugger.c
12287         (mono_debugger_runtime_invoke): Don't box valuetypes.
12288
12289 2004-10-22  Chris Toshok  <toshok@ximian.com>
12290
12291         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
12292         don't hide private methods.
12293
12294 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
12295
12296         * icall.c: Allows the runtime to "share" (when known) the public key
12297         token of an assembly. This avoid the need to recalculate the token 
12298         (from the public key) in managed code.
12299
12300 2004-10-21  Chris Toshok  <toshok@ximian.com>
12301
12302         * debug-helpers.c (append_class_name): argh, revert last patch.
12303         
12304 2004-10-21  Chris Toshok  <toshok@ximian.com>
12305
12306         * debug-helpers.c (append_class_name): use '+' as the delimiter,
12307         not '/', so that it matches what the debugger uses to look up
12308         methods.
12309
12310 2004-10-21  Martin Baulig  <martin@ximian.com>
12311
12312         * mono-debug-debugger.c (mono_debugger_throw_exception): New
12313         public method; this is called each time an exception is thrown and
12314         allows the debugger to use exception catch points.
12315
12316 2004-10-21  Martin Baulig  <martin@ximian.com>
12317
12318         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
12319         the stack pointer and the exception object in some struct and pass
12320         that to the debugger.
12321
12322 2004-10-21  Chris Toshok  <toshok@ximian.com>
12323
12324         * mono-debug-debugger.c (do_write_class): add instance/static
12325         event support.  We don't expose "raise" or "other" yet.
12326         (event_is_static): new method.
12327
12328 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
12329
12330         * mono-debug-debugger.c
12331         (mono_debugger_handle_exception): Remove
12332         bogus return value for fussy compilers.
12333
12334 2004-10-20  Martin Baulig  <martin@ximian.com>
12335
12336         * mono-debug-debugger.c
12337         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
12338         (mono_debugger_handled_exception): Likewise.
12339
12340 2004-10-20  Martin Baulig  <martin@ximian.com>
12341
12342         * mono-debug-debugger.h (MonoDebuggerEvent): Added
12343         MONO_DEBUGGER_EVENT_EXCEPTION.
12344
12345         * mono-debug-debugger.c (mono_debugger_handle_exception): New
12346         public function to send the debugger a notification for an
12347         exception and inform it about a catch/finally clause.
12348
12349 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
12350
12351         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
12352         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
12353         fix 2.95 build. 
12354
12355         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
12356
12357 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12358
12359         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
12360         marshalled as [In,Out]. Fixes #58325.
12361
12362 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
12363
12364         * reflection.c (mono_method_body_get_object): Implement some fields.
12365
12366 2004-10-12  Martin Baulig  <martin@ximian.com>
12367
12368         * reflection.c (mono_reflection_bind_generic_parameters): Small
12369         fix, correctly retrieve our parent from a generic instance.
12370
12371 2004-10-12  Martin Baulig  <martin@ximian.com>
12372
12373         * metadata.c (mono_metadata_generic_param_equal): We always have
12374         an owner.
12375
12376         * class.c
12377         (mono_class_from_generic_parameter): We need to have an owner.
12378         (my_mono_class_from_generic_parameter): Likewise.
12379
12380         * reflection.c (mono_reflection_setup_generic_class): Renamed to
12381         mono_reflection_create_generic_class() and added a new
12382         mono_reflection_setup_generic_class().  
12383         (mono_reflection_initialize_generic_param): If we're a nested
12384         generic type and inherited from the containing class, set our
12385         owner to the outer class.
12386
12387 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
12388
12389         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
12390
12391         * reflection.c (mono_method_body_get_object): New function to create
12392         a MethodBody object.
12393
12394         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
12395
12396 2004-10-11  Martin Baulig  <martin@ximian.com>
12397
12398         * metadata.c (_mono_metadata_type_equal): Renamed to
12399         do_mono_metadata_type_equal() and made static.
12400
12401 2004-10-11  Martin Baulig  <martin@ximian.com>
12402
12403         * appdomain.c: Bump corlib version number to 28.
12404
12405 2004-10-10  Martin Baulig  <martin@ximian.com>
12406
12407         * class-internals.h
12408         (MonoGenericInst): Added `MonoGenericContainer *container'.
12409         (MonoGenericMethod): Likewise.
12410         (MonoGenericContext): Likewise.
12411         (MonoGenericParam): Added `MonoGenericContainer *owner'.
12412
12413         * metadata.c
12414         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
12415         (do_mono_metadata_parse_generic_inst): Likewise.
12416         (mono_metadata_parse_type_full): New public method.  This is the actual
12417         mono_metadata_parse_type() implementation - with an additional
12418         `MonoGenericContainer *' argument.
12419         (mono_metadata_parse_array_full): Likewise.
12420         (mono_metadata_parse_signature_full): Likewise.
12421         (mono_metadata_parse_method_signature_full): Likewise.
12422         (mono_metadata_parse_mh_full): Likewise.
12423         (mono_type_create_from_typespec): Likewise.
12424         (mono_metadata_interfaces_from_typedef_full): New public method;
12425         this is similar to the other _full() methods, but we take a
12426         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
12427         (mono_metadata_parse_generic_param): Take an additional
12428         `MonoGenericContainer *' argument and lookup the MonoGenericParam
12429         from that container.
12430         (mono_metadata_generic_param_equal): New static method to compare
12431         two type parameters.
12432         (_mono_metadata_type_equal): New static method; takes an
12433         additional `gboolean signature_only' argument - if true, we don't
12434         compare the owners of generic parameters.
12435         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
12436         with a TRUE argument - do a signature-only comparision.
12437
12438         * loader.c: Use the new _full() methods and pass the
12439         MonoGenericContainer to them.
12440
12441         * object-internals.h (MonoReflectionTypeBuilder): Added
12442         `MonoGenericContainer *generic_container' field.
12443         (MonoReflectionMethodBuilder): Likewise.
12444
12445 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12446
12447         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
12448         case initial images of dynamic assemblies.
12449
12450         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
12451
12452         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
12453
12454         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
12455         length of event->other array.
12456         (typebuilder_setup_events): Ditto.
12457
12458         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
12459         'assembly_by_name' and add an 'assemblies' list.
12460
12461         * assembly.h assembly.c: Add a new search hook for determining whenever
12462         an assembly is already loaded. Use this instead of searching in the
12463         loaded_assemblies list.
12464
12465         * domain.c appdomain.c: Implement the new search hook so loaded 
12466         assemblies are now scoped by appdomain. Fixes #67727.
12467
12468 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
12469
12470         * threads.c (mono_thread_attach): Initialize synch_lock field so
12471         mono_thread_detach works again.
12472
12473         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
12474         'lib' too. Fixes #63130.
12475
12476 2004-10-06  Jackson Harper  <jackson@ximian.com>
12477
12478         * culture-info-tables.h: regenerated.
12479
12480 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
12481
12482         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
12483         implemented by other interfaces in the result. Fixes #65764.
12484         
12485         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
12486         Handle unloadable modules without crashing.
12487
12488         * image.c (load_modules): Revert the previous patch since modules must
12489         have a fixed index inside the array.
12490         
12491         * image.c (load_modules): Don't include native modules in the modules
12492         array.
12493
12494 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12495
12496         * reflection.h: Add param_defaults field.
12497
12498         * reflection.c: Add support for parameter defaults in dynamic methods.
12499         Fixes #64595.
12500
12501         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
12502         an empty string when a type has no namespace. Fixes #64230.
12503
12504 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
12505
12506         * tabledefs.h: Added "internal" security actions to support non-CAS
12507         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
12508         Note: they do not seems to be used anymore in 2.0 (new metadata format)
12509
12510 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
12511
12512         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
12513         constructor of abstract class. Fixes #61689.
12514
12515 2004-10-04  Martin Baulig  <martin@ximian.com>
12516
12517         * class-internals.h (MonoGenericContainer): New type.
12518         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
12519         `MonoGenericContainer *generic_container'.
12520         (MonoClass): Replaced `gen_params' and `num_gen_params' with
12521         `MonoGenericContainer *generic_container'.
12522
12523         * metadata.c (mono_metadata_load_generic_params): Return a
12524         `MonoGenericContainer *' instead of a `MonoGenericParam *';
12525         removed the `num' argument.
12526
12527 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12528
12529         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
12530         for dynamic images.
12531
12532         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
12533         machine fields.
12534
12535         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
12536
12537         * reflection.c: Save pe_kind and machine values into the generated
12538         image file.
12539
12540         * appdomain.c: Bump corlib version number.
12541
12542         * object-internals.h: Reorganize layout of LocalBuilder.
12543
12544         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
12545         New helper function.
12546
12547         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
12548         created MonoType for dynamic types. Fixes #66180.
12549
12550 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
12551
12552         * threadpool.c: the ares hashtable needs a critical section around it.
12553         this prevents some nasty segfaults
12554
12555 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12556
12557         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
12558         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
12559         bug 67324).
12560         
12561 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
12562
12563         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
12564         
12565 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12566
12567         * image.c: Always canonicalize image file names, to avoid loading
12568         the same assembly twice when referenced using a relative path.
12569
12570 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
12571
12572         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
12573
12574         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
12575
12576         * marshal.c: Fix warnings.
12577
12578 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
12579
12580         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
12581         attempting to marshal the delegate_trampoline as the method_addr.
12582         This patch has a static hashtable of marshalled delegates so that 
12583         we can map delegate_trampoline addresses back to delegates.  This
12584         allows a delegate passed to managed code to be passed back into native
12585         code.  Fixes #67039
12586
12587 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12588
12589         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
12590
12591         * reflection.c (method_encode_code): Align method headers properly.
12592         Fixes #66025.
12593
12594 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12595
12596         * marshal.c: In the runtime invoke wrapper, reset the abort
12597         exception if it is cached. This avoids the automatic rethrowal of 
12598         the exception after the catch of the wrapper. Also check for pending
12599         interruptions before calling the managed method. This is done using
12600         the new method emit_thread_force_interrupt_checkpoint, since the
12601         normal checkpoint method is ignored when running the invoke wrapper.
12602         * object.c: If the abort exception is rethrown, set the abort_exc
12603         field of the thread, so it will be rethrown aftere every catch.
12604         * threadpool.c: Only run an interruption checkpoint if what has been
12605         requested is a stop of the thread (aborts will be ignored).
12606         * threads.c: By default, a thread will now never be interrumped while
12607         running the runtime invoke wrapper (this ensures that runtime_invoke
12608         will always return to the caller if an exception pointer is provided).
12609         There is a new special method mono_thread_force_interruption_checkpoint()
12610         to force an interruption checkpoint even if running a protected
12611         wrapper, which is used by the same runtime invoke wrapper to do a check
12612         at a safe point.
12613
12614 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12615
12616         * object.c, object-internals.h: Implemented mono_release_type_locks,
12617         which releases the cctor locks held by a thread.
12618         * threads.c, threads.h: In thread_cleanup, release cctor locks held
12619         by a thread. Added mono_thread_exit() method to be used to safely stop
12620         a thread.
12621
12622 2004-09-28  Raja R Harinath  <rharinath@novell.com>
12623
12624         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
12625         Move null check before dereference.  Avoid indexing beyond the end
12626         of the 'modules' array.
12627
12628 2004-09-28  Raja R Harinath  <rharinath@novell.com>
12629
12630         * metadata-internals.h (MonoImage): Add module_count field.
12631         * image.c (load_modules): Set image->module_count.
12632         (mono_image_load_file_for_image): Use image->module_count.
12633         * reflection.c (mono_image_load_module): Append to image->modules array 
12634         of dynamic assembly.
12635         (mono_module_get_object): Fix loop to actually increment index.
12636         Use image->module_count.
12637         * assembly.c (mono_assembly_load_references): Use image->module_count.
12638         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12639         Likewise.
12640
12641 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12642
12643         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
12644         Avoid assert on generic types.
12645
12646 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
12647
12648         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
12649
12650         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
12651
12652         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
12653         function to convert a MarshalSpec structure to its managed counterpart.
12654
12655         * reflection.c: Fix warnings.
12656         
12657         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
12658         field.
12659
12660         * icall.c (mono_create_icall_signature): Fix build.
12661
12662 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12663
12664         * icall.c: Add MakePointType icall.
12665
12666         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
12667         warnings.
12668
12669 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12670
12671         * threadpool.c: reuse allocated slots in the queue.
12672
12673 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12674
12675         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
12676
12677         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
12678
12679         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
12680         previous change.
12681
12682         * tabledefs.h: Add constants for pinvoke attributes BestFit and
12683         ThrowOnUnmappableChar.
12684
12685         * icall.c (ves_icall_Type_GetPacking): New icall.
12686
12687 2004-09-24  Martin Baulig  <martin@ximian.com>
12688
12689         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
12690
12691 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12692
12693         * appdomain.c:
12694         (mono_domain_set): allow setting a domain that is being unloaded.
12695         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
12696         being unloaded.
12697
12698 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12699
12700         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
12701         the GetCustomAttributes icall.
12702
12703 2004-09-23  Martin Baulig  <martin@ximian.com>
12704
12705         * object-internals.h (MonoReflectionGenericParam): Replaced
12706         'has_ctor_constraint', `has_reference_type' and `has_value_type'
12707         with `guint32 attrs'.
12708
12709 2004-09-23  Martin Baulig  <martin@ximian.com>
12710
12711         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
12712
12713 2004-09-23  Martin Baulig  <martin@ximian.com>
12714
12715         * object-internals.h (GenericParameterAttributes): New enum.
12716
12717 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12718
12719         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
12720         
12721         * class.c (init_events): Fill out event->other field.
12722
12723         * class.c: Fix warnings.
12724
12725         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
12726
12727 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12728
12729         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
12730         walk which doesn't supply the IL offset.
12731
12732 2004-09-22  Martin Baulig  <martin@ximian.com>
12733
12734         * reflection.c (mono_reflection_setup_internal_class): If we're
12735         System.ValueType, System.Object or System.Enum, set
12736         `klass->instance_size' and create the vtable.
12737         (mono_reflection_create_internal_class): If we're an enum type,
12738         get the base class from our current corlib.
12739
12740 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
12741
12742         * reflection.h (MonoResolveTokenError): New type.
12743
12744         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
12745         icall.
12746
12747         * icall.c: Add an 'error' argument to the ResolveToken icalls.
12748
12749 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
12750
12751         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
12752         Support also calling constructors, but only for already allocated objects.
12753
12754 2004-09-17  Geoff Norton <gnorton@customerdna.com>
12755
12756         * reflection.c (type_get_qualified_name): If the klass is null
12757         return the typename to avoid a NullRefEx.
12758         (encode_cattr_value): Get the qualified name of the boxed type,
12759         not the underlying enumtype.  Fixes #62984.
12760
12761 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
12762
12763         * marshal.c: Fix problems with previous checkin.
12764
12765 2004-09-21    <vargaz@freemail.hu>
12766
12767         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
12768         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
12769
12770         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
12771
12772 2004-09-21  Geoff Norton <gnorton@customerdna.com>
12773
12774         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
12775         should only return a type for pointers, arrays, and passbyref types.
12776         Fixes bug #63841.
12777
12778 2004-09-21  Martin Baulig  <martin@ximian.com>
12779
12780         * domain.c (mono_debugger_check_runtime_version): New public
12781         function.
12782
12783         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
12784
12785 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
12786
12787         * reflection.c: Added missing sort to the declarative security 
12788         attributes table. MS implementation stops seeing the attributes if the
12789         token number regress in the table (as shown by ildasm and permview).
12790
12791 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
12792
12793         * object-internals.h (MonoReflectionModule): Add 'token' field.
12794         
12795         * reflection.c (mono_reflection_get_token): Add support for Module
12796         and Assembly.
12797         (mono_module_get_object): Set 'token' field.
12798         (mono_module_file_get_object): Set 'token' field.
12799
12800         * icall.c: Add new Assembly and Module icalls.
12801
12802         * appdomain.c: Bump corlib version.
12803
12804 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
12805
12806         * loader.h loader.c class.h class.c: Add helper functions for obtaining
12807         tokens of metadata objects.
12808
12809         * reflection.h reflection.c (mono_reflection_get_token): New function
12810         to obtain the token of a metadata object.
12811
12812         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
12813
12814 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12815
12816         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
12817         
12818         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
12819
12820 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
12821
12822         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
12823         * object-internals.h: Added 3 MonoArray* members to MonoReflection
12824         AssemblyBuilder to access the permissions set in the class lib.
12825         * reflection.c: Added security attributes encoding step in 
12826         mono_image_build_metadata.
12827         * tabledefs.h: Added new security actions defined in 2.0:
12828         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
12829
12830 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
12831
12832         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
12833         macro parameter.
12834
12835 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
12836  
12837         * locales.c: nullify the ICU_collator member of CompareInfo when it is
12838           finalized. There where random SIGSEVs at program termination, when
12839           an object being finalized was trying to do a string comparison and
12840           the current culture was already finalized.
12841  
12842 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12843
12844         * threads.c: call thread_cleanup before finishing the thread if we get
12845         there.
12846
12847 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
12848
12849         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
12850         assemblies from the parent. Fixes #65665.
12851
12852 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
12853
12854         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
12855         modifiers.
12856
12857 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
12858
12859         * reflection.h: add prototype for mono_get_dbnull_object
12860         * reflection.c: add prototypes for get_default_param_value_blobs 
12861         and mono_get_object_from_blob for fussier compilers
12862
12863 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
12864  
12865         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
12866         false deadlock checks in class initialization.
12867  
12868 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12869
12870         * image.c (mono_image_addref): Fix comment.
12871
12872         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
12873         possible.
12874
12875 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
12876
12877         * reflection.c (mono_param_get_objects): Modified to return
12878         ParameterInfo.DefaultValue object.
12879
12880         (get_default_param_value_blobs):
12881         (mono_get_object_from_blob):
12882         (mono_get_dbnull_object): New helper routines. 
12883
12884         * object.c (mono_get_constant_value_from_blob): New helper routine
12885         carved out from get_default_field_value ()
12886
12887         * object-internals.h (mono_get_constant_value_from_blob): Added
12888         function declaration.
12889
12890 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12891
12892         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
12893         referenced assemblies. Fixes #62135.
12894
12895         * exception.h exception.c (mono_get_exception_file_not_found2): New
12896         helper function.
12897
12898 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12899
12900         * class.h class.c: Add mono_type_get_underlying_type ().
12901
12902 2004-09-09  Geoff Norton <gnorton@customerndna.com>
12903
12904         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
12905         Fix GetTypes() to support dynamically created assemblies.
12906
12907 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
12908
12909         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
12910         
12911         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
12912         previous patch.
12913
12914         * reflection.h reflection.c loader.c: Allow dynamic construction of
12915         pinvoke methods. Fixes #65571.
12916         
12917         * reflection.c (mono_reflection_get_type): Revert previous change since
12918         it causes regressions.
12919
12920 2004-09-08  Martin Baulig  <martin@ximian.com>
12921
12922         * class.c (class_compute_field_layout): Don't call
12923         mono_class_layout_fields() for open generic instances.
12924
12925 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
12926         * threads.c appdomain.c: fix typo in GC macro
12927
12928 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12929
12930         * threads.c: don't call mono_thread_detach() in start_wrapper(),
12931         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
12932
12933 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
12934
12935         * image.c (mono_image_close): Applied patch from 
12936         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
12937         assembly is loaded multiple times from data.
12938         
12939         * image.c (mono_image_open): Fix warning.
12940
12941 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12942
12943         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
12944         once. Fixes #58334.
12945         
12946         * reflection.c (mono_reflection_create_runtime_class): Initialize
12947         klass->nested_classes. Fixes #61224.
12948
12949 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12950
12951         * threads.c: sched_yield() on exit, to allow threads to quit.
12952
12953 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12954
12955         * object.c (mono_unhandled_exception): Remove leftover debug code.
12956
12957 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
12958
12959         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
12960
12961 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12962
12963         * marshal.c (emit_marshal_array): Really null terminate string arrays.
12964         
12965         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
12966
12967 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12968
12969         * marshal.c (emit_marshal_array): Null terminate string arrays.
12970         
12971         * marshal.c (raise_auto_layout_exception): Fix warning.
12972
12973         * reflection.c (mono_param_get_objects): Initialize the default value
12974         with DBNull.Value, not null. Fixes #62123.
12975
12976 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
12977
12978         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
12979         throw an exception with a cute explanation.
12980
12981 2004-09-06  Dick Porter  <dick@ximian.com>
12982
12983         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
12984         Close the new process's thread handle, as we don't use it.  The
12985         handle stays around forever otherwise.
12986
12987 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12988
12989         * object.c (arith_overflow): Fix warning.
12990
12991         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
12992         calling conventions in method refs. Fixes #65352.
12993
12994         * reflection.c: Fix warnings.
12995
12996 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
12997
12998         * icall.c: Add a new icall for Array.Clear
12999
13000 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
13001
13002         * object.c: When allocating an array, we have to throw
13003         an overflow exception if any of the lengths are < 0.
13004
13005 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13006
13007         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
13008         properly. Also move implementation of string array marshalling to 
13009         managed code. Fixes #42316.
13010
13011 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13012
13013         * assembly.c: provide more information when loading an assembly fails.
13014
13015 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13016
13017         * filewatcher.c: don't expect the development fam package to be
13018         installed.
13019
13020 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
13021
13022         * marshal.c: Make a copy of the signature cookie since it will be
13023         freed by the caller.
13024         
13025         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
13026
13027         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
13028
13029         * metadata.c (mono_metadata_free_marshal_spec): New function to free
13030         marshal specs.
13031
13032         * marshal.c: More refactoring.
13033         
13034         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
13035         smaller functions.
13036
13037 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
13038
13039         * object.c: In mono_message_invoke, fill the output parameter array after
13040           calling the managed method (it was done before the call). This fixes
13041           bug #59299.
13042
13043 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13044
13045         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
13046         as well.
13047
13048 2004-09-02  Martin Baulig  <martin@ximian.com>
13049
13050         * class.c (mono_class_instance_size): Don't allow generic type
13051         definitions or open generic instances.
13052         (mono_class_array_element_size): If we're a value type, call
13053         mono_class_instance_size() on the original class.
13054
13055         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
13056         handle generic instances.
13057
13058         * mono-debug-debugger.c (write_type): Handle generic instances
13059         like classes.
13060
13061 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13062
13063         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
13064         the allocation request fails. Fixes #65089.
13065
13066         * object.c (mono_runtime_free_method): Do not call mono_free_method.
13067         
13068         * object.c (mono_runtime_free_method): New function to free a dynamic
13069         method.
13070
13071         * marshal.c (mono_delegate_free_ftnptr): New function to free the
13072         delegate trampoline.
13073
13074         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
13075         with hasthis as dynamic,
13076
13077         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
13078
13079         * domain.c (mono_jit_info_table_remove): New function to remove an
13080         entry from the jit info table.
13081
13082         * class-internals.h (MonoMethod): Add 'dynamic' field.
13083
13084         * loader.c: Fix warnings.
13085
13086 2004-09-01  Martin Baulig  <martin@ximian.com>
13087
13088         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
13089         instead of mono_debugger_lock() because the latter one is a no-op
13090         unless running in the debugger.
13091
13092 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
13093
13094         * class.c (class_compute_field_layout): Classes with auto-layout or
13095         reference fields are not blittable.
13096         
13097 2004-09-01  Dick Porter  <dick@ximian.com>
13098
13099         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
13100         mono_image_get_filename() to get the assembly location.
13101
13102         * icall.c:
13103         * metadata.h: Fix compile warnings
13104
13105 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
13106
13107         * class.c (class_compute_field_layout): System.Object is blittable.
13108
13109         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
13110         as in/out. Fixes #59909.
13111
13112 2004-09-01  Martin Baulig  <martin@ximian.com>
13113
13114         * metadata.h (MONO_TYPE_ISREFERENCE): Call
13115         mono_metadata_generic_inst_is_valuetype() if we're a generic
13116         instance to check whether our underlying type is a reference type.
13117
13118 2004-09-01  Martin Baulig  <martin@ximian.com>
13119
13120         * metadata.c (mono_type_size): If we're a generic instance, call
13121         mono_class_value_size() for value types.
13122
13123 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
13124
13125         * marshal.c: Implement more custom marshalling functionality. Fixes
13126         #64915.
13127
13128 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13129
13130         * mono-debug.c, debug-mono-symfile.c: add some locking love.
13131
13132 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
13133
13134         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
13135
13136         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
13137
13138         * icall.c: Fix some warnings.
13139
13140         * threads.c (abort_appdomain_thread): Fix unref errors.
13141         (mono_thread_current): Fix THREAD_DEBUG define.
13142
13143 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
13144
13145         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
13146
13147         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
13148
13149 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
13150
13151         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
13152         string arrays.
13153
13154 2004-08-28  Martin Baulig  <martin@ximian.com>
13155
13156         * metadata.c
13157         (mono_metadata_generic_inst_is_valuetype): New public function.
13158
13159         * metadata.h (MONO_TYPE_ISSTRUCT): Call
13160         mono_metadata_generic_inst_is_valuetype() if we're a generic
13161         instance to check whether our underlying type is a valuetype.
13162
13163 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
13164
13165         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
13166         #63768.
13167
13168 2004-08-25  Martin Baulig  <martin@ximian.com>
13169
13170         * loader.c (mono_get_method_from_token): Abstract methods can also
13171         be generic and thus have type parameters.
13172
13173         * metadata-internals.h
13174         (MonoDynamicImage): Added `GPtrArray *gen_params'.
13175
13176         * reflection.c (mono_image_get_generic_param_info): Don't create a
13177         metadata row, just add an entry to the `gen_params' array.
13178         (build_compressed_metadata): Sort the `gen_params' array and then
13179         actually create the metadata.
13180
13181 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13182
13183         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
13184
13185 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13186
13187         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
13188
13189 2004-08-24  Martin Baulig  <martin@ximian.com>
13190
13191         * class.cs (mono_class_is_subclass_of): Like an interface, a
13192         generic instance also derives from System.Object.
13193
13194 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13195
13196         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
13197         custom modifiers to be in any order. Fixes #61990.
13198
13199 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13200
13201         * object.c: Register mono_object_new_fast icall.
13202         
13203         * object.c (mono_class_get_allocation_ftn): Return to calling
13204         mono_object_new_fast, since it seems faster to compute the object 
13205         size in unmanaged code than passing it as a parameter.
13206
13207         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
13208
13209         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
13210         this function with Boehm as the oom handler, so we don't have to check
13211         the result of GC_malloc.
13212
13213         * object.c: Remove checks for oom.
13214
13215         * object.h object.c (mono_class_get_allocation_ftn): New function to
13216         return the icall which can be used to allocate an instance of a given
13217         class. 
13218
13219         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
13220
13221         * class-internals.h: Add 'enabled' field.
13222
13223 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
13224
13225         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
13226
13227 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
13228         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
13229         value 0x0010.
13230
13231 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13232
13233         * appdomain.c: use the Tls function for appdomain too,
13234         at Zoltan's request. Actually return in mono_context_get
13235
13236         * appdomain.c, profiler.c, threads.c: use __thread
13237
13238 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13239
13240         * appdomain.c threads.c: Call GC_CreateThread on windows.
13241
13242         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
13243         multiple libraries since this don't work on windows.
13244
13245 2004-08-18  Martin Baulig  <martin@ximian.com>
13246
13247         * class-internals.h
13248         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
13249         MonoMethodHeader.
13250
13251         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
13252         MonoMethodNormal since we also need it for abstract and interface
13253         methods.
13254
13255         * reflection.c
13256         (build_compressed_metadata): Sort the GenericParam table.
13257         (mono_image_create_token): Added `gboolean create_methodspec'
13258         argument; this is false when generating a MethodImpl token.
13259         (reflection_methodbuilder_to_mono_method): Abstract and interface
13260         methods may also have generic parameters.
13261
13262 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13263
13264         * appdomain.c: thread local alloc
13265
13266 2004-08-17  Martin Baulig  <martin@ximian.com>
13267
13268         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
13269
13270         * icall.c
13271         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
13272         argument.
13273
13274         * class.c (mono_type_get_full_name): New public function.
13275         (mono_type_get_name): Don't include the type arguments.
13276
13277 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13278
13279         * Makefile.am: Build static versions of libmetadata and libmonoruntime
13280         for inclusion into the mono executable.
13281
13282 2004-08-16  Martin Baulig  <martin@ximian.com>
13283
13284         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
13285         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
13286
13287 2004-08-14  Martin Baulig  <martin@ximian.com>
13288
13289         * class.c (dup_type): Also copy the `byref' field.
13290
13291 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13292
13293         * reflection.c (create_dynamic_mono_image): Revert the last change 
13294         since it breaks bootstrap.
13295
13296 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13297
13298         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
13299
13300         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
13301         not free them with g_free.
13302
13303 2004-08-11  Martin Baulig  <martin@ximian.com>
13304
13305         * reflection.c (mono_reflection_setup_internal_class): Also call
13306         mono_class_setup_mono_type() if we already have a `tb->type.type'.
13307
13308 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
13309
13310         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
13311         called during default (first) AppDomain creation. Keep track of
13312         Evidence when loading assemblies.
13313
13314 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13315
13316         * opcodes.c, opcodes.h: reduce runtime relocations.
13317
13318 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13319
13320         * culture-info.h, locales.c: fixes and chages to sue the new
13321         optimized format of the locale data.
13322         * culture-info-tables.h: regenerated.
13323
13324 2004-08-06  Geoff Norton <gnorton@customerdna.com>
13325         
13326         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
13327
13328 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
13329
13330         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
13331         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
13332         * domain-internals.h: icall declaration.
13333         * icall.c: icall registration.
13334         * object-internals.h: New fields in MonoAssembly for CAS.
13335
13336 2004-08-05  Duncan Mak  <duncan@ximian.com>
13337
13338         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13339         CEE_LDELEM_ANY.
13340
13341 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13342
13343         * reflection.c: fix to deal with object[] arrays in custom ctors
13344         (bug #62550).
13345
13346 2004-08-05  Martin Baulig  <martin@ximian.com>
13347
13348         * class.c (mono_class_array_element_size): Added support for
13349         generic instances and correctly handle "recursive" types.
13350
13351 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13352
13353         * assembly.c: Fix warnings.
13354
13355 2004-08-04  Martin Baulig  <martin@ximian.com>
13356
13357         * class.c
13358         (mono_type_get_name_recurse): Added `gboolean include_arity'
13359         argument specifying whether or not we should include the generic
13360         arity in the type name.
13361         (_mono_type_get_name): New static function.
13362         (mono_class_setup_vtable): If we're a generic instance, don't
13363         include the generic arity in the names of explicit method
13364         implementations.        
13365
13366 2004-08-03  Martin Baulig  <martin@ximian.com>
13367
13368         * class.c (mono_type_get_name_recurse): Enclose the generic type
13369         arguments in `<', '>'.
13370
13371 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13372
13373         * gc.c: make GC warning messages use the trace API, they are just
13374         noise to most of the users.
13375
13376 2004-08-03  Martin Baulig  <martin@ximian.com>
13377
13378         * debug-mono-symfile.c (read_string): Correctly read the string.
13379
13380 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13381
13382         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
13383         
13384         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
13385         icalls.
13386         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
13387
13388 2004-07-30  Martin Baulig  <martin@ximian.com>
13389
13390         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
13391         Reflect latest symbol writer changes.   
13392
13393 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13394
13395         * object.c: always create an object if null is passed
13396         to Invoke() where a valuetype is expected.
13397
13398 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13399
13400         * marshal.c (mono_marshal_init): make managed
13401         signatures match native ones better for 64bits.
13402
13403 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13404
13405         * appdomain.c: hack to build correctly the private bin path on windows.
13406         Fixes bug #61991.
13407
13408 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13409
13410         * assembly.c: Load mscorlib from the correct framework directory
13411           (mono/<version>/mscorlib.dll).
13412         * appdomain.h: Added prototypes for new functions.
13413         * internals.h: Added some prototypes.
13414         * domain.c: When initializing the runtime, get from the executable and
13415           the configuration files the runtime version that the app supports.
13416           Added support methods for reading app.exe.config. Added list of versions
13417           supported by the JIT. Added two new methods: mono_init_from_assembly,
13418           which initializes the runtime and determines the required version from
13419           the provided exe file, and mono_init_version, which initializes
13420           the runtime using the provided version.
13421         * icall.c: Get machine.config from version-specific directory.
13422         * reflection.c: When generating an image, embed the version number
13423           of the current runtime.
13424
13425 2004-07-28  Dick Porter  <dick@ximian.com>
13426
13427         * socket-io.c
13428         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
13429         returned sockaddr size before creating the remote address object.
13430         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
13431         61608.
13432
13433 2004-07-28  Dick Porter  <dick@ximian.com>
13434
13435         * locales.c (string_invariant_compare_char): Fix invariant char
13436         compares between upper and lower cases.  Fixes bug 61458.
13437
13438 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
13439         
13440         * marshal.c: actually cache stelem.ref wrappers.
13441         
13442 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13443
13444         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
13445         sections and remove the mono_cli_rva_map () function.
13446
13447 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13448
13449         * debug-mono-symfile.c: fix one more endianess issue, from a patch
13450         by Geoff Norton (<gnorton@customerdna.com>).
13451
13452 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13453
13454         * class.c: fix class loads for pointer types (typeof(int) !=
13455         typeof(int*)).
13456
13457 2004-07-27  Martin Baulig  <martin@ximian.com>
13458
13459         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
13460         reading the debugging information from an external ".mdb" file.
13461
13462 2004-07-24  Martin Baulig  <martin@ximian.com>
13463
13464         * reflection.c (mono_image_get_type_info): Only write a class
13465         layout entry if we actually have a size or a packing size.
13466
13467 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
13468
13469         * reflection.c (type_get_fully_qualified_name): 
13470         insert cast to get type checking of ?: with non-gcc compilers
13471
13472 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
13473
13474         * rand.c: use g_getenv for both lookups of
13475         MONO_EGD_SOCKET
13476
13477 2004-07-17  Martin Baulig  <martin@ximian.com>
13478
13479         * reflection.c (mono_reflection_bind_generic_method_parameters):
13480         Set `gmethod->reflection_info'.
13481
13482 2004-07-17  Martin Baulig  <martin@ximian.com>
13483
13484         * class.c (mono_class_create_from_typedef): Insert the newly
13485         created class into the hash table before computing the interfaces
13486         since we could be called recursively.
13487
13488 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
13489
13490         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
13491         function to implement stelem.ref in managed code
13492         * class-internals.h, debug-helpers.c: a new wrapper type
13493         for the above.
13494
13495 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13496
13497         * gc.c: allow GC handles to work even when no GC is compiled in.
13498         Fix part of bug #61134 (GetAddrOfPinnedObject).
13499
13500 2004-07-13  Peter Williams  <peter@newton.cx>
13501  
13502         * process.c (complete_path): Make sure we don't attempt to execute
13503         directories.
13504  
13505 2004-07-12  Geoff Norton <gnorton@customerdna.com>
13506
13507         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
13508           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
13509           and will add/subtract the hour if needed
13510
13511 2004-07-12  Martin Baulig  <martin@ximian.com>
13512
13513         * reflection.c (mono_field_get_object): If we have
13514         `field->generic_info', take the attributes from
13515         `field->generic_info->generic_type'.    
13516
13517 2004-07-12  Martin Baulig  <martin@ximian.com>
13518
13519         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
13520         This function must be called before initializing the runtime.
13521         (mono_debug_init_1): New function; call this after initializing
13522         the runtime, but before loading the assembly.  It tells the
13523         debugger to load corlib and the builtin types.
13524
13525         * mono-debug-debugger.c: Did some larger changes in the debugging
13526         code; support recursive class declarations, make sure we actually
13527         add all classes.
13528
13529 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13530
13531         * debug-helpers.c: undo my previous patch and fixed the real issue in
13532         ../mini/exceptions-x86.c
13533
13534 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13535
13536         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
13537         when no HOME env. variable was set and a NullRef was thrown in a .cctor
13538         called from other .cctors.
13539
13540 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
13541
13542         * loader.c: Removed the mono_loader_wine_init hack now that we are
13543         doing a managed version of Windows.Forms.
13544
13545 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
13546
13547         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
13548         threadpool.c, threads.c: remove static data from rootset.
13549
13550 2004-07-09  Dick Porter  <dick@ximian.com>
13551
13552         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
13553         Don't do any more processing if the matched length was 0.  It was
13554         increasing the size of the string before.  Fixes bug 61167.
13555
13556 2004-07-09  Dick Porter  <dick@ximian.com>
13557
13558         * socket-io.h:
13559         * socket-io.c
13560         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13561         Add support for SO_PEERCRED if its available.
13562
13563 2004-07-09  Peter Bartok <pbartok@novell.com>
13564         * loader.c: winelib.exe.so error message is now only displayed if
13565         MONO_DEBUG is set. To help us avoid questions when people are trying
13566         out the new Managed.Windows.Forms.
13567
13568 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
13569
13570         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
13571         for isinst and castclass wrappers.
13572
13573         * class-internals.h icall.c: Move registration and lookup of JIT icalls
13574         to libmetadata from the JIT, so they could be used by the marshalling
13575         code and the interpreter.
13576
13577         * marshal.c: Register marshalling related JIT icalls here instead of
13578         in mini.c. Use CEE_MONO_ICALL instead of the family of 
13579         CEE_MONO_PROC<x> opcodes to call marshalling functions.
13580
13581         * metadata.h: Remove unneeded marshalling conversions.
13582
13583         * opcodes.c: Update for new opcodes.
13584         
13585 2004-07-08  Martin Baulig  <martin@ximian.com>
13586
13587         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
13588         (mono_debug_get_domain_data): Make this function static.
13589
13590 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13591
13592         * gc.c, object.h: add nice GC handle API for embedders.
13593
13594 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13595
13596         * reflection.c: more changes for the new api
13597
13598         * object.c: When we reflect on a field w/ a constant value, it
13599         will not have a memory location, so we must access metadata. Also,
13600         allow easier reading of strings so that we can read them from
13601         the constant data.
13602
13603         * class.c (mono_class_layout_fields): no need for literal fields here.
13604
13605         * class-internals.h: api changes for const fields
13606
13607         * icall.c (ves_icall_get_enum_info): use new apis for const fields
13608
13609 2004-07-06  Martin Baulig  <martin@ximian.com>
13610
13611         * mono-debug.h: Increment version number to 44.
13612
13613         * mono-debug.c (mono_debug_add_wrapper): The second argument is
13614         now a gpointer, rewrote this whole method.
13615
13616         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
13617         function.  Add information about the wrapper in a new "misc table".
13618
13619         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
13620         for the new misc table.
13621
13622 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13623
13624         * metadata-internals.h image.c: Add a cache for helper signatures.
13625
13626         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
13627
13628 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13629
13630         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
13631         delegates from a delegate. Fixes #61033.
13632         
13633         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
13634         marshalling of stringbuilder arrays. Fixes #59900.
13635
13636 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13637
13638         * icall.c: Add EnumBuilder:setup_enum_type icall.
13639
13640 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13641
13642         * icall.c: Added a new icall for the property version of
13643         OffsetOfStringData.
13644
13645 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13646
13647         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
13648         it has a constant size across platforms.
13649
13650         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
13651         stack trace.
13652
13653 2004-06-29  Martin Baulig  <martin@ximian.com>
13654
13655         * mono-debug.c (mono_debug_add_method): Protect the whole function
13656         in mono_debugger_lock(), not just parts of it.
13657
13658 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13659
13660         * reflection.c: make sure padding bytes in heaps are zeroed.
13661
13662 2004-06-24  David Waite  <mass@akuma.org>
13663
13664         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
13665         image.c, loader.c, locales.c, marshal.c, metadata.c,
13666         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
13667         string-icalls.c, threads.c: change to C90-style comments from C99 /
13668         C++ -style
13669
13670 2004-06-24  Dick Porter  <dick@ximian.com>
13671
13672         * threads.c
13673         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
13674         return createdNew.  Fixes bug 60412.
13675
13676         * threads-types.h: 
13677         * icall.c: Add createdNew parameter to CreateMutex icall
13678
13679 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13680
13681         * reflection.c, object-internals.h: save default value in params.
13682
13683 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13684
13685         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
13686         no need to build a new path combining that with the application base.
13687         Fixes bug #60442.
13688
13689 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13690
13691         * reflection.c: fixed minor standard compliance issues.
13692
13693 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13694
13695         * reflection.c: fixed issue with encoding some custom attributes
13696         (arrays in properties and fields, bug #60411).
13697
13698 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13699
13700         * reflection.c: fix start address when copying the public key token.
13701
13702 2004-06-23  Martin Baulig  <martin@ximian.com>
13703
13704         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
13705         the `exc' object in a static object to put it into the GC's root set.
13706
13707 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13708
13709         * reflection.c: make mono_reflection_setup_internal_class ()
13710         callable a second time to setup a new parent class.
13711
13712 2004-06-23  Dick Porter  <dick@ximian.com>
13713
13714         * threads.c: Check for WAIT_IO_COMPLETION return values.
13715
13716 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
13717
13718         * appdomain.c: Removed the g_free on the public key token. Now copy 
13719         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
13720         * assembly.c: Added public key token string value when loading 
13721         assemblies. Fix bug #60439.
13722         * icall.c: Added missing informations (like public key) in 
13723         GetReferencedAssemblies. Fix #60519.
13724         * image.h: Changed definition for public key token from const char*
13725         public_tok_value to guchar public_key_token [17];
13726         * reflection.c: Updated for changes to public key token.
13727
13728 2004-06-22  Lluis Sanchez Gual
13729
13730         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
13731         for the field in base classes.
13732
13733 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13734
13735         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
13736         mark headers as not supported, they are installed only for use by the
13737         debugger.
13738
13739 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
13740
13741         * *.c, *.h: avoid namespace pollution in public headers.
13742
13743 2004-06-21  Martin Baulig  <martin@ximian.com>
13744
13745         * exception.c (mono_get_exception_security): It's in
13746         "System.Security", not in "System".
13747
13748         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
13749         the exception classes.
13750
13751 2004-06-21  Martin Baulig  <martin@ximian.com>
13752
13753         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
13754         Protect the exception object from being finalized.
13755
13756 2004-06-21  Martin Baulig  <martin@ximian.com>
13757
13758         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
13759         public function.
13760
13761 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
13762
13763         * reflection.c: Load the assembly in mono_reflection_type_from_name,
13764         if it was not loaded before. Fix parts of #60439.
13765
13766 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
13767
13768         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
13769         code that was broken since Ben's change: wrappers are now
13770         dependent on the method signature only again.
13771
13772 2004-06-21  Martin Baulig  <martin@ximian.com>
13773
13774         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
13775         added interface support.
13776
13777 2004-06-21  Martin Baulig  <martin@ximian.com>
13778
13779         * class.c (mono_vtable_get_static_field_data): New public method.
13780
13781 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
13782
13783         * filewatcher.c : Windows build fix to be compliant with API changes.
13784
13785 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13786
13787         * class.h, class.c: more accessors.
13788         * metadata.h, metadata.c: prepare for hiding MonoType and
13789         MonoMethodSignature: people should use the accessors from now on
13790         outside of the tree.
13791
13792 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13793
13794         * *.c, *.h: more API cleanups.
13795
13796 2004-06-18  Jackson Harper  <jackson@ximian.com>
13797
13798         * assembly.c: Trace loading assemblies.
13799         * loader.c: Trace loading native libraries.
13800         * mono-config.c: Trace loading config files.
13801         
13802 2004-06-18  Dick Porter  <dick@ximian.com>
13803
13804         * locales.c: Tell ICU the lengths of strings, it can cope with
13805         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
13806
13807 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13808
13809         * image.c: swapped name/filename;
13810
13811 2004-06-18  Martin Baulig  <martin@ximian.com>
13812
13813         * mono-debug-debugger.c (write_class): Write the parent class at
13814         the end of the header.
13815
13816 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13817
13818         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
13819
13820 2004-06-17  Raja R Harinath  <rharinath@novell.com>
13821
13822         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
13823         (bundle_obj): New conditional define.
13824         (BUILT_SOURCES): Remove.
13825         ($(bundle_srcs)): Make parallel-make safe.
13826         (libmonoruntime_la_LIBADD): Make unconditional.
13827         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
13828         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
13829
13830 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
13831
13832         * culture-info-tables.h: It was inconsistent with the latest
13833           supp info files.
13834
13835 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
13836
13837         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
13838         be loaded.
13839
13840         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
13841         with gcc 2.95.
13842
13843 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13844
13845         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
13846         cleaned up public header threads.h.
13847
13848 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13849
13850         * Makefile.am, *.c, *.h: more API cleanups.
13851
13852 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13853
13854         * Makefile.am: removed monosn from compilation.
13855         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
13856         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
13857         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
13858         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
13859         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
13860         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
13861
13862 2004-06-15  Jackson Harper  <jackson@ximian.com>
13863
13864         * assembly.c: Make locales lower case when searching the GAC for
13865         assemblies. gacutil will always make locales lowercase when
13866         installing so this effectively makes them case insensitive.
13867         
13868 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
13869
13870         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
13871         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
13872           parameter which allows to choose whether the wait can be interrupted or 
13873           not. Also added the method mono_monitor_enter(), which locks the monitor
13874           using an infinite wait and without allowing interruption.
13875           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
13876           interrupted.
13877         * object.h: Added new fields in MonoThread. suspend_event holds the event
13878           used to susped/resume the thread. synch_lock is the lock object to use for
13879           modifying the thread state.
13880         * threads.c: Use the new synch_lock object for locking, instead of "this",
13881           which can generate deadlocks.
13882           Moved thread state change in Thread.Sleep and Thread.Join from managed
13883           to unmanaged code. This avoids a deadlock when the thread was suspended
13884           just after acquiring the thread lock.
13885           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
13886           Implemented Thread.Suspend using an event instead of ThreadSuspend,
13887           which is not fully implemented in the io-layer.
13888         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
13889
13890 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
13891
13892         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
13893         threads-types.h: more API cleanups.
13894
13895 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13896
13897         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
13898         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
13899         threadpool.c, threads.c: first pass at the exported API cleanup.
13900
13901 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13902
13903         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
13904
13905 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13906
13907         * icall.c: added internalGetHome.
13908
13909 2004-06-14  Dick Porter  <dick@ximian.com>
13910
13911         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
13912         possible to return successfully when '.' or '..' were the only
13913         entries in a directory, but were skipped.  The MonoIOStat was not
13914         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
13915         Fixes bug 59574.
13916
13917 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13918
13919         * reflection.c: make binaries run on .Net 1.1 by default.
13920
13921 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13922
13923         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
13924
13925 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
13926
13927         * marshal.c: keep track of struct size with explicit layout
13928         (bug #59979).
13929
13930 2004-06-12  Martin Baulig  <martin@ximian.com>
13931
13932         * mono-debug-debugger.c: Comment out a debugging g_message().
13933
13934 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13935
13936         * reflection.c, reflection.h: do not free custom attrs that are cached.
13937         * icall.c: use braces to make code clearer.
13938
13939 2004-06-11  Martin Baulig  <martin@ximian.com>
13940
13941         * class.h (MonoInflatedField): New type.
13942         (MonoClassField): Replaced `MonoType *generic_type' with
13943         `MonoInflatedField *generic_info'.
13944
13945         * icall.c
13946         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
13947
13948 2004-06-11  Martin Baulig  <martin@ximian.com>
13949
13950         * reflection.c (mono_image_create_method_token): Correctly encode
13951         varargs methods.
13952
13953 2004-06-11  Martin Baulig  <martin@ximian.com>
13954
13955         * metadata.c (mono_metadata_parse_method_signature): When parsing
13956         a MethodDef which has VarArgs, also set sentinelpos if we don't
13957         have any parameters.
13958
13959 2004-06-11  Martin Baulig  <martin@ximian.com>
13960
13961         * verify.c (mono_method_verify): In CEE_CALL, use
13962         mono_method_get_signature() to get the method's signature, unless
13963         we're a PInvoke method.
13964
13965 2004-06-10  Jackson Harper  <jackson@ximian.com>
13966
13967         * assembly.c: Use <path>/lib/mono/gac for the extra paths
13968         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
13969         logical name as the supplied path is just a prefix to the gac not
13970         the direct path to it.
13971         
13972 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
13973
13974         * reflection.c: make the token for a created method match
13975         the token of the MethodBuilder it was created from
13976         (IKVM requires this behaviour now).
13977
13978 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
13979
13980         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
13981         reflection.c, socket-io.c: leak fixes.
13982
13983 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13984
13985         * icall.c: handle sentinel pos in vararg methods in position different
13986         from 0.
13987
13988 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13989
13990         * culture-info-tables.h: freshly generated.
13991
13992 2004-06-09  Martin Baulig  <martin@ximian.com>
13993
13994         * loader.c (mono_get_method_constrained): Call `mono_class_init
13995         (constrained_class)'.   
13996
13997 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
13998
13999         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
14000         any methods. Fixes #59629.
14001
14002 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
14003
14004         * culture-info-tables.h: reflecting locale-builder updates.
14005
14006 2004-06-08  Dick Porter  <dick@ximian.com>
14007
14008         * object.h:
14009         * locales.c: Fixed compile warnings, including a real bug in
14010         CompareInfo_internal_compare.
14011         
14012 2004-06-08  Dick Porter  <dick@ximian.com>
14013
14014         * locales.c
14015         (ves_icall_System_Globalization_CompareInfo_internal_index):
14016         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
14017         Double-check the resuls of usearches, because ICU currently
14018         ignores most of the collator settings here.  Fixes bug 59720.
14019         
14020 2004-06-08  Dick Porter  <dick@ximian.com>
14021
14022         * locales.c
14023         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
14024         Fix memory leak and segfault-causing typo.  No idea how this one
14025         lasted so long without being noticed.
14026
14027 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
14028
14029         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
14030         any methods. Fixes #59629.
14031
14032 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14033
14034         * assembly.c:
14035         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
14036         own the critical section before). Removed dead code (that's done
14037         in the preload hook).
14038
14039         (mono_assembly_load_with_partial_name): call the preload hook.
14040
14041 2004-06-08  Martin Baulig  <martin@ximian.com>
14042
14043         * metadata.c (mono_metadata_signature_alloc): Default
14044         `sentinelpos' to -1.
14045
14046         * reflection.c (mono_image_get_array_token): Likewise.
14047
14048 2004-06-08  Martin Baulig  <martin@ximian.com>
14049
14050         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
14051
14052         * metadata.c (mono_metadata_parse_method_signature): When parsing
14053         a MethodDef which has VarArgs, set sentinelpos.
14054
14055         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
14056         `gint16' since we're using -1 for non-varargs methods.
14057
14058         * reflection.c
14059         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
14060         (method_encode_signature): Added varargs support.
14061         (method_builder_encode_signature): Likewise.
14062         (mono_image_get_varargs_method_token): New static method.
14063         (mono_image_create_method_token): New public method; this is
14064         called via an icall instead of mono_image_create_token() when
14065         calling a varargs method.       
14066
14067 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
14068
14069         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
14070
14071 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
14072
14073         * culture-info-tables.h : Reflecting the latest locale-builder that
14074           fixed empty array representation ({} to {0}).
14075
14076 2004-06-07  Jackson Harper  <jackson@ximian.com>
14077
14078         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
14079         looking up extra gac paths. This allows MONO_GAC_PATH to act
14080         exactly like a prefix.
14081         
14082 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
14083
14084         * reflection.c (mono_reflection_type_from_name): Make a copy of the
14085         type name before modifying it. Fixes #59405.
14086
14087 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
14088
14089         * culture-info.h: added fields for "all datetime patterns".
14090         * locales.c: (  ves_icall_System_Globalization_CultureInfo
14091           _construct_datetime_format ()): fill xxx_patterns fields.
14092         * object.h: added fields for "all datetime patterns" to
14093           MonoDateTimeFormatInfo.
14094         * culture-info-tables.h: reflecting locale-builder updates.
14095
14096 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
14097
14098         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
14099         the event has no add and remove methods. Fixes #59629.
14100
14101 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
14102
14103         * object.c: Fixed possible integer overflow when allocating large
14104         strings.
14105
14106 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
14107
14108         * culture-info-tables.h: reflecting locale-builder updates.
14109
14110 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
14111
14112         * culture-info-tables.h: reflecting locale-builder updates.
14113
14114 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
14115
14116         * culture-info-tables.h: reflecting locale-builder updates.
14117
14118 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
14119
14120         * threads.c: Made Thread.Sleep abortable.
14121
14122 2004-06-02  Martin Baulig  <martin@ximian.com>
14123
14124         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
14125
14126         * debug-mono-symfile.h: Bumped symbol file version number to 37.
14127
14128 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
14129
14130         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
14131
14132 2004-05-30  Jackson Harper  <jackson@ximian.com>
14133
14134         * reflection.c: Do not hardcode assembly versions or public key
14135         tokens anymore. All of this except the corlib section was dead
14136         code anyways.
14137         
14138 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
14139
14140         * object.c (mono_runtime_invoke_array): Automatically create boxed
14141         objects for byref valuetypes if needed. Fixes #59300.
14142         
14143         * object.c (mono_method_return_message_restore): Handle 
14144         MONO_TYPE_OBJECT as well.
14145
14146 2004-05-28  Jackson Harper  <jackson@ximian.com>
14147
14148         * reflection.c: The modified type encoding was causing build
14149         problems. Reverted for now.
14150         
14151 2004-05-28  Jackson Harper  <jackson@ximian.com>
14152
14153         * reflection.c/h: Take an assembly ref so that we dont create
14154         fully qualified names when encoding types in the same assembly as
14155         the custom attribute being emitted.
14156         * appdomain.c: Increment version number.
14157         
14158 2004-05-26  Duncan Mak  <duncan@ximian.com>
14159
14160         * icall.c
14161         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14162         Set the full version number (major, minor, build, revision).
14163
14164 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
14165
14166         * marshal.c (emit_struct_conv): increment src/dst after blit
14167         (mono_marshal_get_managed_wrapper,
14168         mono_marshal_get_native_wrapper): make sure we have marshalling
14169         info before marshalling params (info computation affects
14170         blittable)
14171
14172         * class.c (class_compute_field_layout): correctly deal with
14173         blittable
14174         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
14175         value types (as per what windows dows by default)
14176         (mono_class_setup_mono_type): System.ValueType is blittable
14177         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
14178         blittable
14179
14180         * marshal.c (mono_marshal_load_type_info): flag types  as
14181         non-blittable if the native layout doesn't match the managed
14182         layout
14183
14184 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14185
14186         * appdomain.c: don't add stuff in the private search path that is
14187         above the application base. If application base is not set, there's
14188         no private search path.
14189
14190 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
14191
14192         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
14193         byref struct arguments in native->managed marshalling.
14194
14195 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
14196
14197         * marshal.c (mono_marshal_get_runtime_invoke): correctly
14198         cache methods using signature (special case for methods
14199         that are value type or string class)
14200         
14201         * image.c (mono_image_close): clean up allocated GSList's
14202         in runtime_invoke_cache.
14203
14204 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14205
14206         * mono-config.c: set the correct path for mono_cfg_dir on windows when
14207         there's no MONO_CFG_DIR environment variable defined.
14208
14209 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14210
14211         * threads.c: windows version must be >= 0x0500 to include OpenThread.
14212
14213 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
14214
14215         * threadpool.c: Really wait for 500ms after the async call, even if the wait
14216           is interrumped.
14217         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
14218           before waiting for it, and call CloseHandle after the wait to unref it.
14219           This will make sure that handles are not disposed too early.
14220
14221 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14222
14223         * appdomain.c:
14224         * appdomain.h:
14225         * icall.c: removed
14226         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
14227         needed now.
14228
14229         * object.c: se the application_base only for the domain that runs
14230         Main. Fixes bug #59216,
14231
14232 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14233
14234         * appdomain.c:
14235         * object.c: only the domain in which Main is run have
14236         SetupInformation.ConfigurationFile set, so moved a few lines from
14237         appdomain.c to object.c.
14238
14239 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14240
14241         * appdomain.c: we tried to load [name].(dll|exe), but according
14242         to bug #57710, we must also try [culture]/[name].(dll|exe) and
14243         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
14244         There's a test case attached to bug #58922.
14245
14246 2004-05-27  Dick Porter  <dick@ximian.com>
14247
14248         * icall.c:
14249         * file-io.c: Implemented icalls for locking and unlocking regions
14250         in a file.
14251         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
14252         FALSE on error (fixes both compiler warning and real bug.)
14253
14254 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
14255
14256         * culture-info-tables.h: reflecting locale-builder updates.
14257
14258           (Added missing ChangeLog entry for 05/26)
14259
14260 2004-05-27  Jackson Harper  <jackson@ximian.com>
14261
14262         * locales.c: Fix some cut and paste errors.
14263         
14264 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14265
14266         * mono-config.c: set the correct path for config. directory on windows.
14267
14268 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
14269
14270         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
14271           on win32.
14272
14273 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14274
14275         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
14276         from pinvoke functions.
14277         
14278         * marshal.c (mono_ftnptr_to_delegate): Implement this.
14279
14280 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
14281
14282         * culture-info-tables.h: reflecting locale-builder updates.
14283
14284 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14285
14286         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
14287         #59086.
14288
14289 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
14290
14291         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
14292         * icall.c: Modified icalls for RNG.
14293         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
14294         Windows (CryptoAPI).
14295
14296 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14297
14298         * locales.c: Fix build.
14299
14300 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
14301
14302         * culture-info-tables.h: reflecting locale-builder updates.
14303
14304 2004-05-25  Jackson Harper  <jackson@ximian.com>
14305
14306         * locales.c: When creating the current culture use the $LANGs
14307         specific culture. So DateTimeFormat and NumberFormat entries are created.
14308         
14309 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14310
14311         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
14312         a char array as parameter.
14313
14314 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
14315
14316         * image.c: In mono_image_open(), always use an absolute path name to
14317           look for already loaded images.
14318
14319 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
14320
14321         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
14322         missing in the windows build (like older cygwin include files).
14323
14324 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
14325
14326         * icall.c: Fixed check for possible integer overflow in Buffer_
14327         BlockCopy icall. Replaced comments style // by /* */.
14328
14329 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
14330
14331         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
14332         
14333         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
14334         check after MONO_VTADDR. Fixes pinvoke2.exe.
14335
14336         * marshal.h marshal.c metadata.h: Add beginnings of support for
14337         ftnptr -> delegate marshalling.
14338
14339 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
14340
14341         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
14342         * threads.c: Fix warnings.
14343
14344 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
14345
14346         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
14347         * icall.c: Registered icalls for Suspend and Resume.
14348         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
14349           Thread.Abort.
14350         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
14351         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
14352         * process.c: Use WaitForSingleObjectEx.
14353         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
14354           checkpoints.
14355         * threads.c, threads.h: Make use of new Ex wait methods. Improved
14356           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
14357           for Suspend and Resume. Added new mono_thread_stop, used for stoping
14358           background threads. Added basic support for Abort in Windows.
14359           Start new threads using a managed delegate invoke wrapper. This wrapper
14360           has an interruption checkpoint that is needed since an interruption
14361           can be requested before the thread leaves the unmanaged code that starts 
14362           the thread.
14363         * marshal.c: Added interruption checkpoint after every native call, and
14364           also before managed calls for wrappers called from unmanaged code to
14365           go into managed code.
14366         * object.h: Added new field in MonoThread to keep track of interruption
14367           requests.
14368
14369 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
14370
14371         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
14372         calls.
14373
14374 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14375
14376         * appdomain.c:
14377         * assembly.c:
14378         * gc.c:
14379         * locales.c:
14380         * mono-config.c:
14381         * rand.c: getenv -> g_getenv (windows!)
14382
14383         * process.c: complete_path is also used on non-windows platforms.
14384
14385 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14386
14387         * icall.c: new signature for Process_Start.
14388
14389         * process.[ch]: new signature for Process_Start. If we're on windows
14390         and UseShellExecute is false, we have to search for the program by
14391         ourselves if we don't get a full path.
14392
14393 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14394
14395         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
14396         marshalling and call CleanUpNativeData if needed. Fixes #58646.
14397
14398 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14399
14400         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
14401         Fixes bug #58373.
14402
14403 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14404
14405         * process.c: use double quotes to quote program name and arguments on
14406         windows. Fixes bug #58575.
14407
14408 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14409
14410         * file-io.c: don't return "." and ".." when using windows Find*File.
14411
14412 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
14413
14414         * marshal.c: Don't pass wrappers to message init because method 
14415         addressed used to lookup metadata. part of remoting[2|3] fix.
14416
14417 2004-05-15  Jackson Harper  <jackson@ximian.com>
14418
14419         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
14420         path is essentially the same as MONO_PATH except that it points to
14421         GACs instead of lib directories.
14422         * loader.h: The user gac is gone so we dont need function to
14423         enable/disable it.
14424         * mono-config.c: user gac option is now gone.
14425         
14426 2004-05-15  Jackson Harper  <jackson@ximian.com>
14427
14428         * culture-info.h: Make defines more consistent, add calendar data
14429         to the culture info table.
14430         * culture-info-tables.h: Add basic calendar data. Basically
14431         everyone gets default gregorian until all the data is
14432         updated.
14433         * locales.c: Use the new consistent defines. Set calendar data for
14434         culture info objects.
14435         * object.h: add a field for calendar data to CultureInfo
14436         
14437 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
14438
14439         * image.c: image->runtime_invoke_cache is keyed on signatures now.
14440         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
14441         a signature.
14442         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
14443         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
14444         an extra param that is the pointer of the method to invoke. The IL for
14445         the invoke method is no longer specific to the method, but to the
14446         signature of the method. Thus, we can share the same code for multiple
14447         methods. This reduces the number of methods that have to be compiled.
14448
14449 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
14450
14451         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
14452
14453         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14454
14455         * icall.c: Optimize Buffer.BlockCopy.
14456
14457 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14458
14459         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
14460         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
14461         quote). Changed them to "MMMM yyyy".
14462
14463 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
14464
14465         * rand.c
14466         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
14467
14468 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
14469
14470         * reflection.h: Updated after changes to managed structures.
14471
14472         * appdomain.c: Bump corlib version.
14473
14474 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14475
14476         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
14477         windows.
14478
14479 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14480
14481         * Makefile.am: link to ../os/libmonoos.la on windows.
14482
14483         * assembly.c:
14484                 -If MONO_DEBUG, warn about non-existing directories in
14485                 MONO_PATH.
14486                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
14487                 compile time variable.
14488                 -Removed init_default_path and call mono_set_rootdir from
14489                 libmonoos.a instead (windows only).
14490
14491         * assembly.h: declare mono_assembly_getrootdir().
14492
14493         * domain.c:
14494         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
14495
14496         * loader.c: s/getenv/g_getenv/
14497
14498 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14499
14500         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
14501
14502         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
14503
14504         * metadata.h: Add new marshalling conversions.
14505
14506         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
14507         function.
14508
14509         * reflection.c (mono_reflection_get_type): Lookup the type in all
14510         modules of a multi-module assembly. Fixes #58291.
14511
14512 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14513
14514         * threads.c: Before aborting a background, set the StopRequested
14515         state.  This avoids throwing the Abort exception.
14516         In mono_thread_manage, don't continue with the shutdown until all
14517         aborted threads have actually stopped.
14518
14519 2004-05-10  Jackson Harper  <jackson@ximian.com>
14520
14521         * locales.c: Remove the modifier from culture names.
14522         
14523 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14524
14525         * Makefile.am: monosn is not installed any more. It has been deprecated
14526         in favor of sn.
14527
14528 2004-05-07  Jackson Harper  <jackson@ximian.com>
14529
14530         * locales.c
14531         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
14532         Fix array construction, add bailout if the length is 0.
14533
14534 2004-05-07  Dick Porter  <dick@ximian.com>
14535
14536         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
14537         machine doesn't have a DNS entry.  Patch by Urs Muff
14538         (umuff@quark.com), fixes bug 57928.
14539
14540 2004-05-06  Jackson Harper  <jackson@ximian.com>
14541
14542         * reflection.c: Handle null PublicTokens properly. alloc mem for
14543         assembly names culture so we dont crash when freeing it.
14544         
14545 2004-05-06  Jackson Harper  <jackson@ximian.com>
14546
14547         * assembly.c: Check the usergac when loading with partial names.
14548         
14549 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
14550
14551         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
14552         does nothing for now (not required for Linux/Windows) but the class
14553         library can call it (and a newer or modified runtime could need it).
14554         * icall.c: Registred icall.
14555
14556 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14557
14558         * loader.c: prints a message on module loading error we set MONO_DEBUG
14559         environment variable.
14560
14561 2004-05-05  Jackson Harper  <jackson@ximian.com>
14562
14563         * appdomain.c: Handle PublicKeyToken=null properly.
14564         
14565 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
14566
14567         * environment.c|h: Added icall ves_icall_System_Environment_
14568         GetOSVersionString to get the current OS version as a string.
14569         * icall.c: Registred icall.
14570
14571 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
14572
14573         * object.c: in mono_object_get_virtual_method(), take into account that
14574         non-virtual methods don't have a slot in the vtable. Check needed when
14575         the object is a proxy.
14576
14577 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14578
14579         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
14580         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
14581
14582         * object.c (mono_class_compute_gc_descriptor): Fix warning.
14583
14584         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
14585         passed when a valuetype is expected.
14586
14587         * object.c (mono_unhandled_exception): Only set the exit code if the
14588         exception happens in the main thread. Fixes thread5.exe.
14589
14590         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
14591         invalid names. Fixes #58047.
14592
14593 2004-05-03  Jackson Harper  <jackson@ximian.com>
14594
14595         * assembly.c: This line was committed accidently and is unneeded.
14596         
14597 2004-05-03  Jackson Harper  <jackson@ximian.com>
14598
14599         * icall.c: Add new icall for Assembly::LoadWithPartialName
14600         * assembly.c/.h: new function that probes the GAC to load partial
14601         assembly names by Paolo Molaro.
14602         
14603 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14604
14605         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
14606         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
14607         (type_get_fully_qualified_name): Added PublicKeyToken when building a
14608         full type name.
14609
14610 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14611
14612         * appdomain.c: fixed check for 'neutral' culture and removed warning.
14613         * reflection.c: fix bug when parsing a full type name and Version is not
14614         the last thing in the string.
14615
14616 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
14617
14618         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
14619         crashes when it is freed.
14620
14621 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14622
14623         * assembly.c: print the compat warning to stderr.
14624
14625 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
14626
14627         * assembly.c (mono_assembly_load_references): Add a compatibility
14628         hack to run old applications that might be still referencing the
14629         3300-based assemblies, only do this for System.xxx.
14630
14631 2004-05-01  Jackson Harper  <jackson@ximian.com>
14632
14633         * appdomain.c: If the culture is neutral we set it to "".
14634         
14635 2004-04-29  Jackson Harper  <jackson@ximian.com>
14636
14637         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
14638
14639 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
14640  
14641         * string-icalls.c: added low overhead function for copying chars
14642         * icall.c: added needed icall for the above function
14643  
14644 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14645
14646         * icall.c: fix return value of get_global_assembly_cache.  Implemented
14647         Environment.GetLogicalDrives.
14648
14649 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
14650
14651         * rand.c: try and talk to egd or prngd
14652         for random bytes if opening devices fail.
14653
14654 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14655
14656         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
14657         alignment for the type using the native alignment of its members 
14658         instead of using klass->min_align.
14659
14660         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
14661
14662 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14663
14664         * file-io.c:
14665         * socket-io.c: added check for sys/aio.h.
14666
14667 2004-04-28  Dick Porter  <dick@ximian.com>
14668
14669         * threads.c: Don't abort a thread thats already aborting, when
14670         terminating everything.
14671
14672 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14673
14674         * icall.c: added 2 new async calls for Socket.
14675
14676         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
14677         IO on *nix systems.
14678
14679         * threadpool.c: removed unused variable.
14680
14681 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
14682
14683         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
14684
14685 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
14686
14687         * locales.c: put back string_invariant_tolower () and
14688         string_invariant_toupper ().
14689
14690 2004-04-26 David Waite <mass@akuma.org>
14691
14692         * file-io.h:
14693         * socket-io.h:
14694         * threads.h:
14695         * unicode.h: remove comma from end of enumeration declarations
14696
14697 2004-04-26 David Waite <mass@akuma.org>
14698
14699         * debug-mono-symfile.h:
14700         * decimal.c:
14701         * mono_debug.h:
14702         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
14703
14704
14705 2004-04-26  Jackson Harper  <jackson@ximian.com>
14706
14707         * appdomain.c: Increment version number.
14708         
14709 2004-04-26  Jackson Harper  <jackson@ximian.com>
14710
14711         * appdomain.c: Set assembly references public token value when
14712         PublicKeyToken is specified, not the hash_value. Free public token
14713         values when free assembly name data. Previously the public key
14714         token was hex decoded, however we are using hex encoded public key
14715         tokens, so this is not neccasary.
14716         * assembly.c: Lookup assemblies in the gac if their public token
14717         value is set. Add function to allow enabling user gac
14718         lookups. Specify whether or not the assembly was loaded from the
14719         GAC. Compare full assembly names when checking the cache for
14720         assemblies (Temporarily disabled see comment in code). Remove
14721         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
14722         specifies trace-loader they get extra info to stdout on the
14723         loading of assemblies.
14724         * image.h: Add a field for an assembly references public token
14725         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
14726         whether an assembly has been loaded from the GAC.
14727         * image.c: Remove a corlib -> mscorlib name mapping.
14728         * loader.h: Add function to enable/disable the user gac.
14729         * mono-config.c: Check if the usergac is enabled in the config
14730         file.
14731         * icall.c: New icall to determine whether or not an assembly has
14732         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
14733         * tabldefs.h: Add constant for assemblyref flag that specifies a
14734         full public key is used instead of a public token.
14735         * reflection.c: Remove mscorlib -> corlib mappings. Set
14736         PublicTokenValue instead of hash value. This value is a hex
14737         string so it does not need to be expanded.
14738
14739 2004-04-26  Martin Baulig  <martin@ximian.com>
14740
14741         * mono-debug-debugger.c (mono_debugger_initialize): Set
14742         `mono_debugger_initialized' before calling mono_debug_lock().
14743
14744 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
14745
14746         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
14747           InternalToUpper/InternalToLower.
14748         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
14749           removed invariant culture shortcut.  This is now done in managed code.
14750         * locales.c: (string_invariant_toupper/tolower) removed.
14751
14752 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14753
14754         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
14755         Added Poll internal call.
14756
14757         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
14758         call for Poll. Select was too heavy for polling a single socket.
14759
14760         * threadpool.[ch]: added mono_threadpool_cleanup.
14761         * threads.c: use it. Don't use Thread_Abort on windows.
14762
14763 2004-04-23  Martin Baulig  <martin@ximian.com>
14764
14765         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
14766
14767 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
14768
14769         * icall.c: Registred new icalls for key pair protection and added an
14770         icall for Environment.GetFolderPath on Windows.
14771         * security.c|h: Added new icalls for key pair protection.
14772
14773 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14774
14775         * socket-io.c: don't display the non-supported family warning for known
14776         families. Now this is not displayed on windows when checking support
14777         for IPv4/IPv6.
14778
14779 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14780
14781         * class.c: don't display the layout warning for static fields.
14782
14783 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
14784
14785         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
14786         * locales.c, locales.h: Added new icalls for culture-specific
14787         Char.ToLower and Char.ToUpper.
14788
14789 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14790
14791         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
14792         by David Waite.
14793
14794 2004-04-20  Martin Baulig  <martin@ximian.com>
14795
14796         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
14797         of the type name before passing it to mono_reflection_type_from_name().
14798
14799 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14800
14801         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
14802         encodings here. Fixes #56965.
14803
14804 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
14805
14806         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14807         fix test on strstr result not that I can see anything that
14808         relies on the result.
14809
14810 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14811
14812         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
14813         Fixes #57081.
14814
14815         * marshal.c (mono_marshal_get_string_encoding): New helper function.
14816
14817         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
14818         function to determine which marshalling to use for strings. Fixes
14819         #56965.
14820
14821         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
14822
14823         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
14824
14825 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
14826
14827         * icall.c: #include mono-config.h
14828
14829 2004-04-15  Jackson Harper  <jackson@ximian.com>
14830
14831         * culture-info-tables.h: Fix date formats for en-US culture.
14832         
14833 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
14834
14835         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
14836         ThreadPool.SetMinThreads.
14837         * threadpool.c: Implemented ThreadPool.GetMinThreads and
14838         ThreadPool.SetMinThreads.
14839
14840 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14841
14842         * mono-config.c: also load the .config file in the directory
14843         where the assembly was found.
14844
14845 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14846
14847         * assembly.c: load per-assembly config files.
14848         * icall.c: decrapified code to get the config dir and moved to
14849         mono-config.c.
14850         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
14851         per-assembly config files. When doing a dll map lookup give precedence
14852         to the per-assembly data.
14853
14854 2004-04-14  Martin Baulig  <martin@ximian.com>
14855
14856         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
14857         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
14858         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
14859
14860         * mono-debugger-debugger.c: While the debugger is locked, remember
14861         whether the symbol tables have changes and send one single
14862         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
14863
14864 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14865
14866         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
14867
14868         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
14869         function.
14870
14871         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
14872         account when marshalling string arrays. Fixes #56965.
14873
14874 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
14875
14876         * icall.c: Add new icalls mapping for security.
14877         * security.c|h: Add internal calls for WindowsIdentity,
14878         WindowsImpersonationContext and WindowsPrincipal.
14879
14880 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
14881
14882         * class.c: Added comment to ensure the System.MonoDummy class
14883         is removed when no longer necessary
14884
14885 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14886
14887         * appdomain.c: Pass arguments to the bootstraping exceptions to
14888         minimize JITed methods at boot
14889
14890         * metadata.c (mono_exception_from_name_two_strings): Allow for the
14891         second string to be null.
14892
14893         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14894         Change the protocol to minimize the JIT methods at startup.  Now
14895         it Returns the internal codepage, if the value of "int_code_page"
14896         is 1 at entry, and we can not compute a suitable code page
14897         number, returns the code page as a string.
14898
14899 2004-04-13  Jackson Harper  <jackson@ximian.com>
14900
14901         * culture-info-tables.h: Fix number of decimal digits for all
14902         english locales.
14903
14904 2004-04-13  Jackson Harper  <jackson@ximian.com>
14905
14906         * icall.c: Clairfy out of sync error message. It is not always
14907         your corlib that is out of sync.
14908
14909 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
14910
14911         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
14912         properties when only the set accessor is overriden. Fixes #55874.
14913
14914 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
14915
14916         * assembly.c (mono_assembly_load_references): Make this thread safe.
14917         Fixes #56327.
14918
14919 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14920
14921         * monosn.c: Add missing initialization calls.
14922
14923 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
14924
14925         * locales.c:
14926         ves_icall_System_Globalization_CultureInfo_construct_number_format
14927         Fix g_assert so it compiles on fussier compilers re int/ptr
14928         mismatch
14929
14930 2004-04-08  Dick Porter  <dick@ximian.com>
14931
14932         * socket-io.h:
14933         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
14934         53992.  Also rearrange the code so that the internal calls return
14935         an error value and exceptions are thrown from managed code.
14936
14937         * icall.c: Add type info to the socket icalls.
14938
14939 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14940
14941         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
14942         owes me a beer.
14943
14944 2004-04-07  Martin Baulig  <martin@ximian.com>
14945
14946         * class.c (mono_class_from_generic_parameter): Don't default
14947         `klass->parent' to `mono_defaults.object_type'.
14948
14949 2004-04-07  Martin Baulig  <martin@ximian.com>
14950
14951         * reflection.c (mono_reflection_initialize_generic_parameter): Set
14952         `param->pklass->reflection_info'.       
14953
14954 2004-04-07  Jackson Harper  <jackson@ximian.com>
14955
14956         * culture-info-tables.h: Fix date separator symbol.
14957         
14958 2004-04-07  Martin Baulig  <martin@ximian.com>
14959
14960         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
14961         from System.Type to System.MonoType.
14962
14963 2004-04-07  Martin Baulig  <martin@ximian.com>
14964
14965         * reflection.h
14966         (MonoReflectionGenericParam): Added `has_reference_type' and
14967         `has_value_type' fields.
14968
14969         * reflection.c (mono_image_get_generic_param_info): Encode the
14970         correct flags if we have the `class' or `struct' constraint.
14971
14972 2004-04-07  Martin Baulig  <martin@ximian.com>
14973
14974         * reflection.h
14975         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
14976
14977 2004-04-07  Jackson Harper  <jackson@ximian.com>
14978
14979         * appdomain.c: Revert extra patches, just wanted to bump the
14980         version number.
14981         
14982 2004-04-07  Jackson Harper  <jackson@ximian.com>
14983
14984         * Makefile.am: Add culture-info private headers.
14985         * icall.c: Add new icalls for contructing locales.
14986         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
14987         * locales.h: Declare new culture info construction methods.
14988         * object.h: Add new fields used to avoid the CultureMap to
14989         MonoCultureInfo.
14990         * culture-info.h: Definition of structs used in the culture info
14991         tables.
14992         * culture-info-tables.h: Autogenerated tables that contain culture
14993         info data. This file was generated with the locale-builder tool.
14994         * appdomain.c: Incement corlib version number.
14995         
14996 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
14997
14998         * appdomain.c: (mono_runtime_init) move mono_thread_init
14999         to before mono_object_new calls so critical sections
15000         are initialized before use.
15001
15002 2004-04-07  Martin Baulig  <martin@ximian.com>
15003
15004         * icall.c
15005         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
15006         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
15007         (ves_icall_MonoGenericParam_initialize): Removed.
15008         (monogenericparam_icalls): Removed.
15009         (generictypeparambuilder_icalls): Added new table for
15010         System.Reflection.Emit.GenericTypeParameterBuilder.
15011
15012         * reflection.c
15013         (mono_reflection_define_generic_parameter): Removed.
15014         (mono_reflection_initialize_generic_parameter): This is now called
15015         from GenericTypeParameterBuilder's .ctor.
15016
15017 2004-04-06  Martin Baulig  <martin@ximian.com>
15018
15019         * class.c (mono_class_init): Don't inflate nested classes in a
15020         generic instance.
15021         (mono_type_get_name_recurse): Include the generic arguments for
15022         generic instances and generic type declarations.
15023         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
15024         (_mono_class_get_instantiation_name): Removed.
15025         (mono_class_create_generic): Always use `gklass->name' as our name.
15026
15027         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
15028
15029         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
15030         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
15031         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
15032         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
15033         closed generic methods here.
15034
15035         * reflection.c
15036         (mono_reflection_generic_inst_get_nested_types): Removed.
15037         (inflate_mono_method): Copy the generic parameters from the
15038         MonoMethodHeader into out MonoGenericMethod.
15039
15040 2004-04-06  Martin Baulig  <martin@ximian.com>
15041
15042         * row-indexes.h
15043         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
15044
15045         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
15046
15047         * reflection.c (build_compressed_metadata): If we have any entries
15048         in the GenericParam, MethodSpec or GenericParamConstraint tables,
15049         set the header version to 1.1.
15050
15051 2004-04-06  Martin Baulig  <martin@ximian.com>
15052
15053         * class.c (mono_class_init): If we're a generic instance,
15054         initialize our nested classes, too.
15055         (_mono_class_get_instantiation_name): Deal with the new `!%d'
15056         suffix. 
15057
15058 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15059
15060         * process.c: quote the argument passed to the shell on windows.
15061
15062 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
15063
15064         * threads.c (mono_alloc_special_static_data): Allow this to be
15065         called during startup.
15066
15067 2004-04-02  Martin Baulig  <martin@ximian.com>
15068
15069         * icall.c
15070         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
15071
15072 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
15073
15074         * icall.c: Fix build.
15075
15076 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
15077
15078         * Makefile.am: Added security.c|h.
15079         * icall.c: Added icall for get_UserName;
15080         * security.c: New file for security related icalls. Added function
15081         get_UserName for System.Environment (fix #56144).
15082         * security.h: New. Header file for security.c
15083
15084 2004-04-02  Dick Porter  <dick@ximian.com>
15085
15086         * icall.c: Deleted the icalls that were obsoleted some time ago
15087         by the ICU string code, and which were mixed into the icall
15088         rearranging.  Fixes bug 55969.
15089
15090         * string-icalls.h: 
15091         * string-icalls.c: Deleted the code that those icalls reference.
15092
15093 2004-04-01  Martin Baulig  <martin@ximian.com>
15094
15095         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
15096
15097         * class.c (mono_class_from_generic_parameter): Don't set 
15098         TYPE_ATTRIBUTE_INTERFACE.
15099         (my_mono_class_from_generic_parameter): Likewise.
15100
15101 2004-04-01  Martin Baulig  <martin@ximian.com>
15102
15103         * loader.c (find_method): Added an optional `MonoClass *ic'
15104         argument to search in a specific interface.
15105         (mono_get_method_constrained): New public function.
15106
15107 2004-04-01  Martin Baulig  <martin@ximian.com>
15108
15109         * reflection.c (mono_image_get_generic_field_token): Use the
15110         `handleref' cache here.
15111
15112 2004-04-01  Martin Baulig  <martin@ximian.com>
15113
15114         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
15115
15116         * reflection.c (create_generic_typespec): Use the `typespec' hash
15117         here, not the `typeref' one.    
15118
15119 2004-04-01  Martin Baulig  <martin@ximian.com>
15120
15121         * class.c (mono_class_inflate_generic_type): Moved the
15122         functionality into a new static inflate_generic_type() which
15123         returns NULL if it didn't do anything.  Only increment the
15124         `mono_stats.inflated_type_count' if we actually inflated
15125         something.
15126         (mono_class_get_full): Check the classes type to see whether we
15127         need to inflate it; also inflate MONO_TYPE_(M)VAR.
15128
15129 2004-04-01  Jackson Harper  <jackson@ximian.com>
15130
15131         * reflection.c: Set culture for assembly references.
15132         
15133 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
15134
15135         * reflection.[ch], icall.[ch], Fix support for pinning variables.
15136
15137 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15138
15139         * assembly.c:
15140         (do_mono_assembly_open): the critical section also covers
15141         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
15142
15143 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15144
15145         * threads.c:
15146         (mono_manage_threads): abort the background threads when finishing.
15147         Fixes bug #47232.
15148
15149 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15150
15151         * gc.c: only close the done_event handle if there was no timeout.
15152         C-ified comments.
15153
15154 2004-03-30  Martin Baulig  <martin@ximian.com>
15155
15156         * icall.c (icall_entries): It's called "System.Activator", not
15157         "System.Activation".    
15158
15159 2004-03-30  Martin Baulig  <martin@ximian.com>
15160
15161         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
15162         (mono_class_create_from_typespec): Likewise.
15163
15164 2004-03-30  Martin Baulig  <martin@ximian.com>
15165
15166         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
15167         `has_ctor_constraint' and `initialized'.
15168
15169 2004-03-30  Martin Baulig  <martin@ximian.com>
15170
15171         * reflection.c (encode_new_constraint): New static function to add
15172         the constructor constraint attribute to a type parameter.
15173         (encode_constraints): Call encode_new_constraint() if necessary.
15174
15175         * reflection.h
15176         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
15177
15178         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
15179         
15180 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
15181
15182         * reflection.c, icall.c: add support for pinning variables. 
15183
15184 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
15185
15186         * marshal.c (mono_marshal_get_managed_wrapper):
15187         init bool local with zero rather than null.
15188
15189 2004-03-29  Martin Baulig  <martin@ximian.com>
15190
15191         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
15192         the "official" behavior here.
15193         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
15194
15195 2004-03-29  Martin Baulig  <martin@ximian.com>
15196
15197         * icall.c: Reflect latest API changes.
15198
15199 2004-03-29  Martin Baulig  <martin@ximian.com>
15200
15201         * loader.c (mono_get_method_from_token): Also call
15202         mono_metadata_load_generic_params () for abstract and interface
15203         methods; replace the type arguments in the method signature with
15204         the ones which are loaded from the metadata.
15205
15206 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
15207
15208         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
15209         of the lock is not the current thread. MS.NET don't do it, in spite of
15210         what the documentation says. See bug #56157.
15211
15212 2004-03-28  Martin Baulig  <martin@ximian.com>
15213
15214         * class.c (mono_class_init): Don't call init_properties() and
15215         init_events() for generic instances; set `prop->parent' when
15216         inflating properties.
15217
15218         * reflection.c (mono_generic_inst_get_object): Call
15219         `mono_class_init (ginst->klass)'.
15220         (mono_type_get_object): Only create a MonoGenericInst if your
15221         generic type is a TypeBuilder.
15222         (do_mono_reflection_bind_generic_parameters): Only set
15223         `ginst->is_dynamic' if our generic type is a TypeBuilder.
15224
15225 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
15226
15227         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
15228         Fixes #56091.
15229
15230 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15231
15232         * icall.c: added Kill_internal icall.
15233         * process.[ch]: added Kill_internal icall.
15234
15235 2004-03-25  Martin Baulig  <martin@ximian.com>
15236
15237         * class.h (MonoStats): Added `generic_instance_count',
15238         `inflated_method_count', `inflated_type_count' and
15239         `generics_metadata_size'.       
15240
15241 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15242
15243         * reflection.c: no warnings now.
15244
15245 2004-03-25  Martin Baulig  <martin@ximian.com>
15246
15247         * class.c (mono_class_get_full): New public function; does a
15248         mono_class_get(), but also takes a `MonoGenericContext *'.
15249
15250         * loader.c (mono_field_from_memberref): Renamed to
15251         `field_from_memberref', made static and added `MonoGenericContext *'
15252         argument.
15253         (mono_field_from_token): Added `MonoGenericInst *' argument.
15254         (method_from_memberef): Likewise.
15255         (mono_get_method_from_token): Likewise.
15256         (mono_get_method_full): New public function; does a
15257         mono_get_method(), but also takes a `MonoGenericContext *'.
15258
15259         * verify.c (mono_method_verify): Get the method's generic context
15260         and pass it to mono_field_from_token(), mono_get_method_full() and
15261         mono_class_get_full().
15262
15263 2004-03-25  Martin Baulig  <martin@ximian.com>
15264
15265         * class.c (mono_class_inflate_generic_type): Take a
15266         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
15267         `MonoGenericMethod *'.
15268
15269 2004-03-25  Martin Baulig  <martin@ximian.com>
15270
15271         * loader.h (MonoMethodInflated): Store the MonoGenericContext
15272         instead of the MonoGenericMethod here.
15273
15274 2004-03-25  Martin Baulig  <martin@ximian.com>
15275
15276         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
15277         each time we create a new MonoGenericInst, we also create a new
15278         context which points back to us.
15279
15280         * class.c (inflate_method): Use `ginst->context' instead of
15281         creating a new context.
15282
15283         * loader.c (method_from_memberref): Use
15284         `klass->generic_inst->context' instead of creating a new context.
15285
15286 2004-03-25  Martin Baulig  <martin@ximian.com>
15287
15288         * class.h (MonoGenericContext): New struct.
15289         (MonoGenericMethod): Removed `generic_inst'.
15290
15291         * class.c (mono_class_inflate_generic_method): Take a
15292         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
15293
15294 2004-03-25  Martin Baulig  <martin@ximian.com>
15295
15296         * loader.h (MonoMethodInflated): New typedef.
15297
15298         * metadata.h (MonoMethodSignature): Removed `gen_method', make
15299         `generic_param_count' consume just 30 bits, added `is_inflated'
15300         and `has_type_parameters' flags (one bit each).
15301
15302         * class.c (mono_class_inflate_generic_method): Create a
15303         MonoMethodInflated instead of a MonoMethodNormal and set
15304         `is_inflated' in the method signature.
15305
15306         * class.h (MonoGenericMethod): Removed `generic_method'.
15307
15308 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
15309
15310         * image.c: Make sure the name of a MonoImage is always an absolute path.
15311           This fixes bug #54415.
15312
15313 2004-03-24  Martin Baulig  <martin@ximian.com>
15314
15315         * class.c (mono_class_setup_vtable): If we're a generic instance,
15316         use our generic type's vtable size.
15317
15318 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
15319
15320         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
15321         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
15322         problems.
15323
15324 2004-03-23  Martin Baulig  <martin@ximian.com>
15325
15326         * class.h (MonoDynamicGenericInst): Added `int count_events' and
15327         `MonoEvent *events'.
15328
15329         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
15330         (typebuilder_icalls): Added "get_event_info"; calls
15331         mono_reflection_event_builder_get_event_info(). 
15332
15333         * reflection.c (mono_reflection_generic_inst_initialize): Added
15334         `MonoArray *events'.
15335         (mono_reflection_event_builder_get_event_info): New function.
15336
15337 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
15338
15339         * object.h: add mono_type_initialization_init
15340
15341         * object.c (mono_runtime_class_init): 
15342         implement class constructor synchronization rules
15343         to cope with threading issues.  
15344         add mono_type_initialization_init
15345
15346         * appdomain.c (mono_runtime_init): call 
15347         mono_type_initialization_init
15348
15349         * class.h: removing initializing field from MonoVTable
15350
15351 2004-03-23  Martin Baulig  <martin@ximian.com>
15352
15353         * class.c (my_mono_class_from_generic_parameter): Use
15354         `param->name' if it's not NULL. 
15355
15356 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
15357
15358         * class.c: do not insert non-virtual methods in the vtable.
15359         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
15360         that means the method is non-virtual. This never would have
15361         happened before.
15362
15363 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
15364
15365         * profiler.c: Added lock for accessing coverage_hash.
15366
15367 2004-03-22  Martin Baulig  <martin@ximian.com>
15368
15369         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
15370         `method->method->signature->generic_param_count != 0' to make it
15371         work for interface methods.
15372
15373 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15374
15375         * process.c: quote the string passed to the shell using g_shell_quote.
15376
15377 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15378
15379         * threads.c:
15380         (mono_threads_manage): don't remove the finalizer thread and self
15381         from the threads hash table so that mono_thread_manage can be called
15382         more than once.
15383
15384 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15385
15386         * process.c: quote the arguments when UseShellExecute is true. Fixes
15387         bug #55790.
15388
15389 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15390
15391         * threads.c: set mono_thread_detach as a cleanup routine for every
15392         thread. This way it's always executed upon thread termination, either
15393         aborted or finished normally. No more xsp hangs!
15394
15395 2004-03-17  Martin Baulig  <martin@ximian.com>
15396
15397         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
15398         `int count_nested' and a `MonoType **nested'.
15399
15400         * reflection.c (mono_reflection_bind_generic_parameters): Moved
15401         most of the functionality into a new static
15402         do_mono_reflection_bind_generic_parameters() and don't take a
15403         `MonoType *nested_in' argument any more.  Don't compute nested
15404         types here.
15405         (mono_reflection_generic_inst_get_nested_types): New public method
15406         to get nested types.
15407
15408         * class.c (mono_class_create_generic): Set `klass->nested_in' if
15409         we're a nested class.
15410
15411         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
15412         mono_reflection_generic_inst_get_nested_types() to compute the
15413         nested types.
15414
15415 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15416
15417         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
15418         descriptive error message under windows.
15419         
15420 2004-03-17  Martin Baulig  <martin@ximian.com>
15421
15422         * class.c (dup_type): Added `const MonoType *original' argument;
15423         copy the attrs from the original type.
15424
15425 2004-03-17  Martin Baulig  <martin@ximian.com>
15426
15427         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
15428         `m->generic_inst_cache' here.
15429
15430 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15431
15432         * exception.h exception.c: Add stack_overflow_exception.
15433
15434 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15435
15436         * threadpool.c:
15437         (overlapped_callback): call SetEvent *after* invoking the callback.
15438         No need to call CloseHandle.
15439
15440 2004-03-16  Martin Baulig  <martin@ximian.com>
15441
15442         * reflection.c (mono_image_get_fieldref_token): Take a
15443         `MonoReflectionField *' instead of a `MonoClassField *' and a
15444         `MonoClass *'; store the `MonoReflectionField *' in the hash.
15445
15446 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15447
15448         * appdomain.c: don't add the culture to the filename we're looking for
15449         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
15450
15451 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15452
15453         * locales.c: don't ignore symbols when doing case insensitive compares.
15454         Thanks Dick! Fixes bug #54046.
15455
15456         * threads.c: surround 'threads' usage with enter/leave in
15457         mono_thread_manage.
15458
15459 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
15460
15461         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
15462         implicitly marshalled as [Out]. Fixes #55450.
15463
15464         (mono_marshal_get_runtime_invoke): Zero out the result if there is
15465         an exception.
15466
15467 2004-03-16  Martin Baulig  <martin@ximian.com>
15468
15469         * class.c (mono_class_from_generic_parameter): Use the actual
15470         parameter name. 
15471
15472 2004-03-16  Martin Baulig  <martin@ximian.com>
15473
15474         * reflection.c (type_get_signature_size): New static function.
15475         Compues the size of the type in a method signature.
15476         (method_get_signature_size): New static function; calls
15477         type_get_signature_size() to compute the actual size of the
15478         method's signature.
15479         (method_encode_signature): Use method_get_signature_size() to get
15480         the signature's size rather than using `nparams * 10'.
15481
15482 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15483
15484         * file-io.h: define here WapiOverlapped on windows. I don't want the
15485         regular OVERLAPPED one.
15486
15487         * file-io.c:
15488         * threadpool.c: somehow, BindIoCompletionCallback is not found.
15489         Disabling AIO on windows.
15490
15491 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15492
15493         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
15494         bug #55385.
15495
15496 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15497
15498         * appdomain.c: upgraded corlib version.
15499
15500         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
15501         and BeginWrite. Allow opening files for asynchrnous operations.
15502
15503         * file-io.h: new struct that maps FileStreamAsyncResult.
15504         * icall.c: added new icalls.
15505         * process.[ch]: support setting child process environment variables
15506         and use the SHELL or COMSPEC when UseShellExecute is true.
15507
15508         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
15509         callback for async. IO is here and also BindHandle.
15510
15511         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
15512         from here.
15513
15514 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15515
15516         * reflection.c (create_custom_attr): Allow len == 0.
15517
15518         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
15519         computation on big-endian machines.
15520
15521 2004-03-13  Martin Baulig  <martin@ximian.com>
15522
15523         * class.h (MonoGenericInst): Added `int count_ifaces'.
15524
15525         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
15526         `ginst->count_ifaces' instead `klass->interface_count' since we
15527         may get called before the vtable is created.
15528
15529         * loader.c (mono_method_get_param_names): If we're a generic
15530         instance, return and don't initialize the class.
15531
15532         * reflection.c (mono_reflection_setup_generic_class): Don't call
15533         ensure_runtime_vtable().
15534         (mono_reflection_bind_generic_parameters): Set
15535         `ginst->count_ifaces'.
15536
15537 2004-03-11  Jackson Harper <jackson@ximian.com>
15538
15539         * icall.c:
15540         * unicode.c:
15541         * unicode.h: Remove unused System.Char icalls.
15542         
15543 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
15544
15545         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
15546         code when we P/Invoke the first library in Windows.Forms, instead
15547         of when we first open the assembly.
15548
15549         * assembly.c: Drop the lookup from here.
15550
15551 2004-03-10  Martin Baulig  <martin@ximian.com>
15552
15553         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
15554         class for properties, fields and events.  Finally fixes #54945.
15555
15556 2004-03-10  Martin Baulig  <martin@ximian.com>
15557
15558         * metadata.c (mono_metadata_class_equal): New static function;
15559         checks whether two generic instances or two generic parameters are
15560         equal.
15561         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
15562         compare classes.        
15563
15564 2004-03-10  Martin Baulig  <martin@ximian.com>
15565
15566         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
15567
15568         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
15569         argument and write it into the `reflection_info' field.
15570
15571         * icall.c
15572         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
15573         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
15574
15575 2004-03-09  Jackson Harper  <jackson@ximian.com>
15576
15577         * char-conversions.h: use 8 bits for numeric data its all we need
15578         * icall.c: numeric data is only 8 bits now.
15579
15580 2004-03-09  Martin Baulig  <martin@ximian.com>
15581
15582         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
15583
15584         * class.c (init_properties, init_events): Initialize the new
15585         `parent' field.
15586
15587         * reflection.c (typebuilder_setup_properties): Likewise.
15588         (typebuilder_setup_events): Likewise.
15589
15590         * reflection.h (MonoEventInfo): Replaced `parent with
15591         `declaring_type' and `reflected_type'.
15592
15593         * icall.c (ves_icall_get_property_info): Distinguish between
15594         declaring and reflected type.
15595         (ves_icall_get_event_info): Likewise.
15596
15597 2004-03-09  Martin Baulig  <martin@ximian.com>
15598
15599         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
15600         (ves_icall_Type_GetField): Correctly set field->klass.
15601
15602 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15603
15604         * loader.h: Fix warning.
15605
15606 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
15607
15608         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
15609         library routine if present.  Notice that it will still continue
15610         executing even if its missing, for those working on the Gtk#
15611         edition of Windows.Forms.
15612
15613         * assembly.c (do_mono_assembly_open): If loading the
15614         System.Windows.Forms call mono_loader_wini_init.
15615
15616 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
15617
15618         * class.h: Added MonoRemoteClass struct.
15619         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
15620         function for MonoStrings.
15621         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
15622         Added internal call for getting the proxy type.
15623         * marshal.c: Get the type of transparent proxies from its remote_class.
15624         Added methods that generate the IL for type checks and casts:
15625         mono_marshal_get_isinst, mono_marshal_get_castclass, 
15626         mono_marshal_get_proxy_cancast.
15627         * marshal.h: Declaration of the previous new methods.
15628         * object.c: Added new moethods for creating and updating MonoRemoteClass
15629         instances: mono_remote_class, mono_upgrade_remote_class, 
15630         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
15631         * verify.c: FIx transparent_proxy_fields layout.
15632         * appdomain.c: Bump corlib version.
15633
15634 2004-03-04  Jackson Harper  <jackson@ximian.com>
15635
15636         * icall.c: Add icall to access char conversion tables.
15637         * char-conversions.h: Character conversion tables.
15638         * Makefile.am: Add char-conversions.h private header file.
15639         
15640 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
15641
15642         * appdomain.c (unload_thread_main): Increase unloading timeout to
15643         10 sec as a temporary workaround for Nant problems.
15644
15645 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
15646
15647         * gc.c: Add checks for GC_enable and GC_disable.
15648
15649         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
15650         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
15651         (bug #54988).
15652         
15653 2004-02-27  Martin Baulig  <martin@ximian.com>
15654
15655         * reflection.c (mono_reflection_bind_generic_parameters): Take a
15656         `MonoReflectionType *' instead of a `MonoType *'.
15657
15658 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
15659
15660         * gc.c (run_finalize): Avoid finalizing the object representing the
15661         finalizer thread.
15662         (finalizer_thread): Fix warning.
15663
15664 2004-02-25  Martin Baulig  <martin@ximian.com>
15665
15666         * class.c (_mono_class_get_instantiation_name): Added `int offset'
15667         argument for nested types.
15668         (mono_class_create_generic): Added support for nested generictypes.
15669
15670         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
15671         `GList *nested'.
15672
15673         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
15674
15675         * reflection.c (method_encode_signature): Increase the minimum
15676         value of `size' from 10 to 11.
15677         (mono_reflection_bind_generic_parameters): Take `int type_argc'
15678         and `MonoType **types' arguments instead of the `MonoArray
15679         *types'; added `MonoType *nested_in'.  Recursively instantiate
15680         nested classes. 
15681
15682 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
15683
15684         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
15685         stack_overflow_ex members which are used by exception handling.
15686
15687         * appdomain.c (mono_runtime_init): Initialize the new members.
15688
15689         * gc.c (mono_gc_enable): New helper function.
15690         * gc.c (mono_gc_disable): New helper function.
15691
15692 2004-02-23  Martin Baulig  <martin@ximian.com>
15693
15694         * icall.c: I must have been really stupid - make it actually work
15695         this time ;-)
15696
15697 2004-02-23  Martin Baulig  <martin@ximian.com>
15698
15699         * loader.c (method_from_memberref): Only inflate the method if
15700         it's in another klass.
15701
15702 2004-02-23  Martin Baulig  <martin@ximian.com>
15703
15704         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
15705         (mono_class_init): If we're a generic instance and an interface,
15706         compute `class->interface_id'; also create `class->interfaces'
15707         here and inflate them.
15708
15709         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
15710         `ginst->is_open'.
15711         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
15712
15713         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
15714
15715 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
15716
15717         * reflection.c (method_encode_code): Improved the error message
15718         generated by the exception.
15719
15720 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15721
15722         * icall.c: Martin did not do what he said in the ChangeLog for
15723         2004-02-18, but put back the changes for properties and events.
15724         Commenting those changes out again and adding comment to bug #54518.
15725         
15726         * process.c: removed warning.
15727
15728 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
15729
15730         * marshal.c (emit_struct_conv): Print an error message instead of
15731         asserting when a type does not have the StructLayout attribute.
15732
15733 2004-02-20  Martin Baulig  <martin@ximian.com>
15734
15735         * reflection.c (mono_type_get_object): Also use the cache for
15736         generic instances.
15737         (mono_reflection_bind_generic_parameters): Always compute
15738         `ginst->ifaces'.        
15739
15740 2004-02-20  Martin Baulig  <martin@ximian.com>
15741
15742         * class.h (MonoGenericMethod): Removed `klass'.
15743
15744         * class.c (mono_class_inflate_generic_method): Added `MonoClass
15745         *klass' argument.
15746
15747 2004-02-20  Martin Baulig  <martin@ximian.com>
15748
15749         * reflection.c (method_encode_methodspec): Actually use the
15750         uninflated signature for the memberref.
15751
15752 2004-02-20  Martin Baulig  <martin@ximian.com>
15753
15754         * class.h (MonoGenericMethod): Removed `declaring'.
15755
15756         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
15757         is NULL, compute it here.
15758
15759 2004-02-20  Martin Baulig  <martin@ximian.com>
15760
15761         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
15762
15763         * metadata.c (mono_metadata_generic_inst_hash): New method.
15764         (mono_metadata_generic_inst_equal): New method.
15765
15766         * reflection.c (mono_reflection_bind_generic_parameters): Use the
15767         `klass->image->generic_inst_cache' cache to avoid creating
15768         duplicate MonoGenericInst's.
15769
15770         * class.c (mono_class_inflate_generic_type): Use the cache.
15771
15772 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
15773
15774         * object.c: fixed gc descriptor calculation for embedded valuetypes.
15775
15776 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15777
15778         * icall.c: added Socket.WSAIoctl icall.
15779
15780         * socket-io.[ch]: implemented
15781         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
15782
15783 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
15784
15785         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
15786
15787 2004-02-18  Urs C Muff  <umuff@quark.com>
15788
15789         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
15790         this work on PPC and other big-endian architectures.
15791
15792         * debug-mono-symfile.h: Prepended the names of all the `guint32'
15793         fields with an underscore to make sure they're only accessed by
15794         the read32() macro.
15795
15796 2004-02-18  Martin Baulig  <martin@ximian.com>
15797
15798         * icall.c: Put the klass->refclass changes back for methods and
15799         fields, but not for properties and events.  We're currently not
15800         distinguishing between DeclaringType and ReflectedType for
15801         properties and events, that's what caused the regressions.
15802
15803 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15804
15805         * object.c:
15806         (mono_async_result_new): the handle can be NULL.
15807
15808         * threadpool.c: Use an event instead of a semaphore, don't initialize
15809         it until needed. This saves quite a few semaphores from being created
15810         when using the threadpool.
15811
15812 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
15813
15814         * object.c (mono_string_is_interned_lookup): Fix interning of long
15815         strings. Fixes #54473.
15816
15817         * domain.c (ldstr_equal): Optimize if the two strings are equal.
15818
15819         * icall.c: Revert the klass->refclass changes since they introduce
15820         regressions (bug #54518).
15821
15822 2004-02-18  Martin Baulig  <martin@ximian.com>
15823
15824         * class.c (mono_class_init): If we're a generic instance and don't
15825         come from a TypeBuilder, inflate our members here.
15826         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
15827         (mono_class_create_generic): New public method.
15828         (mono_class_initialize_generic): Removed.
15829         (get_instantiation_name): Renamed to
15830         _mono_class_get_instantiation_name() and made it public.
15831
15832 2004-02-18  Martin Baulig  <martin@ximian.com>
15833
15834         * class.c (mono_class_inflate_generic_type): Clear the new
15835         instance's `nginst->klass' when inflating a generic instance.
15836         (mono_class_is_subclass_of): Added (basic) support for generic
15837         instances.
15838
15839 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
15840
15841         * appdomain.h, domain.c: use a MonoCodeManager instead of a
15842         MonoMempool to hold compiled native code.
15843
15844 2004-02-17  Martin Baulig  <martin@ximian.com>
15845
15846         * class.h (MonoDynamicGenericInst): Added `count_properties' and
15847         `properties'.
15848
15849         * reflection.c (mono_reflection_generic_inst_initialize): Added
15850         `MonoArray *properties' argument.
15851
15852         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
15853
15854 2004-02-17  Martin Baulig  <martin@ximian.com>
15855
15856         * icall.c (ves_icall_Type_GetFields): Renamed to
15857         ves_icall_Type_GetFields_internal() and added a
15858         `MonoReflectionType *rtype' argument; pass it to
15859         mono_field_get_object() to set the field's "reflected" type.
15860         (ves_icall_Type_GetConstructors): Likewise.
15861         (ves_icall_Type_GetEvents): Likewise.
15862         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
15863         argument; pass it to mono_method_get_object() to set the method's
15864         "reflected" type.       
15865
15866 2004-02-17  Martin Baulig  <martin@ximian.com>
15867
15868         * class.h (MonoDynamicGenericInst): New type.
15869         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
15870
15871         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
15872         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
15873         (ves_icall_MonoGenericInst_GetFields): New interncall.
15874
15875         * class.c (mono_class_from_generic): Don't call
15876         mono_class_initialize_generic() if this is a dynamic instance;
15877         ie. it's being created from a TypeBuilder.
15878         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
15879         `class->byval_arg.type'.
15880
15881         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
15882         to `inflate_method' and made static.
15883         (mono_reflection_inflate_field): Removed.
15884         (mono_reflection_generic_inst_initialize): New public method.
15885
15886         * reflection.h (MonoReflectionGenericInst): Removed `methods',
15887         `ctors' and `fields'; added `initialized'.
15888
15889 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
15890
15891         * debug-helpers.c (mono_method_full_name): Fix output for empty
15892         namespaces.
15893
15894 2004-02-12  Martin Baulig  <martin@ximian.com>
15895
15896         * class.h (MonoClassField): Added `MonoType *generic_type'.
15897
15898         * reflection.c (mono_image_get_fieldref_token): Added support for
15899         instantiated generic types.
15900         (field_encode_inflated_field): Removed.
15901         (mono_image_get_inflated_field_token): Removed.
15902         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
15903
15904         * reflection.h (MonoReflectionInflatedField): Removed.
15905
15906 2004-02-12  Martin Baulig  <martin@ximian.com>
15907
15908         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
15909         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
15910
15911         * reflection.c (mono_image_get_methodspec_token): Take a
15912         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
15913         (mono_image_create_token): Check whether we have a
15914         `method->signature->gen_method' and call
15915         mono_image_get_methodspec_token() if appropriate.
15916         (inflated_method_get_object): Removed.
15917         (mono_reflection_bind_generic_method_parameters): Return a
15918         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
15919         (mono_reflection_inflate_method_or_ctor): Likewise.
15920
15921         * reflection.h (MonoReflectionInflatedMethod): Removed.
15922
15923 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
15924
15925         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
15926         for custom valuetype marshalling.
15927
15928         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
15929
15930 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15931
15932         * icall.c: fixed WSAGetLastError_internal name.
15933
15934 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
15935
15936         * threads.c (mono_thread_attach): Allow this to be called multiple
15937         times for a thread.
15938         
15939         * threads.c (build_wait_tids): Do not wait for ourselves.
15940
15941         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
15942         appdomain list is empty.
15943
15944         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
15945         memory returned by mono_string_builder_to_utf16, since it points into
15946         managed memory. Thanks to Bernie Solomon for noticing this.
15947
15948         * icall.c: Add AppDomainSetup icalls.
15949
15950         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
15951
15952         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
15953         types.
15954
15955         * reflection.c (reflection_methodbuilder_to_mono_method): Save
15956         custom attributes to the method_aux struct. Also fix array indexes etc.
15957
15958         * loader.c (mono_method_get_param_names): Make dynamic case work again.
15959         
15960 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
15961
15962         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
15963         (both static and runtime) and reduce startup time.
15964
15965 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
15966
15967         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
15968         AsAny marshalling conversion instead of crashing.
15969
15970         * marshal.c: Fix warnings.
15971
15972 2004-02-09  Martin Baulig  <martin@ximian.com>
15973
15974         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
15975
15976         * reflection.h (MonoReflectionInflatedMethod): Removed the
15977         `declaring' field, it's now in the unmanaged MonoGenericMethod.
15978
15979         * reflection.c (method_encode_methodspec): Removed the `method'
15980         argument; we get it from `gmethod->declaring'.
15981         (inflated_method_get_object): Removed the `declaring' argument.
15982
15983 2004-02-09  Martin Baulig  <martin@ximian.com>
15984
15985         * class.h (MonoGenericMethod): New type.
15986         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
15987         `generic_method'.
15988
15989         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
15990         a `MonoGenericMethod *gen_method' one.
15991
15992         * class.c (mono_class_inflate_generic_type): Take an additional
15993         `MonoGenericMethod * argument.  This is only non-NULL if we're
15994         inflating types for a generic method.   
15995         (mono_class_inflate_generic_signature): Renamed to
15996         inflate_generic_signature() and made static; take a
15997         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15998         (inflate_generic_header): Take a `MonoGenericMethod *' argument
15999         instead of a `MonoGenericInst *' one.
16000         (mono_class_inflate_generic_method): Likewise.
16001
16002         * reflection.c (encode_generic_method_sig): Take a
16003         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
16004         (method_encode_methodspec): Likewise.
16005         (inflated_method_get_object): Likewise. 
16006
16007         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
16008         field with a `MonoGenericMethod *gmethod' one.  
16009
16010 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
16011
16012         * class.h (mono_class_has_parent): add parens to expansion
16013         so you can ! this.
16014
16015 2004-02-08  Martin Baulig  <martin@ximian.com>
16016
16017         * image.h (MonoImage): Removed `generics_cache'.
16018
16019         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
16020         instead of a `MonoType *' argument; removed the `inflate_methods'
16021         argument.  Don't inflate methods here.
16022
16023         * loader.c (find_method): If it's a generic instance, call
16024         mono_class_init() on the `sclass->generic_inst->generic_type'.
16025
16026         * metadata.c (mono_type_size): Make this work on uninitialized
16027         generic instances; call it on the `ginst->generic_type's class.
16028
16029         * reflection.c (mono_reflection_bind_generic_parameters): Call
16030         mono_class_from_generic() to create the `ginst->klass'.
16031
16032 2004-02-08  Martin Baulig  <martin@ximian.com>
16033
16034         * class.h (MonoClass): Changed type of `generic_inst' from
16035         `MonoType *' to `MonoGenericInst *'.
16036
16037 2004-02-08  Martin Baulig  <martin@ximian.com>
16038
16039         * icall.c (ves_icall_Type_BindGenericParameters): Just call
16040         mono_type_get_object(), this is now creating a `MonoGenericInst'
16041         for MONO_TYPE_GENERICINST.
16042         (ves_icall_MonoGenericInst_GetParentType): Likewise.
16043         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
16044
16045         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
16046         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
16047         (inflated_method_get_object): Added `MonoClass *refclass' argument.
16048         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
16049         and reflected type.
16050
16051         * reflection.h (MonoReflectionInflatedMethod): Removed
16052         `declaring_type' and `reflected_type'.
16053
16054 2004-02-08  Martin Baulig  <martin@ximian.com>
16055
16056         * class.h (MonoGenericInst): Added `MonoType *parent' and
16057         `MonoType **ifaces'.
16058
16059         * reflection.h (MonoReflectionGenericInst): Removed `klass',
16060         `parent' and `interfaces'.
16061
16062         * reflection.c (mono_reflection_bind_generic_parameters): Take a
16063         `MonoType *' argument and return a `MonoType *'.
16064
16065         * icall.c
16066         (ves_icall_MonoGenericInst_GetParentType): New interncall.
16067         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
16068
16069 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
16070
16071         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
16072         valuetype marshalling.
16073
16074 2004-02-06  Martin Baulig  <martin@ximian.com>
16075
16076         * class.c
16077         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
16078         (my_mono_class_from_generic_parameter): Likewise.
16079
16080 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
16081
16082         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
16083         contents of the symbol files lazily.
16084
16085         * object.h (MonoThread): Add 'name' and 'name_len' fields.
16086
16087         * threads.h threads.c icall.c: New icalls for getting and setting the
16088         threads name.
16089
16090 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
16091
16092         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
16093         Raise an exception when the domain is not found.
16094
16095 2004-02-03  Martin Baulig  <martin@ximian.com>
16096
16097         * reflection.c (mono_image_get_methodspec_token): Use the
16098         uninflated signature; fixes gen-33.
16099
16100 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
16101
16102         * gc.c threads.c: Make the finalizer thread a normal managed thread so
16103         the finalizer code can use thread functionality.
16104
16105         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
16106         the finalizer thread.
16107
16108         * threads.c: Make some functions more robust.
16109
16110         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
16111
16112         * metadata.h: Add new marshalling conventions.
16113
16114         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
16115         stringbuilder marshalling. Fixes #53700.
16116
16117         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
16118
16119         * reflection.c (mono_image_get_type_info): Save declarative security
16120         info.
16121
16122         * reflection.c (mono_image_get_field_info): Handle uninitialized 
16123         unmanaged fields as well.
16124
16125         * appdomain.c: Bump corlib version.
16126
16127 2004-02-01  Martin Baulig  <martin@ximian.com>
16128
16129         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
16130         method type arguments.  
16131
16132 2004-01-30  Duncan Mak  <duncan@ximian.com>
16133
16134         * marshal.h: Add prototype for
16135         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
16136         and
16137         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
16138         fix the build.
16139
16140 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
16141
16142         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
16143         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
16144
16145 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
16146
16147         * marshal.c (mono_marshal_get_native_wrapper): Add support for
16148         custom marshalling of valuetypes.
16149
16150         * marshal.c: Fix some warnings.
16151
16152 2004-01-29  Martin Baulig  <martin@ximian.com>
16153
16154         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
16155         for generic method parameters.
16156
16157         * reflection.c (method_encode_methodspec): Write the uninflated
16158         signature into the methodspec table.
16159         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
16160         is always the uninflated method.
16161         (reflection_methodbuilder_to_mono_method): Copy the generic
16162         parameters from the MethodBuilder into `header->gen_params'.
16163
16164 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
16165
16166         * class.c (mono_class_from_generic_parameter): Fix warning.
16167
16168 2004-01-27  Martin Baulig  <martin@ximian.com>
16169
16170         * class.c (mono_class_from_generic_parameter): Don't create
16171         `klass->methods' here.  
16172
16173 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
16174
16175         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
16176         extension since it does not work with libraries named lib<FOO>.dll.so.
16177
16178 2004-01-25  Martin Baulig  <martin@ximian.com>
16179
16180         * class.c (mono_class_inflate_generic_type): Added support for
16181         MONO_TYPE_GENERICINST.
16182
16183         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
16184         inflate methods on open constructed types.      
16185
16186 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16187
16188         * object.c: fire ProcessExit event in the root AppDomain after running
16189         Main. Fixes bug #53299.
16190
16191 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16192
16193         * socket-io.c: include the new socket-wrappers.h header.
16194         Use the wrappers instead of the unix socket functions to make the code
16195         more clear.
16196
16197 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
16198
16199         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
16200
16201         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
16202         Fixes #22532.
16203
16204 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
16205
16206         * reflection.c (mono_image_create_pefile): Handle the case when the
16207         entry point is not a MethodBuilder.
16208
16209         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
16210         field to ReflectionMethod since it is not allways a builder.
16211
16212         * reflection.c (type_get_fully_qualified_name): New helper function to
16213         return the fully qualified name of a type.
16214
16215         * reflection.c (encode_marshal_blob): Always emit the fully qualified
16216         type name for custom marshallers.
16217
16218         * reflection.c (mono_marshal_spec_from_builder): Ditto.
16219
16220         * class.c (mono_class_setup_vtable): If a parent class already 
16221         implements an interface, use the implementing methods from that class.
16222         Fixes #53148.
16223
16224 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16225
16226         * threadpool.c: just return instead of ExitThread to allow for thread
16227         clean up earlier.
16228
16229 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
16230
16231         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
16232         when closing resource modules.
16233
16234         * reflection.c (mono_image_create_pefile): Handle the case when the
16235         entry point is not a MethodBuilder.
16236
16237         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
16238         field to ReflectionMethod since it is not allways a builder.
16239
16240 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
16241
16242         * marshal.c (mono_marshal_get_managed_wrapper): 
16243         mono_marshal_alloc takes native int so CONV_I
16244         the arg for 64bits.
16245
16246 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
16247
16248         * reflection.c (fixup_cattrs): New function to fixup the methoddef
16249         tokens in the cattr table. Fixes #53108.
16250
16251 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16252
16253         * loader.c: don't trim ".dll" before looking up in the config file.
16254         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
16255
16256 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
16257
16258         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
16259         Return the module which contains the resource as well.
16260         (ves_icall_System_Reflection_Module_Close): New icall.
16261
16262         * appdomain.c: Bump corlib version number.
16263
16264         * image.c (mono_image_addref): New public function.
16265
16266         * assembly.c: Call mono_image_addref.
16267
16268         * reflection.c (mono_module_get_object): Increase reference count of 
16269         the image.
16270
16271         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
16272         Fixes #22532.
16273
16274         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
16275         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
16276         proper exceptions on DllImport problems.
16277
16278 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
16279
16280         * class.c, metadata.c: eliminate CSIZE macro.
16281
16282 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
16283
16284         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
16285         * object.h: Added async_callback field in MonoAsyncResult.
16286         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
16287         * verify.c: Added async_callback in MonoAsyncResult layout.
16288
16289 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
16290
16291         * reflection.c (mono_reflection_get_custom_attrs): Add support
16292         for Modules.
16293
16294 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
16295
16296         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
16297         marshalling.
16298         (mono_marshal_method_from_wrapper): Add null pointer check.
16299
16300 2004-01-16  Martin Baulig  <martin@ximian.com>
16301
16302         * debug-mono-symfile.h: Set version number to 36 and reflect
16303         latest symbol writer changes.
16304
16305 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
16306
16307         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
16308         multi-dimensional arrays.
16309         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
16310         (mono_class_from_mono_type): Use bounded_array_class_get.
16311         
16312         * class.c (mono_bounded_array_class_get): New function which takes
16313         a 'bounded' bool argument to distinguish vectors from one dimensional
16314         arrays.
16315
16316         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
16317         bounded_array_class_get if the array has bounds.
16318
16319         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
16320         Search modules loaded using AssemblyBuilder:AddModule as well.
16321
16322 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16323
16324         * appdomain.c: increased corlib version.
16325         * filewatcher.c: removed g_print.
16326         * icall.c:
16327         (get_property_info): only allocate what is actually requested.
16328         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
16329
16330 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16331
16332         * Makefile.am: added filewatcher.[ch]
16333         * filewatcher.[ch]: FileSystemWatcher runtime support.
16334         * icall.c: added new FSW icalls.
16335
16336 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
16337
16338         * string-icalls.c: fix stringbuilder regression as suggested by
16339         Iain McCoy <iain@mccoy.id.au>.
16340
16341 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
16342
16343         * process.c (process_read_stringtable_block): Recognize '007f' as
16344         a language neutral stringtable block.
16345
16346 2004-01-12  Patrik Torstensson
16347
16348         * object.h (MonoStringBuilder) : Changed layout to support our
16349         new stringbuilder class.
16350         * marshal.c: Change marshalling to support the new layout of 
16351         string builder.
16352         * appdomain.c: increased version number because new layout of
16353         string builder.
16354
16355 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
16356
16357         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
16358         assembly name as an string instead of an AssemblyName, since it is
16359         easier to extract info from it.
16360
16361         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
16362         the culture subdirectories too. Fixes #52231.
16363
16364 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16365
16366         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
16367         It takes 2 new parameters with an optional name for the method to look
16368         for and case ignoring info.
16369
16370         * threadpool.c: removed unused variable.
16371
16372 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16373
16374         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
16375         It takes 2 new parameters with an optional name for the property to look
16376         for and case ignoring info.
16377         Fixes bug #52753.
16378
16379 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
16380
16381         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
16382         Fix #52451.
16383
16384 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16385
16386         * appdomain.c:
16387         * assembly.c: escape the uri before passing it to g_filename_from_uri.
16388         Fixes bug #52630.
16389
16390 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
16391
16392         * reflection.c: Add support for more than one unmanaged resource.
16393
16394         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
16395         in field->def_value, as done in all other cases.
16396
16397         * reflection.c (mono_reflection_get_custom_attrs): Add support for
16398         TypeBuilders.
16399
16400         * reflection.c (mono_reflection_create_runtime_class): Remove 
16401         errorneous assignment to klass->element_class, since it is already
16402         done in mono_reflection_setup_internal_class.
16403
16404 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16405
16406         * gc.c: added missing LeaveCriticalSection.
16407         * icall.c: indented a couple of lines.
16408         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
16409         if we call EndInvoke inside a callback. Fixes bug #52601.
16410
16411 2004-01-07  Martin Baulig  <martin@ximian.com>
16412
16413         * mono-debug-debugger.h
16414         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
16415
16416 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
16417
16418         * appdomain.c: Use messages in NotImplementedException.
16419
16420         * exception.c (mono_get_exception_not_implemented): Now this takes
16421         a message argument.
16422
16423         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
16424         exception instead of g_asserting an aborting when something is not
16425         implemented.
16426
16427         Add some inline docs.
16428
16429 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
16430
16431         * reflection.h: Update after changes to object layout.
16432
16433         * reflection.c: Implement saving of unmanaged aka win32 resources.
16434
16435         * appdomain.c: Bump version number.
16436
16437         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
16438         Handle missing domains gracefully.
16439
16440 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
16441
16442         * file-io.c : On Windows, there are much more invalid_path_chars.
16443
16444 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16445
16446         * class.h, object.c: prepare for GetType () speedup.
16447
16448 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
16449
16450         * profiler.c: workaround for --profile null reference exception on
16451           cygwin. Patch by Patrik Torstensson.
16452
16453 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
16454
16455         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
16456         make work for unaligned access.
16457
16458 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
16459
16460         * class.c: small cleanup (class->fields [i] -> field).
16461         * image.c: check address of metadata is valid.
16462
16463 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
16464
16465         * assembly.h assembly.c (mono_assembly_loaded): New public function to
16466         search the list of loaded assemblies.
16467
16468         * reflection.c (mono_reflection_type_from_name): Use 
16469         mono_assembly_loaded instead of mono_image_loaded.
16470
16471         * reflection.c: Fix warnings.
16472
16473 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
16474
16475         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
16476         is dynamic. This is needed since an assembly can contain both dynamic and
16477         non-dynamic images.
16478
16479         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
16480         assembly->dynamic.
16481
16482         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
16483
16484         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
16485         to store modules loaded using AddModule.
16486
16487         * reflection.c (mono_image_fill_file_table): Generalize this so it works
16488         on Modules.
16489
16490         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
16491
16492         * reflection.c (mono_image_fill_export_table_from_module): New function to
16493         fill out the EXPORTEDTYPES table from a module.
16494
16495         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
16496         into a separate function. Also handle loaded non-dynamic modules.
16497
16498         * reflection.c (mono_image_basic_init): Fix memory allocation.
16499
16500         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16501
16502         * assembly.c (mono_assembly_load_references): Make this public.
16503
16504 2003-12-19  Martin Baulig  <martin@ximian.com>
16505
16506         * class.c (mono_class_initialize_generic): Made this static, take
16507         a `MonoGenericInst *' instead of a `MonoClass *'.
16508         (mono_class_from_generic): Call mono_class_initialize_generic()
16509         unless we're already initialized or being called from
16510         do_mono_metadata_parse_generic_inst().
16511
16512         * class.h (MonoGenericInst): Added `initialized' and
16513         `init_pending' flags.
16514
16515         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
16516         `mono_class_init (gklass)' or mono_class_initialize_generic()
16517         here; set `generic_inst->init_pending' while parsing the
16518         `type_argv'.
16519
16520 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
16521
16522         * locales.c: include string.h for memxxx prototypes
16523
16524 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
16525
16526         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
16527         constructor when accessing literal fields.
16528
16529 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
16530
16531         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16532
16533         * reflection.c (assembly_add_resource_manifest): New function to fill
16534         the MANIFESTRESOURCE table.
16535
16536         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
16537
16538         * reflection.h: Update to changes in class layout.
16539
16540         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
16541         Reenable call to mono_runtime_is_shutting_down ().
16542
16543         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
16544         determine if the runtime is shutting down.
16545
16546 2003-12-16  Jackson Harper <jackson@ximian.com>
16547
16548         * icall.c: comment out call to mono_runtime_is_shutting_down to
16549         fix build.
16550         
16551 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
16552
16553         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
16554         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
16555
16556 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
16557
16558         * reflection.c: move definition of swap_with_size
16559         to before its first call
16560
16561 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
16562
16563         * appdomain.c (mono_runtime_is_shutting_down): New public function.
16564
16565         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
16566         icall.
16567
16568         * object.c: Fix warnings.
16569
16570         * icall.c (ves_icall_Type_Get...): Only consider inherited static
16571         members if FlattenHierarchy is set.
16572
16573         * reflection.c (mono_image_add_decl_security): New function to emit
16574         declarative security.
16575
16576         * reflection.h reflection.c: Add support for declarative security.
16577
16578         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16579         
16580 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
16581
16582         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16583         
16584         * appdomain.c verify.c: Moved corlib version checking into its own
16585         function in appdomain.c since it needs to create vtables etc.
16586
16587 2003-12-13  Patrik Torstensson <p@rxc.se>
16588
16589         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
16590         instead of unwrapped server.
16591
16592 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
16593
16594         * verify.c (check_corlib): Fix field index.
16595
16596 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
16597
16598         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
16599         GetGacPath icall.
16600
16601 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
16602
16603         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
16604         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
16605         cope with sizeof(size_t) != sizeof(guint32).
16606
16607 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16608
16609         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
16610         in case of failure.
16611
16612 2003-12-10  Mark Crichton <crichton@gimp.org>
16613
16614         * icall.c: removed the GetNonZeroBytes.  We now handle this case
16615         in managed code.
16616
16617         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
16618
16619 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
16620
16621         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
16622         marked as deleted.
16623
16624 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
16625
16626         * verify.c (check_corlib): Handle the case when the version field is 
16627         initialized by a static constructor.
16628
16629 2003-12-08  Patrik Torstensson  <p@rxc.se>
16630
16631     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
16632
16633 2003-12-08  Martin Baulig  <martin@ximian.com>
16634
16635         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
16636         a MonoReflectionGenericParameter, also take the parameter index
16637         and name as arguments.
16638         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
16639         (ves_icall_MonoGenericParam_initialize): New interncall.
16640         (ves_icall_Type_make_byref_type): New interncall.
16641
16642         * reflection.h (MonoReflectionGenericParam): Derive from
16643         MonoReflectionType, not just from MonoObject.  Added `refobj' and
16644         `index' fields.
16645
16646         * reflection.c (mono_reflection_define_generic_parameter): Create
16647         and return a new MonoReflectionGenericParam; don't initialize the
16648         constraints here.
16649         (mono_reflection_initialize_generic_parameter): New public method;
16650         initializes the constraints and creates the `param->pklass'.
16651
16652 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
16653
16654         * reflection.h reflection.c: Use the new fields 'num_types', 
16655         'num_fields' and 'num_methods' to track the number of types etc.
16656
16657         * verify.c (check_corlib): Check corlib version number.
16658
16659 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
16660
16661         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
16662         function works on all methods.
16663
16664 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
16665
16666         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
16667         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
16668         the custom_type_info flag of the transparent proxy.
16669         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
16670         objects that supports IRemotingTypeInfo.
16671         * object.h: Added custom_type_info field in transparent proxy.
16672
16673 2003-12-06  Martin Baulig  <martin@ximian.com>
16674
16675         * class.c (mono_class_create_from_generic): Removed.
16676         (mono_class_from_generic): Check `ginst->klass' before doing
16677         anything else.  This is important to fully support "recursive"
16678         generic types.
16679
16680         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
16681         empty `generic_inst->klass' before doing anything else.
16682
16683 2003-12-06  Dick Porter  <dick@ximian.com>
16684
16685         * verify.c: 
16686         * object.h:
16687         * icall.c:
16688         * locales.c: Use C structs to access class fields.  Don't do a
16689         conversion between MonoString and UChar because both are
16690         platform-endian UTF-16.  Compare now takes startindex and count
16691         parameters.  Add a char overload for IndexOf.  Speed up the
16692         invariant string IndexOf.
16693
16694 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
16695
16696         * Makefile.am (monosn_LDADD): Fix parallel build.
16697
16698 2003-12-04  Martin Baulig  <martin@ximian.com>
16699
16700         * icall.c
16701         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
16702         (ves_icall_Type_make_array_type): New interncall.       
16703
16704 2003-12-04  Martin Baulig  <martin@ximian.com>
16705
16706         * locales.c: also change it in the !HAVE_ICU case.
16707
16708 2003-12-04  Dick Porter  <dick@ximian.com>
16709
16710         * icall.c:
16711         * locales.c: construct_compareinfo is now in CompareInfo, not
16712         CultureInfo.
16713
16714 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
16715
16716         * image.c (mono_image_load_file_for_image): Cache loaded images in the
16717         image->files array.
16718
16719         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
16720         table as well.
16721
16722         * assembly.c (mono_assembly_load_references): Only load references
16723         once.
16724
16725         * class.c (mono_class_from_name): Avoid linear search of the 
16726         EXPORTEDTYPE table.
16727
16728         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
16729
16730 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
16731
16732         * image.h (MonoImage): Add 'field_cache' field.
16733
16734         * loader.c (mono_field_from_token): Cache field lookups.
16735         
16736         * reflection.c (mono_module_get_object): Fix name property.
16737
16738         * icall.c (ves_icall_get_enum_info): Update after changes to 
16739         mono_metadata_get_constant_index ().
16740
16741         * icall.c: Get rid of get_type_info icall, use a separate icall for
16742         each type property to avoid needless memory allocations. Fixes #51514.
16743
16744         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
16745         to avoid needless binary searches.
16746
16747         * class.c (class_compute_field_layout): Move the initialization of
16748         field->def_value to mono_class_vtable ().
16749
16750         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
16751         non-corlib types.
16752
16753         * object.c (mono_object_allocate): Make it inline.
16754
16755         * object.c (mono_object_allocate_spec): Make it inline.
16756         
16757 2003-12-02  Dick Porter  <dick@ximian.com>
16758
16759         * locales.c (create_NumberFormat): NumberFormatInfo construction.
16760         Patch by Mohammad DAMT (mdamt@cdl2000.com).
16761
16762 2003-12-01  Dick Porter  <dick@ximian.com>
16763
16764         * threads.c: Fix signature and call in CreateMutex and
16765         CreateEvent.
16766
16767 2003-12-01  Dick Porter  <dick@ximian.com>
16768
16769         * icall.c: 
16770         * locales.c: Implement string compares and searching
16771
16772         * object.h: Add extra Thread field
16773
16774 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
16775
16776         * reflection.c (fixup_method): Add support for MonoCMethod.
16777
16778 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
16779
16780         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
16781
16782         * reflection.c (assembly_name_to_aname): Allow extra characters in
16783         assembly names. Fixes #51468.
16784
16785 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
16786
16787         * exception.c (mono_exception_from_name_domain): New helper function.
16788
16789         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
16790         exception object in the correct domain.
16791
16792         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
16793         formatting + make a copy a the input data.
16794
16795         * loader.c (mono_get_method_from_token): Methods which contain
16796         native code do not have entries in the ImplMap.
16797
16798         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
16799         Thanks to Gonzalo for spotting this.
16800         
16801         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
16802         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
16803
16804         * assembly.h (mono_assembly_load_from): Split the second part of 
16805         assembly loading into a new public function.
16806
16807         * exception.h (mono_get_exception_bad_image_format): New function.
16808
16809 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
16810
16811         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
16812         Enumerate all modules inside a dynamic assembly. Fixes #51293.
16813         
16814         * icall.c: Add new icall for creating dynamic methods.
16815
16816         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
16817
16818         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
16819
16820         * reflection.c (mono_reflection_create_dynamic_method): New icall to
16821         create a dynamic method.
16822
16823         * reflection.c (resolve_object): New helper function.
16824
16825         * reflection.c: Generalize ReflectionMethodBuilder and the functions
16826         which manipulate it so they can also work on dynamic methods.
16827
16828         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
16829         creating the MonoReflectionMethodAux structure if it is not needed.
16830         
16831         * reflection.h verify.c: Update after changes to object layout.
16832
16833         * reflection.c (method_builder_encode_signature): Fix compilation on
16834         gcc 2.95.x.
16835
16836 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
16837
16838         * appdomain.h: Added support for context static fields. Added static_data
16839           field to MonoAppContext and renamed thread_static_fields to a more
16840           generic special_static_fields in MonoAppDomain, since it can now contain
16841           context static fields.
16842         * domain.c: Updated hashtable name.
16843         * object.c: Replaced field_is_thread_static() for a more generic
16844           field_is_special_static() which also checks for context static attribute.
16845           In mono_class_vtable(), added support for static context fields.
16846         * threads.c: Changed methods that manage thread static fields to more
16847           generic methods so they can be reused both for thread and context static
16848           data.
16849         * threads.h: Declared some new methods.
16850
16851 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
16852
16853         * reflection.h: Update after changes to the managed types.
16854
16855         * reflection.c (encode_custom_modifiers): New helper function.
16856
16857         * reflection.c (method_encode_signature): Emit custom modifiers.
16858
16859         * reflection.c (field_encode_signature): Emit custom modifiers.
16860
16861 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
16862
16863         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
16864
16865         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
16866         implementation.
16867
16868         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
16869         icall.
16870
16871         * object.c (mono_field_get_value_object): New function.
16872
16873         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
16874         specific.
16875
16876 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
16877
16878         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
16879         return a preallocated out-of-memory exception instance.
16880
16881         * object.c (out_of_memory): Use the new function.
16882
16883         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
16884         flag is before the custom modifiers. Fixes #49802.
16885
16886 2003-11-16  Martin Baulig  <martin@ximian.com>
16887
16888         * class.c (mono_class_is_open_constructed_type): Implemented the
16889         MONO_TYPE_GENERICINST case.
16890
16891 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
16892
16893         * assembly.c (mono_assembly_fill_assembly_name): New function to
16894         fill out the MonoAssemblyName structure.
16895         (mono_assembly_open): Use the new function.
16896
16897         * icall.c (fill_reflection_assembly_name): New helper function.
16898
16899         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
16900         new function.
16901
16902         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
16903
16904 2003-11-15  Martin Baulig  <martin@ximian.com>
16905
16906         * class.c (mono_class_is_open_constructed_type): New public
16907         function; checks whether a type is an open constructed type,
16908         ie. whether it still contains type parameters.
16909         (mono_class_inflate_generic_type): If we're a type parameter and
16910         the inflated type is also a MONO_TYPE_(M)VAR, return the original
16911         type.
16912
16913         * class.h (MonoGenericInst): Added `guint32 is_open'.
16914
16915         * loader.c (method_from_methodspec): Check whether we're an open
16916         or closed constructed type and set `ginst->is_open'.
16917
16918         * reflection.c (mono_reflection_bind_generic_parameters): Check
16919         whether we're an open or closed constructed type and set
16920         `ginst->is_open'.
16921         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
16922         from open constructed types.
16923
16924 2003-11-15  Martin Baulig  <martin@ximian.com>
16925
16926         * reflection.c (mono_reflection_bind_generic_parameters): If we're
16927         a generic instance (instead of a generic type declaration) with
16928         unbound generic parameters, bind them to our actual types.
16929
16930 2003-11-14  Martin Baulig  <martin@ximian.com>
16931
16932         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
16933
16934         * reflection.c (mono_reflection_bind_generic_parameters): If we're
16935         an interface type, populate `res->interfaces' with instantiated
16936         versions of all the interfaces we inherit.
16937
16938 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
16939
16940         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
16941         when MONO_PATH is set but doesn't contain the install dir.
16942
16943 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16944
16945         * icall.c:
16946         (ves_icall_Type_GetInterfaces): don't return an interface twice when
16947         it's also implemented in base classes. Fixes bug #50927.
16948
16949 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
16950
16951         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
16952         if this method is called from a finalizer. Fixes #50913.
16953
16954 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
16955
16956         * threads.c: Implement VolatileRead/VolatileWrite
16957
16958         * icall.c: Add new icalls for VolatileRead/VolatileWrite
16959
16960 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16961
16962         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
16963         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
16964         2.95.3.
16965
16966         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
16967         from Peter Ross (pro@missioncriticalit.com).
16968         
16969 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
16970
16971         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
16972
16973 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16974
16975         * assembly.c (mono_assembly_load_references): Disable check because it
16976         triggers on older corlibs which lots of people have.
16977
16978 2003-11-12  Jackson Harper  <jackson@ximian.com>
16979
16980         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
16981         load corlib.dll if mscorlib.dll is not found.
16982         * assembly.h: Remove corlib name define.
16983         * class.c:
16984         * domain.c:
16985         * image.c: Change corlib name to mscorlib.
16986         
16987 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16988
16989         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
16990
16991 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
16992
16993         * appdomain.h: Added loader_optimization here to sync with the C#
16994         code, and add disallow_binding_redirects field.
16995
16996 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
16997
16998         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
16999
17000         * reflection.c (mono_image_build_metadata): Fix crash on modules
17001         with no types.
17002
17003         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
17004
17005         * icall.c (ves_icall_get_method_info): Return callingConvention as
17006         well.
17007
17008         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
17009         namespaces from the EXPORTEDTYPE table as well.
17010
17011         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
17012         from all modules inside the assembly.
17013         
17014 2003-11-11  Martin Baulig  <martin@ximian.com>
17015
17016         * reflection.c (mono_reflection_bind_generic_parameters): Make
17017         this work for interfaces.
17018
17019 2003-11-11  Martin Baulig  <martin@ximian.com>
17020
17021         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
17022
17023 2003-11-11  Martin Baulig  <martin@ximian.com>
17024
17025         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
17026         "MonoInflatedMethod" and "MonoInflatedCtor".
17027
17028 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
17029
17030         * reflection.c (resolution_scope_from_image): Use the assembly table
17031         from the manifest module, since other modules don't have it.
17032
17033         * debug-helpers.c (mono_type_full_name): New helper function.
17034
17035         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
17036
17037         * image.c (mono_image_load_file_for_image): New public function which
17038         is a replacement for the load_file_for_image in class.c.
17039
17040         * assembly.c (mono_assembly_load_module): A wrapper for the function
17041         above which does assembly association and reference loading too.
17042
17043         * class.c (mono_class_from_name): Call mono_assembly_load_module.
17044
17045 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17046
17047         * appdomain.c: not all of the attributes for the full assembly name
17048         are required and the order doesn't matter. Fixes bug #50787.
17049
17050 2003-11-10  Dick Porter  <dick@ximian.com>
17051
17052         * locales.c: Use platform-endian UTF16
17053
17054 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
17055
17056         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
17057         
17058 2003-11-10  Martin Baulig  <martin@ximian.com>
17059
17060         * metadata.c
17061         (mono_metadata_load_generic_params): Make this actually work.
17062
17063         * reflection.c (mono_reflection_bind_generic_parameters): If our
17064         parent is a generic instance, pass all the `types' to it, no
17065         matter whether it has the same number of type parameters or not.
17066
17067 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
17068
17069         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
17070
17071         * assembly.c (mono_assembly_load_references): Move the image<->assembly
17072         assignment code to this function so it gets called recursively for all
17073         modules.
17074
17075         * image.c (load_modules): Remove the assembly assignment since it is
17076         now done by mono_assembly_load_references.
17077         
17078         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
17079         Add 'module' argument.
17080         (mono_module_get_types): New helper function.
17081         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
17082
17083 2003-11-08  Martin Baulig  <martin@ximian.com>
17084
17085         * class.c (mono_class_inflate_generic_method): Interface method
17086         don't have a header.
17087
17088         * reflection.c (mono_image_get_methodspec_token): Take an
17089         additional `MonoGenericInst *' argument instead of reading it from
17090         the header; this is necessary to support interfaces.
17091         (mono_image_create_token): Pass the `MonoGenericInst *' from the
17092         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
17093         (inflated_method_get_object): Take an additional `MonoGenericInst *'
17094         argument.
17095
17096         * reflection.h (MonoReflectionInflatedMethod): Added
17097         `MonoGenericInst *ginst'.
17098
17099 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
17100
17101         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
17102
17103 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
17104
17105         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
17106
17107 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
17108
17109         * reflection.c 
17110         (reflection_methodbuilder_from_method_builder):
17111         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
17112         initialize a ReflectionMethodBuilder structure.
17113         (mono_image_get_methodbuilder_token):
17114         (mono_image_get_ctorbuilder_token): New functions to emit memberref
17115         tokens which point to types in another module inside the same assembly.
17116
17117         * reflection.c: Use the new helper functions.
17118         
17119         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
17120
17121         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
17122         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
17123
17124         * reflection.c (resolution_scope_from_image): Emit a moduleref if
17125         neccesary.
17126
17127         * reflection.c (mono_image_build_metadata): Emit metadata only for the
17128         current module. Emit the manifest only for the main module.
17129
17130         * reflection.c (mono_image_create_token): Add assertion when a 
17131         memberref needs to be created.
17132
17133         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
17134
17135         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
17136         larger buffer for the custom attribute blob. Fixes #50637.
17137         
17138 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17139
17140         * threadpool.c: notify listener on async processing handles after
17141         invoking the async callback. Thanks to Zoltan.
17142
17143 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
17144
17145         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
17146         avoid code duplication.
17147
17148         * reflection.h (MonoDynamicImage): New type which is currently unused,
17149         but will be used through the ref.emit code in place of 
17150         MonoDynamicAssembly.
17151
17152         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
17153         object layout.
17154
17155         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
17156         a MonoDynamicImage instead of just a MonoImage.
17157         
17158         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
17159         icalls to ModuleBuilder but keep their semantics, so they will work
17160         with moduleb->assemblyb. This will change later.
17161         
17162 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
17163
17164         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
17165         object layout.
17166
17167         * reflection.c (mono_image_build_metadata): Avoid creation of a default
17168         main module, since it is now done by the managed code.
17169
17170 2003-11-03  Martin Baulig  <martin@ximian.com>
17171
17172         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
17173         `ginst->klass' here.
17174         (method_encode_methodspec): Don't use the `ginst->generic_method's
17175         klass if it's a generic instance, use `ginst->klass' in this case.
17176
17177 2003-11-03  Martin Baulig  <martin@ximian.com>
17178
17179         * reflection.c (mono_image_get_generic_method_param_info):
17180         Removed, use mono_image_get_generic_param_info() instead.
17181         (mono_image_get_type_info): Write the GenericParam table before
17182         the Method table.  This is neccessary because in the GenericParam
17183         table, type parameters of the class (ie. '!0' etc.) must come
17184         before the ones from its generic methods (ie. '!!0' etc).
17185
17186 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
17187
17188         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
17189
17190 2003-11-02  Martin Baulig  <martin@ximian.com>
17191
17192         * reflection.c (create_generic_typespec): Take a
17193         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
17194         the generic parameters from it.
17195
17196 2003-11-02  Martin Baulig  <martin@ximian.com>
17197
17198         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
17199         instead of a `MonoClassField *' since we just need the type.
17200         (create_generic_typespec): New static function.  Creates a
17201         TypeSpec token for a generic type declaration.
17202         (mono_image_get_generic_field_token): New static function.
17203         (mono_image_create_token): If we're a FieldBuilder in a generic
17204         type declaration, call mono_image_get_generic_field_token() to get
17205         the token.
17206
17207 2003-11-02  Martin Baulig  <martin@ximian.com>
17208
17209         * reflection.h
17210         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
17211         `MonoReflectionGenericInst *declaring_type' and
17212         `MonoReflectionGenericInst *reflected_type' fields.
17213
17214         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
17215         `MonoReflectionGenericInst *declaring_type' and a
17216         `MonoReflectionGenericInst *reflected_type' argument instead of a
17217         single `MonoReflectionGenericInst *type' one.  Set
17218         `res->declaring_type' and `res->reflected_type' from them.
17219         (mono_reflection_inflate_field): Likewise.      
17220
17221 2003-11-02  Martin Baulig  <martin@ximian.com>
17222
17223         * class.c (mono_class_setup_vtable): Don't store generic methods
17224         in the vtable.  
17225
17226 2003-11-02  Martin Baulig  <martin@ximian.com>
17227
17228         * reflection.h (MonoReflectionGenericInst): Added
17229         `MonoReflectionType *declaring_type'.
17230
17231         * reflection.c (mono_reflection_bind_generic_parameters): Use
17232         `if (tb->parent)' instead of `klass->parent'.
17233
17234 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
17235
17236         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
17237         with an empty ASSEMBLY table.
17238
17239         * reflection.c (mono_image_build_metadata): Avoid using the same loop
17240         variable in the inner and outer loops.
17241
17242 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
17243
17244         * metadata.h (mono_metadata_make_token): Put parentheses around macro
17245         argument.
17246
17247         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
17248         
17249         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
17250         icalls. Instead, do everything in managed code. This is needed since
17251         it is hard to restore the original domain etc. in unmanaged code in the
17252         presence of undeniable exceptions.
17253
17254         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
17255         New icalls to push and pop appdomain refs.
17256
17257 2003-10-31  Martin Baulig  <martin@ximian.com>
17258
17259         * class.c (inflate_generic_type): Renamed to
17260         mono_class_inflate_generic_type() and made it public.
17261
17262         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
17263         New interncall.
17264
17265         * loader.c (mono_field_from_memberref): Also set the retklass for
17266         typespecs.
17267
17268         * fielder.c (mono_image_get_inflated_field_token): New static
17269         method; creates a metadata token for an inflated field.
17270         (mono_image_create_token, fixup_method): Added support for
17271         "MonoInflatedField".
17272         (fieldbuilder_to_mono_class_field): New static function.
17273         (mono_reflection_inflate_field): New public function.
17274
17275         * reflection.h
17276         (MonoReflectionGenericInst): Added `MonoArray *fields'.
17277         (MonoReflectionInflatedField): New typedef.     
17278
17279 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
17280
17281         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
17282         for Solaris and other platforms without s6_addr16
17283
17284 2003-10-30  Martin Baulig  <martin@ximian.com>
17285
17286         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
17287         argument instead of two.
17288         (mono_class_inflate_generic_signature): Likewise.
17289         (inflate_generic_header): Likewise.
17290         (mono_class_inflate_generic_method): Likewise.  In addition, if
17291         `ginst->klass' is set, it becomes the new `method->klass'.
17292
17293         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
17294         field.
17295
17296         * reflection.c (encode_generic_method_sig): Write a 0xa as the
17297         first byte. [FIXME]
17298         (method_encode_methodspec): If we have generic parameters, create
17299         a MethodSpec instead of a MethodRef.
17300         (fixup_method): Added support for "MonoInflatedMethod" and
17301         "MonoInflatedCtor".
17302         (mono_image_create_token): Added support for "MonoInflatedMethod"
17303         and "MonoInflatedCtor".
17304         (inflated_method_get_object): New static function; returns a
17305         managed "System.Reflection.MonoInflatedMethod" object.
17306         (mono_reflection_bind_generic_method_parameters): Return a
17307         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
17308         (mono_reflection_inflate_method_or_ctor): Likewise.
17309         (mono_image_get_generic_method_param_info): Initialize unused
17310         fields to zero.
17311         (mono_image_get_generic_param_info): Likewise.
17312
17313         * reflection.h (MonoReflectionInflatedMethod): New public
17314         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
17315         "S.R.MonoInflatedCtor" classes.
17316
17317         * loader.c (method_from_memberref): If we're a TypeSpec and it
17318         resolves to a generic instance, inflate the method.
17319
17320 2003-10-28  Dick Porter  <dick@ximian.com>
17321
17322         * object.c (mono_runtime_run_main): Convert command-line arguments
17323         into utf8, falling back to the user's locale encoding to do so.
17324
17325 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
17326
17327         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
17328         at this time.
17329
17330         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
17331
17332         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
17333         up icalls at method definition time. Partially fixes #33569.
17334
17335 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
17336
17337         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
17338         marshalling of arrays. Fixes #50116.
17339
17340         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
17341
17342         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
17343         points to a vtable in the dying appdomain.
17344
17345         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
17346         listeners into unmanaged code inside the lock.
17347
17348         * object.c (mono_class_vtable): Turn off typed allocation in non-root
17349         domains and add some comments.
17350
17351 2003-10-25  Martin Baulig  <martin@ximian.com>
17352
17353         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
17354
17355         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
17356
17357         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
17358         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
17359         currently parsing.  Create the generic class and store it in
17360         `generic_inst->klass' before parsing the type arguments.  This is
17361         required to support "recursive" definitions; see mcs/tests/gen-23.cs
17362         for an example.
17363         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
17364         to support recursive typespec entries.
17365
17366         * class.c (mono_class_setup_parent): If our parent is a generic
17367         instance, we may get called before it has its name set.
17368         (mono_class_from_generic): Splitted into
17369         mono_class_create_from_generic() and mono_class_initialize_generic().
17370
17371 2003-10-25  Martin Baulig  <martin@ximian.com>
17372
17373         * icall.c (ves_icall_Type_BindGenericParameters): Return a
17374         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
17375         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
17376         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
17377
17378         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
17379         (create_typespec): Likewise.
17380         (mono_reflection_bind_generic_parameters): Return a
17381         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
17382         (mono_reflection_inflate_method_or_ctor): New public function.
17383
17384         * reflection.h (MonoReflectionGenericInst): New typedef.        
17385
17386 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
17387
17388         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
17389         inside the domain lock. Fixes #49993.
17390         
17391         * object.c (mono_class_vtable): When typed allocation is used, 
17392         allocate vtables in the GC heap instead of in the mempool, since the
17393         vtables contain GC descriptors which are used by the collector even
17394         after the domain owning the mempool is unloaded.
17395
17396         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
17397
17398         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
17399         reflect what it does. Also invalidate mempools instead of freeing
17400         them if a define is set.
17401
17402         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
17403         of the appdomain.
17404         
17405         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
17406         hold the finalizable objects in this domain.
17407
17408         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
17409         appdomain.
17410
17411         * appdomain.c (mono_domain_set): New function to set the current
17412         appdomain, but only if it is not being unloaded.
17413
17414         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
17415         appdomain which is being unloaded.
17416         
17417         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
17418         unloading of the root appdomain.
17419
17420         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
17421         icall to execute a method in another appdomain. Intended as a 
17422         replacement for InternalSetDomain, which can confuse the code 
17423         generation in the JIT.
17424
17425         * appdomain.c (mono_domain_is_unloading): New function to determine
17426         whenever an appdomain is unloading.
17427
17428         * appdomain.c (mono_domain_unload): New function to correctly unload
17429         an appdomain.
17430
17431         * assembly.c (mono_assembly_load_references): Check that an assembly
17432         does not references itself.
17433
17434         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
17435         domain manually, it asks the finalizer thread to do it, then waits for
17436         the result. Also added a timeout.
17437
17438         * icall.c: Register the new icalls.
17439
17440         * threads.h threads.c: Export the mono_gc_stop_world and 
17441         mono_gc_start_world functions.
17442         
17443         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
17444         function to fill out the mempool with 0x2a.
17445
17446 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
17447
17448         * reflection.h (MonoReflectionMethodAux): New structure to store
17449         information which is rarely used, thus is not in the MonoMethod
17450         structure.
17451
17452         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
17453         store the aux info.
17454
17455         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
17456         and marshalling info into the aux structure.
17457
17458         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
17459         from the aux structure.
17460
17461         * loader.c (mono_method_get_param_names): Retrieve the param names from
17462         the aux structure.
17463         
17464 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
17465
17466         * exception.h exception.c: Add AppDomainUnloadedException && fix 
17467         warning.
17468
17469 2003-10-21  Dick Porter  <dick@ximian.com>
17470
17471         * socket-io.c
17472         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
17473         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
17474
17475 2003-10-21  Martin Baulig  <martin@ximian.com>
17476
17477         * reflection.c (mono_reflection_bind_generic_parameters):
17478         `klass->parent' is NULL for interfaces.
17479
17480 2003-10-21  Martin Baulig  <martin@ximian.com>
17481
17482         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17483
17484 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
17485
17486         * exception.c (mono_exception_from_name_msg): New helper function for
17487         creating exceptions and initializing their message field.
17488
17489         * exception.c: Simplify functions using the new helper.
17490
17491         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
17492         New function.
17493
17494         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
17495         mono_raise_exception, since otherwise gcc doesn't generate the function
17496         epilog for raise_exception, confusing the stack unwinding in the JIT.
17497         Fixes #45043.
17498
17499         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
17500         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
17501         Fixes #49499.
17502
17503 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17504
17505         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
17506         utf8.
17507
17508 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
17509
17510         * icall.c: Removed GetUninitializedObject method because
17511           AllocateUninitializedClassInstance does the same.
17512
17513 2003-10-18  Martin Baulig  <martin@ximian.com>
17514
17515         * class.c (inflate_generic_signature): Renamed to
17516         mono_class_inflate_generic_signature() and made it public.
17517         (my_mono_class_from_generic_parameter): New static function; if we
17518         don't already have the generic parameter's MonoClass, create a
17519         very simple one which is just used internally in the runtime and
17520         not passed back to managed code.
17521
17522         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
17523
17524         * metadata.h (MonoMethodSignature): Moved the
17525         `MonoGenericParam *gen_params' to the MonoMethodHeader.
17526         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
17527
17528         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
17529         ves_icall_MonoMethod_GetGenericArguments(); this is now an
17530         interncall on the MonoMethod class, not on MethodInfo.
17531         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
17532         calling mono_reflection_bind_generic_method_parameters() directly.
17533
17534         * loader.c (mono_method_get_signature): If this is a MethodSpec;
17535         return the already computed `method->signature'.
17536         (method_from_methodspec): New static function to load a method
17537         from a MethodSpec entry.
17538         (mono_get_method_from_token): Call the new method_from_methodspec()
17539         for MethodSpec tokens.  
17540         (mono_get_method_from_token): If we're a generic method, load the
17541         type parameters.
17542
17543         * reflection.c (mono_image_get_memberref_token): Allow
17544         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
17545         table.
17546         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
17547         (mono_image_create_token): First check whether it's a generic
17548         method (so we'd need to create a MethodSpec), then do the other
17549         two alternatives.
17550         (mono_reflection_bind_generic_method_parameters): Return a
17551         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
17552         called directly from the interncall.
17553
17554 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
17555
17556         * reflection.c (load_public_key): Move loading of the public key
17557         into managed code.
17558
17559         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
17560
17561         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
17562         fields.
17563
17564         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
17565         culture, hash_alg and public_key. Fixes #49555.
17566
17567 2003-10-17  Martin Baulig  <martin@ximian.com>
17568
17569         * class.h (MonoGenericInst): Moved this declaration here and added
17570         `MonoMethod *generic_method'.
17571
17572         * icall.c
17573         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
17574         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
17575
17576         * metadata.c (mono_metadata_type_equal): Two types of
17577         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
17578         index; ie. don't compare the address of the `MonoGenericParam'
17579         structure.
17580         (mono_metadata_load_generic_params): Removed the `MonoMethod
17581         *method' argument.
17582
17583         * metadata.h (MonoGenericInst): Moved declaration to class.h.
17584         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
17585
17586         * reflection.c (method_encode_signature): Encode the number of
17587         generic parameters.
17588         (encode_generic_method_sig): New static function.
17589         (method_encode_methodspec): New static function; creates an entry
17590         in the MethodSpec table for a generic method.
17591         (mono_image_get_methodspec_token): New static function.
17592         (mono_image_create_token): Call mono_image_get_methodspec_token()
17593         for generic methods.
17594         (mono_reflection_bind_generic_method_parameters): New public
17595         function.  Instantiates a generic method.
17596
17597 2003-10-16  Martin Baulig  <martin@ximian.com>
17598
17599         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
17600         *gen_params' here from MonoMethodHeader.
17601
17602         * metadata.c (mono_metadata_parse_method_signature): If we have
17603         generic parameters, initialize `method->gen_params' and then set
17604         the correct `type->data.generic_param' in all the parameters.
17605
17606 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
17607
17608         * threads.c (mono_threads_get_default_stacksize): New function to 
17609         return the default stacksize.
17610
17611         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
17612         termination of the finalizer thread, since the previous method had
17613         race conditions. Fixes #49628.
17614
17615         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
17616         as for the other managed threads.
17617
17618 2003-10-16  Martin Baulig  <martin@ximian.com>
17619
17620         * class.c (inflate_generic_signature): Copy `generic_param_count'
17621         and `gen_params'.
17622
17623         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
17624         New interncall.
17625
17626         * metadata.c (mono_metadata_parse_method_signature): Actually set
17627         the `method->generic_param_count' here.
17628         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
17629
17630 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
17631
17632         * object.h: Add a new field to TypedRef to simplify the implementation
17633         of the REFANY opcodes in the JIT.
17634
17635         * icall.c: Make use of the new field.
17636
17637         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
17638         dynamically.
17639
17640 2003-10-15  Martin Baulig  <martin@ximian.com>
17641
17642         * class.c (mono_class_from_gen_param): Renamed to
17643         mono_class_from_generic_parameter() and moved most of the
17644         functionality from mono_reflection_define_generic_parameter()
17645         here; ie. we create a "real" class here.
17646         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
17647         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
17648         previously been called.
17649
17650         * class.h (MonoGenericParam): Moved the declaration of this struct
17651         here from metadata.h and added `MonoMethod *method'.
17652
17653         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
17654         interncall.
17655
17656         * loader.c (mono_get_method_from_token): If we have any generic
17657         parameters, call mono_metadata_load_generic_params() to read them
17658         from the MONO_TABLE_GENERICPAR.
17659
17660         * metadata.c (mono_metadata_load_generic_params): Added
17661         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
17662
17663         * metadata.h (MonoMethodSignature): Replaced
17664         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
17665         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
17666
17667         * reflection.c (mono_reflection_define_generic_parameter): Moved
17668         most of the functionality into the new
17669         mono_class_from_generic_parameter(); set the `method' field if
17670         we're a method parameter.       
17671
17672 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
17673
17674         * marshal.c (emit_struct_conv): if native size is 0
17675         emit no code.
17676
17677 2003-10-14  Martin Baulig  <martin@ximian.com>
17678
17679         * icall.c: The generics API has changed in the spec since it was
17680         added to System.Type; these modifications make it match the spec
17681         again.
17682         (ves_icall_Type_GetGenericParameters): Renamed to
17683         `ves_icall_Type_GetGenericArguments'.
17684         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
17685         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
17686         `ves_icall_MonoType_get_HasGenericArguments'.
17687         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
17688         `ves_icall_MonoType_get_IsGenericParameter'.
17689         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
17690         this is no interncall anymore.
17691         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
17692         `ves_icall_TypeBuilder_get_IsGenericParameter'.
17693
17694 2003-10-14  Martin Baulig  <martin@ximian.com>
17695
17696         * reflection.c (mono_reflection_bind_generic_parameters): Also
17697         inflate generic methods if we're reading the class from IL.
17698
17699 2003-10-13  Martin Baulig  <martin@ximian.com>
17700
17701         * reflection.c (mono_reflection_define_generic_parameter): This
17702         method isn't called directly from the icall anymore; take a
17703         `MonoReflectionAssemblyBuilder *' so we can use this for type and
17704         method generic parameters.
17705         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
17706         (method_builder_encode_signature): Encode generic parameters.
17707         (mono_image_get_method_info): Write generic params to the
17708         MONO_TABLE_GENERICPARAM table.
17709
17710         * reflection.h (MonoReflectionMethodBuilder): Added
17711         `MonoArray *generic_params'.
17712
17713         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
17714
17715         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
17716         wrapper for mono_reflection_define_generic_parameter().
17717         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
17718
17719 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
17720
17721         * marshal.h: Add missing function to fix build.
17722
17723         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
17724         the SetLastError pinvoke attribute.
17725
17726         * marshal.c (mono_marshal_set_last_error): New helper function called
17727         by the generated code.
17728         
17729         * marshal.c (mono_mb_emit_branch): New helper function.
17730
17731         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
17732
17733         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
17734         classes as parameters and return values of delegates. Fixes #29256. 
17735
17736 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
17737
17738         * locales.c: use gint32 in non HAVE_ICU case
17739
17740 2003-10-11  Martin Baulig  <martin@ximian.com>
17741
17742         * mono-debug.c (mono_debug_add_method): Added a workaround for
17743         bug #48591.
17744
17745 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
17746
17747         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
17748         delegates passed to native code must use the STDCALL calling 
17749         convention. Fixes #35987.
17750
17751 2003-10-10  Martin Baulig  <martin@ximian.com>
17752
17753         * class.c (inflate_generic_type): If we're inflating for a generic
17754         type instance (and not for a generic method), return
17755         MONO_TYPE_MVAR unchanged.
17756
17757 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17758
17759         * string-icalls.c: Join ignores null strings in the source array.
17760         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
17761         * threads.c: GetAvailableTheads is slightly more accurate.
17762
17763 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
17764
17765         * threads.h threads.c : add mono_threads_set_default_stacksize
17766         and pass default to CreateThread calls.
17767
17768 2003-10-09  Dick Porter  <dick@ximian.com>
17769
17770         * icall.c:
17771         * locales.h:
17772         * locales.c: Internal calls for constructing CultureInfo and
17773         related objects from libicu (if its available.)
17774
17775 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
17776
17777         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
17778
17779 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17780
17781         * threadpool.c: added an argument to async_invoke_thread that is the
17782         item to process, pass the MonoAsyncResult to the thread start function
17783         when creating a new thread. This way we don't need to acquire any lock
17784         when we're creating a new thread. Readded a semaphore for faster
17785         response times (instead of that Sleep i added).
17786
17787 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
17788
17789         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17790         get daylight change dates better on Windows, fix handling
17791         of platforms without tm_gmtoff.
17792
17793 2003-10-06  Martin Baulig  <martin@ximian.com>
17794
17795         * class.c (inflate_generic_method): Renamed to
17796         mono_class_inflate_generic_method() and made public.
17797         (mono_class_init): Don't inflate the generic methods here.
17798         (mono_class_from_generic): Added `gboolean inflate_methods'
17799         argument.  Inflate the methods here.
17800
17801         * loader.c (mono_method_get_param_names): Ignore instances of
17802         generic types for the moment.
17803
17804         * reflection.c (fixup_method): Added support for inflated methods.
17805         (mono_image_create_token): Use mono_image_get_methodref_token()
17806         for inflated methods.
17807         (mono_custom_attrs_from_param): Ignore instances of generic types
17808         for the moment.
17809         (mono_reflection_bind_generic_parameters): New public function.
17810         Moved all the functionality from
17811         ves_icall_Type_BindGenericParameters() here and added support for
17812         dynamic types.
17813         (mono_reflection_define_generic_parameter): Initialize
17814         `klass->methods' here.
17815
17816         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
17817         functionality into mono_reflection_define_generic_parameter().
17818         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
17819         TypeBuilder, return that TypeBuilder.
17820
17821 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17822
17823         * appdomain.c: removed mono_delegate_semaphore.
17824
17825         * threadpool.c:
17826         (mono_thread_pool_add): moved hash table creation inside and the thread 
17827         creation outside of the critical region.
17828         (mono_thread_pool_finish): removed obsolete code.
17829         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
17830         continue or exit the thread depending on the queue.
17831
17832 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
17833
17834         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
17835         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
17836         handle more bool marshalling options
17837
17838 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
17839
17840         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
17841         arrays of structs. Also add a more descriptive error message when
17842         a structure member is marshalled as LPArray.
17843
17844 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
17845
17846         * marshal.c (mono_marshal_get_native_wrapper): Add support for
17847         marshalling arrays of complex types. Fixes #29098. Also remove an
17848         usused and incomplete function.
17849
17850 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
17851
17852         * gc.c: report heap_size - free_bytes as total memory allocated
17853         (bug#49362).
17854
17855 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
17856
17857         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
17858         fix timezone handling problems on Windows.
17859         
17860         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
17861         asserts when the year is outside the range handled by ms the functions.
17862
17863         * class.c (setup_interface_offsets): If the class is an interface,
17864         fill out its interface_offsets slot.
17865
17866 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17867
17868         * threadpool.c: mark threadpool threads as background.
17869
17870 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
17871
17872         * decimal.c - define DECINLINE to nothing if not using GCC
17873
17874 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
17875
17876         * assembly.c: More refcount fixes.
17877
17878 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17879
17880         * string-icalls.c: if we're not trimming, return the same string.
17881         When not splitting, don't create a new string.
17882
17883 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17884
17885         * image.c:
17886         (mono_image_open): increment the ref_count inside the critical section.
17887
17888 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
17889
17890         * image.c (mono_image_open): Fix reference counting bug.
17891
17892 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
17893
17894         * marshal.c (mono_marshal_type_size) struct alignment changed for 
17895         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
17896         64bits. Avoid leak in mono_marshal_get_native_wrapper when
17897         mono_lookup_pinvoke_call throws.        
17898
17899 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
17900
17901         * reflection.c (mono_reflection_parse_type): Fix #49114.
17902
17903         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
17904         temporary workaround for cygwin header problem.
17905
17906         * object.c (mono_object_isinst): Synchronize this with the code
17907         generated by the JIT for casts.
17908
17909 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
17910
17911         * reflection.c (encode_type): Fix #38332.
17912
17913 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
17914
17915         * marshal.c (mono_marshal_method_from_wrapper): New function to return
17916         the original method from the wrapper method.
17917
17918 2003-09-25  Martin Baulig  <martin@ximian.com>
17919
17920         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
17921         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
17922         (ves_icall_Type_get_IsGenericInstance): New interncall.
17923
17924 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
17925
17926         * object.c: fix cast warning in big endian code.
17927
17928 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
17929
17930         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
17931         
17932 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17933
17934         * assembly.c: don't call check_env from mono_assembly_load. It's
17935         already done once in mono_assemblies_init and may cause headaches when
17936         multiple threads are loading assemblies.
17937
17938 2003-09-19  Martin Baulig  <martin@ximian.com>
17939
17940         * reflection.c (mono_reflection_define_generic_parameter): Don't
17941         allocate `klass->methods', set `klass->flags' to
17942         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
17943
17944 2003-09-18  Martin Baulig  <martin@ximian.com>
17945
17946         * class.c (mono_class_init): Don't create `class->methods' if it's
17947         already initialized.
17948
17949         * metadata.c (mono_metadata_load_generic_params): Make this
17950         actually work.
17951
17952         * reflection.c (mono_reflection_define_generic_parameter): Set
17953         parent class and interfaces from the constraints.
17954
17955         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
17956         to keep this struct in sync with the declaration in TypeBuilder.cs.
17957
17958 2003-09-17  Martin Baulig  <martin@ximian.com>
17959
17960         * metadata.h (MonoType): Replaced the data's `int type_param'
17961         field with `MonoGenericParam *generic_param'.
17962         (MonoGenericParam): Added `MonoClass *klass'.
17963
17964         * class.c (mono_class_from_gen_param): Removed the
17965         `MonoImage *image' and `int type_num' arguments.
17966
17967         * metadata.c (mono_metadata_parse_generic_param): New static
17968         method; creates a MonoGenericParam which just contains the index.
17969         (do_mono_metadata_parse_type): Call
17970         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
17971         MONO_TYPE_MVAR.
17972
17973         * reflection.c (mono_image_typedef_or_ref): Generic type
17974         parameters may be in the same assembly, but never use a typedef
17975         for them.
17976         (mono_reflection_define_generic_parameter): We're now creating a
17977         "real" class for the type parameter; it's now safe to call
17978         mono_class_from_mono_type() on the class'es type, it'll do the
17979         right thing.
17980
17981 2003-09-16  Martin Baulig  <martin@ximian.com>
17982
17983         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
17984         `symfile->range_entry_size' and `symfile->class_entry_size' here;
17985         the `symfile' data structure must be fully initialized before it
17986         gets added to the table.
17987
17988 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
17989
17990         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
17991
17992         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
17993         class init trampolines.
17994
17995 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
17996
17997         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
17998         to the built-in profiler to turn off time and allocation profiling
17999         respectively.
18000
18001 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
18002
18003         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
18004         g_direct_equal.
18005
18006         * debug-helpers.c (mono_method_full_name): Print the wrapper type
18007         in human readable form.
18008
18009 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
18010
18011         * reflection.c icall.c: Fixed warnings.
18012
18013         * image.c (load_class_names): Use a temporary hash table to hold the
18014         namespaces in order to avoid doing many string comparisons.
18015
18016         * image.h: Fix typo.
18017
18018         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
18019         Pass NULL instead of g_direct_equal to the GHashTable constructor 
18020         since the NULL case is short-circuited inside g_hash_table_lookup, 
18021         leading to better performance.  
18022
18023         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
18024         obtain the first custom attribute for a given index. Depends on the
18025         CustomAttribute table being sorted by the parent field.
18026
18027         * reflection.c (mono_custom_attrs_from_index): Use the new function 
18028         for better performance.
18029
18030 2003-09-07  Martin Baulig  <martin@ximian.com>
18031
18032         * class.c (mono_class_init): If we're a generic instance, inflate
18033         all our methods instead of loading them from the image.
18034         (mono_class_from_generic): Set `class->methods = gklass->methods'.
18035
18036 2003-09-07  Martin Baulig  <martin@ximian.com>
18037
18038         * mono-debug-debugger.c: Added support for constructors.
18039
18040 2003-09-06  Martin Baulig  <martin@ximian.com>
18041
18042         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
18043         New interncall.
18044
18045         * reflection.c (mono_reflection_setup_generic_class): Call
18046         ensure_runtime_vtable() to create the vtable.
18047
18048 2003-09-05  Martin Baulig  <martin@ximian.com>
18049
18050         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
18051         MONO_TYPE_MVAR.
18052
18053 2003-09-04  Martin Baulig  <martin@ximian.com>
18054
18055         * reflection.c (mono_reflection_define_generic_parameter): Generic
18056         parameters start with zero.
18057
18058 2003-09-04  Martin Baulig  <martin@ximian.com>
18059
18060         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
18061
18062         * reflection.h (MonoReflectionGenericParam): New typedef.
18063         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
18064         the generic parameters from the managed TypeBuilder.
18065
18066         * reflection.c (mono_reflection_define_generic_parameter): New function.
18067         (mono_reflection_create_runtime_class): Encode generic parameters.
18068         (mono_reflection_setup_generic_class): New function; this is
18069         called after adding adding all generic params to the TypeBuilder.
18070         (encode_type): Added MONO_TYPE_VAR.
18071
18072 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
18073
18074         * class.h class.c (mono_class_needs_cctor_run): Moved this method
18075         here from the JIT.
18076
18077         * assembly.h assembly.c: Moved the AOT loading code into an assembly
18078         load hook.
18079
18080 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
18081
18082         * reflection.h reflection.c class.h class.c: Delete duplicate 
18083         definition of mono_type_get_name () from reflection.c and export the
18084         one in class.c.
18085
18086         * class.c: Class loading fixes from Bernie Solomon 
18087         (bernard@ugsolutions.com).
18088
18089         * reflection.c: Endianness fixes from Bernie Solomon 
18090         (bernard@ugsolutions.com).
18091         
18092 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
18093
18094         * assembly.h assembly.c: Define a file format version for AOT
18095         libraries.
18096         
18097         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
18098
18099         * appdomain.h (MonoJitInfo): New field to determine whenever the
18100         code is domain neutral.
18101         
18102 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
18103
18104         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
18105
18106 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
18107
18108         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
18109         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
18110         Avoid caching the result since strings must be domain specific. Fixes
18111         #48050.
18112
18113 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
18114
18115         * marshal.c (mono_marshal_init): Make this callable multiple times
18116         since it is hard to find a correct place to call it.
18117
18118         * object.c (mono_runtime_class_init): Execute static constructors in
18119         the correct appdomain.
18120
18121         * image.c (build_guid_table): Handle the case when multiple images have
18122         the same GUID.
18123
18124 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18125
18126         * icall.c: added a couple of icalls for System.Web.
18127
18128 2003-08-28  Martin Baulig  <martin@ximian.com>
18129
18130         * icall.c (ves_icall_Type_BindGenericParameters): Use
18131         `klass->generic_inst' instead of `&klass->byval_arg' in the
18132         mono_type_get_object() call.  The returned type must be
18133         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
18134
18135 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
18136
18137         * NOTES: New file.
18138
18139         * object.c (mono_class_proxy_vtable): Make it thread safe.
18140
18141         * pedump.c: Fix warning.
18142
18143         * object.c appdomain.h: Get rid of metadata_section. 
18144         It is no longer needed and it was causing deadlocks with domain->lock.
18145
18146         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
18147
18148 2003-08-26  Martin Baulig  <martin@ximian.com>
18149
18150         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
18151
18152 2003-08-26  Martin Baulig  <martin@ximian.com>
18153
18154         * pedump.c (main): Call mono_metadata_init(),
18155         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
18156         and mono_loader_init().
18157
18158 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
18159
18160         * loader.h: Add missing include to fix build.
18161
18162         * image.h: mono_image_load_references is no more.
18163
18164         * assembly.c: Reworked assembly loading to make it really thread safe.
18165         After these changes, the assembly returned by mono_assembly_open is
18166         fully initialized, i.e. all its references assemblies are loaded.
18167
18168         * assembly.c (mono_image_load_references): Renamed to 
18169         mono_assembly_load_references, and made private, since clients no
18170         longer need to call it.
18171
18172         * class.c: Removed calls to mono_assembly_load_references, since it was
18173         a source of deadlocks.
18174
18175         * loader.h loader.c class.h class.c: Protect data structures using a 
18176         new lock, the loader lock.
18177
18178         * class.c (mono_class_setup_vtable): Create temporary hash tables and
18179         GPtrArrays only when needed.
18180
18181         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
18182         into empty structures by mcs. Fixes pinvoke7.cs.
18183         
18184         * domain.c (mono_init): Call a new initialization function.
18185
18186         * appdomain.c (mono_runtime_init): Call the new initializer function
18187         of the marshal module.
18188
18189         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
18190         inserted into empty structures by mcs. Fixes pinvoke7.cs.
18191
18192         * marshal.h marshal.c: Added locks around the wrapper caches to make
18193         this module thread safe.
18194
18195         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
18196         this argument. Fixes pinvoke1.exe.
18197
18198 2003-08-25  Lluis Sanchez <lluis@ximian.com>
18199
18200         * object.h: Added call_type field to MonoMethodMessage and the corresponding
18201         enumeration of values. Removed fields to store remote call output values in
18202         MonoAsyncResult. Not needed any more.
18203         * object.c: Initialize call_type and async_result fields in mono_message_init.
18204         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
18205         dispatching the message.
18206         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
18207         async call to finish. To do it use a message with EndInvoke call type.
18208
18209 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
18210
18211         * loader.h loader.c (mono_method_hash_marhal_info): New function which
18212         determines whenever a method has marshalling info.
18213
18214 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18215
18216         * assembly.c: fix the build on windows.
18217
18218 2003-08-22 Lluis Sanchez <lluis@ximian.com>
18219
18220         * object.cs: Fixed bug #47785.
18221
18222 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
18223
18224         * string-icalls.c (StringReplace): If their are no occurances of
18225         the old string found return a reference to the supplied
18226         string. This saves some memory and matches MS behavoir.
18227         
18228 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18229
18230         * socket-io.c: fixed compilation for systems that define AF_INET6
18231         and don't define SOL_IP/SOL_IPV6.
18232
18233 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
18234
18235         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
18236         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
18237
18238         * rawbuffer.c rawbuffer.h: Make this module thread safe.
18239
18240         * domain.c: Make this module thread safe.
18241
18242         * domain.c (mono_init): Call new initialization function.
18243
18244         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
18245         reference types too. Fixes #38812.
18246
18247         * image.c (mono_image_init): Fixed warnings.
18248
18249         * class.c (mono_class_from_typeref): Handle assembly load failure
18250         correctly.
18251
18252         * appdomain.c (add_assemblies_to_domain): Handle the case when
18253         the references of an assembly are not yet loaded.
18254
18255         * metadata.c image.c assembly.c: Moved initialization of global
18256         variables to a separate function called at startup since lazy 
18257         initialization of these variables is not thread safe.
18258         
18259         * image.c assembly.c: Made this module thread safe by adding locks in 
18260         the appropriate places.
18261
18262         * domain.c (mono_init): Call the new initialization functions of the
18263         three modules.
18264
18265 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
18266
18267         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
18268           make a direct call. It is proxy's work to make the call asynchronous.
18269           mono_delegate_end_invoke(): If the targe is a proxy, just collect
18270           the return values.
18271         * object.cs: mono_method_call_message_new(): read AsyncResult and
18272           state object from parameters list, if this info is requested.
18273         * object.h: Added fields to store remote call output values in
18274           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
18275
18276 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18277
18278         * object.h: add needed fields to MonoThread.
18279         * threads.c, threads.h: allow registering a function to cleanup data
18280         allocated per thread by the JIT.
18281
18282 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18283
18284         * loader.h: portability fix by Bernie Solomon
18285         * <bernard@ugsolutions.com>.
18286
18287 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
18288
18289         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
18290         return a MonoArray. This simplifies the code and also ensures that
18291         the cache allways contains an object reference as a value.
18292
18293         * icall.c (ves_icall_get_parameter_info): Simplified using the new
18294         function.
18295
18296 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18297
18298         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
18299         fixes a problem with byte ordering when getting the address family for
18300         a socket.
18301
18302 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
18303
18304         * .cvsignore: Added monosn.
18305
18306         * reflection.h reflection.c loader.c: Added support for parameter
18307         marshalling to dynamically created types. Fixes #47295.
18308
18309 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18310
18311         * rand.c: remove useless warnings.
18312
18313 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18314
18315         * class.c: implemented ldtoken for methods and fieldrefs.
18316
18317 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18318
18319         * threadpool.c: when mono_async_invoke was called, no one took care of
18320         monitoring the queue. So if the method invoked took some time and we
18321         got new async invoke requests after 500 ms (the thread created waited
18322         that long in WaitForSingleObject), the new async invoke was not called
18323         until the previous one finished.
18324
18325         This is fixed now. Thanks to Totte for helping with it.
18326
18327 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18328
18329         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
18330
18331 2003-08-11  Martin Baulig  <martin@ximian.com>
18332
18333         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
18334
18335 2003-08-06  Martin Baulig  <martin@ximian.com>
18336
18337         * mono-debug-debugger.c: Added support for static fields,
18338         properties and methods.
18339
18340 2003-08-06  Martin Baulig  <martin@ximian.com>
18341
18342         * mono-debug-debugger.c: Don't store the MonoString's vtable to
18343         make this work for applications with multiple application domains.
18344
18345 2003-08-04  Martin Baulig  <martin@ximian.com>
18346
18347         * mono-debug-debugger.c: Completely reworked the type support; the
18348         most important thing is that we're now just using one single
18349         `MonoType' instance per type.
18350
18351 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
18352
18353         * mono-endian.h, mono-endian.c, icall.c: Added icall
18354         ves_icall_System_Double_AssertEndianity to assert double word endianity
18355         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
18356
18357 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18358
18359         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
18360         support, icalls and fixes.
18361
18362 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
18363
18364         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
18365         classes that are a punctuation character in .NET is not the same a
18366         g_unichar_ispunct.
18367
18368 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18369
18370         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
18371
18372 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
18373
18374         * icall.c: Add new MemCopy internalcall.
18375         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
18376         Simplified code; It is not necessary to handle all the cases here,
18377         as the C# code takes care of it.  Only handle the case of the name
18378         resource embedded into the assembly.
18379
18380         Changed signature to return the data pointer and the size of the
18381         data. 
18382
18383 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
18384
18385         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
18386         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
18387
18388 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
18389
18390         * socket-io.c: ignore EINTR error in select.
18391
18392 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18393
18394         * class.h, class.c: removed unused subclasses field in MonoClass.
18395
18396 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
18397
18398         * icall.c: improve fix of get_base_definition(). If the parent class
18399           doesn't have the mehod, look at the parent of the parent.
18400         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
18401           to check if a parameter is an in or out parameter
18402           (PARAM_ATTRIBUTE_IN is not set by default).
18403           mono_method_return_message_restore(): Use mono_class_value_size to
18404           get the size of a value type. mono_type_stack_size (parameterType)
18405           does not return the correct value if parameterType is byRef.
18406           mono_load_remote_field(), mono_load_remote_field_new(),
18407           mono_store_remote_field(), mono_store_remote_field_new():
18408           raise exception if the remote call returns an exception.
18409
18410 2003-07-28  Martin Baulig  <martin@ximian.com>
18411
18412         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
18413         method.  This is a wrapper around mono_runtime_invoke() which
18414         boxes the instance object if neccessary.
18415
18416 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18417
18418         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
18419         metadata.h, row-indexes.h, verify.c: first cut of generics support.
18420
18421 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18422
18423         * icall.c: disable mcs bug workaround.
18424
18425 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
18426
18427         * object.c (mono_runtime_class_init): Take the metadata_section
18428         mutex before obtaining the domain mutex.
18429
18430         * appdomain.h: Added definition of metadata_section mutex here. 
18431
18432         * object.c: define metadata_mutex here.
18433
18434 2003-07-24  Ravi Pratap  <ravi@ximian.com>
18435
18436         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
18437         fixed.
18438
18439 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
18440
18441         * reflection.c: Fix bug #46669
18442
18443 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18444
18445         * exception.c:
18446         * exception.h:
18447         * icall.c:
18448         * object.h: fill in the type name for TypeLoadException.
18449
18450 2003-07-23  Ravi Pratap  <ravi@ximian.com>
18451
18452         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
18453         relationship between TypeBuilders while compiling corlib) and bug
18454         45993 (Array types returned from the runtime while compiling
18455         corlib were from the loaded corlib).
18456
18457 2003-07-22  Martin Baulig  <martin@ximian.com>
18458
18459         * mono-debug-debugger.c: Reworked the type support a bit more;
18460         distinguish between types and classes.
18461
18462 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
18463
18464         * icall.c: add IsArrayImpl icall.
18465
18466 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
18467
18468         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
18469         initializing real_size only once. Also fix bug #46602.
18470
18471 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
18472
18473         * object.c: Renamed mono_metadata_section to metadata_section.
18474
18475 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
18476
18477         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
18478           empty array if the type is an array. Fixed.
18479           ves_icall_MonoMethod_get_base_definition: if the base method
18480           is abstract, get the MethodInfo from the list of methods of
18481           the class.
18482         * reflection.c: ParameterInfo.PositionImpl should be zero-based
18483           and it was 1-based. Fixed in mono_param_get_objects.
18484
18485 2003-07-20  Martin Baulig  <martin@ximian.com>
18486
18487         * mono-debug.h: Set version number to 31.
18488         (mono_debug_init): Added `MonoDomain *' argument.
18489
18490         * mono-debug-debugger.c: Reworked the type support; explicitly
18491         tell the debugger about builtin types; pass the `klass' address to
18492         the debugger.
18493
18494 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
18495
18496         * image.c: Allow new metadata tables to be loaded without a
18497         warning. Also update the warning message to give the new constant value.
18498                 
18499 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18500
18501         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
18502         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
18503         array type representation changes.
18504
18505 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18506
18507         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
18508         on Environment.Exit () call.
18509
18510 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18511
18512         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
18513         requires a matching corlib.
18514
18515 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
18516
18517         * Changelog: My editor decided to add a CR to each line. Sorry about that.
18518           Committed again without the CRs.
18519         
18520 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
18521
18522         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
18523           getting it from the "this" socket instance. Did not work
18524           if the socket is a subclass of Socket.
18525           Also fixed bug #35371.
18526
18527 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18528
18529         * metadata.c: fixed size for TypedByRef.
18530         * loader.c: when searching for a method, consider the vararg amrker.
18531         * unicode.c, decimal.c: constify some arrays.
18532
18533 2003-07-15  Dick Porter  <dick@ximian.com>
18534
18535         * socket-io.c: Fixed compilation for gcc < 3.2.
18536
18537         Fixed compilation for machines that don't have AF_INET6 (thanks to
18538         Bernie Solomon <bernard@ugsolutions.com> for that part.)
18539
18540         Fixed compile warnings.
18541         
18542         Fixed formatting and line endings.
18543
18544 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
18545
18546         * socket-io.h:
18547         * socket-io.c: Added IPv6 support.
18548
18549 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
18550
18551         * class.c (mono_class_is_assignable_from): New function to implement
18552         the is_assignable_from logic. Used by mono_object_isinst, 
18553         Type::IsAssignableFrom () and the interpreter.
18554
18555         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
18556         Object, even interfaces.
18557         
18558         * object.c (mono_object_isinst): Implement in terms of 
18559         is_assignable_from.
18560
18561         * icall.c (ves_icall_type_is_assignable_from): New icall.
18562
18563 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
18564
18565         * domain.c (foreach_domain): fix compiler warning.
18566
18567 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
18568
18569         * image.c (load_metadata_ptrs): use g_strndup because strndup is
18570         not available on all plattforms
18571
18572 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
18573
18574         * image.h image.c: Store the metadata version string in MonoImage.
18575         * icall.c: New icall to retrieve the image version.
18576         * reflection.c (create_dynamic_image): Fill in the image version field
18577         * reflection.c (build_compressed_metadata): Use the image version
18578         from the image structure.
18579
18580 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18581
18582         * appdomain.c: modified comment.
18583         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
18584         That will be its last iteration when mono_gc_cleanup is called from
18585         mono_runtime_cleanup and before the domain is unloaded.
18586
18587         Fixes bug #45962.
18588
18589 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
18590
18591         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
18592         attributes.
18593
18594 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18595
18596         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
18597         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
18598         Bernie Solomon <bernard@ugsolutions.com>.
18599
18600 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18601
18602         * object.c, object.h: provide mono_object_new_fast() for faster
18603         allocation in some special cases.
18604
18605 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18606
18607         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
18608         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
18609
18610 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18611
18612         * threadpool.c: fix leaks.
18613
18614 2003-07-01  Dick Porter  <dick@ximian.com>
18615
18616         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
18617         using MonoGHashTables.  Fixes threadpool bug posted to list.
18618
18619 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
18620
18621         * image.h, image.c: added support to load an assembly from a byte array.
18622         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
18623         assembly bundle support.
18624
18625 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
18626
18627         * threadpool.c (mono_thread_pool_add): keep a reference to the
18628         AsyncResult to prevent GC
18629
18630 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18631
18632         * class.c: leak fix.
18633
18634 2003-06-25  Dick Porter  <dick@ximian.com>
18635
18636         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
18637         for the async object, the WaitHandle object will close the handle.
18638         Fixes bug 45321.
18639
18640 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18641
18642         * class.c: in mono_array_class_get (), lookup from the hash with the
18643         same type we insert: this works around a bug in
18644         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
18645         lluis. The real fix will have to wait for after the release.
18646
18647 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18648
18649         * icall.c: fix memory leak when getting type members.
18650
18651 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18652
18653         * reflection.c: added more pubtoken special cases.
18654
18655 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18656
18657         * class.c: handle field offset correctly when class size
18658         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
18659
18660 2003-06-20  Martin Baulig  <martin@ximian.com>
18661
18662         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
18663         *image' field.
18664
18665 2003-06-20  Martin Baulig  <martin@ximian.com>
18666
18667         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
18668
18669 2003-06-20  Martin Baulig  <martin@ximian.com>
18670
18671         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
18672         just distinguish between variables in registers and variables at
18673         an offset relative to a register.
18674
18675 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18676
18677         * icall.c: #ifdef out latest changes until mcs is fixed.
18678
18679 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18680
18681         * icall.c: return members in metadata order.
18682
18683 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18684
18685         * icall.c: avoid infinite loop in GetTimeZoneData.
18686
18687 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18688
18689         * icall.c: added Marshal.Prelink/All icalls.
18690
18691 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18692
18693         * object.c, object.h: fix warnings and do some overflow checking
18694         when creating arrays.
18695
18696 2003-06-17  Dick Porter  <dick@ximian.com>
18697
18698         * file-io.h:
18699         * file-io.c: File attributes need to be tweaked slightly when
18700         passed from the managed to the w32 world.
18701
18702 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18703         * profiler.h profiler-private.h profiler.c: Rework last patch
18704         based on suggestion by Paolo.
18705         
18706 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18707
18708         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
18709         instruction level coverage data collection.
18710         * profiler.h profiler.c (: Added new callback function which can be
18711         used by the profiler to limit which functions should have coverage
18712         instrumentation.
18713         * profiler.c (mono_profiler_load): Call g_module_build_path to
18714         generate the file name of the profiler library.
18715
18716 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18717
18718         * profiler.c, profiler.h, profiler-private.h: added basic block 
18719         coverage profiling API.
18720
18721 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
18722
18723         * reflection.c (mono_reflection_create_runtime_class): Add support
18724         for events in dynamically generated code.
18725
18726         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
18727         not allocated.
18728
18729 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18730
18731         * icall.c: when getting timezone info, return reasonable values if we
18732         can't get the actual data.
18733
18734 2003-06-14  Dick Porter  <dick@ximian.com>
18735
18736         * threads.c (start_wrapper): Remove the reference to the thread
18737         object in the TLS data, so the thread object can be finalized.
18738         This won't be reached if the thread threw an uncaught exception,
18739         so those thread handles will stay referenced :-( (This is due to
18740         missing support for scanning thread-specific data in the Boehm GC
18741         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
18742
18743 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
18744
18745         * reflection.c: ensure streams and tables are first allocated with
18746         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
18747
18748 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18749
18750         * icall.c: fixed GetElementType for byrefs (bug# 44792).
18751
18752 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
18753
18754         * reflection.c (mono_reflection_create_runtime_class): Add support for
18755         properties to dynamically created classes.
18756         * reflection.c: Fix a few places where non-MonoObjects were inserted
18757         into the tokens hashtable.
18758
18759 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18760
18761         * object.c: some support to handle out of memory exceptions.
18762
18763 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
18764
18765         * marshal.c (mono_marshal_get_native_wrapper): support reference
18766         return types
18767
18768 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18769
18770         * object.h, object.c: more portability stuff from Bernie Solomon.
18771         Unexport mono_object_allocate(). Added mono_object_unbox ().
18772         Set exitcode when an unhandled exception is thrown.
18773
18774 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
18775
18776         * marshal.c (mono_marshal_get_native_wrapper): use custom
18777         marshaler for return types.
18778
18779 2003-06-10  Dick Porter  <dick@ximian.com>
18780
18781         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
18782         ip_mreq is available
18783
18784 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18785
18786         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
18787         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
18788         by Bernie Solomon <bernard@ugsolutions.com>.
18789
18790 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
18791
18792         * gc.c (mono_gc_init): Avoid error message on shutdown when
18793         GC_DONT_GC=1 is used.
18794
18795         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
18796         New icall to return the GUID of a module.
18797
18798 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18799
18800         * class.c: ensure instance size always includes the parent's size
18801         even whem class size is set explicitly (fixes bug#44294).
18802
18803 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18804
18805         * profiler.h, profiler.c: made the simple profiler thread-safe,
18806         get more accurate timing info. Allow the loading of an
18807         externally-developed profiler module.
18808
18809 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
18810
18811         * marshal.c (mono_marshal_get_native_wrapper): improved
18812         class/byref arguments.
18813         (mono_marshal_get_native_wrapper): better string marshaling support.
18814
18815 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18816
18817         * class.c: ensure .pack and .size are handled correctly and
18818         simplified layout of static fields.
18819
18820 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18821
18822         * appdomain.c
18823         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
18824
18825         * loader.c (mono_lookup_pinvoke_call): look for modules in the
18826         current directory (fix bug 44008)
18827
18828 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
18829
18830         * marshal.c (mono_marshal_get_native_wrapper): started support for
18831         custom marshalers.
18832         (mono_delegate_to_ftnptr): consider marshalling specifications
18833
18834 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18835
18836         * reflection.c, reflection.h: emit custom marshal info.
18837
18838 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18839
18840         * object.c: free the GError.
18841         * icall.c: added CloseEvent_internal.
18842         * threads.[ch]:
18843         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
18844         call.
18845
18846 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
18847
18848         * loader.c (mono_method_get_signature): Add support for dynamic
18849         assemblies.
18850
18851 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18852
18853         * reflection.c: fixed bug #43905.
18854
18855 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18856
18857         * class.c, domain.c, icall.c, metadata.h, object.h: support for
18858         handling TypedReference and ArgIterator.
18859         * loader.c, loader.h: added function to get signature at call site.
18860
18861 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18862
18863         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
18864         data readonly. Buglets and warning fixes. Some MethodSpec support.
18865
18866 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18867
18868         * class.h, class.c, object.c: remove relative numbering support.
18869
18870 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
18871
18872         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
18873         free the string, until we get a chance to fix Gtk#
18874
18875 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18876
18877         * marshal.c: revert last patch.
18878
18879 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18880
18881         * icall.c: updates for new mono_class_vtable() not calling
18882         the type constructor anymore.
18883
18884 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18885
18886         * object.h, object.c: separate vtable creation from type
18887         initialization. Make running the .cctor thread safe.
18888
18889 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
18890
18891         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
18892
18893 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
18894
18895         * loader.c (mono_get_method): consider calling convention
18896
18897 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
18898
18899         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
18900         to return the invisible global type for a module.
18901
18902         * reflection.c (mono_image_build_metadata): Emit global fields too.
18903
18904 2003-05-20  Peter Williams  <peterw@ximian.com>
18905
18906         * loader.c (mono_lookup_internal_call): Add a few newlines.
18907
18908 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
18909
18910         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
18911         literal strings.
18912
18913         * appdomain.c (set_domain_search_path): Recalculate search path when
18914         AppDomainSetup.PrivateBinPath changes.
18915
18916         * object.c (mono_class_compute_gc_descriptor): It turns out some
18917         parts of the class libs (like System.Thread) holds pointers to
18918         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
18919         to treat native int a pointer type here.
18920         
18921 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
18922
18923         * appdomain.h, domain.c: add hashtable for jump target resolution.
18924
18925 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
18926
18927         * reflection.h reflection.c icall.c: Added new icalls 
18928         GetManifestResourceInfoInternal, GetModulesInternal and support
18929         infrastructure.
18930
18931 2003-05-16  Dick Porter  <dick@ximian.com>
18932
18933         * icall.c:
18934         * file-io.h:
18935         * file-io.c: Implement System.IO.MonoIO::GetTempPath
18936
18937 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
18938
18939         * object.c: mono_store_remote_field: little fix to previous patch.
18940
18941 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18942
18943         * class.c: add constructors to array classes.
18944         * icall.c: special case array construction for InternalInvoke (),
18945
18946 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
18947
18948         * class.h class.c reflection.c object.c: Added support for field
18949         defaults in dynamically generated classes.
18950
18951 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18952
18953         * reflection.c: properly encode charset for ddlimport.
18954
18955 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18956
18957         * threads.c: allow compiling without GC.
18958
18959 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18960
18961         * appdomain.h, object.c, object.h, threads.c, threads.h: added
18962         handling of thread static data.
18963
18964 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18965
18966         * reflection.h, reflection.c: added mono_custom_attrs_free ().
18967
18968 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
18969
18970         * class.c (mono_array_class_get): always set the serializable flags
18971         (mono_array_class_get): always set the SEALED attribute for array types
18972
18973 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
18974
18975         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
18976         attributes (fix for bug 42021).
18977
18978 2003-05-12  Dick Porter  <dick@ximian.com>
18979
18980         * gc.c: Don't run finalizers when the finalizer thread is
18981         finishing up, because the default domain has already been
18982         destroyed.
18983
18984 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
18985
18986         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
18987         value is null, we should throw an exception.   This is slightly
18988         different than the other conventions used for the constructor.
18989
18990 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18991
18992         * socket-io.c: fixed windows build.
18993
18994 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18995
18996         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
18997
18998 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
18999
19000         * object.c (mono_string_new_wrapper): Compatibility fix for MS
19001         compilers.
19002
19003 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
19004
19005         * class.c (mono_class_layout_fields): Add experimental GC aware
19006         auto layout facility. Requires class library changes to work correctly.
19007
19008         (mono_class_setup_vtable): Avoid overriding explicit interface
19009         method implementations. Fixes iface3.exe test.
19010
19011         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
19012         object reference.
19013         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
19014         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
19015
19016         * metadata.h: Add new type classification macro which determines
19017         whenever the type holds an object reference.
19018
19019 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
19020
19021         * marshal.c (mono_marshal_get_native_wrapper): cleanups
19022
19023 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
19024
19025         * gc.c (finalizer_thread): Work around a GC bug.
19026
19027 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
19028
19029         * marshal.c (emit_struct_conv): allow unions
19030
19031         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
19032
19033 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
19034
19035         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
19036
19037 2003-05-06  Martin Baulig  <martin@ximian.com>
19038
19039         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
19040
19041 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19042
19043         * socket-io.c:
19044         (Select_internal): allow NULLs, don't create arrays if not needed.
19045         Coupled with Socket.cs changes.
19046
19047         * threadpool.c:
19048         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
19049         register a finalizer for it that will close the semaphore handle. This
19050         fixes the leak and make Lupus' test run with > 4080 loops.
19051
19052 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
19053
19054         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
19055         Jerome Laban (bug #42287)
19056
19057 2003-05-02  Martin Baulig  <martin@ximian.com>
19058
19059         * debug-mono-symfile.h
19060         (MonoSymbolFile): Moved declaration into mono-debug.h.
19061         (MonoDebugMethodJitInfo): Likewise.
19062         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
19063         argument.
19064         (_mono_debug_address_from_il_offset): Take a
19065         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
19066
19067         * mono-debug.h
19068         (MonoDebugDomainData): New struct.
19069         (mono_debug_get_domain_data): New function.
19070         (mono_debug_add_method): Take an additional `MonoDomain *'
19071         argument.
19072         (mono_debug_source_location_from_address): Likewise.
19073         (mono_debug_il_offset_from_address): Likewise.
19074         (mono_debug_address_from_il_offset): Likewise.
19075
19076 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
19077
19078         * reflection.c: one more check for null type in custom attrs.
19079
19080 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19081
19082         * reflection.c: avoid warning (comparison is always false due to limited
19083         range of data type).
19084
19085 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19086
19087         * icall.c: throw an exception in Type.GetField if the argument 'name'
19088         is NULL.
19089
19090 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
19091
19092         * reflection.c: fixed handling of enums in named arguments to custom
19093         attributes (bug #42123).
19094
19095 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19096
19097         * reflection.c: use the right array element type and handle
19098         a null for a Type argument, too.
19099
19100 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
19101
19102         * reflection.c: handle arrays as arguments to custom attributes.
19103
19104 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
19105
19106         * reflection.c: handle a string value in a custom attr
19107         ctor that takes an object.
19108
19109 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
19110
19111         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
19112         (fix bug #42063)
19113
19114 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
19115
19116         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
19117
19118 2003-04-27  Martin Baulig  <martin@ximian.com>
19119
19120         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
19121         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
19122         MONO_DEBUGGER_EVENT_BREAKPOINT.
19123         (mono_breakpoint_trampoline_code): Removed.
19124         (mono_debugger_event_handler): The last argument is now a
19125         `guint32'.
19126         (mono_debugger_insert_breakpoint_full): Removed the
19127         `use_trampoline' argument.
19128         (mono_debugger_method_has_breakpoint): Likewise.
19129         (mono_debugger_trampoline_breakpoint_callback): Renamed to
19130         mono_debugger_breakpoint_callback(); take the method and
19131         breakpoint number as arguments.
19132
19133 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19134
19135         * metadata.c: fix off by one when loading parameters attributes.
19136
19137 2003-04-24  Martin Baulig  <martin@ximian.com>
19138
19139         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
19140
19141 2003-04-24  Martin Baulig  <martin@ximian.com>
19142
19143         * mono-debug-debugger.c: Moved all code which interacts with the
19144         Mono Debugger here.
19145
19146         * debug-mono-symfile.c: This code now just deals with the symbol
19147         file itself, the debugger code is now in mono-debug-debugger.c.
19148
19149 2003-04-23  Martin Baulig  <martin@ximian.com>
19150
19151         * mono-debug.c (mono_debug_source_location_from_il_offset):
19152         New method; like mono_debug_source_location_from_address(), but
19153         takes an IL offset instead of a machine address.
19154
19155 2003-04-23  Martin Baulig  <martin@ximian.com>
19156
19157         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
19158         `line' field; this is now computed by the debugger.
19159
19160 2003-04-23  Martin Baulig  <martin@ximian.com>
19161
19162         * mono-debug.[ch]: New files.  This is the new debugging interface.
19163
19164         * mono-debug-debugger.[ch]: New files.  Moved all code which
19165         interacts with the Mono Debugger here.
19166
19167 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
19168
19169         * domain.c (mono_init): initialize mono_defaults.monitor_class
19170
19171 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
19172
19173         * reflection.c (method_encode_code): Add a spicy exception to help
19174         future compiler authors.
19175
19176 2003-04-21  Martin Baulig  <martin@ximian.com>
19177
19178         * icall.c
19179         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19180         Make this work with relative pathnames; g_filename_to_uri() needs
19181         an absolute filename.
19182
19183 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
19184
19185         * icall.c: Track name changes in Object and ValueType.
19186
19187 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
19188
19189         * metadata.c (mono_type_stack_size): size should be a multiple of
19190         sizeof (gpointer)
19191
19192 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19193
19194         * gc.c:
19195         (internal_domain_finalize): moved into mono_domain_finalize. No need
19196         to create another thread because the finalizers will be run in the
19197         finalizer thread.
19198         
19199         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
19200         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
19201         to be run (MS does this too).
19202
19203 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
19204
19205         * object.c (mono_class_compute_gc_descriptor): Update comment.
19206
19207         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
19208
19209         * image.h: Add synchronized wrapper cache.
19210
19211         * image.c (do_mono_image_open): Initialize cache.
19212
19213         * reflection.c (create_dynamic_mono_image): Initialize cache.
19214
19215 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19216
19217         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
19218         ves_icall_System_Buffer_ByteLengthInternal.
19219
19220 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
19221
19222         * reflection.c: setup klass->nested_in earlier. Allow
19223         a dash in the assembly name.
19224
19225 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
19226
19227         * metadata.c (mono_type_to_unmanaged): dont access
19228         type->data.klass for MONO_TYPE_OBJECT
19229         (mono_type_to_unmanaged): consider System.Delegate class
19230
19231 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
19232
19233         * class.c: just setup supertypes in the proper place instead of
19234         initializing the full element class for arrays.
19235
19236 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
19237
19238         * class.c: ensure the element class of arrays is initialized.
19239         Setup the supertype info for array classes, too.
19240
19241 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
19242
19243         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
19244
19245 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19246
19247         * Makefile.am: re-added -m option when running cygpath. This way,
19248         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
19249         separator.
19250         * mono-config.c: same codepath for locating mono config file for WIN32
19251         and the rest.
19252         * assembly.c: if mono_assembly_setrootdir is called, don't override
19253         the value set.
19254
19255 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19256
19257         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
19258         MONO_ASSEMBLIES variable.
19259
19260 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
19261
19262         * icall.c: added Assembly::GetNamespaces() icall.
19263
19264 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19265
19266         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
19267
19268 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
19269
19270         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
19271         * object.c: fixed bug in the construction of vtable for proxies
19272
19273 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
19274
19275         * object.c (mono_array_new): Mark mono_array_new as an icall.
19276
19277 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19278
19279         * class.c: fixed test for public method when overriding interfaces.
19280         Closes bug #40970.
19281
19282 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19283
19284         * appdomain.h, domain.c: added mono_domain_foreach() to
19285         be able to access the currently loaded appdomains.
19286         * object.c: make string interning work across sppdomains.
19287         Mark some functions for use as icalls.
19288
19289 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
19290
19291         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
19292
19293         * reflection.h reflection.c: Allocate long living data using 
19294         GC_MALLOC_ATOMIC so the collector does not need to scan it.
19295
19296         * reflection.c: Double the allocation size in streams instead of
19297         increasing it, to prevent unneccesary copying on large assemblies.
19298         
19299         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
19300         creation if the assembly does not have the Run flag set.
19301
19302 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19303
19304         * class.h: avoid the C++ keywords in header files (Jerome Laban
19305         spotted and fixed this).
19306
19307 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19308
19309         * object.c:
19310         (mono_unhandled_exception): fill in the arguments for the
19311         UnhandledException event. Only trigger that event for the default
19312         domain (as MS does).
19313
19314 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
19315
19316         * object.c: Improve typed allocation stuff based on suggestions from
19317         Paolo. Also turn it on if the GC library supports it.
19318
19319 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
19320
19321         * object.c object.h class.h: Added experimental typed allocation
19322         facility using the interfaces in gc_gcj.h.
19323
19324         * os/gc_wrapper.h: Added new include files.
19325         
19326 2003-04-03  Martin Baulig  <martin@ximian.com>
19327
19328         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
19329         which is not yet enabled by default.
19330
19331         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
19332         functions.
19333         (mono_gc_lock, mono_gc_unlock): New static functions.
19334
19335         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
19336         functions; stop/start the world for the garbage collector.  This
19337         is using the windows API; we need to complete the SuspendThread()/
19338         ResumeThread() implementation in the io-layer to make this work on Unix.
19339         (mono_gc_push_all_stacks): New public function; tells the garbage
19340         collector about the stack pointers from all managed threads.
19341
19342 2003-04-03  Martin Baulig  <martin@ximian.com>
19343
19344         * object.h (MonoThread): Added `gpointer stack_ptr'.
19345
19346         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
19347
19348 2003-04-03  Martin Baulig  <martin@ximian.com>
19349
19350         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
19351
19352 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
19353
19354         * reflection.c (typebuilder_setup_fields): Initialize field.first and
19355         field.last.
19356
19357 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
19358
19359         * loader.c (mono_lookup_internal_call): Report the corlib that is
19360         out of sync.
19361
19362 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
19363
19364         * icall.c (ves_icall_type_GetTypeCode): fixed check for
19365         System.DBNull (it's class not valuetype).
19366
19367 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19368
19369         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
19370         if the array method was already assigned a token (fixes bug#40646).
19371
19372 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
19373
19374         * reflection.c (mono_reflection_get_type): Attempt type resolve even
19375         if no assembly is given.
19376
19377 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
19378
19379         * metadata.h: Added the new tables.
19380
19381         * row-indexes.h: Added definitions for new tables.
19382
19383         * metadata.c: Add schemas for new tables, and add support for
19384         computing the sizes of them.
19385
19386         * class.c: Update for handling the new type cases.
19387
19388 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
19389
19390         * metadata.h (MONO_TYPE_IS_VOID): new macro
19391
19392 2003-03-31  Martin Baulig  <martin@ximian.com>
19393
19394         * threads.h (MonoThreadCallbacks): Added `thread_created'.
19395
19396         * threads.c (mono_thread_new_init): Call `thread_created' in the
19397         mono_thread_callbacks.
19398
19399 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
19400
19401         * loader.h: added marshalbyrefobject_class to mono_defaults
19402         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
19403         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
19404           generation of output parameters.
19405           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
19406         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
19407           contextbound and the target object belongs to the context of the caller.
19408         * object.h: added context and unwrapped_server variables in MonoRealProxy.
19409         * object.c: Implemented support for interfaces and abstract classes
19410           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
19411           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
19412
19413 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
19414
19415         * class.h class.c (mono_class_is_subclass_of): New function.
19416         
19417         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
19418         routines for most common case (calls from ArrayList::ToArray).
19419
19420         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
19421         routine so programs which call Environment::Exit() can be profiled.
19422
19423         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
19424         Added MONO_ARCH_SAVE_REGS.
19425
19426         * icall.c (ves_icall_type_is_subtype_of): Use new function.
19427
19428 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
19429
19430         * blob.h: Add a couple of new MonoType types definitions.
19431
19432         * tabledefs.h: Add a couple of new call convs.
19433
19434 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
19435
19436         * reflection.h (MonoReflectionDynamicAssembly): track changes in
19437         the layout of the class.
19438
19439         * reflection.c (alloc_table): double the size on overflow to avoid
19440         unnecessary copying.
19441
19442         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
19443         avoid filling out metadata tables and blobs. Also set mb->ilgen to
19444         null so it can be garbage collected.
19445         
19446 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
19447
19448         * reflection.c (mono_reflection_get_type): Return the resolved type
19449         only if it is in the assembly we searched.
19450
19451         * reflection.c (ensure_runtime_vtable): Initialize method slots.
19452
19453         * class.c (mono_class_setup_vtable): Set the slot of the overriding
19454         method.
19455
19456 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19457
19458         * appdomain.c:
19459         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
19460         the right one is 'file:///blah', but MS allows it.
19461         * assembly.c:
19462         (mono_assembly_open): allow 'file://blah'
19463
19464         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
19465
19466 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
19467
19468         * socket-io.c: fixes bug #40310.
19469
19470 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
19471
19472         * reflection.c (mono_reflection_parse_type): handle deeply nested
19473         types correctly.
19474
19475         * reflection.c (mono_image_create_token): Use unique token values
19476         since they will be put into a hash table.
19477
19478         * class.c (mono_class_setup_vtable): If a method occurs in more than
19479         one place in the vtable, and it gets overriden, then change the
19480         other occurances too.
19481
19482         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
19483         object as return type.
19484
19485 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
19486
19487         * icall.c: Deleted "ToString" implementation for double and float
19488         because they are full implemented in managed code.
19489
19490 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19491
19492         * reflection.c, reflection.h: implemented and exported functions
19493         to retrieve info about custom attributes.
19494
19495 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19496
19497         * appdomain.c: moved Uri handling to assembly.c
19498         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
19499         work when using a file Uri in *nix and windows.
19500
19501         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
19502         GetReferencedAssemblies.
19503
19504 2003-03-18  Dick Porter  <dick@ximian.com>
19505
19506         * icall.c: Rename a couple of internal calls
19507
19508         * threads.c: Set the thread state to Stopped when a thread exits.
19509         Fixes bug 39377.
19510
19511 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
19512
19513         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
19514         New icall.
19515
19516         * object.c (mono_class_vtable): fix warning.
19517
19518 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
19519
19520         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
19521
19522         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
19523         memory.
19524         (method_encode_clauses): Create exception info structures in the right
19525         order.
19526         (mono_reflection_setup_internal_class): Initialize supertypes field.
19527
19528         * class.c object.c: Handle interfaces which implement other interfaces 
19529         correctly.
19530
19531         * class.h class.c: Move the supertypes array initialization code into 
19532         a separate function so it can be used for dynamic types too. Also call
19533         it earlier, in mono_class_init(), since it can be used before the
19534         type is initialized.
19535
19536 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19537
19538         * Makefile.am:
19539         * assembly.c:
19540         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
19541
19542         * appdomain.c:
19543         * appdomain.h:
19544         * marshal.c:
19545         * object.c: remove warnings.
19546
19547 2003-03-13  Martin Baulig  <martin@ximian.com>
19548
19549         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
19550         (MonoDebugLexicalBlockEntry): New types.
19551
19552         * debug-mono-symfile.c
19553         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
19554
19555 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19556
19557         * process.c: ret can be any non-zero value accroding to MS doc.
19558
19559 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
19560
19561         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
19562         fixing a warning for a miss-used prototype, would have cause
19563         random memory corruption.
19564
19565 2003-03-07  Martin Baulig  <martin@ximian.com>
19566
19567         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
19568         getting really annoying ....
19569
19570 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
19571
19572         * reflection.c (fixup_method): added support for array methods.
19573
19574 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19575
19576         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
19577         (pointed out by Michael Adams).
19578
19579 2003-03-04  Dick Porter  <dick@ximian.com>
19580
19581         * icall.c: Temporarily reverted the Double and Single ToString()
19582         change, because it broke nunit.
19583
19584 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
19585
19586         * object.h, threads.h: make include files compatible with C++
19587         (patch by Jerome Laban <jlaban@wanadoo.fr>).
19588
19589 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
19590
19591         * icall.c: Erased ToString helper functions for Double and Single.
19592         Now, that implementations ar all in managed code (Double and Single
19593         Formatters).
19594
19595 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
19596
19597         * appdomain.c: Added method for initializing the default context of
19598         a domain. Added internal call for getting the default context.
19599         * appdomain.h: Added context variable in MonoDomain struct.
19600         * domain.c: mono_domain_set also sets the default context of the domain
19601         * icall.c: Mapped internal method InternalGetDefaultContext.
19602         * object.c: mono_object_get_virtual_method returns always a remoting
19603         wrapper if the object is a transparent proxy.
19604         mono_runtime_invoke_array: when creating an object by calling the
19605         constructor, if the created object is a proxy, then the constructor should
19606         be called using the a remoting wrapper.
19607
19608 2003-03-03  Dick Porter  <dick@ximian.com>
19609
19610         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
19611         variable so it compiles on solaris.  Problem spotted by
19612         Christopher Taylor <ct@cs.clemson.edu>
19613
19614 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19615
19616         * appdomain.c:
19617         (get_info_from_assembly_name): don't leak value.
19618
19619         * icall.c:
19620         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
19621         result.
19622
19623 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
19624
19625         * assembly.c: export mono_image_load_references ().
19626         * class.c: handle function pointers. mono_class_from_name() now
19627         supports nested type names directly.
19628
19629 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
19630
19631         * reflection.h reflection.c: Encode already created dynamic methods 
19632         and fields correctly as a DEF instead of a REF.
19633
19634         * reflection.c: Get rid of the force_ref argument to 
19635         mono_image_typedef_or_ref since it was wrong in the first place.
19636
19637         * string-icalls.c: add error checking to string constructors according
19638         to the MSDN docs.
19639
19640         * reflection.c: Emit types in the order their TypeBuilders were 
19641         created. Previously, a new table index was assigned to each type before
19642         the tables were emitted. This was wrong because the signature blob
19643         might already refer to a type by its original table index.
19644
19645 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
19646
19647         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
19648         change.
19649         
19650 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19651
19652         * Makefile.am: make assemblies dir have \ instead of / on windows.
19653
19654 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
19655
19656         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
19657         iterate over the NESTEDCLASS table using a linear search since the
19658         table is not guaranteed to be sorted by the secondary key.
19659
19660         * class.c (mono_class_create_from_typedef): fixed up call to
19661         mono_metadata_nesting_typedef.
19662         
19663 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
19664
19665         * marshal.c (mono_string_to_byvalstr): clear the memory as
19666         suggested by Jerome Laban <jlaban@wanadoo.fr>
19667
19668 2003-02-26  Dick Porter  <dick@ximian.com>
19669
19670         * process.c: Cope with padding in .rsrc blocks
19671
19672 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
19673
19674         * metadata.h: reverted the filter_len change, it breaks reflection
19675         
19676 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
19677
19678         * metadata.h: added a new field to store the filter_len
19679         
19680
19681 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19682
19683         * reflection.c: handle custom attributes for types and members
19684         created with Reflection.Emit (bug#38422).
19685
19686 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
19687
19688         * reflection.c: define RTSpecialName automatically for constructors for
19689         compatibility with MS.NET.
19690
19691         * reflection.c (mono_reflection_create_runtime_class): initialize
19692         nested_in field of dynamically created classes.
19693
19694 2003-02-22  Martin Baulig  <martin@ximian.com>
19695
19696         * debug-mono-symfile.h: Incremented version number.
19697
19698 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
19699
19700         * object.h icall.c process.c: fix warnings.
19701
19702 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
19703
19704         * appdomain.h appdomain.c:
19705         (mono_domain_try_type_resolve): split the 
19706         name_or_tb argument into a name and a tb argument.
19707         (mono_domain_has_type_resolve): new function to check whenever the
19708         application has registered a TypeResolve event handler.
19709         
19710         * icall.c reflection.h reflection.c: move the type resolve logic into
19711         mono_reflection_get_type () so it will be invoked when 
19712         Assembly::GetType () is called.
19713
19714         * reflection.c:
19715         (mono_reflection_get_type): renamed to get_type_internal.
19716         (mono_reflection_get_type): fixed type name generation so it works 
19717         for nested types too.
19718         (mono_reflection_get_type): call has_type_resolve () to avoid the 
19719         costly type name generation if there is no resolve event handler.
19720
19721 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19722
19723         * class.c, image.c: load exported types from file references.
19724
19725 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
19726
19727         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
19728           used to cache the managed methods used to create proxies and make 
19729           remote invocation of methods.
19730         * class.h: Added in MonoVTable a flag to indicate that a class needs 
19731           to be remotely created.
19732         * object.c: Modified the method mono_class_vtable(). It now initializes 
19733           the remote flag of the vtable. Modified mono_object_new_specific(), 
19734           so now it checks the remote flag.
19735         * icall.c: Added a couple of internal methods, one for enabling instance 
19736           creation interception for a type, and one for creating objects bypassing
19737           the remote check.
19738
19739 2003-02-18  Martin Baulig  <martin@ximian.com>
19740
19741         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
19742         New interncall to get a method's metadata token.
19743
19744         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
19745         New interncall for the debugger.
19746
19747 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
19748
19749         * class.c (mono_class_setup_vtable): allocate supertype array
19750
19751 2003-02-18  Martin Baulig  <martin@ximian.com>
19752
19753         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
19754
19755 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19756
19757         * reflection.c:
19758         (assembly_name_to_aname): jump over unknown properties (i've found
19759         something like: 'type, assembly, version=xxx, custom=null, public...',
19760         so now will ignore custom=null and still get the rest of the values).
19761
19762 2003-02-17  Dick Porter  <dick@ximian.com>
19763
19764         * threads.c: Have Thread.Start() wait for a semaphore to signal
19765         that the thread has set up all its local data.  This fixes bug
19766         34323, where Abort() raced the new thread's TLS data.
19767
19768         Also removes the handle_store() call from start_wrapper, because
19769         threads are now always created suspended and there is no longer a
19770         race between the parent and child threads to store the info.
19771
19772 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
19773
19774         * image.c: explain the #- heap issue in a message, hopefully
19775         avoiding FAQs on mono-list.
19776
19777 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19778
19779         * icall.c:
19780         (GetEntryAssembly): if the domain has not invoked
19781         AppDomain.ExecuteAssembly yet, return the assembly of the default
19782         AppDomain.
19783
19784 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
19785
19786         * class.c (mono_ldtoken): make it work in dynamic assemblies.
19787
19788 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
19789
19790         * metadata.c, reflection.c: simple speedup to type hash
19791         and equals code.
19792
19793 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
19794
19795         * image.c, image.h, class.c, assembly.c: move module loading
19796         to MonoImage. When loading metadata, consider alignemnet from
19797         the start of metadata, not from the metadata address in memory.
19798
19799 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
19800
19801         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
19802         AssemblyBuilder objects. Factored out custom attribute creation into
19803         a separate function.
19804         (create_custom_attr): new function to create custom attributes.
19805
19806 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
19807
19808         * Makefile.am: Got tired of typing the full pathname to pedump.
19809         Until there is another option, am installing this.
19810
19811 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
19812
19813         * class.c (class_compute_field_layout): always set field->parent 
19814         (mono_ldtoken): use mono_defaults.fieldhandle_class;
19815
19816 2003-02-11  Dick Porter  <dick@ximian.com>
19817
19818         * threads-types.h:
19819         * monitor.c: Rewrote Monitor, making lock much faster and
19820         Pulse/Wait work as specified.  Also uses much fewer handles, and only
19821         creates them as needed.
19822
19823         * exception.c: Added SynchronizationLockException
19824
19825         * threads.c: Deleted old Monitor implementation.  The new one is
19826         in a new file.
19827
19828 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19829
19830         * class.c: handled TypedReference type code. Set the correct size for
19831         class data. Setup interface_offsets for interface classes, too.
19832
19833 2003-02-09  Martin Baulig  <martin@ximian.com>
19834
19835         * debug-mono-symfile.h: Reflect latest symbol writer changes.
19836
19837 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
19838
19839         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
19840         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
19841         * object.c: fixed mono_object_get_virtual_method () for interfaces.
19842         * verify.c: check for code that runs after the end of the method.
19843
19844 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
19845
19846         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
19847         "System.Math::Round2".
19848         * sysmath.h: Added Floor, Round and Round2 definitions.
19849         * sysmath.c: Modified certain functions that were not 100% compliant
19850         with MS.NET (math precision) and added the implementation of Floor,
19851         Round and Round2.
19852
19853 2003-02-07  Martin Baulig  <martin@ximian.com>
19854
19855         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
19856
19857 2003-02-07  Martin Baulig  <martin@ximian.com>
19858
19859         * debug-mono-symfile.c: Reflected latest symwriter changes.
19860         (mono_debug_create_mono_symbol_file): Removed.
19861         (mono_debug_open_mono_symbol_file): Take an argument which
19862         specifies whether to create a dynamic symbol file.
19863
19864 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
19865
19866         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
19867
19868 2003-02-05  Martin Baulig  <martin@ximian.com>
19869
19870         * reflection.c (mono_image_build_metadata): Make this public,
19871         protect it against being called multiple times, don't create
19872         resources and don't build the compressed metadata here.
19873         (mono_image_create_pefile): Do this here.
19874
19875         * icall.c
19876         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
19877
19878 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19879
19880         * socket-io.c: fixed bug #36322.
19881
19882 2003-02-06  Piers Haken <piersh@friskit.com>
19883
19884         * appdomain.[ch]:
19885         * class.h:
19886         * debug-mono-symfile.c:
19887         * icall.c:
19888         * loader.c:
19889         * mono-config.c:
19890         * monosn.c:
19891         * reflection.c:
19892         * socket-io.c: warning cleanups
19893
19894 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
19895
19896         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
19897         function. works like remoting invoke, but does a check for the Proxy first.
19898
19899 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
19900
19901         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
19902
19903 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
19904
19905         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
19906         array of pointers.
19907         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
19908         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
19909
19910         * object.c (mono_store_remote_field_new): used by the new jit
19911         instead of mono_store_remote_field
19912         (mono_load_remote_field_new): used by the new jit
19913         instead of mono_load_remote_field
19914
19915 2003-02-05  Patrik Torstensson
19916
19917         * appdomain.c: changed unload to take the domain id instead
19918         of domain
19919         
19920         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
19921
19922
19923 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19924
19925         * appdomain.c: don't look for assemblies in ApplicationBase if
19926         PrivateBinPathProbe is set.
19927
19928 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19929
19930         * object.c: make the first argument in main_args contain the absolute
19931         path to the assembly. Fixes bug #37511.
19932
19933 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19934
19935         * icall.c: get correct UTC offset for countries not using daylight
19936         time saving. Fixes bug #30030.
19937
19938 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19939
19940         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
19941         and 1 are the family).
19942
19943 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
19944
19945         * icall.c (ves_icall_InternalExecute): removed wrong assertion
19946
19947         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
19948
19949 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
19950
19951         * reflection.c: added support for SignatureHelper tokens, which is
19952         needed by the Calli opcode.
19953
19954         * reflection.h: track changes to SignatureHelper class.
19955
19956         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
19957
19958 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19959
19960         * appdomain.c: fixed loading assemblies from PrivateBinPath.
19961
19962 2003-02-03  Patrik Torstensson
19963         * appdomain.[c|h], domain.c : 
19964          - Added support for getting a domain via domain id
19965          - Support for setting and getting domain from System.AppDomain 
19966            (used in cross appdomain channel)
19967          - Added support for get/set for a MonoAppContext on a thread 
19968            (Context class in System.Runtime.Remoting.Contexts),
19969          - Removed hack in Get/SetData and ExecuteAssembly.
19970         
19971         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
19972         the managed world to get control when a proxy is created.
19973
19974         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
19975         
19976 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
19977
19978         * icall.c
19979         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19980         Populate the codebase field as well.
19981
19982 2003-02-02  Martin Baulig  <martin@ximian.com>
19983
19984         * debug-mono-symfile.c
19985         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
19986         (mono_debug_symfile_add_method): Allow interncalls.
19987
19988 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19989
19990         * icall.c: throw parse exception if strtod fails or the string is empty.
19991
19992 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
19993
19994         * marshal.c: handle object type separately from defined
19995         class types.
19996
19997 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
19998
19999         * marshal.c: handle NATIVE_LPSTR for strings when it's
20000         explicitly specified.
20001
20002 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
20003
20004         * reflection.c, reflection.h, icall.c: setup the reflection
20005         handle cache for ModuleBuilders and AssemblyBuilders.
20006
20007 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
20008
20009         * reflection.c (reflection_methodbuilder_to_mono_method): set
20010         pinvoke flag
20011
20012 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20013
20014         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
20015
20016 2003-01-29  Dick Porter  <dick@ximian.com>
20017
20018         * threads.c: No need for the fake_thread kludge now that Thread
20019         doesn't run a class constructor
20020         
20021 2003-01-29  Dick Porter  <dick@ximian.com>
20022
20023         * threads.c: Use g_direct_hash instead of the rather bogus
20024         g_int_hash
20025
20026 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
20027
20028         * marshal.c (mono_marshal_get_native_wrapper): add check for null
20029         (fix pinvoke12.exe)
20030         (mono_marshal_get_struct_to_ptr): generate valid IL code
20031         (mono_marshal_get_ptr_to_struct): generate valid IL code
20032         (*): correctly set sig->pinvoke, we need to memdup the signature
20033         to do that
20034
20035 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
20036
20037         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
20038         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
20039
20040 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
20041
20042         * profiler.c: provide more callers information.
20043
20044 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
20045
20046         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
20047
20048         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
20049
20050         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
20051
20052 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
20053
20054         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
20055         exception instead of going into an infinite loop on dates which it 
20056         can't yet handle.
20057
20058         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
20059         out-of-range exception if needed.
20060
20061         * class.c (mono_class_setup_vtable): allow a virtual method to provide
20062         an implementation for an interface method and to override an inherited
20063         method at the same time. 
20064         Imagine a scenario when a virtual method is used to override a
20065         virtual abstract method in a parent class, and this same method 
20066         provides an implementation for an method inherited from an interface. 
20067         In this case, the interface resolution code will set im->slot, which 
20068         means that the virtual method override pass will skip this method 
20069         which means a pointer to the abstract method inherited from the parent
20070         will remain in the vtable of this non-abstract class.
20071
20072         * class.c: (mono_class_setup_vtable): continue search for a real 
20073         method if only an abstract method is found.     
20074
20075 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
20076
20077         * reflection.c: add size to encoding for ByValStr and ByValArray
20078         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
20079
20080 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
20081
20082         * class.c (mono_class_setup_vtable): pass the override info as an
20083         argument.
20084
20085         * class.c (mono_class_setup_vtable): set the slot of overriding methods
20086         correctly.
20087         
20088         * reflection.c (ensure_runtime_vtable); add support for method 
20089         overrides.
20090         
20091 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
20092
20093         * reflection.c (resolution_scope_from_image): Hack to work to work with
20094         dynamic assemblies.
20095
20096         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
20097         added a 'force_ref' argument to force this function to allways return 
20098         a TypeRef. This is needed by mono_image_get_memberref_token ().
20099         
20100 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
20101
20102         * reflection.c (mono_image_get_type_info): interfaces really don't have
20103         a parent.
20104
20105         * reflection.c (mono_image_basic_init): fill out missing fields of
20106         image structure.
20107
20108         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
20109         dynamic assemblies. This is required so dynamic assemblies show up in
20110         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
20111         Type::GetType() etc. This is consistent with MS behaviour.
20112
20113         * image.c image.h reflection.c: add newly created classes to the name 
20114         cache so mono_class_get () will find them.      
20115
20116 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
20117
20118         First part of changes to get IKVM.NET running under mono.
20119         
20120         * appdomain.h, appdomain.c: added new function 
20121         mono_domain_try_type_resolve() which will emit TypeResolve events. 
20122         This function will call AppDomain::DoTypeResolve to do the actual work.
20123
20124         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
20125         moved existing code dealing with dynamic tokens to a new function 
20126         called mono_reflection_lookup_dynamic_token (). This function will 
20127         raise TypeResolve events when appropriate. Since reflection.c is not 
20128         part of libmetadata, a new hook function called 
20129         mono_lookup_dynamic_token() is added to class.c which will call this.
20130
20131         * assembly.h assembly.c: make the invoke_load_hook function public,
20132         so it can be called for dynamic assemblies.
20133
20134         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
20135
20136         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
20137         type isn't found.
20138
20139         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
20140         MonoGHashTable, since it contains pointers to objects which the GC 
20141         needs to track.
20142
20143         * assembly.c (search_loaded): remove unused variable.
20144         
20145 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
20146
20147         * object.c: fixed issue exposed by gcc-generated IL programs
20148         that use RVA data for pointers.
20149
20150 2003-01-25  Martin Baulig  <martin@ximian.com>
20151
20152         * threads.c (start_wrapper): Moved the initialization of
20153         `start_func' above the mono_new_thread_init() call to which we
20154         pass it as argument.
20155
20156 2003-01-24  Martin Baulig  <martin@ximian.com>
20157
20158         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
20159         the MonoThread pointer.
20160
20161 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
20162
20163         * icall.c: Rename `PowImpl' to Pow.
20164
20165 2003-01-23  Dick Porter  <dick@ximian.com>
20166
20167         * threads.c (start_wrapper): Create a Thread object if needed, so
20168         the Main() thread can do the class initialisation in a subthread
20169         that has been set up to allow managed code execution.
20170
20171         Pass the thread ID instead of the MonoThread pointer to the thread
20172         start and attach callbacks.  This change is required, because the
20173         jit thread start callback must be called _before_ the Thread
20174         object can be created.
20175         
20176         (mono_thread_init): Removed much object creation code that is no
20177         longer needed.  No managed code is called from here now.
20178
20179         * object.c (mono_runtime_exec_managed_code): Create a subthread
20180         for Main, and call back to the runtime to use it.
20181         Set the exit code when Main exits.
20182
20183         * gc.c: Make sure domain finalisation happens in a subthread.
20184         Re-enable threaded GC, fixing bug 31333 (again).
20185
20186         * environment.c: System.Environment internall calls (so far just
20187         ExitCode is here, the others are still in icall.c)
20188
20189         * appdomain.c (mono_runtime_cleanup): All threads running managed
20190         code should have finished before mono_runtime_cleanup() is
20191         reached, so no need to clean up threads.
20192
20193 2003-01-22  Martin Baulig  <martin@ximian.com>
20194
20195         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
20196         `gpointer func' arguments.      
20197         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
20198         but added `MonoThread *thread' argument.
20199         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
20200
20201         * threads.c (mono_new_thread_init): Added `gpointer func' argument
20202         and pass it to the mono_thread_start_cb callback.
20203         (mono_install_thread_callbacks): New public function to install a
20204         set of callbacks which are set by the debugger.
20205         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
20206
20207 2003-01-22  Martin Baulig  <martin@ximian.com>
20208
20209         * Makefile.am: Install debug-mono-symfile.h.
20210
20211 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
20212
20213         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
20214
20215 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
20216
20217         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
20218         * class.c (mono_ptr_class_get): correctly set access levels of pointers
20219         (mono_array_class_get): correctly set access levels of arrays
20220
20221 2003-01-20      Patrik Torstensson
20222         * image.h (MonoAssemblyName): changed major, minor, build, revision
20223         from signed to unsigned.
20224
20225 2003-01-20  sean kasun <skasun@azstarnet.com>
20226
20227         * reflection.c (load_cattr_value): Now this handles
20228         MONO_TYPE_SZARRAY.  Fixes bug #35629
20229
20230 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
20231
20232         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
20233         integer value
20234
20235 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20236
20237         * decimal.c: fixed bug #26056.
20238
20239 2003-01-17  Martin Baulig  <martin@ximian.com>
20240
20241         * gc.c: Raise an ExecutionEngineException instead of using g_error().
20242
20243 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20244
20245         * exception.[ch]:
20246         (mono_get_exception_type_initialization): new function.
20247
20248         * object.c: throw a TypeInitializationException when an exception is
20249         thrown invoking the class constructor.
20250
20251 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20252
20253         * reflection.c: fixed attribute reading.
20254
20255 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20256
20257         * icall.c:
20258         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
20259         provided, look for the type in the calling assembly and then in
20260         mscorlib; if the assembly name is provided, only try that one.
20261
20262 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
20263
20264         * object.c: register the vtable before there is a chance it's
20265         queried again recursively.
20266
20267 2003-01-13  Duncan Mak  <duncan@ximian.com>
20268
20269         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
20270         gc-internal.h. 
20271         
20272 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
20273
20274         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
20275
20276 2003-01-11  Martin Baulig  <martin@ximian.com>
20277
20278         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
20279         this to 20 for the release.
20280
20281 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
20282
20283         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
20284
20285         * loader.c (mono_method_get_marshal_info): bug fix
20286
20287         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
20288         structures with explicit layout
20289
20290 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20291
20292         * profiler.c: made the output more readable (and sorted). 
20293         Added caller information for the allocation profiler.
20294
20295 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
20296
20297         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
20298
20299 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20300
20301         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
20302         to get value types.
20303         
20304 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
20305
20306         * object.c, profiler.h, profiler.c, profiler-private.h:
20307         Added object allocation profiler.
20308
20309 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
20310
20311         * reflection.h, reflection.c: handle global methods.
20312         Compress blob entries.
20313
20314 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
20315
20316         * marshal.c: fix compilation.
20317
20318 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
20319
20320         * loader.c (mono_method_get_marshal_info): impl.
20321
20322         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
20323
20324 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20325
20326         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
20327         for reference types.
20328
20329 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
20330
20331         * loader.c: fixed off by one error in loaded parameter names.
20332
20333 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
20334
20335         * marshal.c (mono_marshal_get_icall_wrapper): like
20336         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
20337         instead of a MonoMethod.
20338
20339 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20340
20341         * decimal.c: fixed bug #36537.
20342
20343 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
20344
20345         * marshal.c: throw a missing method exception if a
20346         P/Invoke method is not found.
20347
20348 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20349
20350         * icall.c: allow a null this for constructors.
20351
20352 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20353
20354         * icall.c: raise the proper exceptions if the arguments to the
20355         internal Invoke are incorrect.
20356
20357 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
20358
20359         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
20360
20361 2003-01-03  Martin Baulig  <martin@ximian.com>
20362
20363         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20364
20365 2002-12-31  Martin Baulig  <martin@ximian.com>
20366
20367         * debug-mono-symfile.c: Completely rewrote the type section.
20368         Instead of using individual malloc()ed fields, we use one big
20369         continuous memory area and offsets into this area.
20370         See the comments in the source code for details.
20371
20372 2002-12-30  Martin Baulig  <martin@ximian.com>
20373
20374         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
20375
20376 2002-12-30  Martin Baulig  <martin@ximian.com>
20377
20378         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
20379         line number table in this data blob instead of using an external
20380         pointer.
20381
20382 2002-12-28  Martin Baulig  <martin@ximian.com>
20383
20384         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20385
20386 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
20387
20388         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
20389         as a boxed return type.
20390
20391 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
20392
20393         * appdomain.c
20394         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
20395         g_build_filename to properly get separators on the filename created.
20396
20397         * object.h: Small change, introduce MonoMarshalByRefObject to
20398         track the layout of that structure in the C# universe as we make
20399         changes there.
20400
20401 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
20402
20403         * object.c: removed assert to allow static fields on interfaces.
20404         * loader.c: a TypeSpec may be used for any type, not just arrays.
20405
20406 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20407
20408         * class.c, class.h: added mono_class_array_element_size ().
20409         Ignore static methods in interfaces.
20410
20411 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20412
20413         * threads.c: fixed the build under cygwin.
20414
20415 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20416
20417         * reflection.c: handle nullref constants. Allocate keys for
20418         reflection handles with the GC.
20419
20420 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20421
20422         * threads.c, threads.h: added mono_thread_get_abort_signal()
20423         to get a suitable signal for thread abort.
20424
20425 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20426
20427         * metadata.c: fix handling of ExportedType table.
20428
20429 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20430
20431         * icall.c: added WriteWindowsDebugString internal call.
20432
20433 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20434
20435         * reflection.h: added fields to match C# implementation.
20436
20437 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20438
20439         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
20440
20441 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
20442
20443         * gc.h, gc-internal.h: Rename header for GC internal calls to
20444         gc-internal.h from gc.h as to not clash with Boehm GC having its
20445         header installed as <gc.h> in outside include paths.
20446         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
20447         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
20448
20449 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20450
20451         * icall.c: assign minor, build and revision in FillName.
20452
20453 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
20454
20455         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
20456         Added support for running code generated by Reflection.Emit.
20457
20458 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20459
20460         * appdomain.c: check for NULL argument in LoadFrom.
20461
20462 2002-12-10  Dick Porter  <dick@ximian.com>
20463
20464         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
20465
20466 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20467
20468         * appdomain.c: fix buglet when building exe file name.  Handle full
20469         assembly name (needed after latest changes to AssemblyName).
20470         * image.c:
20471         (mono_image_close): free some hashtables.
20472
20473 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
20474
20475         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
20476         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
20477         on some systems (redhat 7.3) 
20478
20479 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
20480
20481         * threads.c: delete the critical section of a sync block,
20482         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
20483
20484 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
20485
20486         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
20487
20488 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20489
20490         * appdomain.[ch]: handle the assembly preload event to try loading the
20491         assemblies using the paths we have in the current domain.
20492
20493         * assembly.[ch]: created an assembly preload hook that is called to try
20494         loading the assembly by other means that the ones provided here.
20495
20496         * domain.c: initialize the domain search path.
20497
20498         From now on, assemblies (TODO: except corlib and System) are loaded
20499         according to these rules when using mono_assembly_load ():
20500
20501                 1. It tries to load the assembly from the ApplicationBase
20502                 of the current domain appending .dll and .exe (TODO: have to
20503                 try loading from name/name.dll and name/name.exe).
20504
20505                 2. It tries the search path specified in PrivateBinPath for the
20506                 current domain (if any).
20507
20508                 3. Previous behavior.
20509
20510 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
20511
20512         * icall.c: implemented GetInterfaceMap() related icall.
20513         * domain.c, loader.h: load MethodInfo in mono_defaults.
20514
20515 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20516
20517         * gc.c: disable the finalizer thread for now, untill all the issues
20518         with it are resolved.
20519
20520 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20521
20522         * string-icalls.c: handle embedded nulls in string ctor when the
20523         length is specified.
20524
20525 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20526
20527         * class.c: look for explicit interface implementation in parent
20528         classes, too.
20529
20530 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
20531
20532         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
20533
20534 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20535
20536         * gc.c: protect handles with a critical section.
20537
20538 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20539
20540         * icall.c:
20541         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
20542         parameters. If no assembly specified, try getting the type from all
20543         the assemblies in the current domain, else, load the assembly and get
20544         the type from it.
20545
20546 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20547
20548         * marshal.c: applied patch from Aleksey Demakov that fixes
20549         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
20550
20551 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20552
20553         * icall.c: fixed get_location.
20554
20555 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
20556
20557         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
20558         declarations to make it work with older gcc. 
20559
20560         * loader.c (mono_get_method): set signature->pinvoke for native calls
20561
20562 2002-11-20  Dick Porter  <dick@ximian.com>
20563
20564         * threads.c (mono_thread_init): Set the main thread's handle
20565
20566 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20567
20568         * gc.c: allow compilation without GC support. Changed to match the
20569         mono coding style.
20570
20571 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20572
20573         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
20574
20575 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
20576
20577         * reflection.c: set a public key token on the core assemblies.
20578
20579 2002-11-18  Dick Porter  <dick@ximian.com>
20580
20581         * threads.c: Split out some thread initialisation so that other
20582         files can set the start callback function.
20583
20584         * gc.c: Run finalisers in a separate thread, to avoid stack
20585         overflow.  Fixes bug 31333.
20586
20587         * appdomain.c: Set up GC finalisation thread.
20588
20589         * reflection.c: 
20590         * object.c: 
20591         * domain.c: Use gc.h macros for GC_malloc
20592         
20593 2002-11-15  Dick Porter  <dick@ximian.com>
20594
20595         * threadpool.c: 
20596         * threads.c:
20597         * appdomain.c: Removed mono_runtime_init_with_attach(),
20598         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
20599         merging the extra parameter with the existing function.  Removed
20600         unneeded code in mono_thread_attach().
20601
20602 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
20603
20604         * image.c (mono_image_loaded_by_guid): a method to get loaded
20605         images by guid. 
20606         (load_metadata_ptrs): we store the guid as string.
20607
20608 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
20609
20610         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
20611
20612         * metadata.c (mono_guid_to_string): imported method form Zoltan
20613         Varga (slightly modified)
20614
20615         * assembly.c (mono_assembly_open): load precompiled code
20616
20617         * loader.h (MonoMethod): we store the method token for use in the
20618         aot compiler. 
20619
20620 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20621
20622         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
20623         the hook function called when an assembly is loaded.
20624         
20625         * domain.c: Modified file.
20626         (mono_domain_assembly_load): removed hash table insertion of assemblies.
20627
20628         Fixes bug #33196.
20629
20630 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
20631
20632         * reflection.c: Map PEFileKind to the value expected by the WinNT
20633         image loader. 
20634
20635 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20636
20637         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
20638         Read until the buffer is filled completely.
20639
20640 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20641
20642         * icall.c: implemented MonoType.InternalGetEvent ().
20643
20644 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20645
20646         * appdomain.c: implemented InitAppDomainSetup. Delayed
20647         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
20648         the entry_assembly.
20649
20650         * assembly.c: base_dir is now an absolute path ending with
20651         G_DIR_SEPARATOR.
20652
20653         * icall.c: modified get_location according to the above changes.
20654
20655         * object.c: init AppDomain.SetupInformation for the default domain after
20656         we have the entry assembly.
20657
20658         * domain.c: when unloading a domain, setup = NULL.
20659
20660 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
20661
20662         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
20663
20664 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
20665
20666         * object.h, object.c: introduced mono_object_get_virtual_method ()
20667         to lookup the method invoked on an object when a callvirt is done on
20668         a method.
20669         * icall.c: make MethodInfo::Invoke() always do a virtual call.
20670
20671 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20672
20673         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
20674         current domain when loaded an assembly and failed to load it.
20675
20676         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
20677
20678 2002-10-31  Dick Porter  <dick@ximian.com>
20679
20680         * icall.c: 
20681         * file-io.h: 
20682         * file-io.c: Return the error status in a parameter, as the
20683         GetLastError() value has long since been blown away if we try and
20684         look it up in a subsequent internal call invocation.  Delete the
20685         GetLastError() internal call, because it's useless.
20686
20687 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
20688
20689         * class.[ch]: added cast_class to fix bug 29517
20690
20691 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
20692
20693         * marshal.c: create valid IL code in the filter clause:
20694         the new JIT is less forgiving:-)
20695
20696 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20697
20698         * icall.c: removed get_property internal call.
20699
20700 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
20701
20702         * appdomain.h domain.c: Added an ID to appdomains.
20703         
20704         * threads.c threads.h icall.c: Implement icall
20705         Thread:GetDomainID(), and remove unused icall 
20706         CurrentThreadDomain_internal.
20707
20708 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20709
20710         * icall.c: Don't recurse through the base types in GetConstructor.
20711         Fixes bug #32063. 
20712
20713 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
20714
20715         * mempool.h, mempool.c: added mono_mempool_empty() and
20716         mono_mempool_stats().
20717
20718 2002-10-23  Dick Porter  <dick@ximian.com>
20719
20720         * file-io.c: 
20721         * file-io.h: 
20722         * icall.c: Added MonoIO.GetFileType internal call
20723
20724 2002-10-17  Dick Porter  <dick@ximian.com>
20725
20726         * appdomain.c (mono_runtime_cleanup): Don't signal the async
20727         delegate semaphore before waiting for all threads to finish,
20728         because new threads can also call async delegates.  Fixes bug
20729         32004.
20730
20731         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
20732         of 3 seconds, in case another async job is queued.  (This part is
20733         needed because the bug fix reintroduced the 3s exit lag.)  This
20734         makes the mono_runtime_shutdown flag superfluous.
20735
20736 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
20737
20738         * reflection.c: include ehader size in method section headers.
20739         Really check for suplicated modules entries.
20740
20741 2002-10-17  Martin Baulig  <martin@gnome.org>
20742
20743         * debug-mono-symfile.c: Added back support for locals.
20744
20745 2002-10-14  Martin Baulig  <martin@gnome.org>
20746
20747         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
20748         MONO_TYPE_VOID.
20749
20750 2002-10-14  Martin Baulig  <martin@gnome.org>
20751
20752         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
20753         mono_class_get() instead of looking in the class cache. 
20754
20755 2002-10-13  Martin Baulig  <martin@gnome.org>
20756
20757         * debug-mono-symfile.c: Set version number to 28, include the
20758         signature in method names.
20759
20760 2002-10-13  Martin Baulig  <martin@gnome.org>
20761
20762         * debug-mono-symfile.h: Set version number to 27.
20763
20764 2002-10-11  Martin Baulig  <martin@gnome.org>
20765
20766         * gc.c: Don't register/unregister NULL pointers as disappearing links.
20767
20768 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20769
20770         * metadata.c, metadata.h: added helper function to allocate signatures.
20771
20772 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20773
20774         * icall.c: added internal call to get the location of machine.config.
20775
20776 2002-10-08  Martin Baulig  <martin@gnome.org>
20777
20778         * debug-mono-symfile.c: Ignore classes with a pending init for the
20779         moment.
20780
20781 2002-10-03  Dick Porter  <dick@ximian.com>
20782
20783         * threads.c: Freebsd pthread_t is a pointer
20784
20785 2002-10-03  Dick Porter  <dick@ximian.com>
20786
20787         * socket-io.c: Implemented GetHostName_internal
20788
20789 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20790
20791         * mono-config.c:
20792         (mono_config_parse_file): don't leak the text.
20793
20794 2002-10-02  Martin Baulig  <martin@gnome.org>
20795
20796         * debug-mono-symfile.c: Added support for methods.
20797
20798 2002-10-01  Martin Baulig  <martin@gnome.org>
20799
20800         * debug-mono-symfile.c: Don't emit methods and line numbers for
20801         the dynamic symbol file, just write the type table.  We can easily
20802         have an external helper program which creates a symbol file for an
20803         IL file.        
20804
20805 2002-10-01  Dick Porter  <dick@ximian.com>
20806
20807         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
20808         Only add the handle to the cleanup array when we're about to
20809         launch the thread.  Bug 31425 deadlocked when the test was run on
20810         mono under w32.
20811
20812 2002-10-01  Martin Baulig  <martin@gnome.org>
20813
20814         * debug-mono-symfile.c: Added support for properties.
20815
20816 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20817
20818         * reflection.c: unaligned store fix from Mark Crichton
20819         <crichton@gimp.org>.
20820
20821 2002-09-27  Martin Baulig  <martin@gnome.org>
20822
20823         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
20824         New interncall.
20825
20826 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
20827
20828         * assembly.h, assembly.c: use a sane API to hook into the assembly
20829         loading process instead of a useless special-purpouse hack
20830         (ngen needs a hook, too, for example).
20831
20832 2002-09-27  Dick Porter  <dick@ximian.com>
20833
20834         * threads.c (mono_thread_init): Call GetCurrentProcess() so
20835         io-layer can set up some process handle info.  Not needed on w32,
20836         but doesn't hurt either.
20837
20838         * process.c: Pass the program name in the second parameter to
20839         CreateProcess, so the path is searched.  Include the working
20840         directory. Implemented process name, process enumeration, and some
20841         process detail internal calls.
20842         
20843         * icall.c: Added internal calls for process lookup, and some
20844         process details
20845
20846 2002-09-26  Martin Baulig  <martin@gnome.org>
20847
20848         * assembly.c (mono_install_open_assembly_hook): New global
20849         function to install a function to be invoked each time a new
20850         assembly is loaded.
20851         (mono_assembly_open): Run this callback function if set.
20852
20853         * debug-mono-symfile.c: Put back line numbers for the dynamic
20854         symbol file and also record the .il file as source file.  This
20855         allows us to install the temporary symbol file as `file.dbg' just
20856         like a compiler-generated one.
20857
20858 2002-09-26  Nick Zigarovich <nick@chemlab.org>
20859
20860         * Corrected typo in gc.c (BOHEM vs BOEHM).
20861
20862 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20863
20864         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
20865         GetProperties. Also avoid calling g_slist_length in GetProperties and
20866         GetMethods.
20867
20868 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
20869
20870         * reflection.c: avoid unaligned stores (bug spotted by
20871         Mark Crichton  <crichton@gimp.org>).
20872
20873 2002-09-25  Martin Baulig  <martin@gnome.org>
20874
20875         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
20876         instead of guint64 for addresses and added prologue/epilogue info.
20877
20878 2002-09-25  Martin Baulig  <martin@gnome.org>
20879
20880         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
20881         store line number info.  For the dynamic symbol file, we only need
20882         to provide the JIT generated dynamic line number info for the dynamic
20883         symbol file.
20884
20885 2002-09-25  Martin Baulig  <martin@gnome.org>
20886
20887         * debug-mono-symfile.h: Incremented version number.
20888
20889 2002-09-24  Martin Baulig  <martin@gnome.org>
20890
20891         * class.c (mono_debugger_class_init_func): New global function
20892         pointer variable.
20893         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
20894         call it.
20895
20896         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
20897         function.  This is called via the mono_debugger_class_init_func
20898         hook to add all types to the dynamic type table.
20899         (ves_icall_MonoDebugger_GetType): New interncall to get a class
20900         from its metadata token.
20901
20902         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
20903         New interncall for the debugger.
20904
20905 2002-09-24  Nick Drochak <ndrochak@gol.com>
20906
20907         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
20908         before using it in case it is null.
20909         
20910 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20911
20912         * metadata.c: allow custom modifiers in local var signatures
20913         (bug spotted by Zoltan Varga).
20914
20915 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20916
20917         * class.c: deal with the <Module> class that may have a NULL vtable.
20918         Eliminate warnings.
20919
20920 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20921
20922         * image.c, image.h: more strong name helpers.
20923         * monosn.c: more work: convert pem keys to cryptoapi format.
20924
20925 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
20926
20927         * string-icalls.c: speedup IndexOf.
20928
20929 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20930
20931         * icall.c: updates from Zoltan.2.Varga@nokia.com.
20932
20933 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
20934
20935         * icall.c: cleanup: use mono_object_domain ().
20936
20937 2002-09-23  Martin Baulig  <martin@gnome.org>
20938
20939         * debug-mono-symfile.c: Improved type support.
20940
20941 2002-09-22  Martin Baulig  <martin@gnome.org>
20942
20943         * debug-mono-symfile.c: Added support for reference types and strings.
20944
20945 2002-09-22  Martin Baulig  <martin@gnome.org>
20946
20947         * debug-mono-symfile.c: Started to work on the type table.
20948
20949 2002-09-21  Martin Baulig  <martin@gnome.org>
20950
20951         * debug-mono-symfile.c: Largely reworked the symbol table format.
20952         The symbol table is now incrementally updated each time a new
20953         method is added.  We're now also using our own magic and version
20954         so that you don't need to recompile all your classes if the
20955         dynamic table changes.
20956         (mono_debug_update_mono_symbol_file): Removed.
20957         (mono_debug_symfile_add_method): New function to add a method.
20958
20959 2002-09-21  Martin Baulig  <martin@gnome.org>
20960
20961         * icall.c
20962         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
20963         New interncall.
20964
20965         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
20966         New interncall to get a method from its metadata token.
20967
20968 2002-09-21  Martin Baulig  <martin@gnome.org>
20969
20970         * debug-mono-symfile.c: Create type table.
20971
20972 2002-09-20  Martin Baulig  <martin@gnome.org>
20973
20974         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
20975
20976 2002-09-20  Martin Baulig  <martin@gnome.org>
20977
20978         * debug-mono-symfile.c: Provide information about params and locals.
20979
20980 2002-09-20  Martin Baulig  <martin@gnome.org>
20981
20982         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
20983         New interncall.
20984
20985         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
20986         interncall to get a method from its metadata token.
20987
20988 2002-09-20  Martin Baulig  <martin@gnome.org>
20989
20990         * debug-mono-symfile.c: Added a few checks for method->header
20991         being non-NULL.  This should never happen, but for the moment
20992         let's use a g_warning() rather than a g_assert().
20993
20994 2002-09-19  Mark Crichton  <crichton@gimp.org>
20995
20996         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
20997         even if support for it isn't present.  Added an #ifdef to fix this.
20998
20999         * socket-io.c: Added checks back for Solaris support.
21000
21001 2002-09-19  Martin Baulig  <martin@gnome.org>
21002
21003         * debug-mono-symfile.c (read_string, write_string): Reflect latest
21004         changes in the symbol file format.
21005
21006 2002-09-18  Martin Baulig  <martin@gnome.org>
21007
21008         * debug-mono-symfile.c: Set version number to 21.
21009
21010 2002-09-18  Dick Porter  <dick@ximian.com>
21011
21012         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
21013         on netbsd.  Fixes bug 30051.
21014
21015 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21016
21017         * reflection.c:
21018         (set_version_from_string): little fix.
21019
21020 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21021
21022         * monosn.c, Makefile.am: added strong name utility.
21023         * reflection.h, reflection.c: implemented delayed signing,
21024         locale, version and hash id assembly attributes.
21025
21026 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21027
21028         * loader.c, metadata.c: load param attributes in signatures.
21029
21030 2002-09-16  Martin Baulig  <martin@gnome.org>
21031
21032         * debug-mono-symfile.c: Added string table with all method names.
21033
21034 2002-09-14  Martin Baulig  <martin@gnome.org>
21035
21036         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
21037         fast method lookup.
21038
21039 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
21040
21041         * reflection.c: record the public key token of referenced assemblies.
21042
21043 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21044
21045         * image.c, image.h: added functions to get the strong name and the
21046         public key of an assembly.
21047         * pedump.c: use them.
21048
21049 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
21050
21051         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
21052
21053 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
21054
21055         * marshal.c (mono_marshal_get_managed_wrapper): Added
21056         MONO_TYPE_BOOLEAN 
21057
21058 2002-09-11  Martin Baulig  <martin@gnome.org>
21059
21060         * gc.c: Call GC_unregister_disappearing_link() on all links when
21061         finalizing them, this is necessary to aviod a crash in boehm's
21062         finalize handler.
21063
21064 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21065
21066         * gc.c: handle GetTarget for finalized objects spotted and fixed by
21067         nick@chemlab.org.
21068
21069 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
21070
21071         * icall.c: implemented MonoType::Module.
21072         * reflection.c, reflection.h: mono_module_get_object () from
21073         Tomi Pakarinen <tomi.pakarinen@welho.com>.
21074
21075 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
21076
21077         * icall.c: ignore overridden methods in GetMethods ().
21078         Fix for FieldInfo::SetValue().
21079         * object.c: handle float/double in runtime invoke.
21080
21081 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
21082
21083         * object.c: allow a constructor to be called again on an object.
21084
21085 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
21086
21087         * class.h, class.c: move field layout code to it's own function and
21088         export it. Get an interface id earlier. Move fields in MonoClass
21089         so they are more cache friendly and align the bitfields.
21090         * loader.c: temporary handle get_param_names() for a runtime method.
21091         * reflection.c, reflection.h: more code to handle runtime creation of
21092         types.
21093
21094 2002-09-09  Martin Baulig  <martin@gnome.org>
21095
21096         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
21097         signature with the pinvoke field being set for the actual call.
21098
21099 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21100
21101         * icall.c: removed some unused icalls. Start of map of glib charsets
21102         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
21103
21104 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21105
21106         * debug-helpers.c: break infinite loop (found and fixed by
21107         Holger Arnold <harnold@gmx.de>).
21108
21109 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
21110
21111         * icall.c: target may be null in create_delegate.
21112
21113 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21114
21115         * marshal.c: handle a boolean return type.
21116
21117 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
21118
21119         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
21120
21121 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
21122
21123         * gc.c: fix weakreferences.
21124
21125 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
21126
21127         * icall.c: added icall to get default codepage.
21128
21129 2002-09-03  Dick Porter  <dick@ximian.com>
21130
21131         * threads.h: 
21132         * threads.c: Use MonoThread instead of MonoObject where
21133         apropriate.
21134
21135         Store running thread objects in a hash table, so that we have all
21136         the info to hand when waiting for them to finish
21137         (means we don't need OpenThread() any more, so mingw builds should
21138         be fully functional again.)
21139
21140         * verify.c:
21141         * object.h: Added thread ID to MonoThread
21142
21143 2002-09-03  Martin Baulig  <martin@gnome.org>
21144
21145         * icall.c (System.Reflection.Assembly::get_location): New interncall.
21146
21147 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21148
21149         * icall.c: fixed leak in get_temp_path. Thanks lupus.
21150
21151 2002-09-03  Martin Baulig  <martin@gnome.org>
21152
21153         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
21154         argument to store the end address of the disassembled instruction.
21155
21156         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
21157         here from debug-symfile.h.
21158         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
21159         JIT into this struct.
21160         (MonoSymbolFile): Added `char *image_file' field.
21161         (MonoDebugGetMethodFunc): Removed.
21162         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
21163         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
21164         (mono_debug_find_method): New method.
21165
21166         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
21167         create a full symbol file.
21168         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
21169         and static symbol files.
21170         (mono_debug_find_method): The symbol file keeps an internal method hash,
21171         call this to get a MonoDebugMethodInfo from a MonoMethod.
21172
21173         * debug-symfile.[ch]: Removed.
21174
21175 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
21176
21177         * image.c (do_mono_image_open): Remove linker version check.
21178
21179 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
21180
21181         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
21182         wrappers for instance methods.
21183         
21184 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21185
21186         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
21187
21188 2002-08-28  Dick Porter  <dick@ximian.com>
21189
21190         * Makefile.am: Export HOST_CC for w32 builds
21191
21192 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21193
21194         * file-io.c process.c: MonoString are null terminated, no
21195         need for mono_string_to_utf16() anymore.
21196
21197 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21198
21199         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
21200
21201 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
21202
21203         * icall.c, reflection.h: speedup System.MonoType.
21204
21205 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
21206
21207         * reflection.c: allow null as the value of a string argument in
21208         custom attributes constructors.
21209
21210 2002-08-27  Martin Baulig  <martin@gnome.org>
21211
21212         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
21213         `trampoline_address' field.
21214
21215 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
21216
21217         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
21218         check (fixes bug #29486) 
21219
21220 2002-08-27  Martin Baulig  <martin@gnome.org>
21221
21222         * debug-mono-symfile.c: Changed the file format in a way that allows us
21223         open it read-only and to use a specially malloced area for all the
21224         dynamic data.  We can now also generate a symbol file on-the-fly if we're
21225         debugging IL code and there is no MCS generated symbol file for it.
21226
21227 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
21228
21229         * object.c: added a define for a good string and array
21230         creation speedup (not enabled by default because we need to deal with
21231         the synch stuff).
21232
21233 2002-08-26  Martin Baulig  <martin@gnome.org>
21234
21235         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
21236         function to create a dynamic symbol file.  This is used by the
21237         debugger to create a symbol file for IL code on-the-fly.
21238
21239 2002-08-26  Martin Baulig  <martin@gnome.org>
21240
21241         * loader.c (mono_lookup_pinvoke_call): Include the error message
21242         from g_module_error() in the error message.
21243
21244 2002-08-24  Martin Baulig  <martin@gnome.org>
21245
21246         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
21247         function to update the symbol file.  The symbol file is mmap()ed
21248         writable, but private.  This allows us to install the symbol file
21249         together with the assembly.
21250
21251 2002-08-24  Martin Baulig  <martin@gnome.org>
21252
21253         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
21254         but they can read the new symbol file format which mcs is now creating.
21255
21256         * debug-symfile.c (mono_debug_find_source_location): Moved to
21257         debug-mono-symfile.c; this is now operating on the new symbol file.
21258
21259 2002-08-23  Martin Baulig  <martin@gnome.org>
21260
21261         * debug-helpers.c (mono_method_desc_from_method): New function to get
21262         a MonoMethodDesc from a MonoMethod.
21263
21264 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
21265
21266         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
21267         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
21268
21269 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
21270
21271         * string-icalls.[ch]: make helper methods static.
21272
21273 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21274
21275         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
21276         types to it and to SetValueInternal.
21277
21278         * object.c: Moved handle_enum label to its proper place. This was the
21279         f... bug! ;-)
21280
21281         This time i compiled mcs and gtk-sharp and they both work.
21282
21283 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21284
21285         * icall.c: reverted partially my previous patch until 
21286         object.c:set_value handles enums correcly.
21287
21288 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21289
21290         * icall.c:
21291         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
21292         (ves_icall_System_Environment_get_MachineName): removed warning when
21293         compiling under cygwin.
21294
21295 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21296
21297         * object.c: fixed field_get_value() for reference types.
21298
21299 2002-08-22  Dick Porter  <dick@ximian.com>
21300
21301         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
21302         Don't free a buffer while it's still needed.  Patch from Jonathan
21303         Liger <Jonathan.liger@wanadoo.fr>
21304
21305 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
21306
21307         * icall.c (ves_icall_System_Environment_get_Platform): Add new
21308         internal call.
21309
21310 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
21311
21312         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
21313         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
21314
21315         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
21316         we call unmanaged code which throws exceptions.
21317
21318 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21319
21320         * appdomain.h: added per-domain entry_assembly.
21321         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
21322         arguments.
21323         * icall.c: Assembly::GetEntryAssembly icall.
21324         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
21325         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
21326
21327 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21328
21329         * appdomain.h, gc.c: added mono_domain_finalize ().
21330
21331 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21332
21333         * object.c:
21334         (mono_print_unhandled_exception): changed g_warning by g_printerr
21335         because g_log has a 1024 characters limit (yeah, i got a big stack
21336         trace). Don't print exception name, that should be in ToString 
21337         returned string.
21338
21339 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21340
21341         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
21342         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
21343
21344 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21345
21346         * object.c:
21347         (mono_print_unhandled_exception): after previous commit, i realized
21348         that MS calls ToString on the exception. I changed this function to
21349         do that. This way we get stack_trace for free.
21350
21351 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21352
21353         * object.c:
21354         (mono_print_unhandled_exception): invoke Message property instead of
21355         getting 'message' field from Exception. Don't allocate memory for
21356         'trace' and 'message' if not needed.
21357
21358 2002-08-18  Dick Porter  <dick@ximian.com>
21359
21360         * unicode.c: Fix asserts to match Encoder.cs checks
21361
21362 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21363
21364         * marshal.c: fix unaligned store issue and a few wrong
21365         opcode argument types.
21366
21367 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21368
21369         * icall.c: added GetUninitializedObjectInternal internal call.
21370
21371 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
21372
21373         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
21374         to the right domain.
21375
21376 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
21377
21378         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
21379
21380         * class.c (class_compute_field_layout): set blittable to false for Strings
21381
21382         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
21383
21384 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21385
21386         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
21387         first chunk of code to create types at runtime. Code to
21388         handle ReflectedType/DeclaringType. Make reflection handles
21389         domain specific.
21390
21391 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
21392
21393         * class.c: set correct name in arrays.
21394
21395 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
21396
21397         * appdomain.c (mono_domain_transfer_object): make it work with
21398         valuetypes. bug fixes.
21399
21400 2002-08-12  Dick Porter  <dick@ximian.com>
21401
21402         * object.h: Rename some parameters to avoid c++ keywords (Patch
21403         from Joseph Wenninger <kde@jowenn.at>)
21404
21405 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
21406
21407         * icall.c: added icall to implement Assembly.GetFile*.
21408
21409 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21410
21411         * reflection.h, reflection.c: code to embed managed resources.
21412
21413 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21414
21415         * class.c: move all the type size stuff into
21416         class_compute_field_layout().
21417
21418 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21419
21420         * class.c: ensure enums have always the correct instance size.
21421         * unicode.c: remove wrong assert.
21422
21423 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21424
21425         * assembly.c: fix mem corruption issue.
21426         * image.h, image.c: added mono_image_get_resource () to access
21427         managed resources.
21428         * icall.c: implemented Assembly.EntryPoint property and some
21429         Managed Resources related internalcalls.
21430
21431
21432 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21433
21434         * image.c, image.h: impemented mono_image_get_entry_point ().
21435         * appdomain.c: use mono_image_get_entry_point.
21436
21437 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21438
21439         * reflection.c: support the object type argument when loading
21440         custom attributes.
21441
21442 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
21443
21444         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
21445         String as return type.
21446
21447 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
21448
21449         * reflection.c: fix encoding of named args for custom attrs to match
21450         the ms implementation. Read them back when instantiating custom
21451         attributes.
21452
21453 2002-08-02  Radek Doulik  <rodo@ximian.com>
21454
21455         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
21456         by Dietmar as quick fix
21457         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
21458         16 as stack size, used on more places as quick fix before Dietmar
21459         will fix it properly
21460
21461 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21462
21463         * object.h, object.c: added accessors for fields and properties.
21464
21465 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21466
21467         * class.c, class.h: made mono_class_get_field_from_name ()
21468         loop on parent types.
21469         Added mono_class_get_property_from_name ().
21470
21471 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21472
21473         * class.c, class.h: move the code to setup the type vtable in its own
21474         function so that it can be reused also for types created at runtime.
21475         Eliminate the "class" identifier from the header file.
21476         * reflection.c: setup the vtable for enums so that we can create
21477         objects for use in SetConstant ().
21478
21479 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
21480
21481         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
21482         instead of the delegate itself as this pointer (bug #28383)
21483
21484 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
21485
21486         * marshal.c (mono_marshal_get_managed_wrapper): added return type
21487         conversions.
21488
21489 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21490
21491         * loader.c: don't set the pinvoke bit on icalls.
21492
21493 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
21494
21495         * debug-helpers.c (mono_method_full_name): only print a number to
21496         indicate wrapper type (so that the output is more readable in traces).
21497
21498 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
21499
21500         * class.c (mono_class_init): include method override patch from Paolo
21501
21502 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
21503
21504         * icall.c: fixed GetTypeCode().
21505
21506 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
21507
21508         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
21509         use real delegate invoke function to make it work with multicast
21510         delegates (fix bug# 28291).
21511
21512 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21513
21514         * object.c: load constant strings.
21515
21516 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21517
21518         * reflection.c: no magic numbers.
21519         * tabledefs.h: security action enum.
21520
21521 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21522
21523         * assembly.c: fix possible memory corruption.
21524
21525 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21526
21527         * reflection.h, reflection.c: added support for linking resources.
21528         * verify.c: check we have an updated corlib.
21529
21530 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
21531
21532         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
21533         string arrays.
21534         (mono_marshal_string_array): null terminate unmanaged string arrays.
21535         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
21536
21537 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21538
21539         * icall.c: Type.GetType () can now return also types from the
21540         calling assembly.
21541
21542 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21543
21544         * loader.h, loader.c: stack walking support.
21545         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
21546         GetCallingAssembly.
21547
21548 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
21549
21550         * marshal.c: added optimisations for blittable types 
21551
21552         * class.c (mono_array_class_get): do not set blittable attribute on arrays
21553         (mono_class_setup_mono_type): set blittable attribute for single
21554         and double.
21555
21556         * marshal.c (mono_string_utf8_to_builder): impl.
21557         (mono_string_builder_to_utf8): impl.
21558         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
21559
21560 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
21561
21562         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
21563         (mono_marshal_get_managed_wrapper): impl. byref types
21564
21565 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21566
21567         * icall.c:
21568         (search_method): don't display debug message. 
21569
21570 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
21571
21572         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
21573
21574 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21575
21576         * appdomain.c: set the missing filename when throwing exception.
21577
21578 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
21579
21580         * metadata.c (mono_type_size): code cleanup
21581         (mono_type_stack_size): removed some test code
21582
21583 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
21584
21585         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
21586         mono_get_exception_file_not_found now.
21587
21588         * exception.c (mono_exception_from_name_two_strings): New version
21589         that will call a constructor with two string arguments. 
21590         (mono_get_exception_file_not_found): New helper routine, used to
21591         report file-not-found errors.
21592
21593 2002-07-20  Dick Porter  <dick@ximian.com>
21594
21595         * process.h:
21596         * process.c: Pass file handles to CreateProcess
21597         
21598         * icall.c:
21599         * file-io.h:
21600         * file-io.c: Implemented CreatePipe
21601
21602 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
21603
21604         * metadata.c (mono_get_param_info): set alignment for value types
21605
21606 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21607
21608         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
21609         Constify mono_domain_assembly_open().
21610         * loader.c: handle null namespace in icalls.
21611
21612 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
21613
21614         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
21615         (emit_str_to_ptr_conv): marshal object as structs
21616
21617         * metadata.c (mono_type_to_unmanaged): marshal object as structs
21618
21619         * marshal.c (mono_marshal_get_runtime_invoke): support value types
21620
21621 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
21622
21623         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
21624         (mono_marshal_get_native_wrapper): we an now return value types
21625
21626 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21627
21628         * verify.c: more checks implemented.
21629
21630 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
21631
21632         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
21633         (fix bug #27695)
21634         (mono_marshal_get_native_wrapper): allow byref arguments
21635         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
21636         impl. PtrToStringXXX methods
21637         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
21638         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
21639         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
21640         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
21641         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
21642
21643 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21644
21645         * reflection.c: fix buglet in parsing an assembly name.
21646
21647 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
21648
21649         * marshal.c (emit_ptr_to_str_conv): first impl.
21650
21651 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21652
21653         * object.c, class.h: cache the vtable in the class as suggested by
21654         vargaz@freemail.hu (Zoltan Varga).
21655
21656 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21657
21658         * class.h, loader.c: added mono_field_from_token().
21659         * verify.c: first cut of type checking code.
21660
21661 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
21662
21663         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
21664
21665 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
21666
21667         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
21668         (fix bug #27782)
21669         (mono_marshal_get_remoting_invoke): impl.
21670         (mono_delegate_begin_invoke): impl.
21671         (mono_mb_emit_save_args): impl.
21672         (mono_delegate_end_invoke): impl.
21673         (mono_marshal_get_delegate_begin_invoke):
21674         (mono_marshal_get_delegate_end_invoke):
21675         (mono_marshal_get_delegate_invoke): generate a special name for
21676         those methods (including the signature) and associate them whith
21677         the delegate class. 
21678
21679 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
21680
21681         * reflection.[ch]: 
21682         (mono_reflection_type_from_name): now it has a MonoImage parameter
21683         which is used as the default image to search the type in. If the image
21684         is NULL or getting the type from it fails, it defaults to corlib.
21685
21686         * icall.c: changed 1 call to mono_reflection_type_from_name to match
21687         new parameter.
21688
21689 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21690
21691         * reflection.c: update the parameter table index.
21692
21693 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21694
21695         * domain.c: don't include the mark byte in the string hash.
21696
21697 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21698
21699         * icall.cs: icall for Type.GetTypeCode ().
21700         * verify: a couple of fixes and disabled local initialization checks.
21701
21702 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
21703
21704         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
21705
21706         * debug-helpers.c (mono_method_full_name): print the type of the
21707         runtime wrapper
21708
21709         * metadata.c (mono_signature_hash): a hash function for signatures
21710         (mono_signature_hash): better hash algorithm
21711
21712         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
21713
21714         * debug-helpers.c (mono_method_full_name): this can now generate
21715         method names with signatures
21716
21717         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
21718         method dont have this pointers.
21719
21720 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
21721
21722         * reflection.c: fixup typebuilder tokens.
21723         * image.c: fix buglet.
21724         * marshal.h: remove whitespace.
21725         * metadata.h, metadata.c: reinstate code that was removed.
21726         * verify.c: handle catch directives and fix another couple of bugs.
21727
21728 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
21729
21730         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
21731         (mono_marshal_get_native_wrapper): make it comp. with the old code
21732         (mono_marshal_get_native_wrapper): support boolean
21733         (mono_marshal_get_managed_wrapper): support more types
21734
21735 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
21736
21737         * class.c (class_compute_field_layout): compute class->blittable attribute.
21738
21739 2002-07-09  Dick Porter  <dick@ximian.com>
21740
21741         * threads.c: Make the thread cleaning up cope with threads that
21742         call ExitThread()
21743
21744 2002-07-08  Radek Doulik  <rodo@ximian.com>
21745
21746         * reflection.c (method_encode_code): use non-translated values to
21747         compute finally_start, this fixes exception handling on ppc, yay!
21748
21749         * decimal.h (struct signscale): fix endianess
21750
21751 2002-07-07  Radek Doulik  <rodo@ximian.com>
21752
21753         * reflection.c: swap box_val and not val
21754
21755 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
21756
21757         * reflection.c, reflection.h: handle full assembly info in type name.
21758         Handle Type arguments when loading custom attributes.
21759         * icall.c: updated to use new mono_reflection_type_from_name () method.
21760
21761 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21762
21763         * loader.c:
21764         (method_from_memberref): also print assembly name when method not found.
21765
21766 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21767
21768         * icall.c:
21769         (ves_icall_TypeGetProperties): fixed bug #27473. 
21770
21771 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21772
21773         * reflection.c: display image name and token when cannot find the
21774         .ctor for an attribute.
21775
21776 2002-07-05  Martin Baulig  <martin@gnome.org>
21777
21778         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21779
21780 2002-07-04  Dick Porter  <dick@ximian.com>
21781
21782         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
21783         compile on mingw.  This will cause mingw builds to not wait for
21784         subthreads to terminate after the main thread does.  I've lodged a
21785         bug with the mingw developers for them to wrap OpenThread().
21786
21787 2002-07-03  Dick Porter  <dick@ximian.com>
21788
21789         * threads.c: Store thread IDs instead of handles, because
21790         GetCurrentThread() returns a pseudohandle and therefore stores
21791         useless values.  mono_thread_cleanup() continues checking the
21792         array of threads until it is empty, to cope with subthreads
21793         spawning new threads after the main thread has finished.
21794
21795         * profiler.h:
21796         * profiler.c:
21797         * profiler-private.h: Pass the thread ID to thread profiler
21798         functions, instead of a handle
21799
21800 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21801
21802         * verify.c: fixes to make it more usable.
21803         * pedump.c: added --verify code to verify IL code in an assembly.
21804
21805 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21806
21807         * reflection.c: turn errors into warnings to allow compiling corlib.
21808
21809 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
21810
21811         * reflection.c: add special cases to compile corlib.
21812
21813 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21814
21815         * reflection.c: handle properties with only a set method.
21816
21817 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21818
21819         * opcodes.h: add enum with opcodes in opval order.
21820
21821 2002-07-01  Dick Porter  <dick@ximian.com>
21822         
21823         * object.h:
21824         * object.c (mono_runtime_run_main): Removed unneeded argument
21825
21826 2002-06-28  Martin Baulig  <martin@gnome.org>
21827
21828         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21829
21830 2002-06-27  Dick Porter  <dick@ximian.com>
21831
21832         * threads.c: Store the handle in both the parent thread and in the
21833         subthread, to minimise the time between starting a new thread and
21834         storing its ID.
21835
21836 2002-06-26  Dick Porter  <dick@ximian.com>
21837
21838         * appdomain.c (mono_runtime_cleanup): Close the socket library
21839         after all the threads have finished, not before
21840
21841 2002-06-26  Martin Baulig  <martin@gnome.org>
21842
21843         * debug-symfile.c (mono_debug_find_source_location): Added
21844         `guint32 *line_number' argument.  If it's not NULL, store the line number
21845         there and return the file name without the line number.
21846
21847 2002-06-25  Dick Porter  <dick@ximian.com>
21848
21849         * icall.c:
21850         * process.h:
21851         * process.c: Process forking and other support functions
21852
21853 2002-06-25  Dick Porter  <dick@ximian.com>
21854
21855         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
21856         things dont happen when the image is closed.
21857         (mono_image_lookup_resource): Walk the resource section looking
21858         for a particular entry
21859
21860         * cil-coff.h: PE resource section decoding
21861
21862 2002-06-25  Dick Porter  <dick@ximian.com>
21863         
21864         * assembly.h:
21865         * assembly.c: 
21866         (mono_assembly_foreach): Accessor functions to walk the list of
21867         loaded assemblies
21868         (mono_assembly_set_main):
21869         (mono_assembly_get_main): Process methods need to know which
21870         assembly is the "main" one
21871
21872         * object.c (mono_runtime_run_main): Record the main assembly
21873
21874         * debug-helpers.c: Fix typo
21875
21876 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
21877
21878         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
21879         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
21880
21881 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21882
21883         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
21884
21885 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
21886
21887         * image.c (do_mono_image_open): Initialize reference count,
21888         otherwise we leak the MonoImage.
21889
21890 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21891
21892         * reflection.c: small tweak to handle self-hosting.
21893
21894 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21895
21896         * reflection.c: fix type name parse code.
21897
21898 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21899
21900         * reflection.c: break out of the loop.
21901         * image.c: special case corlib.
21902
21903 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21904
21905         * reflection.c: add all the custom attrs at the end to ensure the
21906         ctors have been properly initialized when the attributes are defined
21907         in the current assembly.
21908
21909 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21910
21911         * reflection.c: handle correctly multiple-nested types.
21912
21913 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
21914
21915         * row-indexes.h: fix typos.
21916         * reflection.c: adjust for typos and fix method_def_or_ref
21917         encoding in MethodImpl table.
21918
21919 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21920
21921         * reflection.c: fix entry point patching (thanks Serge!).
21922
21923 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
21924
21925         * verify.c: add check for System.Exception
21926
21927 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21928
21929         * image.c, class.c: minifix for code just c&p'ed.
21930         * reflection.c: warning fix.
21931         * object.h, loader.h, domain.c: load also StringBuilder.
21932
21933 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21934
21935         * marshal.h, marshal.c: some support code to handle complex marshaling.
21936
21937 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21938
21939         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
21940         Better signatures with vtable error dump.
21941
21942 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
21943
21944         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
21945
21946 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
21947
21948         * icall.c (ves_icall_Type_GetField): impl.
21949
21950 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21951
21952         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
21953         to retrieve a marshal description blob for a field or param.
21954
21955 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21956
21957         * reflection.h, reflection.c: change order of nested type emission
21958         to avoid table corruption. The NestedTypes table is sorted.
21959         * icall.c: change order of GetConstructor results to workaround mcs bug.
21960
21961 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21962
21963         * reflection.h, reflection.c: handle field and param marshal
21964         information.
21965
21966 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21967
21968         * icall.c, marshal.c marshal.h: more Marshal class implementation.
21969
21970 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21971
21972         * reflection.c: fix call convention.
21973
21974 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21975
21976         * reflection.h, reflection.c: mono_image_get_memberref_token()
21977         takes a type instead of a class, now. Added
21978         mono_image_get_array_token() to create tokens for the special
21979         multi-dim array methods.
21980
21981 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21982
21983         * assembly.c: handle modules (no assembly table). Split
21984         loading references in its own function.
21985         * class.c: handle moduleref resolution scope.
21986         * image.c, image.h: cache module name in image.
21987
21988 2002-06-07  Martin Baulig  <martin@gnome.org>
21989
21990         * reflection.c (mono_image_get_type_info): Only add a class layout entry
21991         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
21992
21993 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21994
21995         * icall.c: more signature fixes that used uint instead of int.
21996
21997 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21998
21999         * reflection.c: fixed signature of field refs.
22000
22001 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22002
22003         * class.c, reflection.c: handle typerefs of nested types
22004         (both on read and when writing files).
22005
22006 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
22007
22008         * icall.c: fix method signatures that tried to workaround the previous
22009         typo, d'oh!
22010
22011 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
22012
22013         * debug-helpers.c: fix typo.
22014
22015 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
22016
22017         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
22018         rewrote the PE/COFF writing code (our programs are understood by the
22019         ms runtime, now).
22020
22021 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
22022
22023         * gc.c, gc.h, icall.c: weakreference support.
22024
22025 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
22026
22027         * Makefile.am, mono-config.c: use $(sysconfdir).
22028
22029 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
22030
22031         * icall.c: changed default precision of Double.ToString() to 15.
22032         Fixed memory leak. Unified with Single.ToString.
22033
22034 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
22035
22036         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
22037
22038 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
22039
22040         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
22041         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
22042         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
22043         and myself.
22044
22045 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22046
22047         * debug-symfile.c, sysmath.c: yet more compilation fixes.
22048
22049 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22050
22051         * reflection.c, socket-io.c: more compilation fixes.
22052
22053 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22054
22055         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
22056         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
22057         unicode.c: warning and compiler compatibility fixes.
22058
22059 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22060
22061         * class.h, metadata.c: fixed warnings/compilation errors.
22062
22063 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
22064
22065         * Makefile.am, mono-config.c, mono-config.h: configuration file
22066         support routines.
22067         * loader.c, loader.h: make Dll mapping configurable at runtime in the
22068         config file. Export methods to insert and lookup mappings.
22069
22070 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
22071
22072         * reflection.c: handle types and boxed objects in custom attr
22073         constructors.
22074
22075 2002-05-30  Martin Baulig  <martin@gnome.org>
22076
22077         * debug-symfile.c
22078         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
22079
22080 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
22081
22082         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
22083         to lookup the implmap row for a P/Invoke method.
22084         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
22085         P/Invoke method from the runtime on an as needed basis.
22086
22087 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
22088
22089         * metadata.c (mono_metadata_parse_signature): impl.
22090
22091 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22092
22093         * class.c: handle .pack directive.
22094
22095 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
22096
22097         * object.c: initialize static fields with RVA data.
22098
22099 2002-05-25  Martin Baulig  <martin@gnome.org>
22100
22101         * debug-symfile.c
22102         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
22103
22104 2002-05-24  Martin Baulig  <martin@gnome.org>
22105
22106         * debug-symfile.c
22107         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
22108         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
22109         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
22110
22111 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
22112
22113         * object.c: special case string ctros in invoke.
22114         * gc.c: silly whitespace changes.
22115
22116 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
22117
22118         * threadpool.[ch]: impl. a threadpool that can
22119         be used by mint and mono.
22120
22121 2002-05-22  Martin Baulig  <martin@gnome.org>
22122
22123         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
22124         The first argument is now a `MonoReflectionModuleBuilder *', the return
22125         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
22126         `methods' field to get the method builder.  The `token' argument is the
22127         unfixed token.
22128
22129         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
22130         invalid characters instead of g_assert_not_reached()ing.  This seems
22131         to be the behaviour of mscorlib.
22132
22133 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
22134
22135         * object.c (mono_runtime_invoke_array): applied patch from Rachel
22136         Hestilow to fix bug #25104
22137
22138 2002-05-21  Martin Baulig  <martin@gnome.org>
22139
22140         * debug-symfile.c (mono_debug_find_source_location): New function.
22141         Looks up an IL offset in the line number table and returns the source
22142         location as a string.
22143
22144 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22145
22146         * icall.c:
22147         (mono_double_ToStringImpl): changed %f by %g until we have something
22148         better.
22149
22150 2002-05-21  Nick Drochak  <ndrochak@gol.com>
22151
22152         * icall.c : Use different name for Math.Pow's icall.  Needed to check
22153         parameters first in C#.
22154
22155 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22156
22157         * icall.c, reflection.h: added icall to get info about an event.
22158
22159 2002-05-20  Radek Doulik  <rodo@ximian.com>
22160
22161         * object.c (mono_value_box): don't use memcpy for boxing on BIG
22162         endian
22163         (mono_value_box): don't use memcpy for small sizes on
22164         architectures with unaligned access
22165
22166 2002-05-20  Martin Baulig  <martin@gnome.org>
22167
22168         * reflection.c (mono_reflection_setup_internal_class): Don't crash
22169         if `tb->parent == NULL'.
22170         (mono_reflection_create_internal_class): New function.  This is
22171         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
22172         for enum types.
22173
22174         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
22175         New interncall.
22176
22177 2002-05-19  Martin Baulig  <martin@gnome.org>
22178
22179         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
22180         argument to get the length, don't default to the array length.
22181
22182 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
22183
22184         * assembly.c (mono_assembly_setrootdir): New function used to
22185         override the MONO_ASSEMBLIES directory.
22186
22187 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22188
22189         * icall.c: ValueType_GetHashCode() initialize local var.
22190
22191 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22192
22193         * reflection.c: sort custom attributes table.
22194
22195 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22196
22197         * reflection.c: support named args in custom attributes (write support).
22198
22199 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
22200
22201         * reflection.c: fix finally position calculation.
22202
22203 2002-05-15  Radek Doulik  <rodo@ximian.com>
22204
22205         * reflection.c: fixed endianess at many places
22206
22207         * icall.c (ves_icall_InitializeArray): comment out debug msg
22208
22209 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
22210
22211         * object.c (mono_unhandled_exception): new function to handle
22212         unhandled exceptions.
22213         (mono_unhandled_exception): call the UnhandledException event.
22214         (mono_runtime_delegate_invoke): impl.
22215
22216 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
22217
22218         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
22219         returns the RVA, not the direct pointer to the data. Handle the case
22220         when the class size is fixed.
22221
22222 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
22223
22224         * reflection.c: fix some endianess issues.
22225
22226 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
22227
22228         * object.c (mono_runtime_invoke): is now able to catch exceptions.
22229
22230         * threads.c (mono_thread_init): added a callback which is invoked
22231         at thread start.
22232
22233 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
22234         
22235         * icall.c: make GetHashCode return non-negative values.
22236
22237 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
22238
22239         * object.c, icall.c, gc.c: revert to address-based hashcode.
22240
22241 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
22242
22243         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
22244
22245 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22246
22247         * icall.c, class.c: special case <Module>.
22248
22249 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
22250
22251         * icall.c: fix bug in GetNow().
22252
22253 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
22254
22255         * object.c (mono_runtime_class_init): make sure that we call all
22256         static class constructors.
22257
22258 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
22259
22260         * reflection.c: sort methodsemantics table.
22261
22262 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
22263
22264         * reflection.h, reflection.c: honour init locals setting.
22265
22266 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
22267
22268         * icall.c: copied Double ToStringImpl for Single ToStringImpl
22269
22270 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22271
22272         * reflection.c: support ContructorBuilders in attribute blob creation.
22273
22274 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22275
22276         * reflection.c: some changes to build a binary that can be run
22277         directly in windows.
22278
22279 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22280
22281         * loader.c: print a big message when an icall can't be found.
22282
22283 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22284
22285         * string-icalls.c: fix bug 24248.
22286
22287 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
22288
22289         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
22290         icall.c, reflection.h: separate assembly loading by pathname and by
22291         assembly name. Use the MONO_PATH env var to search for assemblies.
22292
22293 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22294
22295         * assembly.c, image.h: add some support for assemblies
22296         with multiple modules.
22297         * class.c, class.h: export mono_class_from_typeref().
22298         * loader.c: remove duplicated code and use mono_class_from_typeref(),
22299         instead.
22300
22301 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22302
22303         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
22304         documentation says (the ECMA one is correct).
22305
22306 2002-05-02  Dick Porter  <dick@ximian.com>
22307
22308         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
22309         Don't name the synchronisation mutex.
22310
22311 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
22312
22313         * rand.c
22314         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
22315         Make the prototypes match.
22316         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
22317         Same.
22318
22319         * icall.c
22320         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
22321         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
22322         all systems have tm.tm_zone, so use strftime() with %Z to print
22323         the timezone abreviation into a temp string.
22324
22325         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
22326         rather than mono_array_addr() on a MonoString on Big Endian
22327         machines.
22328
22329 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
22330
22331         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
22332         fix bug 24041
22333
22334 2002-04-30  Dick Porter  <dick@ximian.com>
22335
22336         * socket-io.c: Cope with SOCKET being an integer rather than a
22337         pointer now.
22338
22339         * threads.c: Added Thread_free_internal, to deal with thread
22340         handle cleanup.  Moved calls to handle_store() and handle_remove()
22341         to start_wrapper(), so each can only be called once.  Allocate
22342         synchronisation blocks with GC_malloc(), and use GC finalisation
22343         to close the handles.
22344
22345         * icall.c: added System.Threading.Thread::Thread_free_internal
22346
22347 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22348
22349         * icall.c: support Environment.Exit, CommandLineArgs().
22350
22351 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
22352
22353         * object.c, object.h: added mono_runtime_run_main () and
22354         mono_runtime_get_main_args () for use in System.Environment.
22355
22356 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22357
22358         * gc.c: fix thinko, enable actual finalization since the jit is now
22359         fixed.
22360
22361 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22362
22363         * gc.c, object.c: take into account that an object may be offset wrt the address
22364         returned by GC_malloc().
22365
22366 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
22367
22368         * image.c: handle files without entries in the assembly table (modules).
22369
22370 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
22371
22372         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
22373         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
22374         allowed to be null when it's System.Object class setup.
22375
22376 2002-04-27  Martin Baulig  <martin@gnome.org>
22377
22378         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
22379         if `tb->parent == NULL' rather than crashing.
22380
22381 2002-04-28  Nick Drochak  <ndrochak@gol.com>
22382
22383         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
22384         calling acos() where asin() should have been called.
22385
22386 2002-04-26  Martin Baulig  <martin@gnome.org>
22387
22388         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
22389         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
22390         there's a subdirectory called `System', but we don't want to read that
22391         subdirectory as an assembly.
22392
22393 2002-04-25  Martin Baulig  <martin@gnome.org>
22394
22395         * debug-symfile.c: Reflect latest MonoString changes.
22396
22397 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22398
22399         * rand.c, rand.h: instance method icalls need to have an explicit
22400         this pointer as first argument in the C implementation.
22401
22402 2002-04-25  Nick Drochak <ndrochak@gol.com>
22403
22404         * icall.c: Fix typo in map for GetNonZeroBytes
22405
22406 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
22407
22408         * string-icalls.c : String does now passes unit tests without any 
22409         errors, the following changes has been made:
22410         
22411         Implemented replace methods.
22412         Renaming of methods to (try) follow the standard.
22413         Fixed compare ordinal
22414         Made all memory allocated directly to function instead of via icall function.
22415         Small performance fix in is_in_array function
22416                         
22417  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
22418
22419         c (mono_string_Internal_ctor_charp_int_int):
22420         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
22421         sindex < 0, throw ArgumentOutOfRangeException instead of
22422         ArgumentNullException.
22423
22424         Added new check for length == 0, however
22425         I need to make it return String.Empty from the C code.
22426         
22427         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
22428         that calculate the length for us here.
22429         
22430         (mono_string_Internal_ctor_sbytep_int_int): Replaced
22431         mono_string_new_utf16 with mono_string_new, since value is utf8.
22432
22433 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22434
22435         * object.c: register the object for finalization if needed.
22436         Allocate one more char in the string for the terminating 0 char.
22437
22438 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22439
22440         * class.c, class.h, image.c: check if a type implemenst a destructor.
22441         Use the proper key for array class lookups.
22442         * icall.c: register the icalls in the System.GC class.
22443         * gc.c, gc.h: GC-related functions and icalls.
22444
22445 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22446
22447         * icall.c:
22448         * socket-io.c:
22449         * unicode.c: free some strings gotten from mono_string_to_utf8 and
22450         changed a couple of free () by g_free ().
22451
22452         * decimal.c: one-liner in the comments for decimal2string ().
22453
22454 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
22455
22456         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
22457
22458 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
22459
22460         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
22461         * object.c (mono_runtime_invoke_array) : handle null in params
22462
22463 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
22464
22465         * string-icalls.c: fixed bug in split (one off bug)
22466
22467 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
22468
22469         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
22470         * icalls.c: added String::Equals as internal method
22471
22472 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
22473
22474         * threads.c: fixed bug in the double interlocked functions
22475
22476 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
22477
22478         * threads.c: implemented all of the new interlocked icalls.
22479         * string-icalls.c: fix a bug in insert.
22480         * icalls.c: added the icalls for interlocked, removed old string functions.
22481         
22482 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22483
22484         * loader.c: fix off-by-one error when reading argument names.
22485
22486 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22487
22488         * profiler.c: win32 counter implementation (untested).
22489         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
22490         (the latter needs testing and more complete impl. from win32 folks).
22491
22492 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
22493
22494         * object.c: mono_array_new_full workaround mono_array_class_get
22495         problem.
22496
22497 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22498
22499         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
22500         * object.h (mono_string_chars): Changed casting type.
22501
22502 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22503
22504         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
22505                            method signatures to use gunichar2 instead of gint16.
22506
22507 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
22508
22509         * object.h, object.c: domain-specific versions of mono_object_new and
22510         mono_array_new.
22511
22512 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
22513
22514         * object.c: changed String layout
22515
22516         * string-icalls.c (mono_string_Internal_ctor_chara): added
22517         internal string constructors.
22518
22519 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
22520
22521         * threads.c: pass 'this' to the thread start routine.
22522
22523 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22524
22525         * string-icalls.c: fix IndexOf and LastIndexOf. Now
22526         InternalCompareStr don't call twice mono_string_cmp_char for the last
22527         character. Improved performance in mono_string_cmp_char.
22528
22529 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22530
22531         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
22532         code into its own library: libmonoruntime.
22533
22534 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
22535
22536         * object.h, object.c: changed array format so that szarrays do not
22537         require a bounds structure.
22538         * icall.c, appdomain.c: support for new szarray format.
22539
22540 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22541
22542         * metadata.c: compare also the retuns type when comparing signatures:
22543         we didn't do this as an optimization since really overloaded methods
22544         must differ also in the arguments, but this doesn't work with
22545         low-level IL code (or when using explicit conversion operators: see
22546         bug#23498 for an example).
22547
22548 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22549
22550         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
22551
22552 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
22553
22554         * icall.c: make MonoType::GetElementType its own icall.
22555
22556 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22557
22558         * icall.c: remove MonoMethod_get_Name().
22559         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
22560         object.
22561
22562 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22563
22564         * string-icalls.c: optimized a few methods.
22565
22566 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22567
22568         * icall.c: added all new string internal calls
22569         * string-icalls.c: added, new string internal call implementation.
22570         * object.c: added mono_string_new_size for allocating a string a size
22571
22572 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
22573
22574         * object.c (mono_object_isinst): use the same code as in the
22575         optimized x86 version.
22576
22577 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22578
22579         * profiler.c: TSC-based timer code (faster and more accurate).
22580         Not hooked up in configure, yet (set USE_X86TSC to 1).
22581
22582 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
22583
22584         * profiler.c, profiler.h: track time spent compiling methods.
22585         * threads.c: track thread creation/destruction.
22586
22587 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
22588
22589         * profiler.c, profiler.h, profiler-private.h: profiling interface
22590         and sample implementation. Moved here so that it can be used also by
22591         the jit.
22592
22593 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
22594
22595         * reflection.c, reflection.h: keep types and other handles separate in
22596         the hash tables for referred tokens. Add guid for modules.
22597
22598 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
22599
22600         * assembly.c: fix bugs found with valgrind.
22601         * metadata.h, metadata.c: added mono_metadata_guid_heap().
22602
22603 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
22604
22605         * threads: added icall support for getting current domain for
22606                    the thread.
22607  
22608 2002-04-13  Martin Baulig  <martin@gnome.org>
22609
22610         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
22611         (MonoDebugVarInfo): Added `index' field for register based addresses.
22612         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
22613         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
22614         `MonoDebugVarInfo *params' and `guint32 this_offset' with
22615         `MonoDebugVarInfo *this_var'.
22616
22617         * debug-symfile.c (relocate_variable): New static function to write
22618         a location description for a local variable or method parameter.
22619
22620 2002-04-12  Martin Baulig  <martin@gnome.org>
22621
22622         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
22623         stack offset and begin/end scope address of a local variable.
22624         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
22625         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
22626         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
22627
22628         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
22629         Added new relocation types for start/end scope of a local variable.
22630
22631 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22632
22633         * object.h: add mono_object_domain() macro.
22634         * reflection.c: handle typespecs.
22635         * icall.c: MonoMethod::get_Name() implementation.
22636
22637 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22638
22639         * icall.c: String::GetHashCode() icall implementation.
22640
22641 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22642
22643         * icall.c: String::IndexOfAny icall.
22644         * object.c, object.h: make array->max_length more useful.
22645         Intrduced mono_object_class() and mono_string_length() macros.
22646
22647 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22648
22649         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
22650         instead of g_unichar_isdigit.
22651
22652 2002-04-11  Nick Drochak  <ndrochak@gol.com>
22653
22654         * icall.c: Implement a simple Double.ToString().
22655
22656 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22657
22658         * appdomain.h: only io-layer.h is supposed to be included.
22659         * icall.c: explicitly import environ. Fix warning.
22660
22661 2002-04-10  Nick Drochak  <ndrochak@gol.com>
22662
22663         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
22664                 return true even if it's not Daylight Savings time.
22665                 Only return false for the case where the function isn't
22666                 implemented for a plaform (read Windows).
22667
22668 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22669
22670         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
22671         data with a mutex.
22672
22673 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
22674
22675         * mempool.c (mono_mempool_alloc): only use g_malloc when
22676         absolutely necessary.
22677
22678 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
22679
22680         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
22681
22682         * class.c (mono_class_vtable): use domain mempool to allocate vtable
22683         (mono_class_proxy_vtable): use domain mempool
22684
22685 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
22686
22687         * appdomain.h, appdomain.c: split initialization that requires the
22688         execution engine support into mono_runtime_init().
22689
22690 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
22691
22692         * class.c (mono_class_init): don't include vtable inside MonoClass
22693         to save some memory, gather some statistics.
22694         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
22695
22696 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22697
22698         * icall.c: internalcall implementation for ValueType.Equals().
22699
22700 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
22701
22702         * object.c (mono_message_init): moved 
22703         (mono_runtime_exec_main): new arch. independent impl.
22704         (mono_runtime_invoke_array): new method - like
22705         mono_runtime_invoke, but you can pass an array of objects.
22706         (mono_remoting_invoke): new arch. independent impl.
22707         (mono_message_invoke): new arch. independent impl.
22708         (mono_runtime_class_init): new arch. independent impl.
22709         (mono_runtime_object_init): new arch. independent impl.
22710
22711 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22712
22713         * metadata.c, object.c, reflection.c: documented the exported
22714         functions.
22715
22716 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
22717
22718         * icall.c: simpler code to pass the assembly builder data to corlib.
22719         Implement GetNestedTypes() internalcall.
22720
22721 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22722
22723         * class.c: warn if a type can't be loaded.
22724
22725 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
22726
22727         * image.h: typedef MonoImageOpenStatus
22728         * types.h: removed unused file
22729         
22730 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
22731
22732         * icall.c: Enum_ToObject accepts enum value arguments.
22733
22734 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
22735
22736         * class.c: move initialization of properties, events and nested
22737         classes, so that they happen for interfaces, too.
22738
22739 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
22740
22741         * icall.c: cleanup some ugly casts in Array_SetValue*.
22742
22743 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22744
22745         * icall.c: the values array fro enums is of the correct type, now.
22746         Implement (correctly) getFullName instead of assQualifiedName for
22747         MonoType.
22748         * reflection.h, reflection.c: added mono_type_get_name ().
22749
22750 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22751
22752         * assembly.c, image.h: for each MonoImage, record from wich assembly
22753         it was loaded.
22754         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
22755         Make Type.Assembly work.
22756
22757 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
22758
22759         * debug-symfile.h: use char* instead of gpointer to avoid
22760         unnecessary casts.
22761
22762         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
22763
22764         * icall.c (ves_icall_InternalExecute): impl. FielSetter
22765         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
22766
22767 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
22768
22769         * icall.c (mono_message_init): impl. (code cleanup)
22770         (ves_icall_InternalExecute): impl. FieldGetter
22771
22772         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
22773         defined we call all (non-static)methods through the vtable. 
22774
22775 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
22776
22777         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
22778         finalizer even though the memory is still referenced (and the chunk of
22779         memory is not freed).
22780
22781 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
22782
22783         * assembly.c: fix brokeness.
22784
22785 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
22786
22787         * class.c: kill some warnings. Check explicit interface method
22788         implementation also without considering the namespace.
22789         Load also literal strings in static class data.
22790
22791 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
22792
22793         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
22794         (default_assembly_name_resolver): Make the resolver take the
22795         "base" directory where the assembly was originally defined, so we
22796         can load DLLs that are in the same directory as the assembly that
22797         is being referenced.
22798
22799 2002-03-28  Dick Porter  <dick@ximian.com>
22800
22801         * file-io.h: 
22802         * file-io.c:
22803         * socket-io.c: 
22804         * unicode.h: 
22805         * unicode.c: Warning cleanups
22806
22807 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
22808
22809         * object.h, reflection.h: use the correct type instead of MonoObject.
22810
22811 2002-03-28  Martin Baulig  <martin@gnome.org>
22812
22813         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
22814         (mono_debug_update_symbol_file): Initialize classes if necessary.
22815
22816 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22817
22818         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
22819         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
22820
22821 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
22822
22823         * assembly.h: fix function prototype.
22824         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
22825         * mono-endian.h: use const cast.
22826
22827 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
22828
22829         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
22830
22831 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
22832
22833         * loader.c: don't assert when a typeref can't be loaded, give
22834         a chance to the runtime to trow an exception instead.
22835         * loader.h: fix warning.
22836
22837 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
22838
22839         * class.c (mono_class_proxy_vtable): added proxy support
22840
22841 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
22842
22843         * icall.c: removed last of PAL calls, added System.Environment
22844         * file-io.h, file-io.c: MonoIO implementation
22845         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
22846
22847 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
22848
22849         * appdomain.c: do not use the byte marker in ldstr table lookup.
22850         * debug-helpers.c: allow two ':' to separate class and method name.
22851         * object.c: allocate arrays bounds with the GC, too.
22852         * verify: add a few more checks.
22853
22854 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
22855
22856         * reflection.c: output also literal strings. Allocate parameter data
22857         with GC_malloc() (thanks, Martin, for catching this!).
22858
22859 2002-03-26  Martin Baulig  <martin@gnome.org>
22860
22861         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
22862         include the `this' offset in the `param_offsets'.
22863
22864 2002-03-25  Martin Baulig  <martin@gnome.org>
22865
22866         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
22867         mono_debug_get_class() function to get the classes. Added new
22868         relocation types for arrays and strings.
22869         (mono_debug_get_class): New static function to search in all
22870         referenced assemblies for a metadata token.
22871
22872         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
22873
22874 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22875
22876         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
22877         hold gc-allocated objects. Make the string heap a stream like the
22878         others. Removed duplicated code when writing stream info.
22879         Added asserts to catch possible buffer overflows. Set the sorted map
22880         for tables that need sorting. Added some documentation.
22881
22882 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
22883
22884         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
22885         for interned strings and vtables.
22886
22887 2002-03-24  Martin Baulig  <martin@gnome.org>
22888
22889         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
22890         it in the array since it was created with g_slist_prepend().
22891
22892 2002-03-24  Martin Baulig  <martin@gnome.org>
22893
22894         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
22895         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
22896         (mono_debug_method_from_token): Renamed to
22897         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
22898         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
22899
22900         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
22901         relocation types.
22902
22903         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
22904
22905 2002-03-24  Martin Baulig  <martin@gnome.org>
22906
22907         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
22908         (mono_debug_method_from_token): New func.
22909
22910         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
22911         New interncall, calls mono_debug_local_type_from_signature().
22912         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
22913         calls mono_debug_method_from_token().
22914
22915 2002-03-23  Martin Baulig  <martin@gnome.org>
22916
22917         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
22918         specifies the number of bytes to be converted, not the array size.
22919         Return the number of chars, not the number of bytes.
22920         (ves_icall_iconv_get_chars): The `byteCount' argument
22921         specifies the number of bytes to be converted, not the array size.
22922
22923 2002-03-23  Martin Baulig  <martin@gnome.org>
22924
22925         * reflection.h (MonoReflectionSigHelper): New type.
22926
22927         * reflection.c (mono_reflection_sighelper_get_signature_local),
22928         (mono_reflection_sighelper_get_signature_local): New functions.
22929
22930         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
22931         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
22932         interncalls.
22933
22934 2002-03-23  Martin Baulig  <martin@gnome.org>
22935
22936         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
22937         is_writeable is set.
22938         (mono_raw_buffer_update): New function to write the modified map
22939         back to disk.
22940
22941         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
22942
22943         * debug-symfile.c (mono_debug_update_symbol_file): Call
22944         mono_raw_buffer_update() when done writing.
22945
22946 2002-03-23  Martin Baulig  <martin@gnome.org>
22947
22948         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
22949
22950         * debug-symfile.c: Added support for arguments and local variables.
22951
22952 2002-03-23  Dick Porter  <dick@ximian.com>
22953
22954         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
22955         protected by ifdefs, hence breaking the w32 build.
22956
22957 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22958
22959         * object.c: implement is_interned() the right way.
22960
22961 2002-03-21  Martin Baulig  <martin@gnome.org>
22962
22963         * debug-symfile.[ch]: New files to handle debugging information
22964         files. There's also support to dynamically update these symbol
22965         files to include machine dependent information.
22966
22967 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
22968
22969         * threads.c (mono_thread_create): new function to create thread
22970         from C
22971
22972 2002-03-20  Martin Baulig  <martin@gnome.org>
22973
22974         * icall.c (ves_icall_InternalInvoke): Create a new object if the
22975         method is a constructor.
22976         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
22977         points to ves_icall_InternalInvoke().
22978
22979 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
22980
22981         * file-io.c: Flush shouldn't throw exceptions.
22982
22983 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
22984
22985         * file-io.c: FileStream flush support; FileSetLength now
22986         restores file pointer.
22987
22988 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
22989
22990         * class.c: set image for pointer classes.
22991
22992 2002/03/19  Nick Drochak <ndrochak@gol.com>
22993
22994         * sysmath.c: Forgot one.
22995
22996 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
22997
22998         * sysmath.c: Avoid redefining existing names.
22999
23000 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
23001
23002         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
23003         handled by runtime as icall rather than dllimport from libm.so
23004         * file-io.c, file-io.h: fixed handle argument type.
23005
23006 2002-03-18  Dick Porter  <dick@ximian.com>
23007
23008         * reflection.c (mono_image_get_type_info): rename interface to
23009         iface, because of "#define interface struct" on windows.
23010
23011 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
23012
23013         * class.c, class.h: rename and export mono_ptr_class_get().
23014         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
23015         * reflection.c, reflection.h, icall.c: better/saner type name
23016         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
23017         method signatures.
23018
23019 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
23020
23021         * class.c (mono_class_init): removed hardcoded GHC_SLOT
23022
23023         * icall.c (ves_icall_InternalInvoke): impl.
23024
23025 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
23026
23027         * reflection.c: output the interface map table, too.
23028
23029 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
23030
23031         * class.c (class_compute_field_layout): separate computation of 
23032         static field layout
23033
23034 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
23035
23036         * icall.c: added System.Buffer support.
23037         * file-io.c: moved file icalls from PAL to FileStream.
23038
23039 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
23040
23041         * icall.c (ves_icall_System_Object_GetHashCode): impl.
23042
23043 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
23044
23045         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
23046
23047 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23048
23049         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
23050
23051 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
23052
23053         * debug-helpers.{c,h}: moved here from monograph some useful functions
23054         to locate a method by name/signature in a class or image. Included
23055         also a small and flexible IL disassembler.
23056
23057 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23058
23059         * reflection.c: fixup tokens in methods with small header size, too.
23060
23061 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
23062
23063         * object.c (mono_string_to_utf8): remove assert(!error), instead
23064         print a warning. 
23065
23066 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
23067
23068         * icall.c: update to the new mono_Array_class_get interface.
23069
23070 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
23071
23072         * appdomain.c, object.c: Boehm-GC enable.
23073         * icall.c: make get_data_chunk() support split data requests.
23074         Ensure a class is initialized in more cases. Return only the first
23075         property found in GetProperties() or the compiler gets confused. 
23076         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
23077         * reflection.h, reflection.c: add fixup mechanism for field and method
23078         tokens. Initialize assembly->typeref in a single place. Output
23079         properties after events. Support custom attributes for events, too.
23080         Typo fix for paramter custom attrs.
23081
23082 2002-03-07  Martin Baulig  <martin@gnome.org>
23083
23084         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
23085
23086 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
23087
23088         * class.c (mono_array_class_get): fix. for multi. dim. arrays
23089
23090 2002-03-06  Martin Baulig  <martin@gnome.org>
23091
23092         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
23093         non-zero lower bounds. See testcases #F10-#F13.
23094
23095 2002-03-05  Martin Baulig  <martin@gnome.org>
23096
23097         * exception.c (mono_get_exception_argument_out_of_range): New exception.
23098
23099         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
23100         ves_icall_System_Array_GetValue(), only calculate the absolute array position
23101         here.
23102         (ves_icall_System_Array_SetValue): Likewise.
23103         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
23104         as argument and does the actual work. This function is used when copying a
23105         multi-dimensional array.
23106         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
23107         now do all the widening conversions of value types.
23108         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
23109
23110 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23111
23112         * class.c: remove some magic numbers and use the smbolic names,
23113         instead. Added init_events() to load event info at class init time.
23114         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
23115         and mono_metadata_methods_from_event().
23116         * reflection.h, reflection.c: added support for writing out the evnets
23117         related information.
23118
23119 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
23120
23121         * reflection.h, icall.c: use a different method (GetInterfaces)
23122         to gather interface info and add isbyref, isprimitive and
23123         ispointer to the ves_icall_get_type_info() return value.
23124
23125 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
23126
23127         * class.h: stared adding support for events.
23128         * icall.c: split find_members implementation. Added debug icall to get
23129         the address of an object.
23130         * reflection.c: handle TypeBuilders in mono_type_get_object().
23131
23132 2002-03-01  Martin Baulig  <martin@gnome.org>
23133
23134         * icall.c (ves_icall_System_Array_GetLength): This must throw an
23135         ArgumentOutOfRangeException(), not an ArgumentException().
23136         (ves_icall_System_Array_GetLowerBound): Likewise.
23137         (ves_icall_System_Array_GetValue): Improved argument checking.
23138         (ves_icall_System_Array_SetValue): Improved argument checking.
23139
23140 2002-03-01  Martin Baulig  <martin@gnome.org>
23141
23142         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
23143         called with invalid arguments rather than just dying with g_assert().
23144         (ves_icall_System_Array_SetValue): Likewise.
23145         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
23146         raise a NotImplementedException instead.
23147         (ves_icall_System_Array_GetLength): Added argument checking.
23148         (ves_icall_System_Array_GetLowerBound): Added argument checking.
23149
23150 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
23151
23152         * object.h (mono_assert): new macros mono_assert and
23153         mono_assert_not_reached
23154
23155 2002-02-28  Martin Baulig  <martin@gnome.org>
23156
23157         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
23158         and "System::String::IsInterned" to "System::String::_IsInterned".
23159
23160 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
23161
23162         * icall.c: remove hacks for typebuilder. Added icall to create a
23163         modified type from a tybebuilder.
23164         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
23165         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
23166         to create a backing MonoClass for a TypeBuilder.
23167
23168 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23169
23170         * class.c, class.h: more refactoring of class init.
23171         Export mono_class_setup_mono_type() and mono_class_setup_parent().
23172
23173 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
23174
23175         * marshal.c, marshal.h: start of marshaling interface.
23176
23177 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23178
23179         * icall.c: fix order in assembly qualified name icall.
23180
23181 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23182
23183         * class.c: do not free str, since we store it in the hash table.
23184         * reflection.h: add label field to MonoILExceptionInfo.
23185         * reflection.c: handle references to more than one assembly. Handle
23186         case when there isn't a module created in the assembly.
23187
23188 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
23189
23190         * class.c: Fix typo. Start refactoring of class init code.
23191
23192 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
23193
23194         * appdomain.c: exit with 1 on error.
23195         * class.c: we already have the name in MonoClassField.
23196         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
23197         MonoStreamHeader instead of an offset of image->raw_metadata.
23198
23199 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
23200
23201         * appdomain.c (mono_init): Be even more descriptive about the error.
23202
23203 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
23204
23205         * appdomain.c: give the user an informative message when corlib can't
23206         be loaded.
23207
23208 2002-02-26  Martin Baulig  <martin@gnome.org>
23209
23210         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
23211         New icall to get the time zone data.
23212
23213 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23214
23215         * reflection.c: set virtual and raw size of section correctly.
23216         * threads.c: transfer domain information to newly created threads.
23217
23218 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23219
23220         * class.c: when instancing a class in a domain, load the default
23221         vaules for static fields from the constant table. Fix System.Enum to
23222         not be an enum.
23223         * icall.c: implement Object::GetType() internalcall. Implemented
23224         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
23225         Fixed checking of binding flags in find_members().
23226         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
23227         * reflection.c: handle enumerations when writing to the constant
23228         table. Use a different object cache for types.
23229
23230
23231 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
23232
23233         * object.c (mono_object_isinst): fix for arrays
23234
23235         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
23236
23237 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23238
23239         * object.c: don't use mprotect ()  and fix intern pool hash table
23240         lookup for big endian systems.
23241
23242 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23243
23244         * icall.c: change type_is_subtype_of () signature.
23245
23246 2002-02-21  Mark Crichton  <crichton@gimp.org>
23247
23248         * rand.c, rand.h: Added random number generator for
23249         System.Security.Cryptography classes.
23250
23251         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
23252
23253         * icall.c: Added System.Security.Cryptography calls.
23254
23255 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
23256
23257         * class.c, icall.c, metadata.c: better support for pointer types.
23258         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
23259         * reflection.c: Add support for getting custom attrs for properties
23260         and simplify some code.
23261
23262 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23263
23264         * icall.c: change getToken () and add custom attribute GetBlob()helper
23265         method.
23266         * reflection.h: add custom attrs array to the reflection builder structures.
23267         * reflection.c: encode and emit custom attributes for all the relevant
23268         reflection objects. Cache fieldref and methodref tokens. Change
23269         mono_image_create_token() interface to take a MonoDynamicAssembly.
23270         More complete custom attributes decoder. Load custom attributes for
23271         Assembly, Field, Method and Constructor objects, too. Make the
23272         returned array an Attribute[] one, not object[]. Added
23273         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
23274         custom attribute constructor.
23275
23276 2002-02-20  Dick Porter  <dick@ximian.com>
23277
23278         * icall.c:
23279         * rawbuffer.c:
23280         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
23281         problem code out for now).
23282
23283 2002-02-19  Radek Doulik  <rodo@ximian.com>
23284
23285         * object.c (mono_ldstr): use hash table to avoid multiple swapping
23286
23287 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
23288
23289         * icall.c: register the GetCustomAttributes method.
23290         * object.c, object.h: add mono_string_new_len ().
23291         * reflection.h, reflection.c: added mono_runtime_invoke(),
23292         mono_install_runtime_invoke(). Added
23293         mono_reflection_get_custom_attrs () to load custom attributes and
23294         create the attribute objects.
23295
23296 2002-02-19  Dick Porter  <dick@ximian.com>
23297         * threads-dummy-types.c:
23298         * threads-dummy-types.h:
23299         * threads-dummy.c:
23300         * threads-dummy.h:
23301         * threads-pthread-types.c:
23302         * threads-pthread-types.h:
23303         * threads-pthread.c:
23304         * threads-pthread.h:  Deleted obsolete files
23305
23306 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
23307
23308         * class.c (mono_class_vtable): runtime init the class when we
23309         allocate static class data.
23310
23311         * icall.c (ves_icall_System_Array_SetValue): check for null values.
23312
23313         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
23314         and String - but we will need generic marshalling support in the
23315         future. 
23316         (mono_init): set the domain name in a ms compatible way
23317
23318         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
23319         String[].
23320
23321 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
23322
23323         * object.c (mono_array_clone): use alloca() instead of g_malloc  
23324         for sizes
23325
23326         * appdomain.c (mono_domain_unload): impl.
23327
23328 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23329
23330         * appdomain.c, object.c: fix intern pool implementation.
23331         * class.c: fix alignment code.
23332
23333 2002-02-16  Radek Doulik  <rodo@ximian.com>
23334
23335         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
23336         and s2 > s1, just copy lower bytes to be compatible with little
23337         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
23338         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
23339
23340         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
23341         force big_endian to be 1 for big endian machines 
23342         (ves_icall_iconv_new_decoder): ditto
23343
23344 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
23345
23346         * socket-io.c (convert_sockopt_level_and_name): If the system
23347         doesn't define SOL_IP or SOL_TCP, get them by hand using
23348         getprotobyname() and caching the values (because this could be a
23349         slow operation).
23350         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
23351         Use the appropriate struct when the system does support it. Ie,
23352         not all systems have struct ip_mreqn so use struct ip_mreq when
23353         appropriate.
23354
23355 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
23356
23357         * reflection.c: handle finally clauses.
23358
23359 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
23360
23361         * socket-io.c: use g_snprintf() instead of snprintf.
23362
23363 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
23364
23365         * reflection.c (mono_param_get_objects): Cast second argument to
23366         mono_method_get_param_names to a const char** to silence the
23367         compiler warning.
23368
23369         * appdomain.c (mono_domain_assembly_open): Put parens around the
23370         truth statement in the for-loop.
23371
23372         * unicode.c (iconv_convert): Got rid of a compiler warning about
23373         int i being unused when the system has a new iconv.
23374         (iconv_get_length): Same.
23375
23376         * image.c (load_class_names): Cast the second argument to
23377         g_hash_table_insert() to char* to hush compiler warnings about the
23378         arg being a const.
23379         (mono_image_open): Same here.
23380
23381         * socket-io.c: Don't conditionally include sys/filio.h or
23382         sys/sockio.h here anymore since we now get them from
23383         io-layer/io-layer.h
23384         (inet_pton): If the system doesn't support inet_aton, implement
23385         using inet_addr and also #define INADDR_NONE if it isn't defined
23386         by the system.
23387
23388 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
23389
23390         * metadata.c, metadata.h: added function to get packing and size info
23391         of a typedef.
23392         * reflection.h, reflection.c: handle field RVA data. Save info about
23393         the table layout if needed. Assign typedef indexes to all the types
23394         before dumping the info about them to avoid forward reference problems.
23395
23396 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
23397
23398         * socket-io.c (convert_sockopt_level_and_name): ifdef
23399         SO_ACCEPTCONN because it is not defined on my system (old debian)
23400
23401 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
23402
23403         * opcode.c: use stddef.h to get NULL.
23404
23405 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
23406
23407         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
23408         for FIONBIO, FIONREAD and SIOCATMARK.
23409         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
23410         define INADDR_NONE and besides, inet_addr() is deprecated and
23411         should not be used. Use inet_pton() instead - it also has the
23412         added bonus that it can easily handle IPv6 addresses as well.
23413         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
23414
23415 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
23416
23417         * decimal.c: remove _MSC_VER conditional.
23418
23419 2002-02-13  Dick Porter  <dick@ximian.com>
23420
23421         * socket-io.c: 
23422         * icall.c: Internal calls for Blocking, Select, Shutdown,
23423         GetSocketOption and SetSocketOption
23424
23425 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23426
23427         * assembly.cs: better resolver: use it instead of some kludgy
23428         code.
23429
23430 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
23431
23432         * reflection.c: the best way to speed-up the compiler is to avoid
23433         infinite loops.
23434
23435 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
23436
23437         * class.c (mono_class_vtable): changed the object layout
23438         (obj->vtable->class). 
23439         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
23440
23441 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23442
23443         * assembly.c: look for assemblies in the assembly dir, too.
23444
23445 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23446
23447         * class.c: fix thinko in mono_class_from_type().
23448
23449 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23450
23451         * exception.h, exception.c: added TypeLoadException.
23452         * object.h, object.c: added mono_array_clone ().
23453         * icall.c: handle throwOnError in AssemblyGetType().
23454         Added Array.Clone().
23455         * opcode.h, opcode.c: use a single value for the opcode val.
23456         Compile fix for non-gcc compilers.
23457
23458 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
23459
23460         * opcodes.c, opcodes.h: export interesting info about opcodes.
23461
23462 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
23463
23464         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
23465         icalls. 
23466
23467         * class.c (class_compute_field_layout): set element_class for enums
23468         (mono_class_create_from_typedef): set element_class for normal classes
23469
23470         * icall.c (ves_icall_System_Enum_get_value): impl.
23471
23472         * class.c (mono_class_create_from_typedef): do not set valuetype
23473         flag for System.ValueType and System.Enum
23474
23475 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
23476
23477         * unicode.c (iconv_convert): fix big endian problem.
23478
23479 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23480
23481         * class.c: add asserts if we are ever going to scribble over memory.
23482         * socket-io.c: not all systems have AF_IRDA defined.
23483
23484 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
23485
23486         * class.c (class_compute_field_layout): do not consider static
23487         fields to compute alignment
23488
23489 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
23490
23491         * appdomain.c (mono_appdomain_get): impl.
23492         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
23493
23494 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
23495
23496         * icall.c: ignore "file://" prefix when loading an assembly.
23497
23498 2002-01-23  Dick Porter  <dick@ximian.com>
23499
23500         * socket-io.c:
23501         * icall.c:
23502         * Makefile.am: Added socket support
23503
23504 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
23505
23506         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
23507         code back.  This should return the assemblies that are loaded by
23508         the runtime on behalf of an application domain. 
23509
23510         The current implementation is still broken, it just returns every
23511         assembly loaded, but until we get real applications domain this
23512         will do.
23513
23514 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
23515
23516         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
23517         AppDomain object.
23518
23519 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
23520
23521         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
23522         the mono_class_from_name lookup.
23523         (ves_icall_get_parameter_info): ditto.
23524         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
23525         method.
23526         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
23527
23528 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
23529
23530         * class.c: load also nested classes on class init.
23531         System.ValueType instance methods gets passed boxed
23532         values, unless methods in derived classed that get a pointer to the
23533         data.
23534         * icall.c: use better name parsing code in GetType().
23535         * image.c, image.h: add mono_image_loaded ().
23536         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
23537         * reflection.c, reflection.h: added mono_reflection_parse_type().
23538
23539 2002-01-22  Veronica De Santis <veron78@interfree.it>
23540
23541         * icall.c : Added mapping of internal calls for Manual and Auto reset events
23542         * threads.c : Added the implementation of internal calls for events
23543         * threads.h : Added prototypes of internal calls for events
23544         
23545 2002-01-21  Radek Doulik  <rodo@ximian.com>
23546
23547         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
23548
23549 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
23550
23551         * class.c (mono_class_init): set min_align to 1 (instead of 0)
23552         (mono_class_value_size): use min_align
23553
23554 2002-01-20  Dick Porter  <dick@ximian.com>
23555
23556         * threads.h:
23557         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
23558         so it compiles on w32.
23559
23560 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
23561
23562         * metadata.c (mono_type_stack_size): impl.
23563
23564         * class.c (mono_class_get_field): impl. memberref token
23565
23566 2002-01-16 Veronica De Santis <veron78@@interfree.it>
23567
23568         * icall.h : Added the internal calls mapping for CreateMutex_internal
23569                     and ReleaseMutex_internal.
23570         * threads.h : Added the prototype of mutexes internal calls.
23571         * threads.c : Added the implementations of mutexes internal calls.
23572
23573 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23574
23575         * metaparse.h: removed unused file.
23576         * reflection.c, reflection.h: added stream_data_align () function 
23577         to align data in streams and keep stream aligned. Add support for
23578         exception support in method headers.
23579
23580 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
23581
23582         * unicode.c: make iconv_convert () return the number of bytess written
23583         in the output buffer.
23584
23585 2002-01-15  Dick Porter  <dick@ximian.com>
23586         * threads.c: Make the runtime's idea of infinite timeouts coincide
23587         with the class library's
23588
23589         Fix a particularly egregious bug in mono_thread_cleanup(). That
23590         code was so utterly bogus it must have been written on a Monday.
23591
23592 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23593
23594         * reflection.h: add subtypes field to TypeBuilder.
23595         * reflection.c: encode constants for literal fields.
23596         Handle subtypes. Fix user string token (and add a zero byte)
23597         at the end.
23598         
23599 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
23600
23601         * class.c (mono_class_init): bug fix: assign slot numbers for
23602         abstract methods.
23603
23604 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23605
23606         * reflection.c: don't try to output a code RVA for abstract methods.
23607         Small fixes for method header format. Output parameter info to the
23608         ParamDef table. Save method overriding info to MethodImpl table.
23609         Fix property support. Allow typedef.extends to be a type in the
23610         building assembly.
23611         * verify.c: fix off-by-one error.
23612
23613 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
23614
23615         * class.c: fix mono_class_from_mono_type () for szarray types.
23616         Remove unused cache check in mono_class_from_type_spec().
23617         * icall.c: *type_from_name () functions handle simple arrays and byref.
23618         * reflection.c: handle byref and szarray types. Handle methods without
23619         body (gets P/Invoke compilation working). Handle types and fields in
23620         get_token ().
23621         * reflection.h: add rank to MonoTypeInfo.
23622
23623 2002-01-10  Dick Porter  <dick@ximian.com>
23624
23625         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
23626         internal calls
23627
23628 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23629
23630         * icall.c: initialize class in type_from_handle ().
23631         Loop also in parent classes for get_method ().
23632         * reflection.c: properly encode class and valuetype types.
23633         Start on encoding TypeBuilder types. Handle fieldrefs.
23634         Use correct length when registering a user string.
23635         Handle ConstructorBuilder and MonoMethod in get_token ().
23636         Make mono_type_get_object () aware of cached types.
23637         * object.c: back out change to mono_string_new ().
23638
23639 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
23640         * object.c: mono_string_new should return a NULL when the string 
23641         passed in is NULL -- not try to deference it.
23642         
23643 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23644
23645         * icall.c: hack to make IsSubType work for TypeBuilders.
23646         * reflection.c: emit constructors before methods.
23647         Retrieve param names in mono_param_get_objects().
23648
23649 2002/01/05  Nick Drochak  <ndrochak@gol.com>
23650
23651         * Makefile.am: fix list of headers and sources so automake 1.5
23652         doesn't complain. Removed \# at end of list.
23653
23654 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23655
23656         * reflection.c: get token for a method ref. Set return type of
23657         constructor to void.
23658         * loader.c: debug message.
23659         * class.c: typo fix.
23660
23661 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
23662
23663         * icall.c: fix array init with rank > 1. FindMembers
23664         loops in parent class as well.
23665         * image.c: do not insert nested types in name cache.
23666         * reflection.c: warning fix.
23667         * reflection.h: add override method (for interface impl).
23668
23669 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
23670
23671         * metadata.c: fix customattr decoding.
23672
23673 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
23674
23675         * rawbuffer.cs: Added native Win32 implementation, avoids using
23676         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
23677
23678 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
23679
23680         * class.c: make the low-level routines handle the cache.
23681
23682 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
23683
23684         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
23685
23686 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
23687
23688         * class.c: fix mono_array_element_size() for objects.
23689         * class.h, class.c: add properties to MonoClass and load them
23690         at init time.
23691         * icall.c: check with isinst() when assigning a value to an array
23692         instead of requiring the classes to match exactly.
23693         Implemented icall for System.Type::GetType().
23694         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
23695         enums. Handle bindingflags when looking for methods and fields.
23696         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
23697         and mono_metadata_methods_from_property().
23698         * reflection.h, reflection.c: added structures for propreties,
23699         parameters and enums. Implemented mono_property_get_object() and
23700         mono_param_get_objects().
23701
23702 2001-12-18  Dick Porter  <dick@ximian.com>
23703
23704         * file-io.c: Use mono_string_to_utf16() instead of
23705         mono_string_chars()
23706
23707         * object.c: Added mono_string_to_utf16(), which copies the non
23708         NULL-terminated MonoString into a new double-null-terminated
23709         buffer.
23710
23711 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
23712
23713         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
23714
23715 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
23716
23717         * file-io.c: raise exceptions if handle is invalid.
23718
23719 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
23720
23721         * assembly.c: yet another check for mscorlib.
23722         * class.c, class.h: load nesting info for classes.
23723         * icall.c: many new functions to support the Reflection classes.
23724         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
23725         * reflection.h, reflection.c: mono_image_create_token(),
23726         mono_assembly_get_object(), mono_type_get_object(),
23727         mono_method_get_object(), mono_field_get_object(): methods to return
23728         objects that parallel the C representation of assemblies, types,
23729         methods, fields.
23730
23731 2001-12-11  Dick Porter  <dick@ximian.com>
23732
23733         * icall.c:
23734         * file-io.c: Internal calls for file IO.
23735
23736 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
23737
23738         * tabledefs.h: missing FileAttributes.
23739         * verify.h, verify.c: use is_valid_string () to simplify and check for
23740         valid strings more correctly. Fix warnings and speeling.
23741         Check more tables: Filed, File, ModuleRef, StandAloneSig.
23742         Check code: branches, maxstack, method calls.
23743
23744 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
23745
23746         * object.c (mono_object_allocate): removed static, so that the jit
23747         can allocate value types.
23748
23749         * icall.c (ves_icall_System_DateTime_GetNow): impl.
23750
23751 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23752
23753         * class.c: init enum types right away and register the
23754         token->MonoClass map in mono_class_create_from_typedef ().
23755         * verify.h, verify.c: first cut of the verifier.
23756         * pedump.c: add --verify switch to verify metadata tables.
23757         * tabledefs.h: add some missing enums.
23758
23759 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
23760
23761         * class.c (mono_install_runtime_class_init): impl.
23762         (mono_class_init): renamed mono_class_metadata_init to
23763         mono_class_init, also removed the metadata_inited flag
23764
23765         * object.c (mono_object_isinst): use faster algorithm
23766
23767 2001-11-30  Radek Doulik  <rodo@ximian.com>
23768
23769         * mono-endian.h: reverted last change
23770         added function prototypes
23771
23772         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
23773         add mono-endian.c back
23774
23775         * mono-endian.c: returned back, as Paolo pointed out, it's needed
23776         for unaligned access, I've mistaked it with endianess. I am
23777         sorry.
23778         (mono_read16): fix reverted endianess
23779         (mono_read64): ditto
23780         (mono_read32): ditto
23781
23782 2001-11-30  Dick Porter  <dick@ximian.com>
23783
23784         * exception.c: Implement mono_exception_from_name()
23785
23786 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23787
23788         * metadata.h, metadata.c: remove params_size and locals_size and their
23789         calculation from the metadata code: they are only usefult to the
23790         interp.
23791
23792 2001-11-29  Radek Doulik  <rodo@ximian.com>
23793
23794         * object.c (mono_ldstr): swap bytes here, it's probably not the
23795         best place, but works for me now, I'll redo it once I know mono
23796         better, also note that I add PROT_WRITE and don't reset back, also
23797         note that it's only affects big endians, so x86 should be OK
23798
23799         * mono-endian.h (read16): use just glib macros for both endians
23800
23801         * mono-endian.c: removed as glib macros are used in in
23802         mono-endian.h so we don't need to care about endianess for read
23803         macros as glib does that for us already
23804
23805 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
23806
23807         * class.h, class.h: take minimum alignment into consideration so
23808         that the fields of a class remain aligned also when in an array.
23809
23810 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23811
23812         * loader.h, loader.c: add mono_method_get_param_names().
23813         * class.c: 0-init class fields.
23814
23815 2001-11-26  Dick Porter  <dick@ximian.com>
23816
23817         * icall.c:
23818         * threads-types.h:
23819         * threads.c: New file that handles System.Threading on all platforms
23820
23821         * object.c: 
23822         * object.h: Remove the synchronisation struct from MonoObject,
23823         replace it with a pointer that gets initialised on demand
23824
23825         * Makefile.am: Replace all the system-specific threading code with
23826         a single file that uses the new wrapper library
23827
23828 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
23829
23830         * class.c, class.h: add mono_install_trampoline() so that the runtime
23831         can register a function to create a trampoline: removes the ugly
23832         requirement that a runtime needed to export arch_create_jit_trampoline.
23833         * object.h, object.c: added mono_install_handler() so that the runtime
23834         can install an handler for exceptions generated in C code (with
23835         mono_raise_exception()). Added C struct for System.Delegate.
23836         * pedump.c: removed arch_create_jit_trampoline.
23837         * reflection.c: some cleanups to allow registering user strings and
23838         later getting a token for methodrefs and fieldrefs before the assembly
23839         is built.
23840         * row-indexes.h: updates and fixes from the new ECMA specs.
23841
23842 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
23843
23844         * class.h, class.c: add enum_basetype field to MonoClass.
23845         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
23846         to get index in the constant table reated to a field, param or
23847         property.
23848         * reflection.h, reflection.c: handle constructors. Set public-key and
23849         version number of the built assembly to 0.
23850         * row-indexes.h: update from new ECMA spec.
23851
23852 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23853
23854         * class.h, class.c: add a max_interface_id to MonoClass.
23855         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
23856         since it's used to do that. Added mono_type_type_from_obj().
23857         Make GetType() return NULL instead of segfaulting if the type was not
23858         found. Handle simple arrays in assQualifiedName.
23859         * object.h: add a struct to represent an Exception.
23860         * reflection.c: output call convention in method signature.
23861         Add code to support P/Invoke methods and fixed offsets for fields.
23862
23863 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
23864
23865         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
23866         the value.
23867         * icall.c: use mono_array_addr instead of array->vector: fixes the
23868         reflection image writing.
23869         * reflection.c: init call convention byte to 0 in method signature.
23870         Encode the property signature. Don't output property-related methods
23871         twice. Really process the properties for a type (don't cast a field to
23872         a property, my mom always told me that).
23873         Fix 64 bit issues in pointer alignment in a different and more
23874         readable way.
23875
23876 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
23877
23878         * loader.h: Removed type class from MonoDefaults, added monotype
23879
23880         * loader.c: Loaded MonoType, removed loading of Type
23881
23882         * icall.c (my_mono_new_object): Now returns a System.MonoType,
23883         and fills in System.Type._impl with a RuntimeTypeHandle rather
23884         than the actual MonoClass *
23885
23886         (ves_icall_type_from_handle): change from type_class to
23887         monotype_class
23888
23889         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
23890         implemented
23891
23892         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
23893         implemented
23894
23895         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
23896
23897         (ves_icall_System_Reflection_Assembly_GetType): implemented
23898
23899         (ves_icall_System_MonoType_assQualifiedName): implemented
23900
23901         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
23902
23903 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
23904
23905         * assembly.c (mono_assembly_open): Implement a cache for the
23906         assemblies. 
23907
23908         (mono_assembly_close): only destroy the assembly when the last
23909         reference is gone.
23910         
23911 2001-11-09  Dick Porter  <dick@ximian.com>
23912
23913         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
23914
23915 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
23916
23917         * class.c (mono_class_metadata_init): bug fix: compute the right slot
23918
23919 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23920
23921         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
23922         from Martin Weindel.
23923         * object.h: add mono_string_chars ().
23924
23925 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
23926
23927         * reflection.c (build_compressed_metadata): Eliminates warnings
23928         and uses 64-bit clean code.
23929
23930         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
23931         (mono_type_equal): Change signature to eliminate warnings.
23932
23933 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23934
23935         * icall.c, loader.c: remove the internalcall array constructors.
23936         Changes to match the new MonoArray structure.
23937         * object.h, object.c: an array object doesn't allocate an extra
23938         vector. Add mono_array_new_full () to create jagged arrays easily.
23939
23940 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23941
23942         * metadata.h, metadata.c: add mono_metadata_field_info () to
23943         retreive all the info about a field from vairous tables.
23944         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
23945         * class.h, class.c: augment MonoClassField with more info.
23946         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
23947         policy and load a field's RVA if needed.
23948
23949 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
23950
23951         * class.c (mono_class_metadata_init): create a trampoline for all
23952         virtual functions instead of actually compiling them.
23953
23954 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
23955
23956         * class.h, class.c: include name in MonoClassField.
23957         * class.c: fix fundamental type of System.Object and System.String.
23958         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
23959         tokens in ldtoken.
23960         * icall.c: remove internalcalls for the Reflection stuff that is now
23961         done in C# code.
23962         * loader.c: mono_field_from_memberref () implementation.
23963         * mono-endian.c: thinko (s/struct/union/g).
23964         * object.c, object.h: make the mono_string_* prototypes actually use
23965         MonoString instead of MonoObject.
23966         * reflection.c, reflection.h: updates for changes in the reflection
23967         code in corlib: we use C structures that map to the actual C# classes.
23968         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
23969         fat method header if needed and use the info from the ILGenerator for
23970         methods. Handle fields in types. Misc fixes.
23971
23972 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
23973
23974         * class.c (mono_class_metadata_init): bug fix: always allocate
23975         space for static class data
23976
23977 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
23978
23979         * class.c (mono_compute_relative_numbering): use relative
23980         numbering to support fast runtime type checks.
23981
23982 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
23983
23984         * class.c (mono_class_create_from_typeref): added debugging output
23985         to print class name when MonoDummy is returned instead of real class
23986
23987 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
23988
23989         * class.c (mono_class_metadata_init): interface offset table now
23990         contains pointers into the vtable - this is more efficient for the jit
23991
23992 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
23993
23994         * class.c (mono_class_metadata_init): use a temporary vtable (the
23995         old algorithm only worked for the interpreter, but not for the jit)
23996
23997 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
23998
23999         * loader.c (method_from_memberref): use mono_class_get to get the
24000         class of an array instead of using System.Array directly.
24001         (mono_get_method): also add MEMBERREF methods to the method cache
24002         which usefull for arrays.
24003
24004 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
24005
24006         * pedump.c (arch_compile_method): added to compute vtable entry
24007
24008         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
24009         number of interfaces.
24010         
24011         * class.h: merged MonoArrayClass into MonoClass
24012
24013         * class.c (mono_class_create_from_typedef): compute the vtable size and
24014         allocate space to include the vtable inside MonoClass
24015         (mono_class_metadata_init): initialize the vtable
24016
24017 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
24018
24019         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
24020         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
24021         * image.c: endian fixes by Laurent Rioux.
24022         * object.h, object.c: rename MonoStringObject to MonoString and
24023         MonoArrayObject to MonoArray. Change some function names to conform to
24024         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
24025         guint16* as first argument, so don't use char*.
24026         Provide macros to do the interesting things on arrays in a portable way.
24027         * threads-pthread.c: updates for the API changes and #include <sched.h>
24028         (required for sched_yield()).
24029         * icall.c: updates for the API changes above.
24030         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
24031         platforms that need them.
24032
24033 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
24034
24035         * class.c: set the correct type for all the fundamental
24036         type when loading the class.
24037
24038 2001-10-05  Dick Porter  <dick@ximian.com>
24039
24040         * threads-pthread.c (pthread_mutex_timedlock): Simple
24041         compatibility version for C libraries that lack this call.
24042
24043 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
24044
24045         * class.c: MonoTypes stored in MonoClass are stored as
24046         fundamental MonoTypes when the class represents a
24047         fundamental type (System.Int32, ...).
24048         The TypeHandle return by ldtoken is a MonoType*.
24049         * icall.c: ves_icall_get_data_chunk () write out all the
24050         PE/COFF stuff. Implement ves_icall_define_method (),
24051         ves_icall_set_method_body (), ves_icall_type_from_handle ().
24052         * image.c: properly skip unknown streams.
24053         * loader.h, loader.c: add type_class to mono_defaults.
24054         * metadata.c, metadata.h: export compute_size () as
24055         mono_metadata_compute_size () with a better interface.
24056         Typo and C&P fixes.
24057         * pedump.c: don't try to print the entry point RVA if there is no entry point.
24058         * reflection.c, reflection.h: many cleanups, fixes, output method
24059         signatures and headers, typedef and typeref info, compress the metadata
24060         tables, output all the heap streams, cli header etc.
24061         * row-indexes.h: typo fixes.
24062
24063 2001-10-04  Dick Porter  <dick@ximian.com>
24064
24065         * object.h: Add a synchronisation mutex struct to MonoObject
24066
24067         * object.c (mono_new_object): Initialise the object
24068         synchronisation mutexes
24069
24070         * icall.c: System.Threading.Monitor internal calls
24071         
24072         * threads-pthread.h:
24073         * threads-pthread.c: System.Threading.Monitor internal calls
24074
24075         * threads-types.h: New file, includes the system-specific thread
24076         structures
24077         
24078         * threads-pthread-types.h:
24079         * threads-pthread-types.c: New files, handle pthread-specific
24080         synchronisation types
24081
24082         * threads-dummy-types.h: 
24083         * threads-dummy-types.c: New files of dummy support for
24084         thread-specific types
24085
24086         * metadata.c:
24087         * image.c:
24088         * pedump.c: include mono-endian.h not endian.h
24089         
24090         * Makefile.am: More threads files.
24091         Name mono-endian.h not endian.h
24092
24093 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
24094
24095         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
24096         stuff and implement a few more bits.
24097         * icall.c: a field needs to be dereferenced twice. Do not use the same
24098         name for two variables in the same scope.
24099         * image.c, image.h: cleanups.
24100
24101 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
24102
24103         * class.c (mono_class_metadata_init): bug fix: compute the right size
24104
24105 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
24106
24107         * icall.c: implemented some of the Reflection internalcalls.
24108         * image.c, image.h: start writing out the PE/COFF image.
24109         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
24110         that does the reverse than decode_blob_size ().
24111         * object.c: use mono_metadata_encode_value (). Move here
24112         temporary implementation of mono_string_to_utf8 ().
24113         * rawbuffer.c: make malloc_map static.
24114
24115 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
24116
24117         * metadata.c: fix type comparison for arrays.
24118         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
24119         Added a couple of new classes to monodefaults.
24120         * icall.c: added a couple of Reflection-related internalcalls.
24121         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
24122         Added a byval_arg MonoType to MonoClass.
24123
24124 2001-09-28  Dick Porter  <dick@ximian.com>
24125
24126         * icall.c:
24127         * threads-pthread.h: 
24128         * threads-pthread.c: Implemented internal calls for
24129         LocalDataStoreSlot operations.  Applied mutexes around all shared
24130         data.  Reworked the thread creation and Start() operations to
24131         avoid a race condition.
24132         
24133         * threads-dummy.h:
24134         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
24135
24136 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
24137
24138         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
24139
24140 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
24141
24142         * class.c, loader.c: warn and return NULL instead of erroring out.
24143         * icall.c: added System.AppDomain::getCurDomain().
24144         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
24145
24146 2001-09-25  Dick Porter  <dick@ximian.com>
24147
24148         * threads-pthread.h:
24149         * threads-pthread.c: Implemented timed thread joining and added
24150         System.Threading.Thread::Join_internal internal call
24151
24152         * icall.c: Added System.Threading.Thread::Join_internal internal call
24153
24154         * threads-dummy.h:
24155         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
24156
24157 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
24158
24159         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
24160         mono_string_intern () to implement the semantics of the ldstr opcode
24161         and the interning of System.Strings.
24162         * icall.c: provide hooks to make String::IsIntern and String::Intern
24163         internalcalls.
24164
24165 2001-09-23  Dick Porter  <dick@ximian.com>
24166
24167         * threads-dummy.c: 
24168         * threads-dummy.h: New files of dummy threading routines
24169
24170         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
24171         support code based on system specifics
24172
24173         Rename PTHREAD_LIBS to THREAD_LIBS
24174         
24175 2001-09-23  Dick Porter  <dick@ximian.com>
24176
24177         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
24178         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
24179         internal calls.
24180         (mono_thread_init): Set up a Thread object instance to return when
24181         the main thread calls Thread.CurrentThread
24182         (mono_thread_cleanup): Wait for all subthreads to exit
24183
24184         * icall.c: New internal calls for System.Threading.Thread::Sleep
24185         (including Schedule) and CurrentThread
24186
24187         * threads.h: New file, to insulate thread-specific stuff from the
24188         rest of the code
24189
24190 2001-09-21  Dick Porter  <dick@ximian.com>
24191
24192         * threads-pthread.h: 
24193         * threads-pthread.c: New file, for handling pthreads-style
24194         threading support.  Start() now starts a new thread and executes
24195         the ThreadStart delegate instance.
24196
24197         * icall.c: Added the internalcall for
24198         System.Threading.Thread::Start_internal
24199
24200         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
24201
24202 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
24203
24204         * loader.c: work around the different signatures for delegates
24205         constructors csc generates in compiled code vs the ones compiled in mscorlib.
24206
24207 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24208
24209         * class.h, class.c: add mono_class_get_field_from_name ().
24210         * *: Fix C comments and other ANSI C issues.
24211
24212 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
24213
24214         * endian.h, assembly.c: fix some endianness issues.
24215
24216 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
24217
24218         * loader.h, load.c: add delegate_class to mono_defaults.
24219         Handle runtime provided methods in mono_get_method ().
24220
24221 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
24222
24223         * loader.c (mono_get_method): use pinvoke for internal call
24224
24225         * icall.c: use pinvoke for internal call
24226
24227         * loader.c (method_from_memberref): set the method name
24228
24229 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
24230
24231         * metadata.c: help the compiler generate better code for
24232         mono_class_from_mono_type ().
24233
24234 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
24235
24236         * class.c (mono_class_metadata_init): delayed computing of the
24237         class size to mono_class_metadata_init ()
24238
24239 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
24240
24241         * class.c, class.h: add an interfaces member to MonoClass.
24242         * image.c, image.h: add assembly_name field to MonoImage
24243         from the assembly table.
24244         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
24245
24246 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24247
24248         * class.c: Handle Array in mono_class_from_mono_type ().
24249         * metadata.c, pedump.c: some endian fixes.
24250
24251 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
24252
24253         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
24254         * metadata.c: fix small problem introduced with the latest commit.
24255
24256 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
24257
24258         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
24259         We don't need a MonoMetadata pointer anymore to compare signatures in
24260         mono_metadata_signature_equal (), update callers.
24261         Reduced memory usage an number of allocations for MonoMethodHeader and
24262         MonoMethodSignature.
24263
24264 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
24265
24266         * metadata.c: added compare for szarray.
24267
24268 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
24269
24270         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
24271         and add a couple more types to it and mono_defaults. Give an hint on
24272         classes that need implementing in our corlib and are referenced
24273         in mscorlib.
24274
24275 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
24276
24277         * class.h, class.c: keep track if a class is also an Enum.
24278         * loader.c: Implement a couple more types for use in libffi
24279         marshalling. Gives better diagnostics when failing to dlopen
24280         a library. Set method->klass for P/Invoke methods, too.
24281
24282 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
24283
24284         * class.c, class.h: add a MonoType this_arg to MonoClass that
24285         represents a pointer to an object of the class' type that
24286         can be used by the interpreter and later the type cache.
24287         Add best guess alignment info for valuetype objects.
24288
24289 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
24290
24291         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
24292         into MonoType: one less level of indirection and allocation and
24293         simplifies quite a bit of code. Added cache for MonoTypes that are
24294         used frequently, so that we don't need to allocate them all the time.
24295
24296 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
24297
24298         * class.c (mono_class_create_from_typedef): System.Enum is also a
24299         value type, although it does not derive from System.ValueType
24300         (maybe a bug in the ms compiler?)
24301
24302         * metadata.c (mono_type_size): return the right size for value types
24303
24304         * loader.c (mono_get_method): only initialize method header if not abstract
24305
24306         * class.c (mono_class_from_mono_type): use mono_default values. 
24307
24308 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
24309
24310         * *: use MonoClass pointers instead of <type_tokens>
24311         
24312         * class.h: new flag: metadata_inited.
24313
24314         * class.c (mono_class_metadata_init): impl.
24315         (mono_class_instance_size): impl.
24316         (mono_class_data_size): impl.
24317
24318 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
24319
24320         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
24321         MonoClass now has the name and name_space fields. 
24322         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
24323         mono_get_method () takes and optional MonoClass as argument.
24324         Removed mono_typedef_from_name() and added mono_class_token_from_name()
24325         instead that takes advantage of a map from class names to typedef
24326         tokens in MonoImage.
24327
24328 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
24329
24330         * metadata.c: zero is not a valid alignment boundary.
24331         Merge MONO_TYPE_VOID in default decoding code.
24332
24333 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
24334
24335         * image.h: merged MonoMetadata into MonoImage
24336
24337         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
24338         identify the type of elements.
24339
24340 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
24341
24342         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
24343         * cil-coff.h: split MonoMSDOSHeader and add size info.
24344         * image.c: add some consistency checks.
24345         * metadata.c: fix row size computation: one programmer
24346         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
24347         add explanation for the locator routine.
24348         Fix decoding of size in method header.
24349         
24350 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
24351
24352         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
24353         (g_concat_dir_and_file): Bring g_concat_dir_and_file
24354         function from gnome-libs.  This uses the right path separator
24355         based on the OS, and also works around a bug in some systems where
24356         a double slash is not allowed. 
24357         (default_assembly_name_resolver): Use g_concat_dir_and_file
24358         (mono_assembly_open): ditto.
24359
24360 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
24361
24362         * metadata.c (mono_metadata_signature_equal): impl.
24363
24364         * *: void is now a realy MonoType (instead of using NULL)
24365         
24366         * metadata.c (do_mono_metadata_parse_type): use
24367         mono_metadata_parse_type to parse void value.
24368
24369 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
24370
24371         * metadata.c, metadata.h: in the signature and method header store
24372         only the space required for holding the loca vars and incoming arguments.
24373
24374 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
24375
24376         * metadata.c (do_mono_metadata_parse_type): treat void like any
24377         other type (instead of assigning NULL);
24378
24379 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
24380
24381         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
24382
24383 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
24384
24385         * image.c (do_mono_image_open): added a cache for arrays.
24386
24387 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24388
24389         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
24390         decode a single column from a row in a metadata table and changes
24391         to take advantage of it in the typedef locator (gives a nice speed up).
24392         Store offset info for function params.
24393
24394 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
24395
24396         * image.h (MONO_IMAGE_IS_CORLIB): removed 
24397
24398 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
24399
24400         * assembly.c: how could mono_assembly_close () had ever worked?
24401         * metadata.c, metadata.h: provide offset info for local vars.
24402         Implement mono_type_size () to take care of alignment as well
24403         as size (it was mono_field_type_size in cli/class.c before).
24404
24405 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
24406
24407         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
24408
24409         * assembly.h (CORLIB_NAME): set to corlib.dll
24410
24411         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
24412
24413 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24414
24415         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
24416         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
24417         tokentype.h: massive namespace cleanup.
24418
24419 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24420
24421         * metadata.h, metadata.c: decode exception clauses when parsing method header.
24422
24423 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
24424
24425         * metadata.c (mono_metadata_free_type): added check for type !=
24426         NULL (void) before calling mono_metadata_free_type()
24427
24428 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
24429
24430         * metadata.h, row_indexes.h: added header with enumerations to use
24431         to index in the columns from tables in metadata and to decode coded
24432         tokens: we should start using this instead of embedding magic numbers
24433         all over the code.
24434
24435 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
24436
24437         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
24438         Move metadata_t info from cli_image_info_t to MonoImage, where
24439         it's easily accessible. Changed all the uses accordingly.
24440         Added the method and class caches to MonoImage.
24441         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
24442         and mono_metadata_decode_value () signature to be more consistent
24443         with the other parse functions (and simplify code). Taken advantage
24444         of zero-length array allocation with GCC. Removed reduntant (and
24445         wrong) MonoFieldType struct and use MonoParam instead. Changed
24446         mono_metadata_parse_field_type () to use common code for parsing.
24447         Added mono_metadata_typedef_from_field () and
24448         mono_metadata_typedef_from_method () to lookup a typedef index from a
24449         field or method token.
24450         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
24451
24452 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
24453
24454         * metadata.c (mono_metadata_parse_field_type): Implement. 
24455         (do_mono_metadata_parse_type): Split engine from
24456         mono_metadata_parse_type, so that we can create smaller structures
24457         for things that just have one pointer to the MonoType (look at
24458         the MonoFieldType)
24459
24460 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
24461
24462         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
24463         as Jan Gray found out, it is incorrect. 
24464
24465 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
24466
24467         * assembly.c: Implement asssembly loading.  This loads an image
24468         and loads all the referenced assemblies.  Come to think of it, we
24469         could always do lazy loading of the assemblies. 
24470
24471         * image.c (mono_image_open): Keep loaded images in a hashtable.
24472
24473         * image.h (MonoImage): Add reference count.
24474
24475 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
24476
24477         * assembly.c (mono_assembly_open): Keep track of the file name in
24478         case the assembly has no ASSEMBLY table.
24479
24480         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
24481         from get.c here.
24482
24483 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
24484
24485         * metadata.c, metadata.h: decode local vars in method header
24486         parse function. Change callers accordingly.
24487
24488 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
24489
24490         * metadata.h, cil-coff.h: protect against multiple inclusion.
24491         Added some new structures to hold information decoded from metadata:
24492         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
24493         and relevant decoding/free functions.
24494         * metadata.c: implement decoding functions. Add warning for out of bounds
24495         index in mono_metadata_locate(). Implement mono_get_method () to retreive
24496         all the info about a method signature and invocation. Remove check on
24497         uninitialized local var in parse_mh() and fix memory leak.
24498
24499 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
24500
24501         * metadata.h: More macros.
24502
24503         * tokentype.h: New file.
24504
24505 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
24506
24507         * assembly.c: added a consistency check and initialize
24508         some structures with g_new0().
24509         * metadata.c: fixed a couple more bugs in table size computation
24510         and add other checks for out-of bound access to metadata.
24511
24512 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
24513
24514         * metatada.c: fix bugs computing table sizes. Spew a
24515         warning when index in string heap is out of bounds.
24516
24517 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
24518
24519         * metadata.h: Add a couple of macros to manipulate tokens. 
24520
24521 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24522
24523         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
24524         cli_section_tables).
24525
24526 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
24527
24528         * metadata.c (mono_metadata_user_string): New function, provides
24529         access to the UserString heap. 
24530
24531 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
24532
24533         * metadata.c: Add inline documentation.
24534
24535 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
24536
24537         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
24538         files. 
24539
24540 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
24541
24542         * typeattr.h: New file, TypeAttribute flags. 
24543
24544 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
24545
24546         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
24547         mono_assembly_ensure_section): Section loading code.
24548         (load_section_tables): Load the sections.
24549
24550         * mono/metadata/metadata.c (mono_metadata_locate_token,
24551         mono_metadata_locate): Functions to locate the information
24552         definition given a token or a table and an index.
24553         (mono_metadata_compute_table_bases): New.
24554         (compute_size): New function to compute the sizes of the various
24555         tables.
24556
24557         * mono/metadata/metadata.h: Finish listing the different index
24558         types. 
24559
24560         * mono/metadata/pedump.c: Improve to dump new information.
24561
24562 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
24563
24564         * mono/metadata/metadata.c: Entered all the tables matching
24565         Beta2. 
24566
24567         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
24568
24569
24570