2008-01-13 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2008-01-13  Zoltan Varga  <vargaz@gmail.com>
2
3         * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
4
5 2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
6
7         * verify.c (get_boxable_mono_type): check if the token is valid.
8
9         * verify.c (set_stack_value): changed to add an error if an
10         invalid type is set on stack. Changed all callers due to signature change.
11
12         * verify.c (do_stobj): implement stobj validation.
13
14 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
15
16         * reflection.c (reflection_methodbuilder_to_mono_method): No need to
17         set container->is_method, it was set earlier.
18
19         * metadata.c (type_in_image): Handle MVARs which belong to not finished
20         generic methods.
21
22         * reflection.c (mono_reflection_initialize_generic_parameter): Set
23         is_method of the generic container to TRUE for methods.
24
25 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
26
27         * metadata.c (type_in_image): Handle type parameters properly.
28
29         * class-internals.h (MonoGenericParam): Add an 'image' argument to track
30         memory ownership of this structure.
31
32 2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
33
34         * verify.c (get_boxable_mono_type): make typedref types been just
35         unverifiable. check for void type.
36
37         * verify.c (do_unbox_any): added, verify opcode unbox.any.
38
39         * verify.c (do_load_function_ptr): accept method spec tokens.
40
41 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
42
43         * marshal.c (mono_class_native_size): Always set *align even if this is called
44         recursively.
45
46 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
47
48         * verify.c (mono_verify_corlib): Remove this as it was not used and was 
49         out-of-date.
50
51 2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
52
53         * verify.c: removed some old unused tables. A huge bunch of small fixes
54         to things found while testing the verifier with mono basic.
55
56         * verify.c (dump_stack_value): dump null literal flag to.
57
58         * verify.c (verify_type_compatibility_full): fix comparison
59         for types that have a generic super type.
60
61         * verify.c (verify_stack_type_compatibility): fix compatibility
62         between null literals and reference types. fix compatibility between
63         boxed valuetypes and object. fix corner case test for enums.
64
65         * verify.c (do_cmp_op): proper verification of cgt.un in case
66         of reference types.
67
68         * verify.c (do_invoke_method): fix error message.
69
70         * verify.c (do_store_indirect
71
72         * verify.c (check_is_valid_type_for_field_ops): proper verification
73         of managed pointers to valuetypes and boxed valuetypes. proper verification
74         of null literals.
75
76         * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
77         allow token to be a reference type.
78
79         * verify.c (do_cast): proper handling of boxes valuetypes.
80
81         * verify.c (do_stelem): proper handling of storing a boxed valuetype
82         in object[].
83
84         * verify.c (mono_method_verify): pass the opcode to do_cmp_op
85         to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
86         fixed the decoding of unbox_any
87
88 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
89
90         * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
91
92 2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
93
94         * verify.c (do_newobj): do delegate verification.
95
96         * verify.c (verify_delegate_compatibility): perform delegate
97         verification.
98
99         * verify.c (verify_ldftn_delegate): perform tests related to
100         ldftn delegates.
101
102         * verify.c (mono_delegate_signature_equal): perform the
103         slightly diferent signature comparison required by delegates.
104
105         * metadata.c (mono_metadata_type_equal_full): added and exported
106         as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
107         allows signature only comparison.
108
109         * metadata-internal.h (mono_metadata_type_equal_full): added and exported
110         as MONO_INTERNAL.
111
112 2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
113
114         * verify.c: added a bunch of stack_slot_* functions to
115         make access to stack slot type easier. This is required to
116         allow optional flags, like null literal, boxed value and
117         this pointer.
118         All access paths to IlStackDesc::stype have been changed 
119         to use these new funcions.
120         Removed a bunch of unused functions and cleared all warnings.
121         This patch introduces the usage of the this pointer and 
122         boxed value flags.
123
124 2008-01-07  Zoltan Varga  <vargaz@gmail.com>
125
126         * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
127
128 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
129
130         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
131         match managed version.
132
133         * appdomain.c: Bump corlib version.
134         
135         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
136         argument.
137
138 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
139
140         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
141         Set public key token to zero-length byte array if assembly is not
142         strongnamed.
143
144 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
145
146         * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
147         writing a vtype array elem.
148
149 2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
150
151         * assembly.c (build_assembly_name): return FALSE if length of token is
152         not 16 (if not "null").
153         (mono_assembly_name_parse_full): return FALSE if value of version,
154         culture, token or key is 0.
155         * icall.c (fill_reflection_assembly_name): add boolean arguments to
156         specify whether public key and public key token must be set to default
157         value (zero-length byte array) if not available. Set versioncompat to
158         SameMachine. If public key is available or the default is set, then
159         set PublicKey flag.
160         (ves_icall_System_Reflection_Assembly_FillName): if no public key
161         is available, use empty byte array as default value. On the 2.0
162         profile, use default value for public key token if not set.
163         (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
164         profile, use default value for public key if not set. On the 2.0
165         profile, use default value for public key token if not set.
166         (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
167         default values for public key and public key token.
168
169 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
170
171         * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
172         field to keep it in synch with the managed object.
173
174         * marshal.c (emit_marshal_object): Add support for byref marshalling of
175         delegates. Fixes #351520.
176
177         * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
178         contains defined memory.
179         
180         * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
181
182         * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
183         
184         * sgen-gc.c (check_consistency): New helper function to do a consistency check
185         of the GC data structures.
186
187         * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
188
189         * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
190         
191         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
192         barrier.
193         (mono_array_clone_in_domain): Ditto.
194         (mono_array_clone_in_domain): Ditto.
195
196         * threads.c (start_wrapper): Register the thread start argument as a GC root.
197         (cache_culture): Use a write barrier.
198
199         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
200         (ves_icall_get_property_info): Ditto.
201
202         * object.h (MONO_STRUCT_SETREF): New macro.
203
204         * class-internals.h (MonoStats): Add some GC statistics.
205
206         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
207
208 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
209
210         * exception.c (mono_exception_from_name_two_strings):
211         Break from loop after method is found.
212
213 2008-01-04  Dick Porter  <dick@ximian.com>
214
215         * process.c (process_module_string_read): Rename variable to
216         reflect correct usage, after fixing bug 345972.
217
218 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
219
220         * verify.c (mono_type_create_fnptr_from_mono_method): 
221         created a MonoType function pointer instance to be used during
222         verification. The verifier releases this memory at end.
223
224         * verify.c (mono_method_is_constructor): extracted repeated
225         checks for constructor into a single class.
226
227         * verify.c (do_push_field): use new extracted method
228         for constructor check.
229
230         * verify.c (do_newobj): same.
231
232         * verify.c (do_ldftn): renamed to do_load_function_ptr
233         and make it verify ldvirtftn too.
234
235         * verify.c (mono_method_verify: proper verification
236         of ldvirtftn. release created MonoMethod instances.
237
238 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
239
240         * verify.c (token_bounds_check): added.
241
242         * verify.c (do_ldftn): added.
243
244         * verify.c (mono_method_verify): proper verificartion of ldftn.
245
246 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
247
248         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
249         than the table row count. It's the resposibility of the caller to
250         make the bounds check and raise the correct error.
251
252         * metadata.c (mono_metadata_decode_row_col): Same.
253
254         * loader.c (mono_get_method_from_token): perform bounds check
255         on token for methoddef table.
256
257 2007-12-29  Miguel de Icaza  <miguel@novell.com>
258
259         * icall.c
260         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
261         assert into a negative result, the managed code already coped with
262         that.
263
264         Some folks on Windows reported this error. 
265
266 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
267
268         * appdomain.c: Bump corlib version.
269         * icall.c:
270         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
271         CultureInfo.CreateCulture to create CultureInfo for name.
272         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
273         create CultureInfo for name. Fixes bug #347174.
274
275 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
276
277         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
278         flags.
279
280         * verify.c (is_valid_branch_instruction): allow branching to the
281         first instruction of the protected block.
282
283         * verify.c (is_valid_cmp_branch_instruction): same.
284
285         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
286         avoid double initialization.
287
288         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
289         detect which cases the eval stack should just be copied.
290
291         * verify.c (mono_method_verify): check if the eval stack
292         is empty when entering a protected block.
293
294 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
295
296         * verify.c: added is_clause_in_range, is_clause_inside_range,
297         is_clause_nested and verify_clause_relationship. They perform
298         the verifications stated in P1 12.4.2.7.
299
300         * verify.c (mono_method_verify): remove some unused variables,
301         add the new exception clause checks, add instruction border
302         checks for protected block start/end, improved some error 
303         messages and fixed a bug in the way invalid instruction access
304         is detected.
305
306 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
307
308         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
309         from GC 7.0 if available.
310
311         * object.c: Remove an unused define.
312         
313         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
314
315         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
316
317         * null-gc.c (mono_gc_make_descr_for_array): Implement.
318
319         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
320
321         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
322         to take the same arguments as the other make_descr functions.
323
324         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
325
326         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
327         directly.
328
329         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
330         mini.c.
331
332         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
333         call to boehm-gc.c.
334
335         * boehm-gc.c (mono_gc_register_root): Fix a warning.
336
337         * null-gc.c (mono_gc_register_root): Fix a warning.
338
339         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
340
341         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
342         (mono_gc_base_init): Call GC_init ().
343
344         * null-gc.c: Define mono_gc_register_root () as a no-op.
345
346         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
347
348 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
349
350         * verify.c: add prototype for merge_stacks at top
351
352         * verify.c (do_switch): added.
353
354         * verify.c (merge_stacks): on some cases the stack merging
355         was not happening properly. Unequal stack sizes at merge
356         points should be invalid.
357
358         * verify.c (mono_method_verify): added more debug info on stack state.
359         verify switch properly.
360
361 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
362
363         * method-builder.h: New file, moved the mono_mb_ declarations here from 
364         marshal.h.
365
366         * boehm-gc.c marshal.c: Include method-builder.h.
367
368         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
369
370         * marshal.c: Remove some code which is now in method-builder.c.
371
372 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
373
374         * method-builder.c: New file, extraction of the method builder functionality 
375         from marshal.c.
376
377         * marshal.c: Move the mb functions into method-builder.c.
378
379         * marshal.h marshal.c: Export some mono_mb_... functions.
380
381         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
382
383         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
384         the caller.
385
386         * class.c (mono_class_get_full): Check the token type in the dynamic case.
387
388         * loader.c (mono_field_from_token): Ditto.      
389
390         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
391         type as well.
392         
393         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
394         Fixes #342565.
395
396         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
397         a helper function for setting it.
398
399         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
400
401         
402         * assembly.c: Significally simplify code now that referenced assemblies are 
403         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
404
405         * threads.h: Don't include  the internal threads-types.h header file. Fixes
406         #349952.
407
408 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
409
410         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
411         instructions that were target of branches or are at protected block boundaries.
412
413         * verify.c (in_same_block): handle filter clauses.
414
415         * verify.c (is_valid_branch_instruction): added. checks the target of
416         instructions br or brtrue/false.
417
418         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
419         binary branch instructions such as beq and bge.
420
421         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
422         and made it pin the instruction as been part of the exception block.
423
424         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
425         of in_same_block.
426
427         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
428         of in_same_block.
429
430         * verify.c (do_ret): ret from a protected block is unverifiable and
431         not invalid.
432
433         * verify.c (do_static_branch): verify br and br.s instructions.
434
435         * verify.c (merge_stacks): add extra param to support detection
436         of branches in the middle of instructions.
437         
438         * verify.c (mono_method_verify): verify branches and exception blocks
439         that target the middle of instructions. Proper verification of br and br.s.
440
441 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
442
443         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
444         skip_visibility field.
445         (reflection_methodbuilder_from_dynamic_method): Ditto.
446
447         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
448         registrations. Fixes #348193.
449
450         * threads.h: Move the internal mono_thread_get_pending_exception () to
451         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
452
453 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
454
455         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
456         icall registration. Fixes #348193.
457
458         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
459         for corlib classes into object. Fixes #349621.
460
461 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
462
463         * icall.c (property_accessor_nonpublic): new function to determine
464         whether an accessor allows a property to be considered non-public.
465         Returns false for private accessor(s) from parent class, and internal
466         accessor(s) from parent on 2.0 profile (and higher).
467         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
468         to determine whether property should be included if NonPublic flag
469         is set. Fixes bug #349078.
470
471 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
472
473         * verify.c (init_stack_with_value): added.
474
475         * verify.c (mono_method_verify): extracted common
476         code for exception initialization into init_stack_with_value.
477
478         * verify.c (mono_method_verify): initialize the exception
479         for handler clauses as well.
480
481         * verify.c (mono_method_verify): fix the exception clause
482         ordering rules, it should use handler end offset and not
483         start offset.
484
485 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
486
487         * rawbuffer.c: remove useless warning.
488
489 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
490
491         * threads.h, threads-types.h: move functions to the correct header
492         (fixes bug#349952).
493
494 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
495
496         * verify.c (mono_method_verify): proper verification
497         of exception handling clauses ranges and fallthru in
498         and out of protected blocks.
499
500 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
501
502         * verify.c (mono_method_verify): fixed compilation issue.
503
504 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
505
506         * verify.c (mono_method_verify): a printf slipped in, changed
507         to use verifier debug macro.
508
509 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
510
511         * verify.c (is_correct_leave): check for filter clauses.
512
513         * verify.c (do_filter): added.
514
515         * verify.c (mono_method_verify): property verification of leave.
516
517
518 2007-12-18  Mark Probst  <mark.probst@gmail.com>
519
520         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
521         Win32 build, until we figure out how to do the proper thing on
522         Win32.
523
524 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
525
526         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
527         by the previous patch.
528         
529         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
530         the assembly resolve handler for refonly assemblies.
531
532 2007-12-17  Mark Probst  <mark.probst@gmail.com>
533
534         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
535         Make sure only one thread is allowed to commence shutdown, and
536         don't allow new threads to be started once shutdown is in
537         progress.
538
539 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
540
541         * verify.c (is_correct_endfilter): added.
542
543         * verify.c (is_unverifiable_endfilter): added.
544
545         * verify.c (do_endfilter): added.
546
547         * verify.c (mono_method_verify): property verification of endfilter
548         and fixed a corner case or endfinally.
549
550 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
551
552         * verify.h: new flags to support fail fast of unverifiable code and
553         do non-strict verification. Non-strict verification is required to
554         have MS runtime compatibility. There are a huge amount of unverifiable
555         code that it accepts as verifiable. The strict mode verifies the code
556         as the specs says.
557         Non-strict mode will be required in cases where code needs to be
558         accepted as verifiable but fails under strict mode.
559
560         * pedump.c: added support to fail fast and non-strict verification.
561
562         * verify.c: added support for both fail fast and non-strict verification.
563
564 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
565
566         * verify.c (is_correct_endfinally): added.
567
568         * verify.c (mono_method_verify): property verification of endfinally.
569
570 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
571
572         * verify.c (in_any_block): check for filter clauses.
573
574         * verify.c (is_correct_rethrow): added.
575
576         * verify.c (mono_method_verify): property verification of rethrow.
577
578         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
579
580 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
581
582         * verify.c (do_throw): added.
583
584         * verify.c (mono_method_verify): property verification of throw
585
586 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
587
588         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
589         assemblies. Fixes #346425.
590
591 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
592
593         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
594         FieldBuilders.
595
596         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
597
598         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
599         prevent asserts when this is called with a token which might not be valid.
600
601         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
602         lookup_dynamic_token_class with valid_token == FALSE.
603
604         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
605
606         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
607
608         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
609         
610 2007-12-10  Mark Probst  <mark.probst@gmail.com>
611
612         * gc.c: Don't delay threadpool thread finalization unless Mono is
613         shutting down.
614
615 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
616
617         * threads.c: turn an assert into a non-fatal warning.
618
619 2007-12-09  Robert Jordan  <robertj@gmx.net>
620
621         * icall.c (GetVirtualMethod): Add missing argument validation.
622
623 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
624
625         * verify.c (do_cast): added.
626
627         * verify.c (mono_method_verify): property verification of castclass and isinst.
628
629
630 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
631
632         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
633
634         * verify.c (do_stelem): added.
635
636         * verify.c (mono_method_verify): property verification of stelem.X.
637
638 2007-12-07  Mark Probst  <mark.probst@gmail.com>
639
640         * class.c, class-internals.h: Introduce an environment variable
641         (MONO_GENERIC_SHARING) through which the extent of generic code
642         sharing can be controlled (share all classes, share only corlib
643         classes, or share nothing).
644
645         * object.c: Only create runtime generic context for classes for
646         which sharing is enabled.
647
648 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
649
650         * verify.c (do_ldelem): refactor it to work with ldelem.any.
651
652         * verify.c (mono_method_verify): property verification of ldelem.any.
653
654 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
655
656         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
657         added ldelem.X opcodes.
658
659         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
660
661         * verify.c: proper verification of ldelem.X 
662
663 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
664
665         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
666
667 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
668
669         * verify.c (mono_method_verify): null literal requires special handling,
670         the value pushed on stack need to be flagged as so.
671
672         * verify.c (do_ldelema): Verify ldelema properly.
673
674 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
675
676         * verify.c: Verify ldlen properly.
677
678 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
679
680         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
681         to the target object's type. Fixes #346160.
682
683 2007-12-05  Dick Porter  <dick@ximian.com>
684
685         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
686         Solaris needs the same workaround as BSD-derived systems.  Fixes
687         bug 323524, patch by Burkhard Linke
688         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
689
690 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
691
692         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
693         handle to use when error dialog is shown; otherwise, update mask
694         to show no error dialog when an error occurs.
695
696 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
697
698         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
699
700         * class.c (mono_class_get_field_default_value): New helper function to initialize
701         field->def_type and field->data.
702
703 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
704
705         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
706         the general one.
707
708         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
709
710         * marshal.c: Avoid depending on delegate->method_info being set.
711
712         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
713         
714         * object.c (mono_delegate_ctor): Set delegate->method.
715
716         * object-internals.h (struct _MonoDelegate): Add 'method' field.
717
718         * appdomain.c: Bump corlib version.
719
720 2007-11-27  Raja R Harinath  <harinath@gmail.com>
721
722         * metadata.c (mono_generic_inst_equal_full): Short-circuit
723         equality check if we're comparing canonicalized MonoGenericInsts.
724
725 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
726
727         * class.c (generic_array_methods): Call mono_class_setup_methods () before
728         accessing class->methods.
729
730 2007-11-22  Dick Porter  <dick@ximian.com>
731
732         * threads.c: Ensure that the synch_cs is set before trying to use
733         it.
734
735 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
736
737         * profiler.c: r89126 broke the statistial profiler, unbreak.
738
739 2007-11-22  Martin Baulig  <martin@ximian.com>
740
741         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
742
743         * mono-debug.c
744         (mono_debug_debugger_version): Bump to 3.
745         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
746         -> mono_debugger_class_initialized().
747
748         * mono-debug-debugger.c
749         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
750
751         * class.c
752         (mono_debugger_start_class_init_func): Removed.
753         (mono_debugger_class_loaded_methods_func): Added.
754         (mono_class_setup_methods): Call it here.
755
756 2007-11-22  Martin Baulig  <martin@ximian.com>
757
758         * mono-debug.c
759         (mono_debug_add_delegate_trampoline): New public method.
760         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
761
762         * mono-debug.h
763         (MonoSymbolTable): Added `global_data_table'.
764         (MonoDebuggerTypeKind): Removed.
765
766 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
767
768         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
769         these methods.
770
771         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
772         
773 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
774
775         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
776
777 2007-11-20  Martin Baulig  <martin@ximian.com>
778
779         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
780
781         * mono-debug-debugger.c
782         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
783         (mono_debugger_remove_breakpoint): Likewise.
784         (mono_debugger_check_breakpoints): Likewise.
785         (mono_debugger_register_class_init_callback): New public method.
786         (mono_debugger_remove_class_init_callback): Likewise.
787         (mono_debugger_add_type): Likewise.
788
789         * mono-debug-debugger.h
790         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
791
792 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
793
794         * class.c: more interface implementations needed for the
795         array enumerator (fixes bug #341112).
796
797 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
798
799         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
800         fix ParamName of ArgumentNullExceptions.
801
802 2007-11-17  Miguel de Icaza  <miguel@novell.com>
803
804         * reflection.c (mono_reflection_encode_sighelper): Generate the
805         modopts and modreqs.   I have a useless test that crashes monodis,
806         but that shows the code working.
807
808 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
809
810         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
811         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
812
813 2007-11-15  Dick Porter  <dick@ximian.com>
814
815         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
816         When joining a thread, it's the thread that's calling Join that
817         gets WaitSleepJoin state not the target.  Fixes the standalone
818         test case in bug 334740, and hopefully the whole bug too.
819
820 2007-11-15  Dick Porter  <dick@ximian.com>
821
822         * process.c: Read file version info from the files pointed at by
823         process modules, not the current process.  Fixes bug 315969.
824
825         Use windows typedef names in some places to fix warnings on the
826         windows build.
827
828 2007-11-15  Mark Probst  <mark.probst@gmail.com>
829
830         * image.c, metadata-internals.h: Added a generic_class_cache hash
831         to MonoImage for looking up generic classes when sharing generics.
832
833 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
834
835         * sgen-gc.c: warning cleanups.
836
837 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
838
839         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
840         inherited properties.
841
842 2007-11-14  Mark Probst  <mark.probst@gmail.com>
843
844         * object.c, class-internals.h: Added more information to the
845         runtime generic context.
846
847 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
848
849         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
850         instead of just the target method. Generalize the abstract method handling to
851         handle any non-static method.
852
853         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
854         mono_marshal_get_delegate_invoke () signature change.
855
856 2007-11-13  Mark Probst  <mark.probst@gmail.com>
857
858         * class.c, class-internals.h: Made
859         mono_type_get_basic_type_from_generic () public.  Fixed member
860         access check for shared generics.
861
862         * loader.c: Don't insert field into field cache if it's part of a
863         non-inflated generic class.
864
865         * domain.c, domain-internals.h: The generic sharing context is now
866         part of the jit info data structure.  Added two accessor
867         functions.
868
869 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
870
871         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
872         the array Get/Set/Address methods, since the JIT inlines them.
873
874         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
875
876         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
877         (mono_image_init): Initialize runtime_invoke_direct_cache.      
878
879         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
880         mono_marshal_get_delegate_invoke signature change.
881
882         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
883         an additional argument. Add support for invoking abstract methods.
884
885         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
886
887         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
888
889 2007-11-09  Mark Probst  <mark.probst@gmail.com>
890
891         * class.c: Do field layout for open generic classes as well.
892
893 2007-11-09  Mark Probst  <mark.probst@gmail.com>
894
895         * gc.c, gc-internal.h: Don't finalize threadpool threads with
896         other objects, because the threadpool is still around.  Put them
897         in a list instead and after finalizing all other objects in the
898         root domain shut down the thread pool and then finalize the
899         threads.  Fixes bug #337383.
900
901         * threads.c, thread-types.h: New mono_thread_create_internal()
902         function for marking a thread with the threadpool flag before it
903         started.  Set synch_cs to NULL after freeing it.
904
905         * threadpool.c: Mark threadpool threads before they start.
906
907 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
908
909         * reflection.h, reflection.c: don't export random functions
910         and lazy load dbnull and missing objects.
911
912 2007-11-07  Jonathan Chambers <joncham@gmail.com>
913
914         * class.c: Initialize COM types if COM interfaces
915         are present (not just COM classes).
916         
917         Code is contributed under MIT/X11 license.
918
919 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
920         * reflection.c:
921         create_dynamic_mono_image: hook module profiler events (dynamic case).
922         mono_image_basic_init: hook assembly profiler events (dynamic case).
923
924 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
925         * profiler.c:
926         simple_appdomain_unload: completely terminate the profiler
927         instead of only processing the statistical samples.
928         simple_shutdown: make sure this is really called exactly once,
929         even in multithreaded applications, and always listen to
930         appdomain events.
931         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
932         here, the "[un]load" functions will do it.
933         Fixes bugs #333791 and #325261.
934
935 2007-11-07  Geoff Norton  <gnorton@novell.com>
936
937         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
938         rather than depend on __APPLE__.
939
940 2007-11-07  Mark Probst  <mark.probst@gmail.com>
941
942         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
943
944 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
945
946         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
947         UTF16 MonoString. Fix the crash from bug #335488
948
949 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
950
951         * marshal.c: Correct (for non-Win32 OS) length != size in 
952         mono_string_from_bstr. Fix #339530.
953
954 2007-11-06  Geoff Norton  <gnorton@novell.com>
955
956         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
957         to succeed
958
959 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
960
961         * process.c: Added run-time GetProcessId API detection for Windows.
962
963 2007-11-04  Miguel de Icaza  <miguel@novell.com>
964
965         * reflection.c  (mono_param_get_objects): If a parameter has the
966         attribute [System.Runtime.InteropServices.Optional] we should
967         set the DefaultValue of the ParameterInfo to be
968         System.Reflection.Missing instead of DBNull.
969
970         See bug #339013.
971
972         (mono_get_reflection_missing_object): New method,
973         returns the System.Reflection.Missing.Value singleton instance.
974
975 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
976
977         * culture-info-table.h : regenerated.
978
979 2007-11-02  Jonathan Chambers <joncham@gmail.com>
980
981         * icall.c: Use GetEnvironmentStrings on windows
982         so we are using the same environment block as 
983         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
984         #333740.
985         
986         Code is contributed under MIT/X11 license.
987
988 2007-10-31  Martin Baulig  <martin@ximian.com>
989
990         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
991
992         * mono-debug-debugger.h
993         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
994
995 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
996
997         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
998         classes.
999
1000 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
1001
1002         * culture-info-table.h : regenerated.
1003
1004 2007-10-30  Robert Jordan  <robertj@gmx.net>
1005
1006         * icall-def.h, icall.c:
1007         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
1008
1009         Code is contributed under MIT/X11 license.
1010
1011 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
1012
1013         * class.c (mono_class_setup_vtable): Find the inflated methods in the
1014         inflated class instead of inflating them again.
1015         
1016         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
1017         dynamic case.
1018
1019         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
1020         Call setup_supertypes () after klass->parent is set.
1021         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
1022
1023         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
1024         for inflated instances of not yet created dynamic generic classes.
1025         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
1026         times from inflated_method.
1027         (methodbuilder_to_mono_method): Ditto.
1028
1029 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
1030
1031         * gc.c: code cleanup and removed old untested option of not creating the
1032         finalizer thread.
1033
1034 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
1035
1036         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
1037         creating a jump trampoline for dynamic methods.
1038
1039 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
1040
1041         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
1042         generic TypeBuilders when called from another method of the same type (bug #335131).
1043
1044
1045 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
1046
1047         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
1048         doesn't seem to work perfectly.
1049         
1050         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
1051         called multiple times.
1052         (methodbuilder_to_mono_method): Ditto.
1053         (resolve_object): Inflate FieldBuilder's.
1054
1055 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1056
1057         * string-icalls.c, string-icalls.h, appdomain.c: patch from
1058         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
1059         RemoveEmptyEntries in the string.Split implementation (bug #322375).
1060
1061 2007-10-26  Dick Porter  <dick@ximian.com>
1062
1063         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
1064         Thread initialisation changes
1065
1066 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
1067
1068         * verify.c: fix compatibility check between arrays and System.Array
1069
1070 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
1071
1072         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
1073         too. Fixes #336999.
1074
1075 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
1076
1077         * object.c (mono_value_box): Use typed allocation here.
1078
1079 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
1080
1081         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
1082         trampoline instead of compiling the method right away.
1083
1084         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
1085
1086 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
1087
1088         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
1089         related fields for dynamic classes. Fixes #334493.
1090
1091 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
1092
1093         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
1094         
1095         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
1096
1097         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
1098         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
1099
1100         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
1101
1102         * reflection.c (create_generic_typespec): Initialize klass->generic_container
1103         if needed.
1104         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
1105
1106 2007-10-18  Jonathan Chambers <joncham@gmail.com>
1107
1108         * marshal.c: Use correct key when removing item
1109         from ccw_hash.
1110         
1111         Code is contributed under MIT/X11 license.
1112
1113 2007-10-17  William Holmes  <billholmes54@gmail.com>
1114
1115         *marshal.c: Adding a case to marshal booleans to U1
1116
1117         Code is contributed under MIT/X11 license.
1118
1119 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
1120
1121         * class.c (mono_class_from_name): Search the modules compromising dynamic
1122         assemblies. Fixes #331601.
1123
1124 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
1125
1126         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
1127         exception if the type name contains an assembly component. Fixes #334203.
1128
1129         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
1130         modules inside dynamic assemblies. Fixes #334200.
1131         
1132         * reflection.c: Set image->public_key and image->public_key_length;
1133
1134         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
1135         fields.
1136
1137         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
1138         
1139 2007-10-16  Mark Probst  <mark.probst@gmail.com>
1140
1141         * metadata.c: Implemented correct comparing of generic classes.
1142         An inflated generic class can be equal to a non-inflated one if it
1143         is inflated with generic type variables as type arguments.  Fixes
1144         bug #333798.
1145
1146 2007-10-15  Dick Porter  <dick@ximian.com>
1147
1148         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
1149         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
1150         81646.
1151
1152         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
1153         instead of a monitor lock.  This means that monitor_try_enter and
1154         co can set the thread state safely.
1155         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
1156         thread_interrupt_requested, so interrupt actually works.
1157
1158         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
1159         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
1160         state accessor function
1161
1162 2007-10-15  Martin Baulig  <martin@ximian.com>
1163
1164         * mono-debug.h
1165         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
1166         the debugger with the current runtime.
1167
1168 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
1169
1170         * object.c, object-internals.h: added the ability to set a single
1171         trampoline for all the slots in a vtable.
1172
1173 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1174
1175         * marshal.c: deal with a possible race condition during multicast
1176         delegate invocation.
1177
1178 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1179
1180         * class.c: ensure value type methods don't have the synchronized
1181         flag set.
1182
1183 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
1184
1185         * string-icalls.c, string-icalls.h: reverted unapproved patch that
1186         breaks the build.
1187
1188 2007-10-11  Joel Reed  <joelwreed@comcast.com>
1189
1190         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
1191         to take an options parameter so that empty entries can be removed during
1192         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
1193
1194 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1195
1196         * marshal.c: make sure we don't store the signature from a dynamic
1197         method into the runtime invoke cache (bug #327189).
1198
1199 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1200
1201         * marshal.c: make sure the wrapper methods are properly initialized.
1202
1203 2007-10-11  Mark Probst  <mark.probst@gmail.com>
1204
1205         * metadata.c, metadata-internals.h: Generalized
1206         mono_type_stack_size() to mono_type_stack_size_internal() which
1207         takes an additional argument specifying whether it allows open
1208         types.
1209
1210 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1211
1212         * verify.c (do_invoke_method): handle typedbyref params
1213         correctly and check for unverifiable return values.
1214
1215         * verify.c (do_newobj): fix a warning.
1216
1217 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1218
1219         * verify.c: don't tread typedbyref as allways unverifable,
1220         so uses, like (ld/st)loc.0 are valid. verify for the cases
1221         that it matters, like boxing related operations.
1222
1223 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1224
1225         * verify.c: add verification of the newobj opcode. verification
1226         of delegate instantation still missing due ldftn and virldftn not
1227         pushing the function type on stack
1228
1229 2007-10-08  Mark Probst  <mark.probst@gmail.com>
1230
1231         * class-internals.h: Runtime generic context data structure
1232         definition.
1233
1234         * object.c: Initialization of runtime generic context at runtime
1235         vtable creation time.
1236
1237 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
1238         * class.c (mono_class_create_from_typedef,
1239         mono_class_from_generic_parameter, mono_ptr_class_get,
1240         mono_fnptr_class_get, mono_bounded_array_class_get)
1241         * domain.c (mono_domain_create, mono_domain_free)
1242         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
1243         * image.c (do_mono_image_load, mono_image_close):
1244         Hooked up load-unload profiler events.
1245
1246 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1247
1248         * domain.c: track statistics about the actual amount of native code
1249         allocated.
1250
1251 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1252
1253         * class.c: the valuetype enumerators don't have the additional
1254         supertypes interfaces.
1255
1256 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1257
1258         * class.c: need more interfaces setup for the IEnumerator<T>
1259         object created for arrays (tests/ienumerator-interfaces.2.cs).
1260
1261 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
1262
1263         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
1264
1265 2007-10-05  Alp Toker  <alp@atoker.com>
1266
1267         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
1268         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
1269         #315863.
1270
1271 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
1272
1273         * verify.c (verify_type_compatibility_full): verification of
1274         compatibility improved, validates correctly non-strict checks between
1275         native int and I4 types different than (unsigned)int32.
1276
1277         * verify.c (do_store_indirect): added, do all verification of
1278         ldind.X opcodes. 
1279
1280         * verify.c (get_load_indirect_mono_type): renamed to
1281         get_indirect_op_mono_type, as it now returns the MonoType for 
1282         ldind.X and stind.X opcodes.
1283
1284 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
1285
1286         * reflection.c: Fix the encoding of generic type definition for
1287         TypeBuilders.
1288
1289         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
1290         mono_image_typedef_or_ref but allows to specify if typespec lookups should
1291         be made. Typespec check is done prior to typeref cache lookup.
1292
1293         * reflection.c (mono_image_typedef_or_ref): now just delegate to
1294         mono_image_typedef_or_ref_full.
1295
1296         * reflection.c (encode_generic_class): encode the generic class
1297         directly instead of calling encode_type.
1298
1299         * reflection.c (encode_type): encode the generic type definition
1300         MonoClass as a generic instantiation.
1301
1302         * reflection.c (create_typespec): cache typespec tokens in
1303         the assembly->typespec cache. Don't create typespec for a generic
1304         instance MonoClass. Create typespec for the generic type defintion.
1305
1306         * reflection.c (create_generic_typespec): encode the generic
1307         class directly instead of calling encode_type.
1308
1309         * reflection.c (mono_image_create_token): encode the generic
1310         type definition not using a typespec for MonoType instances.
1311
1312
1313 2007-10-04  Raja R Harinath  <rharinath@novell.com>
1314
1315         Fix #328812
1316         * class.c (mono_image_init_name_cache): Don't return nested
1317         'protected internal' classes.
1318         (mono_class_from_name_case): Likewise.
1319
1320 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
1321
1322         * icall-def.h, icall.c : get_bundled_machine_config() is now the
1323           common function used by both DefaultConfig in System.dll and
1324           InternalConfigurationHost in System.Configuration.dll.
1325
1326 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1327
1328         * class.c: automatically add to vectors only a few essential explicit
1329         generic interfaces. The rest of the interfaces that arrays should
1330         provide are currently implicitly added (but still not lazily, see the
1331         design in the discussion of bug#325495 for the details of what is
1332         needed for that). Additionally, implicit interfaces are assigned the
1333         same vtable slot as the explicit interfaces (as they are compatible):
1334         this enables huge memory savings since we don't need to instantiate
1335         as many memthods and as large vtables anymore. Also, Since
1336         GetEnumerator<T> returns an instance of a type that is required to
1337         support a similarly large set of interfaces as arrays, we add
1338         implicit interfaces and interface offset sharing support to those
1339         types, too. This change adds all the required interfaces so that
1340         the anonarray.cs test case in the bug report works (we don't add
1341         all the interfaces to arrays of arrays 3-level deep and more because
1342         of the memory requirements explained in the bug and since they are much
1343         less common: the lazy-loading support will enabled them to work, too).
1344
1345 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
1346
1347         * verify.c (merge_stacks): major clean up, all type compatibility
1348         checks are done by verify_type_compatibility. This fix my earlier lack
1349         of understanding of the CLR type system and merge_stacks no longer looks
1350         scary.
1351
1352         * verify.c: fixed some bad spelling.
1353
1354 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
1355
1356         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
1357         a given stack slock.
1358         
1359         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
1360         verify_type_compatibility_full. This removed a near indentical function and fixed
1361         handling of Int32 and IntPtr across all opcodes.
1362
1363 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1364
1365         * class.c: only vectors have the additional generic interfaces.
1366
1367 2007-10-01  Jonathan Chambers <joncham@gmail.com>
1368
1369         * mono-config.c: Use g_strcasecmp instead of
1370         strcasecmp like everywhere else to fix
1371         compilation with MSVC.
1372         
1373         Code is contributed under MIT/X11 license.
1374
1375 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1376
1377         * object.c, object-internals.h: refactored the IMT code to enable
1378         building a single slot at a time and lazily creating the IMT trampolines
1379         and thunks.
1380
1381 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
1382
1383         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
1384
1385         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
1386         Fixes #328501.
1387         
1388 2007-09-29  Raja R Harinath  <harinath@gmail.com>
1389
1390         * loader.c (method_from_methodspec): Rearrange to avoid
1391         un-necessary exposition.  Don't assert out if the method's
1392         declaring type is a generic type definition.
1393
1394 2007-09-28  Martin Baulig  <martin@ximian.com>
1395
1396         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
1397
1398 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
1399
1400         * class-internals.h: optimize field layout of MonoClass to
1401         requires less cachelines at runtime and save a few bytes on 64 bit
1402         systems.
1403
1404 2007-09-28  Jb Evain  <jbevain@novell.com>
1405
1406         * reflection.c: when encoding type names in custom attributes,
1407         if the type is a closed generic type, its generic arguments
1408         have to be serialized as AssemblyQualifiedName, so that when
1409         they are deserialized, it's possible to re-create them properly.
1410         Fixes #329450.
1411
1412
1413 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1414
1415         * object.c, class-internals.h: added delegate-creation counter.
1416
1417 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1418
1419         * class.c: cleanup of the code that synthetizes interfaces for
1420         arrays in 2.0: saves quit a bit of corlib mempool memory.
1421         Code to fix bug #325495 ifdeffed out for now until the issues
1422         with memory usage and O(n^2) behaviour are fixed.
1423
1424 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1425
1426         * marshal.c: when possible, do not duplicate the name of the methods
1427         in the method builder and in the generated MonoMethod.
1428
1429 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
1430         * verify.c: added support for type checking ldind_* opcodes.
1431
1432 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
1433
1434         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
1435         which is used to distinguish the fully open instantiation of a TypeBuilder
1436         with the rest. This temporary hack is required to restore the property that
1437         the fully open instantiation is the same type of the generic type definition.
1438
1439         * class-internals.h (mono_generic_class_is_generic_type_definition):
1440         new function as part of the internal API.
1441
1442         * class.c (inflate_generic_type): return NULL when the generic inst is
1443         fully open. The fully open generic type is now the same as the generic type
1444         definition for non TypeBuilder types.
1445
1446         * class.c (mono_generic_class_get_class): removed assert since it is
1447         no longer valid, gklass->cached_class can point to the generic type definition.
1448
1449         * class.c (mono_generic_class_is_generic_type_definition): new.
1450
1451         * metadata.c (mono_generic_class_hash): added is_tb_open field
1452         to the hash calculation.
1453
1454         * metadata.c (free_generic_class): if the generic class is associated
1455         with the generic type definition, its field will come from the mempool and
1456         must not be freed.
1457
1458         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
1459         new, this function identifies the corner case of a TypeBuilder fully open
1460         instantiation.
1461
1462         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
1463         for lookup. Set gclass->cached_class to be the container class in case of
1464         the fully open instantiation of non TypeBuilder types.
1465
1466         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
1467         to compare generic classes.
1468
1469         * reflection.c (method_encode_methodspec): remove assert that
1470         no longer is valid.
1471
1472         * reflection.c (mono_reflection_generic_class_initialize): add
1473         an aditional assert to ensure the proper type is used.
1474
1475 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
1476
1477         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
1478         to enjoy it.
1479
1480 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
1481
1482         * verify.c (push_arg): Fixed support for ldarga
1483         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
1484         MonoType used as first arg in case of instance calls.
1485
1486 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
1487
1488         * verify.c: Support for verifying VAR and MVAR types, 
1489
1490 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
1491
1492         * icall.c (ves_icall_get_property_info): Set the reflected type of the
1493         accessors correctly.
1494
1495 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
1496
1497         * threads.c: support OSX and other systems in
1498         mono_thread_get_stack_bounds (bug #328026).
1499
1500 2007-09-25  Martin Baulig  <martin@ximian.com>
1501
1502         * mono-debug.h
1503         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
1504
1505 2007-09-24  Martin Baulig  <martin@ximian.com>
1506
1507         * mono-debug.h
1508         (MonoDebugClassEntry): Moved the definition of this struct into
1509         mono-debug.c to make it private.
1510
1511         * mono-debug.c
1512         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
1513         type table per symbol file, we don't need to store the symfile id
1514         any longer.
1515
1516 2007-09-24  Martin Baulig  <martin@ximian.com>
1517
1518         Create one type table per symbol file, since a `MonoClass *' gets
1519         invalid when its image is unloaded.
1520
1521         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
1522         (MonoDebugHandle): Added `type_table'.
1523
1524 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
1525
1526         * mempool.c, mempool.h: added mono_mempool_new_size () API
1527         to be able to specify a smaller initial size for the pool.
1528         Adjusted the code to slowly increase pool size before using
1529         the previous default size.
1530         * image.c: use a small initial size for image mempools.
1531
1532 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
1533
1534         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
1535         Fixes ##320990.
1536
1537         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
1538         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
1539
1540 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
1541
1542         * metadata.c (mono_type_create_from_typespec): Remove an invalid
1543         free. Fixes #327438.
1544
1545 2007-09-21  Raja R Harinath  <harinath@gmail.com>
1546
1547         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
1548         generic instantiations, etc.
1549         <MONO_TYPE_ARRAY>: Likewise.
1550
1551 2007-09-21  Martin Baulig  <martin@ximian.com>
1552
1553         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
1554         these structs were never defined.
1555         (MonoDebugHandle): Removed the `_priv' field, it was never used.
1556
1557 2007-09-21  Martin Baulig  <martin@ximian.com>
1558
1559         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
1560
1561 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
1562
1563         * image.c: removed the guid hash tables: we can get the same info
1564         without the additional memory usage hit (partially fixes also bug #327052).
1565
1566 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
1567
1568         * profiler.h, profiler-private.h, profiler.c: add a new profiler
1569         event to handle unloading methods. After the event is called, the
1570         corresponding MonoMethod* must be considered invalid.
1571         * loader.c (mono_free_method): call the new mono_profiler_method_free
1572         event.
1573
1574 2007-09-20  Mark Probst  <mark.probst@gmail.com>
1575
1576         * domain-internals.h: New flag in MonoJitInfo which marks shared
1577         generic methods.  New hash table (shared_generics_hash) in
1578         MonoDomain to keep track of shared generic methods.  Prototypes
1579         for functions to register and lookup shared generic methods.
1580
1581         * domain.c: Support for registering and looking up shared generic
1582         methods via a hash table (shared_generics_hash) in MonoDomain.
1583
1584         * class-internals.h: New exception to signal failure of shared
1585         compilation of a generic method.  New counters for generics
1586         sharing in MonoStats.
1587
1588 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
1589
1590         * image.c, metadata-internals.h: don't keep a file descriptor open
1591         for loaded assemblies (bug#325988).
1592
1593 2007-09-19  Raja R Harinath  <rharinath@novell.com>
1594
1595         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
1596         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
1597         use the corresponding datatypes.
1598         (type_in_image): Update to changes.
1599         (CleanForImageUserData): Simplify.
1600         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
1601         Avoid quadratic behaviour in handling the "stolen" list by
1602         separating the filter predicate out, and by prepending the stolen
1603         items rather than appending them.
1604         (steal_ginst_in_image): Likewise.
1605         (mono_metadata_clean_for_image): Update to changes.
1606
1607 2007-09-19  Martin Baulig  <martin@ximian.com>
1608
1609         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
1610
1611 2007-09-19  Martin Baulig  <martin@ximian.com>
1612
1613         * mono-debug.c (mono_debug_cleanup): Don't call
1614         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
1615
1616 2007-09-19  Raja R Harinath  <harinath@gmail.com>
1617
1618         Fix crash on 'make run-test' in mcs/errors
1619         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
1620         Avoid more potential allocations in mono_class_from_mono_type.
1621         (ginst_in_image): Update to changes.
1622         (gclass_in_image): Rearrange slightly.
1623
1624 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
1625
1626         * class.c (mono_class_init): Move the code that sets up class->methods to 
1627         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
1628
1629         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
1630         canonical instance of an inflated generic signature.
1631         (mono_type_create_from_typespec): Remove an invalid free.
1632
1633         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
1634
1635 2007-09-18  Marek Habersack  <mhabersack@novell.com>
1636
1637         * domain-internals.h: added a declaration of the
1638         mono_assembly_load_full_nosearch internal function.
1639
1640         * assembly.c (mono_assembly_load_with_partial_name): use
1641         mono_try_assembly_resolve return value properly.
1642         (mono_assembly_load_full_nosearch): copied the function body from
1643         mono_assembly_load_full, without the code to invoke assembly
1644         search hooks.
1645         (mono_assembly_load_full): calls the above new function and if the
1646         assembly is not resolved, invokes the search hooks.
1647
1648         * appdomain.c (mono_runtime_init): restore the global postload
1649         assembly search handlers.
1650
1651 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
1652
1653         * class.c (mono_class_init): Make sure class->methods and class->properties
1654         are never NULL in the generics case.
1655
1656         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
1657
1658 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
1659
1660         * metadata.c (free_generic_class): Disable some code to fix the build.
1661
1662         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
1663
1664         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
1665         from the image mempool.
1666
1667         * metadata.c (free_generic_class): Free more data from the inflated class.
1668
1669         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
1670
1671         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
1672         mempool.
1673         (mono_type_create_from_typespec): Ditto.
1674
1675         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
1676         MonoImage to the caller.
1677         (mono_init_internal): Save the opened image in a global variable.
1678         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
1679
1680         * reflection.c (resolve_object): Fix a leak.
1681
1682         * metadata.c: Fix the freeing of data in the generics caches.
1683         
1684         * metadata.c (free_generic_inst): Comment this out to fix the build.
1685         (free_generic_class): Ditto.
1686
1687         * metadata.c: Free cached generic methods, instantinations and classes when
1688         they are removed from the caches.
1689         (mono_metadata_free_type): Free the type itself.
1690
1691         * class.c: Free the result of mono_class_inflate_generic_type () in a few
1692         places.
1693
1694 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1695
1696         * boehm-gc.c: restrict managed allocs to __thread supporting
1697         architectures.
1698
1699 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
1700
1701         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
1702         (mono_generic_class_get_class): Fix a leak.
1703
1704         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
1705         mono_metadata_free_type ().
1706         (mono_metadata_inflate_generic_inst): Fix a leak.
1707
1708 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1709
1710         * mono-debug.c (free_header_data): Fix a leak missed earlier.
1711
1712         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
1713         mempool.
1714
1715         * mono-debug.c (mono_debug_close_image): Fix call to 
1716         g_hash_table_remove ().
1717
1718 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1719
1720         * icall-def.h: redirect all the string ctor to the managed
1721         CreateString () methods.
1722         * string-icalls.c, string-icalls.h: removed dead code for string
1723         ctors and icalls.
1724
1725 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1726
1727         * mono-debug.c: Fix memory leaks.
1728
1729 2007-09-14  Jonathan Chambers <joncham@gmail.com>
1730
1731         * threads-types.h: Implement mono_hazard_pointer_set and 
1732         mono_hazard_pointer_clear macros using do/while(0) to fix
1733         compilation with MSVC.
1734         
1735         Code is contributed under MIT/X11 license.
1736
1737 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1738
1739         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
1740         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
1741
1742 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1743
1744         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
1745         icalls.
1746
1747 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1748
1749         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
1750         managed-code allocated as well.
1751
1752 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * class.c (mono_class_is_assignable_from): Add support for generic variance.
1755
1756 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
1757
1758         * boehm-gc.c: fixed the build after the AOT changes.
1759
1760 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
1761
1762         * wrapper-types.h: Add an ALLOC wrapper type.
1763
1764         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
1765         reference managed allocator methods.
1766
1767 2007-09-12  Marek Safar  <marek.safar@gmail.com>
1768
1769         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
1770         of Type array and not MonoType, a fix suggested by Hari.
1771         
1772 2007-09-12  Jonathan Chambers <joncham@gmail.com>
1773
1774         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
1775         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
1776         
1777         Code is contributed under MIT/X11 license.
1778
1779 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
1780
1781         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
1782
1783 2007-09-12  Marek Habersack  <mhabersack@novell.com>
1784
1785         * image.c (do_mono_image_open): if assembly file fails to open and
1786         MONO_IOMAP is in effect, try to find the path in a
1787         case-insensitive way.
1788
1789         * appdomain.c (mono_runtime_init): do not install postload hooks -
1790         tests show that MS.NET doesn't use anything of that sort to
1791         trigger the AppDomain.AssemblyResolve event.
1792         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
1793         made non-static.
1794         (mono_runtime_init): init portability helpers here.
1795
1796         * assembly.c (mono_assembly_load_with_partial_name): if other   
1797         attempts fail, trigger the AppDomain.AssemblyResolve event handler
1798         to resolve the assembly.
1799
1800         * domain-internals.h: added mono_try_assembly_resolve and marked
1801         it as internal.
1802
1803 2007-09-11  Jb Evain  <jbevain@novell.com>
1804
1805         * object-internals.h (MonoReflectionDynamicMethod): add
1806         a `MonoReflectionType *owner` field. The owner is used
1807         * reflection.c:
1808         (mono_reflection_create_dynamic_method): use the owner of the dynamic
1809         method as the class declaring the dynamic method.
1810         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
1811         dynamic method to the declaring type of the methodbuilder.
1812
1813 2007-09-11  Mark Probst  <mark.probst@gmail.com>
1814
1815         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
1816         rules for calling methods via reflection.
1817
1818 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
1819
1820         * reflection.c (resolve_object): Add support for MonoGenericClass. 
1821         Inflate MonoType's.
1822
1823 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
1824
1825         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
1826         provide a managed method that does fast allocations without needing
1827         a managed->unmanaged transition. Boehm GC implementation currently
1828         enabled for ptrfree objects on sane architectures.
1829
1830 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1831
1832         * marshal.c, marshal.h: exported a couple of useful functions and
1833         added mono_mb_get_label () to easily handle backward branches.
1834
1835 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
1836
1837         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
1838
1839 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
1840
1841         * loader.c (find_method): Fixed the regression introduced while
1842         fixing bug #81466.
1843
1844 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
1845
1846         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
1847         well.
1848         
1849         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
1850         icall.c reflection.c: Pass a MonoGenericContext argument to 
1851         mono_lookup_dynamic_token ().
1852
1853         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
1854         #82744.
1855         
1856 2007-09-09  Robert Jordan  <robertj@gmx.net>
1857
1858         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
1859         for generic methods.
1860
1861         * object.c (mono_object_get_virtual_method): Handle generic methods.
1862         Fixes bug #78882.
1863
1864         Code is contributed under MIT/X11 license.
1865
1866 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
1867
1868         * image.c: fix locking in mono_image_load_file_for_image ().
1869
1870 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
1871
1872         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
1873         used only as a cache: added an icall to fill it.
1874
1875 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
1876
1877         * reflection.h: exposed mono_reflection_free_type_info
1878         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
1879         since mono_reflection_bind_generic_parameters makes a copy of it.
1880         * reflection.c (free_type_info): subinfos should be freed.
1881         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
1882         made non static.
1883         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
1884         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
1885         this fixes #82695 and #81726.
1886    
1887
1888 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
1889
1890         * process.h, process.c:  added support for user profile/info in
1891           ProcessStartInfo. For now only Windows works.
1892
1893 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1894
1895         * metadata.c: consider the generic arguments when comparing
1896         signatures (bug #82614).
1897
1898 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1899
1900         * cil-coff.h, image.c: updated assembly loader to cope with the
1901         PE32+ 64 bit file format.
1902
1903 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1904
1905         * assembly.c, class.c, domain.c, loader.c: remove useless
1906         inclusion of cil-coff.h.
1907
1908 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
1909
1910         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
1911         if interface is marked with CoClassAttribute. 
1912    
1913         Code is contributed under MIT/X11 license.
1914
1915 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1916
1917         * sgen-gc.c: ensure no object from the to space is copied again or finalized
1918         if it's seen twice in major collections.
1919
1920 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1921
1922         * sgen-gc.c: big objects are not copied to the gray area, but they
1923         need to be considered for scanning, too, if they are brought alive
1924         by an object ready for finalizations or a survived one.
1925
1926 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1927
1928         * sgen-gc.c: properly account the number of disappearing links when
1929         they are nullified.
1930
1931 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1932
1933         * sgen-gc.c: share the code to scan the registered roots between the
1934         different types of collections.
1935
1936 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
1937
1938         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
1939
1940 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
1941
1942         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
1943         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
1944
1945 2007-08-28  Mark Probst  <mark.probst@gmail.com>
1946
1947         * security-manager.c (mono_security_manager_get_methods):
1948         LinkDemandSecurityException now has 2 arguments instead of 3.
1949
1950 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
1951
1952         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
1953         platforms which need it.
1954
1955 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
1956
1957         * sgen-gc.c: unregister thread data structures with a pthread_key_t
1958         dtor.
1959
1960 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1961
1962         * threads.c: free the thread static data on thread exit.
1963
1964 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
1965
1966         * class.c: walk the hierarchy to find the generic definition for
1967         a class (fixes runtime part of bug #82498).
1968
1969 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
1970
1971         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
1972         ...
1973
1974         * image.c (mono_image_close): Here. Hopefully fixes #82510.
1975
1976 2007-08-24  Mark Probst  <mark.probst@gmail.com>
1977
1978         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
1979
1980 2007-08-24  Robert Jordan  <robertj@gmx.net>
1981
1982         * appdomain.c: don't perform the ':'->';' substitution on Win32.
1983
1984 2007-08-24  Jb Evain  <jbevain@novell.com>
1985
1986         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
1987         for byref types.
1988
1989 2007-08-24  Mark Probst  <mark.probst@gmail.com>
1990
1991         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
1992         #82286.
1993
1994 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
1995
1996         * assembly.c: Fix a warning.
1997         
1998 2007-08-23  Marek Habersack  <mhabersack@novell.com>
1999
2000         * appdomain.c: parse the <runtime> section looking for the probing
2001         element with the 'privatePath' attribute, which sets additional
2002         directories in which the runtime should look for assemblies.
2003
2004 2007-08-23  Robert Jordan  <robertj@gmx.net>
2005
2006         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
2007         Fixes #82499.
2008
2009 2007-08-23  Martin Baulig  <martin@ximian.com>
2010
2011         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
2012         _mono_debug_init_corlib() and remove it from the header file.
2013
2014 2007-08-23  Martin Baulig  <martin@ximian.com>
2015
2016         * mono-debug-debugger.c
2017         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
2018         don't notify the debugger about it.
2019
2020         * mono-debug-debugger.h
2021         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
2022
2023 2007-08-23  Robert Jordan  <robertj@gmx.net>
2024
2025         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
2026         Code is contributed under MIT/X11 license.
2027
2028 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2029
2030         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
2031
2032 2007-08-22  Martin Baulig  <martin@ximian.com>
2033
2034         * mono-debug.c: Store debugging info on a per-domain basis and
2035         free it on domain unload.  Add support for unloading symbol files.
2036
2037         * mono-debug.h
2038         (MonoDebugList): New typedef.
2039         (MonoSymbolTable):
2040         - add `data_tables and `type_table'.
2041         - replace 'symbol_files' and `num_symbol_files' with a
2042           `MonoDebugList *'.
2043         (mono_debug_data_table): Removed.
2044         (mono_debug_list_add): New public function.
2045         (mono_debug_list_remove): New public function.
2046         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
2047         (mono_debug_init_2_memory): Renamed into
2048         mono_debug_open_image_from_memory().
2049         (mono_debug_close_image): New public function.
2050         (mono_debug_domain_create): Likewise.
2051         (mono_debug_domain_unload): Likewise.
2052         (MONO_DEBUGGER_VERSION): Bump to 60.
2053
2054         * mono-debug-debugger.h
2055         (MonoDebuggerEvent):
2056         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
2057         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
2058         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
2059         - rename `THREAD_CREATED' and `THREAD_EXITED' into
2060           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
2061         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
2062           meaning.
2063         (mono_debugger_add_symbol_file): Removed.
2064         (mono_debugger_add_type): Removed.
2065         (mono_debugger_lookup_type): Removed.
2066         (mono_debugger_lookup_assembly): Removed.
2067
2068         * domain.c
2069         (mono_domain_create): Call mono_debug_domain_create().
2070         (mono_init_internal): Call mono_debug_init_corlib().
2071
2072         * assembly.c
2073         (mono_assembly_close): Call mono_debug_close_image().
2074
2075 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2076
2077         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
2078         mmap call.
2079
2080 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
2081
2082         * sgen-gc.c: ensure section->pin_queue_end is initialized
2083         correctly when non pinning objects in the section have been found.
2084
2085 2007-08-22  Marek Habersack  <mhabersack@novell.com>
2086
2087         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
2088         containing a list of directories separated by ':'. MSDN docs say
2089         the directories should be separated with ';'. Part of a bugfix for
2090         bug #81446
2091
2092 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
2093
2094         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
2095         it should MonoType and not MonoClass.
2096
2097 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
2098
2099         * culture-info-table.h : regenerated.
2100
2101 2007-08-20  William Holmes  <billholmes54@gmail.com>
2102
2103         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
2104          to call ReplaceFile Kernel32 on windows or in io-layer.
2105         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
2106         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
2107          as an internal call.
2108
2109         Code is contributed under MIT/X11 license.
2110
2111 2007-08-20  Jb Evain  <jbevain@novell.com>
2112
2113         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
2114         and MONO_EXCEPTION_FIELD_ACCESS.
2115
2116         * debug-helpers.[c|h]: new mono_field_full_name function.
2117
2118 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2119
2120         * class.c: Removed class_security_level() and moved it to
2121         security-core-clr.c.
2122
2123         * security-core-clr.c, security-core-clr.h: class_security_level()
2124         is now public and renamed to mono_security_core_clr_class_level().
2125         It also looks for security attributes in the classes a class is
2126         nested in.
2127
2128 2007-08-20  Mark Probst  <mark.probst@gmail.com>
2129
2130         * security-core-clr.c, security-core-clr.h: CoreCLR security
2131         utility functions.
2132
2133         * Makefile.am: Added security-core-clr.[ch].
2134
2135         * security-manager.c, security-manager.h: Functions and enum for
2136         setting and getting the security mode.
2137
2138         * class.c: CoreCLR security checks.
2139
2140 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2141
2142         * icall-def.h, process.c, process.h: implemented icall to get
2143         user/system processor times.
2144
2145 2007-08-17  Mark Probst  <mark.probst@gmail.com>
2146
2147         * domain.c, threads.c, class-internals.h, domain-internals.h: New
2148         reader-lock-free jit_info_table.
2149
2150 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
2151
2152         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
2153
2154         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
2155
2156         * object-internals.h (MonoException): Add missing _data member.
2157
2158 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
2159
2160         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
2161         checking that only methods with matching qname or fqname are picked
2162         from implemented interfaces.
2163
2164 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
2165
2166         * verify.c (do_newarr):added, do type verification of
2167         newarr ops, push the right value on the eval stack.
2168         * verify.c (mono_method_verify): use do_newarr
2169
2170
2171 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
2172
2173         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
2174         factored the common code into get_boxable_mono_type, which
2175         is now using mono_type_get_full, this fixed byref related tests.
2176
2177 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
2178
2179         * class.c: added mono_type_get_full, this function has the same
2180         behavior of mono_class_get_full but the returned MonoType has
2181         all metadata of the associated token in case of a typespec token.
2182         * class.c: added mono_type_retrieve_from_typespec, used by 
2183         mono_type_get_full to retrieve the token type.
2184         * class.c (mono_class_create_from_typespec): changed to use
2185         mono_type_retrieve_from_typespec.
2186         * class.c (mono_ldtoken): changed to use mono_type_get_full
2187         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
2188         * class-internals.h: exported mono_type_get_full for internal use.
2189
2190 2007-08-16  Jb Evain  <jbevain@novell.com>
2191
2192         * domain.c (supported_runtimes): add entry for
2193         the 'moonlight' runtime version.
2194
2195 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2196
2197         * verify.c (mono_method_verify): small typo sliped in.  
2198
2199 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2200
2201         * verify.c (do_unbox_value): added, do type verification of
2202         unboxing ops
2203         * verify.c (mono_method_verify): use do_unbox_value
2204
2205
2206 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2207
2208         * verify.c (dump_stack_value): fixed typo, was printing string
2209         instead of object on stack.
2210         * verify.c (do_box_value): moved the byref check up as it leads
2211         to invalid code and should be done earlier.
2212         * verify.c: improved error messages for and ldobj
2213
2214 2007-08-15  William Holmes  <billholmes54@gmail.com>
2215
2216         * marshal.c (emit_marshal_custom): Omit the call to 
2217           marshal_native_to_managed when calling native to managed 
2218           and the argument is specified as an out argument.
2219
2220         Code is contributed under MIT/X11 license.
2221
2222 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2223
2224         * verify.c: fixed the type checks for generics, function pointers and vectors.
2225         Added type verification for ldobj and ldtoken. The verifier
2226         would segfault if header or signature of a method contained references
2227         to non-existant types.
2228
2229 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
2230
2231         * marshal.c (cominterop_get_ccw): Patch from
2232         Bill Holmes to no walk up interface hierarchy. 
2233         All parent methods should be present in the interface for COM.
2234    
2235         Code is contributed under MIT/X11 license.
2236
2237 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
2238
2239         * marshal.c (emit_marshal_com_interface): Patch from
2240         Bill Holmes to handle COM Interfaces as return values
2241         for native->managed calls.
2242    
2243         Code is contributed under MIT/X11 license.
2244
2245 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
2246
2247         * marshal.c (cominterop_get_idispatch_for_object): Implement
2248         for runtime callable wrappers.
2249    
2250         Code is contributed under MIT/X11 license.
2251
2252 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
2253
2254         * pedump.c (main): changed from mono_init to mono_init_from_assembly
2255         so 2.0 types are accessible
2256
2257
2258 2007-08-13  Miguel de Icaza  <miguel@novell.com>
2259
2260         * domain.c (mono_init_internal): Call mono_assembly_load_friends
2261         once we load mscorlib.   Due to the order in which we initialize,
2262         the mono_assembly_load_full routine that loads mscorlib did not
2263         load friends.   We now load it once we load the
2264         mono_defaults.internals_visible_class class. 
2265
2266         * assembly.c: Expose the mono_load_friend_assemblies method.
2267
2268 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
2269
2270         * verify.c: improved the handling of boxing, better
2271         type checking for unary ops and conversion. Fix bug
2272         regarding managed pointer compatibility checking
2273
2274 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2275
2276         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
2277
2278         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
2279
2280 2007-08-09  Raja R Harinath  <rharinath@novell.com>
2281
2282         * reflection.c (dup_type): Remove.
2283         * class.c (dup_type): Remove.
2284         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
2285         instead of the dodgy 'dup_type'.
2286         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
2287         handle the case where 'dup_type' needed the second argument.
2288
2289 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2290
2291         * domain.c: Fix a warning.
2292
2293 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
2294
2295         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
2296         checking that methods with the same fqname are not overridden
2297         with a method from an ancestor.
2298
2299 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
2300
2301         * threads.c (free_thread_static_data_helper): Avoid a crash if
2302         thread->static_data is not yet set.
2303
2304 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
2305
2306         * marshal.c: Use correct image when emitting
2307         native wrapper for COM calls.
2308    
2309         Code is contributed under MIT/X11 license.
2310
2311 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
2312
2313         * icall-def.h, security.c, security.h :
2314           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
2315
2316 2007-08-07  Martin Baulig  <martin@ximian.com>
2317
2318         * mono-debug-debugger.h
2319         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
2320
2321         * domain.c (mono_domain_free): Call
2322         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
2323
2324 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2325
2326         * verify.c (check_underflow, check_overflow): error message now returns IL offset
2327         * verify.c (in_same_block): code should test if either offset is inside the clauses
2328         * verify.c (mono_method_verify): push the exception into the eval stack of exception
2329         and filter blocks
2330
2331 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
2332
2333         * image.c (mono_image_close): Fix a leak.
2334
2335         * object.c (mono_runtime_invoke_array): Avoid using alloca.
2336
2337         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
2338
2339 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2340
2341         * domain.c, threads.c, threads-types.h: fix memory retention issue
2342         with thread static variables not being cleared on domain unload.
2343         Reuse thread static slots after domain unload.
2344
2345 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
2346
2347         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
2348         nullable type.
2349
2350         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
2351         now done in mono_runtime_invoke_array.
2352
2353         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
2354         receiver is a nullable type.
2355
2356         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
2357         generic parameter.
2358
2359 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
2360
2361         * marshal.c: Implement COM Objects as return type for 
2362         managed->unmanaged calls. Added Release calls for COM Object
2363         out/return values in managed->unmanaged calls.
2364
2365         Code is contributed under MIT/X11 license.
2366
2367 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2368
2369         * threads.h, threads-type.h: move the hazard pointer declarations
2370         to the private header.
2371
2372 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2373
2374         * file-io.c, appdomain.c: memory leak fixes.
2375
2376 2007-08-02  Dick Porter  <dick@ximian.com>
2377
2378         * socket-io.c
2379         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
2380         SO_REUSEADDR setting into io-layer/sockets.c.
2381
2382 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
2383
2384         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
2385         from Object when called on a generic parameter. Fixes #82211.
2386
2387 2007-08-01  Dick Porter  <dick@ximian.com>
2388
2389         * file-io.c (convert_share): Test FileShare values bit-by-bit.
2390         Fixes bug 79250 yet again.
2391
2392 2007-07-30  Martin Baulig  <martin@ximian.com>
2393
2394         Merged the `debugger-dublin' branch.
2395
2396         * mono-debug.h
2397         (MonoDebugDataTable): New typedef.
2398         (MonoDebugMethodAddressList): New typedef.
2399         (MonoDebugWrapperData): Removed.
2400         (MonoDebugSymbolTable): Removed `current_data_table',
2401         `current_data_table_size', `current_data_table_offset'.
2402         (MonoDebugDataItemType): Moved into mono-debug.c.
2403         (MonoDebugMethodJitInfo): Remove `address'.
2404         (mono_debug_data_table): New global variable.
2405         (mono_debug_lookup_method_addresses): New public function.
2406         (mono_debug_find_method): Take a `MonoMethod *', not a
2407         `MonoDebugMethodInfo *'.
2408
2409         * mono-debug.c: Drop support for the old symbol tables.
2410
2411 2007-06-28  Martin Baulig  <martin@ximian.com>
2412
2413         * mono-debug.c (mono_debug_debugger_version): New public variable.
2414
2415 2007-07-31  William Holmes  <billholmes54@gmail.com>
2416
2417         * metadata.c Changed mono_type_create_from_typespec to not insert
2418           the type into the hash map until after
2419           do_mono_metadata_parse_type has completed.
2420         Fixes Bug #82194
2421         Code is contributed under MIT/X11 license.
2422
2423 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
2424
2425         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
2426         generic parameter. Fixes #82211.
2427
2428 2007-07-27  Jb Evain  <jbevain@novell.com>
2429
2430         * pedump.c (dump_metadata, dump_metadata_header): dump
2431         versions contained in the metadata header.
2432
2433 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2434
2435         * threads.c: register small_id_table with the GC.
2436
2437 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2438
2439         * threads.c, threads.h, class-internals.h, object-internals.h:
2440         Hazard pointers, to be used by lock-free parallel algorithms.
2441
2442 2007-07-26  Dick Porter  <dick@ximian.com>
2443
2444         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
2445         routine on non-windows platforms, as I've not managed to think of
2446         a non-kludgy way of doing this.  Finishes off bug 78739.
2447
2448 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2449
2450         * object.c: properly setup interface_bitmap in proxy vtables.
2451
2452 2007-07-25  Marek Habersack  <mhabersack@novell.com>
2453
2454         * appdomain.c (get_shadow_assembly_location): do not use TickCount
2455         to create unique shadow copy target directories, use the domain's
2456         serial number instead. Each domain gets a unique target directory
2457         that way.
2458
2459         * domain.c (mono_domain_create): added code to increment domain
2460         shadow copy serial number and cache the value in the current
2461         domain structure.
2462
2463         * domain-internals.h (struct _MonoDomain): added a new field -
2464         shadow_serial to hold the serial number used in generation of
2465         shadow-copy directories. This is to make sure that the directory
2466         name is unique for each and every domain created. We avoid a race
2467         condition with overriding assemblies already in use by other app
2468         domains.
2469
2470 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
2471
2472         * class.c (mono_bounded_array_class_get): fixed memory leak when 
2473         binding generic parameters.
2474
2475 2007-07-24  Raja R Harinath  <rharinath@novell.com>
2476
2477         * metadata.c (do_mono_metadata_parse_generic_class): Use
2478         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
2479         error.
2480
2481 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2482
2483         * loader.c, class-internals.h, reflection.c: removed the per-method
2484         generics hashtable: we use the global one through the call of
2485         mono_class_inflate_generic_method ().
2486
2487 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2488
2489         * class.c, metadata.c, class-internals.h: introduce yet another
2490         generics global cache for inflated methods (fixes 98% of the perf
2491         issue in bug #81806).
2492
2493 2007-07-23  Raja R Harinath  <rharinath@novell.com>
2494
2495         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
2496         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
2497         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
2498         return a MonoGenericInst containing (a copy) of those types.
2499         (mono_metadata_inflate_generic_inst): Update to changes.
2500         (mono_metadata_parse_generic_inst): Likewise.
2501         (mono_get_shared_generic_inst): Likewise.
2502         * reflection.c (mono_class_bind_generic_parameters): Likewise.
2503         (mono_reflection_bind_generic_method_parameters): Likewise.
2504         * metadata-internals.h: Likewise.
2505         * icall.c (free_generic_context): Kill.
2506         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
2507
2508         * reflection.c (reflection_methodbuilder_to_mono_method): Use
2509         mono_metadata_type_dup.
2510         * marshal.c (mono_mb_create_method): Likewise.
2511
2512         * metadata.c (mono_metadata_type_dup): Rename from
2513         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
2514         MonoImage.  Handle a few more cases, esp. when no mempool is given.
2515         * marshal.c, metadata-internals.h: Update to changes.
2516
2517 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
2518
2519         * class.c: fixed a small leak for array classes and removed warning.
2520
2521 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2522
2523         * loader.c (mono_method_get_param_token): Make this work on generic methods.
2524         Return 0x8000000 for return parameters. Fixes #82161.
2525
2526 2007-07-21  Marek Habersack  <grendello@gmail.com>
2527
2528         * appdomain.c (get_shadow_assembly_location): append the current
2529         ticks value to the path. Avoids overwriting the same assemblies by
2530         several threads at the same time.
2531
2532 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
2533         and Raja R Harinath  <rharinath@novell.com>
2534
2535         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2536         Simplify slightly.
2537         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
2538         property for testing if a method is a generic method definition.
2539
2540 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
2541
2542         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
2543
2544 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2545
2546         * verify.c: used function from private branch, reverted to the one in class.h 
2547
2548 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2549
2550         * verify.c: a typo slipped in and the code wont compile
2551
2552 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2553
2554         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
2555         disabled box instruction as it is doing the wrong thing
2556         improved stack dump messages, now it is easier to debug type related issues
2557
2558
2559 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
2560
2561         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
2562
2563 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2564
2565         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
2566         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
2567         grouped with class and valuetype. This change will simply 
2568         the code as it should be handled just like unmanaged pointers.
2569
2570 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2571
2572         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
2573
2574 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2575
2576         * verify.c: several stack merge issues fixed, reference comparisons now
2577         check the type size. strict type check now works correctly.
2578         added more uses of IS_MANAGED_POINTER macro.
2579         fixed issues pointed by running the test suite against .net.
2580         
2581
2582 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2583
2584         * class.c, loader.c, class-internals.h: Removed the
2585         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
2586         defines.
2587
2588         * icall.c: Better error checking in some internal reflection
2589         methods.
2590
2591 2007-07-18  William Holmes  <billholmes54@gmail.com>
2592
2593         * filewatcher.c : removed unused variable 'filename' in 
2594           ves_icall_System_IO_FSW_SupportsFSW
2595
2596 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2597
2598         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
2599         obsolete, removed.
2600
2601 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
2602
2603         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
2604         
2605         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
2606
2607 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
2608
2609         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
2610         Implement generics support.
2611         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2612
2613         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
2614         type_args and method_args arguments.
2615         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
2616         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2617         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
2618
2619 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
2620
2621         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
2622           It adds a rootimage parameter to mono_reflection_get_type_internal,
2623           adds new function mono_reflection_get_type_with_rootimage and use
2624           the rootimage to resolve the types instead of the current image
2625
2626 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
2627
2628         * culture-info-table.h: Forgot to update after r78304.
2629
2630 2007-07-13  Raja R Harinath  <rharinath@novell.com>
2631
2632         * class.c (mono_class_is_open_constructed_type)
2633         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
2634
2635 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
2636
2637         * class.c (mono_bounded_array_class_get):  method fails if used with
2638         an incomplete TypeBuilder enum (no basetype field), fixed it by 
2639         avoiding calculating the size for such array as it cannot be instantiated.
2640         Fix bug #82015
2641
2642 2007-07-12  Raja R Harinath  <rharinath@novell.com>
2643
2644         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
2645         field.
2646         * metadata.c, reflection.c: Update to changes.
2647
2648 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
2649
2650         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
2651         mono_class_is_valid_enum, they are used to valide a enum when loading.
2652         * reflection.c: used new functions to throw TypeLoadException when and
2653         invalid enum is build with TypeBuilder. Fixes #82018
2654   
2655 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
2656
2657         * object.c: forgot commit of mono_class_setup_methods () to access
2658         iface->methods.
2659         * object-internals.h: added a few more handy fields to
2660         MonoIMTCheckItem.
2661
2662 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2663
2664         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
2665         iface->methods.
2666
2667 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
2668
2669         * class-internals.h, object-internals.h, object.c: IMT-based
2670         interface invocation core from Massimiliano Mantione
2671         (massi@ximian.com) with a reworked arch-specific interface,
2672         bsearch implementation and a few bugfixes and memory savings by me.
2673
2674 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
2675
2676         * class.c (mono_class_create_from_typedef): mono would segfault if 
2677         an enum did not have a __value field. It now throws a TypeLoadException
2678         for such cases. Fix bug #82022
2679
2680 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2681
2682         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
2683
2684 2007-07-09  Mark Probst  <mark.probst@gmail.com>
2685
2686         * class.c (mono_class_init): If a class is already inited but has
2687         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
2688
2689 2007-07-09  Mark Probst  <mark.probst@gmail.com>
2690
2691         * class.c: Properly handle the case of an unimplemented interface
2692         method.  Fixes: 81673.
2693
2694 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
2695
2696         * class-internals.h, object.c: cleanup patch from massi: use
2697         MonoVTable->interface_bitmap since the vtable interfaces offset array
2698         is going away.
2699
2700 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2701
2702         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
2703         GetMDStreamVersion icall instead.
2704
2705 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2706
2707         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
2708         not use mono_dl_build_path() with a full library name: makes
2709         fallbacks to libgaim and libfam work.
2710
2711 2007-07-06  William Holmes  <billholmes54@gmail.com>
2712
2713         * assembly.c: Added a continue statement in probe_for_partial_name when
2714          parse_assembly_directory_name fails.  Fixes : 82002
2715
2716 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
2717
2718         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
2719         and added a verification  for TYPEDBYREF.
2720         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
2721         make native int interchangeable with int32 and some small cleanup and formating.
2722         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
2723         handle byref of byref.
2724         * verify.c (push_local): handle byref of byref.
2725         * verify.c (do_binop): invalid mix of values is unverifiable
2726         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
2727         added visibility checks
2728         * verify.c (field related method): added visibility checks
2729         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
2730
2731 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
2732
2733         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
2734         string.
2735
2736 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
2737
2738         * profiler.c (mono_profiler_load): Fix an off-by-one error.
2739
2740         * marshal.c (emit_marshal_string): When returning a string from managed code,
2741         allways make a copy even for unicode strings. Fixes #81990.
2742
2743 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
2744
2745         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
2746         of byref generic inst types (bug #81997).
2747
2748 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
2749
2750         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
2751         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
2752
2753 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
2754
2755         * marshal.c (emit_marshal_string): Add support for unicode strings in
2756         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
2757
2758 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
2759
2760         * verify.c: field load/store are now verified, missing only access checks now
2761
2762 2007-06-28  Martin Baulig  <martin@ximian.com>
2763
2764         * mono-debug.c (mono_debug_debugger_version): New public variable.
2765
2766 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
2767
2768         * locales.c: When constructing DateTimeFormat or NumberFormat for
2769         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
2770         MonoCultureInfo contructed from the current locale is always
2771         read-only and has UseUserOverride set to true. All MonoCultureInfo
2772         instances returned for GetCultures have both IsReadOnly and
2773         UseUserOverride set to true. Fixes part of bug #81930.
2774
2775 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
2776
2777        * icall-def.h: Update System.__ComObject icalls
2778        * marshal.c: Avoid managed transition (and object creation)
2779        when looking up COM interface in RCW.
2780        * marshal.h: Ditto.
2781        
2782        Code is contributed under MIT/X11 license.
2783
2784 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
2785
2786         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
2787         to avoid crashes during assembly unloading.
2788
2789 2007-06-22  Raja R Harinath  <rharinath@novell.com>
2790
2791         Fix MethodInfo.IsGenericMethodDefinition
2792         * reflection.c (mono_reflection_bind_generic_method_parameters):
2793         Rearrange code to ensure we always uses a generic method definition.
2794         * class.c (mono_class_inflate_generic_method_full): Set
2795         'generic_container' field only for generic method definitions.
2796         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2797         Use presense of 'generic_container' field as indication of being a
2798         generic method definition.
2799
2800 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
2801
2802         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2803
2804         * object-internals.h: Reflect changes in the layout of the managed Delegate
2805         class.
2806         
2807         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
2808         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
2809         runtime memory used by the dynamic method. Fixes #77146.
2810
2811 2007-06-21  Dick Porter  <dick@ximian.com>
2812
2813         * file-io.h: 
2814         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
2815         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
2816         81767.
2817
2818 2007-06-21  Raja R Harinath  <rharinath@novell.com>
2819
2820         * reflection.c (method_encode_methodspec): Add a tripwire.
2821         * class.c (inflate_generic_type): The fully open generic type is
2822         not the same as the generic type definition.
2823
2824 2007-06-21  Martin Baulig  <martin@ximian.com>
2825
2826         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
2827
2828         * mono-debug-debugger.h
2829         (MonoDebuggerBreakpointInfo): Removed.
2830         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
2831         (mono_debugger_remove_breakpoint): Likewise.
2832         (mono_debugger_breakpoint_callback): Likewise.
2833         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
2834
2835 2007-06-21  Raja R Harinath  <rharinath@novell.com>
2836
2837         * metadata.c (mono_metadata_lookup_generic_class): The fully open
2838         generic type is not the same as the generic type definition.
2839         * class.c (mono_generic_class_get_class): Likewise.
2840
2841 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
2842
2843         * icall.c: The second argument to 
2844         System.Reflection.MethodBase.GetMethodFromHandleInternalType
2845         is a MonoType not a MonoClass.
2846
2847 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
2848
2849         * verify.c: support for function pointers in the verifier
2850
2851 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
2852
2853         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
2854
2855 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2856
2857         * assembly.c: removed Mono.Data.SqliteClient from the list of
2858         forward-compatible assemblies as it breaks the ABI (bug #81899).
2859
2860 2007-06-19  Raja R Harinath  <rharinath@novell.com>
2861
2862         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
2863         lookup/update with the loader lock.
2864         * reflection.c (mono_class_bind_generic_parameters): No need to
2865         protect mono_metadata_lookup_* with the loader lock.
2866         * class.c (inflate_generic_type): Likewise.
2867         
2868         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
2869         on a generic instantiated type.
2870
2871 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
2872
2873         *verify.c: produce meanfull error messages on verification error
2874         *verify.c: fixed some cases of verification errors reported as validation errors
2875         *pedump.c: fixed the error name array, now it shows validation errors properly
2876         *verify.h: fixed the contant that should be used for verification errors
2877
2878 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2879
2880         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
2881         for bug #77596, 81858 and 80743 (generics data structures on domain
2882         unload).
2883
2884 2007-06-15  Raja R Harinath  <rharinath@novell.com>
2885
2886         Avoid allocating 'MonoGenericContext' on the heap.
2887         * class-internals (_MonoMethodInflated::context): Make field
2888         inline, not a pointer.
2889         * loader.c (method_from_methodspec): Allocate 'new_context' on the
2890         stack.  Use the context embedded within the inflated method as the
2891         hash key, rather than 'new_context'.
2892         * class.c (inflate_generic_context): Simplify.  Return a struct
2893         rather than allocating on the heap.
2894         (mono_class_inflate_generic_method_full): Update to changes.  Now,
2895         doesn't salt away a copy of the context -- simplifying the
2896         lifetime rules of a 'MonoGenericContext *'.
2897         (mono_method_get_context): Return pointer to embedded context.
2898         (setup_generic_array_ifaces): Allocate temporary context on stack.
2899         * reflection.c (inflate_mono_method): Likewise.
2900         (mono_reflection_bind_generic_method_parameters): Likewise.
2901         Use the context embedded within the inflated method as the hash key.
2902
2903         Avoid a source of allocation of 'MonoGenericContext'.
2904         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
2905         and 'cached_context' fields into embedded 'MonoGenericContext' field.
2906         * class.c: Update to changes.
2907         (mono_generic_class_get_context): Simplify drastically.  Now just
2908         returns a pointer to the field.
2909         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
2910         argument as a const pointer.
2911         (mono_metadata_generic_context_equal): Likewise.
2912         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
2913         Update to changes.
2914
2915 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
2916
2917         * verify.c improved the handling of brtrue/brfalse, factored out common code
2918
2919 2007-06-14  Raja R Harinath  <rharinath@novell.com>
2920
2921         Kill MonoGenericMethod.
2922         * class-internals.h (MonoGenericContext::method_inst): Rename from
2923         'gmethod' and convert to a MonoGenericInst.
2924         (MonoGenericMethod): Remove.
2925         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
2926         * loader.c (method_from_methodspec): Update to changes.  Use a
2927         MonoGenericContext as the key to the hashtable.
2928         * metadata.c (mono_metadata_generic_context_equal): Rename from 
2929         'mono_metadata_generic_method_equal' and take MonoGenericContext.
2930         (mono_metadata_generic_context_hash): Likewise from
2931         'mono_metadata_generic_method_hash'.  Change hash function.
2932         (mono_metadata_load_generic_params): Update to changes.
2933         (mono_get_shared_generic_method): Remove.
2934         * metadata-internals.h (mono_get_shared_generic_method): Remove.
2935         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
2936         (inflate_generic_context): Likewise.
2937         (mono_class_inflate_generic_method_full): Likewise.
2938         (setup_generic_array_ifaces): Likewise.
2939         (mono_class_create_from_typespec): Likewise.
2940         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
2941         (method_encode_methodspec): Update callsite.
2942         (reflection_methodbuilder_to_mono_method): Update to changes.
2943         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
2944         MonoGenericContext as the key to the hashtable.
2945         (inflate_mono_method): Update to changes.
2946
2947         * class-internals.h (MonoGenericMethod::container): Remove.
2948         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
2949
2950 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2951
2952         * profiler-private.h, profiler.c, profiler.h: added API to profile
2953         exception events.
2954
2955 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
2956
2957         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
2958
2959 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
2960
2961         * verify.c: method invocation is now validated, now we verify parameter types on stack.
2962         Fixed overflow and underflow not aborting the verification process.
2963
2964 2007-06-13  Mark Probst  <mark.probst@gmail.com>
2965
2966         * class-internals.h (MonoStats): Added stats entries for dynamic
2967         code allocations.
2968
2969 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
2970
2971         * loader.c (mono_free_method): Free header->locals and header->clauses.
2972
2973         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
2974         dynamic case.
2975
2976         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
2977
2978         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
2979
2980 2007-06-12  Raja R Harinath  <rharinath@novell.com>
2981
2982         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
2983         the tables.
2984
2985 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
2986
2987         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
2988
2989 2007-06-11  Raja R Harinath  <harinath@gmail.com>
2990
2991         MonoGenericMethod on a diet
2992         * class-internals.h (_MonoMethodInflated::reflection_info): Move
2993         here ...
2994         (_MonoGenericMethod::reflection_info): ... from here.
2995         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
2996         Update to changes.
2997         * reflection.c (inflate_mono_method): Likewise.
2998         (mono_reflection_bind_generic_method_parameters): Likewise.
2999
3000 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
3001
3002         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
3003         *verify.c: factored long ldarg forms to share code with short forms
3004
3005 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
3006
3007         *verify.c: fixed code formating factored some duplicate code
3008         into a new function
3009
3010         *verify.h: fixed binary incompatibility introduced earlier
3011
3012         *pedump.c: fixed formating
3013
3014 2007-06-11  Raja R Harinath  <harinath@gmail.com>
3015
3016         Fix assertion when disassembling Mono.C5.dll
3017         * loader.c (method_from_methodspec): Avoid inflating a method
3018         twice with the same context.  If the methodref is inflated, use
3019         the declaring method instead.
3020
3021         * class.c (mono_class_from_generic_parameter): Fix case similar to
3022         bug #81830 handled below, but for method containers.
3023
3024 2007-06-10  Raja R Harinath  <harinath@gmail.com>
3025
3026         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
3027         get_shared_generic_class.  Directly inflate the instance.
3028         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
3029         (inflate_generic_class): Delete.
3030         (get_shared_generic_class): Delete.  Move setting of
3031         'cached_class' and 'cached_context' ...
3032         * metadata.c (mono_metadata_lookup_generic_class): ... here.
3033
3034         * metadata.c (mono_metadata_lookup_generic_class): Change
3035         signature to take the components of a MonoGenericClass rather than
3036         an allocated MonoGenericClass.  Change semantics to be intern-like.
3037         * reflection.c (mono_class_bind_generic_parameters): Update to
3038         changes.  Make locking region tighter.
3039         * class.c (inflate_generic_class): Update to changes.
3040         (get_shared_generic_class): Likewise.
3041         * metadata-internals.h: Likewise.
3042
3043         * reflection.c (mono_class_bind_generic_parameters): Take and
3044         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
3045         (mono_reflection_bind_generic_parameters): Use
3046         'mono_class_bind_generic_parameters' rather than duplicate the code.
3047         * class.c (mono_bounded_array_class_get): Update to changes.
3048         * object-internals.h: Likewise.
3049
3050         * reflection.c (mono_class_bind_generic_parameters): Only support
3051         parameterizing generic type definitions.  Remove support for other
3052         open types.
3053
3054 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
3055
3056         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
3057
3058         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
3059         in the dynamic case.
3060
3061 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
3062
3063         * threads.c: When cleaning up thread, reset the Background bit.
3064         Fixes bug #81720.
3065
3066 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
3067
3068        * metadata.c: Move variable declarations to top of scope.
3069        * verify.c: Move variable declarations to top of scope.
3070
3071        Code is contributed under MIT/X11 license.
3072
3073 2007-06-08  Raja R Harinath  <rharinath@novell.com>
3074
3075         * reflection.c (mono_class_bind_generic_parameters): Replace
3076         open-coded loop with mono_metadata_inflate_generic_inst.
3077
3078         * class.c (get_shared_generic_class): Don't call
3079         mono_get_shared_generic_inst.  Use the container's own
3080         'class_inst'.
3081
3082         * metadata.c (mono_metadata_load_generic_params): Move
3083         initialization of 'context' field here from ...
3084         * class.c (mono_class_create_from_typedef): ... here, and ...
3085         * loader.c (mono_get_method_from_token): ... here.
3086
3087         * class.c (get_shared_generic_class): Rename from
3088         mono_get_shared_generic_class and make static.
3089         (mono_get_shared_generic_inst): Move to metadata.c.
3090         * loader.c (mono_get_shared_generic_method): Likewise.
3091         * class-internals.h, metadata-internals.h: Update to changes.
3092
3093         Fix #81830
3094         * class.c (mono_class_from_generic_parameter): Don't assume a
3095         generic container owner exists.  Generic containers from monodis
3096         don't have any.
3097
3098 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
3099
3100         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
3101         * verify.h: new typedefs to returns the non-verifiable status
3102         * verify.c: initial implementation of generics, stack merging and object compatibility check
3103
3104 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3105
3106         * class.c, image.c, class-internals.h (MonoImage): class_cache is
3107         a MonoInternalHashTable again (fixed bug in internal hash table
3108         code).
3109
3110 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3111
3112         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
3113         MonoInternalHashTable again (fixed bug in internal hash table
3114         code).
3115
3116 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3117
3118         * class.c, image.c, class-internals.h, domain.c,
3119         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
3120         changes.  Have to figure out what makes them break the SWF
3121         regression.
3122
3123 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3124
3125         * class.c, image.c, class-internals.h (MonoImage): class_cache is
3126         a MonoInternalHashTable now.
3127
3128 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3129
3130         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
3131         MonoInternalHashTable now.
3132
3133 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
3134
3135         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
3136         invoke_impl code.
3137
3138         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
3139
3140         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
3141         dependent trampoline.
3142
3143         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3144
3145         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
3146
3147 2007-05-29  Robert Jordan  <robertj@gmx.net>
3148
3149         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
3150
3151 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
3152
3153         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
3154
3155 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
3156
3157        * marshal.c: Fix interface lookup loops for
3158        cominterop_get_com_slot_for_method and 
3159        cominterop_get_method_interface. Only need to lookup
3160        if type is a class, else use interface type method is on.
3161
3162        Code is contributed under MIT/X11 license.
3163
3164 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
3165
3166         * reflection.c: HasSecurity can be present even if no specially 
3167         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
3168         SecurityAttribute). Fix CAS regression tests on buildbot.
3169
3170 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
3171
3172        * appdomain.c: Add configure checks for header files.
3173        * image.c: Add configure checks for header files.
3174        * file-io.c: Add configure checks for header files.
3175        * debug-mono-symfile.c: Add configure checks for header files.
3176        * threadpool.c: Add configure checks for header files.
3177        * console-io.c: Add configure checks for header files.
3178        * profiler.c: Add configure checks for header files.
3179        * rawbuffer.c: Add configure checks for header files.
3180        * icall.c: Add configure checks for header files.
3181        * rand.c: Add configure checks for header files.
3182        * socket-io.c: Add configure checks for header files.
3183
3184        Code is contributed under MIT/X11 license.
3185
3186 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
3187
3188         * reflection.c (mono_custom_attrs_from_builders): Remove the 
3189         assertion as it breaks the build.
3190         
3191         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
3192
3193         * reflection.c (lookup_custom_attr): Make a copy here too.
3194
3195         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
3196         dynamic images.
3197
3198         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
3199         images.
3200
3201         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
3202         info.
3203
3204 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3205
3206         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
3207         (load_cattr_value): Ditto.
3208
3209 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
3210
3211         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
3212
3213 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
3214
3215         * threads.c: In "start_wrapper", set apartment_state to MTA if
3216         apartment_state is Unknown and we're running on 2.0 profile or
3217         higher.
3218         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
3219         to main method, then set apartment_state to Unknown on 1.0 profile,
3220         and MTA on 2.0 profile.
3221
3222 2007-05-16  Jb Evain  <jb@nurv.fr>
3223
3224         * class-internals.h (MonoDefaults): Add an attribute_class and
3225           customattribute_data_class.
3226         * domain.c (mono_init_internal): Populate them.
3227         * reflection.c: Use them to remove duplicates. Make a vew
3228         MonoClass variables `static'.
3229
3230 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3231
3232         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
3233         step in implementing IMT, so that all isinst checks now can go
3234         through the bitmap.
3235         This was needed because vtables for TransparentProxy need to look
3236         like the vtable of the "target" class, so they need to point to
3237         its interface bitmap directly.
3238
3239         * object.c: inside "mono_class_create_runtime_vtable" and
3240         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
3241
3242 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
3243
3244         * object-internals.h
3245           culture-info.h : added territory field in MonoCulture and
3246           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
3247         * locales.c : fill territory field above too.
3248         * culture-info-table.h : regenerated.
3249
3250 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3251
3252         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
3253         Fixes #81599.
3254
3255 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
3256
3257         * object.c: Always initialize apartment, even if 
3258         there is no custom attributes on entry point.
3259         
3260         Code is contributed under MIT/X11 license.
3261
3262 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
3263
3264         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
3265         * metadata.c: If no encoding is set, check for unicode
3266         on class.
3267         
3268         Code is contributed under MIT/X11 license.
3269
3270 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
3271
3272         * threads.c: Handle if mono_thread_current returns NULL 
3273         
3274         Code is contributed under MIT/X11 license.
3275
3276 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
3277
3278         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
3279         in start_wrapper. Added mono_thread_init_apartment_state and
3280         mono_thread_cleanup_apartment_state.
3281         * object.c: Initialize thread apartment state on main thread
3282         by checking for STAThreadAttribute on entry point.
3283         * object-internals.h: Add apartment_state field to MonoThread.
3284         * threads-types.h: Add unmanaged definition of 
3285         System.Threading.ApartmentState, MonoThreadApartmentState.
3286         
3287         Code is contributed under MIT/X11 license.
3288         
3289 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
3290
3291         * class.c: Fix windows build.
3292         * class-internals.h: Fix windows build.
3293         
3294         Code is contributed under MIT/X11 license.
3295
3296 2007-05-08  Robert Jordan  <robertj@gmx.net>
3297
3298         * process.c (CreateProcess_internal):
3299         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
3300         .CreateNoWindow was specified. Fixes #81496.
3301
3302 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3303
3304         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
3305         step in implementing IMT, replaced it with two compact arrays
3306         (interfaces_packed and interface_offsets_packed) and a bitmap that
3307         is used for isinst checks (interface_bitmap).
3308
3309         * class.c: (compare_interface_ids): compare function to pass to
3310         bsearch when looking for an interface with a given id.
3311         (mono_class_interface_offset): reimplemented using bsearch on
3312         interfaces_packed, getting the offset from interface_offsets_packed.
3313         (print_implemented_interfaces): utility debugging function.
3314         (setup_interface_offsets): reworked to initialize interfaces_packed,
3315         interface_offsets_packed and interface_bitmap.
3316
3317         * object.c: replaced all accesses to "MonoClass.interface_offsets"
3318         with uses of interfaces_packed and interface_offsets_packed.
3319
3320 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3321
3322         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
3323         mono_class_interface_offset prototype to wrap all accesses to
3324         "MonoClass.interface_offsets".
3325
3326         * class.c: Implemented mono_class_interface_offset, and wrapped all
3327         accesses to "MonoClass.interface_offsets".
3328
3329         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
3330         "MonoClass.interface_offsets".
3331
3332 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
3333
3334         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
3335         GetMethodFromHandle overloads (bug #78637).
3336
3337 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3338
3339         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
3340         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
3341
3342 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
3343
3344         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
3345         #81498.
3346
3347         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
3348         gracefully.
3349         (mono_custom_attrs_from_index): Ditto.
3350
3351         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
3352         Fixes #81501.
3353
3354 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3355
3356         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
3357         is now allocated from a mempool.
3358
3359 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
3360
3361         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
3362         caller holds threads_lock, leading to deadlocks. Fixes #81476.
3363
3364 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3365
3366         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
3367         mono_loader_clear_error () too late. Fixes #81463.
3368
3369 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
3370
3371         * culture-info-table.h : regenerated.
3372
3373 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3374
3375         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
3376         is missing.
3377
3378 2007-04-25  Dick Porter  <dick@ximian.com>
3379
3380         * Makefile.am: Put the mingw enforced-optimisation back into the
3381         PLATFORM_WIN32 section.
3382
3383 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3384
3385         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
3386         patch.
3387
3388         * image.c (mono_image_load_module): New API function to load a module reference.
3389
3390         * image.c (load_modules): Load modules lazily. Fixes #80812.
3391
3392         * class.c (mono_class_from_typeref): Use mono_image_load_module.
3393         
3394         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
3395
3396         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
3397         to mono_image_load_module_dynamic.
3398
3399 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
3400
3401         * marshal.c: Fix calling convention for CCW on non-windows
3402         platforms. STDCALL on windows, CDECL everywhere else to work 
3403         with XPCOM and MainWin COM.
3404         
3405         Code is contributed under MIT/X11 license.
3406
3407 2007-04-23  Martin Baulig  <martin@ximian.com>
3408
3409         Fix #80969.
3410
3411         * loader.c
3412         (method_from_memberref): Added `gboolean *used_context' argument.
3413         (mono_get_method_from_token): Likewise.
3414         (mono_get_method_full): Don't insert the method in the cache when
3415         `used_context' is true.
3416
3417 2007-04-23  Raja R Harinath  <rharinath@novell.com>
3418
3419         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
3420
3421         * reflection.c (mono_reflection_bind_generic_parameters): Don't
3422         create new MonoTypes for returned types.
3423         * class.c (mono_generic_class_get_class): Export mono-internal.
3424         * class-internals.h: Update to changes.
3425
3426 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
3427
3428         * threadpool.c, threadpool.h, icall-def.h: patch from
3429         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
3430
3431 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
3432
3433         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
3434         
3435         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
3436
3437         * threads.c (mono_thread_get_stack_bounds): New helper function.
3438
3439         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
3440         Correctly compute stack bounds when attaching. Fixes #81394.
3441
3442 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
3443
3444         * reflection.c: fix handling of doubles in custom attributes
3445         for the arm-fpa format (bug #81368).
3446
3447 2007-04-18  Raja R Harinath  <rharinath@novell.com>
3448
3449         * reflection.c (assembly_add_win32_resources): Mildly relax an
3450         bounds check to let the end pointer point just past the end of the
3451         allocated buffer.  (may fix #81384)
3452
3453 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
3454
3455         * culture-info-table.h : regenerated.
3456
3457 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
3458
3459         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
3460         the thread is aborted early.
3461
3462 2007-04-05  Dick Porter  <dick@ximian.com>
3463
3464         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
3465         FindFirstFile()/FindNextFile() to find entries.  This lets the
3466         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
3467         81038.
3468
3469         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
3470         the parameters of
3471         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
3472
3473 2007-04-04  Martin Baulig  <martin@ximian.com>
3474
3475         * debug-helpers.c
3476         (mono_method_desc_full_match): Add support for nested classes.
3477
3478 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
3479
3480         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
3481
3482 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
3483
3484         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
3485         waiting for too many threads.
3486
3487 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
3488
3489         * environment.c: Fix return value check on uname so we can get the 
3490         executing version on Solaris operating systems.
3491
3492 2007-03-28  Jb Evain  <jbevain@gmail.com>
3493
3494         * class.c (mono_type_get_name_recurse): Complete the
3495         fix for the creation of assembly qualified names for
3496         pointer types. Fixes #81208.
3497
3498 2007-03-27  Dick Porter  <dick@ximian.com>
3499
3500         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
3501         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
3502         changed.
3503
3504         * threads.c
3505         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
3506         the value of ReleaseMutex().
3507
3508 2007-03-27  Dick Porter  <dick@ximian.com>
3509
3510         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
3511         in little-endian order, not network endian, so must be converted
3512         to host endian here.  Fixes bug 80593.
3513
3514 2007-03-22  Jb Evain  <jbevain@gmail.com>
3515
3516         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
3517         qualified names for pointer types. Fixes #81208.
3518
3519 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
3520
3521         * marshal.c: Add support for PreserveSigAttribute. 
3522         
3523         Code is contributed under MIT/X11 license.
3524
3525 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
3526
3527         * process.c: Fix endianness issues. Fixes #81126.
3528
3529         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
3530         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
3531
3532         * image.c (mono_image_lookup_resource): Make this work on big-endian
3533         machines.Change API contract so the caller needs to free the return value.
3534         
3535         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
3536         API change.
3537         
3538 2007-03-14  Martin Baulig  <martin@ximian.com>
3539
3540         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
3541         mono_type_get_desc() as well.
3542
3543 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3544
3545         * icall.c:  Fix environ access in VS.  
3546         
3547 2007-03-13  Alp Toker  <alp@atoker.com>
3548
3549         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
3550         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
3551         #63841.
3552
3553 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
3554
3555         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
3556         circular references among dynamic methods. Fixes #81091.
3557
3558         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
3559
3560 2007-03-09  Martin Baulig  <martin@ximian.com>
3561
3562         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
3563
3564 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
3565
3566         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
3567         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
3568         
3569         Code is contributed under MIT/X11 license.
3570         
3571 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
3572
3573         * loader.c: Reapply patch for bug #79424.
3574
3575 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3576
3577         * metadata.c (mono_type_to_unmanaged): Only convert object to
3578         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
3579
3580 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
3581
3582         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
3583         (and incorrectly set) is_reference field from MonoGenericInst.
3584
3585 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3586
3587         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
3588         a little earlier.
3589
3590         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
3591
3592         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
3593
3594 2007-03-05  Miguel de Icaza  <miguel@novell.com>
3595
3596         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
3597         FileOptions.1 value to mean "temporary", map that to
3598         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
3599
3600         Fixes 80688
3601
3602 2007-03-03  Marek Habersack  <mhabersack@novell.com>
3603
3604         * appdomain.c: implement MS .Net style shadow copying. Copies of
3605         the assemblies are made in a subdirectory of the dynamic base
3606         directory, the assembly names are preserved.
3607         Copy .mdb and .config files along with the assemblies being shadowed.
3608
3609 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
3610
3611         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
3612         (emit_marshal_handleref): Ditto.
3613
3614         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
3615         on Visual C++. Fixes #80671.
3616
3617 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3618
3619         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
3620         for clone operations.
3621
3622 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
3623
3624         * marshal.c: Fix warnings.
3625
3626 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
3627
3628         * loader.c: allow case-insensitive matching of the dll name
3629         in dllmap handling when prefixed with "i:".
3630
3631 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
3632
3633         * threads.c: Fix #ifdef for dummy_apc function for VS.
3634
3635 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3636
3637         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
3638
3639 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
3640         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
3641         giving precedence to the methods with a fully qualified name
3642         (InterfaceName.MethodName) when building the interface sections
3643         of the vtable.
3644
3645 2007-02-16  Dick Porter  <dick@ximian.com>
3646
3647         * threadpool.c (append_job): Fix fast-path array handling, so it's
3648         less likely the array will grow exponentially when the load is
3649         heavy.
3650
3651 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3652
3653         * metadata-internals.h, loader.c: fix dllmap lookup order
3654         for non-function maps, too, and prepare for fallback code.
3655
3656 2007-02-12  Robert Jordan  <robertj@gmx.net>
3657
3658         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
3659         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
3660         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
3661         GlobalFree. Fixes a part of bug #77075.
3662
3663 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
3664
3665         * loader.c: implemented typedef parent in field memberref.
3666
3667 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
3668
3669         * marshal.c: Fix warnings and remember to call Release on
3670         IUnknown of RCW.
3671         
3672         Code is contributed under MIT/X11 license.
3673
3674 2007-02-10  Miguel de Icaza  <miguel@novell.com>
3675
3676         * class-internals.h: Add MonoHandleRef definition, and
3677         handleref_class to mono_defaults. 
3678
3679         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
3680         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
3681
3682         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
3683         (do nothing on this stage)
3684         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
3685         (emit_marshal_handleref): New method, used for argument handling
3686         of HandleRefs. 
3687
3688 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
3689
3690         * class.c (mono_class_setup_parent): Lazily init com types.
3691         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
3692         init com types.
3693         * object.c (mono_remote_class_vtable): Lazily init com types.
3694         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
3695         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
3696         * domain-internals.h: Expose mono_init_com_types.
3697         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
3698         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
3699         Add support for COM Callable Wrapper marshalling.
3700         * marshal.h: Add icall definitions.
3701         * gc.c: Handle freeing of CCWs in finalizer code.
3702         
3703         Code is contributed under MIT/X11 license.
3704
3705 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
3706
3707         * reflection.c: changed all the signature encoding code to use
3708         a variable-sized buffer.
3709
3710 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3711
3712         * marshal.c: locking fixes: never take the loader lock
3713         or other runtime locks when holding the marshal lock
3714         (fixes bug#80664).
3715
3716 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
3717
3718         * marshal.c: make the delegate function pointer mapping
3719         work for the moving GC.
3720
3721 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
3722
3723         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
3724         for bug #80618.
3725
3726 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3727
3728         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
3729         gmodule.
3730
3731 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3732
3733         * threadpool.c: made the code moving-GC safe.
3734
3735 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
3736
3737         * assembly.c, boehm-gc.c, class-internals.h, class.c,
3738         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
3739         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
3740         warning cleanup.
3741         * reflection.c: warning cleanup, some threading and moving GC fixes.
3742
3743 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
3744
3745         * class.c, loader.c: create the needed Set/Get/Address array methods
3746         as well as the .ctors in mono_class_init (), fixes bug #80567.
3747
3748 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3749
3750         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
3751         we doesn't decrease its alignment. Should fix the sparc build.
3752
3753 2007-01-24  Dick Porter  <dick@ximian.com>
3754
3755         * socket-io.c
3756         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3757         Create the returned object if we need to ignore an unsupported
3758         socket option.  Fixes a segfault reported by Atsushi.
3759
3760 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3761
3762         * class.c, object.c: restrict GC-tracked fields to
3763         UIntPtr fields used inside corlib, so we provide better
3764         type info to the GC and also allow broken packing as in
3765         bug #80580.
3766
3767 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
3768
3769         * sgen-gc.c: removed duplicated function.
3770
3771 2007-01-19  Miguel de Icaza  <miguel@novell.com>
3772
3773         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
3774         value that means that the value is not supported, but that we
3775         should not return a failure, but instead report this as a
3776         successful operation.
3777
3778 2007-01-19  Raja R Harinath  <rharinath@novell.com>
3779
3780         Fix tests/bug79956.2.il
3781         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
3782         (mono_generic_class_get_class): If the generic definition in an
3783         enum, copy over other fields related to it.
3784
3785 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3786
3787         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
3788         genericinst enums (bug #79215).
3789
3790 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
3791         * class.c: Fix bug 80307.
3792
3793 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
3794
3795         * image.c: if the file table is not present, try to load
3796         all the modules, since we don't have info about them
3797         having or not metadata (bug #80517).
3798         * assembly.c: allow mono_assembly_load_references () to
3799         work for netmodules.
3800
3801 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3802
3803         * image.c, metadata-internals.h, object.c: execute module
3804         cctors when running on the 2 runtime if present (bug #80487).
3805
3806 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
3807
3808         * icall.c: optimized InitializeArray() on bigendian.
3809
3810 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
3811
3812         * icall.c: fix for the broken ARM FPA double format.
3813
3814 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3815
3816         * icall.c: handle endian issues for r4 and r8 types, too, in
3817         the InitializeArray() icall.
3818
3819 2007-01-15  Miguel de Icaza  <miguel@novell.com>
3820
3821         * loader.c (mono_loader_error_prepare_exception): Clear the error
3822         once we have extracted the information from it, do this before we
3823         call into the JIT's class loading mechanisms.
3824
3825         * object.c (mono_class_create_runtime_vtable): Do not clear the
3826         loader error before calling mono_class_get_exception_for_failure
3827         as the loader error is needed inside
3828         mono_class_get_exception_for_failure to throw the error (thinko).
3829
3830         Fixes #80521
3831         
3832 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3833
3834         * reflection.c: align fields rva data so it's faster to load at
3835         runtime.
3836
3837 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3838
3839         Prepare to simplify GenericMethod handling.
3840         * class-internals.h (mono_method_get_context): New accessor function.
3841         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
3842         rather than directly accessing '->context' field.
3843
3844         * class-internals.h (_MonoGenericParam.method): Move ...
3845         (_MonoGenericContainer): ... here.  Add into union with klass field.
3846         * class.c, icall.c, loader.c, metadata.c, reflection.c:
3847         Update to changes.
3848
3849 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
3850
3851         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
3852         the wrapper type enum and reduce relocations.
3853
3854 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3855
3856         * reflection.c (inflate_mono_method): Reuse method instantiation
3857         from the generic method, if available.
3858
3859 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
3860
3861         * marshal.c (emit_marshal_variant): Fix conv_arg
3862         type in last commit, based on whether parameter is byref.
3863         
3864 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
3865
3866         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
3867         marshalling.
3868         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
3869         MONO_TYPE_OBJECT back for VARIANT support.
3870
3871 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
3872
3873         * marshal.c, marshal.h, icall-def.h: Implement 
3874         Marshal.ReAllocCoTaskMem.
3875
3876 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
3877
3878         * marshal.c: memory retention fixes: use the proper
3879         image cache for runtime_invoke method lookups.
3880
3881 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3882
3883         * mempool.c: added code to help debug mempool allocations.
3884
3885 2007-01-11  Dick Porter  <dick@ximian.com>
3886
3887         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
3888         support (experimenting with faking it with IP_MTU_DISCOVER for
3889         systems that don't have IP_DONTFRAGMENT.)
3890         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
3891         icall.
3892
3893         * icall-def.h: new System.Net.Sockets.Disconnect icall.
3894
3895         * socket-io.h: Add new fields to MonoSocketAsyncResult
3896         corresponding to the new ones in Socket.cs.
3897
3898 2007-01-11  Raja R Harinath  <rharinath@novell.com>
3899
3900         Fix IronPython regression mentioned in #80249
3901         * metadata.c (do_mono_metadata_parse_generic_class): Clear
3902         'cached_context' field, since it may have been initialized as a
3903         side-effect of metadata parsing.
3904
3905         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
3906         (_MonoGenericClass.cached_class): Move here and rename from lone
3907         remaining field of ...
3908         (_MonoInflatedGenericClass): ... this.  Remove.
3909         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
3910         to changes.
3911
3912         Fix mcs/tests/test-128.cs regression.
3913         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
3914         2007-01-10 change below.
3915         [MONO_TYPE_OBJECT]: Recurse into array case.
3916
3917 2007-01-11  Raja R Harinath  <harinath@gmail.com>
3918
3919         * class-internals.h (mono_get_inflated_generic_class): Remove.
3920         * class.c (mono_get_inflated_generic_class): Remove.
3921         (mono_generic_class_get_class): Rename from
3922         mono_class_create_generic.
3923         (mono_class_from_mono_type) [GENERICINST]: Use it.
3924         * reflection.c, metadata.c: Update to changes.  Use
3925         'mono_class_from_mono_type'.
3926
3927 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3928
3929         * reflection.c: use passed type when encoding an array element
3930         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
3931
3932 2007-01-09  Robert Jordan  <robertj@gmx.net>
3933
3934         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
3935         result arguments (someDelegate.EndInvoke (unrelatedAres)).
3936         Fixes bug #80392.
3937
3938 2007-01-09  Raja R Harinath  <rharinath@novell.com>
3939
3940         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
3941
3942         * object.c (set_value): Avoid aliasing between type->data.klass
3943         and type->data.generic_class.
3944
3945         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
3946
3947 2007-01-08  Raja R Harinath  <rharinath@novell.com>
3948
3949         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
3950         between type->data.klass and type->data.generic_class.
3951
3952 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
3953
3954         * marshal.c: In MS.NET, StringBuilder objects are not copied by
3955         value in out parameters.
3956
3957 2007-01-08  Raja R Harinath  <rharinath@novell.com>
3958
3959         Simplify invariant for MonoGenericClass::klass field.
3960         * class.c (mono_class_create_generic): Verify 'klass' is null.
3961         * metadata.c (do_mono_metadata_parse_generic_class): Don't
3962         initialize 'klass' field.
3963
3964 2007-01-05  Raja R Harinath  <rharinath@novell.com>
3965
3966         Ongoing work to avoid redundant data and simplify invariants.
3967         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
3968         'generic_class', and change type to a GenericInst.
3969         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
3970         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
3971
3972 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
3973
3974         * class.c : skip io-layer under PLATFORM_WIN32.
3975
3976 2007-01-03  Tor Lillqvist  <tml@novell.com>
3977
3978         Fix #80305: In a bundled executable, look in the bundled exe
3979         assembly to determine the runtime version. Add the possibility to
3980         bundle also the machine.config file.
3981         
3982         * assembly.c (mono_assembly_open_from_bundle): Make
3983         non-static. Allow being called even if we have no bundled
3984         assemblies, and return NULL right away in that case.
3985
3986         * domain-internals.h: Declare mono_assembly_open_from_bundle()
3987         here.
3988
3989         * domain.c (app_config_parse): Take an assembly exe file name as
3990         parameter instead of a config file name. Check for a bundled
3991         config file for that assembly by calling
3992         mono_config_string_for_assembly_file() (see below) before looking
3993         for one in the file system.
3994         (get_runtimes_from_exe): Corrsponding change to call of
3995         app_config_parse().
3996         (get_runtimes_from_exe): Check for bundled assembly exe file first
3997         by calling mono_assembly_open_from_bundle(). If no bundled
3998         assembly exe file is found, call mono_image_open() as before to
3999         look it up in the file system.
4000
4001         * mono-config.c: Add variable bundled_machinec_onfig.
4002         (mono_config_string_for_assembly_file): New function.
4003         (mono_config_for_assembly): Move code snippet that looks for a
4004         bundled assembly .config file into the above new function. Call
4005         it.
4006         (mono_register_machine_config, mono_get_machine_config): New
4007         functions to set and retrieve
4008
4009         * assembly.h: Declare mono_register_machine_config().
4010
4011         * mono-config.h: Declare mono_get_machine_config() and
4012         mono_config_string_for_assembly_file().
4013
4014         * icall.c: No declaration of environ necessary on Win32. It is
4015         declared (as a macro expanding to a function call) in stdlib.h.
4016         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
4017         New internal mono function. Returns the value of
4018         mono_get_machine_config() as a Mono string.
4019
4020         * icall-def.h: Add get_bundled_machine_config().
4021
4022 2007-01-04  Raja R Harinath  <rharinath@novell.com>
4023
4024         Remove redundant field
4025         * class-internals.h (_MonoGenericContext.container): Remove field.
4026         * loader.c (mono_method_get_signature_full): Don't parse a
4027         "container" for a signature parse when the signature is inflated
4028         immediately.
4029         (method_from_methodspec): Likewise, for a generic_inst.
4030         * class.c, metadata.c, reflection.c: Update to changes.
4031
4032 2006-01-04  Raja R Harinath  <rharinath@novell.com>
4033
4034         * class-internals.h (_MonoGenericClass): Rename 'context' field to
4035         'cached_context', and change semantics -- it starts off NULL, and
4036         is initialized on demand.
4037         * class.c (mono_generic_class_get_context): New accessor to
4038         replace 'context' field accesses.
4039         (mono_class_get_context): New helper.
4040         (*): Update to changes.
4041         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
4042
4043 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4044
4045         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
4046         before the memcpy.   Fixes Marshal2 regression.
4047
4048 2007-01-02  Jb Evain  <jbevain@gmail.com>
4049
4050         * blob.h: add a MONO_TYPE_ENUM definition
4051         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
4052         fix the encoding of arrays of enums in custom attributes.
4053
4054         Fixes #79666.
4055
4056 2007-01-01  Miguel de Icaza  <miguel@novell.com>
4057
4058         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
4059         string is null terminated, but only cut the string short if it
4060         overflows the buffer.   
4061         
4062         (mono_string_to_byvalstr): Also fix this routine.   The code here
4063         was not properly terminating a string (it was only terminated
4064         because of the previous catch-all memset). 
4065
4066         I left the memset, because I do not know if applications expect
4067         the runtime to clear this region. 
4068
4069         Fixes #79944.
4070
4071         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4072         Clear the error before returning to unmanaged code to prevent the
4073         runtime from being confused later on (fixes  80420).
4074         (ves_icall_type_from_name): Always call mono_loader_clear_error
4075         after parsing a type that could have failed.
4076         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
4077
4078         * loader.c (mono_loader_clear_error): Fix indentation.
4079
4080 2006-12-28  Martin Baulig  <martin@ximian.com>
4081
4082         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
4083
4084 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
4085
4086         * reflection.c: patch from Rolf Bjarne Kvinge to fix
4087         getting a token for an EnumBuilder.
4088
4089 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
4090
4091         * reflection.c: be more careful in case resource generation
4092         fails to create the data array.
4093
4094 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
4095
4096         * sgen-gc.c: write barrier for clone and fix unregister handles.
4097
4098 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4099
4100         * reflection.c: some fixes needed in the generics code for the moving GC.
4101
4102 2006-12-22  Robert Jordan  <robertj@gmx.net>
4103
4104         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
4105         account. Fixes bug #80299.
4106
4107 2006-12-21  Raja R Harinath  <rharinath@novell.com>
4108
4109         Fix WaitHandle usage in delegates.
4110         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
4111         * object.c (mono_wait_handle_new): Use the property set method to
4112         initialize the handle.
4113         (mono_wait_handle_get_handle): New.
4114         * threadpool.c (mono_async_invoke): Use it.
4115         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
4116         Likewise.
4117         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
4118
4119 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
4120
4121         * marshal.c (emit_marshal): Call emit_marshal_variant and
4122         emit_marshal_com_interface when applicable.
4123         (emit_marshal_variant, emit_marshal_com_interface): Add
4124         methods for this case and remove if's from emit_marshal_object.
4125         
4126 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
4127
4128         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
4129
4130 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
4131
4132         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
4133         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
4134         and GlobalFree on Windows. Remove FIXME.
4135
4136 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4137
4138         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
4139         implementation for managed objects.
4140
4141 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4142
4143         * object.c: implemented code to be used for checking
4144         that no reference field overlaps with non-references.
4145
4146 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4147
4148         * threadpool.c: fix queue code to be compatible with the
4149         moving GC.
4150
4151 2006-12-18  Miguel de Icaza  <miguel@novell.com>
4152
4153         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
4154         in structures by throwing ArgumentNullException.
4155
4156         (emit_marshal_safehandle): Also when they are null parameters.
4157
4158         (emit_marshal_safehandle): Add support for ref
4159         SafeHandles parameters
4160
4161 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4162
4163         * profiler.c: updated to use the mono-dl API instead of
4164         gmodule.
4165
4166 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4167
4168         * profiler.c: updated to use the mono-dl dynamic loading
4169         API instead of gmodule.
4170
4171 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
4172
4173         * profiler.c: use readlink, older versions of glib don't have
4174         g_file_read_link ().
4175
4176 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4177
4178         * profiler.c: try to detect the path to mono if libc fails to provide
4179         a useful name (bug #80286).
4180
4181 2006-12-16  Raja R Harinath  <rharinath@novell.com>
4182
4183         Fix #80242
4184         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
4185         instance, use the generic type definition instead.
4186         (ves_icall_Type_GetNestedTypes): Likewise.
4187         * class.c (mono_class_create_generic): Always set the
4188         nested_classes of a generic instance to NULL, even if the generic
4189         type definition has nested types.
4190
4191 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
4192
4193         * marshal.c (mono_string_from_bstr): Revert previous Windows change
4194         and fix on Linux.
4195         
4196 2006-12-15  Miguel de Icaza  <miguel@novell.com>
4197
4198         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
4199         my arguments were in the wrong order.   I also fixed the Windows
4200         version which seems to have had the same issue.
4201
4202         (mono_free_bstr): On Unix, this is g_free.
4203         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
4204         conversions (for the tests in corlib to pass).
4205
4206 2006-12-14  Miguel de Icaza  <miguel@novell.com>
4207
4208         * marshal.c (emit_ptr_to_object_conv): For now, ignore
4209         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
4210         exception if a ref SafeHandle in a struct has changed).
4211         
4212         (emit_struct_conv): Do not perform layout checks for classes
4213         derived from SafeHandle, as those are specially handled. 
4214
4215         (emit_object_to_ptr_conv): Add support for
4216         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
4217
4218         (emit_marshal_safehandle): Implement conversion of return values
4219         of safehandles (MARSHAL_ACTION_CONV_RESULT).
4220         
4221         * threads.c: WaitHandle now is compiled with two different handles
4222         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
4223         for 2.0.
4224         
4225         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
4226         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
4227         these routines to cope with both kinds of fields.
4228
4229 2006-12-12  Miguel de Icaza  <miguel@novell.com>
4230
4231         * metadata.c (mono_type_to_unmanaged): Handle the case where
4232         type->data.klass is a SafeHandle, and in that case, return the
4233         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
4234         MONO_MARSHAL_CONV_SAFEHANDLE. 
4235
4236 2006-12-11  Miguel de Icaza  <miguel@novell.com>
4237
4238         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
4239         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
4240         calling emit_marshal_object.
4241
4242         (emit_marshal_safehandle): Implement marshalling of
4243         SafeHandle parameters (no ref support yet).
4244
4245         (MarshalAction): Document the defines as I implement
4246         them for SafeHandle.
4247
4248         (emit_marshal_object): indentation police.
4249
4250         * class-internals.h: Define MonoSafeHandle.
4251         Add safehandle_class to MonoDefaults type.
4252
4253         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
4254         list of classes to check for fields. 
4255
4256         * domain.c (mono_init_internal): Add SafeHandle to the list of
4257         mono_defaults loaded.
4258
4259 2006-12-15  Raja R Harinath  <rharinath@novell.com>
4260
4261         Fix #80253
4262         * reflection.c (mono_reflection_bind_generic_parameters): If the
4263         generic type definition is a type builder, ensure that it is fully
4264         initialized before instantiating it.  Kill some dead code.
4265
4266 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
4267
4268         * object.c: clear the loader_error () before loading
4269         more metadata stuff (bug #80258).
4270
4271 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
4272
4273         * icall.c, icall-defs.h: type modifiers icalls for
4274         parameters and properties.
4275
4276 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4277
4278         * object.c, icall.c: fixed warnings.
4279
4280 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4281
4282         * marshal.c: fixed a couple of leaks and coding style in a few places.
4283
4284 2006-12-08  Dick Porter  <dick@ximian.com>
4285
4286         * process.c: Cope with NULL ProcessStartInfo arguments on windows
4287         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
4288         80173.
4289
4290 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4291
4292         * process.c: ProcessStartInfo may have only filename set and
4293         arguments can be NULL.
4294
4295 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4296
4297         * icall.c: fix leak found by Robert Jordan.
4298
4299 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4300
4301         * marshal.c, marshal.h: generate managed method to access an element
4302         of a multi-dimensional array.
4303
4304 2006-11-30  Paolo Molaro (lupus@ximian.com)
4305
4306         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
4307
4308 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4309
4310         * icall.c: back out GetFields () fix until the serialization code is
4311         fixed to not depend on the incorrect behaviour.
4312
4313 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
4314
4315         * profiler.c: provide defaults if none are set.
4316
4317 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4318
4319         * Makefile.am, attrdefs.h: new public header file with
4320         constants for attributes for use by embedders.
4321
4322 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4323
4324         * icall.c: GetFields () fix for bug #80064.
4325
4326 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
4327
4328         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
4329         removed long unused icalls.
4330
4331 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
4332   
4333         * marshal.c: 
4334                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
4335                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
4336                 can be generated without a delegate class.
4337                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
4338         
4339         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4340
4341 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4342
4343         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
4344         #80069.
4345
4346 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4347
4348         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
4349         icall-def.h: added icalls needed by System.GC.
4350
4351 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
4352
4353         * loader.c: ensure the class in catch clauses is handled
4354         correctly for generics methods (fixes bug#79980).
4355
4356 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4357
4358         * monitor.h, monitor.c: added mono_locks_dump () function
4359         to help debug deadlocks involving managed locks.
4360
4361 2006-11-13  Dick Porter  <dick@ximian.com>
4362
4363         * file-io.c (get_file_attributes): If the file is a symlink try
4364         and get the stat data for the target, but also add the
4365         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
4366         the specs for the windows symlink support, but will probably have
4367         to be reworked when I have test data from a vista machine.  Fixes
4368         bug 79887.
4369
4370 2006-11-13  Dick Porter  <dick@ximian.com>
4371
4372         * gc.c (mono_domain_finalize): 
4373         * marshal.c (mono_delegate_begin_invoke): 
4374         * threadpool.c (socket_io_init, mono_thread_pool_init)
4375         (mono_thread_pool_finish): 
4376         * monitor.c (mono_monitor_try_enter_internal): 
4377         * threads.c (mono_thread_resume, mono_thread_init)
4378         (mono_thread_suspend_all_other_threads)
4379         (mono_thread_execute_interruption): 
4380         * appdomain.c (mono_domain_unload): Check for NULL error returns
4381         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
4382         75733.
4383
4384 2006-11-11  Miguel de Icaza  <miguel@novell.com>
4385
4386         * process.c
4387         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
4388         Only close the handle if the value of the handle is not
4389         INVALID_HANDLE_VALUE.  This just makes the process a bit more
4390         robust.
4391
4392         Improvement for #75733, so that we do not run into this problem. 
4393
4394         
4395         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
4396         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
4397         internal variables.  Fixes #79462 
4398         
4399
4400 2006-11-09  Dick Porter  <dick@ximian.com>
4401
4402         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4403         Use poll() not select().  Fixes bug 79397.
4404
4405 2006-11-09  Raja R Harinath  <rharinath@novell.com>
4406
4407         Fix #79872
4408         * assembly.c (mono_assembly_load_from_full): Check that the given
4409         image has an assembly manifest.
4410
4411 2006-11-09  Ankit Jain  <jankit@novell.com>
4412
4413         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
4414         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
4415         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
4416
4417 2006-11-07  Dick Porter  <dick@ximian.com>
4418
4419         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4420         Put the old resolver behaviour back for pre-2.0 profiles.
4421
4422 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
4423
4424         * threadpool.c: precise GC and locking fixes.
4425
4426 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
4427
4428         * class.c: don't load types that have an explicit unaligned
4429         managed reference. Provide better info in the TypeLoad exception.
4430         Part of the fix for bug #79744.
4431         * object.c: use the correct check for class type load issues.
4432
4433 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4434
4435         * class.c: enforce alignment of fields with managed references
4436         even when Pack=1 is forced by the user (bug #77788).
4437
4438 2006-11-03  Dick Porter  <dick@ximian.com>
4439
4440         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4441         If the address reverse lookup fails, return it as the hostname
4442         anyway.  Fixes bug 79721.
4443
4444 2006-11-03  Dick Porter  <dick@ximian.com>
4445
4446         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
4447         Fix build on Windows.
4448
4449 2006-11-02  Dick Porter  <dick@ximian.com>
4450
4451         * icall-def.h: 
4452         * object-internals.h: 
4453         * exception.c (mono_get_exception_thread_interrupted): 
4454         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
4455         Fixes bug 74525.
4456
4457         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
4458         Check for pending Thread.Interrupt.
4459
4460 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
4461         * loader.c: Fixed bug 79684.
4462
4463 2006-10-27  Dick Porter  <dick@ximian.com>
4464
4465         * file-io.c (get_file_attributes): Force symlinks to directories
4466         to be returned as a regular file.  Fixes bug 79733.
4467 2006-10-26  Dick Porter  <dick@ximian.com>
4468
4469         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
4470         CreateFile to open a directory then we need to set the
4471         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
4472
4473 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4474
4475         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
4476         friends.
4477
4478 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4479
4480         * sgengc.c: small cleanup of timer code.
4481
4482 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4483
4484         * sgen-gc.c: fix some warnings and start adding support for
4485         complete object removal on domain unload.
4486
4487 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
4488
4489         * assembly.c: build_assembly_name should not consider a version
4490         number without build or revision number invalid. Fixes bug #79715.
4491
4492 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
4493
4494         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
4495         call kernel32 function OutputDebugString directly.
4496         
4497         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4498         
4499 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
4500
4501         * reflection.c: small cleanup, using a function to insert a MonoString
4502         in the string heap.
4503
4504 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
4505
4506         * reflection.c: moving GC fixes.
4507
4508 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4509
4510         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
4511         all the objects with finalizers belonging to an unloading appdomain.
4512
4513 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4514
4515         * sgen-gc.c: added ability to allocate even when the nursery is fully
4516         pinned and fixed a couple of bugs.
4517
4518 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4519
4520         * threads.h: Revert the last change for now.
4521
4522         * threads.h (mono_thread_get_pending_exception): Rename this to
4523         mono_thread_get_undeniable_exception ().
4524
4525 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
4526
4527         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
4528         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
4529         when fname does not refer to valid assembly. This result in a more
4530         meaningful error message.
4531         * exception.c: added mono_get_exception_bad_image_format2 which 
4532         constructs a BadImageFormatException using the ctor taking a custom
4533         message and the file name. Passing in a NULL msg results in a default
4534         message.
4535         * exception.h: define mono_get_exception_bad_image_format2 function.
4536         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
4537         when file name pointed to an invalid IL image. Use 
4538         mono_get_exception_file_not_found2 to construct FileNotFoundException,
4539         as this results in a more meaningful error message.
4540
4541 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4542
4543         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
4544         #79465.
4545
4546 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4547
4548         * metadata.c (mono_type_size): Change the align parameter to guint32 for
4549         consistency with the other _size functions.
4550         (mono_type_stack_size): Ditto.
4551
4552         * class.c object.c icall.c: Fix warnings caused by the above change.
4553
4554         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
4555
4556         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
4557
4558         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
4559
4560 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
4561
4562         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
4563         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
4564         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
4565         threadpool.h, threads-types.h: mark more internal functions.
4566
4567 2006-10-11  Dick Porter  <dick@ximian.com>
4568
4569         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4570         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
4571         reproduce the bug even before applying the fix.)
4572
4573 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
4574
4575         * reflection.c: allow retrieving attributes for arguments in generic
4576         methods (bug #79241).
4577
4578 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
4579
4580         * debug-mono-symfile.c: properly check fopen () result (found by
4581         coverity).
4582
4583 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
4584
4585         * reflection.c: make error message clearer and fixed two
4586         issuelets found by Coverity.
4587
4588 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
4589
4590         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
4591
4592 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
4593
4594         * object-internals.h, gc-internal.h, profiler-private.h:
4595         mark internal functions.
4596
4597 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4598
4599         * reflection.c: put data in the text section.
4600         * icall.c: recognize more types in type_from_typename ().
4601         * process.c, marshal.c: added some GC FIXMEs.
4602
4603 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4604
4605         * loader.c: check for NULL before initializing.
4606
4607 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
4608
4609         * gc.c (finalizer_thread): Use a non-alertable wait here.
4610
4611         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
4612         until the correct solution is found.
4613
4614 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
4615
4616         * reflection.c (mono_module_get_object): Avoid an assert when operating on
4617         modules with no metadata. Fixes #79596.
4618
4619         * image.c (load_metadata_ptrs): Put back the error message when
4620         the #- heap is encountered since the support is not complete yet.
4621
4622 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4623
4624         * gc.c: do not allow the user to SuppressFinalize () a
4625         delegate because it would leak the trampoline if present.
4626
4627 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
4628
4629         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
4630         PropertyPtr table.
4631
4632 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4633
4634         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
4635
4636         * metadata.c (mono_metadata_get_param_attrs): Ditto.
4637
4638         * row-indexes.h: Add definitions for *Ptr tables.
4639
4640         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
4641
4642         * metadata.c (mono_metadata_translate_token_index): New helper function to
4643         translate table indexes used in uncompressed metadata.
4644         (mono_metadata_decode_table_row): Ditto.
4645         (mono_metadata_decode_table_row_col): Ditto.
4646
4647         * metadata.c: Add table schema for *Ptr tables.
4648
4649         * class.c loader.c: Use the new helper function to access the affected metadata
4650         tables.
4651         
4652         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
4653         #38532.
4654         
4655 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
4656
4657         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
4658         sequences which can be unbounded in size. Fixes #79583.
4659
4660 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4661
4662         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
4663         static initialization.
4664
4665         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
4666
4667         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
4668
4669         * domain.c (mono_domain_free): Free up type_init_exception_hash.
4670
4671         * object.c (mono_runtime_class_init): Implement correct semantics when a static
4672         ctor fails, i.e. throw the same exception on subsequent accesses.
4673         
4674 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
4675
4676         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
4677         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
4678         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
4679         Handle marshalling of interfaces and VARIANTs contained in structs.
4680         
4681         Code is contributed under MIT/X11 license.
4682         
4683 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4684
4685         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
4686         
4687         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
4688         mempool.
4689
4690 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4691
4692         * console-io.c: ignore previous SIGINT handler.
4693
4694 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4695
4696         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
4697         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
4698         #79460, #79461, #79485.
4699
4700         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
4701
4702         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
4703         #79217.
4704
4705 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4706
4707         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
4708         could be generated from it.
4709
4710 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
4711
4712         * rand.c: fix read loop to correctly handle EINTR.
4713
4714 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4715
4716         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
4717         internal calls are defined to keep methods closer to the declaring
4718         type and allow a significant reduction in runtime relocations and
4719         memory usage.
4720
4721 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
4722
4723         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
4724         exception message to have FileNotFoundException use the default
4725         assembly load error message. Fixes bug #79426.
4726         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
4727
4728 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4729
4730         * threadpool.c: (start_thread_or_queue) use the root domain when
4731         creating the thread instead of the async object one.
4732
4733 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
4734
4735         * class.c, object.c, class-internals.h, reflection.c:
4736         for arrays, store element_size inside MonoClass (speedup
4737         for array object creation).
4738
4739 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
4740
4741         * icall.c: fixed CodeBase to use the file name and not the module
4742         name (bug #79365).
4743
4744 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
4745
4746         * mono-debug.c, mono-debug.h: export find_method as
4747         mono_debug_find_method ().
4748
4749 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4750
4751         * debug-helpers.c, class-internals.h: added a few functions useful
4752         when debugging under gdb.
4753
4754 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4755
4756         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
4757         characters that need special handling.
4758
4759 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4760
4761         * mono-config.c: make the os/cpu specification more flexible,
4762         allowing lists and negation.
4763
4764 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
4765
4766         * marshal.c: COM Interop fixes. Handle case where method->klass.
4767         is interface. Handle BSTR/MonoString when null. Use CDECL as 
4768         calling convention on non-windows platforms. This is for
4769         compatibility with XPCOM and MainWin COM.
4770         
4771         Code is contributed under MIT/X11 license.
4772         
4773
4774 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
4775
4776         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
4777         correctly. Fixes #79217.
4778
4779         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
4780
4781 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
4782
4783         * mono-config.c: allow both an os and cpu attribute for dllmap
4784         and dllentry elemnets to enable a single config file to be used
4785         for multiple architectures.
4786
4787 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
4788
4789         * loader.c: MonoLoaderError was cleared too soon on load failure.
4790         Fixes bug #79424.
4791
4792 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
4793
4794         * icall.c: use the defining class vtable when accessing a
4795         static field, not a pobblibly derived class.
4796
4797 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4798
4799         * icall.c string-icalls.c: Remove references to unicode.h.
4800
4801         * unicode.h unicode.c Makefile.am: Remove these unused source files.
4802
4803         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
4804
4805         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
4806         indicating the image where custom marshaller types should be looked up.
4807         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
4808         custom marshallers, instead of corlib. Fixes #79425.
4809
4810 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
4811
4812         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
4813
4814 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
4815
4816         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
4817         Implement Environment.ProcessorCount.
4818         
4819         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
4820         Implement Environment.ProcessorCount.
4821         
4822         * icall.c: 
4823         Add Environment.ProcessorCount icall.
4824         
4825         Patch by Jason McFall.
4826
4827 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4828
4829         * assembly.c: don't append .exe/.dll when the filename already contains
4830         one of those extensions.
4831
4832 2006-09-12  Martin Baulig  <martin@ximian.com>
4833
4834         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
4835         to array interfaces.
4836
4837 2006-09-11  Martin Baulig  <martin@ximian.com>
4838
4839         * reflection.c (mono_image_build_metadata): Create the
4840         MethodImpl's after emitting all types and methods, so we don't
4841         need another fixup pass for them.
4842
4843 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4844
4845         * class.c (mono_class_from_name_case): Fix regression introduced by the last
4846         change.
4847
4848 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
4849
4850         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
4851         unload.
4852
4853 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
4854
4855         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
4856         args is not set. Fixes #78926.
4857
4858 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4859
4860         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
4861
4862         * image.c (load_class_names): Move this to class.c, and rename it to 
4863         'mono_image_init_name_cache'.
4864         (load_modules): Fix a warning.
4865
4866         * class.c icall.c image.c: Initialize image->name_cache lazily.
4867
4868         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
4869         on its name using information in the AOT file.
4870
4871         * class.c (mono_class_from_name): Use the new hook function.
4872
4873 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
4874
4875         * reflection.c (mono_param_get_objects): Handle enum default parameter values
4876         correctly.
4877
4878         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
4879         Fixes #79289.
4880         
4881 2006-09-06  Martin Baulig  <martin@ximian.com>
4882
4883         * icall.c (mono_lookup_internal_call): Small fix.
4884
4885 2006-09-05  Raja R Harinath  <rharinath@novell.com>
4886
4887         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
4888         double g_free.
4889
4890 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
4891
4892         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
4893         when --debug is specified.
4894
4895 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4896
4897         * class.c (setup_generic_array_ifaces): Fix a warning.
4898
4899 2006-09-04  Miguel de Icaza  <miguel@novell.com>
4900
4901         * Temporarily remove the patch to assemly.c that checks the
4902         assembly versions as it breaks our gacutil.
4903
4904 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4905
4906         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
4907
4908         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
4909         a net 1.0 runtime.
4910
4911         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
4912         created using the default ctor. Fixes #79152.
4913         (mono_string_builder_to_utf16): Ditto.
4914
4915 2006-09-01  Martin Baulig  <martin@ximian.com>
4916
4917         Fix handling of the generic array interfaces.
4918
4919         * class-internals.h
4920         (MonoDefaults): Removed `generic_array_class' and added
4921         `generic_ilist' class.
4922
4923         * class.c
4924         (mono_bounded_array_class_get): Add the new generic array interfaces.
4925         (setup_generic_array_ifaces): New static method; create vtable
4926         entries for each method in the generic array interfaces.
4927
4928         * metadata.c
4929         (select_container): Allow "parent-less" generic methods.
4930
4931         * marshal.c
4932         (mono_marshal_get_generic_array_helper): New public method.
4933
4934         * icall.c
4935         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
4936         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
4937         moved the interncall into System.Array.
4938
4939 2006-09-01  Raja R Harinath  <rharinath@novell.com>
4940
4941         A few more cases of avoiding work on types with ->byref set.
4942         Has the real fix for #79238
4943         * icall.c (is_generic_parameter): New helper.
4944         (ves_icall_Type_GetGenericParameterPosition): Use it.
4945         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
4946         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
4947         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
4948         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
4949         reference types.
4950         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
4951         reference types.
4952         (ves_icall_Type_get_IsGenericInstance): Likewise.
4953         (ves_icall_Type_get_IsGenericType): Likewise.
4954
4955 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4956
4957         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
4958         class if possible.
4959
4960         * mempool.h (mono_mempool_get_allocated): New helper function.
4961
4962         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
4963         change.
4964
4965         * mempool.c: Fix warnings and the calculation of stats.
4966
4967         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
4968
4969         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
4970
4971         * loader.c (mono_get_method_from_token): Update method_count stat.
4972
4973         * class-internals.h (MonoStats): Add some stats.
4974
4975 2006-08-31 Robert Jordan  <robertj@gmx.net>
4976
4977         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
4978         with managed variants.
4979         All code is contributed under the MIT/X11 license.
4980         
4981 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4982
4983         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
4984         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
4985
4986         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
4987
4988         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
4989         with cycles in classes.
4990
4991         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
4992
4993         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
4994         missing a [MarshalAs] directive. Fixes #79203.
4995
4996         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
4997         klass->marshal_info. Fixes #79217.
4998
4999 2006-08-30  Martin Baulig  <martin@ximian.com>
5000
5001         Committing a patch from Joachim Ante <joe@otee.dk>:
5002         Add support for binary data symbol stores.
5003
5004         * debug-mono-symfile.c
5005         (mono_debug_open_mono_symbol_file): Renamed into
5006         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
5007         arguments.
5008
5009         * mono-debug.c
5010         (mono_debug_open_image): Added `raw_contents' and `size' args.
5011         (mono_debug_init_2_memory): New public function.
5012
5013 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
5014
5015         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
5016
5017 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5018
5019         * appdomain.c: implement support for ShadowCopyFiles.
5020
5021 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
5022
5023         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
5024         when value is NULL (and should remove CID #51).
5025
5026 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5027
5028         * image.c: moved 2 functions to ../utils.
5029
5030 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5031
5032         * gc.c: cope with the target object of a GC handle being NULL
5033         (bug #78877).
5034
5035 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5036
5037         * class.c: recursively check parent's explicit implementations
5038         of interface methods (fixes bug #79125).
5039
5040 2006-08-19  Miguel de Icaza  <miguel@novell.com>
5041
5042         * filewatcher.c: Avoid warnings when building, do not redefine
5043         constants that are defined.
5044
5045         Remove warnings.
5046
5047 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5048
5049         * image.c: don't fail when the link points to an absolute path.
5050
5051 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
5052
5053         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
5054         Fix CID #3.
5055
5056 2006-08-17  Miguel de Icaza  <miguel@novell.com>
5057
5058         * image.c (full_path): A new method used to obtain the actual path
5059         of an assembly even in the presence of symbolic links.  
5060
5061         This is necessary for the case where we are running a binary that
5062         has been GACed, but we are using the "published" path name
5063         ($prefix/mono/1.0/blah.exe) which happens to point to the real
5064         file in the GAC.
5065
5066         This was the source of the failure for the `xsp' command with the
5067         recent AppDomain changes, as far as the runtime was concerned,
5068         there were two different assemblies: $prefix/mono/1.0/blah.exe and
5069         $prefix/mono/gac/blah/version/blah.exe.
5070
5071         (do_mono_image_open): use full path
5072
5073 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
5074
5075         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
5076
5077 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
5078
5079         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
5080         domain_id is supplied. Fix CID #241 and corlib's unit tests.
5081
5082 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
5083
5084         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
5085         small structures. Fixes #78990.
5086
5087 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
5088
5089         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
5090
5091         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
5092
5093 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5094
5095         * appdomain.c:
5096         * marshal.c: don't load all the assemblies from a domain into newly
5097         created ones. The new domains might have different rules and load
5098         assemblies from different locations. Fixes bug #76757.
5099
5100         Patch by Lluis. Conflicts resolved by Brian Crowell.
5101
5102 2006-08-16  Alp Toker  <alp@atoker.com>
5103
5104         * socket-io.c: First half of the fix for #79084.
5105         Set sa_size to the length of the content, not that of the struct.
5106         Don't add NULL suffix to the content, this should be done in
5107         managed code if needed.
5108
5109 2006-08-14  Raja R Harinath  <rharinath@novell.com>
5110
5111         Fix part of #79012
5112         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
5113         mono_metadata_parse_type returns NULL.
5114
5115 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
5116
5117         * normalization-tables.h : new file for string normalization data.
5118         * locales.c, locales.h, icall.c :
5119           added load_normalization_resource() for string normalization,
5120           and icall as well.
5121         * Makefile.am : added normalization-tables.h to the sources.
5122
5123 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
5124
5125         * marshal.c: Add more helper functions to reduce code duplication and use them
5126         everywhere.
5127
5128 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
5129
5130         * marshal.c: Fix non-x86 stdcall warnings.
5131         
5132         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
5133         them everywhere.
5134
5135 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
5136
5137         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
5138         type check on multi-dimensional arrays. Fixes #79000.
5139
5140 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
5141
5142         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
5143         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
5144         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
5145         * class-internals.h: add is_com_object to class structure.
5146         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
5147         null checks to COM object marshalling. Fix .ctor call on RCW.
5148         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
5149         
5150         All code is contributed under the MIT/X11 license.
5151
5152 2006-08-09  Dick Porter  <dick@ximian.com>
5153
5154         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
5155         racing mono_monitor_allocator_lock() somewhere, so don't delete
5156         the critical section for now.  Found by running and exiting
5157         monodevelop.
5158
5159 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
5160
5161         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
5162         (ves_icall_System_ComObject_FindInterface): Ditto.
5163         (ves_icall_System_ComObject_CacheInterface): Ditto.
5164
5165         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
5166         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
5167
5168 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5169
5170         * threadpool.c: treat pipes from process asynchronous reads as sockets
5171         when reading from them, so we get select/poll or epoll to wait for
5172         data.
5173
5174 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
5175
5176         * loader.c: Fix a typo (CID #233) in the null check.
5177
5178 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
5179
5180         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
5181         Hopefully fixes #78949.
5182         
5183         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
5184         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
5185         bytes. Fixes #78972.
5186
5187 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5188
5189         * filewatcher.c: we need to set errno here.
5190
5191 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5192
5193         * filewatcher.c: let Win32Exception get the error value.
5194
5195 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5196
5197         * filewatcher.c: translate errno into win32 errors for Win32Exception
5198         to know what happened.
5199
5200 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
5201
5202         * threadpool.c: Fix more warnings.
5203
5204         * assembly.c (search_loaded): Fix warnings.
5205
5206         * threadpool.c (mono_thread_pool_finish): Fix warnings.
5207         (mono_async_invoke): Ditto.
5208
5209 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
5210
5211         * object.c (mono_remote_class_vtable): Need to create proxy vtable
5212         entries for __ComObject type in addition to ComImport types.
5213         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
5214         about hash table.
5215         
5216         All code is contributed under the MIT/X11 license.
5217
5218 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
5219
5220         * image.c: avoid tentative loading of modulerefs that contain
5221         no metadata (P/Invoke library names).
5222
5223 2006-07-28  Dick Porter  <dick@ximian.com>
5224
5225         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
5226         mono_loader_lock() somewhere, so don't delete the critical section
5227         for now.  Found by running and exiting monodevelop.
5228
5229 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5230
5231         * filewatcher.c: define the inotify syscalls when we're building on
5232         linux and have sys/syscall.h. The build system might not have support
5233         for inotify but the target system might have it.
5234
5235 2006-07-26  Miguel de Icaza  <miguel@novell.com>
5236
5237         * domain.c: Documentation updates.
5238
5239         * loader.c (mono_free_method): Do not release the method
5240         information if we are being profiled, as profilers will use this
5241         information at shut down to present some data to the user.
5242
5243         This is needed so that the profiler does not crash, as the
5244         profiler tends to keep MonoMethods around, and they might become
5245         invalid if we free these.
5246
5247         (mono_get_method_constrained): Return the original CIL stream
5248         method as well, so verification can be performed against it.
5249
5250 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5251
5252         * filewatcher.[ch]: support for inotify file system watcher.
5253         * icall.c: add new internal calls for the inotify file system watcher.
5254
5255 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5256
5257         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
5258         #78888.
5259
5260 2006-07-20  Dick Porter  <dick@ximian.com>
5261
5262         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
5263         warning.
5264
5265 2006-07-20  Dick Porter  <dick@ximian.com>
5266
5267         * threads.c (start_wrapper): Do the thread cleanup while we still
5268         hold a reference to its object.  Fixes bug 78123.
5269
5270 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
5271
5272         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
5273         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
5274           "managed-to-managed".
5275         * icall.c: Redirect string constructors that take sbyte* to
5276           ves_icall_System_String_ctor_RedirectToCreateString.
5277         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
5278           to CreateString () methods with matching signature.
5279         * reflection.c: Use original security informations for
5280           MONO_WRAPPER_MANAGED_TO_MANAGED.
5281         * security-manager.c: Use original security informations for
5282           MONO_WRAPPER_MANAGED_TO_MANAGED.
5283         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
5284           that is a placeholder and only its address should be used.
5285         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
5286           that is a placeholder and only its address should be used.
5287
5288 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
5289
5290         Begin implementing COM Interop.
5291         * appdomain.c: Increment corlib version.
5292         * class.c: Set ComImport classes' parent to __ComObject.
5293         * loader.c: Mark cominterop methods as such.
5294         * domain.c: Add __ComObject class to MonoDefaults structure.
5295         * image.c: Add 2 hashtables to the image for COM Interop related methods
5296         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
5297         using the mempool allocator
5298         
5299         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
5300         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
5301         declaration for mono_metadata_type_dup_mp.
5302         
5303         * debug-helpers.c: Added strings for two additional wrapper types
5304         * object.c: Create proxy objects for ComImport classes
5305         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
5306         and added __ComObject class to MonoDefaults structure.
5307         
5308         * object-internals.h: Finish MonoRealProxy definition, and add definition of
5309         MonoComInteropProxy and MonoComObject.
5310         
5311         * marshal.c: Added support for COM Interop
5312         (signature_cominterop): Converts managed signature to corresponding
5313         unmanaged COM signature.
5314         (cominterop_get_function_pointer): gets unmanaged function pointer via
5315         COM object vtable
5316         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
5317         (cominterop_get_method_interface): returns interface type that method is defined on
5318         (mono_mb_emit_cominterop_call): emits native call to function pointer
5319         gotten from vtable
5320         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
5321         that matches signature of unmanaged function.
5322         (cominterop_get_native_wrapper): wrapper around adjusted method call.
5323         (cominterop_get_invoke): forwards call from proxy to __ComObject
5324         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
5325         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
5326         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
5327         
5328         * marshal.h: Added Marshal icall declarations.
5329         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
5330         so we can access them in finalizer
5331         
5332 2006-07-14  Dick Porter  <dick@ximian.com>
5333
5334         * object.c (mono_type_initialization_cleanup): Fix a race
5335         condition by temporarily commenting out the critical section
5336         deletion.
5337
5338 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
5339
5340         * reflection.c (create_custom_attr): Fix some warnings.
5341         (create_custom_attr_data): Ditto.
5342         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
5343         types. Fixes #78855.
5344
5345 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
5346
5347         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
5348
5349         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
5350
5351 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
5352
5353         * reflection.c (resolve_object): Add support for DynamicMethod.
5354
5355         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
5356         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
5357
5358 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
5359
5360         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
5361         don't leak GPtrArray's pdata has we have no use (nor free) for it.
5362
5363 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
5364
5365         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
5366         Fixes #77888.
5367
5368 2006-06-30  Raja R Harinath  <rharinath@novell.com>
5369
5370         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
5371         slightly: remove a shadow local variable.
5372
5373 2006-06-29  Raja R Harinath  <rharinath@novell.com>
5374
5375         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
5376         definition that introduces the virtual function slot.
5377         Also fix Coverity #105.
5378
5379 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
5380
5381         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
5382         for dynamic assemblies. Fixes #78724.
5383
5384 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
5385
5386         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
5387         Fixes #78722.
5388
5389 2006-06-21  Martin Baulig  <martin@ximian.com>
5390
5391         * reflection.c
5392         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
5393         fixes #76484.
5394
5395 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
5396
5397         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
5398
5399 2006-06-20  Raja R Harinath  <rharinath@novell.com>
5400
5401         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
5402         nor TYPEREFs.
5403         * class.c (mono_class_create_from_typespec): Add 'context' argument.
5404         Inflate result if necessary.
5405         (mono_class_get_full): Remove old version.  Rename from
5406         'mono_class_get' and add 'context' argument.  Pass it to
5407         ..._create_from_typespec.
5408         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
5409         (mono_ldtoken): Revert change below.
5410
5411 2006-06-20  Martin Baulig  <martin@ximian.com>
5412
5413         * class.c (mono_ldtoken): Don't pass the generic context to
5414         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
5415
5416 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
5417
5418         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
5419         and later freeing it. Fixes #78638.
5420
5421 2006-06-15  Miguel de Icaza  <miguel@novell.com>
5422
5423         * icall.c (mono_class_get_throw): Revert over-zealous error
5424         throwing, the caller for mono_class_get_throw will cope with
5425         errors when classes are not properly initialized already.
5426
5427         The code still copes with loader exceptions though.
5428
5429         Fixes the regression in reftype1 and reftype3 from the CAS tests.
5430         
5431 2006-06-14  Miguel de Icaza  <miguel@novell.com>
5432
5433         Fixes the `make run1' version of RuntimeAbort (to be commited,
5434         source is in Bugzilla).
5435         
5436         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
5437         FALSE on class loading failure instead of returning true.
5438
5439         * class.c (mono_class_create_from_typedef): It is possible for
5440         mono_metadata_interfaces_from_typedef_full to fail if a class is
5441         not found, cope with this.
5442         
5443
5444 2006-06-14  Dick Porter  <dick@ximian.com>
5445
5446         * socket-io.c: 
5447         * process.c: Fix a bunch of signed/unsigned warnings from gcc
5448         4.1.1
5449
5450 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
5451
5452         * culture-info-table.h : oops, forgot to make it nsync with r61548.
5453
5454 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5455
5456         * icall.c: Another fix for building mono in Visual Studio.
5457
5458 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5459
5460         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
5461         
5462 2006-06-09  Martin Baulig  <martin@ximian.com>
5463
5464         * debug-mono-symfile.c: Put this back and really fix it this
5465         time. Sorry for all the trouble.
5466
5467 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
5468
5469         * icall.c (mono_class_get_throw): Fix a warning.
5470         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
5471         ReflectionTypeLoadException if needed. Fixes #78606.
5472
5473         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
5474         (mono_class_init): Ditto.
5475
5476         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
5477         ref_only exceptions.
5478         (mono_loader_clear_error): Make this work even if there is no error.
5479
5480 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
5481
5482         * object-internals.h marshal.c marshal.h icall.c: Implement method 
5483         Marshal.GetComSlotForMethodInfo using internal call.
5484
5485 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
5486
5487         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
5488         a function for signalling it.
5489
5490         * class.c (mono_class_from_typeref): Use the new kind of loader error when
5491         a referenced assembly is not found.
5492
5493         * loader.c (mono_loader_error_prepare_exception): Add support for 
5494         LOADER_ERROR_ASSEMBLY. Fix formatting.
5495
5496 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
5497
5498         * domain.c appdomain.c class-internals.h marshal.c: Add support 
5499         for VARIANT marshalling on windows and increment corlib version
5500         since Variant struct was added.
5501
5502 2006-06-03  Miguel de Icaza  <miguel@novell.com>
5503
5504         * debug-mono-symfile.c: Revert Martin's previous patch which broke
5505         stack trace line information:
5506
5507         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
5508         (Martin) when looking up B which is between A and C, return A not C.
5509
5510         Bug is #78573.
5511
5512         Thanks to Alexander Olk for tracking this down.
5513
5514 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5515
5516         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
5517         
5518         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
5519         avoid clobbering its value.
5520         (mono_string_to_lpstr): Fix a warning on windows.
5521
5522 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
5523
5524         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
5525
5526         * reflection.c loader.c: Removed references to 'dummy' flag.
5527
5528         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
5529
5530         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
5531         it gets GC tracking.
5532
5533         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
5534         GC tracking.
5535         
5536         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
5537
5538         * marshal.c threadpool.c: Update callers of mono_async_result_new.
5539
5540         * appdomain.c: Bump corlib version.
5541
5542 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
5543
5544         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5545         CEE_STIND_REF when working with object references.
5546
5547 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
5548
5549         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
5550         Fixes #78539.
5551
5552 2006-05-30  Miguel de Icaza  <miguel@novell.com>
5553
5554         * loader.c (method_from_memberref): Fix argument value for
5555         mono_loader_set_error_method_load (I was passing the MonoClass
5556         instead of the class name char *).
5557
5558 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
5559
5560         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5561         CEE_STIND_REF when working with object references.
5562
5563 2006-05-30  Martin Baulig  <martin@ximian.com>
5564
5565         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
5566         mono_method_full_name() change and replace the ':' with a '.'
5567         here.
5568
5569 2006-05-30  Martin Baulig  <martin@ximian.com>
5570
5571         * debug-mono-symfile.c
5572         (mono_debug_symfile_lookup_location): Fix the algorithm:
5573         when looking up B which is between A and C, return A not C.
5574
5575 2006-05-29  Martin Baulig  <martin@ximian.com>
5576
5577         * mono-debug.h
5578         (MonoDebugMethodInfo): Make the typedef public.
5579         (MonoDebugSourceLocation): New public struct.
5580
5581         * mono-debug.c
5582         (mono_debug_source_location_from_address): Removed.
5583         (mono_debug_source_location_from_il_offset): Removed.
5584         (mono_debug_il_offset_from_address): Removed.
5585         (mono_debug_address_from_il_offset): Removed.
5586         (mono_debug_lookup_method): New public function.
5587         (mono_debug_lookup_source_location): New public function; replaces
5588         the old mono_debug_source_location_from_*() functions; see the
5589         inline documentation.
5590         (mono_debug_free_source_location): New public function.
5591         (mono_debug_print_stack_frame): New public function; see the
5592         inline documentation.
5593
5594         * debug-mono-symfile.c
5595         (mono_debug_find_source_location): Renamed into
5596         mono_debug_symfile_lookup_location(); only take a
5597         `MonoDebugMethodInfo *' and an `offset' argument; added inline
5598         documentation.
5599         (mono_debug_find_method): Renamed into
5600         mono_debug_symfile_lookup_method().
5601
5602 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5603
5604         * assembly.c (mono_assembly_open_full): Dont overwrite the status
5605         returned by mono_image_open_full ().
5606
5607         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
5608         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
5609         #78517.
5610
5611         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
5612         #78518.
5613
5614 2006-05-27  Miguel de Icaza  <miguel@novell.com>
5615
5616         * class.c (mono_class_from_typeref): handle missing images
5617         earlier, deals with bug #78418.   Refactor code; 
5618
5619         Fix a warning introduced in my previous commit (some stale code
5620         from before I revisited my patch).
5621
5622         * class.c (mono_class_create_from_typedef): On failure, remove the
5623         class from the MonoImage->class_cache as the class is not
5624         initialized;   Fixes the leak pointed out by Paolo.
5625
5626 2006-05-25  Dick Porter  <dick@ximian.com>
5627
5628         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
5629         DeleteCriticalSections until I figure out which one may still be
5630         sometimes locked when mono_thread_cleanup is called.
5631
5632 2006-05-24  Dick Porter  <dick@ximian.com>
5633
5634         * threads.c (mono_thread_cleanup): Move the threading cleanup out
5635         of mono_thread_manage and back into its own function, so it can be
5636         called after the finalizer thread has finished.
5637
5638         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
5639
5640 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
5641
5642         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
5643         Fixes #78495.
5644
5645         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
5646         with non-blittable elements.
5647         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
5648
5649 2006-05-24  Martin Baulig  <martin@ximian.com>
5650
5651         * mono-debug-debugger.h (MonoDebuggerEvent): Added
5652         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
5653
5654         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
5655         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
5656         `mono_debugger_event_handler' to NULL.
5657
5658 2006-05-24  Martin Baulig  <martin@ximian.com>
5659
5660         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
5661
5662 2006-05-24  Martin Baulig  <martin@ximian.com>
5663
5664         * mono-debug-debugger.h
5665         (mono_debugger_create_notification_function): Added
5666         `MonoCodeManager *' argument.
5667
5668 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
5669
5670         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
5671
5672 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
5673
5674         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
5675         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
5676         implementation.
5677
5678 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
5679
5680         * icall.c: precise GC support: objects can't be stored in unmanaged
5681         memory anymore, even if they are kept alive by other references: since
5682         they can move the GC needs to be able to always find them.
5683
5684 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5685
5686         * object.c: precise GC support for static fields. Support
5687         for moving GCs: write barriers and pinned allocation for interned
5688         strings.
5689
5690 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
5691
5692         * domain.c, domain-internals.h: precise GC support for the MonoDomain
5693         structure.
5694
5695 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5696
5697         * class.c, gc.c: sgen and precise GC updates.
5698
5699 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5700
5701         * marshal.h, marshal.c: added write barrier wrapper and precise type
5702         fixes.
5703
5704 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
5705
5706         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
5707         support.
5708
5709 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5710
5711         * reflection.c: precise and sgen GC updates.
5712
5713 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5714
5715         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
5716
5717 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
5718
5719         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
5720
5721 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
5722
5723         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
5724         MONO_TYPE_OBJECT. Fixes #78462.
5725
5726 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5727
5728         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
5729         and blittable types.
5730
5731 2006-05-17  Miguel de Icaza  <miguel@novell.com>
5732
5733         * class.c (mono_class_get_exception_for_failure): Implement parts
5734         of a TODO: if the loader error is set (instead of the class
5735         error), we return a Loader exception that can be properly thrown
5736         elsewhere.
5737
5738         This was exposed by some Winforms 2.0 code that I tried to run
5739         (Atsushi pointed me to it).
5740
5741 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
5742
5743         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
5744         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
5745         
5746         * marshal.c (emit_marshal_vtype): Add limited support for 
5747         UnmanagedType.LPStruct. Fixes #78427.
5748
5749         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
5750         Applied a patch from kangaroo to fix #77523.
5751
5752 2006-05-17  Martin Baulig  <martin@ximian.com>
5753
5754         * threads.c
5755         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
5756         (debugger_thread_created): Removed.
5757         (debugger_thread_exited): Removed.
5758
5759 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
5760
5761         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5762
5763         * object-internals.h (MonoReflectionResource): Sync with managed version.
5764
5765 2006-05-12  Wade Berrier <wberrier@novell.com>
5766
5767         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
5768
5769 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
5770
5771         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
5772         functions try to allocate from the image mempool.
5773
5774 2006-05-12  Dick Porter  <dick@ximian.com>
5775
5776         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
5777
5778 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
5779
5780         * object.c: The FieldGetter and FieldSetter methods require the full
5781         name of the class, not only the name. Fixes bug #78277.
5782
5783 2006-05-11  Miguel de Icaza  <miguel@novell.com>
5784
5785         * loader.c (method_from_memberref): Do not pass the NULL klass to
5786         mono_loader_set_error_() methods.  Pass the non-NULL value
5787         (class). 
5788
5789 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5790
5791         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
5792         (mono_assembly_close): Null out assembly->image->references after freeing it.
5793
5794         * image.c (mono_image_close): Free image->references.
5795         
5796         * reflection.c (mono_image_basic_init): Fix a small memory leak.
5797
5798 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
5799
5800         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
5801         before checking if it's NULL (g_assert).
5802
5803 2006-05-10  Martin Baulig  <martin@ximian.com>
5804
5805         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
5806         I thought I already killed that two months ago, but now it somehow reappeared.
5807
5808 2006-05-10  Martin Baulig  <martin@ximian.com>
5809
5810         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
5811
5812 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5813
5814         * reflection.c: Allocate memory for dynamically created methods in the image
5815         mempools.
5816
5817 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
5818
5819         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
5820         don't use the ad pointer before checking if it's NULL (g_assert).
5821
5822 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5823
5824         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
5825         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
5826
5827         * marshal.c: Allocate all signatures from mempools.
5828
5829         * marshal.c: Allocate some more signatures from mempools.
5830
5831 2006-05-09  Miguel de Icaza  <miguel@novell.com>
5832
5833         * object.c (mono_load_remote_field): The code used to provide a
5834         temporary variable for returning results if the user did not
5835         provide a result pointer.  But our temporary variable was allocted
5836         on the satck.
5837
5838         Fix calling code to always pass a result area.   Coverity ID 103.
5839
5840 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5841
5842         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
5843         value, not the old. Fixes #78312.
5844         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
5845
5846         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
5847         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
5848         per-image cache.
5849
5850         * assembly.c (mono_assembly_close): Free image->references.
5851
5852         * assembly.c (mono_assembly_names_equal): Fix a warning.
5853         (mono_assemblies_cleanup): Cleanup more global data.
5854
5855         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
5856
5857         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
5858         ptr_cache and image->modules.
5859
5860         * image.c (mono_image_init): Allocate array_cache lazily.
5861         
5862 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5863
5864         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
5865         behavior was changed recently and has bad side effects.
5866
5867 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5868
5869         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
5870         
5871         * assembly.c (mono_assembly_close): Remove a debug printf.
5872
5873         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
5874
5875         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
5876         to also allow for temporary references between mono_image_open ()/close ().
5877
5878         * domain.c (get_runtimes_from_exe): Add a FIXME.        
5879
5880 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5881
5882         * marshal.c: Fix support for dynamic methods.
5883
5884         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
5885
5886         * marshal.c (mono_marshal_cleanup): New cleanup function.
5887
5888         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
5889         image mempools.
5890
5891         * class.c (mono_class_init): Fix leaking class->nested_classes.
5892
5893         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
5894
5895         * image.c (mono_image_init): Initialize the new cashes.
5896
5897         * image.c (mono_image_close): Destroy the new cashes.
5898
5899         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
5900
5901         * mempool.c (mono_mempool_strdup): New helper function.
5902
5903         * class-internals.h: Add prototype for mono_loader_unlock ().
5904
5905         * domain.c (mono_jit_info_table_find): Fix a warning.
5906         (mono_debugger_check_runtime_version): Ditto.
5907
5908         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
5909         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
5910         functions to these modules.
5911
5912         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
5913         metadata modules.
5914         
5915         * marshal.c (mono_free_bstr): Fix a warning.
5916
5917         * assembly.c (mono_assembly_open_full): Fix another small leak.
5918
5919         * object.c: Fix some unload leaks in the remoting code.
5920
5921         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
5922         function.
5923
5924         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
5925
5926         * reflection.c: Fix some unload leaks in dynamic assemblies.
5927
5928 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
5929
5930         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
5931         * marshal.h: Add BSTR support on Win32
5932         * icall.c: Add BSTR icalls
5933         * metadata.h: Add BSTR enums
5934
5935 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5936
5937         Work to catch the crash from #76795 and turn it into an
5938         exception.   As I stubbed out pieces of the VisualBasic support,
5939         I found a number of places where the code was failing and I added
5940         checks to those places. 
5941         
5942         * metadata.c (do_mono_metadata_parse_generic_class): Make this
5943         function return a status code.  If we fail to parse the signature
5944         from mono_metadata_parse_generic_inst, return FALSE.
5945
5946         * loader.c (mono_get_method_from_token): If we fail to load the
5947         method (mono_class_get) return NULL.   
5948
5949         * (method_from_memberref): Return NULL if we are unable to parse
5950         the method signature
5951
5952         (mono_loader_error_prepare_exception): Since we now use the
5953         loader_error flag internally to stop processing, and obtaining
5954         exceptions that might be thrown will walk this code path the
5955         proper way of going from a MonoLoaderError into a
5956         MonoException was convoluted.   This new routine encapsulates the
5957         process of turning the error into an exception and *clearing* the
5958         error afterwards.
5959         
5960 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5961
5962         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
5963         with missing assemblies), and to cope with:
5964
5965                 * Missing fieldref from a non-existing assembly.
5966                 * Missing methodref from a non-existing assembly.
5967
5968         The first batch of work to address *some* of the issues from 76661.
5969         
5970         * object.c (mono_class_create_runtime_vtable): If we fail to
5971         initialize the class raise the exception here. 
5972
5973         * metadata.c (mono_class_get_overrides_full): If any methods fail
5974         to load return the failure to the caller.
5975
5976         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
5977         flagging assemblies that failed to load.   
5978
5979         Do not crash if we are unable to load the assembly.
5980
5981         (mono_assembly_close): Do nothing with REFERENCE_MISSING
5982         assemblies. 
5983
5984         * loader.c (mono_loader_set_error_type_load): Change the
5985         convention to always pass unallocated strings, so we make our own
5986         copies (I know our own code had duplicated strings before, but
5987         this keeps the normal conventions).
5988         (method_from_memberref): Call mono_loader_set_error_method_load
5989         for all possible failures of loading the class. 
5990         Remove assert, turn into a loader error.
5991
5992         (mono_loader_error_to_exception): Move this routine from mini
5993         (mini_loader_error_to_exception) there was no need to have that in
5994         mini. 
5995
5996         * class.c (mono_class_from_typeref): If we were not able to load
5997         the assembly with mono_assembly_load_reference, call the
5998         mono_loader_set_error_type_load to register the problem.
5999
6000         (mono_class_setup_fields): If we fail to load the type from
6001         mono_metadata_parse_type_full, call mono_class_set_failure and
6002         break from the loop.
6003
6004         If class->exception_type is set, we do not layout the fields as
6005         that might crash the runtime, and instead return (from breaking
6006         from the previous loop).
6007
6008         (mono_class_setup_vtable): This now returns a boolean indicating
6009         whether the table was properly setup.   The decision is driven by
6010         mono_class_get_overrides_full which might run into non-existing
6011         methods. 
6012         
6013         (mono_class_init): Returns TRUE on success or FALSE if there was a
6014         problem in loading the type (incorrect assemblies, missing
6015         assemblies, methods, etc).
6016
6017         When we call mono_class_setup_fields we also check for a potential
6018         error inside this call (either a class exception or a general
6019         loader exception).
6020
6021         (mono_class_create_from_typedef): If the parent fails to load
6022         (calling mono_class_get_full) return NULL.
6023         
6024         ** Important **
6025
6026         calls to mono_metadata_parse_type_full should be checked
6027         everywhere and set the mono_class_set_failure
6028         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
6029
6030         The current patch checks the places where my manually constructed
6031         tests show the errors are showing up, but we should do it
6032         everywhere. 
6033
6034         ** Important2 **
6035
6036         mono_class_init return values should be tested everywhere, like
6037         the previous case this is something that we should audit
6038         everywhere and not only on the cases exposed by the tests I
6039         created. 
6040
6041 2006-04-26  Miguel de Icaza  <miguel@novell.com>
6042
6043         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
6044         boolean parameter and instead pass the information on `options'
6045         parameter (FileOptions).
6046
6047         * icall.c: Register the new signature for MonoIO.Open.
6048
6049         * debug-helpers.c (dis_one): Trying to understand how coverity
6050         works.  Fix Run 5, item 78.
6051
6052 2006-04-26  Dick Porter  <dick@ximian.com>
6053
6054         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
6055         dereference.
6056
6057 2006-04-25  Martin Baulig  <martin@ximian.com>
6058
6059         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
6060
6061         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
6062         debugger_thread_created().
6063         (debugger_gc_push_all_stacks): Don't handle the main thread in any
6064         special way.
6065         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
6066         (mono_debugger_finalize_threads): New function; undo the effects
6067         of mono_debugger_init_threads().
6068         (mono_debugger_create_all_threads): Removed.
6069
6070 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
6071
6072         * image.c (mono_image_close): Tidy up trace messages.
6073
6074         * assembly.c (mono_assembly_close): Ditto.
6075
6076         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
6077         no longer references an already freed assembly. Fixes #78168.
6078
6079 2006-04-21  Dick Porter  <dick@ximian.com>
6080
6081         * threads.c (mono_thread_detach): Fix reference counting when
6082         detaching threads.
6083
6084 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
6085
6086         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
6087         #78155.
6088
6089 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
6090
6091         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
6092         (mono_type_to_stind): Ditto.
6093
6094         * marshal.c: Use the new helper functions to simplify code.
6095
6096         * image.c (mono_image_close): Add some code for help debug assembly unloading
6097         problems.
6098
6099         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
6100         image mempool.
6101
6102         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
6103         assembly was already loaded in another appdomain. Fixes #78083.
6104
6105 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
6106
6107         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
6108         referenced assemblies.
6109         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
6110
6111         * domain.c (mono_domain_free): Add a trace message.
6112
6113         * appdomain.c (add_assemblies_to_domain): Ditto.        
6114
6115         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
6116         field.  
6117
6118 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
6119
6120         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
6121
6122 2006-04-12  Martin Baulig  <martin@ximian.com>
6123
6124         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
6125         `USE_INCLUDED_LIBGC'.   
6126
6127 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
6128
6129         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
6130         the patch contains ../ and a small directory name later. Hopefully fixes
6131         #78035.
6132
6133 2006-04-10  Martin Baulig  <martin@ximian.com>
6134
6135         Clean up the debugger's thread-handling code.
6136
6137         The debugger's thread-handling code has been moved from
6138         ../mini/debug-debugger.c to threads.c.  We now iterate directly
6139         over the `threads' hash, keep track of exiting threads and also
6140         use proper locking.
6141
6142         We can now debug XSP and XSP based applications with the debugger.
6143
6144         * object-internals.h (MonoThread): Added `gpointer end_stack'.
6145
6146         * threads.h
6147         (MonoThreadCallbacks): Removed; this was only used by the debugger.
6148         (mono_install_thread_callbacks): Likewise.      
6149
6150         * threads.c (mono_thread_callbacks): Removed.
6151         (debugger_thread_created, debugger_thread_exited): New static functions.
6152         (start_wrapper): Call debugger_thread_created().
6153         (thread_cleanup): Call debugger_thread_exited().
6154         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
6155         (mono_debugger_init_threads): New public function.
6156         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
6157         iterate directly over the `threads' hash and also use proper locking.
6158
6159         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
6160
6161         * mono-debug-debugger.h
6162         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
6163
6164 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6165
6166         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
6167         argument type=array. Fixes #78057.
6168
6169 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
6170
6171         * culture-info-table.h : regenerated. Fixed bug #69652.
6172
6173 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
6174
6175         * loader.c metadata.c: Reapply a variant r59116.
6176         
6177         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
6178
6179         * class.c (mono_class_setup_interface_offsets): New internal function.
6180
6181         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
6182         interfaces too. Fixes #77398.
6183
6184         * reflection.c (encode_cattr_value): Add support for 
6185         parameter type=object, argument type=array.
6186         (load_cattr_value): Ditto. Fixes #77916.
6187
6188         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
6189         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
6190
6191         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
6192         a byval char array and CharSet is Ansi.
6193
6194         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
6195
6196 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
6197
6198         * metadata.c: Add some locking comments.
6199         
6200         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
6201         mempool.
6202         (mono_metadata_free_method_signature): Don't free the signature itself.
6203
6204         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
6205
6206         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
6207         reference the same MonoImage.
6208         (mono_assembly_load_from_full): Add an assert.
6209
6210 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
6211
6212         * image.c (mono_image_close): Don't put the image we are about to free into the
6213         loaded_images_guid_hash.
6214
6215         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
6216         to reduce code duplication.
6217
6218         * marshal.c: Register the native functions called by this module as icalls, to
6219         somewhat centralize the creation of MonoMethodSignature's.
6220
6221         * loader.c (mono_method_signature): Add a cache for method signatures.
6222
6223         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
6224         the parameter attributes of a method.
6225         (mono_metadata_parse_method_signature_full): Refactored the computation of
6226         parameter attributes into a separate function. Also avoid one allocation in
6227         most cases.
6228
6229         * assembly.c (mono_assembly_close): Ditto.
6230
6231         * image.c (mono_image_close): Log trace messages with INFO level.
6232
6233         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
6234
6235         * image.c reflection.c: Correct reference counting of image modules.
6236         
6237         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
6238         of this function from the image mempool.
6239         
6240         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
6241         to allow more cached types to be used.
6242
6243         * mono-debug.c (mono_debug_add_method): Appled patch from
6244         David S. Miller  <davem@sunset.davemloft.net>: Access 
6245         minfo->lexical_blocks[] entry elements using read32().
6246
6247 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
6248
6249         * loader.c (mono_free_method): No longer free the method header for non-dynamic
6250         methods as it is allocated from the mempool.
6251
6252         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
6253         image mempool.
6254
6255         * metadata-internals.h: Add comments describing the reference counting scheme
6256         used for MonoImage and MonoAssembly.
6257
6258         * image.c assembly.c reflection.c: Rework reference counting of images and 
6259         assemblies so they are freed when the runtime is shut down. Free some 
6260         additional memory structures when an image is unloaded.
6261         
6262 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
6263
6264         * class.c loader.c reflection.c: Allocate more data structures in
6265         the image mempool.
6266
6267 2006-03-31  Miguel de Icaza  <miguel@novell.com>
6268
6269         * icall.c
6270         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
6271         build on pre glib 2.4 systems.
6272
6273 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
6274
6275         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
6276
6277         * icall.c: Fix some warnings.
6278
6279 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
6280
6281         * culture-info-table.h : regenerated.
6282
6283 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
6284
6285         * threads.c, object-internals.h, verify.c: changed the culture caching
6286         code to use a normal MonoArray for storage so the GC can keep track of
6287         them easily. Fixed bits of the cache logic, too and simplified the
6288         code.
6289
6290 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
6291
6292         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
6293         thread for non-Boehm GCs.
6294
6295 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
6296
6297         * domain.c, object.c, domain-internals.h: reduce the amount of memory
6298         needed to keep track of the data for static fields.
6299
6300 2006-03-29  Raja R Harinath  <rharinath@novell.com>
6301
6302         Fix #75172
6303         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
6304         for interface classes.  Use 'num_methods' instead.
6305         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
6306         before using '->vtable_size' field.
6307
6308 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6309
6310         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
6311         doesn't contain managed pointers, so use a normal hashtable.
6312
6313 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6314
6315         * reflection.c, class-internals.h, domain.c: fixed handling of types
6316         used as values for objects in custom attributes (bug #77915):
6317
6318 2006-03-24  Martin Baulig  <martin@ximian.com>
6319
6320         * class.c (mono_class_setup_fields): Added support for generic
6321         instances; fixes #77580.
6322
6323 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6324
6325         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
6326
6327 2006-03-24  Dick Porter  <dick@ximian.com>
6328
6329         * file-io.c (get_file_attributes): More stat macro breakage.
6330         Fixes bug 77759.
6331
6332 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
6333
6334         * profiler.c: added the file=filename option in the default profiler
6335         to output the profile data to filename.
6336
6337 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6338
6339         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
6340         bug #77877.
6341
6342 2006-03-22  Martin Baulig  <martin@ximian.com>
6343
6344         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
6345         allocated `MonoClassField *' in `fb->handle'.
6346
6347 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6348
6349         * class.c, image.c, metadata-internals.h: implemented new mechanism to
6350         allocate interface ID to save memory and allow better ID reuse on
6351         appdomain unload. setup_generic_vtable () removal from Martin.
6352
6353 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6354
6355         * object.h, appdomain.c, domain.c, exception.c, icall.c,
6356         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
6357         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
6358         write barriers for reference stores with managed objects accessed with
6359         C structures in the runtime and in embedding programs.
6360
6361 2006-03-20  Raja R Harinath  <rharinath@novell.com>
6362
6363         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
6364         'interface_id' and 'max_interface_id' fields of MonoClasses
6365         representing open generic types.
6366
6367 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
6368
6369         * object.h, object.c, icall.c: added functions to deal with
6370         storing valuetypes that contain references in managed objects.
6371         * reflection.c, string-icalls.c, threads.c, marshal.c: small
6372         fixes and comments around uses of mono_array_addr ().
6373
6374 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
6375
6376         * object.h, icall.c, monitor.c: object.GetHashCode ()
6377         implementation that supports the moving garbage collector.
6378
6379 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6380
6381         * icall.c, threads-types.h, threads.c: implemented finalizer for
6382         LocalDataStoreSlot.
6383
6384 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
6385
6386         * metadata.c (mono_type_size): Add a fixme.
6387         (mono_type_stack_size): Ditto.
6388
6389         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
6390         'type_forwarders' field.
6391
6392         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
6393         attribute from net 2.0.
6394
6395         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
6396         from class.c.
6397
6398         * class.c (mono_class_setup_fields): Fix a warning.
6399         
6400         * class.c (mono_class_from_name): Add support for assemblyref entries
6401         in the EXPORTEDTYPE table.
6402
6403         * reflection.c: Add support for handling type forwarders under net 2.0.
6404
6405         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
6406         
6407 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
6408
6409         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
6410         overwriting entries in ModuleBuild->types, also clean up the code
6411         a little. Fixes #77774.
6412
6413 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6414
6415         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
6416         load friend assembly info when present.
6417
6418 2006-03-14  Raja R Harinath  <rharinath@novell.com>
6419
6420         Fix crasher on gtest-158.cs.
6421         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
6422         the return value if the MonoClass we want is yet in an
6423         inconsistent state.
6424         * class.c (mono_class_create_from_typedef): Add an comment
6425         explaining an order dependency between mono_class_setup_parent and
6426         mono_class_setup_mono_type.
6427
6428 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6429
6430         * class.c: documentation updates and events bug fix.
6431
6432 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
6433
6434         * class.c: some cleanup, locking fixes.
6435
6436 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6437
6438         * class.c: fix the generics code to setup nested
6439         type info to the instantiated type (bug #77770).
6440
6441 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6442
6443         * marshal.c: fixed a few type correctness issues.
6444
6445 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6446
6447         * loader.c: the Set/Get/Addrtess array methods should be public.
6448
6449 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6450
6451         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
6452         
6453         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
6454         info->wrapper.
6455
6456 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
6457
6458         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
6459
6460         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
6461
6462         * mempool.c (mono_mempool_alloc): Speed this up a bit.
6463         (mono_mempool_alloc0): Ditto.
6464
6465 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6466
6467         * socket-io.c:
6468         (create_object_from_sockaddr): it was allocating 4 extra bytes
6469         for the AF_UNIX data. Fixes bug #77747.
6470
6471 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
6472
6473         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
6474
6475 2006-03-09  Dick Porter  <dick@ximian.com>
6476
6477         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
6478         Fixes bug 76966 again.
6479
6480 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
6481
6482         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
6483         names from r57532
6484         * appdomain.c: Bumped corlib version to 48 (due to r57532)
6485
6486 2006-03-07  Martin Baulig  <martin@ximian.com>
6487
6488         * object.c
6489         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
6490
6491 2006-03-07  Martin Baulig  <martin@ximian.com>
6492
6493         * class.c
6494         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
6495         regression introduced in r56970; see gtest-252.cs.
6496
6497         * loader.c (mono_get_method_constrained): Correctly handle generic
6498         methods; see gtest-253.cs.
6499
6500 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
6501
6502         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
6503
6504 2006-03-04  Martin Baulig  <martin@ximian.com>
6505
6506         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
6507         compute the parent type at runtime, just like we're already doing
6508         it for interfaces.
6509
6510         * reflection.c
6511         (mono_reflection_bind_generic_parameters): Don't compute the
6512         parent type anymore.
6513
6514         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
6515
6516 2006-03-04  Martin Baulig  <martin@ximian.com>
6517
6518         * mono-debug-debugger.h
6519         (mono_debugger_create_notification_function): Allocate memory at
6520         runtime and return a pointer to it.
6521
6522 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
6523
6524         * assembly.c: Fix windows build.
6525         
6526         * assembly.c: Fix build.
6527
6528         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
6529
6530         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
6531         
6532 2006-03-03  Dick Porter  <dick@ximian.com>
6533
6534         * process.c
6535         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
6536         Check parameters before dereferencing them.  Fixes Aaron's part of
6537         bug 77393.
6538
6539 2006-03-03  Raja R Harinath  <rharinath@novell.com>
6540
6541         Fix performance regression.
6542         * loader.c (find_method_in_class): Add 'from_class' argument.
6543         Rename 'klass' argument to 'in_class'.  The signature is compared
6544         against the method in 'in_class', and the corresponding method is
6545         returned from 'from_class'.
6546         (find_method): Walk both 'in_class' and 'from_class' in parallel.
6547         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
6548         type definition and generic instantiation in parallel.
6549         (mono_get_method_constrained): Update to changes.
6550
6551 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6552
6553         * threads.c: make sure the domain is correct, too when doing
6554         mono_thread_attach ().
6555
6556 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
6557
6558         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
6559         windows. Fixes #77683.
6560
6561 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6562
6563         * object.h, *: introduced specific way to set elements of an array
6564         of references to be used as write barrier. Still need to audit the
6565         uses of mono_array_addr.
6566
6567 2006-03-01  Miguel de Icaza  <miguel@novell.com>
6568
6569         * object-internals.h: New field to cache the assmebly name, patch
6570         from Tambet Ingo (tambet@ximian.com)
6571
6572 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6573
6574         * decimal.h, class-internals.h, metadata-internals.h,
6575         file-io.h: mark a few function declarations as internal, to
6576         reduce the number of PLT entries.
6577
6578 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6579
6580         * file-io.c: fix typo in warning message.
6581
6582 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
6583
6584         * loader.c: on unix, lookup the "*A" version of a function
6585         if charset is auto as a second option before failing.
6586
6587 2006-02-28  Raja R Harinath  <rharinath@novell.com>
6588
6589         * class.h (mono_class_inflate_generic_method): Revert to two
6590         argument version.
6591         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
6592         (mono_class_inflate_generic_method_full): Add.
6593         * class.c (mono_class_inflate_generic_method_full): Rename from
6594         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
6595         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
6596         * loader.c, reflection.c: Update to changes.
6597
6598 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6599
6600         * icall.c: const fixes and small improvements.
6601
6602 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6603
6604         * threadpool.c: for asynchronous connect(), enable the same workaround
6605         for BSD 6 as for the Mac. Fixes bug #77637.
6606
6607 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
6608
6609         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
6610         formatted classes. Fixes #77524.
6611
6612 2006-02-24  Raja R Harinath  <rharinath@novell.com>
6613
6614         * class.c (inflate_generic_type): Add a couple more
6615         micro-optimizations.
6616         (inflate_generic_context): Don't use the 'gmethod' from
6617         'inflate_with'.
6618         (mono_class_inflate_generic_method): If the method has generic
6619         parameters, but the passed-in context doesn't have a 'gmethod',
6620         create one.  Use the possibly simplified generic instantiation
6621         from the declaring class instead of the one passed in.
6622
6623 2006-02-24  Raja R Harinath  <harinath@gmail.com>
6624
6625         Make generic method signature and method header handling lazy.
6626         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
6627         (inflate_generic_header): Likewise.
6628         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
6629         parameter to avoid inflating types.
6630         (mono_get_inflated_method): Empty out.
6631         * class.h (mono_class_inflate_generic_method): Update to changes.
6632         * loader.c (mono_get_method_from_token): Don't parse signature for
6633         generic methods, nor methods of generic classes.
6634         (mono_method_signature): Rename from 'mono_method_signature'.
6635         Inflate signature on demand.
6636         (mono_method_get_header): Inflate method header on demand.
6637         * reflection.c: Update to changes.
6638
6639 2006-02-23  Raja R Harinath  <rharinath@novell.com>
6640
6641         * metadata.c (mono_metadata_inflate_generic_inst): If the
6642         instantiation is closed, don't bother expanding it in the new
6643         context.
6644         * class.c (inflate_generic_class): If the generic instantiation
6645         doesn't change after inflation, return the argument itself.
6646         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
6647         Add bounds checks.
6648         (inflate_generic_context): If neither the generic class nor the
6649         generic method instantiations change, return the original context.
6650         * reflection.c (mono_method_get_object): Do
6651         'mono_get_inflated_method' before accessing the ->klass field.
6652         (inflate_mono_method): Don't create a MonoGenericMethod unless
6653         necessary.
6654         (inflate_method): Don't pass a constructed type as the declaring
6655         type of a methodbuilder.
6656
6657 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
6658
6659         * object.c: fix memory overwrite.
6660
6661 2006-02-22  Dick Porter  <dick@ximian.com>
6662
6663         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
6664         it doesn't work any more.
6665         (mono_threads_request_thread_dump): Fix unused variable warnings.
6666
6667 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6668
6669         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
6670         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
6671         the public header file.
6672
6673 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
6674
6675         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
6676
6677 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6678
6679         * class-internals.h, object.c: reduce the size of MonoVTable
6680         and store the interface_offsets array at negative offsets.
6681
6682 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6683
6684         * metadata.c: tweak table descriptors data structures to reduce
6685         size and runtime relocations.
6686
6687 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6688
6689         * marshal.c: fix some types and opcodes to be type-safe
6690         in marshaling wrappers.
6691
6692 2006-02-21  Ankit Jain  <jankit@novell.com>
6693
6694         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
6695
6696 2006-02-21  Raja R Harinath  <rharinath@novell.com>
6697
6698         * metadata.c (get_constraints): Relax debugging checks for monodis.
6699
6700 2006-02-21  Ankit Jain  <jankit@novell.com>
6701
6702         * metadata.c (mono_metadata_load_generic_params): Move the code
6703         checking for ambiguous generic params from here to mono/dis/get.c
6704         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
6705
6706 2006-02-21  Raja R Harinath  <harinath@gmail.com>
6707
6708         Fix assertion triggered when compiling nemerle.
6709         * class.c (mono_get_shared_generic_inst): Rename from
6710         get_shared_inst and make non-static.
6711         * loader.c (mono_get_shared_generic_method): New.  Used to create
6712         the MonoGenericContext-equivalent of a MonoGenericContainer.
6713         (mono_get_method_from_token): Initialize the 'context' field of
6714         the created MonoGenericContainer.
6715         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
6716         * metadata.c (get_constraints): Add sanity check.
6717         * class-internals.h: Add new internal methods.
6718
6719         * reflection.c (verify_safe_for_managed_space): New sanity check.
6720         Currently checks that owner-less generic parameters aren't allowed
6721         in managed space.
6722         (mono_type_get_object): Use it.
6723         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
6724         that are now in mono_type_get_object.
6725         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
6726
6727 2006-02-19  Raja R Harinath  <harinath@gmail.com>
6728
6729         * metadata.c (mono_type_create_from_typespec): Rename from
6730         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
6731         argument and caching of types in the generic container.
6732         (unwrap_arrays, find_generic_param): Remove.
6733         * metadata-internals.h: Update.
6734         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
6735
6736 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
6737
6738         * class.c (mono_class_get_exception_for_failure): Fix a warning.
6739
6740         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
6741         return values. Fixes #77581.
6742
6743         * class.c (mono_fnptr_class_get): Switch name and name_space.
6744
6745         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
6746         classes and add support for [In, Out] attributes.
6747         (mono_marshal_free_asany): Ditto. Fixes #77524.
6748
6749 2006-02-18  Raja R Harinath  <harinath@gmail.com>
6750
6751         * class.c (mono_class_from_generic_parameter): Make more robust to
6752         incomplete MonoGenericContainers from monodis.
6753
6754 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6755
6756         * class-internals.h: added some more exception types.
6757         * class.c, metadata.c: added a few checks to handle missing
6758         types.
6759
6760 2006-02-17  Raja R Harinath  <rharinath@novell.com>
6761
6762         Use owner-less generic-params some more.
6763         * class.c (my_mono_class_from_generic_parameter): Remove.
6764         (mono_class_from_generic_parameter): Handle null image,
6765         param->name and param->owner.
6766         (mono_class_from_mono_type): Update.
6767         (mono_class_create_from_typespec): Remove 'container' parameter.
6768         If that parameter is non-null, the result is always inflated by
6769         'mono_class_get_full' anyway.
6770         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
6771         parameter.
6772         (mono_class_get_full): Update.
6773
6774         * class.c (inflate_generic_type) [GENERICINST]: If the generic
6775         instance is not open, don't bother inflating.
6776         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
6777         parse metadata for inflated classes.
6778         (_mono_class_get): Change GenericContext* parameter to
6779         GenericContainer*.
6780         (mono_class_create_from_typespec): Likewise.  Simplify, and
6781         implement trivially.  All the cases are handled in
6782         mono_class_from_mono_type.  Don't inflate returned class.
6783         (mono_class_get_full): Delegate GENERICINST optimization to
6784         inflate_generic_type.
6785         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
6786
6787 2006-02-16  Dick Porter  <dick@ximian.com>
6788
6789         * socket-io.c (create_object_from_sockaddr): Fix typo.
6790         (create_sockaddr_from_object): Check array lengths before
6791         potentially accessing items off the end.
6792         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
6793         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
6794         (ves_icall_System_Net_Sockets_Socket_Send_internal)
6795         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
6796         length checks to avoid wraparound overflows.
6797         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
6798         contents of the array of sockets
6799         (hostent_to_IPHostEntry2)
6800         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
6801         Check return value of inet_ntop ().
6802         (addrinfo_to_IPHostEntry): Fix typo
6803
6804 2006-02-16  Raja R Harinath  <rharinath@novell.com>
6805
6806         Type metadata parsing doesn't use generic-instantiation information.
6807         * metadata.c (mono_metadata_parse_array_full): Change
6808         MonoGenericContext* parameter to MonoGenericContainer*.
6809         (mono_metadata_parse_type_full): Likewise.
6810         (mono_type_create_from_typespec_full): Likewise.
6811         (mono_metadata_parse_mh_full): Likewise.
6812         (mono_metadata_parse_generic_inst): Likewise.
6813         (do_mono_metadata_parse_generic_class): Likewise.
6814         (do_mono_metadata_parse_type): Likewise.
6815         * metadata-internals.h: Update to changes.
6816         * class.c (mono_class_find_enum_basetype): Likewise.
6817         (mono_class_setup_fields): Likewise.
6818         (mono_class_create_from_typespec): Likewise.
6819         * loader.c (method_from_methodspec): Likewise.
6820         (mono_get_method_from_token): Likewise.
6821         (mono_method_get_header): Likewise.
6822
6823 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6824
6825         * marshal.c: handle additional GENERICINST case (patch from
6826         Thong Nguyen <tum@veridicus.com>).
6827         Fix a few cases where LDIND_I/STIND_I was used for references.
6828
6829 2006-02-16  Raja R Harinath  <rharinath@novell.com>
6830
6831         * reflection.c (mono_reflection_get_token): Remove unused variable.
6832
6833 2006-02-16  Martin Baulig  <martin@ximian.com>
6834
6835         * reflection.c (mono_reflection_get_token): Add support for fields
6836         in instantiated generic types.
6837
6838         * icall.c
6839         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
6840
6841 2006-02-15  Martin Baulig  <martin@ximian.com>
6842
6843         * icall.c
6844         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
6845         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
6846         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
6847         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
6848
6849 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
6850
6851         * class.c, metadata.c, metadata.h, object.c, icall.c,
6852         marshal.c: changed mono_type_get_underlying_type () to do
6853         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
6854         Fixed handling of instantiated generic valuetypes (bug #75479).
6855
6856 2006-02-15  Raja R Harinath  <rharinath@novell.com>
6857
6858         * metadata.c (mono_metadata_decode_signed_value): Simplify.
6859         Delegate to mono_metadata_decode_value, and work on the returned value.
6860
6861         * icall.c (ves_icall_MonoType_GetGenericArguments):
6862         Add consistency check here too.
6863         
6864 2006-02-15  Ankit Jain  <jankit@novell.com>
6865
6866         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
6867         char/short etc.
6868
6869 2006-02-15  Ankit Jain  <jankit@novell.com>
6870
6871         * metadata.c (mono_metadata_decode_signed_value): New function to decode
6872         signed values, used only for representing lower bounds of arrays.
6873         (mono_metadata_parse_array_full): Use new
6874         mono_metadata_decode_signed_value to decode lower bounds.
6875
6876 2006-02-14  Martin Baulig  <martin@ximian.com>
6877
6878         * reflection.c
6879         (mono_reflection_get_token): Support "MonoGenericMethod" and
6880         "MonoGenericCMethod" and allow generic instances / methods.
6881
6882 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
6883
6884         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
6885         to obtain the terminal size using an ioctl.
6886
6887         * object.c (mono_nullable_init): Revert this as nullable reference
6888         types are not valid.
6889         (mono_nullable_box): Ditto.
6890
6891 2006-02-09  Dick Porter  <dick@ximian.com>
6892
6893         * threads.c (mono_thread_detach): Drop a reference to the thread
6894         we're detaching.
6895
6896 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
6897
6898         * object.c (mono_nullable_init): Handle nullable reference types.
6899         (mono_nullable_box): Ditto. Fixes #77446.
6900
6901 2006-02-07  Martin Baulig  <martin@ximian.com>
6902
6903         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
6904
6905 2006-02-07  Ankit Jain  <jankit@novell.com>
6906
6907         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
6908         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
6909         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
6910         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
6911         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
6912         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
6913
6914 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
6915
6916         * class.c (mono_class_create_generic): Set type_token as well.
6917
6918         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
6919         compatible with MS.
6920
6921 2006-02-02  Martin Baulig  <martin@ximian.com>
6922
6923         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
6924         has never been used so far.
6925
6926 2006-02-02  Martin Baulig  <martin@ximian.com>
6927
6928         * mono-debug-debugger.h: Changed comment at the top of this file;
6929         the header is not installed, but it's safe to #include it from
6930         within the JIT.
6931
6932         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
6933         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
6934
6935 2006-02-02  Martin Baulig  <martin@ximian.com>
6936
6937         * mono-debug.h
6938         (MonoSymbolTable): Removed the `metadata_info' field.
6939
6940         * mono-debug.c
6941         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
6942
6943         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
6944         (mono_debugger_add_builtin_types): Removed.
6945         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
6946         (mono_debugger_create_notification_function): We now operate on a
6947         pre-allocated area; take a `gpointer' and return `void'.
6948
6949         * mono-debug-debugger.c
6950         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
6951         (mono_debugger_add_builtin_types): Removed.
6952
6953 2006-02-02  Martin Baulig  <martin@ximian.com>
6954
6955         * threads.c (mono_debugger_create_all_threads): New public method.
6956
6957 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6958
6959         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
6960         breaks on several platforms.
6961
6962 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
6963
6964         * assembly.c: the VS.NET build doesn't supply default values for
6965         MONO_ASSEMBLIES and MONO_CFG_DIR.
6966
6967 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
6968
6969         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
6970         helper function.
6971
6972         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
6973
6974         * loader.c (method_from_memberref): Fix a warning.
6975
6976         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
6977
6978         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
6979         with explicit layout. Fixes #77433.
6980
6981 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
6982
6983         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
6984         max_interface_id is initialized before using it. Fixes #77398.
6985         (ves_icall_Type_GetInterfaces): Ditto.
6986
6987 2006-01-30  Raja R Harinath  <rharinath@novell.com>
6988
6989         * metadata.c (mono_metadata_parse_method_signature_full): Don't
6990         allocate memory for parameter attributes when parsing memberref
6991         signatures.
6992         * loader.c (mono_loader_set_error_method_load): Don't warn.
6993         (method_from_memberref): Ensure MissingMethodException gets thrown
6994         if method is not found.  Make warning more informative.
6995
6996 2006-01-29  Raja R Harinath  <harinath@gmail.com>
6997
6998         Fix #77397
6999         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
7000         return true if is byref.
7001         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
7002         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
7003         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7004
7005 2006-01-27  Raja R Harinath  <rharinath@novell.com>
7006
7007         Fix tests/find-method.2.il
7008         * loader.c (find_method, find_method_in_class): Remove is_inflated
7009         argument.  Revert 2006-01-18 change.
7010         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
7011         is generic, search for method in its generic definition.
7012         * class.c (mono_class_setup_vtable_general): Print generic
7013         arguments of generic types in debugging printf.
7014
7015 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
7016
7017         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
7018
7019         * threads.c (mono_threads_request_thread_dump): New helper function.
7020
7021 2006-01-25  Raja R Harinath  <rharinath@novell.com>
7022
7023         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
7024
7025 2006-01-25  Ankit Jain  <jankit@novell.com>
7026
7027         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
7028         move definition to ..
7029         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
7030         
7031 2006-01-25  Ankit Jain  <jankit@novell.com>
7032             Raja R Harinath  <rharinath@novell.com>
7033
7034         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
7035         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
7036         as necessary.
7037
7038 2006-01-25  Martin Baulig  <martin@ximian.com>
7039
7040         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
7041         `MonoDebuggerThread' into debug-debugger.c.
7042
7043 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7044
7045         * profiler.c: fix printing of data.
7046
7047 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
7048
7049         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
7050           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
7051
7052 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7053
7054         * object.c: fix deadlock related to string interning.
7055
7056 2006-01-23  Martin Baulig  <martin@ximian.com>
7057
7058         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
7059
7060         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
7061
7062 2006-01-23  Martin Baulig  <martin@ximian.com>
7063
7064         * mono-debug.h: Moved the prototypes of some functions which are
7065         used by the JIT here from mono-debug-debugger.h.
7066
7067 2006-01-21  Martin Baulig  <martin@ximian.com>
7068
7069         * Makefile.am: Don't install mono-debug-debugger.h.
7070
7071 2006-01-21  Martin Baulig  <martin@ximian.com>
7072
7073         * mono-debug-debugger.h: Enforce the private status of this header
7074         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
7075         Moved some stuff from mono-debugger-jit-wrapper.h here.
7076
7077 2006-01-20  Raja R Harinath  <rharinath@novell.com>
7078
7079         * class.c (mono_class_from_typeref): Add a sanity test to help
7080         catch lack of assembly load/search hooks.
7081
7082 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
7083
7084         * marshal.c (emit_struct_conv): Relax the fields with same offset
7085         check even more. Fixes #77230.
7086
7087 2006-01-18  Martin Baulig  <martin@ximian.com>
7088
7089         * loader.c (find_method_in_class): Added `gboolean is_inflated'
7090         argument; if false, we compare the uninstantiated signatures.
7091         (method_from_memberref): Compare the uninstantiated signatures;
7092         fixes #76417.
7093
7094 2006-01-18  Robert Jordan  <robertj@gmx.net>
7095
7096         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
7097         Clear the weak link. Fixes bug #77170.
7098
7099         * gc.c (mono_gchandle_free):
7100         Reflect *-gc.c changes (tiny optimization).
7101
7102 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
7103
7104         * metadata.c (mono_metadata_signature_dup): Applied patch from
7105         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
7106         Fixes #77288.
7107
7108 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
7109
7110         * marshal.c (emit_struct_conv): Allow fields with the same offset when
7111         marshalling from native to managed code. Fixes #77230.
7112
7113 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7114
7115         * threadpool.c: fix problem (Mac only) when more than one asynchronous
7116         connect. Fixes bug #77020.
7117
7118 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7119
7120         * class.c: fixed id assignement for nested interfaces (bug #77275).
7121         Added also better info for --print-vtable debugging.
7122
7123 2006-01-12  Martin Baulig  <martin@ximian.com>
7124
7125         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
7126         interfaces on-the-fly; fixes #76625.
7127
7128         * class-internals.h
7129         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
7130         don't need that anymore.
7131
7132 2006-01-12  Miguel de Icaza  <miguel@novell.com>
7133
7134         * socket-io.c
7135         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
7136         To avoid initing the nested_classes when not needed I turned the
7137         PeerCredData as a toplevel internal class, as it has to be shared
7138         anyways. 
7139
7140         Fixes the CASA issue.
7141
7142 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
7143
7144         * domain.c: Accessors for MonoJitInfo
7145
7146         * profiler-private.h: Add jitinfo to the end jit hook
7147
7148         * profiler.[ch]: Define new hooks, called after jitting which give
7149         the MonoJitInfo that was compiled
7150
7151 2006-01-10  Martin Baulig  <martin@ximian.com>
7152
7153         * class.c (mono_class_setup_events): Add support for generic
7154         classes; fixes #76440.
7155
7156 2006-01-06  Raja R Harinath  <rharinath@novell.com>
7157
7158         Fix #77160.
7159         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
7160         on passed-in method.
7161
7162 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7163
7164         * object.c (mono_runtime_invoke_array): Add Nullable support.
7165
7166         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
7167
7168 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
7169
7170         * file-io.c: Don't consider sockets as directory and avoid an endless
7171         loop. Fix bug #76966.
7172
7173 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7174
7175         * object.c (mono_nullable_init): New helper function.
7176         (mono_nullable_box): Ditto.
7177
7178         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
7179
7180         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
7181
7182         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
7183         
7184 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
7185
7186         * class.c (mono_class_is_assignable_from): Make T assignable to 
7187         Nullable<T>.
7188
7189 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
7190
7191         * appdomain.c: Bump corlib version to 46.
7192         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
7193         serialization purpose) and changed ves_icall_System_Reflection_
7194         Assembly_get_code_base signature to accept a boolean (to escape, or 
7195         not, the assembly code base).
7196
7197 2005-12-23  Dick Porter  <dick@ximian.com>
7198
7199         * icall.c: 
7200         * threads-types.h: 
7201         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
7202         CreateEvent icall now returns "created" boolean parameter.
7203
7204 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
7205
7206         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
7207         #76967.
7208
7209         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
7210         when attr_klass is an interface. Fixes #77045.
7211
7212 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
7213
7214         * marshal.c (emit_struct_conv): Fix previous patch.
7215         
7216         * marshal.c (emit_struct_conv): Add a check for fields with the same
7217         offset.
7218
7219 2005-12-20  Raja R Harinath  <rharinath@novell.com>
7220
7221         Fix regression in Mono.C5.
7222         * class.c (mono_class_create_generic): If 'klass' is an interface
7223         set up the interface offsets.
7224         (mono_class_is_assignable_from): Don't throw away generic arguments.
7225
7226 2005-12-19  Raja R Harinath  <rharinath@novell.com>
7227
7228         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
7229         type parameters.
7230
7231 2005-12-15  Raja R Harinath  <rharinath@novell.com>
7232
7233         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
7234         dead store.
7235         (do_mono_metadata_parse_generic_class): Don't pass the current
7236         generic context when parsing the type being instantiated: it
7237         cannot use it, anyway.
7238
7239         * loader.c (method_from_memberref): Don't inflate a signature if
7240         it doesn't contain any type parameters.
7241
7242 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
7243
7244         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
7245
7246 2005-12-14  Martin Baulig  <martin@ximian.com>
7247
7248         * class.c
7249         (mono_type_get_name_recurse): Don't return null for type
7250         parameters and open generic classes.
7251         (mono_class_setup_methods): Don't exclude generic instances.
7252         (mono_get_unique_iid): Use different IDs for different
7253         instantiations of the same generic type.
7254         (mono_class_setup_vtable): Only use setup_generic_vtable() for
7255         open generic instances; create a normal vtable for closed generic
7256         instances.
7257         (mono_class_setup_vtable_general): We're now also called for
7258         closed generic instances.
7259
7260         * reflection.c
7261         (mono_reflection_bind_generic_parameters): Correctly use
7262         mono_metadata_lookup_generic_inst() everywhere.
7263
7264 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
7265
7266         * object.c (mono_class_create_runtime_vtable): Call 
7267         mono_class_setup_vtable ().
7268
7269         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
7270         function.
7271         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
7272         #76959.
7273
7274         * loader.c (mono_loader_set_error_type_load): Print the type load
7275         warnings to the console so they are more visible to the user.
7276         (mono_loader_set_error_method_load): Ditto.
7277
7278         * reflection.c (ensure_runtime_vtable): Revert the last change as it
7279         is still broken.
7280         
7281         * reflection.c (ensure_runtime_vtable): Fix build.
7282
7283         * reflection.c (ensure_runtime_vtable): Disable an optimization which
7284         doesn't work in all cases.
7285
7286 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
7287
7288         * object.c (mono_array_new_full): Treat a single dimensional array
7289         with 0 lower bounds as an szarray. Fixes #76973.
7290
7291         * reflection.c (custom_attr_visible): Really fix this.
7292
7293 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
7294
7295         * reflection.c (custom_attr_visible): Allow nested public attributes
7296         as well.
7297
7298         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
7299         interface check.
7300
7301 2005-12-12  Raja R Harinath  <harinath@gmail.com>
7302
7303         * class.c (set_generic_param_owner): Delete.
7304         (mono_class_create_from_typedef): Don't set ->owner field of
7305         generic parameters to "param containers" of enclosing classes.
7306         * reflection.c (mono_reflection_initialize_generic_parameter):
7307         Likewise.
7308
7309 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
7310
7311         * reflection.c (custom_attr_visible): Fix build.
7312
7313 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
7314
7315         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
7316         private attributes.
7317         
7318         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
7319         handling of null parameter defaults.
7320
7321 2005-12-09  Raja R Harinath  <rharinath@novell.com>
7322
7323         * class.c (mono_class_from_generic_parameter): Don't set
7324         klass->generic_container.
7325         (my_mono_class_from_generic_parameter): Likewise.
7326
7327 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
7328
7329         * reflection.c (load_public_key): Fix a warning.
7330         (method_encode_code): Fix unaligned accesses.
7331
7332 2005-12-07  Martin Baulig  <martin@ximian.com>
7333
7334         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
7335
7336         * reflection.c
7337         (write_generic_param_entry): Encode our custom attrs.
7338
7339         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
7340
7341 2005-12-07  Martin Baulig  <martin@ximian.com>
7342
7343         * reflection.c (encode_new_constraint): Removed; we don't use the
7344         `NewConstraintAttribute' anymore.
7345
7346 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
7347
7348         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
7349         not fire a TypeResolve event when Assembly.GetType () is called.
7350
7351 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
7352
7353         Beginning of support for nullable types in the runtime. Parts of
7354         this patch are from Martin.
7355
7356         * appdomain.c (MONO_CORLIB_VERSION): Bump
7357
7358         * domain.c (mono_init_internal): get the nullable type
7359
7360         * class.c (mono_class_is_nullable): New method
7361         (mono_class_get_nullable_param): New mehod
7362         (mono_class_create_generic): In types T? set cast_class to T
7363
7364         * class-internals.h (MonoDefaults): new nullable default class
7365         (mono_class_get_nullable_param, mono_class_get_nullable_param):
7366         new methods.
7367
7368 2005-12-05  Raja R Harinath  <rharinath@novell.com>
7369
7370         * metadata.c (select_container): New.  Refactor code to select the
7371         appropriate GenericContainer given the type of generic parameter
7372         we are looking for.
7373         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
7374         not a MonoGenericContext.  Use select_container.  Update parameters.
7375         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
7376         and MONO_TYPE_MVAR.
7377         (unwrap_arrays): Remove duplicate tests.
7378         (find_generic_param): Rename from 'has_same_context'.  Now walks a
7379         generic instantiated class to find any arguments that are generic
7380         parameters.
7381         (mono_type_create_from_typespec_full): Use find_generic_param to
7382         avoid evicting some generic instantiations from the typespec
7383         cache.
7384
7385 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
7386
7387         * reflection.c: fixed writing of doubles on ARM FPA.
7388
7389 2005-12-02  Robert Jordan  <robertj@gmx.net>
7390
7391         * icall.c: Fixed EventInfo.ReflectedType (#76829).
7392
7393 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7394
7395         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
7396         least on SUSE 10 they are not the same (on debian, they are just the
7397         same thing).
7398
7399 2005-12-01  Raja R Harinath  <rharinath@novell.com>
7400
7401         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
7402         DeclaringType for VARs and MVARs.
7403         * class.c (set_generic_param_owner): Fix initialization of owner
7404         fields.
7405
7406 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7407
7408         * icall.c: fixed Enum.ToObject() to correctly convert the values.
7409
7410 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7411
7412         * threadpool.c: workaround for a bug that shows up on the Mac:
7413         select()+connect() on a blocking socket is not like it should
7414         be, so we proceed to connect() in that case, wasting the I/O
7415         threadpool thread until connect succeedes. Fixes bug #75436.
7416
7417 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7418
7419         * threadpool.c: fix typo when setting file descriptor states.
7420
7421 2005-11-28  Raja R Harinath  <rharinath@novell.com>
7422
7423         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
7424         * metadata.c (mono_metadata_parse_method_signature_full): Don't
7425         create a temporary signature container.
7426         (mono_metadata_parse_generic_param): Update to changes.
7427         (mono_type_create_from_typespec_full): Update to changes.
7428         * loader.c (method_from_memberref): Don't use a
7429         MonoGenericContainer while parsing a memberref signature.
7430         (method_from_methodspec): Remove dead-store of the 'container'
7431         variable.  It's overwritten before use.
7432
7433         * metadata.c (mono_type_create_from_typespec_full): Make debugging
7434         checks tighter.
7435         (mono_metadata_parse_generic_param): Likewise.
7436         * loader.c (find_method_in_class): Does not need a
7437         MonoGenericContainer.  Use 'mono_method_signature' rather than
7438         'mono_method_signature_full'.
7439         (find_method, mono_get_method_constrained, method_from_memberref):
7440         Update to changes.
7441
7442         * metadata.c (mono_type_create_from_typespec_full): Ensure that
7443         owner-less generic-parameters are never evicted from the typespec
7444         cache.
7445
7446         * loader.c (method_from_memberref): Don't use the current context
7447         when parsing signatures.
7448         (method_from_methodspec, mono_get_method_from_token): Update to changes.
7449
7450         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
7451         side-effects in g_assert.
7452         * loader.c (mono_get_method_from_token): Resolve klass earlier so
7453         that we don't potentially lose information.
7454
7455 2005-11-26  Dick Porter  <dick@ximian.com>
7456
7457         * icall.c:
7458         * threads.c: icalls to implement basic (ie, not named)
7459         System.Threading.Semaphore.
7460
7461 2005-11-24  Dick Porter  <dick@ximian.com>
7462
7463         * process.c
7464         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
7465         Use GetProcessId() if it's available.
7466
7467 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
7468
7469         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
7470
7471 2005-11-23  Raja R Harinath  <rharinath@novell.com>
7472             Ankit Jain  <jankit@novell.com>
7473
7474         * loader.c (mono_get_method_from_token): Initialize 'method' field
7475         of all generic parameters before parsing the signature.  Remove
7476         code that "fixed"-up MVAR references.
7477
7478 2005-11-23  Ankit Jain  <jankit@novell.com>
7479
7480         * metadata.c (mono_metadata_has_generic_params):
7481         (mono_metadata_load_generic_param_constraints):
7482         (mono_metadata_load_generic_params): Move duplicate code ...
7483         (mono_metadata_get_generic_param_row): ... here. Returns the
7484         first row-id in GenericParam table for a given owner (token).
7485         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
7486         prototype.
7487
7488 2005-11-23  Raja R Harinath  <rharinath@novell.com>
7489             Ankit Jain  <jankit@novell.com>
7490
7491         * metadata.c (mono_metadata_class_equal): Pass signature_only when
7492         comparing VARs too.
7493         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
7494         type->data.generic_param only if the type is an MVAR.
7495         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
7496         leak owner-less VARs and MVARs into managed space.
7497
7498 2005-11-21  Martin Baulig  <martin@ximian.com>
7499
7500         * class-internals.h
7501         (MonoMethod): Moved the `generic_container' here from
7502         `MonoMethodNormal' since we now also need it for
7503         `MonoMethodPInvoke';
7504         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
7505         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
7506         an union containing both `MonoMethodNormal' and
7507         `MonoMethodPInvoke'.
7508
7509         * loader.c
7510         (mono_get_method_from_token): Allow implementing generic methods
7511         as interncalls.
7512
7513         * threads.c
7514         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
7515         icall.
7516
7517 2005-11-17  Dick Porter  <dick@ximian.com>
7518
7519         * icall.c: 
7520         * process.h: 
7521         * process.c: Split the Process Start_internal icall into
7522         ShellExecuteEx_internal and CreateProcess_internal, which are
7523         called depending on whether UseShellExecute is true.  Fixes bug
7524         76670.
7525
7526         * appdomain.c (MONO_CORLIB_VERSION): Incremented
7527
7528 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
7529
7530         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
7531         'msize' parameters, use the information in 'mspec' instead.
7532         (emit_object_to_ptr_conv): Ditto.
7533
7534         * marshal.c (emit_struct_conv): Handle explicit layout structs with
7535         fields out of order. Fixes #76733.
7536
7537 2005-11-17  Ankit Jain  <jankit@novell.com>
7538
7539         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
7540
7541 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
7542
7543         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
7544           bug #76575.
7545
7546 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
7547
7548         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
7549         for types with non-auto layout. Fixes #76717.
7550
7551 2005-11-16  Ankit Jain  <jankit@novell.com>
7552
7553         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
7554         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
7555         if generic_context is null.
7556           (mono_metadata_generic_param_equal): param->owner can be null.
7557           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
7558         null.
7559
7560 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
7561
7562         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
7563         the correct value.
7564
7565 2005-11-15  Martin Baulig  <martin@ximian.com>
7566
7567         * object.c (set_value): Use mono_class_from_mono_type() instead of
7568         the hack for generic instances; fixes #76136.
7569
7570 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
7571
7572         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
7573         fields.
7574
7575         * image.c (load_metadata_ptrs): Initialize the new fields.
7576
7577         * reflection.c (create_dynamic_mono_image): Ditto.
7578
7579         * reflection.c (build_compressed_metadata): Use the new fields.
7580
7581         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
7582         icall.
7583
7584         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
7585         icall.
7586         
7587 2005-11-15  Ankit Jain  <jankit@novell.com>
7588             Raja R Harinath  <harinath@gmail.com>
7589
7590         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
7591         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
7592         new per-generic_container cache if the cached MonoType's context matches
7593         the current context.
7594           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
7595         to the expected context.
7596           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
7597
7598 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7599
7600         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
7601         we changed the signature of an icall.
7602         * icall.c: Modify to mono_double_ParseImpl return true/false 
7603         depending on the success, instead of throwing the exception. This will
7604         help us in Double.TryParse methods.
7605         
7606 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
7607
7608         * marshal.c (emit_marshal_object): Throw an exception when
7609         marshalling 'object' instead of crashing. Fixes #76696.
7610
7611 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7612
7613         * class-internals.h: Add prototype for mono_type_get_full_name ().
7614
7615 2005-11-11  Dick Porter  <dick@ximian.com>
7616
7617         * threads.c (mono_thread_manage): Make sure the main thread has
7618         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
7619
7620 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7621
7622         * loader.c (mono_loader_set_error_type_load): Log a warning to the
7623         console about the missing type.
7624         (mono_loader_set_error_method_load): Ditto.
7625
7626 2005-11-09  Miguel de Icaza  <miguel@novell.com>
7627
7628         * mono-config.c (mono_get_config_dir): Set the system defaults if
7629         none is specified.
7630
7631         * assembly.c (mono_set_dirs): New API entry point to set the
7632         assembly and the config directory in one call
7633
7634 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
7635
7636         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
7637         the ftnptr was created from a delegate in a domain other than the
7638         current domain. Fixes #75377.
7639
7640         * exception.h exception.c: Add mono_get_exception_not_supported ().
7641
7642 2005-11-08  Martin Baulig  <martin@ximian.com>
7643
7644         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
7645
7646 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
7647
7648         * security-manager.h: Added definitions to deal with strongname key 
7649         pairs bigger (and smaller) than 1024 bits.
7650         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
7651         adjust wrt the public key length being used.
7652
7653 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
7654
7655         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
7656           Windows build (r51396-51397).
7657
7658 2005-11-03  Martin Baulig  <martin@ximian.com>
7659
7660         * class.c (mono_class_setup_vtable_general): Also add generic
7661         methods to the vtable; fixes #76581.
7662
7663 2005-11-01  Miguel de Icaza  <miguel@novell.com>
7664
7665         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
7666         sure that we lookup GetString method from the System.Text.Encoding
7667         class, not the derived class or we get an empty method.
7668
7669         Fixed class #76612.
7670
7671 2005-10-25  Miguel de Icaza  <miguel@novell.com>
7672
7673         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
7674         if it has been previously set (embedders). 
7675
7676         Make mono_set_rootdir available also on Unix.
7677
7678 005-10-24  Robert Jordan  <robertj@gmx.net>
7679
7680         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
7681
7682 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7683
7684         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
7685         only calls which are made to native code use this flag.
7686
7687         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
7688
7689 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
7690
7691         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7692         Add support for FieldBuilders.
7693
7694 2005-10-29  Martin Baulig  <martin@ximian.com>
7695
7696         * mono-debug.c
7697         (mono_debug_using_mono_debugger): New public method; returns
7698         whether we're running inside the debugger.
7699
7700 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
7701
7702         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
7703         for Method/Constructor/FieldBuilders.
7704
7705 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
7706
7707         * reflection.c (module_add_cattrs): Save custom attributes for global methods
7708         and fields as well.
7709
7710 2005-10-26  Martin Baulig  <martin@ximian.com>
7711
7712         * mono-debug-debugger.c
7713         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
7714
7715 2005-10-24  Raja R Harinath  <harinath@gmail.com>
7716
7717         * icall.c (base64_to_byte_array): Don't pass an out-of-range
7718         integer to isspace.
7719
7720 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
7721
7722         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
7723         when passing valuetypes byref. Fixes #76502.
7724
7725 2005-10-19  Jackson Harper  <jackson@ximian.com>
7726
7727         * profiler.c: Don't put a . in front of types that are not in a
7728         namespace.
7729
7730 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
7731
7732         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
7733
7734 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
7735
7736         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
7737         #76436.
7738         (mono_marshal_get_ldflda_wrapper): Fix a warning.
7739
7740 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7741
7742         * assembly.c metadata-internals.h icall.c: Define an additional
7743         parameter for mono_assembly_name_parse_full, so we can avoid creating
7744         S.R.AssemblyName.Version when no version info wasn't passed.
7745         
7746 2005-10-09  Miguel de Icaza  <miguel@novell.com>
7747
7748         * class.c (mono_type_get_full_name): Reimplement method that was
7749         removed. 
7750
7751         * image.c: Some docs
7752
7753 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
7754
7755         * profiler.c (output_newobj_profile): Fix printing of Total memory
7756         on x86.
7757
7758 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7759
7760         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
7761
7762 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
7763
7764         * threads.c: remove debug output.
7765
7766 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7767
7768         * threads.c (mono_thread_manage): Fix crashes if more than 64
7769         threads need to be aborted. Hopefully fixes #75899.
7770
7771         * assembly.c (mono_stringify_assembly_name): New helper function.
7772
7773         * class.c: Use mono_stringify_assembly_name instead of the similar
7774         static function.
7775
7776         * assembly.h assembly.c: Add support for calling a postload search 
7777         hook if an assembly cannot be loaded.
7778
7779         * appdomain.c: Register new search hooks which call the AssemblyResolve
7780         events in AppDomain. Fixes #75231
7781
7782 2005-10-07  Martin Baulig  <martin@ximian.com>
7783
7784         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
7785         methods without debug info.
7786
7787 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
7788
7789         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
7790         wrappers.
7791
7792 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7793
7794         * file-io.c: now that we return symlinks, use lstat and, when the file
7795         is a symbolic link, stat, to get the file attributes. Also avoid the
7796         conversion to/from utf16/external.
7797
7798 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
7799
7800         * class.c (mono_class_layout_fields): Compute klass->has_references
7801         correctly if an embedded valuetype is not yet initialized. Fixes
7802         #76331.
7803
7804 2005-10-04  Martin Baulig  <martin@ximian.com>
7805
7806         * metadata.c
7807         (mono_metadata_load_generic_param_constraints): New public
7808         function; splitted the constraints loading out from
7809         mono_metadata_load_generic_params().
7810
7811         * class.c (mono_class_create_from_typedef): Call
7812         mono_metadata_load_generic_param_constraints() after setting up
7813         the type and creating our parent; fixes #75329.
7814
7815 2005-10-04  Martin Baulig  <martin@ximian.com>
7816
7817         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
7818         non-dynamic parent classes.
7819
7820 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
7821
7822         * file-io.c : win32 build fix (ETXTBSY seems not found).
7823
7824 2005-10-04  Martin Baulig  <martin@ximian.com>
7825
7826         * reflection.c
7827         (mono_image_get_methodspec_token): Make the cache actually work;
7828         fixes #75974.
7829
7830 2005-10-04  Martin Baulig  <martin@ximian.com>
7831
7832         * class.c (mono_class_name_from_token): Removed the unneccessary
7833         `MonoGenericContext *' argument.
7834
7835 2005-10-04  Martin Baulig  <martin@ximian.com>
7836
7837         * loader.c
7838         (method_from_methodspec): Make the caching work again; fixes the
7839         performance regression from #76262.
7840
7841 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7842
7843         * file-io.c:
7844         * file-io.h:
7845         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
7846         GetFileSystemEntries that performs the same work but without going
7847         into io-layer, locking, etc.
7848
7849 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
7850
7851         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
7852         ThreadState_Stopped as well. Fixes #76047.
7853
7854 2005-09-29  Martin Baulig  <martin@ximian.com>
7855
7856         * class.c
7857         (inflate_generic_context): If the new context has a `gmethod', set
7858         its `container' that that gmethod's `container'.
7859
7860         * metadata.c
7861         (mono_metadata_parse_generic_param): Simplify things;
7862         `generic_container = generic_context->container;' is just fine.
7863
7864         * loader.c (method_from_methodspec): Code cleanups.
7865
7866 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7867
7868         * decimal.c: fix warning (and let gcc generate correct
7869         code on ARM with optimizations).
7870
7871 2005-09-28  Martin Baulig  <martin@ximian.com>
7872
7873         * loader.c
7874         (method_from_memberref): Added `MonoGenericContext *class_context'
7875         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
7876         (method_from_methodspec): If we're a memberref, use the enclosing
7877         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
7878
7879 2005-09-28  Martin Baulig  <martin@ximian.com>
7880
7881         * object.c (mono_runtime_invoke_array): Added support for
7882         MONO_TYPE_GENERICINST; fixes #75917.
7883
7884 2005-09-27  Martin Baulig  <martin@ximian.com>
7885
7886         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
7887         `k->byval_arg.type' to determine the actual type.
7888
7889         * loader.c (method_from_methodspec): Removed some hacks.
7890
7891 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
7892
7893         * class-internals.h (mono_field_is_deleted): Do the test for
7894         rtspecialname before we check the actual name of the field. This
7895         prevents us from dereferencing a pointer into the string table,
7896         saving us from accessing a few pages
7897
7898         * *.c: Replace the use of {Enter,Leave}CriticalSection with
7899         macros. This will allow a deadlock debugger to easily be plugged
7900         in.
7901
7902 2005-09-27  Martin Baulig  <martin@ximian.com>
7903
7904         * loader.c (method_from_methodspec): Create a "signature"
7905         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
7906
7907 2005-09-27  Martin Baulig  <martin@ximian.com>
7908
7909         * class.c
7910         (inflate_generic_class): Correctly set the new context's
7911         container.
7912
7913         * loader.c
7914         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
7915         instead of a `MonoGenericContext *'.
7916         (mono_method_signature_full): Take a `MonoGenericContainer *'
7917         instead of a `MonoGenericContext *'.
7918
7919         * metadata.c
7920         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
7921         instead of a `MonoGenericContext *'.
7922         (mono_metadata_parse_method_signature_full): Likewise.
7923
7924 2005-09-26  Martin Baulig  <martin@ximian.com>
7925
7926         * class.c
7927         (mono_class_from_generic_parameter): Set `klass->generic_container'
7928         (mono_class_from_generic_parameter): Likewise.
7929         (mono_bounded_array_class_get): We inherit the generic container
7930         from the element class.
7931
7932         * loader.c
7933         (find_method, find_method_in_class): Take a `MonoGenericContext *'
7934         argument rather than computing it here.
7935         (method_from_memberref): Correctly set the generic context before
7936         parsing the signature.  Fixes #75681.
7937
7938 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
7939
7940         * object.c (mono_class_has_special_static_fields): Fix warnings.
7941
7942 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7943
7944         * assembly.c: Add parse_public_key function, to
7945         par the public keys. Also added mono_assembly_name_parse_full,
7946         to define it the parsed key should be freed or not.
7947         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
7948         to parse a long format assembly name.
7949         * metadata-internals.h: Keep mono_assembly_name_parse_full as
7950         private, since calling it to preserve the key requires
7951         freeing it manually.
7952         
7953 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
7954
7955         * locales.c : removed HAVE_ICU part.
7956
7957 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7958
7959         * object.c (mono_class_create_runtime_vtable): Avoid calling 
7960         field_is_special_static if the klass has no special static fields.
7961
7962         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
7963         (MonoCachedClassInfo): Likewise.
7964
7965         * object.c (mono_class_has_special_static_fields): New helper function.
7966
7967 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7968
7969         * class.c (mono_class_create_from_typedef): Don't call 
7970         interfaces_from_typedef_full for enums.
7971         (mono_class_create_from_typedef): Compute the base types of enums directly
7972         without calling mono_class_setup_fields ().
7973         (mono_class_find_enum_basetype): New helper function.
7974
7975         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
7976         one place inside the string heap.
7977         
7978 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
7979
7980         * class.c: locking fixes, code cleanups, some docs added.
7981         Allocate some data structures in the image mempool.
7982
7983 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7984
7985         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
7986         the example code.
7987         
7988 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
7989
7990         * class-internals.h, class.c, reflection.c: reduce memory taken by
7991         MonoClass.
7992
7993 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
7994
7995         * metadata.c, metadata.h, loader.h: documentation updates, code and
7996         API cleanups.
7997
7998 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7999
8000         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
8001         the example code.
8002
8003         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
8004         page faults caused by the runtime while reading metadata.
8005
8006 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8007
8008         * socket-io.c: the field names were changed 3 months ago and no one
8009         realized until bug #76077 got filed!
8010
8011 2005-09-20  Martin Baulig  <martin@ximian.com>
8012
8013         * icall.c (assembly_icalls): Removed some unused debugger icalls.
8014
8015 2005-09-20  Martin Baulig  <martin@ximian.com>
8016
8017         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
8018         write the rank into the class entry.
8019
8020 2005-09-20  Martin Baulig  <martin@ximian.com>
8021
8022         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
8023
8024 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
8025
8026         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8027
8028         * icall.c (custom_attrs_defined_internal): New icall.
8029
8030         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
8031         function.
8032         (mono_custom_attrs_construct_by_type): New helper function.
8033
8034 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
8035
8036         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
8037         terminate the resulting string. Fixes #76123.
8038
8039 2005-09-16  Martin Baulig  <martin@ximian.com>
8040
8041         * mono-debug.c
8042         (mono_debug_add_method): Ignore inflated methods for the moment.
8043
8044 2005-09-14  Martin Baulig  <martin@ximian.com>
8045
8046         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
8047
8048 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
8049
8050         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
8051         return a success/failure indication.
8052         (mono_metadata_interfaces_from_typedef_full): Ditto.
8053         (get_constraints): Ditto.
8054
8055 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
8056
8057         * marshal.c (emit_marshal_array): Fix handling of null arrays.
8058         
8059         * marshal.c (emit_marshal_array): Add support for returning string
8060         arrays from delegates. Fixes #76063.
8061
8062         * marshal.c: Use the emit_ldloc/stloc macros where possible.
8063
8064 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8065
8066         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
8067         icall.
8068
8069 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
8070
8071         * reflection.c icall.c: Fix after mono_get_exception_type_load
8072         signature change.
8073
8074         * assembly.c (mono_assembly_get_assemblyref): New helper function.
8075         (mono_assembly_load_reference): Use the new helper.
8076
8077         * class-internals.h (MonoLoaderError): New structure containing 
8078         information about type loading errors.
8079
8080         * class-internals.h loader.c: Add APIs to store per-thread loader
8081         error information.
8082
8083         * loader.c class.c: Set the loader error if needed.
8084
8085         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
8086
8087 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
8088
8089         * decimal.c: fixed to handle the broken ARM fp format.
8090
8091 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
8092
8093         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
8094         broken.
8095
8096 2005-09-06  Martin Baulig  <martin@ximian.com>
8097
8098         * domain.c (supported_runtimes): Added v2.0.50727.
8099
8100 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
8101
8102         * culture-info.h: reduce the size of some structures.
8103
8104 2005-09-05  Martin Baulig  <martin@ximian.com>
8105
8106         Reflect latest API changes in the August CTP.
8107
8108         * icall.c
8109         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
8110         ("MonoType.HasGenericArguments"): Removed.
8111         ("MonoMethod.BindGenericParameters"): Renamed to
8112         "MakeGenericMethod".
8113         ("MethodBuilder.BindGenericParameters"): Renamed to
8114         "MakeGenericMethod".    
8115
8116 2005-09-05  Martin Baulig  <martin@ximian.com>
8117
8118         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
8119
8120 2005-09-05  Martin Baulig  <martin@ximian.com>
8121
8122         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8123
8124         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
8125         generic_container is non-NULL.
8126
8127 2005-09-05  Martin Baulig  <martin@ximian.com>
8128
8129         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8130
8131         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
8132
8133 2005-08-29  Michal Moskal  <malekith@nemerle.org>
8134
8135         * reflection.c (encode_locals,
8136         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
8137         for large generic types.
8138
8139 2005-09-05  Martin Baulig  <martin@ximian.com>
8140
8141         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8142
8143         * class.c (mono_dup_array_type): New public method.
8144         (mono_metadata_signature_deep_dup): New public method.
8145         (dup_type): Correctly duplicate array and function types.
8146
8147 2005-09-05  Martin Baulig  <martin@ximian.com>
8148
8149         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8150
8151         * reflection.c (get_default_param_value_blobs): Handle generic types
8152         and generic methods.
8153
8154 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
8155
8156         * class.c: Fixed error reporting (method/class were inversed) for 
8157         inheritance demands.
8158         * security-manager.c|h: Added the AppDomain when calling the managed
8159         System.Security.SecurityManager.InheritanceDemand method.
8160
8161 2005-09-01  Raja R Harinath  <rharinath@novell.com>
8162
8163         * reflection.c (encode_marshal_blob): 'marshaltype' and
8164         'marshaltyperef' are alternate sources for the custom marshaler
8165         name.
8166
8167 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
8168
8169         * class.c: fix creation of array classes with rank == 1
8170         (patch by Ankit Jain <jankit@novell.com>).
8171
8172 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
8173
8174         * object.c: fix check for creating the bound data for arrays vs
8175         szarrays.
8176
8177 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8178
8179         * object.c: configuration file name is now based on the executable name,
8180         not the image name. Fixes bug #75931.
8181
8182 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
8183
8184         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
8185         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
8186
8187 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
8188
8189         * rand.c: Use wincrypt.h instead of WinCrypt.h.
8190
8191 2005-08-24  Ankit Jain  <jankit@novell.com>
8192             Raja R Harinath  <rharinath@novell.com>
8193
8194         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
8195           called by it recursively.
8196           (mono_class_init): Remove special case in pending_init handling, since it's
8197           superseded by the fix to mono_class_from_typeref.
8198
8199 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8200
8201         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
8202         BROKEN_THREAD_START stuff.
8203
8204 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
8205
8206         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
8207         trampoline.
8208
8209         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
8210         
8211         * object.c (mono_delegate_ctor): Replace the original function address with
8212         a delegate trampoline.
8213
8214 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
8215
8216         * icall.c: add boolean argument to base64_to_byte_array and 
8217         InternalFromBase64String to control whether a whitespace-only string
8218         is allowed (or should casue a FormatException to be thrown). We need
8219         this as the behavior has changed between MS.NET 1.x and 2.0, and we
8220         to match the MS behaviour in both profiles.
8221         * appdomain.c: Bump corlib version.
8222
8223 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8224
8225         This patch implements a big portion of publisher policy
8226         support, used to bind assembly versions and redirect
8227         one assembly from version A to version B.
8228
8229         * assembly.c:
8230         New GSList loaded_assembly_bindings, for storing the cached
8231         assembly bindings.
8232         (assembly_binding_maps_name): New static function for checking if a 
8233         assembly binding information maps an assembly name.
8234         (mono_assembly_binding_info_free): New function for freeing
8235         assembly binding information resources.
8236         (get_publisher_policy_info): New static function for retrieving 
8237         assembly binding information from a MonoImage.
8238         (compare_versions): New static function for comparing an assembly
8239         binding information data and the version of an assembly name.
8240         (check_policy_versions): New static function for checking if an
8241         assembly binding info mapping an assembly name is valid for it.
8242         (mono_assembly_load_publisher_policy): New static function for
8243         loading the 'policy.major.minor.MyAssembly' image for an assembly
8244         with an assembly name 'aname'.
8245         (mono_assembly_bind_version): New static function for updating
8246         assembly redirection.
8247         (mono_assembly_apply_binding): New static function for applying
8248         assembly binding.
8249         (search_binding_loaded): New static function for searching 
8250         loaded assembly binding infos in the cache domain.
8251         (mono_assembly_load_full): Don't apply assembly binding for
8252         reflection only assemblies.
8253
8254         * metadata-internals.h: Add MonoAssemblyBindingInfo,
8255         which contains information about assembly binding. Also
8256         declare signature for mono_config_parse_publisher_policy ()
8257         function, used to retrieve pub policy info.
8258         
8259         * mono-config.c:
8260         (publisher_policy_start): New static function used to parse publisher 
8261         policy config files.
8262         (publisher_policy_parser): New static MonoParseHandler containing 
8263         the functions used when parsing config files.
8264         (mono_config_parse_publisher_policy): New function for parsing
8265         publisher policy files.
8266         
8267 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
8268
8269         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
8270
8271         * marshal.c (mono_delegate_free_ftnptr): Ditto.
8272
8273         * object.c (mono_get_addr_from_ftnptr): New helper function.
8274
8275         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
8276
8277         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8278
8279 2005-08-19  Dick Porter  <dick@ximian.com>
8280
8281         * threads.c, threads.h, appdomain.c, appdomain.h,
8282         profiler-private.h, monitor.c, object.c, object-internals.h,
8283         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
8284         store the thread ID, so it can hold a 64 bit value if needed.
8285
8286 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
8287
8288         * reflection.c (mono_reflection_create_dynamic_method): Store the
8289         handle class into the method references as well so ldtoken works in
8290         dynamic methods.
8291
8292         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
8293         types.
8294
8295 2005-08-19  Ankit Jain <jankit@novell.com>
8296
8297         Fix #75847.
8298         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
8299           here rather than using the method signature of a arbitrary function
8300           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
8301           two arguments.
8302           Hack done with Harinath.
8303
8304 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8305
8306         * threadpool.c: disable printing stack traces when we get a exception
8307         in a threadpool thread. I need to do more testing to figure out which
8308         cases actually print this. Fixes bug #75828.
8309
8310 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8311
8312         * icall.c: there might be ignored whitespace after the last '='. This
8313         fixes length computation and bug #75840.
8314
8315 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
8316
8317         * assembly.c (mono_assembly_load_full): Consider .exe extension as
8318         well. Fixes #75809.
8319
8320         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
8321         #75784.
8322         
8323         * reflection.c (create_custom_attr_data): Ditto.
8324
8325 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
8326
8327         * locales.c, culture-info.h : removed RegionLCIDMap.
8328         * culture-info-tables.h : regenerated.
8329
8330 2005-08-16  Martin Baulig  <martin@ximian.com>
8331
8332         * class.c (mono_type_get_name_recurse): Small fix.
8333
8334 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
8335
8336         * locales.c : indentation fixie.
8337
8338 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
8339
8340         * object-internals.h,
8341           locales.h,
8342           locales.c,
8343           culture-info.h,
8344           icall.c : added RegionInfo table support.
8345         * culture-info-table.h : regenerated for region support.
8346
8347 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
8348
8349         * reflection.c (resolve_object): handle all kinds of MonoMethod
8350         including generic ones
8351
8352 2005-08-12  Ankit Jain <jankit@novell.com>
8353
8354         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
8355           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
8356
8357 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
8358
8359         * process.c: Don't close a thread handle when it's NULL. This is a
8360         workaround for bug #75733.
8361
8362 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
8363
8364         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
8365
8366 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
8367
8368         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
8369
8370 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8371
8372         * threadpool.c: if a work item in the thread pool has a callback that
8373         catches a exception, don't propagate it after invoking the callback.
8374         Fixes bug #75336.
8375
8376 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
8377
8378         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
8379
8380         * class-internals.h (MonoCachedClassInfo): Add some new fields.
8381
8382         * class.c (mono_class_init): Load field info lazily in the AOT case.    
8383
8384         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
8385
8386 2005-08-03  Ankit Jain  <jankit@novell.com>
8387
8388         Fix #75683.
8389         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
8390           PInvoke calling convention is 0.
8391
8392 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
8393
8394         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
8395         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
8396
8397 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
8398
8399         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
8400         to handle threads not started by the GC (patch by Michael Meeks
8401         <michael.meeks@novell.com>).
8402
8403 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
8404
8405         * reflection.c: Make buffer used in emitting types larger for some
8406         big generic types (patch by Michal Moskal).
8407
8408 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
8409
8410         * mono-debug.c: Fix some (not all) alignment problems.
8411
8412 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8413
8414         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
8415         Invoke mono_image_load_from_data_full passing the refonly
8416         parameter.
8417
8418         * assembly.c
8419         (mono_assembly_open_from_bundle): Add the refonly argument, 
8420         in order to pass it to other methods it calls to.
8421         (do_mono_assembly_open): Add the refonly argument, in order 
8422         to pass it to other methods it calls to.
8423         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
8424         the refonly parameter to it.
8425
8426         * image.c: Add loaded_images_refonly_hash and
8427         loaded_images_refonly_guid_hash to cache the reflection
8428         only loaded images.
8429         (mono_images_init): Initialize the hash tables used for
8430         caching the reflection only images.
8431         (load_modules): Invoke mono_image_open_full passing the refonly
8432         parameter to load the modules the correct way.
8433         (build_guid_table): Add the refonly argument, to re-build the 
8434         correct hash table.
8435         (do_mono_image_open): Added the refonly argument, in order to
8436         define it for the loaded image.
8437         (mono_image_loaded_full): New function, which receives an
8438         additional parameter to look for the image in the refonly or
8439         non-refonly section.
8440         (mono_image_loaded): Updated, using mono_image_loaded_full.
8441         (mono_image_loaded_by_guid_full): The same case that happens
8442         with mono_image_loaded_full.
8443         (mono_image_loaded_by_guid): Likewise.
8444         (register_image): Use the ref_only variable inside MonoImage
8445         to decide in which hash table store the current image.
8446         (mono_image_open_from_data_full): Rename
8447         mono_image_open_from_data to mono_image_open_from_data_full,
8448         adding the refonly argument, to define the ref_only variable 
8449         inside MonoImage.
8450         (mono_image_open_from_data): Return 
8451         mono_image_open_from_data_full.
8452         (mono_image_open_full): Rename mono_image_open to
8453         mono_image_open_full, receiving the new refonly argument,
8454         to pass it to inner methods.
8455         (mono_pe_file_open): Update this function, to open
8456         a MonoImage as a non-refonly image.
8457         (mono_image_close): Use the refonly variable inside
8458         MonoImage to remove the image from the correct caches.
8459
8460         * image.h: Add the signatures of mono_image_open_full,
8461         mono_image_open_from_data_full, mono_image_loaded_full,
8462         mono_image_loaded_by_guid_full.
8463
8464         * metadata-internals.h: Add the ref_only field to 
8465         MonoImage.
8466         
8467 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8468
8469         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
8470         Fix the last behavior, which used to load the assemblies and
8471         extract MonoReflectionAssemblyName information, instead of
8472         extract it from the metadata tables. Needed for Reflection
8473         Only assemblies.
8474         
8475 2005-07-29  Martin Baulig  <martin@ximian.com>
8476
8477         * mono-debug-debugger.c
8478         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
8479         not initialized.
8480
8481         * mono-debug.c
8482         (mono_debug_address_from_il_offset): Check whether we have
8483         debugging support before attempting to take the lock.
8484         (mono_debug_source_location_from_address): Likewise.
8485         (mono_debug_source_location_from_il_offset): Likewise.
8486         (mono_debug_il_offset_from_address): Likewise.
8487         (mono_debug_address_from_il_offset): Likewise.
8488
8489 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
8490
8491         * class.c (mono_class_from_name_case): Add support for dynamic images.
8492         Fixes #75650.
8493
8494         * object.c (mono_class_compute_gc_descriptor): Add a workaround
8495         for #75479.
8496
8497 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8498         
8499         * reflection.c (mono_method_get_object): Fix warning.
8500
8501 2005-07-28  Martin Baulig  <martin@ximian.com>
8502
8503         * mono-debug.c
8504         (mono_debug_add_wrapper): Also write the wrapper type.
8505
8506 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8507
8508         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
8509         
8510         * class.c (mono_class_init): Avoid reading nested classes if the AOT
8511         data indicates the class has none.
8512
8513 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
8514
8515         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
8516         loader lock with the debugger lock. Prevents deadlocks for beagle.
8517
8518         Beagle can now run on an smp box for a weekend without any
8519         issues. Woohoo!
8520
8521 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
8522
8523         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
8524         in a module. Fixes #75629.
8525
8526 2005-07-26  Martin Baulig  <martin@ximian.com>
8527
8528         * mono-debug.c (mono_debug_add_wrapper): New static method.
8529         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
8530         interncall or a wrapper.
8531
8532         * mono-debug.h (MonoDebugWrapperData): New public typedef.
8533         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
8534         (MONO_DEBUGGER_VERSION): Bump to 51.
8535
8536         * mono-debug-debugger.c
8537         (mono_debugger_add_type): Removed this empty function.
8538         (mono_debugger_add_method): Likewise.
8539
8540 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
8541
8542         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
8543         before accessing method->slot.
8544
8545 2005-07-21  Jb Evain  <jbevain@gmail.com>
8546
8547         * reflection.c (method_encode_clauses/class): Handle filters clauses.
8548         Fixes #75010.
8549
8550 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
8551
8552         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
8553         #75587.
8554
8555 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8556
8557         * image.h image.c: Add mono_image_get_guid () API function.
8558
8559 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
8560
8561         There were issues when multiple threads tried to load
8562         assemblies. A deadlock was created between assemblies_mutex and
8563         mono_domain_assemblies_lock. This fixes the issue by making the
8564         assembly ref counting be lock free. See bug 75586.
8565         
8566         * image.c (mono_image_close): The add ref function here was using
8567         Interlocked operations while the unref was using a mutex and a
8568         --. I don't think this was ever a bug that would be exposed in a
8569         non-pendantic way (ie, by an embedder doing a ref on one thread
8570         and an unref on another), but for the sake of correctness, this is
8571         now Interlocked.
8572
8573         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
8574         (mono_assembly_load_reference): Call mono_assembly_addref rather
8575         than touching the refcount ourselves.
8576         (mono_assembly_close): Use InterlockedDecrement to unref the
8577         assembly. Don't acquire the lock unless it is actually needed.
8578
8579 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
8580
8581         * class.c (mono_class_layout_fields): Fix calculation of has_references
8582         for generic types.
8583
8584 2005-07-12  Martin Baulig  <martin@ximian.com>
8585
8586         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8587
8588         * metadata.c
8589         (mono_type_hash): Provide better hashing for generic instances.
8590         (mono_generic_inst_hash): Improve hashing.
8591         (mono_generic_class_hash): Likewise.
8592
8593         * reflection.c (mymono_metadata_type_hash): Improve hashing for
8594         generic instances.
8595
8596 2005-07-12  Martin Baulig  <martin@ximian.com>
8597
8598         * reflection.c (mono_reflection_create_runtime_class): Remove the
8599         hack for generic type definitions and non-`Run' assemblies.
8600         (mono_reflection_bind_generic_parameters): Also use
8601         `klass->wastypebuilder' to check for TypeBuilders.
8602
8603 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
8604
8605         * class.c (mono_class_layout_fields): Fix calculation of has_references
8606         for generic types.
8607
8608         * class.c (inflate_generic_class): Fix a leak.
8609         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
8610         for generic types.
8611
8612 2005-07-11  Martin Baulig  <martin@ximian.com>
8613
8614         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
8615         on error.
8616
8617 2005-07-11  Martin Baulig  <martin@ximian.com>
8618
8619         * loader.c (find_method): Also lookup in
8620         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
8621
8622 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8623
8624         * appdomain.c (mono_domain_unload): Don't free the error message
8625         before passing it to mono_get_exception_...
8626
8627         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
8628         
8629 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
8630
8631         * threads.c: try to better guess an available RT signal (bug #75387).
8632
8633 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8634
8635         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
8636         and CACHE_OBJECT.
8637
8638 2005-07-07  Martin Baulig  <martin@ximian.com>
8639
8640         * class.c (mono_type_get_name_full): Return NULL for
8641         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
8642         fixes #75408.
8643
8644 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8645
8646         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
8647         exit the appdomain as well being aborted.
8648
8649         * threadpool.c: Create all threadpool threads inside the root appdomain, and
8650         change back to the root domain after calling managed code. This enables
8651         appdomains using threadpools to be unloaded.
8652
8653 2005-07-07  Martin Baulig  <martin@ximian.com>
8654
8655         * class-internals.h
8656         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
8657         into `MonoDynamicGenericClass' since we only need it for dynamic
8658         types.
8659
8660         * reflection.c (mono_class_bind_generic_parameters): We don't need
8661         to compute the `parent' here.
8662
8663 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
8664
8665         * culture-info-table.h : regenerated.
8666
8667 2005-07-06  Martin Baulig  <martin@ximian.com>
8668
8669         * icall.c
8670         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
8671
8672         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
8673
8674 2005-07-06  Martin Baulig  <martin@ximian.com>
8675
8676         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
8677         we're doing a signature-only comparision; fixes #74945.
8678
8679 2005-07-06  Martin Baulig  <martin@ximian.com>
8680
8681         * class-internals.h (MonoGenericClass): Moved some things out into
8682         a new `MonoInflatedGenericClass' type.  
8683         (MonoInflatedGenericClass): New type; the `klass' of a
8684         `MonoGenericClass' is now computed lazyly in
8685         mono_get_inflated_generic_class().      
8686
8687         * class.c (mono_get_inflated_generic_class): New public function.
8688         (mono_class_inflate_generic_method): Removed the unused
8689         `MonoClass *' argument.
8690         (setup_generic_vtable): Don't call mono_get_inflated_method() on
8691         all the methods.
8692         (mono_class_create_generic): Make this static and merge it with
8693         mono_class_create_generic_2(); we're now called automatically from
8694         mono_get_inflated_generic_class().
8695
8696         * loader.c (mono_method_signature): Call
8697         mono_get_inflated_method() here.
8698
8699 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
8700
8701         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
8702         type of fields with RVA.
8703
8704         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
8705         for this pseudo class.
8706         (my_mono_class_from_generic_parameter): Likewise.
8707         (mono_class_init): Allow interfaces to have cctors.
8708
8709 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8710
8711         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
8712         lazily for AOT methods.
8713
8714 2005-07-05  Martin Baulig  <martin@ximian.com>
8715
8716         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
8717         returns FALSE for a successful match, not TRUE.
8718
8719 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8720
8721         * loader.c (mono_method_get_index): Optimize this a bit.
8722
8723 2005-07-04  Martin Baulig  <martin@ximian.com>
8724
8725         * class.c
8726         (class_compute_field_layout): Move the check for generic type
8727         definitions into mono_class_layout_fields().  Fixes #74684.
8728         (mono_class_from_generic_parameter): Correctly compute
8729         `klass->parent'; fixes #75457.
8730
8731         * reflection.c (register_assembly, register_module): Make sure
8732         `domain->rejobject_hash' is already created.
8733
8734 2005-07-02  Martin Baulig  <martin@ximian.com>
8735
8736         * class-internals.h
8737         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
8738         `MonoDynamicGenericClass'.      
8739
8740 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
8741
8742         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
8743         returned by a field getter is null, since null is a valid value.
8744
8745 2005-07-01  Martin Baulig  <martin@ximian.com>
8746
8747         * reflection.c (mono_reflection_generic_class_initialize): Update
8748         the `dgclass->fields [i].parent' to the correct class.
8749         (mono_image_get_fieldref_token): Use the declaring type, not the
8750         reflected type.
8751
8752 2005-07-01  Martin Baulig  <martin@ximian.com>
8753
8754         * loader.c (find_method): Also look in the interfaces; fixes #75429.
8755
8756 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
8757
8758         * threads.c (thread_cleanup): assert that thread != NULL
8759         (wait_for_tids_or_state_change): We were using the wrong variable
8760         when accessing wait->threads. `i' was always out of the bounds of
8761         the array.
8762
8763 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8764
8765         * loader.c: map user32 and kernel32 to libMonoSupportW
8766
8767 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
8768
8769         * appdomain.c (unload_thread_main): Mark this as WINAPI.
8770
8771 2005-06-28  Martin Baulig  <martin@ximian.com>
8772
8773         * loader.c (method_from_methodspec): Fix #75334.
8774
8775 2005-06-28  Martin Baulig  <martin@ximian.com>
8776
8777         Fix #74953 - Arrays now implement the generic IList<T> interface
8778         on the 2.0 platform.
8779
8780         * class-internals.h (MonoDefaults): Added `generic_array_class'.
8781
8782         * reflection.c (mono_class_bind_generic_parameters): New public
8783         function; similar to mono_reflection_bind_generic_parameters(),
8784         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
8785
8786         * domain.c (mono_init_internal): Try to initialize.
8787         `mono_defaults.generic_array_class' here; this'll only succeed if
8788         we're using the 2.0 corlib.
8789
8790         * icall.c
8791         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
8792         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
8793         (mono_lookup_internal_call): Added support for nested classes.
8794
8795         * loader.c
8796         (mono_get_method_from_token): Set `result->signature->pinvoke' if
8797         we're an interncall and have generic arguments.
8798
8799         * class.c
8800         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
8801         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
8802         instance of System.Array.InternalArray<T> for arrays, so they
8803         implement the generic IList<T> interface.
8804
8805 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
8806
8807         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
8808         (chastamar@yahoo.com). Fixes #75374.    
8809
8810 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
8811
8812         * culture-info-table.h: regenerated.
8813
8814 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8815
8816         * icall.c: handle spaces correctly for base64 strings.
8817
8818 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
8819
8820         * *.c: Kill some warnings.
8821
8822 2005-06-23  Duncan Mak  <duncan@novell.com>
8823
8824         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
8825         that this builds on Solaris 10 (x86).
8826
8827 2005-06-23  Martin Baulig  <martin@ximian.com>
8828
8829         * class.c
8830         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
8831         generic type definitions.
8832
8833 2005-06-23  Martin Baulig  <martin@ximian.com>
8834
8835         Fix #75331.
8836
8837         * metadata.c (mono_class_get_overrides): Renamed to
8838         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
8839         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
8840         pass it to mono_get_method_full().
8841
8842 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
8843
8844         * reflection.c (mono_reflection_create_runtime_class): take the
8845         mono_domain_lock in this method. Prevents deadlocks
8846
8847 2005-06-22  Martin Baulig  <martin@ximian.com>
8848
8849         * loader.c (method_from_methodspec): Fix #75330.
8850
8851 2005-06-22  Martin Baulig  <martin@ximian.com>
8852
8853         * reflection.c (type_get_qualified_name): Use
8854         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
8855         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
8856         argument; use it if we don't have an assembly name.
8857
8858 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
8859
8860         * object.c: In mono_message_init, set "copy out" flag for in
8861         parameters with the [Out] flag.
8862
8863 2005-06-21  Martin Baulig  <martin@ximian.com>
8864
8865         * class.c
8866         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
8867         and MONO_TYPE_PTR.
8868
8869 2005-06-21  Martin Baulig  <martin@ximian.com>
8870
8871         * class.c (mono_class_init): Don't initialize `class->fields' for
8872         generic instances since they're initialized again in
8873         compute_field_layout(). 
8874         (compute_field_layout): Set the field's `generic_info' here; fix
8875         #75320. 
8876
8877 2005-06-21  Martin Baulig  <martin@ximian.com>
8878
8879         * class-internals.h
8880         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
8881
8882         * metadata.c (mono_metadata_generic_method_equal): Also
8883         distinguish the `generic_class'; fixes #75334.
8884
8885 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8886
8887         * domain.c:
8888         * appdomain.c:
8889         * domain-internals.h:
8890         * reflection.c: 'domain_assemblies' field is now protected by its own
8891         lock. Don't call into managed code to run the AssemblyLoad event if we
8892         now there are no registered delegates for it.
8893
8894 2005-06-20  Martin Baulig  <martin@ximian.com>
8895
8896         * class.c (mono_class_is_assignable_from): Use a custom version of
8897         mono_class_has_parent() to make things work for generic instances;
8898         fix #75300.
8899
8900 2005-06-20  Martin Baulig  <martin@ximian.com>
8901
8902         * loader.c (method_from_methodspec): Apply a patch from
8903         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
8904
8905 2005-06-20  Martin Baulig  <martin@ximian.com>
8906
8907         * class.c (mono_class_init): Reverted Zoltan's last change; it
8908         breaks generics.
8909
8910 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
8911
8912         * threads.c (wait_for_tids_or_state_change): Add missing locking.
8913
8914 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8915
8916         * socket-io.c: fix the index in the socket array for writable/error
8917         sockets. Fixes bug #75306.
8918
8919 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
8920
8921         * class.c (mono_class_init): Allow interfaces to have static ctors.
8922
8923 2005-06-17  Martin Baulig  <martin@ximian.com>
8924
8925         * loader.c (method_from_methodspec): Use `context->container' when
8926         parsing the `gmethod->inst'.
8927
8928 2005-06-17  Martin Baulig  <martin@ximian.com>
8929
8930         * class.c (mono_type_get_name_recurse): Don't add the assembly
8931         name for type arguments.
8932
8933 2005-06-15  Martin Baulig  <martin@ximian.com>
8934
8935         * reflection.c (mono_image_get_inflated_method_token): Encode
8936         correct klass; fixes #75260.
8937
8938 2005-06-13 Michal Moskal <malekith@nemerle.org>
8939
8940         * icall.c: Make GetCorrespondingMethod/Constructor take
8941         MonoReflectionMethod method not MonoMethod. Removed
8942         MonoType.GetCorrespondingField, and make
8943         MonoGenericType.GetCorrespondingField take name not
8944         MonoClassField.
8945
8946 2005-06-13  Michal Moskal <malekith@nemerle.org>
8947
8948         * reflection.c (field_encode_signature, encode_locals):
8949          Make sizes of buffers for types larger (for big generic types).
8950          (create_generic_typespec,
8951          mono_reflection_sighelper_get_signature_local,
8952          mono_reflection_sighelper_get_signature_field):
8953          Add asserts for too small buffers.
8954
8955 2005-06-15  Martin Baulig  <martin@ximian.com>
8956
8957         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
8958         if our parent is not a dynamic type.
8959
8960 2005-06-15  Martin Baulig  <martin@ximian.com>
8961
8962         * class-internals.h (MonoTypeNameFormat): New enum.
8963
8964         * class.c
8965         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
8966         (mono_type_get_full_name): Removed.
8967         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
8968         argument instead of the boolean's.
8969
8970         * icall.c (ves_icall_System_MonoType_getFullName):
8971         Added `gboolean assembly_qualified'.    
8972
8973         * reflection.h
8974         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
8975
8976         * reflection.c (mono_reflection_parse_type): Parse the new type
8977         name format.
8978
8979 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8980
8981         * icall.c: no need to convert from utf16 to utf8 and then back again
8982         after the call to GetLogicalDrives.
8983
8984 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8985
8986         * icall.c: frombase64. Fix problems exposed by new tests.
8987
8988 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8989
8990         * icall.c: added internal calls for converting char [] and strings in
8991         base64 into byte [].
8992
8993 2005-06-10  Martin Baulig  <martin@ximian.com>
8994
8995         * class.c (mono_class_create_generic_2): Read the nested classes
8996         from the metadata rather than from `gklass->nested_classes' since
8997         `gklass' might not be initialized yet.
8998
8999 2005-06-09  Duncan Mak  <duncan@novell.com>
9000
9001         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
9002         all public headers. Fixes #74919.
9003
9004 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
9005
9006         * domain.c: The key for proxy_vtable_hash is now a pointer
9007         array. Added new GHashFunc and GCompareFunc functions for this.
9008
9009         * class.h: The list of interfaces in MonoRemoteClass is known in
9010         advance and can't grow (we create a new MonoRemoteClass if needed),
9011         so now the interface array can be allocated together with
9012         MonoRemoteClass.
9013         
9014         * object.c: Added a new method create_remote_class_key.
9015         Fixed mono_remote_class so it does not depend on
9016         mono_upgrade_remote_class.
9017         Removed extend_interface_array.
9018         Added new method clone_remote_class(), which makes a copy of a remote
9019         class and adds a new interface or class to it.
9020         mono_upgrade_remote_class() now creates a new remote class (or gets
9021         it from the cache) if an vtable upgrade is needed. In this way
9022         we make sure that other objects sharing the same remote class
9023         don't get the new vtable with unwanted interfaces.
9024         
9025         * object-internals.h:
9026         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
9027         
9028         * marshal.c: Track changes in mono_upgrade_remote_class().
9029
9030 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
9031         * icall.c: Add runtime methods for obtaining members of inflated
9032         class, which were created from supplied non-inflated members. It
9033         is used in internal Get{Method,Constructor,Field} methods in
9034         System.Type
9035
9036 2005-06-09  Martin Baulig  <martin@ximian.com>
9037
9038         * reflection.c
9039         (mono_reflection_bind_generic_method_parameters): Fix #75169.
9040
9041 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
9042         * reflection.c (mono_image_basic_init): Define
9043         Version in MonoDynamicAssembly. 
9044         
9045 2005-06-08  Martin Baulig  <martin@ximian.com>
9046
9047         Fix #75136.
9048
9049         * loader.c
9050         (mono_method_signature_full): New public method; takes a
9051         `MonoGenericContext *'.
9052         (find_method): Use mono_method_signature_full() and pass the
9053         klass'es context to it.
9054
9055         * class.c (mono_class_is_inflated_method): Use
9056         mono_method_signature_full() and pass the context to it.
9057
9058 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
9059
9060         * object.c: add proper locking in mono_remote_class_vtable(),
9061         fixes possible memory corruption.
9062
9063 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
9064
9065         * marshal.c (mono_remoting_marshal_init): set
9066         initialized after initialization.
9067
9068 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9069
9070         * locales.c : hush.
9071
9072 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
9073
9074         * object.c (extend_interface_array): fix really silly
9075         memory corrupting / comparison bug.
9076
9077 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
9078
9079         * reflection.c: Functions added to support the creation
9080         of CustomAttributeData, which includes Attribute data
9081         used by ReflectionOnly methods.
9082
9083         * reflection.h:  mono_reflection_get_custom_attrs_data and
9084          mono_custom_attrs_data_construct added (functions exposed).
9085
9086          * icall.c: Added mono_reflection_get_custom_attrs_data
9087          as icall.
9088         
9089 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9090
9091         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
9092         lupus's request.
9093
9094 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
9095
9096         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
9097
9098         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
9099         dynamic DllImportAttribute.
9100
9101         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
9102         dynamic DllImportAttribute.
9103
9104         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
9105         Fixes #75162.
9106
9107 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9108
9109         * threads.c: avoid segfault when an unstarted thread is aborted.
9110
9111 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
9112
9113         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
9114         Returns the name and version of the runtime for reporting.
9115
9116 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9117
9118         * appdomain.c: bump corlib version.
9119         * object-internals.h: new field in MonoReflectionAssembly.
9120
9121 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9122
9123         * object-internals.h: Carlos forgot to add this field.
9124
9125 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
9126
9127         * icall.c: Added create_version to create instances
9128         of Version of MonoReflectionAssemblyName. This change helps
9129         the AssemblyName tests to keep running fine.
9130         
9131 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
9132   
9133         * object.c (mono_method_return_message_restore): A somehow less
9134         intrusive fix for #75138.
9135
9136 2005-06-03  Raja R Harinath  <rharinath@novell.com>
9137
9138         * object.c (mono_method_return_message_restore): Fix computation
9139         of expected number of out args.
9140
9141 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
9142
9143         * reflection.c (mono_image_get_method_info): Fix the case when the
9144         charset is empty.
9145
9146 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
9147
9148         * object.c: Added missing null check in
9149           mono_method_return_message_restore.
9150
9151 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
9152
9153         * reflection.c (mono_image_get_method_info): Handle the case when
9154         dllentry is empty.
9155
9156 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
9157
9158         * object.c: When creating the vtable for a proxy, take into account
9159         all inherited interfaces, not only the ones registered in
9160         iclass->interfaces. This fixs bug #74996.
9161         Also, in mono_method_return_message_restore, verify that the array
9162         of out args has the expected lengh.
9163
9164 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9165
9166         * socket-io.c: update the timeout in Poll when the call is interrupte.
9167
9168 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9169
9170         * socket-io.c: support abort/suspend in Select_internal after last
9171         change.
9172
9173 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9174
9175         * threadpool.c: remove warning.
9176
9177 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9178
9179         * icall.c:
9180         * socket-io.[ch]: Select_internal uses poll() now when available, thus
9181         removing the 1024 limit from select(). Runtime part of the fix for
9182         bug #71203.
9183
9184 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9185
9186         * socket-io.c: when resolving the addresses for the same
9187         host returned by gethostname(), get the local IPs from the interface
9188         list. Loopback addresses are discarded if the are interfaces up with
9189         non-loopback ones. Fixes bug #63265.
9190
9191 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
9192
9193         * appdomain.c, verify.c, object-internals.h, reflection.c:
9194         bumped corlib number to 36, and added new extra_flags field
9195         to ReflectionMethodBuilder and friends.  Fixes #75060.
9196
9197 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
9198
9199         * gc.c: register a new weak link only if the object is non-null
9200         (fixes bug#75047).
9201
9202 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9203
9204         * culture-info.h : short time pattern too.
9205
9206 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9207
9208         * culture-info.h : expand long time pattern string length.
9209
9210 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9211
9212         * culture-info-table.h : update (more French date format; #72788).
9213
9214 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
9215
9216         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
9217         the method is static. Fixes #75029.
9218
9219 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
9220
9221         * reflection.c: Update the table_idx field of method builders after
9222         saving the module, since it can change. This is a workaround for
9223         bug #74914. 
9224
9225 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9226
9227         * culture-info-table.h : update (additional French date format).
9228
9229 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9230
9231         * icall.c (ves_icall_type_Equals): Revert last change.
9232         
9233         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
9234
9235         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
9236
9237 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
9238
9239         * class-internals.h: Added executioncontext_class field to 
9240         MonoDefaults structure.
9241         * domain.c: Cache System.Threading.ExecutionContext class in 
9242         mono_defaults.
9243         * object.c: Capture the ExecutionContext for asynchroneous calls in
9244          mono_async_result_new.
9245         * object-internals.h: Added execution_context and original_context 
9246         fields to MonoAsyncResult. Added execution_context to MonoThread.
9247         * security-manager.c|.h: Added mono_get_context_capture_method to 
9248         return the capture method (if required by the security manager or by
9249         the framework version used).
9250         * threadpool.c: Apply capture (if present) ExecutionContext in 
9251         mono_async_invoke and revert to original context after it completes.
9252
9253 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
9254
9255         * culture-info-table.h : updated (real hacky solution for zh-CHT).
9256
9257 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
9258
9259         * culture-info-table.h : zh-CHT related workaround.
9260
9261 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
9262
9263         * marshal.c (emit_marshal_custom): Add some error checking and call the
9264         methods in the ICustomMarshaler interface. Fixes #74875.
9265         
9266         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
9267         native->managed wrappers.
9268
9269 2005-05-12  Martin Baulig  <martin@ximian.com>
9270
9271         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
9272         here and use the loader lock.
9273
9274         * mono-debug.c: Properly lock when the debugger is not attached.
9275         (mono_debug_init): Release the initial lock if we're not running
9276         in the debugger.
9277
9278 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
9279
9280         * marshal.c (emit_marshal_custom): Pass through NULL values without
9281         calling the custom marshalling routines.
9282
9283         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
9284         conversion in structures. Fixes #74882.
9285
9286 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
9287
9288         * culture-info-table.h : zh-* cultures were missing.
9289
9290 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
9291
9292         * threads.c: Added a new event background_change_event which is signaled
9293         when a thread changes its background mode.
9294         Moved here several checks previously done in managed code. The checks
9295         require the thread lock, and using the thread lock in managed code
9296         can result in deadlocks.
9297         Merged Start_internal and Thread_internal into a single method. Now 
9298         Thread_internal does all work of creating and starting a thread.
9299         Added icalls for setting and getting the state of the object. Moved from
9300         managed code to avoid locking there.
9301         Added wait_for_tids_or_state_change() which is called instad of
9302         wait_for_tids when waiting for non-backround threads to end. This method
9303         will return if one of the threads ends or the background_change_event
9304         is signaled.
9305         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
9306         the background mode. This method signals the background_change_event
9307         event.
9308         * icall.c:
9309         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
9310         removed Start_internal.
9311         
9312 2005-05-11  Martin Baulig  <martin@ximian.com>
9313
9314         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
9315         to order of some fields to get proper alignment on 64-bit machines.
9316
9317 2005-05-11  Martin Baulig  <martin@ximian.com>
9318
9319         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
9320         changes as they're broken and completely fuck up the debugger.
9321
9322         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
9323
9324 2005-05-10  Martin Baulig  <martin@ximian.com>
9325
9326         * reflection.c (mono_reflection_generic_class_initialize): Don't
9327         call mono_class_setup_parent() here.
9328
9329 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9330
9331         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
9332         send/receive timeout use an integer in milliseconds. We were using a
9333         struct timeval.
9334
9335 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9336
9337         * locales.c:
9338         (internal_get_cultures): reserve the first slot of the array for the
9339         InvariantCulture, which will be filled in managed code.
9340
9341 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
9342
9343         * reflection.c (mono_image_fill_module_table): Initialize the
9344         GENERATION field as well.
9345
9346 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9347
9348         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
9349         Monitor.Enter on the object.
9350
9351 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9352
9353         * threads.c: Enable the wait for running threads when exiting.
9354         * icall.c: Suspend all threads before exiting.
9355
9356 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9357
9358         * assembly.c (mono_assembly_load_reference): Fix warning.
9359
9360 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9361
9362         * threadpool.c: changed the default number of threads per cpu. From now
9363         on, the default will be 20 + (5 * number of cpus) instead of 50.
9364
9365 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
9366
9367         * loader.c (mono_method_get_signature_full): Add locking here.
9368
9369 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
9370
9371         * appdomain.c: Moved methods for parsing and freeing assembly
9372         names to assembly.c.
9373         * assembly.c, domain-internals.h: Created public methods for parsing
9374         assembly names. Fixed mono_assembly_load_with_partial_name:
9375         it now finds the best match, taking into account the version,
9376         token and culture specified in the partial name. Also return
9377         the latest version if no version information is specified.
9378
9379 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
9380
9381         * threadpool.c: replace check for SocketAsyncCall class.
9382
9383 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9384
9385         * threadpool-internals.h:
9386         * Makefile.am: added threadpool-internals.h
9387
9388         * threadpool.c: call mono_unhandled_exception on exceptions not handled
9389         that happen in threadpool threads (tested on MS).
9390         (mono_thread_pool_remove_socket): new function that dispatch any pending
9391         AIO call on a socket that is closing. By now only epoll really needs it,
9392         as select/poll wake up when the socket closes.
9393
9394
9395         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
9396
9397 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
9398
9399         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
9400
9401 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
9402
9403         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
9404
9405 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
9406
9407         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
9408         has an abort request, convert it into a suspend request.
9409
9410 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
9411
9412         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
9413         warning for the usage of `UnmanagedFunctionPointerAttribute' which
9414         is not supported yet.
9415
9416 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9417
9418         * image.c: register assemblies loaded from data (bundles) in the loaded
9419         assemblies hash. Fixes bug #74772.
9420
9421 2005-04-29  Martin Baulig  <martin@ximian.com>
9422
9423         * class.c (mono_type_get_name_recurse): Update to the new naming
9424         schema from the latest .NET 2.x beta2.
9425         (mono_class_setup_vtable_general): If we're a generic instance,
9426         copy the vtable from our generic type definition and inflate all
9427         the methods in it.
9428
9429         * loader.c (find_method): Update to the new naming schema from the
9430         latest .NET 2.x beta2.
9431
9432 2005-04-29  Raja R Harinath  <harinath@gmail.com>
9433
9434         * class.c (mono_class_init): Add a mono_loader_unlock to the
9435         #74734 fix.
9436
9437 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9438
9439         * icall.c (ves_icall_System_Environment_Exit): Remove the 
9440         suspend_all_other_threads () call for the time being, since it can hang.
9441
9442         * threads.c (mono_thread_manage): Similarly, disable the waiting for
9443         the background threads to exit, since it can also hang.
9444
9445         * class.c (mono_class_init): Applied patch from Ankit Jain 
9446         (radical@gmail.com). Avoid pending init errors when a field refers
9447         to a nested class using a typeref. Fixes #74734.
9448
9449         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
9450         this for dynamic modules.
9451
9452 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9453
9454         * threads.c: don't wait for threads that are in the process of aborting
9455         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
9456         and waiting for background threads to finish. This makes xsp and
9457         mod-mono-server exit without random length delays and/or hangs.
9458
9459 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9460
9461         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
9462
9463 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
9464
9465         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
9466         dynamic types to prevent infinite loops. Fixes #74727.
9467
9468         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
9469         ..._is_assignable_to.
9470
9471 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
9472
9473         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
9474
9475 2005-04-25  Martin Baulig  <martin@ximian.com>
9476
9477         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
9478
9479         * domain.c
9480         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
9481
9482         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
9483
9484         * reflection.c (build_compressed_metadata): Set metadata header
9485         version to 2.0.
9486
9487 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9488
9489         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
9490         number into an integral and a decimal part. Fixes #70473.
9491
9492         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
9493
9494 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
9495
9496         * culture-info-table.h : reflected the latest locale-builder output.
9497
9498 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9499
9500         * threadpool.c: check for SuspendRequested too when deciding if
9501         mono_thread_interruption_checkpoint should be called.
9502
9503 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9504
9505         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
9506         * threads.c: remove interruption_mutex and use Interlocked instead. When
9507         suspending all the threads, wait for all the suspended events at once.
9508         If we're shutting down and get an APC that is going to be queued,
9509         call mono_thread_execute_interruption immediately, as the thread might
9510         be sleeping on a pthread condition or mutex.
9511
9512         * icall.c: call mono_runtime_set_shutting_down before suspending the
9513         threads.
9514
9515         Fixes bug #74693. And now xsp is happier when exiting.
9516
9517 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9518
9519         * loader.c (mono_stack_walk): Fix #74690.
9520
9521 2005-04-22  Martin Baulig  <martin@ximian.com>
9522
9523         * mono-debug.h (MonoDebugMethodJitInfo): Added
9524         `MonoDebugMethodJitInfo *jit'.
9525
9526         * mono-debug.c (mono_debug_read_method): Cache the
9527         MonoDebugMethodJitInfo in `address->jit'.
9528         (mono_debug_free_method_jit_info): New public method.
9529
9530 2005-04-22  Martin Baulig  <martin@ximian.com>
9531
9532         * class.c (mono_class_is_assignable_from): Disallow
9533         type parameter -> interface.
9534
9535 2005-04-21  Dick Porter  <dick@ximian.com>
9536
9537         * threads.c (mono_thread_create): Turn an assertion into an error.
9538
9539 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9540
9541         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
9542         
9543         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
9544         Fix some gcc 4.0 warnings.
9545
9546 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
9547
9548         * file-io.c: fix alt dir separator char on unix systems
9549         and cleanup (fixes bug #71214).
9550
9551 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
9552
9553         * marshal.c: Use CALLVIRT instead of CALL when dispatching
9554         a call to a remote domain, since the method may be an
9555         interface method in the client domain. This fixes bug #74192.
9556
9557 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9558
9559         * threadpool.c: recv/send are now performed before going back to managed
9560         code to save one transition.
9561
9562 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9563
9564         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
9565
9566         * metadata/threadpool.c: removed hack to workaround the bug above.
9567
9568         Fixes bug #74618.
9569
9570 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9571
9572         * reflection.c reflection.h: Fix handling of parameter defaults in
9573         dynamic methods. Also fixes handling of parameter attributes.
9574         Fixes #74609.
9575
9576         * mono-debug.c (mono_debug_close_image): Fix warning.
9577
9578 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9579
9580         * socket-io.h: replaced old unused field with new 'blocking'.
9581         * threadpool.c: restore socket blocking state on windows(tm).
9582
9583 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
9584
9585         * icall.c: don't return the codebase in the AssemblyName[] returned by
9586         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
9587         * object-internals.h: Removed FIXME (fields were presents) and fixed
9588         versioncompat declaration.
9589
9590 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9591
9592         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
9593         not closed, so don't cleanup when it happens.
9594
9595 2005-04-13  Chris Toshok  <toshok@ximian.com>
9596
9597         * mono-debug-debugger.h: change prototype for
9598         mono_debugger_lookup_type.
9599
9600         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
9601         this function, although it should probably be named
9602         mono_debugger_init_type.
9603
9604 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9605
9606         * threadpool.c: fix non-AIO case.
9607
9608 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9609
9610         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
9611         the built-in profiler to measure just JIT compilation times.
9612
9613 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9614
9615         * threadpool.c: the epollfd might be closed by another thread at
9616         any time, so ignore EBADF at treat it as a "we're closing" sign.
9617
9618 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9619
9620         * threadpool.c: release the semaphores with a count equals to the number
9621         of working threads in both IO and regular pools. Fixed typo that messed
9622         up the count of IO pool threads. Don't initialize the pipe handles if
9623         we're using epoll.
9624
9625 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9626
9627         * threadpool.c: some systems don't like a NULL when deleting the socket
9628         from epoll.
9629
9630 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9631
9632         * threadpool.c: fix semaphore allocation.
9633
9634 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9635
9636         * threadpool.c: added epoll() based implementation for asynchronous IO
9637         that is used instead of the default poll() when available.
9638         It can be disabled by setting MONO_DISABLE_AIO.
9639
9640 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9641
9642         * threadpool.c: windows needs 'closesocket' and instead of returning
9643         0 when the stream is closed while in select, it returns -1. Fixes bug
9644         #74573.
9645
9646 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
9647
9648         * class.c (class_compute_field_layout): Fix the regression caused by
9649         the previous try.
9650
9651 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9652
9653         * threadpool.c: separate pool for socket async. IO.
9654         * threadpool.h: mono_max_worker_threads is not a global any more.
9655
9656 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9657
9658         * class.c (class_compute_field_layout): Fix #74549.
9659
9660 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9661
9662         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
9663         use 2 connected sockets instead.
9664
9665 2005-04-08  Miguel de Icaza  <miguel@novell.com>
9666
9667         * mono-config.c: Add new entry point for mkbundle
9668         mono_config_parse_memory. 
9669
9670 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9671
9672         * threadpool.c: removed another unused function.
9673
9674 2005-04-08  Ankit Jain  <radical@corewars.org>
9675
9676         * reflection.c (get_default_param_value_blobs): Add 'types'
9677         parameter to get the types encoded in the constant table.
9678         (mono_param_get_objects): Use the type from the constant table,
9679         not the type of the parameter, when creating default values.
9680         Handle null default values correctly.
9681
9682 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9683
9684         * file-io.c:
9685         * file-io.h:
9686         * threadpool.c:
9687         * threadpool.h:
9688         * icall.c:
9689         * socket-io.c: removed dead code for async IO.
9690
9691 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9692
9693         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
9694
9695         * threadpool.c: intercept socket async. calls and pass them to a thread
9696         that is polling and dispatching the job items to the threadpool as
9697         socket become ready. Fixes bugs #71217, #71933.
9698
9699         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
9700         between char and short/ushort arrays.
9701
9702         * socket-io.c: remove dead code.
9703
9704 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
9705
9706         * locales.c,
9707           icall.c : removed InternalToUpper_Comp() and
9708           InternalToLower_Comp().
9709
9710 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
9711
9712         * char-conversions.h : The tables were incorrectly generated. Should
9713           be generated against invariant culture.
9714
9715 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9716
9717         * object.c (mono_runtime_invoke_array): Fix return value when 
9718         passing pre-created valuetype objects to ctors.
9719
9720         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
9721         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
9722         Fixes #74338.
9723
9724 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
9725
9726         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
9727         only used with --security and hides the wrong corlib version error.
9728
9729 2005-03-30  Joshua Tauberer  <tauberer@for.net>
9730
9731         * class.c: Changed mono_class_name_from_token so that types
9732         outside of a namespace don't have an initial period.  Improved
9733         the g_warning message used in _mono_class_get when loading
9734         fails.
9735         * assembly.c: In mono_assembly_load_reference, when an assembly
9736         can't be found, "No such file or directory" is misleading and
9737         unhelpful because a few paths were checked for the presence of
9738         the assembly.  When that happens (ENOENT), display a nicer
9739         message indicating the directories that were searched.  In all
9740         cases, the warning is made easier to read for non-hackers.
9741
9742 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9743
9744         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
9745         project/solution.
9746         * appdomain.h|domain.c: Removed inline from functions.
9747         * appdomain.c: Reduced warnings when compiling on windows.
9748         * icall.c: Fixed output_debug declaration to gunichar2*.
9749         * mono-config.c: Reduced warnings when compiling on windows.
9750         * rand.c: Added missing "windows.h". Added missing return value.
9751         * rawbuffer.c: Added missing winsock2.h for windows.
9752         * sysmath.h: Added mono-compiler.h header to allow/ease 
9753         compilation with non-GCC compilers.
9754         * threads.c: Fixed declarations to compile with VS.NET C compiler.
9755         Removed cast warnings.
9756
9757         Adapted from the work of J Lothian (for VC6).
9758
9759 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9760
9761         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
9762         from default_path.
9763
9764 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9765
9766         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
9767         the 2.0 profile.
9768
9769 2005-03-27  Raja R Harinath  <harinath@gmail.com>
9770
9771         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
9772         has to be in $(exec_prefix).  $(prefix) is for arch-independent
9773         stuff, and it would probably use $(prefix)/share rather than
9774         $(prefix)/lib.
9775
9776 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9777
9778         * console-io.c: added 2 includes that might be missing.
9779
9780 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9781
9782         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
9783         profile.
9784
9785         * reflection.c (create_custom_attr): Allocate the params array using
9786         alloca so it gets GC tracking.
9787
9788 2005-03-23  Chris Toshok  <toshok@ximian.com>
9789
9790         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
9791         out some spew.
9792
9793 2005-03-24  Raja R Harinath  <rharinath@novell.com>
9794
9795         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
9796         changes to pick up any changes in prefix, etc.
9797
9798 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9799
9800         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
9801         
9802         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
9803         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
9804
9805 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9806
9807         * class-internals.h object-internals.h class.c reflection.c: Extend the
9808         mono_lookup_dynamic_token () function to return the class of the
9809         token as well. 
9810
9811         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
9812         well. Fixes #73848.
9813
9814 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
9815
9816         * security-manager.c: Skip inheritance checks for intra-corlib
9817         class inheritance and method overrides. This skips a lot of checks
9818         and (anyway) permissions cannot work until corlib is loaded.
9819
9820 2005-03-23  Martin Baulig  <martin@ximian.com>
9821
9822         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
9823         MONO_TYPE_GENERICINST.  
9824
9825 2005-03-23  Martin Baulig  <martin@ximian.com>
9826
9827         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
9828
9829 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9830
9831         * class.c: added locking comments to some functions.
9832         Cache the interface offsets arrays (saves about 20 KB
9833         of runtime memory in a typical app).
9834         Reduce the time overhead in mono_class_setup_supertypes ().
9835
9836 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
9837
9838         * icall.c: speedup and fix leaks in GetMethodsByName and
9839         GetPropertiesByName.
9840
9841 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9842
9843         * reflection.c: some locking fixes.
9844
9845 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9846
9847         * metadata.c: added missing break in case statement.
9848
9849 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
9850
9851         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
9852         typedbyref return values. Fixes #73941.
9853
9854 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
9855
9856         * security-manager.c|h: Added demandunmanaged method and 
9857         suppressunmanagedcodesecurity class to MonoSecurityManager.
9858         Renamed aptc class to allowpartiallytrustedcallers.
9859
9860 2005-03-17  Martin Baulig  <martin@ximian.com>
9861
9862         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
9863
9864 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9865
9866         * file-io.c: disabled file async. IO using aio_*. It uses the
9867         threadpool now. Workaround for bug #73718.
9868
9869 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
9870
9871         * assembly.h, mono-config.c: added code to deal with bundled configs
9872         for bundled assemblies.
9873
9874 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
9875
9876         * *.c, private.h: cleanup, removing old private.h header file.
9877
9878 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9879
9880         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
9881         and throw_on_unmappable_char attributes.
9882
9883 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
9884
9885         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
9886         _ProcessName_internal.
9887
9888 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
9889
9890         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
9891         #73631.
9892
9893         * icall.c threads.c threads-types.h: Remove slothash icalls as they
9894         are no longer used.
9895
9896 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
9897
9898         * object.c (compute_class_bitmap): Add support for generics. Fixes
9899         #73527.
9900
9901 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
9902
9903         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
9904
9905 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9906
9907         * filewatcher.c: commented out the code for windows watcher, as we don't
9908         use it (we use the managed implementation instead).
9909
9910 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
9911
9912         * object-internals.h (MonoThread): Remove 'unused1' field.
9913
9914         * appdomain.c: Bump corlib version.
9915
9916         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
9917
9918         * reflection.c (mono_reflection_create_runtime_class): Remove the
9919         AssemblyBuilder.Save optimization since it causes too many problems.
9920
9921 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
9922
9923         * exception.c|h: Added mono_get_exception_reflection_type_load to
9924         create a ReflectionTypeLoadException object.
9925         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
9926         to return NULL is a InheritanceDemand fails during reflection. Updated
9927         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
9928         ReflectionTypeLoadException if an InheritanceDemand fails during 
9929         reflection. Added icall mapping for GetLinkDemandSecurity.
9930         * security-manager.c|h: Added ves_icall_System_Security_
9931         SecurityManager_GetLinkDemandSecurity internal call to return the
9932         class and methods permissions set for a LinkDemand. Removed unused
9933         fields in MonoSecurityManager.
9934
9935 2005-03-10  Martin Baulig  <martin@ximian.com>
9936
9937         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
9938         it's a generic instance.
9939
9940 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
9941
9942         * reflection.c (mono_get_object_from_blob): Applied patch from
9943         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
9944
9945         * class.c (mono_class_is_assignable_from): Another try at fixing 
9946         #73469 without breaking anything.
9947
9948 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
9949
9950         * class.c: (mono_class_is_assignable_from): Revert the last changes
9951         since they don't work with generics.
9952         
9953         * class.c (mono_class_is_assignable_from): Fix build bustage.
9954
9955         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
9956         the managed IsAssignableFrom method. Fixes #73469.
9957
9958         * reflection.c (mono_reflection_call_is_assignable_from): New helper
9959         function.
9960
9961 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
9962
9963         * object.c (mono_load_remote_field_new): Fix returning uninitialized
9964         memory when the remoting callback does not sets the out arguments.
9965         Fixes #73007.
9966
9967         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
9968         by mistake.
9969
9970         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
9971
9972         * object-internals.h (MonoStackFrame): Sync with managed object layout.
9973
9974         * appdomain.c: Bump corlib version.
9975
9976 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
9977
9978         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
9979         function.
9980
9981         * threads.c (mono_thread_attach): Detect threads which are not started
9982         by the GC pthread wrappers.
9983
9984 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
9985
9986         * icall.c: Added new icall for RNG.
9987         * rand.c|h: Added new icall to open the RNG. This allows to share a 
9988         single handle on Linux to access /dev/urandom and fix #73183.
9989
9990 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9991
9992         * object.c: setting the new vtable in a transparent proxy object must
9993         not change the GC descriptor.
9994
9995 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
9996
9997         * object.c: fixed compilation without GCJ support.
9998         * reflection.c: for runtime-created types ensure klass->has_references
9999         is correct (bug #73215).
10000
10001 2005-03-02  Martin Baulig  <martin@ximian.com>
10002
10003         * class.c (mono_class_is_assignable_from): Make this work if
10004         `oklass' is a generic instance; fixes #72831.
10005
10006 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
10007
10008         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
10009         with hasthis set.
10010         
10011         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
10012
10013         * marshal.c: Reorganize native->managed marshalling code to also use
10014         the emit_marshal_... functions.
10015
10016 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
10017
10018         * object.c: typed allocs have issues with bitmap sizes > 30,
10019         so check for max_set >= 30.
10020
10021 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
10022
10023         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
10024         managed code. Fixes #73012.
10025
10026         * metadata.h (MonoMarshalSpec): Add elem_mult field.
10027
10028         * metadata.c reflection.c: Load/Emit elem_mult as well.
10029         
10030         * metadata.h (MonoMarshalSpec): Add comment.
10031
10032         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
10033
10034         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
10035         num_elem to -1 if not given.
10036
10037         * object-internals.h (MonoReflectionMarshal): Add has_size field.
10038
10039         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
10040         given values.
10041
10042 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
10043
10044         * null-gc.c (mono_gc_free_fixed): Was not compilable.
10045
10046 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
10047
10048         * reflection.c (encode_marshal_blob): Encode param_num field as well.
10049
10050         * object-internals.h (MonoReflectionMarshal): Add param_num field.
10051
10052 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
10053
10054         * object.c: generalized the reference bitmap creation
10055         and added hooks for the new GC.
10056         * class-internals.c: removed the gc_bitmap field from MonoClass.
10057
10058 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10059
10060         * domain.c: help the compiler to produce better code
10061         in mono_jit_info_table_find ().
10062
10063 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
10064
10065         * object.c: make all allocations look typed.
10066
10067 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10068
10069         * socket-io.c: load Mono.Posix if it's not loaded already
10070         (fixes bug#73033).
10071
10072 2005-02-24  Martin Baulig  <martin@ximian.com>
10073
10074         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
10075         * reflection.c (dup_type): Likewise.
10076
10077 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
10078
10079         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
10080         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
10081
10082 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10083
10084         * domain.c, threads.c, object-internals.h: make the critical thread
10085         local vars use the fast access mode (even when we're compiled in
10086         a lib). Provide accessors to be used by the jit during codegen.
10087
10088 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
10089
10090         * appdomain.c: Changed hook functios behavior to include
10091         support for the reflection only assemblies. Some icalls were changed
10092         to support the mentioned assemblies too. Signatures of static methods
10093         try_assembly_resolve and real_load now have an additional parameter:
10094         refonly.
10095
10096         * assembly.c: General changes to mono_assembly_ methods to support
10097         reflection only api. Functions mono_assembly_open, mono_assembly_load,
10098         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
10099         suffix, to support an additional gbool parameter to specify whether
10100         the assembli is reflection only or not. Created some new hook functions 
10101         to add support for reflection only assemblies. Signatures of static 
10102         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
10103         have now an additional parameter: refonly.
10104
10105         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
10106         indicating whether the assembly is reflection only or not.
10107
10108         * exception.c: Add mono_get_exception_invalid_operation.
10109
10110         * icall.c: Throw an InvalidOperationException when trying to invoke
10111         a property/method/event, or trying to set/get the value of a field.
10112         Also add an icall to retrieve the ref_only flag to the
10113         MonoReflectionAssembly.
10114
10115 2005-02-23  Chris Toshok  <toshok@ximian.com>
10116
10117         Part of fix for #72827.
10118         * mono-debug.c (mono_debug_add_method): add lexical block data to
10119         the info we write.  Kind of a hack at the moment - we copy the
10120         lexical block info from the MonoDebugMethodInfo to the
10121         MonoDebugMethodJitInfo here, before writing it.
10122         (mono_debug_read_method): read the lexical block info.
10123
10124         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
10125
10126         * debug-mono-symfile.h: add lexical block support.
10127
10128         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
10129         support.
10130
10131 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10132
10133         * loader.c (mono_lookup_pinvoke_call): Fix warning.
10134
10135         * object.c (mono_runtime_free_method): Call mono_free_method () and
10136         put the TODOs there.
10137
10138         * loader.c (mono_free_method): Free up most memory allocated for 
10139         dynamic methods.
10140
10141 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10142
10143         * reflection.c: properly flag a Type argument to a
10144         named custom attr value (bug #72248).
10145
10146 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10147
10148         * reflection.c: reduce code duplication in named custom
10149         attribute encoding.
10150
10151 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
10152
10153         * reflection.c: properly encode custom attrs of type object
10154         (bug #72649).
10155
10156 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10157
10158         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
10159
10160 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
10161
10162         * socket-io.c: load System.dll if it's not loaded already
10163         (bug #72850 and #70477).
10164
10165 2005-02-21  Martin Baulig  <martin@ximian.com>
10166
10167         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
10168         generic instances.
10169
10170 2005-02-21  Martin Baulig  <martin@ximian.com>
10171
10172         * reflection.c (mono_image_build_metadata): We also need to
10173         "fixup" the MethodImpl table after we computed the final method
10174         indices.  Call fixup_methodimpl() to do that.
10175         (fixup_methodimpl): New private method.
10176
10177 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
10178
10179         * assembly.c: special case mscorlib.dll (bug#72536),
10180         patch from Carlos Alberto Cortez.
10181
10182 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10183
10184         * threads-types.h threads.c: Fix build bustage.
10185
10186         * threads.c: Use a union for long<->double conversions.
10187
10188         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
10189         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
10190
10191         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
10192         containing the checkpoint call with NOT_TAKEN.
10193         
10194         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
10195         checkpoint before pushing the arguments, so they won't have to be
10196         spilled to stack.
10197
10198 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10199
10200         * domain.c, assembly.c, domain-internals.h: make some data
10201         const and relocation-free.
10202
10203 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10204
10205         * object.c, appdomain.c, class-internals.h: introduce the
10206         MonoClassRuntimeInfo structure to hold the info needed to
10207         use a class at runtime. Made mono_class_vtable() lock-free
10208         for all the appdomains.
10209
10210 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
10211
10212         * metadata-internals.h, image.c: introduce a per-image mempool to
10213         be used for memory that has the same lifetime as the image.
10214
10215 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
10216
10217         * domain.c: In mono_init_internal(), instead of selecting the first
10218         runtime version supported by an executable, get a list of all
10219         supported versions and select the one for which an mscorlib exists
10220         (since even if the runtime supports a given version, it doesn't mean
10221         that the framework for that version is installed).
10222         Modified get_runtimes_from_exe to support this behavior.
10223         In supported_runtimes, added information about additional system
10224         assembly versions.
10225         
10226         * assembly.c: Added support for more than one system assembly version
10227         per runtime version. Updated the assembly list.
10228         In mono_assembly_remap_version, removed the initial version check,
10229         since we don't know to which version we need to compare until we
10230         get the version set on which the assembly is based.
10231         Moved the code for loading corlib into the new method
10232         mono_assembly_load_corlib(), so it can be used by the initialization
10233         code.
10234         
10235         * domain-internals.h: Updated data structures and added declaration
10236         for mono_assembly_load_corlib.
10237
10238 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10239
10240         * reflection.c (resolve_object): Fix the creation of the signature in 
10241         the SignatureHelper case.
10242
10243         * assembly.c (mono_assembly_remap_version): Fix binary search.
10244         
10245 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
10246  
10247         * class.c: Added inheritance check when a method is overloaded (from a
10248         virtual method or when implementing an interface) and when a class is
10249         inherited. Added functions to set a failure for a class and to 
10250         retreive the exception from a failure.
10251         * class-internals.h: Added fields to MonoClass to keep the exception
10252         information status for inheritance (or other exceptions) to be thrown
10253         later (i.e. not at load time).
10254         * object.c: Throw the inheritance SecurityException when a type is to 
10255         be created with either class or method inheritance violations.
10256         * reflection.c|h: Fix when getting declsec from a class. Removed 
10257         unrequired code for class. Improved sanity in parameter naming.
10258         * security-manager.c|h: Added functions to check for class and method
10259         inheritance.
10260
10261 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10262
10263         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
10264         and has_finalize in dynamic types as well.
10265
10266 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
10267
10268         * culture-info-table.h : fixed currency format for en-GB (and so on).
10269
10270 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
10271
10272         * gc.c: ensure the GC handles never have 0 as a value.
10273
10274 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
10275
10276         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
10277         a pointer to a struct to unmanaged code. Fixes #72625.
10278
10279 2005-02-16  Martin Baulig  <martin@ximian.com>
10280
10281         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
10282
10283 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
10284
10285         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
10286
10287 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
10288
10289         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
10290
10291         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
10292         UnmanagedFunctionPointerAttribute, use it for determining calling convention
10293         etc. Fixes #71471.
10294
10295         * reflection.c (mono_custom_attrs_get_attr): New helper function.
10296
10297         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
10298
10299 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
10300
10301         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
10302         changes to make the current context a field in MonoThread.
10303
10304 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
10305
10306         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
10307         the last change.
10308         
10309         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
10310         extracted from mono_marshal_get_native_wrapper.
10311
10312         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
10313         to create wrappers around native functions.
10314
10315         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
10316         delegates for arbitrary function pointers. Fixes #71472.
10317
10318 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10319
10320         * threads.c: cleaned up the code a little.
10321
10322 2005-02-15  Martin Baulig  <martin@ximian.com>
10323
10324         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
10325         the data table.
10326
10327         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
10328         allocate larger chunks if needed.
10329
10330 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10331
10332         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
10333         in by mistake.
10334
10335 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
10336
10337         * domain.c: keep the domains in an array and ensure the domain ids
10338         are kept small, so they can be used as indexes to domain-specific data
10339         with a small memory overhead.
10340
10341 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10342
10343         * icall.c: Handle byref types in Type icalls. Fixes #72544.
10344
10345 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
10346
10347         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
10348
10349 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10350
10351         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
10352
10353         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
10354         values.
10355
10356         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
10357         
10358 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10359
10360         * domain-internals.h: add the hashtable here.
10361
10362         * class-internals.h: Remove `info' from MonoMethod
10363
10364         * domain.c: Add a new hashtable, jit_trampoline_hash
10365
10366 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10367
10368         * object.c: don't set the value of static fields
10369         (fixes bug#72494).
10370
10371 2005-02-11  Martin Baulig  <martin@ximian.com>
10372
10373         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
10374         (mono_debug_add_method): Silently ignore the method if it's too big.
10375         (mono_debug_add_type): Likewise.
10376
10377 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
10378
10379         * threads.c, appdomain.c: remove #ifdefs from the code.
10380
10381 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10382
10383         * metadata-internals.h: Added flags to MonoAssembly to cache the most
10384         common security informations. This allows us to stay in unmanaged code
10385         when doing LinkDemand and it's special cases (except for the first 
10386         time for initialization). The flags a very much used with --security.
10387         * reflection.c|h: Added code to get declarative security attributes 
10388         for LinkDemand and InheritanceDemand. This required to refactor the
10389         existing code for Demand.
10390         * security-manager.c|h: Added new method fields for the special cases
10391         of LinkDemand.
10392
10393 2005-02-10  Martin Baulig  <martin@ximian.com>
10394
10395         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
10396         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
10397
10398 2005-02-10  Martin Baulig  <martin@ximian.com>
10399
10400         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
10401         debugging code; this is almost a complete rewrite.
10402
10403         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
10404
10405 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10406
10407         * domain.c, object.h: expose mono_string_equal () and 
10408         mono_string_hash ().
10409         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
10410         it's implemented in managed code.
10411
10412 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10413
10414         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
10415         lo leak objects between appdomains.
10416
10417 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10418
10419         * assembly.c: old compilers compilation fix from 
10420         robertj@gmx.net (Robert Jordan).
10421
10422 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
10423
10424         * class-internals.h: Little reminder for the future.
10425
10426         * debug-helpers.c: Fix up wrapper_type_names
10427
10428 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10429
10430         * image.c, metadata-internals.h: when loading an image from a file,
10431         mmap all of it and use the same codepaths as when using a
10432         in-memory image: the code is simpler and we use less memory
10433         (both writable and readonly).
10434
10435 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10436
10437         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
10438         API to alloc runtime data structures that need to be tracked by the
10439         GC and contain pointers.
10440         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
10441         make the code more readable and eventually use a different GC.
10442
10443 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
10444
10445         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
10446         for out arguments.
10447         
10448 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
10449
10450         * object.c: In release_type_locks(), don't release the cctor lock
10451         if it has already been released. This fixes a crash in the
10452         thread5 test.
10453
10454 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10455
10456         * gc.c, marshal.c, icall.c: register a delegate for finalization
10457         only when the native function pointer has been allocated for it.
10458
10459 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10460
10461         * object.c: cleaned up some code, allocate objects that are
10462         pointer free with the atomic malloc variant. Allocate memory
10463         for static data from the mempool if it's pointer-free.
10464         Allocate the bounds array at the end of the array data, when needed.
10465         * object-internals.h, object.h: move a private function in a private
10466         header.
10467         * class.c: handle missing case in tracking references in fields.
10468
10469 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10470
10471         * class.c, class-internals.h: keep track if a type has
10472         reference fields in either the instance or static fields.
10473
10474 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
10475
10476         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
10477         and renamed to MonoRuntimeInfo. Added fields to store the expected
10478         framework assembly version. Changed mono_get_framework_version and
10479         mono_get_runtime_version for a single mono_get_runtime_info method.
10480         
10481         * assembly.c: Added method to remap system assembly versions to the
10482         current executing runtime version. Removed old mapping code.
10483         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
10484         
10485         * icall.c, reflection.c: Track api changes.
10486
10487 2005-02-06  Miguel de Icaza  <miguel@novell.com>
10488
10489         * loader.c (method_from_memberref): Improve error reporting,
10490         produce the class name instead of the typeref/typedef index. 
10491
10492 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
10493
10494         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
10495
10496 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10497
10498         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
10499         stdcall and charset name mangling.  Reorganize the code and add
10500         some tracing stuff.
10501
10502 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
10503
10504         * monodiet.c: More iters!
10505
10506         * marshal.c: Iter usage.
10507
10508         * icall.c: Iter usage.
10509
10510         * object.c: Use iters.
10511
10512         * debug-helpers.c: More iters
10513
10514 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10515
10516         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
10517         under win32.
10518
10519 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
10520
10521         * mono-debug-debugger.c: use iters
10522
10523         * class.c, class-internals.h: mono_class_setup_events is static
10524         now
10525
10526         * All callers: use iters
10527
10528 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10529
10530         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
10531         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10532
10533 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10534
10535         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
10536
10537         * marshal.h: Add prototypes for ldfld/stfld_remote.
10538
10539         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
10540         this is called during startup.
10541         
10542 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10543
10544         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
10545         MonoThreadsSync struct private in monitor.c. Changed the way
10546         MonoThreadsSync is allocated so it's faster and there is no
10547         need to keep track of it with a finalizer and it uses less memory.
10548         This also finally allows us to allocate mono objects as ptrfree when
10549         there are no reference fields.
10550
10551 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
10552
10553         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
10554         disappearing link to the GC interface and use them to simplify
10555         the gchandles code.
10556
10557 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10558
10559         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
10560         stfld_remote which call mono_load/store_field_new. This allows methods
10561         calling ldfld/stfld wrappers to be AOTed.
10562
10563         * console-io.c: Include sys/filio.h under solaris.
10564         
10565         * console-io.c: Include curses.h if needed correctly.
10566
10567 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10568         
10569         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
10570         method->klass as well.
10571
10572         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
10573
10574         * class.c (mono_class_init): Switch on lazy initialization of 
10575         methods.
10576
10577         * class.c (mono_class_get_finalizer): Handle the case when the 
10578         finalizer is inherited.
10579
10580 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10581
10582         * console-io.c: <curses.h> is needed by term.h on solaris.
10583
10584 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
10585
10586         * icall.c, class-internals.h, monodiet.c, class.c: Remove
10587         mono_class_setup_properties where possible. Remove this ftn from
10588         the header file, and make it static.
10589
10590 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10591
10592         * loader.c: Add missing setup_... call.
10593
10594         * class.c: Add missing setup_... calls.
10595
10596         * class.c (mono_class_init): Switch on lazy initialization of 
10597         the generic vtable.
10598         
10599         * class.c (mono_class_init): Fix generics broken by the recent changes.
10600
10601         * monodiet.c (handle_type): Add missing setup_... calls.
10602
10603         * class.c: Back out garbage in previous patch.
10604         
10605         * class.c: Add missing setup_... calls.
10606
10607         * class.c (mono_class_get_method_from_name_flags): Avoid calling
10608         mono_class_setup_methods () if possible.
10609
10610         * class-internals.h (MonoClass): Add 'has_cctor' flag.
10611
10612         * class-internals.h (MonoCachedClassInfo): New structure.
10613
10614         * class.c: Initialize properties and events fields of MonoClass lazily.
10615
10616         * class.c: Add infrastructure for lazily initializing the methods and
10617         vtable fields of MonoClass. Not yet used.
10618
10619         * class.c (mono_class_get_finalizer): New helper function.
10620
10621         * class.c: Add infrastructure for loading some class related data from
10622         an AOT file.
10623
10624         * object.c: Add infrastructure for initializing the vtable from data
10625         in the AOT file.
10626
10627         * gc.c (run_finalize): Use mono_class_get_finalizer ().
10628
10629         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
10630         appropriate initialization function before accessing parts of the
10631         MonoClass structure.
10632
10633         * marshal.c: Fix warnings.
10634         
10635         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
10636
10637         * mono-debug-debugger.c (get_exception_message): Use 
10638         mono_class_get_method_from_name_flags ().
10639
10640 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
10641
10642         * reflection.c, appdomain.c: Replace a few manual searches that
10643         Zoltan missed. (Paolo approved this part of my initial patch).
10644
10645 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
10646
10647         * profiler.c: disable recording statistical events at report time.
10648
10649 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10650
10651         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
10652         to byteswap arrays of enum values, too (bug #72080).
10653
10654 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10655
10656         * appdomain.c (set_domain_search_path): Allow this to be called if
10657         domain->setup is not yet set.
10658
10659         * loader.c (mono_method_get_index): New helper function.
10660
10661         * loader.c reflection.c: Use mono_method_get_index ().
10662
10663         * class.c (mono_class_get_method_from_name_flags): New helper method.
10664
10665         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
10666         this.
10667
10668         * class.c (mono_class_get_cctor): New helper method.
10669
10670         * string-icalls.c object.c class.c marshal.c reflection.c: Use
10671         mono_class_get_method () to look up methods.
10672
10673 2005-02-01  Miguel de Icaza  <miguel@novell.com>
10674
10675         * console-io.c: Fix the build, this should work on Windows.
10676
10677 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
10678
10679         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
10680         be set to null to keep things valid
10681
10682 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10683
10684         * icall.c: added Console 2.0 icalls.
10685         * Makefile.am: added console-io.[ch]
10686         * console-io.[ch]: internal calls for Console 2.0 API.
10687
10688 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10689
10690         * class.c: make sure we consider all the interfaces
10691         when calculating max_interface_id (bug found by
10692         Jeroen Frijters running ikvm).
10693
10694 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10695
10696         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
10697         valuetype fields to null.
10698
10699         * object.c (set_value): Ditto. Fixes #71669.    
10700
10701 2005-01-31  Martin Baulig  <martin@ximian.com>
10702
10703         * metadata.c (mono_metadata_has_generic_params): New public
10704         function; checks whether something is a generic method.
10705
10706 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10707
10708         * appdomain.c: fix infinite recursion when adding assemblies.
10709
10710 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
10711
10712         * object.c: Fix small typo to return all items for Environment.
10713         GetCommandLineArgs.
10714
10715 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10716
10717         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
10718         reflection.c: more domain and assembly-unload related fixes
10719         and memory leaks plugs.
10720
10721 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10722
10723         * 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.
10724
10725 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10726
10727         * loader.c (mono_method_signature): Make this method lazy
10728         (mono_get_method_from_token): Don't computate the signature here.
10729
10730         Doing this saves quite a bit of memory. I got 90 kb on starting up
10731         monodoc. It should also save some disk reads on startup.
10732
10733         * *: MonoMethod->signature might be NULL now. You *MUST* use
10734         mono_method_signature.
10735
10736 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
10737
10738         * object.c (mono_runtime_get_main_args): Return an array from the
10739         current domain here. Fixes #71938.
10740
10741 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10742
10743         * monitor.c: formatting changes to comply with the
10744         mono coding style and remove #ifdefs from the code.
10745
10746 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10747
10748         * metadata.c, private.h: remove some unneeded data
10749         and use a more compact representation for table schemas.
10750
10751 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10752
10753         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
10754         to get a better distribution in hash tables.
10755         * *.c: use mono_aligned_addr_hash() where appropriate.
10756         * assembly.c: make var static.
10757
10758 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10759
10760         * domain-internals.h: Put MonoJitInfo on a diet.
10761
10762         * domain.c: Fix a warning.
10763
10764 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10765
10766         * gc.c: rework the gc handles code to reuse handles
10767         when freed.
10768
10769 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10770
10771         * domain.c: fixed long standing bug in mono_string_equal() which
10772         was brought to light with the ldstr changes.
10773
10774 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10775
10776         * reflection.c: Remove warning by adding missing include for marshal.h
10777
10778 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10779
10780         * domain.c, object.c: change the ldstr_table to hold
10781         MonoString* as keys: makes the runtime isinterned lookup
10782         faster and simplifies memory management.
10783
10784 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
10785  
10786         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
10787         possible to add imperative security checks before calling the icall.
10788         * reflection.c: Return security attributes on the original MonoMethod
10789         (and not the wrapped one). This fix permissions on icalls.
10790
10791 2005-01-25  Dick Porter  <dick@ximian.com>
10792
10793         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
10794         the check for mktime() support actually test the mktime() return
10795         value.  "Fixes" bug 71682, though the output is still different to
10796         MS.
10797
10798 2005-01-25  Martin Baulig  <martin@ximian.com>
10799
10800         * class.c (mono_class_is_assignable_from): Make this work for
10801         generic instances.
10802
10803 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
10804
10805         * marshal.c (mono_string_utf8_to_builder)
10806         (mono_string_builder_to_utf16): We might not have ownership of the
10807         string. In thise case, we need to create a new buffer.
10808
10809         * object-internals.h (mono_stringbuilder_capacity): sb->str might
10810         be null, in which case, use the default capacity.
10811
10812 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10813
10814         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
10815         GC events to the profiler.
10816
10817 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10818
10819         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
10820         if you don't want the GC to run.
10821
10822 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
10823
10824         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
10825         start providing a GC API and keeping different implementations in
10826         their own file.
10827         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
10828
10829 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10830
10831         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
10832         mmap rather than allocating a huge buffer.
10833         (mono_debug_close_mono_symbol_file): Free the buffer allocated
10834         above.
10835
10836 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10837
10838         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
10839         and CheckExecutionRights.
10840         * reflection.c|h: Keep the index of the declarative security to be 
10841         used, instead of the pointer, when AOT compiler is used. Also add 
10842         class initialization when requesting demands.
10843         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
10844         CheckExecutionRights. Both properties are now FALSE by default, and
10845         unmodifiable, unless the --security option is used.
10846
10847 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10848
10849         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
10850         reflection.c: properly refcount images and assemblies, many leaks fixed.
10851
10852 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10853
10854         * threadpool.c: increase the timeout for threads in the thread pool to
10855         10s.  Fixes bug #67159.
10856
10857 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
10858
10859         * class-internals.h: Sun's compiler insists on explicit
10860         signed on bit fields to handle then correctly.
10861
10862 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
10863
10864         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
10865         Make the size of the array fit only the number of invalid path
10866         chars that we have.
10867
10868         * class.c (_mono_class_get): Improve the error reporting when a
10869         class referenced is not found, to assist debugging. 
10870
10871 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
10872
10873         * threads.c: fix off-by-one error.
10874         * domain.c: free data allocated in the domain.
10875
10876 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
10877
10878         * reflection.c (mono_method_body_get_object): Fill out exception info
10879         as well.
10880
10881         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
10882         structure.
10883         
10884 2005-01-19  Martin Baulig  <martin@ximian.com>
10885
10886         * loader.c (mono_get_method_constrained): Make this work again.
10887
10888 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
10889
10890         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
10891         guint16 to match the managed side.
10892
10893         * reflection.c (mono_reflection_body_get_object): Fill out local
10894         variables array.
10895
10896         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
10897         as well.
10898
10899         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
10900         'local_var_sig_token'.
10901
10902 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10903
10904         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
10905         System.Drawing.
10906
10907         * reflection.c (mono_method_body_get_object): Handle abstract and
10908         runtime methods.
10909
10910 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
10911
10912         * marshal.c, loader.c, class-internals.h, reflection.c:
10913         store the emthod data for a wrapper in an array instead of a list.
10914
10915 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
10916
10917         * marshal.c: change the code to allocate memory more
10918         conservatively for method wrappers.
10919
10920 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10921
10922         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
10923         fields from MonoClass to the marshal info structure where they belong.
10924
10925 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10926
10927         * class.c, object.c, class-internals.h, marshal.c: rearrange
10928         some fields and tweak some types to lower memory usage.
10929
10930 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10931
10932         * threads.c (signal_thread_state_change): Handle the case when the
10933         target thread is the current thread.
10934
10935         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
10936
10937         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
10938         emit_ptr_to_object_conv. 
10939
10940         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
10941         marshalling. Fixes #71352.
10942
10943 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10944
10945         * metadata.h, blob.h: move table enum to blob.h so it can be included
10946         in any header.
10947         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
10948         cut the size of MonoImage/MonoDynamicImage.
10949
10950 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
10951
10952         * profiler.c (mono_profiler_install_simple): Fix default arguments.
10953
10954 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
10955
10956         * reflection.c, reflection.h, icall.c: add a function to check
10957         if an attribute type is defined for a metadata object.
10958
10959 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
10960
10961         * object-internals.h: Added some needed fields from StringBuilder class.
10962         * marshal.c: Set the maxCapacity when creating a StringBuilder.
10963
10964 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
10965
10966         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
10967         threads before shutting down the runtime.
10968
10969         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
10970
10971 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10972
10973         * object-internal.h, threads.c: implement stacksize and 
10974         parameterized thread start functionality (requires
10975         matching corlib). Marked broken code for later removal.
10976
10977 2005-01-12  Martin Baulig  <martin@ximian.com>
10978
10979         * class-internals.h (MonoGenericClass): Moved the `initialized'
10980         flag to MonoDynamicGenericClass, removed `init_pending'.
10981         (MonoGenericInst): Added `is_reference' flag.
10982
10983 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
10984
10985         * reflection.c (mono_image_create_pefile): Only set the pe_offset
10986         inside the MSDOS header. Fixes #71201.
10987
10988         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
10989         gc thread.
10990         (mono_domain_finalize): Ditto.
10991
10992 2005-01-12  Martin Baulig  <martin@ximian.com>
10993
10994         * class.c (mono_get_shared_generic_class): Use the cache for
10995         non-dynamic generic classes.
10996
10997         * class-internals.h (mono_class_create_generic_2): Removed
10998         function prototype, this function is now static inside class.c.
10999
11000         * class.c (mono_class_create_generic_2): Made this static, only
11001         call it from mono_class_init() and mono_class_setup_parent().
11002         (collect_implemented_interfaces_aux): Call mono_class_init() on
11003         the interfaces we collect.
11004         (mono_class_setup_vtable): Call mono_class_init (class->parent).
11005
11006 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11007
11008         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
11009         it a real thread handle.
11010
11011         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
11012         MonoJitExceptionInfo, since each catch clause needs its own variable.
11013         
11014 2005-01-11  Dick Porter  <dick@ximian.com>
11015
11016         * image.c (mono_pe_file_open): New variant on mono_image_open()
11017         that does not set up the CLI metadata; used for FileVersionInfo so
11018         it can get the data for windows binaries too.
11019         
11020         * process.c (process_read_string_block): Don't read off the end of
11021         the StringTable block.
11022
11023         These both fix bug 70766.
11024
11025 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
11026
11027         * gc.c: set some fields to NULL at GC cleanup time.
11028         * threads.c: if we quit the main thread, call exit ().
11029
11030 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11031
11032         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
11033
11034 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
11035
11036         * threads.h, threads.c, object.c: added accessor and settor for
11037         main_thread. Handle it specially when exiting from it: wait
11038         for other foreground threads to exit.
11039
11040 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11041
11042         * process.c, verify.c: remove some bloat.
11043
11044 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11045
11046         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
11047         the calling convention to cdecl under win32.
11048
11049 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
11050
11051         * object.c (mono_object_get_size): New function to get the size of
11052         an object instance.
11053
11054         * profiler.c (simple_allocation): Use above.
11055
11056 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
11057
11058         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
11059         ves_icall_System_AppDomain_getRootDomain (as it's not required to
11060         get an appdomain by it's id and we can't assume the root's id is 0).
11061         * domain-internals.h: Change the function prototype to match.
11062         * icall.c: Change the icall table for AppDomain.
11063
11064 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
11065
11066         * locales.c (string_invariant_compare_char): Only compute
11067         GUnicodeTypes in the case where we need them.  Test for ordinality
11068         first and return if so.
11069
11070         From the commit:
11071
11072                 /*
11073                  * FIXME: here we must use the information from c1type and c2type
11074                  * to find out the proper collation, even on the InvariantCulture, the
11075                  * sorting is not done by computing the unicode values, but their
11076                  * actual sort order.
11077                  */
11078
11079 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11080
11081         * loader.c: for P/Invoke methods, allow the "Internal" shared
11082         library name to refer to the calling process symbol namespace.
11083
11084 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11085
11086         * Makefile.am: Add the security manager to the build.
11087         * security-manager.c|h: New. Initialization of the security manager.
11088
11089 2005-01-07  Dick Porter  <dick@ximian.com>
11090
11091         * threads.c: 
11092         * monitor.c: Update thread state during Monitor and WaitHandle
11093         waits.  Fixes bug 71031.
11094
11095 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11096
11097         * reflection.c (property_encode_signature): Correctly handle when the
11098         property has no methods.
11099
11100 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11101
11102         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
11103         
11104         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
11105         fields from mb, not rmb. Fixes #71017.
11106
11107         * marshal.c (emit_ptr_to_str_conv): Add support for 
11108         ByValTStr -> string conversion. Fixes #71015.
11109
11110         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
11111
11112         * mempool.c (mono_mempool_contains_addr): New helper function.
11113
11114 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11115
11116         * metadata.c (mono_metadata_compute_size): Fix size calculation of
11117         HasSematics encoded fields.
11118         
11119         * metadata.c (mono_type_to_unmanaged): Improve error message for 
11120         invalid string marshalling.
11121
11122         * metadata.c: Fix warnings.
11123         
11124 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11125
11126         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
11127         profiler support.
11128
11129 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11130
11131         * domain.c object.c domain-internals.h: Revert part of r38077 since the
11132         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
11133         tests.
11134
11135 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11136
11137         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
11138         so methods containing these can be AOTed.
11139
11140 2005-01-03  Martin Baulig  <martin@ximian.com>
11141
11142         * loader.c (find_method): Removed the hack for generic instances.
11143         (method_from_memberref): If our parent is a generic instance, pass
11144         its generic type definition to find_method() and then inflate the
11145         method.
11146         (mono_get_method_constrained): Pass the generic type definition to
11147         find_method() and inflate the method later.
11148
11149         * class-internals.h (MonoStats): Added `generic_class_count'.
11150
11151         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
11152         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
11153
11154         * reflection.c (mono_custom_attrs_from_params): Don't ignore
11155         generic type definitions.
11156
11157 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11158
11159         * loader.c icall.c: Fix warnings.
11160
11161 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
11162
11163         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
11164         blittable types. Fixes #70864.
11165
11166 2004-12-29  Martin Baulig  <martin@ximian.com>
11167
11168         * icall.c
11169         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
11170
11171         * reflection.c (mono_method_get_object): Create a
11172         "System.Reflection.MonoGenericMethod" for inflated methods; don't
11173         call mono_get_inflated_method().
11174
11175         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
11176
11177 2004-12-27  Martin Baulig  <martin@ximian.com>
11178
11179         * class-internals.h (MonoMethod): Added `is_inflated' flag.
11180         (MonoMethodInflated): Added `inflated' field.
11181
11182         * class.c (mono_class_inflate_generic_method): Don't really
11183         inflate the method here; just set the `is_inflated' flag in the
11184         MonoMethod.
11185         (mono_class_get_inflated_method): Actually inflate the method here
11186         if it's not already inflated; we use the MonoMethodInflated's new
11187         `inflated' field as a cache.
11188
11189 2004-12-26  Martin Baulig  <martin@ximian.com>
11190
11191         * class.c
11192         (inflate_generic_class): Moved some code out of inflate_generic_type().
11193         (mono_class_inflate_generic_method): If we're already inflated,
11194         inflate the context and use the declaring method; ie. make sure
11195         the declaring method of an inflated method is always the generic
11196         method definition.
11197         (mono_class_create_from_typedef): Create
11198         `class->generic_container->context->gclass'.
11199
11200 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11201
11202         * metadata-internals.h, marshal.c, reflection.c: More
11203         MonoGHashTable->GHashTable.
11204
11205         * domain-internals.h, class.c: Change MonoGHashTable's into
11206         GHashTables for some cases where no gc stuff is used
11207
11208         All users: update apis
11209
11210 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
11211
11212         * metadata.c (builtin_types): Make this `const'. Makes this get
11213         put into the shareable section.
11214         (mono_metadata_init): Casts to make gcc happy.
11215
11216 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
11217
11218         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
11219
11220 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
11221
11222         * icall.c: Added an internal call to retrieve the position and length
11223         of assembly-level declarative security attributes (RequestMinimum, 
11224         RequestOptional and RequestRefuse). This is used by the Assembly class
11225         to re-create the corresponding permission sets.
11226
11227 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11228
11229         * marshal.c: fix the stelemref wrapper to be type correct
11230         (and faster).
11231
11232 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11233
11234         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
11235         to do key & 0x7fffffff. Hashtable already does this. It just
11236         results in longer code.
11237
11238 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11239
11240         * appdomain.c: Bump corlib version.
11241         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
11242         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
11243         * reflection.c|h: Add functions to get declarative security infos
11244         (blob position and length) for assemblies, classes and methods.
11245
11246 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
11247
11248         * reflection.c: sort the constant table (bug #70693).
11249
11250 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
11251
11252         * object-internals.h, threads.c, domain.c: add accessors for
11253         the MonoThread and MonoDomain tls keys.
11254
11255 2004-12-18  Martin Baulig  <martin@ximian.com>
11256
11257         * class.c (inflate_generic_type): If we're inflating a generic
11258         instance, set `ngclass->context->container = context->container';
11259         ie. the container we inflated into.
11260
11261         * metadata.c (mono_metadata_parse_generic_param): Reflect above
11262         inflate_generic_type() changes.
11263
11264 2004-12-17  Martin Baulig  <martin@ximian.com>
11265
11266         * class-internals.h
11267         (MonoGenericClass): Replaced `MonoType *generic_type' with
11268         `MonoClass *generic_class'.  Removed `dynamic_info'; if
11269         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
11270         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
11271
11272 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11273
11274         * exception.c (mono_exception_from_token): New helper function.
11275
11276 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11277
11278         * assembly.c (mono_assembly_load_with_partial_name): Call 
11279         mono_assembly_loaded before invoking the preload hooks. Fixes
11280         #70564.
11281
11282         * object-internals.h (MonoThread): Change culture_info and 
11283         ui_culture_info into an array.
11284
11285         * threads.c: Cache culture info objects from more than one appdomain.
11286
11287         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
11288         current UI culture.
11289
11290 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11291
11292         * threads.h threads.c appdomain.c: Clear the culture_info field of
11293         all threads during unloading if they point to an object in the dying
11294         appdomain.
11295
11296 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
11297
11298         * culture-info.h (TextInfoEntry): New struct
11299         * object-internals.h: sync with managed
11300         * locales.c: fill the `text_info_data' field
11301         * culture-info-tables.h: update
11302
11303 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11304
11305         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
11306         collector.
11307
11308 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
11309
11310         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
11311         (ves_icall_ModuleBuilder_getMethodToken): Ditto
11312
11313 2004-12-12  Martin Baulig  <martin@ximian.com>
11314
11315         * mono-debug-debugger.c (write_type): If we're an enum and the
11316         builtin types have already been initialized, call mono_class_init().
11317
11318 2004-12-11  Martin Baulig  <martin@ximian.com>
11319
11320         * metadata.c (mono_metadata_load_generic_params): Added
11321         `MonoGenericContainer *parent_container' argument; automatically
11322         compute `container->is_method'; pass the correct owner to
11323         get_constraints().      
11324
11325         * reflection.c (compare_genericparam): Sort the GenericParam table
11326         according to increasing owners. 
11327
11328 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11329
11330         * profiler.c: allow disabling the default profiler.
11331
11332 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
11333
11334         * decimal.c, icall.c: allow disabling System.Decimal support.
11335
11336 2004-12-09  Marek Safar <marek.safar@seznam.cz>
11337
11338         * reflection.c: Add support for null attribute arguments.
11339
11340 2004-12-09  Martin Baulig  <martin@ximian.com>
11341
11342         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
11343         names to get rid of compiler warnings.
11344
11345 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11346
11347         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
11348         mono_marshal_load_type_info (). Fixes #69625.
11349         (mono_marshal_get_ptr_to_struct): Likewise.
11350
11351 2004-12-08  Martin Baulig  <martin@ximian.com>
11352
11353         * mono-debug.h: Bumped version number to 47.
11354
11355         * mono-debug-debugger.c
11356         (mono_debugger_event_handler, mono_debugger_event): Take two
11357         guint64 arguments insteed of a gpointer and a guint32.  
11358
11359 2004-12-08  Martin Baulig  <martin@ximian.com>
11360
11361         * debug-mono-symfile.h
11362         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
11363         `address' to `native_offset'.
11364
11365 2004-12-08  Martin Baulig  <martin@ximian.com>
11366
11367         * class.c (mono_class_create_from_typespec): Only inflate if we
11368         either have `context->gclass' or `context->gmethod'.
11369
11370 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11371
11372         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
11373
11374         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
11375
11376         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
11377
11378         * reflection.c (mono_assembly_get_object): Remove the workaround put
11379         in for the release.
11380         
11381         * appdomain.c: Use the corlib_internal field from MonoAssembly.
11382
11383         * appdomain.c: Bump corlib version.
11384
11385         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
11386         be visible in other appdomains.
11387
11388 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
11389
11390         * threads.c: Interlocked inc and dec for longs were messed up,
11391         use a KISS based impl for this. Fixes 70234
11392
11393 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11394
11395         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
11396
11397 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11398
11399         * icall.c: fix to follow policy not to allow struct
11400         arguments in icalls.
11401
11402 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11403
11404         * process.c: make the patch that handles spaces in file paths work
11405         on mono/windows too.
11406
11407 2004-12-06  Martin Baulig  <martin@ximian.com>
11408
11409         * class.c (mono_class_create_generic): Call
11410         mono_class_setup_supertypes() if we're dynamic.
11411         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
11412
11413 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11414
11415         * object-internals.h: Add new fields to MonoThread.
11416
11417         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11418
11419         * icall.c threads-types.h threads.c: Add new icalls.
11420
11421         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
11422
11423         * object-internals.h (MonoReflectionAssembly): Sync object layout with
11424         managed side.
11425
11426         * appdomain.c: Bump corlib version.
11427
11428         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
11429         internal assemblies. Fixes #69181.
11430
11431 2004-12-05  Martin Baulig  <martin@ximian.com>
11432
11433         * class.c (mono_class_inflate_generic_signature): Make this a
11434         no-op if `context' is NULL or we don't have any type parameters;
11435         also copy `sentinelpos'.        
11436
11437 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
11438
11439         * image.c: Add unbox_wrapper_cache.
11440
11441         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
11442
11443         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
11444         function generator.
11445         
11446         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
11447         Fixes #70173.
11448
11449         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
11450         
11451 2004-12-04  Martin Baulig  <martin@ximian.com>
11452
11453         * loader.c (mono_method_get_signature_full): New public function;
11454         like mono_method_get_signature(), but with an additional
11455         `MonoGenericContext *' argument.
11456
11457         * class.c (mono_class_inflate_generic_signature): Formerly known
11458         as inflate_generic_signature(); make this public.
11459
11460 2004-12-04  Martin Baulig  <martin@ximian.com>
11461
11462         * metadata.c
11463         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
11464         instead of a `MonoGenericContainer *'.  
11465         (mono_metadata_parse_array_full): Likewise.
11466         (mono_metadata_parse_signature_full): Likewise.
11467         (mono_metadata_parse_method_signature_full): Likewise.
11468         (mono_metadata_parse_generic_inst): Likewise.
11469         (mono_metadata_parse_generic_param): Likewise.
11470         (mono_metadata_parse_mh_full): Likewise.
11471         (mono_type_create_from_typespec_full): Likewise.
11472
11473 2004-12-03  Martin Baulig  <martin@ximian.com>
11474
11475         * class-internals.h (MonoGenericContainer): Replaced the
11476         `MonoGenericContext * pointer with a `MonoGenericContext'
11477         structure and made it the first element.
11478
11479 2004-12-03  Martin Baulig  <martin@ximian.com>
11480
11481         * class.c
11482         (inflate_generic_type): Set the `context->container' when creating
11483         a new MonoGenericContext.
11484         (mono_class_inflate_generic_method): Likewise.
11485         (mono_class_create_from_typespec): Just use `context->container'
11486         to get the container.
11487
11488         * loader.c (method_from_methodspec): Set `context->parent' from
11489         `context->container' - and if that's a method container, use its
11490         parent.  Also set the `context->container' when creating a new
11491         MonoGenericContext.
11492         (mono_get_method_from_token): Use just `context->container' to get
11493         the container.
11494
11495         * metadata.c (do_mono_metadata_parse_generic_class): Also set
11496         `gclass->context->container'.
11497
11498         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
11499         the `context->container' when creating a new MonoGenericContext.
11500
11501 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
11502
11503         * reflection.c (compare_genericparam): Sort params with identical
11504         owner by their number. Fixes gen-111 on sparc.
11505
11506 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11507
11508         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
11509         around the domain changes.
11510
11511         * appdomain.c (mono_domain_unload): Handle the case when the thread
11512         calling Unload is itself being aborted during unloading. Fixes #70022.
11513
11514         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
11515
11516         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
11517         checkpoint_func as an icall so it gets a wrapper.
11518         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
11519         in the cross-appdomain wrappers too.
11520
11521         * threads.c (mono_thread_has_appdomain_ref): Make this public.
11522
11523         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
11524
11525         * reflection.c: Fix some memory leaks.
11526         
11527 2004-12-02  Martin Baulig  <martin@ximian.com>
11528
11529         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
11530
11531         * metadata.c (generic_class_cache): New static hashtable.
11532         (mono_metadata_lookup_generic_class): New public method.
11533
11534 2004-12-02  Martin Baulig  <martin@ximian.com>
11535
11536         * class.c (mono_class_create_from_typedef): Call
11537         mono_class_setup_parent() and mono_class_create_mono_type() before
11538         parsing the interfaces.
11539
11540 2004-12-02  Martin Baulig  <martin@ximian.com>
11541
11542         * metadata.c (generic_inst_cache): New static hashtable.
11543         (mono_metadata_lookup_generic_inst): New public function.
11544         (mono_metadata_inflate_generic_inst): New public function.
11545         (mono_metadata_parse_generic_inst): New public function.
11546         (do_mono_metadata_parse_generic_class): Use the new
11547         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
11548         since this'll also use the cache.
11549
11550         * reflection.c (mono_reflection_bind_generic_method_parameters):
11551         Use mono_metadata_lookup_generic_inst() to use the new cache.
11552
11553         * class.c (inflate_mono_type): Use
11554         mono_metadata_inflate_generic_inst() to inflate a generic
11555         instance; this'll also use the new cache.
11556
11557         * loader.c (method_from_methodspec): Use
11558         mono_metadata_parse_generic_inst() and
11559         mono_metadata_inflate_generic_inst() rather than parsing it
11560         manually, so we can use the new cache.
11561
11562 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11563
11564         * threads.c (wait_for_tids): Do not incorrectly free threads when 
11565         the wait times out.
11566
11567 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11568
11569         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
11570         iter->args based on whether parameters are passed in registers (i.e.
11571         MONO_ARCH_REGPARMS is defined)
11572
11573 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
11574
11575         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
11576         the exception message. Fixes #70070.
11577         (method_from_methodspec): Fix warnings.
11578
11579 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11580
11581         * process.c: (complete_path) return the path quoted
11582
11583 2004-12-01  Martin Baulig  <martin@ximian.com>
11584
11585         * class-internals.h (MonoGenericInst): New structure.
11586         (MonoGenericClass): Replaced `type_argc', `type_argv' and
11587         `is_open' with `MonoGenericInst *inst'.
11588         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
11589         `is_open' with `MonoGenericInst *inst'.
11590
11591 2004-11-30  Martin Baulig  <martin@ximian.com>
11592
11593         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
11594
11595         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
11596         to `generic_class_cache'.
11597
11598         * metadata.c
11599         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
11600         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
11601         (mono_generic_inst_is_valuetype): Renamed to
11602         mono_generic_class_is_valuetype().
11603
11604         * class-internals.h
11605         (MonoGenericInst): Renamed to MonoGenericClass.
11606         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
11607         (MonoClass): Renamed `generic_inst' to `generic_class'.
11608         (MonoGenericContext): Renamed `ginst' to `gclass'.
11609
11610         * object-internals.h
11611         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
11612
11613         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
11614         mono_reflection_generic_class_initialize().
11615
11616         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
11617         now known as "System.Reflection.MonoGenericClass".
11618         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
11619
11620 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
11621
11622         * class-internals.h: Added a flag field to MonoClass to cache the
11623         declarative security attributes actions associated with the class.
11624         * domain-internals.h: Added booleans to MonoJitInfo to cache the
11625         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
11626         applicable to the JITted method.
11627         * reflection.c|h: Added functions to extract (as flags) which security
11628         actions are available (declaratively) for a method, class or assembly.
11629         * metadata.c|h: Added functions to search the declarative security
11630         table in the metadata.
11631         
11632 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
11633
11634         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
11635         EXPORTEDTYPES are already in the class name cache, so there is no
11636         need to add extra code here to look at them. Just removes a bit of
11637         cruft.
11638
11639         (ves_icall_System_Environment_get_TickCount): No need for #if
11640         WINDOWS. We already have the code in io-layer.
11641
11642 2004-11-28  Martin Baulig  <martin@ximian.com>
11643
11644         * loader.c
11645         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
11646         Fixes gen-112.cs.
11647
11648 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
11649
11650         * assembly.c (do_mono_assembly_open): Instead of having a
11651         conditional WITH_BUNDLE, incorporate support for bundles here, by
11652         having a global `bundles' variable holding a pointer to the actual
11653         bundles. 
11654
11655         (mono_register_bundled_assemblies): New API call used by the
11656         bundle code. 
11657
11658         See mkbundle.1 for details.
11659         
11660 2004-11-27  Martin Baulig  <martin@ximian.com>
11661
11662         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
11663         the vtable for generic methods.
11664
11665 2004-11-26  Martin Baulig  <martin@ximian.com>
11666
11667         * metadata.c
11668         (mono_metadata_generic_method_hash): New public function.
11669         (mono_metadata_generic_method_equal): Likewise.
11670
11671         * class-internals.h
11672         (MonoGenericContainer): Added `GHashTable *method_hash'.
11673
11674         * reflection.c (ReflectionMethodBuilder): Added
11675         `MonoGenericContainer *generic_container'.
11676         (reflection_methodbuilder_to_mono_method): Don't create a new
11677         MonoGenericContainer each time we're called.
11678         (mono_reflection_bind_generic_method_parameters): Use
11679         `container->method_hash' to cache the results so we don't create a
11680         different method if we're called several times with the same
11681         arguments.
11682
11683         * loader.c (method_from_methodspec): Use the new
11684         `container->method_hash' here, too.
11685
11686 2004-11-26  Martin Baulig  <martin@ximian.com>
11687
11688         * class.c (inflate_generic_signature): Correctly compute
11689         `res->has_type_parameters'.
11690         (mono_class_vtable): Use the `has_type_parameters' flag to
11691         determine whether we're a generic method.
11692
11693         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
11694
11695 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11696
11697         * object.c (mono_runtime_run_main): Fix a small memory leak.
11698
11699 2004-11-25  Martin Baulig  <martin@ximian.com>
11700
11701         * class.c (set_generic_param_owner): Fixed the loop.
11702
11703 2004-11-25  Martin Baulig  <martin@ximian.com>
11704
11705         * object.c (mono_class_vtable): Don't create any JIT wrappers for
11706         generic methods.
11707
11708 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11709
11710         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
11711         names. Fixes #69787.
11712
11713 2004-11-24  Martin Baulig  <martin@ximian.com>
11714
11715         * class.c (mono_class_create_generic_2): If we don't have a
11716         `ginst->parent', inflate `gklass->parent' to get our parent.
11717
11718 2004-11-24  Martin Baulig  <martin@ximian.com>
11719
11720         * reflection.c (compare_genericparam): Correctly sort the
11721         GenericParam table; fixes #69779.
11722
11723 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
11724
11725         * reflection.c: When writing a PE file, don't create a huge
11726         buffer in memory. Just write the arrays we have to the file.
11727         This reduces memory usage.
11728
11729         * metadata-internals.h: MonoDynamicStream pefile is no longer used
11730         globally.
11731
11732 2004-11-17  Martin Baulig  <martin@ximian.com>
11733
11734         * class.c (mono_class_init): Don't setup `class->parent' for
11735         dynamic instances; moved this to mono_class_generic_2().
11736         (mono_class_create_generic): Also set `klass->inited' for dynamic
11737         generic instances.
11738         (mono_class_create_generic_2): Don't do anything for dynamic
11739         generic instances.  Set `klass->parent' here and also call
11740         mono_class_setup_parent() here. 
11741
11742         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
11743         `MonoType *parent' argument; set `ginst->parent' before calling
11744         mono_class_create_generic_2(), so we set the correct parent.
11745
11746 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
11747
11748         * reflection.c: allow getting attributes from ModuleBuilder
11749         (used by ikvm).
11750
11751 2004-11-17  Martin Baulig  <martin@ximian.com>
11752
11753         * class.c (mono_class_create_from_typedef): If a type parameter is
11754         inherited from an outer class, set its owner to that class.
11755
11756 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
11757
11758         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
11759           for (int*) written size. This fixes bug #69592.
11760
11761 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11762
11763         * icall.c: Added IsAuthenticodePresnet internal call.
11764         * image.c|h: New function that check a MonoImage for an Authenticode
11765         signature in the certificate PE data directory.
11766         * security.c|h: New internal call to ask the runtime if an 
11767         Authenticode signature seems referenced in the PE header.
11768
11769 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
11770
11771         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
11772
11773         * reflection.c (mono_image_create_pefile): Free the assembly streams
11774         after writing out the assembly file.
11775
11776         * object.c (mono_runtime_run_main): Fix small memory leak.
11777
11778         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
11779         property access modifiers. Fixes #69389.
11780
11781 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11782
11783         * domain.c, object.c, object-internals.h, domain-internals.h,
11784         object.h, marshal.c: keep dynamic code info per domain.
11785
11786 2004-11-15  Martin Baulig  <martin@ximian.com>
11787
11788         * class.c (mono_type_get_name_recurse): Put type arguments in
11789         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
11790         see bug #68387.
11791
11792 2004-11-15  Martin Baulig  <martin@ximian.com>
11793
11794         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
11795         (mono_class_setup_vtable): When computing `the_cname' for a
11796         generic instance, don't include the namespace since we'd otherwise
11797         add it twice.
11798
11799 2004-11-15  Martin Baulig  <martin@ximian.com>
11800
11801         * class.c (mono_class_create_generic): Changed return type to void.
11802         (mono_class_create_generic_2): New public function; setup
11803         `class->method', `class->field' and `class->interfaces' here
11804         instead of in mono_class_init().
11805
11806         * class.h (mono_class_create_generic): Moved to class-internals.h.
11807
11808 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
11809
11810         * reflection.c (mono_image_create_pefile): take a file HANDLE.
11811         rather than writing to memory, write to this file. Right now,
11812         we are just writting into a buffer, and copying that. However
11813         we can avoid the buffer later.
11814
11815         (mono_dynamic_stream_reset): new function
11816
11817         * icall.c, object-internals.h: update for the above.
11818
11819 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
11820
11821         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
11822         have been using gc'd memory. First it is slower, unlikely
11823         the comment in the source code said, secondly, it increases
11824         our footprint to do it in the gc.
11825
11826         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
11827         the method so that it does not have to copy to managed code.
11828
11829 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11830
11831         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
11832
11833 2004-11-12  Martin Baulig  <martin@localhost>
11834
11835         * reflection.c (mono_image_create_token): Allow generic method
11836         definitions here, since they may appear in an `.override'; see
11837         gen-98/gen-99 for an example.
11838
11839 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
11840
11841         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
11842         #69365.
11843
11844         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
11845         descriptive.
11846
11847 2004-11-11  Martin Baulig  <martin@ximian.com>
11848
11849         * class.c (mono_class_setup_vtable): In an explicit interface
11850         implementation, the method name now includes the arity.
11851
11852 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
11853
11854         * object.c (mono_array_full_copy): Fix warning.
11855
11856 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
11857
11858         * appdomain.c: Removed look_for_method_by_name(). Use the new method
11859         mono_class_get_method_from_name() instead.
11860         
11861         * class-internals.h: Added two new types of wrappers. 
11862         Added MonoRemotingTarget enum. Added new trampoline function type, which
11863         takes an additional MonoRemotingTarget value as parameter, so it is
11864         possible to request a trampoline for a specific target.
11865         
11866         * class.c: Added new mono_class_get_method_from_name() method.
11867         
11868         * class.h: In MonoRemoteClass, we can have now to vtables, one for
11869         general remoting sinks and one specific for cross domain calls.
11870         
11871         * debug-helpers.c: Added new wrapper names.
11872         
11873         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
11874         of a remote class.
11875         
11876         * image.c: Porperly delete value objects form the remoting invoke hashtable.
11877         
11878         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
11879         with several other methods (mono_marshal_get_xappdomain_dispatch,
11880         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
11881         and others) can generate a fast remoting wrapper for cross domain calls.
11882         More information can be found in docs/remoting.
11883         Other changes: Removed mono_find_method_by_name, and used
11884         mono_class_get_method_from_name instead.
11885         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
11886         is stored in the remoting invoke hashtable.
11887         
11888         * marshal.h: published the new method for getting the xdomain wrapper,
11889         and also added a method for getting the adequate wrapper for a given
11890         method and target.
11891         
11892         * object-internals.h, object.c: Added a couple of methods for capying and
11893         cloning arrays.
11894         Modified mono_install_remoting_trampoline, which takes the new remoting
11895         trampoline that has a remoting target as parameter.
11896         mono_class_proxy_vtable now also takes a remoting target as parameter, and
11897         will return the most suitable vtable for the target.
11898         Added mono_remote_class_vtable, which returns the vtable of a remote class
11899         (which can be the normal remoting vtable or the xdomain vtable).
11900         
11901         * threads.c: the xdomain invoke and dispatch wrappers must also be
11902         protected against interruptions.
11903
11904 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11905
11906         * icall.c: use memmove in BlockCopyInternal when the source and
11907         destination arrays are the same.
11908
11909 2004-11-09  Martin Baulig  <martin@ximian.com>
11910
11911         * class-internals.h (MonoGenericContainer): Removed `method' and
11912         `signature', replaced them with `is_method' and `is_signature'
11913         flags.  Added `context'.
11914
11915         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
11916         instead of a `MonoGenericContainer *'.
11917
11918         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
11919         for dynamic type parameters.
11920         (mono_metadata_load_generic_params): Setup `container->context'.
11921
11922         * reflection.c (mono_reflection_setup_generic_class): Setup
11923         `tb->generic_container->context'.
11924         (do_mono_reflection_bind_generic_parameters): Use
11925         mono_class_inflate_generic_type() to correctly inflate types,
11926         rather than using our own hack just for MONO_TYPE_VAR.
11927
11928 2004-11-09  Martin Baulig  <martin@ximian.com>
11929
11930         * class.c (mono_class_inflate_generic_method): Small fix; don't
11931         crash here.
11932
11933         * icall.c
11934         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
11935         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
11936         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
11937         (ves_icall_Type_BindGenericParameters): Likewise.
11938         (ves_icall_Type_get_IsGenericInstance): Likewise.
11939         (ves_icall_Type_GetGenericParameterPosition): Likewise.
11940         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
11941         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
11942         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
11943
11944 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11945
11946         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
11947         assembly versions and public key tokens. Fixes #69113.
11948
11949 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
11950
11951         * metadata.c: fix bug introduced with the type cache changes
11952         on 2004-11-06.
11953
11954 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
11955
11956         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
11957         the MonoClass pointer instead of the token in exception clauses.
11958         * reflection.c: updates for the above and make the code not depend
11959         on the structure of MonoExceptionClause.
11960
11961 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11962
11963         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
11964         Add support for dynamic assemblies. Fixes #69114.
11965
11966         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
11967
11968 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11969
11970         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
11971         since most only those methods use it. the code member of
11972         MonoMethodPInvoke was dead, so that can be removed too. Also,
11973         remove inline_count (again, not used), and move slot so that it
11974         can share bits with some other flags. This saves 8 bytes in the
11975         structure and gives us about 50 kb back for mcs helloworld.cs
11976
11977         * *.[ch]: Do naming changes for the above.
11978
11979         * loader.c (mono_method_get_header): Lazily init the header
11980         on first access.
11981         (mono_get_method_from_token): don't init the header here
11982         (mono_free_method): the header may never be allocated
11983
11984         Overall, this saves 150 kb of unmanaged allocations
11985         for mcs helloworld.cs. That accounts for 10% of the unmanaged
11986         memory at runtime.
11987         
11988         * loader.c, loader.h (mono_method_get_header): new accessor.
11989
11990         * *.[ch]: use the above method. Prepares us to lazily load
11991         the header.
11992
11993         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
11994         three warnings, which are actual bugs (see 69206).
11995
11996         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
11997         unused. Saves a cool 4 bytes / method.
11998
11999 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
12000
12001         * metadata.c (builtin_types): Add types for System.Object here.
12002         (mono_metadata_parse_type_full): Cache MonoType*'s that are
12003         for a class or valuetype from klass->this_arg or klass->byval_arg.
12004
12005         On mcs for a hello world, this gets us down from 21836 MonoType's
12006         to 14560.
12007
12008         (mono_metadata_free_type): Account for the above change.
12009
12010 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
12011
12012         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
12013         exception instead of asserting if name is null.
12014         (ves_icall_System_AppDomain_GetData): Ditto.
12015
12016 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12017
12018         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
12019         EnumBuilder.
12020
12021         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
12022         Return NULL when the domain does not have entry_assembly set.
12023
12024         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
12025         Add a 'resource_modules' argument.
12026         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
12027
12028         * reflection.c (mono_reflection_create_runtime_class): Move setting
12029         of wastypebuilder here, so mono_get_type_object () returns a MonoType
12030         for enums too.
12031
12032         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
12033         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
12034         Throw an ArgumentNullException if 'ptr' is null.
12035
12036         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
12037         assemblies here. Fixes #69020.
12038
12039 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12040
12041         * reflection.c (build_compressed_metadata): Fix the previous patch for
12042         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
12043         the stack.
12044
12045 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
12046
12047         * assembly.c (mono_assembly_names_equal): Allow a match if one of
12048         the cultures is false. Fixes #69090.
12049
12050         * reflection.c (build_compressed_metadata): Fix invalid memory read 
12051         detected by valgrind.
12052         
12053         * reflection.c (mono_reflection_get_type): Avoid triggering a 
12054         TypeResolve multiple times for the same type. Fixes #65577.
12055
12056 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
12057
12058         * marshal.c: Avoid using ldftn to call managed functions. It is
12059         much slower than just a call.
12060
12061         * reflection.c (mono_module_get_object): free the basename we
12062         allocate here from glib.
12063         
12064         * reflection.c (ensure_runtime_vtable): make sure to free
12065         overrides.  Also, we were allocating an array of MonoMethod not an
12066         array of MonoMethod*.
12067
12068         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
12069
12070         * image.c (mono_image_close): free image->guid here.
12071
12072 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12073
12074         * reflection.c: Fix some spec conformance issues with the PE file
12075         structures so mcs compiled apps run on the Net 2.0 beta.
12076
12077 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
12078
12079         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
12080         Implement this. Fixes #67264.
12081
12082         * debug-helpers.h debug-helpers.c marshal.c: Move 
12083         mono_find_method_by_name to debug-helpers.c.
12084
12085 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
12086
12087         * object.c (mono_release_type_locks): type_initialization_hash is
12088         a GHashTable.
12089
12090         * reflection.c object.c object-internals.h: Fix warnings.
12091
12092         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
12093         without accessors. Fixes #61561.
12094
12095         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
12096         application base from the root domain if not set. Fixes #65641.
12097         (mono_runtime_init): Fix warning.
12098
12099 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12100
12101         * appdomain.c: call mono_thread_pool_init.
12102         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
12103         of worker threads based on the number of CPUs and the environment
12104         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
12105         for non-windows (windows) systems.
12106
12107 2004-10-27  Chris Toshok  <toshok@ximian.com>
12108
12109         * mono-debug-debugger.c (write_class): don't call mono_class_init
12110         here, as even with the check for (!klass->init_pending), we get
12111         into a situation where we're hitting cycles in class
12112         initialization.  Fixes #68816.
12113
12114 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
12115
12116         * image.c: Avoid overwriting values in the loaded_images_hash when an
12117         assembly is loaded multiple times. Fixes #61152.
12118
12119         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
12120         so multiple satellite assemblies for the same name can be loaded.
12121         Fixes #68259.
12122
12123         * mono_domain_assembly_preload: Actually return the loaded assembly, 
12124         not NULL.
12125
12126         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
12127         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
12128
12129         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
12130         pending finalizers are not invoked after the appdomain has been 
12131         unloaded. Fixes #67862.
12132
12133 2004-10-22  Martin Baulig  <martin@ximian.com>
12134
12135         * mono-debug-debugger.c
12136         (mono_debugger_runtime_invoke): Don't box valuetypes.
12137
12138 2004-10-22  Chris Toshok  <toshok@ximian.com>
12139
12140         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
12141         don't hide private methods.
12142
12143 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
12144
12145         * icall.c: Allows the runtime to "share" (when known) the public key
12146         token of an assembly. This avoid the need to recalculate the token 
12147         (from the public key) in managed code.
12148
12149 2004-10-21  Chris Toshok  <toshok@ximian.com>
12150
12151         * debug-helpers.c (append_class_name): argh, revert last patch.
12152         
12153 2004-10-21  Chris Toshok  <toshok@ximian.com>
12154
12155         * debug-helpers.c (append_class_name): use '+' as the delimiter,
12156         not '/', so that it matches what the debugger uses to look up
12157         methods.
12158
12159 2004-10-21  Martin Baulig  <martin@ximian.com>
12160
12161         * mono-debug-debugger.c (mono_debugger_throw_exception): New
12162         public method; this is called each time an exception is thrown and
12163         allows the debugger to use exception catch points.
12164
12165 2004-10-21  Martin Baulig  <martin@ximian.com>
12166
12167         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
12168         the stack pointer and the exception object in some struct and pass
12169         that to the debugger.
12170
12171 2004-10-21  Chris Toshok  <toshok@ximian.com>
12172
12173         * mono-debug-debugger.c (do_write_class): add instance/static
12174         event support.  We don't expose "raise" or "other" yet.
12175         (event_is_static): new method.
12176
12177 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
12178
12179         * mono-debug-debugger.c
12180         (mono_debugger_handle_exception): Remove
12181         bogus return value for fussy compilers.
12182
12183 2004-10-20  Martin Baulig  <martin@ximian.com>
12184
12185         * mono-debug-debugger.c
12186         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
12187         (mono_debugger_handled_exception): Likewise.
12188
12189 2004-10-20  Martin Baulig  <martin@ximian.com>
12190
12191         * mono-debug-debugger.h (MonoDebuggerEvent): Added
12192         MONO_DEBUGGER_EVENT_EXCEPTION.
12193
12194         * mono-debug-debugger.c (mono_debugger_handle_exception): New
12195         public function to send the debugger a notification for an
12196         exception and inform it about a catch/finally clause.
12197
12198 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
12199
12200         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
12201         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
12202         fix 2.95 build. 
12203
12204         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
12205
12206 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12207
12208         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
12209         marshalled as [In,Out]. Fixes #58325.
12210
12211 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
12212
12213         * reflection.c (mono_method_body_get_object): Implement some fields.
12214
12215 2004-10-12  Martin Baulig  <martin@ximian.com>
12216
12217         * reflection.c (mono_reflection_bind_generic_parameters): Small
12218         fix, correctly retrieve our parent from a generic instance.
12219
12220 2004-10-12  Martin Baulig  <martin@ximian.com>
12221
12222         * metadata.c (mono_metadata_generic_param_equal): We always have
12223         an owner.
12224
12225         * class.c
12226         (mono_class_from_generic_parameter): We need to have an owner.
12227         (my_mono_class_from_generic_parameter): Likewise.
12228
12229         * reflection.c (mono_reflection_setup_generic_class): Renamed to
12230         mono_reflection_create_generic_class() and added a new
12231         mono_reflection_setup_generic_class().  
12232         (mono_reflection_initialize_generic_param): If we're a nested
12233         generic type and inherited from the containing class, set our
12234         owner to the outer class.
12235
12236 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
12237
12238         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
12239
12240         * reflection.c (mono_method_body_get_object): New function to create
12241         a MethodBody object.
12242
12243         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
12244
12245 2004-10-11  Martin Baulig  <martin@ximian.com>
12246
12247         * metadata.c (_mono_metadata_type_equal): Renamed to
12248         do_mono_metadata_type_equal() and made static.
12249
12250 2004-10-11  Martin Baulig  <martin@ximian.com>
12251
12252         * appdomain.c: Bump corlib version number to 28.
12253
12254 2004-10-10  Martin Baulig  <martin@ximian.com>
12255
12256         * class-internals.h
12257         (MonoGenericInst): Added `MonoGenericContainer *container'.
12258         (MonoGenericMethod): Likewise.
12259         (MonoGenericContext): Likewise.
12260         (MonoGenericParam): Added `MonoGenericContainer *owner'.
12261
12262         * metadata.c
12263         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
12264         (do_mono_metadata_parse_generic_inst): Likewise.
12265         (mono_metadata_parse_type_full): New public method.  This is the actual
12266         mono_metadata_parse_type() implementation - with an additional
12267         `MonoGenericContainer *' argument.
12268         (mono_metadata_parse_array_full): Likewise.
12269         (mono_metadata_parse_signature_full): Likewise.
12270         (mono_metadata_parse_method_signature_full): Likewise.
12271         (mono_metadata_parse_mh_full): Likewise.
12272         (mono_type_create_from_typespec): Likewise.
12273         (mono_metadata_interfaces_from_typedef_full): New public method;
12274         this is similar to the other _full() methods, but we take a
12275         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
12276         (mono_metadata_parse_generic_param): Take an additional
12277         `MonoGenericContainer *' argument and lookup the MonoGenericParam
12278         from that container.
12279         (mono_metadata_generic_param_equal): New static method to compare
12280         two type parameters.
12281         (_mono_metadata_type_equal): New static method; takes an
12282         additional `gboolean signature_only' argument - if true, we don't
12283         compare the owners of generic parameters.
12284         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
12285         with a TRUE argument - do a signature-only comparision.
12286
12287         * loader.c: Use the new _full() methods and pass the
12288         MonoGenericContainer to them.
12289
12290         * object-internals.h (MonoReflectionTypeBuilder): Added
12291         `MonoGenericContainer *generic_container' field.
12292         (MonoReflectionMethodBuilder): Likewise.
12293
12294 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12295
12296         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
12297         case initial images of dynamic assemblies.
12298
12299         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
12300
12301         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
12302
12303         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
12304         length of event->other array.
12305         (typebuilder_setup_events): Ditto.
12306
12307         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
12308         'assembly_by_name' and add an 'assemblies' list.
12309
12310         * assembly.h assembly.c: Add a new search hook for determining whenever
12311         an assembly is already loaded. Use this instead of searching in the
12312         loaded_assemblies list.
12313
12314         * domain.c appdomain.c: Implement the new search hook so loaded 
12315         assemblies are now scoped by appdomain. Fixes #67727.
12316
12317 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
12318
12319         * threads.c (mono_thread_attach): Initialize synch_lock field so
12320         mono_thread_detach works again.
12321
12322         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
12323         'lib' too. Fixes #63130.
12324
12325 2004-10-06  Jackson Harper  <jackson@ximian.com>
12326
12327         * culture-info-tables.h: regenerated.
12328
12329 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
12330
12331         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
12332         implemented by other interfaces in the result. Fixes #65764.
12333         
12334         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
12335         Handle unloadable modules without crashing.
12336
12337         * image.c (load_modules): Revert the previous patch since modules must
12338         have a fixed index inside the array.
12339         
12340         * image.c (load_modules): Don't include native modules in the modules
12341         array.
12342
12343 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12344
12345         * reflection.h: Add param_defaults field.
12346
12347         * reflection.c: Add support for parameter defaults in dynamic methods.
12348         Fixes #64595.
12349
12350         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
12351         an empty string when a type has no namespace. Fixes #64230.
12352
12353 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
12354
12355         * tabledefs.h: Added "internal" security actions to support non-CAS
12356         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
12357         Note: they do not seems to be used anymore in 2.0 (new metadata format)
12358
12359 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
12360
12361         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
12362         constructor of abstract class. Fixes #61689.
12363
12364 2004-10-04  Martin Baulig  <martin@ximian.com>
12365
12366         * class-internals.h (MonoGenericContainer): New type.
12367         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
12368         `MonoGenericContainer *generic_container'.
12369         (MonoClass): Replaced `gen_params' and `num_gen_params' with
12370         `MonoGenericContainer *generic_container'.
12371
12372         * metadata.c (mono_metadata_load_generic_params): Return a
12373         `MonoGenericContainer *' instead of a `MonoGenericParam *';
12374         removed the `num' argument.
12375
12376 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12377
12378         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
12379         for dynamic images.
12380
12381         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
12382         machine fields.
12383
12384         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
12385
12386         * reflection.c: Save pe_kind and machine values into the generated
12387         image file.
12388
12389         * appdomain.c: Bump corlib version number.
12390
12391         * object-internals.h: Reorganize layout of LocalBuilder.
12392
12393         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
12394         New helper function.
12395
12396         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
12397         created MonoType for dynamic types. Fixes #66180.
12398
12399 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
12400
12401         * threadpool.c: the ares hashtable needs a critical section around it.
12402         this prevents some nasty segfaults
12403
12404 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12405
12406         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
12407         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
12408         bug 67324).
12409         
12410 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
12411
12412         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
12413         
12414 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12415
12416         * image.c: Always canonicalize image file names, to avoid loading
12417         the same assembly twice when referenced using a relative path.
12418
12419 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
12420
12421         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
12422
12423         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
12424
12425         * marshal.c: Fix warnings.
12426
12427 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
12428
12429         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
12430         attempting to marshal the delegate_trampoline as the method_addr.
12431         This patch has a static hashtable of marshalled delegates so that 
12432         we can map delegate_trampoline addresses back to delegates.  This
12433         allows a delegate passed to managed code to be passed back into native
12434         code.  Fixes #67039
12435
12436 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12437
12438         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
12439
12440         * reflection.c (method_encode_code): Align method headers properly.
12441         Fixes #66025.
12442
12443 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12444
12445         * marshal.c: In the runtime invoke wrapper, reset the abort
12446         exception if it is cached. This avoids the automatic rethrowal of 
12447         the exception after the catch of the wrapper. Also check for pending
12448         interruptions before calling the managed method. This is done using
12449         the new method emit_thread_force_interrupt_checkpoint, since the
12450         normal checkpoint method is ignored when running the invoke wrapper.
12451         * object.c: If the abort exception is rethrown, set the abort_exc
12452         field of the thread, so it will be rethrown aftere every catch.
12453         * threadpool.c: Only run an interruption checkpoint if what has been
12454         requested is a stop of the thread (aborts will be ignored).
12455         * threads.c: By default, a thread will now never be interrumped while
12456         running the runtime invoke wrapper (this ensures that runtime_invoke
12457         will always return to the caller if an exception pointer is provided).
12458         There is a new special method mono_thread_force_interruption_checkpoint()
12459         to force an interruption checkpoint even if running a protected
12460         wrapper, which is used by the same runtime invoke wrapper to do a check
12461         at a safe point.
12462
12463 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12464
12465         * object.c, object-internals.h: Implemented mono_release_type_locks,
12466         which releases the cctor locks held by a thread.
12467         * threads.c, threads.h: In thread_cleanup, release cctor locks held
12468         by a thread. Added mono_thread_exit() method to be used to safely stop
12469         a thread.
12470
12471 2004-09-28  Raja R Harinath  <rharinath@novell.com>
12472
12473         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
12474         Move null check before dereference.  Avoid indexing beyond the end
12475         of the 'modules' array.
12476
12477 2004-09-28  Raja R Harinath  <rharinath@novell.com>
12478
12479         * metadata-internals.h (MonoImage): Add module_count field.
12480         * image.c (load_modules): Set image->module_count.
12481         (mono_image_load_file_for_image): Use image->module_count.
12482         * reflection.c (mono_image_load_module): Append to image->modules array 
12483         of dynamic assembly.
12484         (mono_module_get_object): Fix loop to actually increment index.
12485         Use image->module_count.
12486         * assembly.c (mono_assembly_load_references): Use image->module_count.
12487         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12488         Likewise.
12489
12490 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12491
12492         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
12493         Avoid assert on generic types.
12494
12495 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
12496
12497         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
12498
12499         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
12500
12501         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
12502         function to convert a MarshalSpec structure to its managed counterpart.
12503
12504         * reflection.c: Fix warnings.
12505         
12506         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
12507         field.
12508
12509         * icall.c (mono_create_icall_signature): Fix build.
12510
12511 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12512
12513         * icall.c: Add MakePointType icall.
12514
12515         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
12516         warnings.
12517
12518 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12519
12520         * threadpool.c: reuse allocated slots in the queue.
12521
12522 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12523
12524         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
12525
12526         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
12527
12528         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
12529         previous change.
12530
12531         * tabledefs.h: Add constants for pinvoke attributes BestFit and
12532         ThrowOnUnmappableChar.
12533
12534         * icall.c (ves_icall_Type_GetPacking): New icall.
12535
12536 2004-09-24  Martin Baulig  <martin@ximian.com>
12537
12538         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
12539
12540 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12541
12542         * appdomain.c:
12543         (mono_domain_set): allow setting a domain that is being unloaded.
12544         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
12545         being unloaded.
12546
12547 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12548
12549         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
12550         the GetCustomAttributes icall.
12551
12552 2004-09-23  Martin Baulig  <martin@ximian.com>
12553
12554         * object-internals.h (MonoReflectionGenericParam): Replaced
12555         'has_ctor_constraint', `has_reference_type' and `has_value_type'
12556         with `guint32 attrs'.
12557
12558 2004-09-23  Martin Baulig  <martin@ximian.com>
12559
12560         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
12561
12562 2004-09-23  Martin Baulig  <martin@ximian.com>
12563
12564         * object-internals.h (GenericParameterAttributes): New enum.
12565
12566 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12567
12568         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
12569         
12570         * class.c (init_events): Fill out event->other field.
12571
12572         * class.c: Fix warnings.
12573
12574         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
12575
12576 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12577
12578         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
12579         walk which doesn't supply the IL offset.
12580
12581 2004-09-22  Martin Baulig  <martin@ximian.com>
12582
12583         * reflection.c (mono_reflection_setup_internal_class): If we're
12584         System.ValueType, System.Object or System.Enum, set
12585         `klass->instance_size' and create the vtable.
12586         (mono_reflection_create_internal_class): If we're an enum type,
12587         get the base class from our current corlib.
12588
12589 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
12590
12591         * reflection.h (MonoResolveTokenError): New type.
12592
12593         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
12594         icall.
12595
12596         * icall.c: Add an 'error' argument to the ResolveToken icalls.
12597
12598 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
12599
12600         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
12601         Support also calling constructors, but only for already allocated objects.
12602
12603 2004-09-17  Geoff Norton <gnorton@customerdna.com>
12604
12605         * reflection.c (type_get_qualified_name): If the klass is null
12606         return the typename to avoid a NullRefEx.
12607         (encode_cattr_value): Get the qualified name of the boxed type,
12608         not the underlying enumtype.  Fixes #62984.
12609
12610 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
12611
12612         * marshal.c: Fix problems with previous checkin.
12613
12614 2004-09-21    <vargaz@freemail.hu>
12615
12616         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
12617         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
12618
12619         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
12620
12621 2004-09-21  Geoff Norton <gnorton@customerdna.com>
12622
12623         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
12624         should only return a type for pointers, arrays, and passbyref types.
12625         Fixes bug #63841.
12626
12627 2004-09-21  Martin Baulig  <martin@ximian.com>
12628
12629         * domain.c (mono_debugger_check_runtime_version): New public
12630         function.
12631
12632         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
12633
12634 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
12635
12636         * reflection.c: Added missing sort to the declarative security 
12637         attributes table. MS implementation stops seeing the attributes if the
12638         token number regress in the table (as shown by ildasm and permview).
12639
12640 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
12641
12642         * object-internals.h (MonoReflectionModule): Add 'token' field.
12643         
12644         * reflection.c (mono_reflection_get_token): Add support for Module
12645         and Assembly.
12646         (mono_module_get_object): Set 'token' field.
12647         (mono_module_file_get_object): Set 'token' field.
12648
12649         * icall.c: Add new Assembly and Module icalls.
12650
12651         * appdomain.c: Bump corlib version.
12652
12653 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
12654
12655         * loader.h loader.c class.h class.c: Add helper functions for obtaining
12656         tokens of metadata objects.
12657
12658         * reflection.h reflection.c (mono_reflection_get_token): New function
12659         to obtain the token of a metadata object.
12660
12661         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
12662
12663 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12664
12665         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
12666         
12667         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
12668
12669 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
12670
12671         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
12672         * object-internals.h: Added 3 MonoArray* members to MonoReflection
12673         AssemblyBuilder to access the permissions set in the class lib.
12674         * reflection.c: Added security attributes encoding step in 
12675         mono_image_build_metadata.
12676         * tabledefs.h: Added new security actions defined in 2.0:
12677         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
12678
12679 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
12680
12681         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
12682         macro parameter.
12683
12684 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
12685  
12686         * locales.c: nullify the ICU_collator member of CompareInfo when it is
12687           finalized. There where random SIGSEVs at program termination, when
12688           an object being finalized was trying to do a string comparison and
12689           the current culture was already finalized.
12690  
12691 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12692
12693         * threads.c: call thread_cleanup before finishing the thread if we get
12694         there.
12695
12696 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
12697
12698         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
12699         assemblies from the parent. Fixes #65665.
12700
12701 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
12702
12703         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
12704         modifiers.
12705
12706 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
12707
12708         * reflection.h: add prototype for mono_get_dbnull_object
12709         * reflection.c: add prototypes for get_default_param_value_blobs 
12710         and mono_get_object_from_blob for fussier compilers
12711
12712 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
12713  
12714         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
12715         false deadlock checks in class initialization.
12716  
12717 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12718
12719         * image.c (mono_image_addref): Fix comment.
12720
12721         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
12722         possible.
12723
12724 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
12725
12726         * reflection.c (mono_param_get_objects): Modified to return
12727         ParameterInfo.DefaultValue object.
12728
12729         (get_default_param_value_blobs):
12730         (mono_get_object_from_blob):
12731         (mono_get_dbnull_object): New helper routines. 
12732
12733         * object.c (mono_get_constant_value_from_blob): New helper routine
12734         carved out from get_default_field_value ()
12735
12736         * object-internals.h (mono_get_constant_value_from_blob): Added
12737         function declaration.
12738
12739 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12740
12741         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
12742         referenced assemblies. Fixes #62135.
12743
12744         * exception.h exception.c (mono_get_exception_file_not_found2): New
12745         helper function.
12746
12747 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12748
12749         * class.h class.c: Add mono_type_get_underlying_type ().
12750
12751 2004-09-09  Geoff Norton <gnorton@customerndna.com>
12752
12753         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
12754         Fix GetTypes() to support dynamically created assemblies.
12755
12756 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
12757
12758         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
12759         
12760         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
12761         previous patch.
12762
12763         * reflection.h reflection.c loader.c: Allow dynamic construction of
12764         pinvoke methods. Fixes #65571.
12765         
12766         * reflection.c (mono_reflection_get_type): Revert previous change since
12767         it causes regressions.
12768
12769 2004-09-08  Martin Baulig  <martin@ximian.com>
12770
12771         * class.c (class_compute_field_layout): Don't call
12772         mono_class_layout_fields() for open generic instances.
12773
12774 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
12775         * threads.c appdomain.c: fix typo in GC macro
12776
12777 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12778
12779         * threads.c: don't call mono_thread_detach() in start_wrapper(),
12780         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
12781
12782 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
12783
12784         * image.c (mono_image_close): Applied patch from 
12785         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
12786         assembly is loaded multiple times from data.
12787         
12788         * image.c (mono_image_open): Fix warning.
12789
12790 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12791
12792         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
12793         once. Fixes #58334.
12794         
12795         * reflection.c (mono_reflection_create_runtime_class): Initialize
12796         klass->nested_classes. Fixes #61224.
12797
12798 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12799
12800         * threads.c: sched_yield() on exit, to allow threads to quit.
12801
12802 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12803
12804         * object.c (mono_unhandled_exception): Remove leftover debug code.
12805
12806 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
12807
12808         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
12809
12810 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12811
12812         * marshal.c (emit_marshal_array): Really null terminate string arrays.
12813         
12814         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
12815
12816 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12817
12818         * marshal.c (emit_marshal_array): Null terminate string arrays.
12819         
12820         * marshal.c (raise_auto_layout_exception): Fix warning.
12821
12822         * reflection.c (mono_param_get_objects): Initialize the default value
12823         with DBNull.Value, not null. Fixes #62123.
12824
12825 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
12826
12827         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
12828         throw an exception with a cute explanation.
12829
12830 2004-09-06  Dick Porter  <dick@ximian.com>
12831
12832         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
12833         Close the new process's thread handle, as we don't use it.  The
12834         handle stays around forever otherwise.
12835
12836 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12837
12838         * object.c (arith_overflow): Fix warning.
12839
12840         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
12841         calling conventions in method refs. Fixes #65352.
12842
12843         * reflection.c: Fix warnings.
12844
12845 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
12846
12847         * icall.c: Add a new icall for Array.Clear
12848
12849 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
12850
12851         * object.c: When allocating an array, we have to throw
12852         an overflow exception if any of the lengths are < 0.
12853
12854 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12855
12856         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
12857         properly. Also move implementation of string array marshalling to 
12858         managed code. Fixes #42316.
12859
12860 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12861
12862         * assembly.c: provide more information when loading an assembly fails.
12863
12864 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12865
12866         * filewatcher.c: don't expect the development fam package to be
12867         installed.
12868
12869 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
12870
12871         * marshal.c: Make a copy of the signature cookie since it will be
12872         freed by the caller.
12873         
12874         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
12875
12876         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
12877
12878         * metadata.c (mono_metadata_free_marshal_spec): New function to free
12879         marshal specs.
12880
12881         * marshal.c: More refactoring.
12882         
12883         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
12884         smaller functions.
12885
12886 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
12887
12888         * object.c: In mono_message_invoke, fill the output parameter array after
12889           calling the managed method (it was done before the call). This fixes
12890           bug #59299.
12891
12892 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12893
12894         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
12895         as well.
12896
12897 2004-09-02  Martin Baulig  <martin@ximian.com>
12898
12899         * class.c (mono_class_instance_size): Don't allow generic type
12900         definitions or open generic instances.
12901         (mono_class_array_element_size): If we're a value type, call
12902         mono_class_instance_size() on the original class.
12903
12904         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
12905         handle generic instances.
12906
12907         * mono-debug-debugger.c (write_type): Handle generic instances
12908         like classes.
12909
12910 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12911
12912         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
12913         the allocation request fails. Fixes #65089.
12914
12915         * object.c (mono_runtime_free_method): Do not call mono_free_method.
12916         
12917         * object.c (mono_runtime_free_method): New function to free a dynamic
12918         method.
12919
12920         * marshal.c (mono_delegate_free_ftnptr): New function to free the
12921         delegate trampoline.
12922
12923         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
12924         with hasthis as dynamic,
12925
12926         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
12927
12928         * domain.c (mono_jit_info_table_remove): New function to remove an
12929         entry from the jit info table.
12930
12931         * class-internals.h (MonoMethod): Add 'dynamic' field.
12932
12933         * loader.c: Fix warnings.
12934
12935 2004-09-01  Martin Baulig  <martin@ximian.com>
12936
12937         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
12938         instead of mono_debugger_lock() because the latter one is a no-op
12939         unless running in the debugger.
12940
12941 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
12942
12943         * class.c (class_compute_field_layout): Classes with auto-layout or
12944         reference fields are not blittable.
12945         
12946 2004-09-01  Dick Porter  <dick@ximian.com>
12947
12948         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
12949         mono_image_get_filename() to get the assembly location.
12950
12951         * icall.c:
12952         * metadata.h: Fix compile warnings
12953
12954 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
12955
12956         * class.c (class_compute_field_layout): System.Object is blittable.
12957
12958         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
12959         as in/out. Fixes #59909.
12960
12961 2004-09-01  Martin Baulig  <martin@ximian.com>
12962
12963         * metadata.h (MONO_TYPE_ISREFERENCE): Call
12964         mono_metadata_generic_inst_is_valuetype() if we're a generic
12965         instance to check whether our underlying type is a reference type.
12966
12967 2004-09-01  Martin Baulig  <martin@ximian.com>
12968
12969         * metadata.c (mono_type_size): If we're a generic instance, call
12970         mono_class_value_size() for value types.
12971
12972 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
12973
12974         * marshal.c: Implement more custom marshalling functionality. Fixes
12975         #64915.
12976
12977 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12978
12979         * mono-debug.c, debug-mono-symfile.c: add some locking love.
12980
12981 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12982
12983         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
12984
12985         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
12986
12987         * icall.c: Fix some warnings.
12988
12989         * threads.c (abort_appdomain_thread): Fix unref errors.
12990         (mono_thread_current): Fix THREAD_DEBUG define.
12991
12992 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12993
12994         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
12995
12996         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
12997
12998 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
12999
13000         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
13001         string arrays.
13002
13003 2004-08-28  Martin Baulig  <martin@ximian.com>
13004
13005         * metadata.c
13006         (mono_metadata_generic_inst_is_valuetype): New public function.
13007
13008         * metadata.h (MONO_TYPE_ISSTRUCT): Call
13009         mono_metadata_generic_inst_is_valuetype() if we're a generic
13010         instance to check whether our underlying type is a valuetype.
13011
13012 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
13013
13014         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
13015         #63768.
13016
13017 2004-08-25  Martin Baulig  <martin@ximian.com>
13018
13019         * loader.c (mono_get_method_from_token): Abstract methods can also
13020         be generic and thus have type parameters.
13021
13022         * metadata-internals.h
13023         (MonoDynamicImage): Added `GPtrArray *gen_params'.
13024
13025         * reflection.c (mono_image_get_generic_param_info): Don't create a
13026         metadata row, just add an entry to the `gen_params' array.
13027         (build_compressed_metadata): Sort the `gen_params' array and then
13028         actually create the metadata.
13029
13030 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13031
13032         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
13033
13034 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13035
13036         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
13037
13038 2004-08-24  Martin Baulig  <martin@ximian.com>
13039
13040         * class.cs (mono_class_is_subclass_of): Like an interface, a
13041         generic instance also derives from System.Object.
13042
13043 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13044
13045         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
13046         custom modifiers to be in any order. Fixes #61990.
13047
13048 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13049
13050         * object.c: Register mono_object_new_fast icall.
13051         
13052         * object.c (mono_class_get_allocation_ftn): Return to calling
13053         mono_object_new_fast, since it seems faster to compute the object 
13054         size in unmanaged code than passing it as a parameter.
13055
13056         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
13057
13058         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
13059         this function with Boehm as the oom handler, so we don't have to check
13060         the result of GC_malloc.
13061
13062         * object.c: Remove checks for oom.
13063
13064         * object.h object.c (mono_class_get_allocation_ftn): New function to
13065         return the icall which can be used to allocate an instance of a given
13066         class. 
13067
13068         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
13069
13070         * class-internals.h: Add 'enabled' field.
13071
13072 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
13073
13074         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
13075
13076 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
13077         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
13078         value 0x0010.
13079
13080 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13081
13082         * appdomain.c: use the Tls function for appdomain too,
13083         at Zoltan's request. Actually return in mono_context_get
13084
13085         * appdomain.c, profiler.c, threads.c: use __thread
13086
13087 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13088
13089         * appdomain.c threads.c: Call GC_CreateThread on windows.
13090
13091         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
13092         multiple libraries since this don't work on windows.
13093
13094 2004-08-18  Martin Baulig  <martin@ximian.com>
13095
13096         * class-internals.h
13097         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
13098         MonoMethodHeader.
13099
13100         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
13101         MonoMethodNormal since we also need it for abstract and interface
13102         methods.
13103
13104         * reflection.c
13105         (build_compressed_metadata): Sort the GenericParam table.
13106         (mono_image_create_token): Added `gboolean create_methodspec'
13107         argument; this is false when generating a MethodImpl token.
13108         (reflection_methodbuilder_to_mono_method): Abstract and interface
13109         methods may also have generic parameters.
13110
13111 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13112
13113         * appdomain.c: thread local alloc
13114
13115 2004-08-17  Martin Baulig  <martin@ximian.com>
13116
13117         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
13118
13119         * icall.c
13120         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
13121         argument.
13122
13123         * class.c (mono_type_get_full_name): New public function.
13124         (mono_type_get_name): Don't include the type arguments.
13125
13126 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13127
13128         * Makefile.am: Build static versions of libmetadata and libmonoruntime
13129         for inclusion into the mono executable.
13130
13131 2004-08-16  Martin Baulig  <martin@ximian.com>
13132
13133         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
13134         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
13135
13136 2004-08-14  Martin Baulig  <martin@ximian.com>
13137
13138         * class.c (dup_type): Also copy the `byref' field.
13139
13140 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13141
13142         * reflection.c (create_dynamic_mono_image): Revert the last change 
13143         since it breaks bootstrap.
13144
13145 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13146
13147         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
13148
13149         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
13150         not free them with g_free.
13151
13152 2004-08-11  Martin Baulig  <martin@ximian.com>
13153
13154         * reflection.c (mono_reflection_setup_internal_class): Also call
13155         mono_class_setup_mono_type() if we already have a `tb->type.type'.
13156
13157 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
13158
13159         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
13160         called during default (first) AppDomain creation. Keep track of
13161         Evidence when loading assemblies.
13162
13163 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13164
13165         * opcodes.c, opcodes.h: reduce runtime relocations.
13166
13167 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13168
13169         * culture-info.h, locales.c: fixes and chages to sue the new
13170         optimized format of the locale data.
13171         * culture-info-tables.h: regenerated.
13172
13173 2004-08-06  Geoff Norton <gnorton@customerdna.com>
13174         
13175         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
13176
13177 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
13178
13179         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
13180         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
13181         * domain-internals.h: icall declaration.
13182         * icall.c: icall registration.
13183         * object-internals.h: New fields in MonoAssembly for CAS.
13184
13185 2004-08-05  Duncan Mak  <duncan@ximian.com>
13186
13187         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13188         CEE_LDELEM_ANY.
13189
13190 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13191
13192         * reflection.c: fix to deal with object[] arrays in custom ctors
13193         (bug #62550).
13194
13195 2004-08-05  Martin Baulig  <martin@ximian.com>
13196
13197         * class.c (mono_class_array_element_size): Added support for
13198         generic instances and correctly handle "recursive" types.
13199
13200 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13201
13202         * assembly.c: Fix warnings.
13203
13204 2004-08-04  Martin Baulig  <martin@ximian.com>
13205
13206         * class.c
13207         (mono_type_get_name_recurse): Added `gboolean include_arity'
13208         argument specifying whether or not we should include the generic
13209         arity in the type name.
13210         (_mono_type_get_name): New static function.
13211         (mono_class_setup_vtable): If we're a generic instance, don't
13212         include the generic arity in the names of explicit method
13213         implementations.        
13214
13215 2004-08-03  Martin Baulig  <martin@ximian.com>
13216
13217         * class.c (mono_type_get_name_recurse): Enclose the generic type
13218         arguments in `<', '>'.
13219
13220 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13221
13222         * gc.c: make GC warning messages use the trace API, they are just
13223         noise to most of the users.
13224
13225 2004-08-03  Martin Baulig  <martin@ximian.com>
13226
13227         * debug-mono-symfile.c (read_string): Correctly read the string.
13228
13229 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13230
13231         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
13232         
13233         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
13234         icalls.
13235         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
13236
13237 2004-07-30  Martin Baulig  <martin@ximian.com>
13238
13239         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
13240         Reflect latest symbol writer changes.   
13241
13242 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13243
13244         * object.c: always create an object if null is passed
13245         to Invoke() where a valuetype is expected.
13246
13247 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13248
13249         * marshal.c (mono_marshal_init): make managed
13250         signatures match native ones better for 64bits.
13251
13252 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13253
13254         * appdomain.c: hack to build correctly the private bin path on windows.
13255         Fixes bug #61991.
13256
13257 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13258
13259         * assembly.c: Load mscorlib from the correct framework directory
13260           (mono/<version>/mscorlib.dll).
13261         * appdomain.h: Added prototypes for new functions.
13262         * internals.h: Added some prototypes.
13263         * domain.c: When initializing the runtime, get from the executable and
13264           the configuration files the runtime version that the app supports.
13265           Added support methods for reading app.exe.config. Added list of versions
13266           supported by the JIT. Added two new methods: mono_init_from_assembly,
13267           which initializes the runtime and determines the required version from
13268           the provided exe file, and mono_init_version, which initializes
13269           the runtime using the provided version.
13270         * icall.c: Get machine.config from version-specific directory.
13271         * reflection.c: When generating an image, embed the version number
13272           of the current runtime.
13273
13274 2004-07-28  Dick Porter  <dick@ximian.com>
13275
13276         * socket-io.c
13277         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
13278         returned sockaddr size before creating the remote address object.
13279         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
13280         61608.
13281
13282 2004-07-28  Dick Porter  <dick@ximian.com>
13283
13284         * locales.c (string_invariant_compare_char): Fix invariant char
13285         compares between upper and lower cases.  Fixes bug 61458.
13286
13287 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
13288         
13289         * marshal.c: actually cache stelem.ref wrappers.
13290         
13291 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13292
13293         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
13294         sections and remove the mono_cli_rva_map () function.
13295
13296 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13297
13298         * debug-mono-symfile.c: fix one more endianess issue, from a patch
13299         by Geoff Norton (<gnorton@customerdna.com>).
13300
13301 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13302
13303         * class.c: fix class loads for pointer types (typeof(int) !=
13304         typeof(int*)).
13305
13306 2004-07-27  Martin Baulig  <martin@ximian.com>
13307
13308         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
13309         reading the debugging information from an external ".mdb" file.
13310
13311 2004-07-24  Martin Baulig  <martin@ximian.com>
13312
13313         * reflection.c (mono_image_get_type_info): Only write a class
13314         layout entry if we actually have a size or a packing size.
13315
13316 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
13317
13318         * reflection.c (type_get_fully_qualified_name): 
13319         insert cast to get type checking of ?: with non-gcc compilers
13320
13321 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
13322
13323         * rand.c: use g_getenv for both lookups of
13324         MONO_EGD_SOCKET
13325
13326 2004-07-17  Martin Baulig  <martin@ximian.com>
13327
13328         * reflection.c (mono_reflection_bind_generic_method_parameters):
13329         Set `gmethod->reflection_info'.
13330
13331 2004-07-17  Martin Baulig  <martin@ximian.com>
13332
13333         * class.c (mono_class_create_from_typedef): Insert the newly
13334         created class into the hash table before computing the interfaces
13335         since we could be called recursively.
13336
13337 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
13338
13339         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
13340         function to implement stelem.ref in managed code
13341         * class-internals.h, debug-helpers.c: a new wrapper type
13342         for the above.
13343
13344 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13345
13346         * gc.c: allow GC handles to work even when no GC is compiled in.
13347         Fix part of bug #61134 (GetAddrOfPinnedObject).
13348
13349 2004-07-13  Peter Williams  <peter@newton.cx>
13350  
13351         * process.c (complete_path): Make sure we don't attempt to execute
13352         directories.
13353  
13354 2004-07-12  Geoff Norton <gnorton@customerdna.com>
13355
13356         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
13357           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
13358           and will add/subtract the hour if needed
13359
13360 2004-07-12  Martin Baulig  <martin@ximian.com>
13361
13362         * reflection.c (mono_field_get_object): If we have
13363         `field->generic_info', take the attributes from
13364         `field->generic_info->generic_type'.    
13365
13366 2004-07-12  Martin Baulig  <martin@ximian.com>
13367
13368         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
13369         This function must be called before initializing the runtime.
13370         (mono_debug_init_1): New function; call this after initializing
13371         the runtime, but before loading the assembly.  It tells the
13372         debugger to load corlib and the builtin types.
13373
13374         * mono-debug-debugger.c: Did some larger changes in the debugging
13375         code; support recursive class declarations, make sure we actually
13376         add all classes.
13377
13378 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13379
13380         * debug-helpers.c: undo my previous patch and fixed the real issue in
13381         ../mini/exceptions-x86.c
13382
13383 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13384
13385         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
13386         when no HOME env. variable was set and a NullRef was thrown in a .cctor
13387         called from other .cctors.
13388
13389 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
13390
13391         * loader.c: Removed the mono_loader_wine_init hack now that we are
13392         doing a managed version of Windows.Forms.
13393
13394 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
13395
13396         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
13397         threadpool.c, threads.c: remove static data from rootset.
13398
13399 2004-07-09  Dick Porter  <dick@ximian.com>
13400
13401         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
13402         Don't do any more processing if the matched length was 0.  It was
13403         increasing the size of the string before.  Fixes bug 61167.
13404
13405 2004-07-09  Dick Porter  <dick@ximian.com>
13406
13407         * socket-io.h:
13408         * socket-io.c
13409         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13410         Add support for SO_PEERCRED if its available.
13411
13412 2004-07-09  Peter Bartok <pbartok@novell.com>
13413         * loader.c: winelib.exe.so error message is now only displayed if
13414         MONO_DEBUG is set. To help us avoid questions when people are trying
13415         out the new Managed.Windows.Forms.
13416
13417 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
13418
13419         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
13420         for isinst and castclass wrappers.
13421
13422         * class-internals.h icall.c: Move registration and lookup of JIT icalls
13423         to libmetadata from the JIT, so they could be used by the marshalling
13424         code and the interpreter.
13425
13426         * marshal.c: Register marshalling related JIT icalls here instead of
13427         in mini.c. Use CEE_MONO_ICALL instead of the family of 
13428         CEE_MONO_PROC<x> opcodes to call marshalling functions.
13429
13430         * metadata.h: Remove unneeded marshalling conversions.
13431
13432         * opcodes.c: Update for new opcodes.
13433         
13434 2004-07-08  Martin Baulig  <martin@ximian.com>
13435
13436         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
13437         (mono_debug_get_domain_data): Make this function static.
13438
13439 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13440
13441         * gc.c, object.h: add nice GC handle API for embedders.
13442
13443 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13444
13445         * reflection.c: more changes for the new api
13446
13447         * object.c: When we reflect on a field w/ a constant value, it
13448         will not have a memory location, so we must access metadata. Also,
13449         allow easier reading of strings so that we can read them from
13450         the constant data.
13451
13452         * class.c (mono_class_layout_fields): no need for literal fields here.
13453
13454         * class-internals.h: api changes for const fields
13455
13456         * icall.c (ves_icall_get_enum_info): use new apis for const fields
13457
13458 2004-07-06  Martin Baulig  <martin@ximian.com>
13459
13460         * mono-debug.h: Increment version number to 44.
13461
13462         * mono-debug.c (mono_debug_add_wrapper): The second argument is
13463         now a gpointer, rewrote this whole method.
13464
13465         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
13466         function.  Add information about the wrapper in a new "misc table".
13467
13468         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
13469         for the new misc table.
13470
13471 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13472
13473         * metadata-internals.h image.c: Add a cache for helper signatures.
13474
13475         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
13476
13477 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13478
13479         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
13480         delegates from a delegate. Fixes #61033.
13481         
13482         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
13483         marshalling of stringbuilder arrays. Fixes #59900.
13484
13485 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13486
13487         * icall.c: Add EnumBuilder:setup_enum_type icall.
13488
13489 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13490
13491         * icall.c: Added a new icall for the property version of
13492         OffsetOfStringData.
13493
13494 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13495
13496         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
13497         it has a constant size across platforms.
13498
13499         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
13500         stack trace.
13501
13502 2004-06-29  Martin Baulig  <martin@ximian.com>
13503
13504         * mono-debug.c (mono_debug_add_method): Protect the whole function
13505         in mono_debugger_lock(), not just parts of it.
13506
13507 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13508
13509         * reflection.c: make sure padding bytes in heaps are zeroed.
13510
13511 2004-06-24  David Waite  <mass@akuma.org>
13512
13513         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
13514         image.c, loader.c, locales.c, marshal.c, metadata.c,
13515         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
13516         string-icalls.c, threads.c: change to C90-style comments from C99 /
13517         C++ -style
13518
13519 2004-06-24  Dick Porter  <dick@ximian.com>
13520
13521         * threads.c
13522         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
13523         return createdNew.  Fixes bug 60412.
13524
13525         * threads-types.h: 
13526         * icall.c: Add createdNew parameter to CreateMutex icall
13527
13528 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13529
13530         * reflection.c, object-internals.h: save default value in params.
13531
13532 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13533
13534         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
13535         no need to build a new path combining that with the application base.
13536         Fixes bug #60442.
13537
13538 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13539
13540         * reflection.c: fixed minor standard compliance issues.
13541
13542 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13543
13544         * reflection.c: fixed issue with encoding some custom attributes
13545         (arrays in properties and fields, bug #60411).
13546
13547 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13548
13549         * reflection.c: fix start address when copying the public key token.
13550
13551 2004-06-23  Martin Baulig  <martin@ximian.com>
13552
13553         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
13554         the `exc' object in a static object to put it into the GC's root set.
13555
13556 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13557
13558         * reflection.c: make mono_reflection_setup_internal_class ()
13559         callable a second time to setup a new parent class.
13560
13561 2004-06-23  Dick Porter  <dick@ximian.com>
13562
13563         * threads.c: Check for WAIT_IO_COMPLETION return values.
13564
13565 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
13566
13567         * appdomain.c: Removed the g_free on the public key token. Now copy 
13568         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
13569         * assembly.c: Added public key token string value when loading 
13570         assemblies. Fix bug #60439.
13571         * icall.c: Added missing informations (like public key) in 
13572         GetReferencedAssemblies. Fix #60519.
13573         * image.h: Changed definition for public key token from const char*
13574         public_tok_value to guchar public_key_token [17];
13575         * reflection.c: Updated for changes to public key token.
13576
13577 2004-06-22  Lluis Sanchez Gual
13578
13579         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
13580         for the field in base classes.
13581
13582 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13583
13584         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
13585         mark headers as not supported, they are installed only for use by the
13586         debugger.
13587
13588 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
13589
13590         * *.c, *.h: avoid namespace pollution in public headers.
13591
13592 2004-06-21  Martin Baulig  <martin@ximian.com>
13593
13594         * exception.c (mono_get_exception_security): It's in
13595         "System.Security", not in "System".
13596
13597         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
13598         the exception classes.
13599
13600 2004-06-21  Martin Baulig  <martin@ximian.com>
13601
13602         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
13603         Protect the exception object from being finalized.
13604
13605 2004-06-21  Martin Baulig  <martin@ximian.com>
13606
13607         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
13608         public function.
13609
13610 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
13611
13612         * reflection.c: Load the assembly in mono_reflection_type_from_name,
13613         if it was not loaded before. Fix parts of #60439.
13614
13615 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
13616
13617         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
13618         code that was broken since Ben's change: wrappers are now
13619         dependent on the method signature only again.
13620
13621 2004-06-21  Martin Baulig  <martin@ximian.com>
13622
13623         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
13624         added interface support.
13625
13626 2004-06-21  Martin Baulig  <martin@ximian.com>
13627
13628         * class.c (mono_vtable_get_static_field_data): New public method.
13629
13630 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
13631
13632         * filewatcher.c : Windows build fix to be compliant with API changes.
13633
13634 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13635
13636         * class.h, class.c: more accessors.
13637         * metadata.h, metadata.c: prepare for hiding MonoType and
13638         MonoMethodSignature: people should use the accessors from now on
13639         outside of the tree.
13640
13641 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13642
13643         * *.c, *.h: more API cleanups.
13644
13645 2004-06-18  Jackson Harper  <jackson@ximian.com>
13646
13647         * assembly.c: Trace loading assemblies.
13648         * loader.c: Trace loading native libraries.
13649         * mono-config.c: Trace loading config files.
13650         
13651 2004-06-18  Dick Porter  <dick@ximian.com>
13652
13653         * locales.c: Tell ICU the lengths of strings, it can cope with
13654         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
13655
13656 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13657
13658         * image.c: swapped name/filename;
13659
13660 2004-06-18  Martin Baulig  <martin@ximian.com>
13661
13662         * mono-debug-debugger.c (write_class): Write the parent class at
13663         the end of the header.
13664
13665 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13666
13667         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
13668
13669 2004-06-17  Raja R Harinath  <rharinath@novell.com>
13670
13671         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
13672         (bundle_obj): New conditional define.
13673         (BUILT_SOURCES): Remove.
13674         ($(bundle_srcs)): Make parallel-make safe.
13675         (libmonoruntime_la_LIBADD): Make unconditional.
13676         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
13677         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
13678
13679 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
13680
13681         * culture-info-tables.h: It was inconsistent with the latest
13682           supp info files.
13683
13684 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
13685
13686         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
13687         be loaded.
13688
13689         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
13690         with gcc 2.95.
13691
13692 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13693
13694         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
13695         cleaned up public header threads.h.
13696
13697 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13698
13699         * Makefile.am, *.c, *.h: more API cleanups.
13700
13701 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13702
13703         * Makefile.am: removed monosn from compilation.
13704         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
13705         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
13706         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
13707         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
13708         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
13709         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
13710
13711 2004-06-15  Jackson Harper  <jackson@ximian.com>
13712
13713         * assembly.c: Make locales lower case when searching the GAC for
13714         assemblies. gacutil will always make locales lowercase when
13715         installing so this effectively makes them case insensitive.
13716         
13717 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
13718
13719         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
13720         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
13721           parameter which allows to choose whether the wait can be interrupted or 
13722           not. Also added the method mono_monitor_enter(), which locks the monitor
13723           using an infinite wait and without allowing interruption.
13724           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
13725           interrupted.
13726         * object.h: Added new fields in MonoThread. suspend_event holds the event
13727           used to susped/resume the thread. synch_lock is the lock object to use for
13728           modifying the thread state.
13729         * threads.c: Use the new synch_lock object for locking, instead of "this",
13730           which can generate deadlocks.
13731           Moved thread state change in Thread.Sleep and Thread.Join from managed
13732           to unmanaged code. This avoids a deadlock when the thread was suspended
13733           just after acquiring the thread lock.
13734           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
13735           Implemented Thread.Suspend using an event instead of ThreadSuspend,
13736           which is not fully implemented in the io-layer.
13737         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
13738
13739 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
13740
13741         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
13742         threads-types.h: more API cleanups.
13743
13744 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13745
13746         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
13747         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
13748         threadpool.c, threads.c: first pass at the exported API cleanup.
13749
13750 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13751
13752         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
13753
13754 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13755
13756         * icall.c: added internalGetHome.
13757
13758 2004-06-14  Dick Porter  <dick@ximian.com>
13759
13760         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
13761         possible to return successfully when '.' or '..' were the only
13762         entries in a directory, but were skipped.  The MonoIOStat was not
13763         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
13764         Fixes bug 59574.
13765
13766 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13767
13768         * reflection.c: make binaries run on .Net 1.1 by default.
13769
13770 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13771
13772         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
13773
13774 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
13775
13776         * marshal.c: keep track of struct size with explicit layout
13777         (bug #59979).
13778
13779 2004-06-12  Martin Baulig  <martin@ximian.com>
13780
13781         * mono-debug-debugger.c: Comment out a debugging g_message().
13782
13783 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13784
13785         * reflection.c, reflection.h: do not free custom attrs that are cached.
13786         * icall.c: use braces to make code clearer.
13787
13788 2004-06-11  Martin Baulig  <martin@ximian.com>
13789
13790         * class.h (MonoInflatedField): New type.
13791         (MonoClassField): Replaced `MonoType *generic_type' with
13792         `MonoInflatedField *generic_info'.
13793
13794         * icall.c
13795         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
13796
13797 2004-06-11  Martin Baulig  <martin@ximian.com>
13798
13799         * reflection.c (mono_image_create_method_token): Correctly encode
13800         varargs methods.
13801
13802 2004-06-11  Martin Baulig  <martin@ximian.com>
13803
13804         * metadata.c (mono_metadata_parse_method_signature): When parsing
13805         a MethodDef which has VarArgs, also set sentinelpos if we don't
13806         have any parameters.
13807
13808 2004-06-11  Martin Baulig  <martin@ximian.com>
13809
13810         * verify.c (mono_method_verify): In CEE_CALL, use
13811         mono_method_get_signature() to get the method's signature, unless
13812         we're a PInvoke method.
13813
13814 2004-06-10  Jackson Harper  <jackson@ximian.com>
13815
13816         * assembly.c: Use <path>/lib/mono/gac for the extra paths
13817         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
13818         logical name as the supplied path is just a prefix to the gac not
13819         the direct path to it.
13820         
13821 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
13822
13823         * reflection.c: make the token for a created method match
13824         the token of the MethodBuilder it was created from
13825         (IKVM requires this behaviour now).
13826
13827 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
13828
13829         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
13830         reflection.c, socket-io.c: leak fixes.
13831
13832 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13833
13834         * icall.c: handle sentinel pos in vararg methods in position different
13835         from 0.
13836
13837 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13838
13839         * culture-info-tables.h: freshly generated.
13840
13841 2004-06-09  Martin Baulig  <martin@ximian.com>
13842
13843         * loader.c (mono_get_method_constrained): Call `mono_class_init
13844         (constrained_class)'.   
13845
13846 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
13847
13848         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
13849         any methods. Fixes #59629.
13850
13851 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
13852
13853         * culture-info-tables.h: reflecting locale-builder updates.
13854
13855 2004-06-08  Dick Porter  <dick@ximian.com>
13856
13857         * object.h:
13858         * locales.c: Fixed compile warnings, including a real bug in
13859         CompareInfo_internal_compare.
13860         
13861 2004-06-08  Dick Porter  <dick@ximian.com>
13862
13863         * locales.c
13864         (ves_icall_System_Globalization_CompareInfo_internal_index):
13865         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
13866         Double-check the resuls of usearches, because ICU currently
13867         ignores most of the collator settings here.  Fixes bug 59720.
13868         
13869 2004-06-08  Dick Porter  <dick@ximian.com>
13870
13871         * locales.c
13872         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
13873         Fix memory leak and segfault-causing typo.  No idea how this one
13874         lasted so long without being noticed.
13875
13876 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
13877
13878         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
13879         any methods. Fixes #59629.
13880
13881 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13882
13883         * assembly.c:
13884         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
13885         own the critical section before). Removed dead code (that's done
13886         in the preload hook).
13887
13888         (mono_assembly_load_with_partial_name): call the preload hook.
13889
13890 2004-06-08  Martin Baulig  <martin@ximian.com>
13891
13892         * metadata.c (mono_metadata_signature_alloc): Default
13893         `sentinelpos' to -1.
13894
13895         * reflection.c (mono_image_get_array_token): Likewise.
13896
13897 2004-06-08  Martin Baulig  <martin@ximian.com>
13898
13899         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
13900
13901         * metadata.c (mono_metadata_parse_method_signature): When parsing
13902         a MethodDef which has VarArgs, set sentinelpos.
13903
13904         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
13905         `gint16' since we're using -1 for non-varargs methods.
13906
13907         * reflection.c
13908         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
13909         (method_encode_signature): Added varargs support.
13910         (method_builder_encode_signature): Likewise.
13911         (mono_image_get_varargs_method_token): New static method.
13912         (mono_image_create_method_token): New public method; this is
13913         called via an icall instead of mono_image_create_token() when
13914         calling a varargs method.       
13915
13916 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
13917
13918         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
13919
13920 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
13921
13922         * culture-info-tables.h : Reflecting the latest locale-builder that
13923           fixed empty array representation ({} to {0}).
13924
13925 2004-06-07  Jackson Harper  <jackson@ximian.com>
13926
13927         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
13928         looking up extra gac paths. This allows MONO_GAC_PATH to act
13929         exactly like a prefix.
13930         
13931 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
13932
13933         * reflection.c (mono_reflection_type_from_name): Make a copy of the
13934         type name before modifying it. Fixes #59405.
13935
13936 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
13937
13938         * culture-info.h: added fields for "all datetime patterns".
13939         * locales.c: (  ves_icall_System_Globalization_CultureInfo
13940           _construct_datetime_format ()): fill xxx_patterns fields.
13941         * object.h: added fields for "all datetime patterns" to
13942           MonoDateTimeFormatInfo.
13943         * culture-info-tables.h: reflecting locale-builder updates.
13944
13945 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
13946
13947         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
13948         the event has no add and remove methods. Fixes #59629.
13949
13950 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
13951
13952         * object.c: Fixed possible integer overflow when allocating large
13953         strings.
13954
13955 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
13956
13957         * culture-info-tables.h: reflecting locale-builder updates.
13958
13959 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
13960
13961         * culture-info-tables.h: reflecting locale-builder updates.
13962
13963 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
13964
13965         * culture-info-tables.h: reflecting locale-builder updates.
13966
13967 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
13968
13969         * threads.c: Made Thread.Sleep abortable.
13970
13971 2004-06-02  Martin Baulig  <martin@ximian.com>
13972
13973         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
13974
13975         * debug-mono-symfile.h: Bumped symbol file version number to 37.
13976
13977 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
13978
13979         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
13980
13981 2004-05-30  Jackson Harper  <jackson@ximian.com>
13982
13983         * reflection.c: Do not hardcode assembly versions or public key
13984         tokens anymore. All of this except the corlib section was dead
13985         code anyways.
13986         
13987 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13988
13989         * object.c (mono_runtime_invoke_array): Automatically create boxed
13990         objects for byref valuetypes if needed. Fixes #59300.
13991         
13992         * object.c (mono_method_return_message_restore): Handle 
13993         MONO_TYPE_OBJECT as well.
13994
13995 2004-05-28  Jackson Harper  <jackson@ximian.com>
13996
13997         * reflection.c: The modified type encoding was causing build
13998         problems. Reverted for now.
13999         
14000 2004-05-28  Jackson Harper  <jackson@ximian.com>
14001
14002         * reflection.c/h: Take an assembly ref so that we dont create
14003         fully qualified names when encoding types in the same assembly as
14004         the custom attribute being emitted.
14005         * appdomain.c: Increment version number.
14006         
14007 2004-05-26  Duncan Mak  <duncan@ximian.com>
14008
14009         * icall.c
14010         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14011         Set the full version number (major, minor, build, revision).
14012
14013 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
14014
14015         * marshal.c (emit_struct_conv): increment src/dst after blit
14016         (mono_marshal_get_managed_wrapper,
14017         mono_marshal_get_native_wrapper): make sure we have marshalling
14018         info before marshalling params (info computation affects
14019         blittable)
14020
14021         * class.c (class_compute_field_layout): correctly deal with
14022         blittable
14023         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
14024         value types (as per what windows dows by default)
14025         (mono_class_setup_mono_type): System.ValueType is blittable
14026         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
14027         blittable
14028
14029         * marshal.c (mono_marshal_load_type_info): flag types  as
14030         non-blittable if the native layout doesn't match the managed
14031         layout
14032
14033 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14034
14035         * appdomain.c: don't add stuff in the private search path that is
14036         above the application base. If application base is not set, there's
14037         no private search path.
14038
14039 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
14040
14041         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
14042         byref struct arguments in native->managed marshalling.
14043
14044 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
14045
14046         * marshal.c (mono_marshal_get_runtime_invoke): correctly
14047         cache methods using signature (special case for methods
14048         that are value type or string class)
14049         
14050         * image.c (mono_image_close): clean up allocated GSList's
14051         in runtime_invoke_cache.
14052
14053 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14054
14055         * mono-config.c: set the correct path for mono_cfg_dir on windows when
14056         there's no MONO_CFG_DIR environment variable defined.
14057
14058 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14059
14060         * threads.c: windows version must be >= 0x0500 to include OpenThread.
14061
14062 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
14063
14064         * threadpool.c: Really wait for 500ms after the async call, even if the wait
14065           is interrumped.
14066         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
14067           before waiting for it, and call CloseHandle after the wait to unref it.
14068           This will make sure that handles are not disposed too early.
14069
14070 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14071
14072         * appdomain.c:
14073         * appdomain.h:
14074         * icall.c: removed
14075         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
14076         needed now.
14077
14078         * object.c: se the application_base only for the domain that runs
14079         Main. Fixes bug #59216,
14080
14081 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14082
14083         * appdomain.c:
14084         * object.c: only the domain in which Main is run have
14085         SetupInformation.ConfigurationFile set, so moved a few lines from
14086         appdomain.c to object.c.
14087
14088 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14089
14090         * appdomain.c: we tried to load [name].(dll|exe), but according
14091         to bug #57710, we must also try [culture]/[name].(dll|exe) and
14092         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
14093         There's a test case attached to bug #58922.
14094
14095 2004-05-27  Dick Porter  <dick@ximian.com>
14096
14097         * icall.c:
14098         * file-io.c: Implemented icalls for locking and unlocking regions
14099         in a file.
14100         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
14101         FALSE on error (fixes both compiler warning and real bug.)
14102
14103 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
14104
14105         * culture-info-tables.h: reflecting locale-builder updates.
14106
14107           (Added missing ChangeLog entry for 05/26)
14108
14109 2004-05-27  Jackson Harper  <jackson@ximian.com>
14110
14111         * locales.c: Fix some cut and paste errors.
14112         
14113 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14114
14115         * mono-config.c: set the correct path for config. directory on windows.
14116
14117 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
14118
14119         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
14120           on win32.
14121
14122 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14123
14124         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
14125         from pinvoke functions.
14126         
14127         * marshal.c (mono_ftnptr_to_delegate): Implement this.
14128
14129 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
14130
14131         * culture-info-tables.h: reflecting locale-builder updates.
14132
14133 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14134
14135         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
14136         #59086.
14137
14138 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
14139
14140         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
14141         * icall.c: Modified icalls for RNG.
14142         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
14143         Windows (CryptoAPI).
14144
14145 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14146
14147         * locales.c: Fix build.
14148
14149 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
14150
14151         * culture-info-tables.h: reflecting locale-builder updates.
14152
14153 2004-05-25  Jackson Harper  <jackson@ximian.com>
14154
14155         * locales.c: When creating the current culture use the $LANGs
14156         specific culture. So DateTimeFormat and NumberFormat entries are created.
14157         
14158 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14159
14160         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
14161         a char array as parameter.
14162
14163 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
14164
14165         * image.c: In mono_image_open(), always use an absolute path name to
14166           look for already loaded images.
14167
14168 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
14169
14170         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
14171         missing in the windows build (like older cygwin include files).
14172
14173 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
14174
14175         * icall.c: Fixed check for possible integer overflow in Buffer_
14176         BlockCopy icall. Replaced comments style // by /* */.
14177
14178 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
14179
14180         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
14181         
14182         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
14183         check after MONO_VTADDR. Fixes pinvoke2.exe.
14184
14185         * marshal.h marshal.c metadata.h: Add beginnings of support for
14186         ftnptr -> delegate marshalling.
14187
14188 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
14189
14190         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
14191         * threads.c: Fix warnings.
14192
14193 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
14194
14195         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
14196         * icall.c: Registered icalls for Suspend and Resume.
14197         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
14198           Thread.Abort.
14199         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
14200         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
14201         * process.c: Use WaitForSingleObjectEx.
14202         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
14203           checkpoints.
14204         * threads.c, threads.h: Make use of new Ex wait methods. Improved
14205           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
14206           for Suspend and Resume. Added new mono_thread_stop, used for stoping
14207           background threads. Added basic support for Abort in Windows.
14208           Start new threads using a managed delegate invoke wrapper. This wrapper
14209           has an interruption checkpoint that is needed since an interruption
14210           can be requested before the thread leaves the unmanaged code that starts 
14211           the thread.
14212         * marshal.c: Added interruption checkpoint after every native call, and
14213           also before managed calls for wrappers called from unmanaged code to
14214           go into managed code.
14215         * object.h: Added new field in MonoThread to keep track of interruption
14216           requests.
14217
14218 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
14219
14220         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
14221         calls.
14222
14223 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14224
14225         * appdomain.c:
14226         * assembly.c:
14227         * gc.c:
14228         * locales.c:
14229         * mono-config.c:
14230         * rand.c: getenv -> g_getenv (windows!)
14231
14232         * process.c: complete_path is also used on non-windows platforms.
14233
14234 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14235
14236         * icall.c: new signature for Process_Start.
14237
14238         * process.[ch]: new signature for Process_Start. If we're on windows
14239         and UseShellExecute is false, we have to search for the program by
14240         ourselves if we don't get a full path.
14241
14242 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14243
14244         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
14245         marshalling and call CleanUpNativeData if needed. Fixes #58646.
14246
14247 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14248
14249         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
14250         Fixes bug #58373.
14251
14252 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14253
14254         * process.c: use double quotes to quote program name and arguments on
14255         windows. Fixes bug #58575.
14256
14257 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14258
14259         * file-io.c: don't return "." and ".." when using windows Find*File.
14260
14261 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
14262
14263         * marshal.c: Don't pass wrappers to message init because method 
14264         addressed used to lookup metadata. part of remoting[2|3] fix.
14265
14266 2004-05-15  Jackson Harper  <jackson@ximian.com>
14267
14268         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
14269         path is essentially the same as MONO_PATH except that it points to
14270         GACs instead of lib directories.
14271         * loader.h: The user gac is gone so we dont need function to
14272         enable/disable it.
14273         * mono-config.c: user gac option is now gone.
14274         
14275 2004-05-15  Jackson Harper  <jackson@ximian.com>
14276
14277         * culture-info.h: Make defines more consistent, add calendar data
14278         to the culture info table.
14279         * culture-info-tables.h: Add basic calendar data. Basically
14280         everyone gets default gregorian until all the data is
14281         updated.
14282         * locales.c: Use the new consistent defines. Set calendar data for
14283         culture info objects.
14284         * object.h: add a field for calendar data to CultureInfo
14285         
14286 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
14287
14288         * image.c: image->runtime_invoke_cache is keyed on signatures now.
14289         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
14290         a signature.
14291         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
14292         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
14293         an extra param that is the pointer of the method to invoke. The IL for
14294         the invoke method is no longer specific to the method, but to the
14295         signature of the method. Thus, we can share the same code for multiple
14296         methods. This reduces the number of methods that have to be compiled.
14297
14298 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
14299
14300         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
14301
14302         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14303
14304         * icall.c: Optimize Buffer.BlockCopy.
14305
14306 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14307
14308         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
14309         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
14310         quote). Changed them to "MMMM yyyy".
14311
14312 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
14313
14314         * rand.c
14315         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
14316
14317 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
14318
14319         * reflection.h: Updated after changes to managed structures.
14320
14321         * appdomain.c: Bump corlib version.
14322
14323 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14324
14325         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
14326         windows.
14327
14328 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14329
14330         * Makefile.am: link to ../os/libmonoos.la on windows.
14331
14332         * assembly.c:
14333                 -If MONO_DEBUG, warn about non-existing directories in
14334                 MONO_PATH.
14335                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
14336                 compile time variable.
14337                 -Removed init_default_path and call mono_set_rootdir from
14338                 libmonoos.a instead (windows only).
14339
14340         * assembly.h: declare mono_assembly_getrootdir().
14341
14342         * domain.c:
14343         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
14344
14345         * loader.c: s/getenv/g_getenv/
14346
14347 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14348
14349         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
14350
14351         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
14352
14353         * metadata.h: Add new marshalling conversions.
14354
14355         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
14356         function.
14357
14358         * reflection.c (mono_reflection_get_type): Lookup the type in all
14359         modules of a multi-module assembly. Fixes #58291.
14360
14361 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14362
14363         * threads.c: Before aborting a background, set the StopRequested
14364         state.  This avoids throwing the Abort exception.
14365         In mono_thread_manage, don't continue with the shutdown until all
14366         aborted threads have actually stopped.
14367
14368 2004-05-10  Jackson Harper  <jackson@ximian.com>
14369
14370         * locales.c: Remove the modifier from culture names.
14371         
14372 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14373
14374         * Makefile.am: monosn is not installed any more. It has been deprecated
14375         in favor of sn.
14376
14377 2004-05-07  Jackson Harper  <jackson@ximian.com>
14378
14379         * locales.c
14380         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
14381         Fix array construction, add bailout if the length is 0.
14382
14383 2004-05-07  Dick Porter  <dick@ximian.com>
14384
14385         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
14386         machine doesn't have a DNS entry.  Patch by Urs Muff
14387         (umuff@quark.com), fixes bug 57928.
14388
14389 2004-05-06  Jackson Harper  <jackson@ximian.com>
14390
14391         * reflection.c: Handle null PublicTokens properly. alloc mem for
14392         assembly names culture so we dont crash when freeing it.
14393         
14394 2004-05-06  Jackson Harper  <jackson@ximian.com>
14395
14396         * assembly.c: Check the usergac when loading with partial names.
14397         
14398 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
14399
14400         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
14401         does nothing for now (not required for Linux/Windows) but the class
14402         library can call it (and a newer or modified runtime could need it).
14403         * icall.c: Registred icall.
14404
14405 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14406
14407         * loader.c: prints a message on module loading error we set MONO_DEBUG
14408         environment variable.
14409
14410 2004-05-05  Jackson Harper  <jackson@ximian.com>
14411
14412         * appdomain.c: Handle PublicKeyToken=null properly.
14413         
14414 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
14415
14416         * environment.c|h: Added icall ves_icall_System_Environment_
14417         GetOSVersionString to get the current OS version as a string.
14418         * icall.c: Registred icall.
14419
14420 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
14421
14422         * object.c: in mono_object_get_virtual_method(), take into account that
14423         non-virtual methods don't have a slot in the vtable. Check needed when
14424         the object is a proxy.
14425
14426 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14427
14428         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
14429         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
14430
14431         * object.c (mono_class_compute_gc_descriptor): Fix warning.
14432
14433         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
14434         passed when a valuetype is expected.
14435
14436         * object.c (mono_unhandled_exception): Only set the exit code if the
14437         exception happens in the main thread. Fixes thread5.exe.
14438
14439         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
14440         invalid names. Fixes #58047.
14441
14442 2004-05-03  Jackson Harper  <jackson@ximian.com>
14443
14444         * assembly.c: This line was committed accidently and is unneeded.
14445         
14446 2004-05-03  Jackson Harper  <jackson@ximian.com>
14447
14448         * icall.c: Add new icall for Assembly::LoadWithPartialName
14449         * assembly.c/.h: new function that probes the GAC to load partial
14450         assembly names by Paolo Molaro.
14451         
14452 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14453
14454         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
14455         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
14456         (type_get_fully_qualified_name): Added PublicKeyToken when building a
14457         full type name.
14458
14459 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14460
14461         * appdomain.c: fixed check for 'neutral' culture and removed warning.
14462         * reflection.c: fix bug when parsing a full type name and Version is not
14463         the last thing in the string.
14464
14465 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
14466
14467         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
14468         crashes when it is freed.
14469
14470 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14471
14472         * assembly.c: print the compat warning to stderr.
14473
14474 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
14475
14476         * assembly.c (mono_assembly_load_references): Add a compatibility
14477         hack to run old applications that might be still referencing the
14478         3300-based assemblies, only do this for System.xxx.
14479
14480 2004-05-01  Jackson Harper  <jackson@ximian.com>
14481
14482         * appdomain.c: If the culture is neutral we set it to "".
14483         
14484 2004-04-29  Jackson Harper  <jackson@ximian.com>
14485
14486         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
14487
14488 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
14489  
14490         * string-icalls.c: added low overhead function for copying chars
14491         * icall.c: added needed icall for the above function
14492  
14493 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14494
14495         * icall.c: fix return value of get_global_assembly_cache.  Implemented
14496         Environment.GetLogicalDrives.
14497
14498 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
14499
14500         * rand.c: try and talk to egd or prngd
14501         for random bytes if opening devices fail.
14502
14503 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14504
14505         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
14506         alignment for the type using the native alignment of its members 
14507         instead of using klass->min_align.
14508
14509         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
14510
14511 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14512
14513         * file-io.c:
14514         * socket-io.c: added check for sys/aio.h.
14515
14516 2004-04-28  Dick Porter  <dick@ximian.com>
14517
14518         * threads.c: Don't abort a thread thats already aborting, when
14519         terminating everything.
14520
14521 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14522
14523         * icall.c: added 2 new async calls for Socket.
14524
14525         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
14526         IO on *nix systems.
14527
14528         * threadpool.c: removed unused variable.
14529
14530 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
14531
14532         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
14533
14534 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
14535
14536         * locales.c: put back string_invariant_tolower () and
14537         string_invariant_toupper ().
14538
14539 2004-04-26 David Waite <mass@akuma.org>
14540
14541         * file-io.h:
14542         * socket-io.h:
14543         * threads.h:
14544         * unicode.h: remove comma from end of enumeration declarations
14545
14546 2004-04-26 David Waite <mass@akuma.org>
14547
14548         * debug-mono-symfile.h:
14549         * decimal.c:
14550         * mono_debug.h:
14551         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
14552
14553
14554 2004-04-26  Jackson Harper  <jackson@ximian.com>
14555
14556         * appdomain.c: Increment version number.
14557         
14558 2004-04-26  Jackson Harper  <jackson@ximian.com>
14559
14560         * appdomain.c: Set assembly references public token value when
14561         PublicKeyToken is specified, not the hash_value. Free public token
14562         values when free assembly name data. Previously the public key
14563         token was hex decoded, however we are using hex encoded public key
14564         tokens, so this is not neccasary.
14565         * assembly.c: Lookup assemblies in the gac if their public token
14566         value is set. Add function to allow enabling user gac
14567         lookups. Specify whether or not the assembly was loaded from the
14568         GAC. Compare full assembly names when checking the cache for
14569         assemblies (Temporarily disabled see comment in code). Remove
14570         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
14571         specifies trace-loader they get extra info to stdout on the
14572         loading of assemblies.
14573         * image.h: Add a field for an assembly references public token
14574         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
14575         whether an assembly has been loaded from the GAC.
14576         * image.c: Remove a corlib -> mscorlib name mapping.
14577         * loader.h: Add function to enable/disable the user gac.
14578         * mono-config.c: Check if the usergac is enabled in the config
14579         file.
14580         * icall.c: New icall to determine whether or not an assembly has
14581         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
14582         * tabldefs.h: Add constant for assemblyref flag that specifies a
14583         full public key is used instead of a public token.
14584         * reflection.c: Remove mscorlib -> corlib mappings. Set
14585         PublicTokenValue instead of hash value. This value is a hex
14586         string so it does not need to be expanded.
14587
14588 2004-04-26  Martin Baulig  <martin@ximian.com>
14589
14590         * mono-debug-debugger.c (mono_debugger_initialize): Set
14591         `mono_debugger_initialized' before calling mono_debug_lock().
14592
14593 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
14594
14595         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
14596           InternalToUpper/InternalToLower.
14597         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
14598           removed invariant culture shortcut.  This is now done in managed code.
14599         * locales.c: (string_invariant_toupper/tolower) removed.
14600
14601 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14602
14603         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
14604         Added Poll internal call.
14605
14606         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
14607         call for Poll. Select was too heavy for polling a single socket.
14608
14609         * threadpool.[ch]: added mono_threadpool_cleanup.
14610         * threads.c: use it. Don't use Thread_Abort on windows.
14611
14612 2004-04-23  Martin Baulig  <martin@ximian.com>
14613
14614         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
14615
14616 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
14617
14618         * icall.c: Registred new icalls for key pair protection and added an
14619         icall for Environment.GetFolderPath on Windows.
14620         * security.c|h: Added new icalls for key pair protection.
14621
14622 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14623
14624         * socket-io.c: don't display the non-supported family warning for known
14625         families. Now this is not displayed on windows when checking support
14626         for IPv4/IPv6.
14627
14628 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14629
14630         * class.c: don't display the layout warning for static fields.
14631
14632 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
14633
14634         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
14635         * locales.c, locales.h: Added new icalls for culture-specific
14636         Char.ToLower and Char.ToUpper.
14637
14638 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14639
14640         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
14641         by David Waite.
14642
14643 2004-04-20  Martin Baulig  <martin@ximian.com>
14644
14645         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
14646         of the type name before passing it to mono_reflection_type_from_name().
14647
14648 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14649
14650         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
14651         encodings here. Fixes #56965.
14652
14653 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
14654
14655         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14656         fix test on strstr result not that I can see anything that
14657         relies on the result.
14658
14659 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14660
14661         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
14662         Fixes #57081.
14663
14664         * marshal.c (mono_marshal_get_string_encoding): New helper function.
14665
14666         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
14667         function to determine which marshalling to use for strings. Fixes
14668         #56965.
14669
14670         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
14671
14672         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
14673
14674 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
14675
14676         * icall.c: #include mono-config.h
14677
14678 2004-04-15  Jackson Harper  <jackson@ximian.com>
14679
14680         * culture-info-tables.h: Fix date formats for en-US culture.
14681         
14682 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
14683
14684         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
14685         ThreadPool.SetMinThreads.
14686         * threadpool.c: Implemented ThreadPool.GetMinThreads and
14687         ThreadPool.SetMinThreads.
14688
14689 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14690
14691         * mono-config.c: also load the .config file in the directory
14692         where the assembly was found.
14693
14694 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14695
14696         * assembly.c: load per-assembly config files.
14697         * icall.c: decrapified code to get the config dir and moved to
14698         mono-config.c.
14699         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
14700         per-assembly config files. When doing a dll map lookup give precedence
14701         to the per-assembly data.
14702
14703 2004-04-14  Martin Baulig  <martin@ximian.com>
14704
14705         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
14706         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
14707         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
14708
14709         * mono-debugger-debugger.c: While the debugger is locked, remember
14710         whether the symbol tables have changes and send one single
14711         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
14712
14713 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14714
14715         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
14716
14717         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
14718         function.
14719
14720         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
14721         account when marshalling string arrays. Fixes #56965.
14722
14723 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
14724
14725         * icall.c: Add new icalls mapping for security.
14726         * security.c|h: Add internal calls for WindowsIdentity,
14727         WindowsImpersonationContext and WindowsPrincipal.
14728
14729 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
14730
14731         * class.c: Added comment to ensure the System.MonoDummy class
14732         is removed when no longer necessary
14733
14734 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14735
14736         * appdomain.c: Pass arguments to the bootstraping exceptions to
14737         minimize JITed methods at boot
14738
14739         * metadata.c (mono_exception_from_name_two_strings): Allow for the
14740         second string to be null.
14741
14742         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14743         Change the protocol to minimize the JIT methods at startup.  Now
14744         it Returns the internal codepage, if the value of "int_code_page"
14745         is 1 at entry, and we can not compute a suitable code page
14746         number, returns the code page as a string.
14747
14748 2004-04-13  Jackson Harper  <jackson@ximian.com>
14749
14750         * culture-info-tables.h: Fix number of decimal digits for all
14751         english locales.
14752
14753 2004-04-13  Jackson Harper  <jackson@ximian.com>
14754
14755         * icall.c: Clairfy out of sync error message. It is not always
14756         your corlib that is out of sync.
14757
14758 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
14759
14760         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
14761         properties when only the set accessor is overriden. Fixes #55874.
14762
14763 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
14764
14765         * assembly.c (mono_assembly_load_references): Make this thread safe.
14766         Fixes #56327.
14767
14768 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14769
14770         * monosn.c: Add missing initialization calls.
14771
14772 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
14773
14774         * locales.c:
14775         ves_icall_System_Globalization_CultureInfo_construct_number_format
14776         Fix g_assert so it compiles on fussier compilers re int/ptr
14777         mismatch
14778
14779 2004-04-08  Dick Porter  <dick@ximian.com>
14780
14781         * socket-io.h:
14782         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
14783         53992.  Also rearrange the code so that the internal calls return
14784         an error value and exceptions are thrown from managed code.
14785
14786         * icall.c: Add type info to the socket icalls.
14787
14788 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14789
14790         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
14791         owes me a beer.
14792
14793 2004-04-07  Martin Baulig  <martin@ximian.com>
14794
14795         * class.c (mono_class_from_generic_parameter): Don't default
14796         `klass->parent' to `mono_defaults.object_type'.
14797
14798 2004-04-07  Martin Baulig  <martin@ximian.com>
14799
14800         * reflection.c (mono_reflection_initialize_generic_parameter): Set
14801         `param->pklass->reflection_info'.       
14802
14803 2004-04-07  Jackson Harper  <jackson@ximian.com>
14804
14805         * culture-info-tables.h: Fix date separator symbol.
14806         
14807 2004-04-07  Martin Baulig  <martin@ximian.com>
14808
14809         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
14810         from System.Type to System.MonoType.
14811
14812 2004-04-07  Martin Baulig  <martin@ximian.com>
14813
14814         * reflection.h
14815         (MonoReflectionGenericParam): Added `has_reference_type' and
14816         `has_value_type' fields.
14817
14818         * reflection.c (mono_image_get_generic_param_info): Encode the
14819         correct flags if we have the `class' or `struct' constraint.
14820
14821 2004-04-07  Martin Baulig  <martin@ximian.com>
14822
14823         * reflection.h
14824         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
14825
14826 2004-04-07  Jackson Harper  <jackson@ximian.com>
14827
14828         * appdomain.c: Revert extra patches, just wanted to bump the
14829         version number.
14830         
14831 2004-04-07  Jackson Harper  <jackson@ximian.com>
14832
14833         * Makefile.am: Add culture-info private headers.
14834         * icall.c: Add new icalls for contructing locales.
14835         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
14836         * locales.h: Declare new culture info construction methods.
14837         * object.h: Add new fields used to avoid the CultureMap to
14838         MonoCultureInfo.
14839         * culture-info.h: Definition of structs used in the culture info
14840         tables.
14841         * culture-info-tables.h: Autogenerated tables that contain culture
14842         info data. This file was generated with the locale-builder tool.
14843         * appdomain.c: Incement corlib version number.
14844         
14845 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
14846
14847         * appdomain.c: (mono_runtime_init) move mono_thread_init
14848         to before mono_object_new calls so critical sections
14849         are initialized before use.
14850
14851 2004-04-07  Martin Baulig  <martin@ximian.com>
14852
14853         * icall.c
14854         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
14855         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
14856         (ves_icall_MonoGenericParam_initialize): Removed.
14857         (monogenericparam_icalls): Removed.
14858         (generictypeparambuilder_icalls): Added new table for
14859         System.Reflection.Emit.GenericTypeParameterBuilder.
14860
14861         * reflection.c
14862         (mono_reflection_define_generic_parameter): Removed.
14863         (mono_reflection_initialize_generic_parameter): This is now called
14864         from GenericTypeParameterBuilder's .ctor.
14865
14866 2004-04-06  Martin Baulig  <martin@ximian.com>
14867
14868         * class.c (mono_class_init): Don't inflate nested classes in a
14869         generic instance.
14870         (mono_type_get_name_recurse): Include the generic arguments for
14871         generic instances and generic type declarations.
14872         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
14873         (_mono_class_get_instantiation_name): Removed.
14874         (mono_class_create_generic): Always use `gklass->name' as our name.
14875
14876         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
14877
14878         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
14879         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
14880         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
14881         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
14882         closed generic methods here.
14883
14884         * reflection.c
14885         (mono_reflection_generic_inst_get_nested_types): Removed.
14886         (inflate_mono_method): Copy the generic parameters from the
14887         MonoMethodHeader into out MonoGenericMethod.
14888
14889 2004-04-06  Martin Baulig  <martin@ximian.com>
14890
14891         * row-indexes.h
14892         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
14893
14894         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
14895
14896         * reflection.c (build_compressed_metadata): If we have any entries
14897         in the GenericParam, MethodSpec or GenericParamConstraint tables,
14898         set the header version to 1.1.
14899
14900 2004-04-06  Martin Baulig  <martin@ximian.com>
14901
14902         * class.c (mono_class_init): If we're a generic instance,
14903         initialize our nested classes, too.
14904         (_mono_class_get_instantiation_name): Deal with the new `!%d'
14905         suffix. 
14906
14907 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14908
14909         * process.c: quote the argument passed to the shell on windows.
14910
14911 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14912
14913         * threads.c (mono_alloc_special_static_data): Allow this to be
14914         called during startup.
14915
14916 2004-04-02  Martin Baulig  <martin@ximian.com>
14917
14918         * icall.c
14919         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
14920
14921 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14922
14923         * icall.c: Fix build.
14924
14925 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
14926
14927         * Makefile.am: Added security.c|h.
14928         * icall.c: Added icall for get_UserName;
14929         * security.c: New file for security related icalls. Added function
14930         get_UserName for System.Environment (fix #56144).
14931         * security.h: New. Header file for security.c
14932
14933 2004-04-02  Dick Porter  <dick@ximian.com>
14934
14935         * icall.c: Deleted the icalls that were obsoleted some time ago
14936         by the ICU string code, and which were mixed into the icall
14937         rearranging.  Fixes bug 55969.
14938
14939         * string-icalls.h: 
14940         * string-icalls.c: Deleted the code that those icalls reference.
14941
14942 2004-04-01  Martin Baulig  <martin@ximian.com>
14943
14944         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
14945
14946         * class.c (mono_class_from_generic_parameter): Don't set 
14947         TYPE_ATTRIBUTE_INTERFACE.
14948         (my_mono_class_from_generic_parameter): Likewise.
14949
14950 2004-04-01  Martin Baulig  <martin@ximian.com>
14951
14952         * loader.c (find_method): Added an optional `MonoClass *ic'
14953         argument to search in a specific interface.
14954         (mono_get_method_constrained): New public function.
14955
14956 2004-04-01  Martin Baulig  <martin@ximian.com>
14957
14958         * reflection.c (mono_image_get_generic_field_token): Use the
14959         `handleref' cache here.
14960
14961 2004-04-01  Martin Baulig  <martin@ximian.com>
14962
14963         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
14964
14965         * reflection.c (create_generic_typespec): Use the `typespec' hash
14966         here, not the `typeref' one.    
14967
14968 2004-04-01  Martin Baulig  <martin@ximian.com>
14969
14970         * class.c (mono_class_inflate_generic_type): Moved the
14971         functionality into a new static inflate_generic_type() which
14972         returns NULL if it didn't do anything.  Only increment the
14973         `mono_stats.inflated_type_count' if we actually inflated
14974         something.
14975         (mono_class_get_full): Check the classes type to see whether we
14976         need to inflate it; also inflate MONO_TYPE_(M)VAR.
14977
14978 2004-04-01  Jackson Harper  <jackson@ximian.com>
14979
14980         * reflection.c: Set culture for assembly references.
14981         
14982 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
14983
14984         * reflection.[ch], icall.[ch], Fix support for pinning variables.
14985
14986 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14987
14988         * assembly.c:
14989         (do_mono_assembly_open): the critical section also covers
14990         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
14991
14992 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14993
14994         * threads.c:
14995         (mono_manage_threads): abort the background threads when finishing.
14996         Fixes bug #47232.
14997
14998 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14999
15000         * gc.c: only close the done_event handle if there was no timeout.
15001         C-ified comments.
15002
15003 2004-03-30  Martin Baulig  <martin@ximian.com>
15004
15005         * icall.c (icall_entries): It's called "System.Activator", not
15006         "System.Activation".    
15007
15008 2004-03-30  Martin Baulig  <martin@ximian.com>
15009
15010         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
15011         (mono_class_create_from_typespec): Likewise.
15012
15013 2004-03-30  Martin Baulig  <martin@ximian.com>
15014
15015         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
15016         `has_ctor_constraint' and `initialized'.
15017
15018 2004-03-30  Martin Baulig  <martin@ximian.com>
15019
15020         * reflection.c (encode_new_constraint): New static function to add
15021         the constructor constraint attribute to a type parameter.
15022         (encode_constraints): Call encode_new_constraint() if necessary.
15023
15024         * reflection.h
15025         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
15026
15027         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
15028         
15029 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
15030
15031         * reflection.c, icall.c: add support for pinning variables. 
15032
15033 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
15034
15035         * marshal.c (mono_marshal_get_managed_wrapper):
15036         init bool local with zero rather than null.
15037
15038 2004-03-29  Martin Baulig  <martin@ximian.com>
15039
15040         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
15041         the "official" behavior here.
15042         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
15043
15044 2004-03-29  Martin Baulig  <martin@ximian.com>
15045
15046         * icall.c: Reflect latest API changes.
15047
15048 2004-03-29  Martin Baulig  <martin@ximian.com>
15049
15050         * loader.c (mono_get_method_from_token): Also call
15051         mono_metadata_load_generic_params () for abstract and interface
15052         methods; replace the type arguments in the method signature with
15053         the ones which are loaded from the metadata.
15054
15055 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
15056
15057         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
15058         of the lock is not the current thread. MS.NET don't do it, in spite of
15059         what the documentation says. See bug #56157.
15060
15061 2004-03-28  Martin Baulig  <martin@ximian.com>
15062
15063         * class.c (mono_class_init): Don't call init_properties() and
15064         init_events() for generic instances; set `prop->parent' when
15065         inflating properties.
15066
15067         * reflection.c (mono_generic_inst_get_object): Call
15068         `mono_class_init (ginst->klass)'.
15069         (mono_type_get_object): Only create a MonoGenericInst if your
15070         generic type is a TypeBuilder.
15071         (do_mono_reflection_bind_generic_parameters): Only set
15072         `ginst->is_dynamic' if our generic type is a TypeBuilder.
15073
15074 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
15075
15076         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
15077         Fixes #56091.
15078
15079 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15080
15081         * icall.c: added Kill_internal icall.
15082         * process.[ch]: added Kill_internal icall.
15083
15084 2004-03-25  Martin Baulig  <martin@ximian.com>
15085
15086         * class.h (MonoStats): Added `generic_instance_count',
15087         `inflated_method_count', `inflated_type_count' and
15088         `generics_metadata_size'.       
15089
15090 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15091
15092         * reflection.c: no warnings now.
15093
15094 2004-03-25  Martin Baulig  <martin@ximian.com>
15095
15096         * class.c (mono_class_get_full): New public function; does a
15097         mono_class_get(), but also takes a `MonoGenericContext *'.
15098
15099         * loader.c (mono_field_from_memberref): Renamed to
15100         `field_from_memberref', made static and added `MonoGenericContext *'
15101         argument.
15102         (mono_field_from_token): Added `MonoGenericInst *' argument.
15103         (method_from_memberef): Likewise.
15104         (mono_get_method_from_token): Likewise.
15105         (mono_get_method_full): New public function; does a
15106         mono_get_method(), but also takes a `MonoGenericContext *'.
15107
15108         * verify.c (mono_method_verify): Get the method's generic context
15109         and pass it to mono_field_from_token(), mono_get_method_full() and
15110         mono_class_get_full().
15111
15112 2004-03-25  Martin Baulig  <martin@ximian.com>
15113
15114         * class.c (mono_class_inflate_generic_type): Take a
15115         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
15116         `MonoGenericMethod *'.
15117
15118 2004-03-25  Martin Baulig  <martin@ximian.com>
15119
15120         * loader.h (MonoMethodInflated): Store the MonoGenericContext
15121         instead of the MonoGenericMethod here.
15122
15123 2004-03-25  Martin Baulig  <martin@ximian.com>
15124
15125         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
15126         each time we create a new MonoGenericInst, we also create a new
15127         context which points back to us.
15128
15129         * class.c (inflate_method): Use `ginst->context' instead of
15130         creating a new context.
15131
15132         * loader.c (method_from_memberref): Use
15133         `klass->generic_inst->context' instead of creating a new context.
15134
15135 2004-03-25  Martin Baulig  <martin@ximian.com>
15136
15137         * class.h (MonoGenericContext): New struct.
15138         (MonoGenericMethod): Removed `generic_inst'.
15139
15140         * class.c (mono_class_inflate_generic_method): Take a
15141         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
15142
15143 2004-03-25  Martin Baulig  <martin@ximian.com>
15144
15145         * loader.h (MonoMethodInflated): New typedef.
15146
15147         * metadata.h (MonoMethodSignature): Removed `gen_method', make
15148         `generic_param_count' consume just 30 bits, added `is_inflated'
15149         and `has_type_parameters' flags (one bit each).
15150
15151         * class.c (mono_class_inflate_generic_method): Create a
15152         MonoMethodInflated instead of a MonoMethodNormal and set
15153         `is_inflated' in the method signature.
15154
15155         * class.h (MonoGenericMethod): Removed `generic_method'.
15156
15157 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
15158
15159         * image.c: Make sure the name of a MonoImage is always an absolute path.
15160           This fixes bug #54415.
15161
15162 2004-03-24  Martin Baulig  <martin@ximian.com>
15163
15164         * class.c (mono_class_setup_vtable): If we're a generic instance,
15165         use our generic type's vtable size.
15166
15167 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
15168
15169         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
15170         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
15171         problems.
15172
15173 2004-03-23  Martin Baulig  <martin@ximian.com>
15174
15175         * class.h (MonoDynamicGenericInst): Added `int count_events' and
15176         `MonoEvent *events'.
15177
15178         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
15179         (typebuilder_icalls): Added "get_event_info"; calls
15180         mono_reflection_event_builder_get_event_info(). 
15181
15182         * reflection.c (mono_reflection_generic_inst_initialize): Added
15183         `MonoArray *events'.
15184         (mono_reflection_event_builder_get_event_info): New function.
15185
15186 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
15187
15188         * object.h: add mono_type_initialization_init
15189
15190         * object.c (mono_runtime_class_init): 
15191         implement class constructor synchronization rules
15192         to cope with threading issues.  
15193         add mono_type_initialization_init
15194
15195         * appdomain.c (mono_runtime_init): call 
15196         mono_type_initialization_init
15197
15198         * class.h: removing initializing field from MonoVTable
15199
15200 2004-03-23  Martin Baulig  <martin@ximian.com>
15201
15202         * class.c (my_mono_class_from_generic_parameter): Use
15203         `param->name' if it's not NULL. 
15204
15205 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
15206
15207         * class.c: do not insert non-virtual methods in the vtable.
15208         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
15209         that means the method is non-virtual. This never would have
15210         happened before.
15211
15212 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
15213
15214         * profiler.c: Added lock for accessing coverage_hash.
15215
15216 2004-03-22  Martin Baulig  <martin@ximian.com>
15217
15218         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
15219         `method->method->signature->generic_param_count != 0' to make it
15220         work for interface methods.
15221
15222 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15223
15224         * process.c: quote the string passed to the shell using g_shell_quote.
15225
15226 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15227
15228         * threads.c:
15229         (mono_threads_manage): don't remove the finalizer thread and self
15230         from the threads hash table so that mono_thread_manage can be called
15231         more than once.
15232
15233 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15234
15235         * process.c: quote the arguments when UseShellExecute is true. Fixes
15236         bug #55790.
15237
15238 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15239
15240         * threads.c: set mono_thread_detach as a cleanup routine for every
15241         thread. This way it's always executed upon thread termination, either
15242         aborted or finished normally. No more xsp hangs!
15243
15244 2004-03-17  Martin Baulig  <martin@ximian.com>
15245
15246         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
15247         `int count_nested' and a `MonoType **nested'.
15248
15249         * reflection.c (mono_reflection_bind_generic_parameters): Moved
15250         most of the functionality into a new static
15251         do_mono_reflection_bind_generic_parameters() and don't take a
15252         `MonoType *nested_in' argument any more.  Don't compute nested
15253         types here.
15254         (mono_reflection_generic_inst_get_nested_types): New public method
15255         to get nested types.
15256
15257         * class.c (mono_class_create_generic): Set `klass->nested_in' if
15258         we're a nested class.
15259
15260         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
15261         mono_reflection_generic_inst_get_nested_types() to compute the
15262         nested types.
15263
15264 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15265
15266         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
15267         descriptive error message under windows.
15268         
15269 2004-03-17  Martin Baulig  <martin@ximian.com>
15270
15271         * class.c (dup_type): Added `const MonoType *original' argument;
15272         copy the attrs from the original type.
15273
15274 2004-03-17  Martin Baulig  <martin@ximian.com>
15275
15276         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
15277         `m->generic_inst_cache' here.
15278
15279 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15280
15281         * exception.h exception.c: Add stack_overflow_exception.
15282
15283 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15284
15285         * threadpool.c:
15286         (overlapped_callback): call SetEvent *after* invoking the callback.
15287         No need to call CloseHandle.
15288
15289 2004-03-16  Martin Baulig  <martin@ximian.com>
15290
15291         * reflection.c (mono_image_get_fieldref_token): Take a
15292         `MonoReflectionField *' instead of a `MonoClassField *' and a
15293         `MonoClass *'; store the `MonoReflectionField *' in the hash.
15294
15295 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15296
15297         * appdomain.c: don't add the culture to the filename we're looking for
15298         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
15299
15300 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15301
15302         * locales.c: don't ignore symbols when doing case insensitive compares.
15303         Thanks Dick! Fixes bug #54046.
15304
15305         * threads.c: surround 'threads' usage with enter/leave in
15306         mono_thread_manage.
15307
15308 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
15309
15310         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
15311         implicitly marshalled as [Out]. Fixes #55450.
15312
15313         (mono_marshal_get_runtime_invoke): Zero out the result if there is
15314         an exception.
15315
15316 2004-03-16  Martin Baulig  <martin@ximian.com>
15317
15318         * class.c (mono_class_from_generic_parameter): Use the actual
15319         parameter name. 
15320
15321 2004-03-16  Martin Baulig  <martin@ximian.com>
15322
15323         * reflection.c (type_get_signature_size): New static function.
15324         Compues the size of the type in a method signature.
15325         (method_get_signature_size): New static function; calls
15326         type_get_signature_size() to compute the actual size of the
15327         method's signature.
15328         (method_encode_signature): Use method_get_signature_size() to get
15329         the signature's size rather than using `nparams * 10'.
15330
15331 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15332
15333         * file-io.h: define here WapiOverlapped on windows. I don't want the
15334         regular OVERLAPPED one.
15335
15336         * file-io.c:
15337         * threadpool.c: somehow, BindIoCompletionCallback is not found.
15338         Disabling AIO on windows.
15339
15340 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15341
15342         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
15343         bug #55385.
15344
15345 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15346
15347         * appdomain.c: upgraded corlib version.
15348
15349         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
15350         and BeginWrite. Allow opening files for asynchrnous operations.
15351
15352         * file-io.h: new struct that maps FileStreamAsyncResult.
15353         * icall.c: added new icalls.
15354         * process.[ch]: support setting child process environment variables
15355         and use the SHELL or COMSPEC when UseShellExecute is true.
15356
15357         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
15358         callback for async. IO is here and also BindHandle.
15359
15360         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
15361         from here.
15362
15363 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15364
15365         * reflection.c (create_custom_attr): Allow len == 0.
15366
15367         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
15368         computation on big-endian machines.
15369
15370 2004-03-13  Martin Baulig  <martin@ximian.com>
15371
15372         * class.h (MonoGenericInst): Added `int count_ifaces'.
15373
15374         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
15375         `ginst->count_ifaces' instead `klass->interface_count' since we
15376         may get called before the vtable is created.
15377
15378         * loader.c (mono_method_get_param_names): If we're a generic
15379         instance, return and don't initialize the class.
15380
15381         * reflection.c (mono_reflection_setup_generic_class): Don't call
15382         ensure_runtime_vtable().
15383         (mono_reflection_bind_generic_parameters): Set
15384         `ginst->count_ifaces'.
15385
15386 2004-03-11  Jackson Harper <jackson@ximian.com>
15387
15388         * icall.c:
15389         * unicode.c:
15390         * unicode.h: Remove unused System.Char icalls.
15391         
15392 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
15393
15394         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
15395         code when we P/Invoke the first library in Windows.Forms, instead
15396         of when we first open the assembly.
15397
15398         * assembly.c: Drop the lookup from here.
15399
15400 2004-03-10  Martin Baulig  <martin@ximian.com>
15401
15402         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
15403         class for properties, fields and events.  Finally fixes #54945.
15404
15405 2004-03-10  Martin Baulig  <martin@ximian.com>
15406
15407         * metadata.c (mono_metadata_class_equal): New static function;
15408         checks whether two generic instances or two generic parameters are
15409         equal.
15410         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
15411         compare classes.        
15412
15413 2004-03-10  Martin Baulig  <martin@ximian.com>
15414
15415         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
15416
15417         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
15418         argument and write it into the `reflection_info' field.
15419
15420         * icall.c
15421         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
15422         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
15423
15424 2004-03-09  Jackson Harper  <jackson@ximian.com>
15425
15426         * char-conversions.h: use 8 bits for numeric data its all we need
15427         * icall.c: numeric data is only 8 bits now.
15428
15429 2004-03-09  Martin Baulig  <martin@ximian.com>
15430
15431         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
15432
15433         * class.c (init_properties, init_events): Initialize the new
15434         `parent' field.
15435
15436         * reflection.c (typebuilder_setup_properties): Likewise.
15437         (typebuilder_setup_events): Likewise.
15438
15439         * reflection.h (MonoEventInfo): Replaced `parent with
15440         `declaring_type' and `reflected_type'.
15441
15442         * icall.c (ves_icall_get_property_info): Distinguish between
15443         declaring and reflected type.
15444         (ves_icall_get_event_info): Likewise.
15445
15446 2004-03-09  Martin Baulig  <martin@ximian.com>
15447
15448         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
15449         (ves_icall_Type_GetField): Correctly set field->klass.
15450
15451 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15452
15453         * loader.h: Fix warning.
15454
15455 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
15456
15457         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
15458         library routine if present.  Notice that it will still continue
15459         executing even if its missing, for those working on the Gtk#
15460         edition of Windows.Forms.
15461
15462         * assembly.c (do_mono_assembly_open): If loading the
15463         System.Windows.Forms call mono_loader_wini_init.
15464
15465 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
15466
15467         * class.h: Added MonoRemoteClass struct.
15468         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
15469         function for MonoStrings.
15470         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
15471         Added internal call for getting the proxy type.
15472         * marshal.c: Get the type of transparent proxies from its remote_class.
15473         Added methods that generate the IL for type checks and casts:
15474         mono_marshal_get_isinst, mono_marshal_get_castclass, 
15475         mono_marshal_get_proxy_cancast.
15476         * marshal.h: Declaration of the previous new methods.
15477         * object.c: Added new moethods for creating and updating MonoRemoteClass
15478         instances: mono_remote_class, mono_upgrade_remote_class, 
15479         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
15480         * verify.c: FIx transparent_proxy_fields layout.
15481         * appdomain.c: Bump corlib version.
15482
15483 2004-03-04  Jackson Harper  <jackson@ximian.com>
15484
15485         * icall.c: Add icall to access char conversion tables.
15486         * char-conversions.h: Character conversion tables.
15487         * Makefile.am: Add char-conversions.h private header file.
15488         
15489 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
15490
15491         * appdomain.c (unload_thread_main): Increase unloading timeout to
15492         10 sec as a temporary workaround for Nant problems.
15493
15494 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
15495
15496         * gc.c: Add checks for GC_enable and GC_disable.
15497
15498         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
15499         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
15500         (bug #54988).
15501         
15502 2004-02-27  Martin Baulig  <martin@ximian.com>
15503
15504         * reflection.c (mono_reflection_bind_generic_parameters): Take a
15505         `MonoReflectionType *' instead of a `MonoType *'.
15506
15507 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
15508
15509         * gc.c (run_finalize): Avoid finalizing the object representing the
15510         finalizer thread.
15511         (finalizer_thread): Fix warning.
15512
15513 2004-02-25  Martin Baulig  <martin@ximian.com>
15514
15515         * class.c (_mono_class_get_instantiation_name): Added `int offset'
15516         argument for nested types.
15517         (mono_class_create_generic): Added support for nested generictypes.
15518
15519         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
15520         `GList *nested'.
15521
15522         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
15523
15524         * reflection.c (method_encode_signature): Increase the minimum
15525         value of `size' from 10 to 11.
15526         (mono_reflection_bind_generic_parameters): Take `int type_argc'
15527         and `MonoType **types' arguments instead of the `MonoArray
15528         *types'; added `MonoType *nested_in'.  Recursively instantiate
15529         nested classes. 
15530
15531 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
15532
15533         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
15534         stack_overflow_ex members which are used by exception handling.
15535
15536         * appdomain.c (mono_runtime_init): Initialize the new members.
15537
15538         * gc.c (mono_gc_enable): New helper function.
15539         * gc.c (mono_gc_disable): New helper function.
15540
15541 2004-02-23  Martin Baulig  <martin@ximian.com>
15542
15543         * icall.c: I must have been really stupid - make it actually work
15544         this time ;-)
15545
15546 2004-02-23  Martin Baulig  <martin@ximian.com>
15547
15548         * loader.c (method_from_memberref): Only inflate the method if
15549         it's in another klass.
15550
15551 2004-02-23  Martin Baulig  <martin@ximian.com>
15552
15553         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
15554         (mono_class_init): If we're a generic instance and an interface,
15555         compute `class->interface_id'; also create `class->interfaces'
15556         here and inflate them.
15557
15558         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
15559         `ginst->is_open'.
15560         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
15561
15562         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
15563
15564 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
15565
15566         * reflection.c (method_encode_code): Improved the error message
15567         generated by the exception.
15568
15569 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15570
15571         * icall.c: Martin did not do what he said in the ChangeLog for
15572         2004-02-18, but put back the changes for properties and events.
15573         Commenting those changes out again and adding comment to bug #54518.
15574         
15575         * process.c: removed warning.
15576
15577 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
15578
15579         * marshal.c (emit_struct_conv): Print an error message instead of
15580         asserting when a type does not have the StructLayout attribute.
15581
15582 2004-02-20  Martin Baulig  <martin@ximian.com>
15583
15584         * reflection.c (mono_type_get_object): Also use the cache for
15585         generic instances.
15586         (mono_reflection_bind_generic_parameters): Always compute
15587         `ginst->ifaces'.        
15588
15589 2004-02-20  Martin Baulig  <martin@ximian.com>
15590
15591         * class.h (MonoGenericMethod): Removed `klass'.
15592
15593         * class.c (mono_class_inflate_generic_method): Added `MonoClass
15594         *klass' argument.
15595
15596 2004-02-20  Martin Baulig  <martin@ximian.com>
15597
15598         * reflection.c (method_encode_methodspec): Actually use the
15599         uninflated signature for the memberref.
15600
15601 2004-02-20  Martin Baulig  <martin@ximian.com>
15602
15603         * class.h (MonoGenericMethod): Removed `declaring'.
15604
15605         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
15606         is NULL, compute it here.
15607
15608 2004-02-20  Martin Baulig  <martin@ximian.com>
15609
15610         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
15611
15612         * metadata.c (mono_metadata_generic_inst_hash): New method.
15613         (mono_metadata_generic_inst_equal): New method.
15614
15615         * reflection.c (mono_reflection_bind_generic_parameters): Use the
15616         `klass->image->generic_inst_cache' cache to avoid creating
15617         duplicate MonoGenericInst's.
15618
15619         * class.c (mono_class_inflate_generic_type): Use the cache.
15620
15621 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
15622
15623         * object.c: fixed gc descriptor calculation for embedded valuetypes.
15624
15625 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15626
15627         * icall.c: added Socket.WSAIoctl icall.
15628
15629         * socket-io.[ch]: implemented
15630         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
15631
15632 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
15633
15634         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
15635
15636 2004-02-18  Urs C Muff  <umuff@quark.com>
15637
15638         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
15639         this work on PPC and other big-endian architectures.
15640
15641         * debug-mono-symfile.h: Prepended the names of all the `guint32'
15642         fields with an underscore to make sure they're only accessed by
15643         the read32() macro.
15644
15645 2004-02-18  Martin Baulig  <martin@ximian.com>
15646
15647         * icall.c: Put the klass->refclass changes back for methods and
15648         fields, but not for properties and events.  We're currently not
15649         distinguishing between DeclaringType and ReflectedType for
15650         properties and events, that's what caused the regressions.
15651
15652 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15653
15654         * object.c:
15655         (mono_async_result_new): the handle can be NULL.
15656
15657         * threadpool.c: Use an event instead of a semaphore, don't initialize
15658         it until needed. This saves quite a few semaphores from being created
15659         when using the threadpool.
15660
15661 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
15662
15663         * object.c (mono_string_is_interned_lookup): Fix interning of long
15664         strings. Fixes #54473.
15665
15666         * domain.c (ldstr_equal): Optimize if the two strings are equal.
15667
15668         * icall.c: Revert the klass->refclass changes since they introduce
15669         regressions (bug #54518).
15670
15671 2004-02-18  Martin Baulig  <martin@ximian.com>
15672
15673         * class.c (mono_class_init): If we're a generic instance and don't
15674         come from a TypeBuilder, inflate our members here.
15675         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
15676         (mono_class_create_generic): New public method.
15677         (mono_class_initialize_generic): Removed.
15678         (get_instantiation_name): Renamed to
15679         _mono_class_get_instantiation_name() and made it public.
15680
15681 2004-02-18  Martin Baulig  <martin@ximian.com>
15682
15683         * class.c (mono_class_inflate_generic_type): Clear the new
15684         instance's `nginst->klass' when inflating a generic instance.
15685         (mono_class_is_subclass_of): Added (basic) support for generic
15686         instances.
15687
15688 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
15689
15690         * appdomain.h, domain.c: use a MonoCodeManager instead of a
15691         MonoMempool to hold compiled native code.
15692
15693 2004-02-17  Martin Baulig  <martin@ximian.com>
15694
15695         * class.h (MonoDynamicGenericInst): Added `count_properties' and
15696         `properties'.
15697
15698         * reflection.c (mono_reflection_generic_inst_initialize): Added
15699         `MonoArray *properties' argument.
15700
15701         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
15702
15703 2004-02-17  Martin Baulig  <martin@ximian.com>
15704
15705         * icall.c (ves_icall_Type_GetFields): Renamed to
15706         ves_icall_Type_GetFields_internal() and added a
15707         `MonoReflectionType *rtype' argument; pass it to
15708         mono_field_get_object() to set the field's "reflected" type.
15709         (ves_icall_Type_GetConstructors): Likewise.
15710         (ves_icall_Type_GetEvents): Likewise.
15711         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
15712         argument; pass it to mono_method_get_object() to set the method's
15713         "reflected" type.       
15714
15715 2004-02-17  Martin Baulig  <martin@ximian.com>
15716
15717         * class.h (MonoDynamicGenericInst): New type.
15718         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
15719
15720         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
15721         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
15722         (ves_icall_MonoGenericInst_GetFields): New interncall.
15723
15724         * class.c (mono_class_from_generic): Don't call
15725         mono_class_initialize_generic() if this is a dynamic instance;
15726         ie. it's being created from a TypeBuilder.
15727         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
15728         `class->byval_arg.type'.
15729
15730         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
15731         to `inflate_method' and made static.
15732         (mono_reflection_inflate_field): Removed.
15733         (mono_reflection_generic_inst_initialize): New public method.
15734
15735         * reflection.h (MonoReflectionGenericInst): Removed `methods',
15736         `ctors' and `fields'; added `initialized'.
15737
15738 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
15739
15740         * debug-helpers.c (mono_method_full_name): Fix output for empty
15741         namespaces.
15742
15743 2004-02-12  Martin Baulig  <martin@ximian.com>
15744
15745         * class.h (MonoClassField): Added `MonoType *generic_type'.
15746
15747         * reflection.c (mono_image_get_fieldref_token): Added support for
15748         instantiated generic types.
15749         (field_encode_inflated_field): Removed.
15750         (mono_image_get_inflated_field_token): Removed.
15751         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
15752
15753         * reflection.h (MonoReflectionInflatedField): Removed.
15754
15755 2004-02-12  Martin Baulig  <martin@ximian.com>
15756
15757         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
15758         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
15759
15760         * reflection.c (mono_image_get_methodspec_token): Take a
15761         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
15762         (mono_image_create_token): Check whether we have a
15763         `method->signature->gen_method' and call
15764         mono_image_get_methodspec_token() if appropriate.
15765         (inflated_method_get_object): Removed.
15766         (mono_reflection_bind_generic_method_parameters): Return a
15767         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
15768         (mono_reflection_inflate_method_or_ctor): Likewise.
15769
15770         * reflection.h (MonoReflectionInflatedMethod): Removed.
15771
15772 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
15773
15774         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
15775         for custom valuetype marshalling.
15776
15777         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
15778
15779 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15780
15781         * icall.c: fixed WSAGetLastError_internal name.
15782
15783 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
15784
15785         * threads.c (mono_thread_attach): Allow this to be called multiple
15786         times for a thread.
15787         
15788         * threads.c (build_wait_tids): Do not wait for ourselves.
15789
15790         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
15791         appdomain list is empty.
15792
15793         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
15794         memory returned by mono_string_builder_to_utf16, since it points into
15795         managed memory. Thanks to Bernie Solomon for noticing this.
15796
15797         * icall.c: Add AppDomainSetup icalls.
15798
15799         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
15800
15801         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
15802         types.
15803
15804         * reflection.c (reflection_methodbuilder_to_mono_method): Save
15805         custom attributes to the method_aux struct. Also fix array indexes etc.
15806
15807         * loader.c (mono_method_get_param_names): Make dynamic case work again.
15808         
15809 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
15810
15811         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
15812         (both static and runtime) and reduce startup time.
15813
15814 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
15815
15816         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
15817         AsAny marshalling conversion instead of crashing.
15818
15819         * marshal.c: Fix warnings.
15820
15821 2004-02-09  Martin Baulig  <martin@ximian.com>
15822
15823         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
15824
15825         * reflection.h (MonoReflectionInflatedMethod): Removed the
15826         `declaring' field, it's now in the unmanaged MonoGenericMethod.
15827
15828         * reflection.c (method_encode_methodspec): Removed the `method'
15829         argument; we get it from `gmethod->declaring'.
15830         (inflated_method_get_object): Removed the `declaring' argument.
15831
15832 2004-02-09  Martin Baulig  <martin@ximian.com>
15833
15834         * class.h (MonoGenericMethod): New type.
15835         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
15836         `generic_method'.
15837
15838         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
15839         a `MonoGenericMethod *gen_method' one.
15840
15841         * class.c (mono_class_inflate_generic_type): Take an additional
15842         `MonoGenericMethod * argument.  This is only non-NULL if we're
15843         inflating types for a generic method.   
15844         (mono_class_inflate_generic_signature): Renamed to
15845         inflate_generic_signature() and made static; take a
15846         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15847         (inflate_generic_header): Take a `MonoGenericMethod *' argument
15848         instead of a `MonoGenericInst *' one.
15849         (mono_class_inflate_generic_method): Likewise.
15850
15851         * reflection.c (encode_generic_method_sig): Take a
15852         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15853         (method_encode_methodspec): Likewise.
15854         (inflated_method_get_object): Likewise. 
15855
15856         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
15857         field with a `MonoGenericMethod *gmethod' one.  
15858
15859 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
15860
15861         * class.h (mono_class_has_parent): add parens to expansion
15862         so you can ! this.
15863
15864 2004-02-08  Martin Baulig  <martin@ximian.com>
15865
15866         * image.h (MonoImage): Removed `generics_cache'.
15867
15868         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
15869         instead of a `MonoType *' argument; removed the `inflate_methods'
15870         argument.  Don't inflate methods here.
15871
15872         * loader.c (find_method): If it's a generic instance, call
15873         mono_class_init() on the `sclass->generic_inst->generic_type'.
15874
15875         * metadata.c (mono_type_size): Make this work on uninitialized
15876         generic instances; call it on the `ginst->generic_type's class.
15877
15878         * reflection.c (mono_reflection_bind_generic_parameters): Call
15879         mono_class_from_generic() to create the `ginst->klass'.
15880
15881 2004-02-08  Martin Baulig  <martin@ximian.com>
15882
15883         * class.h (MonoClass): Changed type of `generic_inst' from
15884         `MonoType *' to `MonoGenericInst *'.
15885
15886 2004-02-08  Martin Baulig  <martin@ximian.com>
15887
15888         * icall.c (ves_icall_Type_BindGenericParameters): Just call
15889         mono_type_get_object(), this is now creating a `MonoGenericInst'
15890         for MONO_TYPE_GENERICINST.
15891         (ves_icall_MonoGenericInst_GetParentType): Likewise.
15892         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
15893
15894         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
15895         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
15896         (inflated_method_get_object): Added `MonoClass *refclass' argument.
15897         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
15898         and reflected type.
15899
15900         * reflection.h (MonoReflectionInflatedMethod): Removed
15901         `declaring_type' and `reflected_type'.
15902
15903 2004-02-08  Martin Baulig  <martin@ximian.com>
15904
15905         * class.h (MonoGenericInst): Added `MonoType *parent' and
15906         `MonoType **ifaces'.
15907
15908         * reflection.h (MonoReflectionGenericInst): Removed `klass',
15909         `parent' and `interfaces'.
15910
15911         * reflection.c (mono_reflection_bind_generic_parameters): Take a
15912         `MonoType *' argument and return a `MonoType *'.
15913
15914         * icall.c
15915         (ves_icall_MonoGenericInst_GetParentType): New interncall.
15916         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
15917
15918 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
15919
15920         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
15921         valuetype marshalling.
15922
15923 2004-02-06  Martin Baulig  <martin@ximian.com>
15924
15925         * class.c
15926         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
15927         (my_mono_class_from_generic_parameter): Likewise.
15928
15929 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
15930
15931         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
15932         contents of the symbol files lazily.
15933
15934         * object.h (MonoThread): Add 'name' and 'name_len' fields.
15935
15936         * threads.h threads.c icall.c: New icalls for getting and setting the
15937         threads name.
15938
15939 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
15940
15941         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
15942         Raise an exception when the domain is not found.
15943
15944 2004-02-03  Martin Baulig  <martin@ximian.com>
15945
15946         * reflection.c (mono_image_get_methodspec_token): Use the
15947         uninflated signature; fixes gen-33.
15948
15949 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
15950
15951         * gc.c threads.c: Make the finalizer thread a normal managed thread so
15952         the finalizer code can use thread functionality.
15953
15954         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
15955         the finalizer thread.
15956
15957         * threads.c: Make some functions more robust.
15958
15959         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
15960
15961         * metadata.h: Add new marshalling conventions.
15962
15963         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
15964         stringbuilder marshalling. Fixes #53700.
15965
15966         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
15967
15968         * reflection.c (mono_image_get_type_info): Save declarative security
15969         info.
15970
15971         * reflection.c (mono_image_get_field_info): Handle uninitialized 
15972         unmanaged fields as well.
15973
15974         * appdomain.c: Bump corlib version.
15975
15976 2004-02-01  Martin Baulig  <martin@ximian.com>
15977
15978         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
15979         method type arguments.  
15980
15981 2004-01-30  Duncan Mak  <duncan@ximian.com>
15982
15983         * marshal.h: Add prototype for
15984         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
15985         and
15986         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
15987         fix the build.
15988
15989 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
15990
15991         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
15992         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
15993
15994 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
15995
15996         * marshal.c (mono_marshal_get_native_wrapper): Add support for
15997         custom marshalling of valuetypes.
15998
15999         * marshal.c: Fix some warnings.
16000
16001 2004-01-29  Martin Baulig  <martin@ximian.com>
16002
16003         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
16004         for generic method parameters.
16005
16006         * reflection.c (method_encode_methodspec): Write the uninflated
16007         signature into the methodspec table.
16008         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
16009         is always the uninflated method.
16010         (reflection_methodbuilder_to_mono_method): Copy the generic
16011         parameters from the MethodBuilder into `header->gen_params'.
16012
16013 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
16014
16015         * class.c (mono_class_from_generic_parameter): Fix warning.
16016
16017 2004-01-27  Martin Baulig  <martin@ximian.com>
16018
16019         * class.c (mono_class_from_generic_parameter): Don't create
16020         `klass->methods' here.  
16021
16022 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
16023
16024         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
16025         extension since it does not work with libraries named lib<FOO>.dll.so.
16026
16027 2004-01-25  Martin Baulig  <martin@ximian.com>
16028
16029         * class.c (mono_class_inflate_generic_type): Added support for
16030         MONO_TYPE_GENERICINST.
16031
16032         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
16033         inflate methods on open constructed types.      
16034
16035 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16036
16037         * object.c: fire ProcessExit event in the root AppDomain after running
16038         Main. Fixes bug #53299.
16039
16040 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16041
16042         * socket-io.c: include the new socket-wrappers.h header.
16043         Use the wrappers instead of the unix socket functions to make the code
16044         more clear.
16045
16046 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
16047
16048         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
16049
16050         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
16051         Fixes #22532.
16052
16053 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
16054
16055         * reflection.c (mono_image_create_pefile): Handle the case when the
16056         entry point is not a MethodBuilder.
16057
16058         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
16059         field to ReflectionMethod since it is not allways a builder.
16060
16061         * reflection.c (type_get_fully_qualified_name): New helper function to
16062         return the fully qualified name of a type.
16063
16064         * reflection.c (encode_marshal_blob): Always emit the fully qualified
16065         type name for custom marshallers.
16066
16067         * reflection.c (mono_marshal_spec_from_builder): Ditto.
16068
16069         * class.c (mono_class_setup_vtable): If a parent class already 
16070         implements an interface, use the implementing methods from that class.
16071         Fixes #53148.
16072
16073 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16074
16075         * threadpool.c: just return instead of ExitThread to allow for thread
16076         clean up earlier.
16077
16078 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
16079
16080         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
16081         when closing resource modules.
16082
16083         * reflection.c (mono_image_create_pefile): Handle the case when the
16084         entry point is not a MethodBuilder.
16085
16086         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
16087         field to ReflectionMethod since it is not allways a builder.
16088
16089 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
16090
16091         * marshal.c (mono_marshal_get_managed_wrapper): 
16092         mono_marshal_alloc takes native int so CONV_I
16093         the arg for 64bits.
16094
16095 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
16096
16097         * reflection.c (fixup_cattrs): New function to fixup the methoddef
16098         tokens in the cattr table. Fixes #53108.
16099
16100 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16101
16102         * loader.c: don't trim ".dll" before looking up in the config file.
16103         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
16104
16105 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
16106
16107         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
16108         Return the module which contains the resource as well.
16109         (ves_icall_System_Reflection_Module_Close): New icall.
16110
16111         * appdomain.c: Bump corlib version number.
16112
16113         * image.c (mono_image_addref): New public function.
16114
16115         * assembly.c: Call mono_image_addref.
16116
16117         * reflection.c (mono_module_get_object): Increase reference count of 
16118         the image.
16119
16120         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
16121         Fixes #22532.
16122
16123         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
16124         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
16125         proper exceptions on DllImport problems.
16126
16127 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
16128
16129         * class.c, metadata.c: eliminate CSIZE macro.
16130
16131 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
16132
16133         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
16134         * object.h: Added async_callback field in MonoAsyncResult.
16135         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
16136         * verify.c: Added async_callback in MonoAsyncResult layout.
16137
16138 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
16139
16140         * reflection.c (mono_reflection_get_custom_attrs): Add support
16141         for Modules.
16142
16143 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
16144
16145         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
16146         marshalling.
16147         (mono_marshal_method_from_wrapper): Add null pointer check.
16148
16149 2004-01-16  Martin Baulig  <martin@ximian.com>
16150
16151         * debug-mono-symfile.h: Set version number to 36 and reflect
16152         latest symbol writer changes.
16153
16154 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
16155
16156         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
16157         multi-dimensional arrays.
16158         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
16159         (mono_class_from_mono_type): Use bounded_array_class_get.
16160         
16161         * class.c (mono_bounded_array_class_get): New function which takes
16162         a 'bounded' bool argument to distinguish vectors from one dimensional
16163         arrays.
16164
16165         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
16166         bounded_array_class_get if the array has bounds.
16167
16168         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
16169         Search modules loaded using AssemblyBuilder:AddModule as well.
16170
16171 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16172
16173         * appdomain.c: increased corlib version.
16174         * filewatcher.c: removed g_print.
16175         * icall.c:
16176         (get_property_info): only allocate what is actually requested.
16177         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
16178
16179 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16180
16181         * Makefile.am: added filewatcher.[ch]
16182         * filewatcher.[ch]: FileSystemWatcher runtime support.
16183         * icall.c: added new FSW icalls.
16184
16185 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
16186
16187         * string-icalls.c: fix stringbuilder regression as suggested by
16188         Iain McCoy <iain@mccoy.id.au>.
16189
16190 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
16191
16192         * process.c (process_read_stringtable_block): Recognize '007f' as
16193         a language neutral stringtable block.
16194
16195 2004-01-12  Patrik Torstensson
16196
16197         * object.h (MonoStringBuilder) : Changed layout to support our
16198         new stringbuilder class.
16199         * marshal.c: Change marshalling to support the new layout of 
16200         string builder.
16201         * appdomain.c: increased version number because new layout of
16202         string builder.
16203
16204 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
16205
16206         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
16207         assembly name as an string instead of an AssemblyName, since it is
16208         easier to extract info from it.
16209
16210         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
16211         the culture subdirectories too. Fixes #52231.
16212
16213 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16214
16215         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
16216         It takes 2 new parameters with an optional name for the method to look
16217         for and case ignoring info.
16218
16219         * threadpool.c: removed unused variable.
16220
16221 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16222
16223         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
16224         It takes 2 new parameters with an optional name for the property to look
16225         for and case ignoring info.
16226         Fixes bug #52753.
16227
16228 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
16229
16230         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
16231         Fix #52451.
16232
16233 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16234
16235         * appdomain.c:
16236         * assembly.c: escape the uri before passing it to g_filename_from_uri.
16237         Fixes bug #52630.
16238
16239 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
16240
16241         * reflection.c: Add support for more than one unmanaged resource.
16242
16243         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
16244         in field->def_value, as done in all other cases.
16245
16246         * reflection.c (mono_reflection_get_custom_attrs): Add support for
16247         TypeBuilders.
16248
16249         * reflection.c (mono_reflection_create_runtime_class): Remove 
16250         errorneous assignment to klass->element_class, since it is already
16251         done in mono_reflection_setup_internal_class.
16252
16253 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16254
16255         * gc.c: added missing LeaveCriticalSection.
16256         * icall.c: indented a couple of lines.
16257         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
16258         if we call EndInvoke inside a callback. Fixes bug #52601.
16259
16260 2004-01-07  Martin Baulig  <martin@ximian.com>
16261
16262         * mono-debug-debugger.h
16263         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
16264
16265 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
16266
16267         * appdomain.c: Use messages in NotImplementedException.
16268
16269         * exception.c (mono_get_exception_not_implemented): Now this takes
16270         a message argument.
16271
16272         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
16273         exception instead of g_asserting an aborting when something is not
16274         implemented.
16275
16276         Add some inline docs.
16277
16278 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
16279
16280         * reflection.h: Update after changes to object layout.
16281
16282         * reflection.c: Implement saving of unmanaged aka win32 resources.
16283
16284         * appdomain.c: Bump version number.
16285
16286         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
16287         Handle missing domains gracefully.
16288
16289 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
16290
16291         * file-io.c : On Windows, there are much more invalid_path_chars.
16292
16293 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16294
16295         * class.h, object.c: prepare for GetType () speedup.
16296
16297 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
16298
16299         * profiler.c: workaround for --profile null reference exception on
16300           cygwin. Patch by Patrik Torstensson.
16301
16302 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
16303
16304         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
16305         make work for unaligned access.
16306
16307 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
16308
16309         * class.c: small cleanup (class->fields [i] -> field).
16310         * image.c: check address of metadata is valid.
16311
16312 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
16313
16314         * assembly.h assembly.c (mono_assembly_loaded): New public function to
16315         search the list of loaded assemblies.
16316
16317         * reflection.c (mono_reflection_type_from_name): Use 
16318         mono_assembly_loaded instead of mono_image_loaded.
16319
16320         * reflection.c: Fix warnings.
16321
16322 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
16323
16324         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
16325         is dynamic. This is needed since an assembly can contain both dynamic and
16326         non-dynamic images.
16327
16328         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
16329         assembly->dynamic.
16330
16331         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
16332
16333         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
16334         to store modules loaded using AddModule.
16335
16336         * reflection.c (mono_image_fill_file_table): Generalize this so it works
16337         on Modules.
16338
16339         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
16340
16341         * reflection.c (mono_image_fill_export_table_from_module): New function to
16342         fill out the EXPORTEDTYPES table from a module.
16343
16344         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
16345         into a separate function. Also handle loaded non-dynamic modules.
16346
16347         * reflection.c (mono_image_basic_init): Fix memory allocation.
16348
16349         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16350
16351         * assembly.c (mono_assembly_load_references): Make this public.
16352
16353 2003-12-19  Martin Baulig  <martin@ximian.com>
16354
16355         * class.c (mono_class_initialize_generic): Made this static, take
16356         a `MonoGenericInst *' instead of a `MonoClass *'.
16357         (mono_class_from_generic): Call mono_class_initialize_generic()
16358         unless we're already initialized or being called from
16359         do_mono_metadata_parse_generic_inst().
16360
16361         * class.h (MonoGenericInst): Added `initialized' and
16362         `init_pending' flags.
16363
16364         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
16365         `mono_class_init (gklass)' or mono_class_initialize_generic()
16366         here; set `generic_inst->init_pending' while parsing the
16367         `type_argv'.
16368
16369 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
16370
16371         * locales.c: include string.h for memxxx prototypes
16372
16373 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
16374
16375         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
16376         constructor when accessing literal fields.
16377
16378 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
16379
16380         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16381
16382         * reflection.c (assembly_add_resource_manifest): New function to fill
16383         the MANIFESTRESOURCE table.
16384
16385         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
16386
16387         * reflection.h: Update to changes in class layout.
16388
16389         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
16390         Reenable call to mono_runtime_is_shutting_down ().
16391
16392         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
16393         determine if the runtime is shutting down.
16394
16395 2003-12-16  Jackson Harper <jackson@ximian.com>
16396
16397         * icall.c: comment out call to mono_runtime_is_shutting_down to
16398         fix build.
16399         
16400 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
16401
16402         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
16403         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
16404
16405 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
16406
16407         * reflection.c: move definition of swap_with_size
16408         to before its first call
16409
16410 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
16411
16412         * appdomain.c (mono_runtime_is_shutting_down): New public function.
16413
16414         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
16415         icall.
16416
16417         * object.c: Fix warnings.
16418
16419         * icall.c (ves_icall_Type_Get...): Only consider inherited static
16420         members if FlattenHierarchy is set.
16421
16422         * reflection.c (mono_image_add_decl_security): New function to emit
16423         declarative security.
16424
16425         * reflection.h reflection.c: Add support for declarative security.
16426
16427         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16428         
16429 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
16430
16431         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16432         
16433         * appdomain.c verify.c: Moved corlib version checking into its own
16434         function in appdomain.c since it needs to create vtables etc.
16435
16436 2003-12-13  Patrik Torstensson <p@rxc.se>
16437
16438         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
16439         instead of unwrapped server.
16440
16441 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
16442
16443         * verify.c (check_corlib): Fix field index.
16444
16445 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
16446
16447         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
16448         GetGacPath icall.
16449
16450 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
16451
16452         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
16453         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
16454         cope with sizeof(size_t) != sizeof(guint32).
16455
16456 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16457
16458         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
16459         in case of failure.
16460
16461 2003-12-10  Mark Crichton <crichton@gimp.org>
16462
16463         * icall.c: removed the GetNonZeroBytes.  We now handle this case
16464         in managed code.
16465
16466         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
16467
16468 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
16469
16470         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
16471         marked as deleted.
16472
16473 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
16474
16475         * verify.c (check_corlib): Handle the case when the version field is 
16476         initialized by a static constructor.
16477
16478 2003-12-08  Patrik Torstensson  <p@rxc.se>
16479
16480     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
16481
16482 2003-12-08  Martin Baulig  <martin@ximian.com>
16483
16484         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
16485         a MonoReflectionGenericParameter, also take the parameter index
16486         and name as arguments.
16487         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
16488         (ves_icall_MonoGenericParam_initialize): New interncall.
16489         (ves_icall_Type_make_byref_type): New interncall.
16490
16491         * reflection.h (MonoReflectionGenericParam): Derive from
16492         MonoReflectionType, not just from MonoObject.  Added `refobj' and
16493         `index' fields.
16494
16495         * reflection.c (mono_reflection_define_generic_parameter): Create
16496         and return a new MonoReflectionGenericParam; don't initialize the
16497         constraints here.
16498         (mono_reflection_initialize_generic_parameter): New public method;
16499         initializes the constraints and creates the `param->pklass'.
16500
16501 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
16502
16503         * reflection.h reflection.c: Use the new fields 'num_types', 
16504         'num_fields' and 'num_methods' to track the number of types etc.
16505
16506         * verify.c (check_corlib): Check corlib version number.
16507
16508 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
16509
16510         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
16511         function works on all methods.
16512
16513 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
16514
16515         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
16516         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
16517         the custom_type_info flag of the transparent proxy.
16518         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
16519         objects that supports IRemotingTypeInfo.
16520         * object.h: Added custom_type_info field in transparent proxy.
16521
16522 2003-12-06  Martin Baulig  <martin@ximian.com>
16523
16524         * class.c (mono_class_create_from_generic): Removed.
16525         (mono_class_from_generic): Check `ginst->klass' before doing
16526         anything else.  This is important to fully support "recursive"
16527         generic types.
16528
16529         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
16530         empty `generic_inst->klass' before doing anything else.
16531
16532 2003-12-06  Dick Porter  <dick@ximian.com>
16533
16534         * verify.c: 
16535         * object.h:
16536         * icall.c:
16537         * locales.c: Use C structs to access class fields.  Don't do a
16538         conversion between MonoString and UChar because both are
16539         platform-endian UTF-16.  Compare now takes startindex and count
16540         parameters.  Add a char overload for IndexOf.  Speed up the
16541         invariant string IndexOf.
16542
16543 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
16544
16545         * Makefile.am (monosn_LDADD): Fix parallel build.
16546
16547 2003-12-04  Martin Baulig  <martin@ximian.com>
16548
16549         * icall.c
16550         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
16551         (ves_icall_Type_make_array_type): New interncall.       
16552
16553 2003-12-04  Martin Baulig  <martin@ximian.com>
16554
16555         * locales.c: also change it in the !HAVE_ICU case.
16556
16557 2003-12-04  Dick Porter  <dick@ximian.com>
16558
16559         * icall.c:
16560         * locales.c: construct_compareinfo is now in CompareInfo, not
16561         CultureInfo.
16562
16563 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
16564
16565         * image.c (mono_image_load_file_for_image): Cache loaded images in the
16566         image->files array.
16567
16568         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
16569         table as well.
16570
16571         * assembly.c (mono_assembly_load_references): Only load references
16572         once.
16573
16574         * class.c (mono_class_from_name): Avoid linear search of the 
16575         EXPORTEDTYPE table.
16576
16577         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
16578
16579 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
16580
16581         * image.h (MonoImage): Add 'field_cache' field.
16582
16583         * loader.c (mono_field_from_token): Cache field lookups.
16584         
16585         * reflection.c (mono_module_get_object): Fix name property.
16586
16587         * icall.c (ves_icall_get_enum_info): Update after changes to 
16588         mono_metadata_get_constant_index ().
16589
16590         * icall.c: Get rid of get_type_info icall, use a separate icall for
16591         each type property to avoid needless memory allocations. Fixes #51514.
16592
16593         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
16594         to avoid needless binary searches.
16595
16596         * class.c (class_compute_field_layout): Move the initialization of
16597         field->def_value to mono_class_vtable ().
16598
16599         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
16600         non-corlib types.
16601
16602         * object.c (mono_object_allocate): Make it inline.
16603
16604         * object.c (mono_object_allocate_spec): Make it inline.
16605         
16606 2003-12-02  Dick Porter  <dick@ximian.com>
16607
16608         * locales.c (create_NumberFormat): NumberFormatInfo construction.
16609         Patch by Mohammad DAMT (mdamt@cdl2000.com).
16610
16611 2003-12-01  Dick Porter  <dick@ximian.com>
16612
16613         * threads.c: Fix signature and call in CreateMutex and
16614         CreateEvent.
16615
16616 2003-12-01  Dick Porter  <dick@ximian.com>
16617
16618         * icall.c: 
16619         * locales.c: Implement string compares and searching
16620
16621         * object.h: Add extra Thread field
16622
16623 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
16624
16625         * reflection.c (fixup_method): Add support for MonoCMethod.
16626
16627 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
16628
16629         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
16630
16631         * reflection.c (assembly_name_to_aname): Allow extra characters in
16632         assembly names. Fixes #51468.
16633
16634 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
16635
16636         * exception.c (mono_exception_from_name_domain): New helper function.
16637
16638         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
16639         exception object in the correct domain.
16640
16641         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
16642         formatting + make a copy a the input data.
16643
16644         * loader.c (mono_get_method_from_token): Methods which contain
16645         native code do not have entries in the ImplMap.
16646
16647         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
16648         Thanks to Gonzalo for spotting this.
16649         
16650         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
16651         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
16652
16653         * assembly.h (mono_assembly_load_from): Split the second part of 
16654         assembly loading into a new public function.
16655
16656         * exception.h (mono_get_exception_bad_image_format): New function.
16657
16658 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
16659
16660         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
16661         Enumerate all modules inside a dynamic assembly. Fixes #51293.
16662         
16663         * icall.c: Add new icall for creating dynamic methods.
16664
16665         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
16666
16667         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
16668
16669         * reflection.c (mono_reflection_create_dynamic_method): New icall to
16670         create a dynamic method.
16671
16672         * reflection.c (resolve_object): New helper function.
16673
16674         * reflection.c: Generalize ReflectionMethodBuilder and the functions
16675         which manipulate it so they can also work on dynamic methods.
16676
16677         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
16678         creating the MonoReflectionMethodAux structure if it is not needed.
16679         
16680         * reflection.h verify.c: Update after changes to object layout.
16681
16682         * reflection.c (method_builder_encode_signature): Fix compilation on
16683         gcc 2.95.x.
16684
16685 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
16686
16687         * appdomain.h: Added support for context static fields. Added static_data
16688           field to MonoAppContext and renamed thread_static_fields to a more
16689           generic special_static_fields in MonoAppDomain, since it can now contain
16690           context static fields.
16691         * domain.c: Updated hashtable name.
16692         * object.c: Replaced field_is_thread_static() for a more generic
16693           field_is_special_static() which also checks for context static attribute.
16694           In mono_class_vtable(), added support for static context fields.
16695         * threads.c: Changed methods that manage thread static fields to more
16696           generic methods so they can be reused both for thread and context static
16697           data.
16698         * threads.h: Declared some new methods.
16699
16700 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
16701
16702         * reflection.h: Update after changes to the managed types.
16703
16704         * reflection.c (encode_custom_modifiers): New helper function.
16705
16706         * reflection.c (method_encode_signature): Emit custom modifiers.
16707
16708         * reflection.c (field_encode_signature): Emit custom modifiers.
16709
16710 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
16711
16712         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
16713
16714         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
16715         implementation.
16716
16717         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
16718         icall.
16719
16720         * object.c (mono_field_get_value_object): New function.
16721
16722         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
16723         specific.
16724
16725 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
16726
16727         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
16728         return a preallocated out-of-memory exception instance.
16729
16730         * object.c (out_of_memory): Use the new function.
16731
16732         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
16733         flag is before the custom modifiers. Fixes #49802.
16734
16735 2003-11-16  Martin Baulig  <martin@ximian.com>
16736
16737         * class.c (mono_class_is_open_constructed_type): Implemented the
16738         MONO_TYPE_GENERICINST case.
16739
16740 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
16741
16742         * assembly.c (mono_assembly_fill_assembly_name): New function to
16743         fill out the MonoAssemblyName structure.
16744         (mono_assembly_open): Use the new function.
16745
16746         * icall.c (fill_reflection_assembly_name): New helper function.
16747
16748         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
16749         new function.
16750
16751         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
16752
16753 2003-11-15  Martin Baulig  <martin@ximian.com>
16754
16755         * class.c (mono_class_is_open_constructed_type): New public
16756         function; checks whether a type is an open constructed type,
16757         ie. whether it still contains type parameters.
16758         (mono_class_inflate_generic_type): If we're a type parameter and
16759         the inflated type is also a MONO_TYPE_(M)VAR, return the original
16760         type.
16761
16762         * class.h (MonoGenericInst): Added `guint32 is_open'.
16763
16764         * loader.c (method_from_methodspec): Check whether we're an open
16765         or closed constructed type and set `ginst->is_open'.
16766
16767         * reflection.c (mono_reflection_bind_generic_parameters): Check
16768         whether we're an open or closed constructed type and set
16769         `ginst->is_open'.
16770         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
16771         from open constructed types.
16772
16773 2003-11-15  Martin Baulig  <martin@ximian.com>
16774
16775         * reflection.c (mono_reflection_bind_generic_parameters): If we're
16776         a generic instance (instead of a generic type declaration) with
16777         unbound generic parameters, bind them to our actual types.
16778
16779 2003-11-14  Martin Baulig  <martin@ximian.com>
16780
16781         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
16782
16783         * reflection.c (mono_reflection_bind_generic_parameters): If we're
16784         an interface type, populate `res->interfaces' with instantiated
16785         versions of all the interfaces we inherit.
16786
16787 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
16788
16789         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
16790         when MONO_PATH is set but doesn't contain the install dir.
16791
16792 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16793
16794         * icall.c:
16795         (ves_icall_Type_GetInterfaces): don't return an interface twice when
16796         it's also implemented in base classes. Fixes bug #50927.
16797
16798 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
16799
16800         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
16801         if this method is called from a finalizer. Fixes #50913.
16802
16803 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
16804
16805         * threads.c: Implement VolatileRead/VolatileWrite
16806
16807         * icall.c: Add new icalls for VolatileRead/VolatileWrite
16808
16809 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16810
16811         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
16812         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
16813         2.95.3.
16814
16815         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
16816         from Peter Ross (pro@missioncriticalit.com).
16817         
16818 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
16819
16820         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
16821
16822 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16823
16824         * assembly.c (mono_assembly_load_references): Disable check because it
16825         triggers on older corlibs which lots of people have.
16826
16827 2003-11-12  Jackson Harper  <jackson@ximian.com>
16828
16829         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
16830         load corlib.dll if mscorlib.dll is not found.
16831         * assembly.h: Remove corlib name define.
16832         * class.c:
16833         * domain.c:
16834         * image.c: Change corlib name to mscorlib.
16835         
16836 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16837
16838         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
16839
16840 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
16841
16842         * appdomain.h: Added loader_optimization here to sync with the C#
16843         code, and add disallow_binding_redirects field.
16844
16845 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
16846
16847         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
16848
16849         * reflection.c (mono_image_build_metadata): Fix crash on modules
16850         with no types.
16851
16852         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
16853
16854         * icall.c (ves_icall_get_method_info): Return callingConvention as
16855         well.
16856
16857         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
16858         namespaces from the EXPORTEDTYPE table as well.
16859
16860         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
16861         from all modules inside the assembly.
16862         
16863 2003-11-11  Martin Baulig  <martin@ximian.com>
16864
16865         * reflection.c (mono_reflection_bind_generic_parameters): Make
16866         this work for interfaces.
16867
16868 2003-11-11  Martin Baulig  <martin@ximian.com>
16869
16870         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
16871
16872 2003-11-11  Martin Baulig  <martin@ximian.com>
16873
16874         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
16875         "MonoInflatedMethod" and "MonoInflatedCtor".
16876
16877 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
16878
16879         * reflection.c (resolution_scope_from_image): Use the assembly table
16880         from the manifest module, since other modules don't have it.
16881
16882         * debug-helpers.c (mono_type_full_name): New helper function.
16883
16884         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
16885
16886         * image.c (mono_image_load_file_for_image): New public function which
16887         is a replacement for the load_file_for_image in class.c.
16888
16889         * assembly.c (mono_assembly_load_module): A wrapper for the function
16890         above which does assembly association and reference loading too.
16891
16892         * class.c (mono_class_from_name): Call mono_assembly_load_module.
16893
16894 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16895
16896         * appdomain.c: not all of the attributes for the full assembly name
16897         are required and the order doesn't matter. Fixes bug #50787.
16898
16899 2003-11-10  Dick Porter  <dick@ximian.com>
16900
16901         * locales.c: Use platform-endian UTF16
16902
16903 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
16904
16905         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
16906         
16907 2003-11-10  Martin Baulig  <martin@ximian.com>
16908
16909         * metadata.c
16910         (mono_metadata_load_generic_params): Make this actually work.
16911
16912         * reflection.c (mono_reflection_bind_generic_parameters): If our
16913         parent is a generic instance, pass all the `types' to it, no
16914         matter whether it has the same number of type parameters or not.
16915
16916 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
16917
16918         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
16919
16920         * assembly.c (mono_assembly_load_references): Move the image<->assembly
16921         assignment code to this function so it gets called recursively for all
16922         modules.
16923
16924         * image.c (load_modules): Remove the assembly assignment since it is
16925         now done by mono_assembly_load_references.
16926         
16927         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
16928         Add 'module' argument.
16929         (mono_module_get_types): New helper function.
16930         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
16931
16932 2003-11-08  Martin Baulig  <martin@ximian.com>
16933
16934         * class.c (mono_class_inflate_generic_method): Interface method
16935         don't have a header.
16936
16937         * reflection.c (mono_image_get_methodspec_token): Take an
16938         additional `MonoGenericInst *' argument instead of reading it from
16939         the header; this is necessary to support interfaces.
16940         (mono_image_create_token): Pass the `MonoGenericInst *' from the
16941         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
16942         (inflated_method_get_object): Take an additional `MonoGenericInst *'
16943         argument.
16944
16945         * reflection.h (MonoReflectionInflatedMethod): Added
16946         `MonoGenericInst *ginst'.
16947
16948 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
16949
16950         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
16951
16952 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
16953
16954         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
16955
16956 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
16957
16958         * reflection.c 
16959         (reflection_methodbuilder_from_method_builder):
16960         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
16961         initialize a ReflectionMethodBuilder structure.
16962         (mono_image_get_methodbuilder_token):
16963         (mono_image_get_ctorbuilder_token): New functions to emit memberref
16964         tokens which point to types in another module inside the same assembly.
16965
16966         * reflection.c: Use the new helper functions.
16967         
16968         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
16969
16970         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
16971         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
16972
16973         * reflection.c (resolution_scope_from_image): Emit a moduleref if
16974         neccesary.
16975
16976         * reflection.c (mono_image_build_metadata): Emit metadata only for the
16977         current module. Emit the manifest only for the main module.
16978
16979         * reflection.c (mono_image_create_token): Add assertion when a 
16980         memberref needs to be created.
16981
16982         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
16983
16984         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
16985         larger buffer for the custom attribute blob. Fixes #50637.
16986         
16987 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16988
16989         * threadpool.c: notify listener on async processing handles after
16990         invoking the async callback. Thanks to Zoltan.
16991
16992 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
16993
16994         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
16995         avoid code duplication.
16996
16997         * reflection.h (MonoDynamicImage): New type which is currently unused,
16998         but will be used through the ref.emit code in place of 
16999         MonoDynamicAssembly.
17000
17001         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
17002         object layout.
17003
17004         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
17005         a MonoDynamicImage instead of just a MonoImage.
17006         
17007         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
17008         icalls to ModuleBuilder but keep their semantics, so they will work
17009         with moduleb->assemblyb. This will change later.
17010         
17011 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
17012
17013         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
17014         object layout.
17015
17016         * reflection.c (mono_image_build_metadata): Avoid creation of a default
17017         main module, since it is now done by the managed code.
17018
17019 2003-11-03  Martin Baulig  <martin@ximian.com>
17020
17021         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
17022         `ginst->klass' here.
17023         (method_encode_methodspec): Don't use the `ginst->generic_method's
17024         klass if it's a generic instance, use `ginst->klass' in this case.
17025
17026 2003-11-03  Martin Baulig  <martin@ximian.com>
17027
17028         * reflection.c (mono_image_get_generic_method_param_info):
17029         Removed, use mono_image_get_generic_param_info() instead.
17030         (mono_image_get_type_info): Write the GenericParam table before
17031         the Method table.  This is neccessary because in the GenericParam
17032         table, type parameters of the class (ie. '!0' etc.) must come
17033         before the ones from its generic methods (ie. '!!0' etc).
17034
17035 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
17036
17037         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
17038
17039 2003-11-02  Martin Baulig  <martin@ximian.com>
17040
17041         * reflection.c (create_generic_typespec): Take a
17042         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
17043         the generic parameters from it.
17044
17045 2003-11-02  Martin Baulig  <martin@ximian.com>
17046
17047         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
17048         instead of a `MonoClassField *' since we just need the type.
17049         (create_generic_typespec): New static function.  Creates a
17050         TypeSpec token for a generic type declaration.
17051         (mono_image_get_generic_field_token): New static function.
17052         (mono_image_create_token): If we're a FieldBuilder in a generic
17053         type declaration, call mono_image_get_generic_field_token() to get
17054         the token.
17055
17056 2003-11-02  Martin Baulig  <martin@ximian.com>
17057
17058         * reflection.h
17059         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
17060         `MonoReflectionGenericInst *declaring_type' and
17061         `MonoReflectionGenericInst *reflected_type' fields.
17062
17063         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
17064         `MonoReflectionGenericInst *declaring_type' and a
17065         `MonoReflectionGenericInst *reflected_type' argument instead of a
17066         single `MonoReflectionGenericInst *type' one.  Set
17067         `res->declaring_type' and `res->reflected_type' from them.
17068         (mono_reflection_inflate_field): Likewise.      
17069
17070 2003-11-02  Martin Baulig  <martin@ximian.com>
17071
17072         * class.c (mono_class_setup_vtable): Don't store generic methods
17073         in the vtable.  
17074
17075 2003-11-02  Martin Baulig  <martin@ximian.com>
17076
17077         * reflection.h (MonoReflectionGenericInst): Added
17078         `MonoReflectionType *declaring_type'.
17079
17080         * reflection.c (mono_reflection_bind_generic_parameters): Use
17081         `if (tb->parent)' instead of `klass->parent'.
17082
17083 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
17084
17085         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
17086         with an empty ASSEMBLY table.
17087
17088         * reflection.c (mono_image_build_metadata): Avoid using the same loop
17089         variable in the inner and outer loops.
17090
17091 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
17092
17093         * metadata.h (mono_metadata_make_token): Put parentheses around macro
17094         argument.
17095
17096         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
17097         
17098         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
17099         icalls. Instead, do everything in managed code. This is needed since
17100         it is hard to restore the original domain etc. in unmanaged code in the
17101         presence of undeniable exceptions.
17102
17103         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
17104         New icalls to push and pop appdomain refs.
17105
17106 2003-10-31  Martin Baulig  <martin@ximian.com>
17107
17108         * class.c (inflate_generic_type): Renamed to
17109         mono_class_inflate_generic_type() and made it public.
17110
17111         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
17112         New interncall.
17113
17114         * loader.c (mono_field_from_memberref): Also set the retklass for
17115         typespecs.
17116
17117         * fielder.c (mono_image_get_inflated_field_token): New static
17118         method; creates a metadata token for an inflated field.
17119         (mono_image_create_token, fixup_method): Added support for
17120         "MonoInflatedField".
17121         (fieldbuilder_to_mono_class_field): New static function.
17122         (mono_reflection_inflate_field): New public function.
17123
17124         * reflection.h
17125         (MonoReflectionGenericInst): Added `MonoArray *fields'.
17126         (MonoReflectionInflatedField): New typedef.     
17127
17128 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
17129
17130         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
17131         for Solaris and other platforms without s6_addr16
17132
17133 2003-10-30  Martin Baulig  <martin@ximian.com>
17134
17135         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
17136         argument instead of two.
17137         (mono_class_inflate_generic_signature): Likewise.
17138         (inflate_generic_header): Likewise.
17139         (mono_class_inflate_generic_method): Likewise.  In addition, if
17140         `ginst->klass' is set, it becomes the new `method->klass'.
17141
17142         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
17143         field.
17144
17145         * reflection.c (encode_generic_method_sig): Write a 0xa as the
17146         first byte. [FIXME]
17147         (method_encode_methodspec): If we have generic parameters, create
17148         a MethodSpec instead of a MethodRef.
17149         (fixup_method): Added support for "MonoInflatedMethod" and
17150         "MonoInflatedCtor".
17151         (mono_image_create_token): Added support for "MonoInflatedMethod"
17152         and "MonoInflatedCtor".
17153         (inflated_method_get_object): New static function; returns a
17154         managed "System.Reflection.MonoInflatedMethod" object.
17155         (mono_reflection_bind_generic_method_parameters): Return a
17156         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
17157         (mono_reflection_inflate_method_or_ctor): Likewise.
17158         (mono_image_get_generic_method_param_info): Initialize unused
17159         fields to zero.
17160         (mono_image_get_generic_param_info): Likewise.
17161
17162         * reflection.h (MonoReflectionInflatedMethod): New public
17163         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
17164         "S.R.MonoInflatedCtor" classes.
17165
17166         * loader.c (method_from_memberref): If we're a TypeSpec and it
17167         resolves to a generic instance, inflate the method.
17168
17169 2003-10-28  Dick Porter  <dick@ximian.com>
17170
17171         * object.c (mono_runtime_run_main): Convert command-line arguments
17172         into utf8, falling back to the user's locale encoding to do so.
17173
17174 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
17175
17176         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
17177         at this time.
17178
17179         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
17180
17181         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
17182         up icalls at method definition time. Partially fixes #33569.
17183
17184 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
17185
17186         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
17187         marshalling of arrays. Fixes #50116.
17188
17189         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
17190
17191         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
17192         points to a vtable in the dying appdomain.
17193
17194         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
17195         listeners into unmanaged code inside the lock.
17196
17197         * object.c (mono_class_vtable): Turn off typed allocation in non-root
17198         domains and add some comments.
17199
17200 2003-10-25  Martin Baulig  <martin@ximian.com>
17201
17202         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
17203
17204         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
17205
17206         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
17207         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
17208         currently parsing.  Create the generic class and store it in
17209         `generic_inst->klass' before parsing the type arguments.  This is
17210         required to support "recursive" definitions; see mcs/tests/gen-23.cs
17211         for an example.
17212         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
17213         to support recursive typespec entries.
17214
17215         * class.c (mono_class_setup_parent): If our parent is a generic
17216         instance, we may get called before it has its name set.
17217         (mono_class_from_generic): Splitted into
17218         mono_class_create_from_generic() and mono_class_initialize_generic().
17219
17220 2003-10-25  Martin Baulig  <martin@ximian.com>
17221
17222         * icall.c (ves_icall_Type_BindGenericParameters): Return a
17223         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
17224         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
17225         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
17226
17227         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
17228         (create_typespec): Likewise.
17229         (mono_reflection_bind_generic_parameters): Return a
17230         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
17231         (mono_reflection_inflate_method_or_ctor): New public function.
17232
17233         * reflection.h (MonoReflectionGenericInst): New typedef.        
17234
17235 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
17236
17237         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
17238         inside the domain lock. Fixes #49993.
17239         
17240         * object.c (mono_class_vtable): When typed allocation is used, 
17241         allocate vtables in the GC heap instead of in the mempool, since the
17242         vtables contain GC descriptors which are used by the collector even
17243         after the domain owning the mempool is unloaded.
17244
17245         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
17246
17247         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
17248         reflect what it does. Also invalidate mempools instead of freeing
17249         them if a define is set.
17250
17251         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
17252         of the appdomain.
17253         
17254         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
17255         hold the finalizable objects in this domain.
17256
17257         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
17258         appdomain.
17259
17260         * appdomain.c (mono_domain_set): New function to set the current
17261         appdomain, but only if it is not being unloaded.
17262
17263         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
17264         appdomain which is being unloaded.
17265         
17266         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
17267         unloading of the root appdomain.
17268
17269         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
17270         icall to execute a method in another appdomain. Intended as a 
17271         replacement for InternalSetDomain, which can confuse the code 
17272         generation in the JIT.
17273
17274         * appdomain.c (mono_domain_is_unloading): New function to determine
17275         whenever an appdomain is unloading.
17276
17277         * appdomain.c (mono_domain_unload): New function to correctly unload
17278         an appdomain.
17279
17280         * assembly.c (mono_assembly_load_references): Check that an assembly
17281         does not references itself.
17282
17283         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
17284         domain manually, it asks the finalizer thread to do it, then waits for
17285         the result. Also added a timeout.
17286
17287         * icall.c: Register the new icalls.
17288
17289         * threads.h threads.c: Export the mono_gc_stop_world and 
17290         mono_gc_start_world functions.
17291         
17292         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
17293         function to fill out the mempool with 0x2a.
17294
17295 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
17296
17297         * reflection.h (MonoReflectionMethodAux): New structure to store
17298         information which is rarely used, thus is not in the MonoMethod
17299         structure.
17300
17301         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
17302         store the aux info.
17303
17304         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
17305         and marshalling info into the aux structure.
17306
17307         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
17308         from the aux structure.
17309
17310         * loader.c (mono_method_get_param_names): Retrieve the param names from
17311         the aux structure.
17312         
17313 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
17314
17315         * exception.h exception.c: Add AppDomainUnloadedException && fix 
17316         warning.
17317
17318 2003-10-21  Dick Porter  <dick@ximian.com>
17319
17320         * socket-io.c
17321         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
17322         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
17323
17324 2003-10-21  Martin Baulig  <martin@ximian.com>
17325
17326         * reflection.c (mono_reflection_bind_generic_parameters):
17327         `klass->parent' is NULL for interfaces.
17328
17329 2003-10-21  Martin Baulig  <martin@ximian.com>
17330
17331         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17332
17333 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
17334
17335         * exception.c (mono_exception_from_name_msg): New helper function for
17336         creating exceptions and initializing their message field.
17337
17338         * exception.c: Simplify functions using the new helper.
17339
17340         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
17341         New function.
17342
17343         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
17344         mono_raise_exception, since otherwise gcc doesn't generate the function
17345         epilog for raise_exception, confusing the stack unwinding in the JIT.
17346         Fixes #45043.
17347
17348         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
17349         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
17350         Fixes #49499.
17351
17352 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17353
17354         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
17355         utf8.
17356
17357 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
17358
17359         * icall.c: Removed GetUninitializedObject method because
17360           AllocateUninitializedClassInstance does the same.
17361
17362 2003-10-18  Martin Baulig  <martin@ximian.com>
17363
17364         * class.c (inflate_generic_signature): Renamed to
17365         mono_class_inflate_generic_signature() and made it public.
17366         (my_mono_class_from_generic_parameter): New static function; if we
17367         don't already have the generic parameter's MonoClass, create a
17368         very simple one which is just used internally in the runtime and
17369         not passed back to managed code.
17370
17371         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
17372
17373         * metadata.h (MonoMethodSignature): Moved the
17374         `MonoGenericParam *gen_params' to the MonoMethodHeader.
17375         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
17376
17377         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
17378         ves_icall_MonoMethod_GetGenericArguments(); this is now an
17379         interncall on the MonoMethod class, not on MethodInfo.
17380         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
17381         calling mono_reflection_bind_generic_method_parameters() directly.
17382
17383         * loader.c (mono_method_get_signature): If this is a MethodSpec;
17384         return the already computed `method->signature'.
17385         (method_from_methodspec): New static function to load a method
17386         from a MethodSpec entry.
17387         (mono_get_method_from_token): Call the new method_from_methodspec()
17388         for MethodSpec tokens.  
17389         (mono_get_method_from_token): If we're a generic method, load the
17390         type parameters.
17391
17392         * reflection.c (mono_image_get_memberref_token): Allow
17393         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
17394         table.
17395         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
17396         (mono_image_create_token): First check whether it's a generic
17397         method (so we'd need to create a MethodSpec), then do the other
17398         two alternatives.
17399         (mono_reflection_bind_generic_method_parameters): Return a
17400         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
17401         called directly from the interncall.
17402
17403 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
17404
17405         * reflection.c (load_public_key): Move loading of the public key
17406         into managed code.
17407
17408         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
17409
17410         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
17411         fields.
17412
17413         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
17414         culture, hash_alg and public_key. Fixes #49555.
17415
17416 2003-10-17  Martin Baulig  <martin@ximian.com>
17417
17418         * class.h (MonoGenericInst): Moved this declaration here and added
17419         `MonoMethod *generic_method'.
17420
17421         * icall.c
17422         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
17423         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
17424
17425         * metadata.c (mono_metadata_type_equal): Two types of
17426         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
17427         index; ie. don't compare the address of the `MonoGenericParam'
17428         structure.
17429         (mono_metadata_load_generic_params): Removed the `MonoMethod
17430         *method' argument.
17431
17432         * metadata.h (MonoGenericInst): Moved declaration to class.h.
17433         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
17434
17435         * reflection.c (method_encode_signature): Encode the number of
17436         generic parameters.
17437         (encode_generic_method_sig): New static function.
17438         (method_encode_methodspec): New static function; creates an entry
17439         in the MethodSpec table for a generic method.
17440         (mono_image_get_methodspec_token): New static function.
17441         (mono_image_create_token): Call mono_image_get_methodspec_token()
17442         for generic methods.
17443         (mono_reflection_bind_generic_method_parameters): New public
17444         function.  Instantiates a generic method.
17445
17446 2003-10-16  Martin Baulig  <martin@ximian.com>
17447
17448         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
17449         *gen_params' here from MonoMethodHeader.
17450
17451         * metadata.c (mono_metadata_parse_method_signature): If we have
17452         generic parameters, initialize `method->gen_params' and then set
17453         the correct `type->data.generic_param' in all the parameters.
17454
17455 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
17456
17457         * threads.c (mono_threads_get_default_stacksize): New function to 
17458         return the default stacksize.
17459
17460         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
17461         termination of the finalizer thread, since the previous method had
17462         race conditions. Fixes #49628.
17463
17464         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
17465         as for the other managed threads.
17466
17467 2003-10-16  Martin Baulig  <martin@ximian.com>
17468
17469         * class.c (inflate_generic_signature): Copy `generic_param_count'
17470         and `gen_params'.
17471
17472         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
17473         New interncall.
17474
17475         * metadata.c (mono_metadata_parse_method_signature): Actually set
17476         the `method->generic_param_count' here.
17477         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
17478
17479 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
17480
17481         * object.h: Add a new field to TypedRef to simplify the implementation
17482         of the REFANY opcodes in the JIT.
17483
17484         * icall.c: Make use of the new field.
17485
17486         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
17487         dynamically.
17488
17489 2003-10-15  Martin Baulig  <martin@ximian.com>
17490
17491         * class.c (mono_class_from_gen_param): Renamed to
17492         mono_class_from_generic_parameter() and moved most of the
17493         functionality from mono_reflection_define_generic_parameter()
17494         here; ie. we create a "real" class here.
17495         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
17496         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
17497         previously been called.
17498
17499         * class.h (MonoGenericParam): Moved the declaration of this struct
17500         here from metadata.h and added `MonoMethod *method'.
17501
17502         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
17503         interncall.
17504
17505         * loader.c (mono_get_method_from_token): If we have any generic
17506         parameters, call mono_metadata_load_generic_params() to read them
17507         from the MONO_TABLE_GENERICPAR.
17508
17509         * metadata.c (mono_metadata_load_generic_params): Added
17510         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
17511
17512         * metadata.h (MonoMethodSignature): Replaced
17513         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
17514         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
17515
17516         * reflection.c (mono_reflection_define_generic_parameter): Moved
17517         most of the functionality into the new
17518         mono_class_from_generic_parameter(); set the `method' field if
17519         we're a method parameter.       
17520
17521 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
17522
17523         * marshal.c (emit_struct_conv): if native size is 0
17524         emit no code.
17525
17526 2003-10-14  Martin Baulig  <martin@ximian.com>
17527
17528         * icall.c: The generics API has changed in the spec since it was
17529         added to System.Type; these modifications make it match the spec
17530         again.
17531         (ves_icall_Type_GetGenericParameters): Renamed to
17532         `ves_icall_Type_GetGenericArguments'.
17533         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
17534         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
17535         `ves_icall_MonoType_get_HasGenericArguments'.
17536         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
17537         `ves_icall_MonoType_get_IsGenericParameter'.
17538         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
17539         this is no interncall anymore.
17540         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
17541         `ves_icall_TypeBuilder_get_IsGenericParameter'.
17542
17543 2003-10-14  Martin Baulig  <martin@ximian.com>
17544
17545         * reflection.c (mono_reflection_bind_generic_parameters): Also
17546         inflate generic methods if we're reading the class from IL.
17547
17548 2003-10-13  Martin Baulig  <martin@ximian.com>
17549
17550         * reflection.c (mono_reflection_define_generic_parameter): This
17551         method isn't called directly from the icall anymore; take a
17552         `MonoReflectionAssemblyBuilder *' so we can use this for type and
17553         method generic parameters.
17554         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
17555         (method_builder_encode_signature): Encode generic parameters.
17556         (mono_image_get_method_info): Write generic params to the
17557         MONO_TABLE_GENERICPARAM table.
17558
17559         * reflection.h (MonoReflectionMethodBuilder): Added
17560         `MonoArray *generic_params'.
17561
17562         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
17563
17564         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
17565         wrapper for mono_reflection_define_generic_parameter().
17566         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
17567
17568 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
17569
17570         * marshal.h: Add missing function to fix build.
17571
17572         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
17573         the SetLastError pinvoke attribute.
17574
17575         * marshal.c (mono_marshal_set_last_error): New helper function called
17576         by the generated code.
17577         
17578         * marshal.c (mono_mb_emit_branch): New helper function.
17579
17580         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
17581
17582         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
17583         classes as parameters and return values of delegates. Fixes #29256. 
17584
17585 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
17586
17587         * locales.c: use gint32 in non HAVE_ICU case
17588
17589 2003-10-11  Martin Baulig  <martin@ximian.com>
17590
17591         * mono-debug.c (mono_debug_add_method): Added a workaround for
17592         bug #48591.
17593
17594 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
17595
17596         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
17597         delegates passed to native code must use the STDCALL calling 
17598         convention. Fixes #35987.
17599
17600 2003-10-10  Martin Baulig  <martin@ximian.com>
17601
17602         * class.c (inflate_generic_type): If we're inflating for a generic
17603         type instance (and not for a generic method), return
17604         MONO_TYPE_MVAR unchanged.
17605
17606 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17607
17608         * string-icalls.c: Join ignores null strings in the source array.
17609         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
17610         * threads.c: GetAvailableTheads is slightly more accurate.
17611
17612 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
17613
17614         * threads.h threads.c : add mono_threads_set_default_stacksize
17615         and pass default to CreateThread calls.
17616
17617 2003-10-09  Dick Porter  <dick@ximian.com>
17618
17619         * icall.c:
17620         * locales.h:
17621         * locales.c: Internal calls for constructing CultureInfo and
17622         related objects from libicu (if its available.)
17623
17624 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
17625
17626         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
17627
17628 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17629
17630         * threadpool.c: added an argument to async_invoke_thread that is the
17631         item to process, pass the MonoAsyncResult to the thread start function
17632         when creating a new thread. This way we don't need to acquire any lock
17633         when we're creating a new thread. Readded a semaphore for faster
17634         response times (instead of that Sleep i added).
17635
17636 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
17637
17638         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17639         get daylight change dates better on Windows, fix handling
17640         of platforms without tm_gmtoff.
17641
17642 2003-10-06  Martin Baulig  <martin@ximian.com>
17643
17644         * class.c (inflate_generic_method): Renamed to
17645         mono_class_inflate_generic_method() and made public.
17646         (mono_class_init): Don't inflate the generic methods here.
17647         (mono_class_from_generic): Added `gboolean inflate_methods'
17648         argument.  Inflate the methods here.
17649
17650         * loader.c (mono_method_get_param_names): Ignore instances of
17651         generic types for the moment.
17652
17653         * reflection.c (fixup_method): Added support for inflated methods.
17654         (mono_image_create_token): Use mono_image_get_methodref_token()
17655         for inflated methods.
17656         (mono_custom_attrs_from_param): Ignore instances of generic types
17657         for the moment.
17658         (mono_reflection_bind_generic_parameters): New public function.
17659         Moved all the functionality from
17660         ves_icall_Type_BindGenericParameters() here and added support for
17661         dynamic types.
17662         (mono_reflection_define_generic_parameter): Initialize
17663         `klass->methods' here.
17664
17665         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
17666         functionality into mono_reflection_define_generic_parameter().
17667         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
17668         TypeBuilder, return that TypeBuilder.
17669
17670 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17671
17672         * appdomain.c: removed mono_delegate_semaphore.
17673
17674         * threadpool.c:
17675         (mono_thread_pool_add): moved hash table creation inside and the thread 
17676         creation outside of the critical region.
17677         (mono_thread_pool_finish): removed obsolete code.
17678         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
17679         continue or exit the thread depending on the queue.
17680
17681 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
17682
17683         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
17684         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
17685         handle more bool marshalling options
17686
17687 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
17688
17689         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
17690         arrays of structs. Also add a more descriptive error message when
17691         a structure member is marshalled as LPArray.
17692
17693 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
17694
17695         * marshal.c (mono_marshal_get_native_wrapper): Add support for
17696         marshalling arrays of complex types. Fixes #29098. Also remove an
17697         usused and incomplete function.
17698
17699 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
17700
17701         * gc.c: report heap_size - free_bytes as total memory allocated
17702         (bug#49362).
17703
17704 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
17705
17706         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
17707         fix timezone handling problems on Windows.
17708         
17709         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
17710         asserts when the year is outside the range handled by ms the functions.
17711
17712         * class.c (setup_interface_offsets): If the class is an interface,
17713         fill out its interface_offsets slot.
17714
17715 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17716
17717         * threadpool.c: mark threadpool threads as background.
17718
17719 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
17720
17721         * decimal.c - define DECINLINE to nothing if not using GCC
17722
17723 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
17724
17725         * assembly.c: More refcount fixes.
17726
17727 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17728
17729         * string-icalls.c: if we're not trimming, return the same string.
17730         When not splitting, don't create a new string.
17731
17732 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17733
17734         * image.c:
17735         (mono_image_open): increment the ref_count inside the critical section.
17736
17737 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
17738
17739         * image.c (mono_image_open): Fix reference counting bug.
17740
17741 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
17742
17743         * marshal.c (mono_marshal_type_size) struct alignment changed for 
17744         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
17745         64bits. Avoid leak in mono_marshal_get_native_wrapper when
17746         mono_lookup_pinvoke_call throws.        
17747
17748 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
17749
17750         * reflection.c (mono_reflection_parse_type): Fix #49114.
17751
17752         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
17753         temporary workaround for cygwin header problem.
17754
17755         * object.c (mono_object_isinst): Synchronize this with the code
17756         generated by the JIT for casts.
17757
17758 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
17759
17760         * reflection.c (encode_type): Fix #38332.
17761
17762 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
17763
17764         * marshal.c (mono_marshal_method_from_wrapper): New function to return
17765         the original method from the wrapper method.
17766
17767 2003-09-25  Martin Baulig  <martin@ximian.com>
17768
17769         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
17770         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
17771         (ves_icall_Type_get_IsGenericInstance): New interncall.
17772
17773 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
17774
17775         * object.c: fix cast warning in big endian code.
17776
17777 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
17778
17779         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
17780         
17781 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17782
17783         * assembly.c: don't call check_env from mono_assembly_load. It's
17784         already done once in mono_assemblies_init and may cause headaches when
17785         multiple threads are loading assemblies.
17786
17787 2003-09-19  Martin Baulig  <martin@ximian.com>
17788
17789         * reflection.c (mono_reflection_define_generic_parameter): Don't
17790         allocate `klass->methods', set `klass->flags' to
17791         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
17792
17793 2003-09-18  Martin Baulig  <martin@ximian.com>
17794
17795         * class.c (mono_class_init): Don't create `class->methods' if it's
17796         already initialized.
17797
17798         * metadata.c (mono_metadata_load_generic_params): Make this
17799         actually work.
17800
17801         * reflection.c (mono_reflection_define_generic_parameter): Set
17802         parent class and interfaces from the constraints.
17803
17804         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
17805         to keep this struct in sync with the declaration in TypeBuilder.cs.
17806
17807 2003-09-17  Martin Baulig  <martin@ximian.com>
17808
17809         * metadata.h (MonoType): Replaced the data's `int type_param'
17810         field with `MonoGenericParam *generic_param'.
17811         (MonoGenericParam): Added `MonoClass *klass'.
17812
17813         * class.c (mono_class_from_gen_param): Removed the
17814         `MonoImage *image' and `int type_num' arguments.
17815
17816         * metadata.c (mono_metadata_parse_generic_param): New static
17817         method; creates a MonoGenericParam which just contains the index.
17818         (do_mono_metadata_parse_type): Call
17819         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
17820         MONO_TYPE_MVAR.
17821
17822         * reflection.c (mono_image_typedef_or_ref): Generic type
17823         parameters may be in the same assembly, but never use a typedef
17824         for them.
17825         (mono_reflection_define_generic_parameter): We're now creating a
17826         "real" class for the type parameter; it's now safe to call
17827         mono_class_from_mono_type() on the class'es type, it'll do the
17828         right thing.
17829
17830 2003-09-16  Martin Baulig  <martin@ximian.com>
17831
17832         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
17833         `symfile->range_entry_size' and `symfile->class_entry_size' here;
17834         the `symfile' data structure must be fully initialized before it
17835         gets added to the table.
17836
17837 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
17838
17839         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
17840
17841         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
17842         class init trampolines.
17843
17844 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
17845
17846         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
17847         to the built-in profiler to turn off time and allocation profiling
17848         respectively.
17849
17850 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
17851
17852         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
17853         g_direct_equal.
17854
17855         * debug-helpers.c (mono_method_full_name): Print the wrapper type
17856         in human readable form.
17857
17858 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
17859
17860         * reflection.c icall.c: Fixed warnings.
17861
17862         * image.c (load_class_names): Use a temporary hash table to hold the
17863         namespaces in order to avoid doing many string comparisons.
17864
17865         * image.h: Fix typo.
17866
17867         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
17868         Pass NULL instead of g_direct_equal to the GHashTable constructor 
17869         since the NULL case is short-circuited inside g_hash_table_lookup, 
17870         leading to better performance.  
17871
17872         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
17873         obtain the first custom attribute for a given index. Depends on the
17874         CustomAttribute table being sorted by the parent field.
17875
17876         * reflection.c (mono_custom_attrs_from_index): Use the new function 
17877         for better performance.
17878
17879 2003-09-07  Martin Baulig  <martin@ximian.com>
17880
17881         * class.c (mono_class_init): If we're a generic instance, inflate
17882         all our methods instead of loading them from the image.
17883         (mono_class_from_generic): Set `class->methods = gklass->methods'.
17884
17885 2003-09-07  Martin Baulig  <martin@ximian.com>
17886
17887         * mono-debug-debugger.c: Added support for constructors.
17888
17889 2003-09-06  Martin Baulig  <martin@ximian.com>
17890
17891         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
17892         New interncall.
17893
17894         * reflection.c (mono_reflection_setup_generic_class): Call
17895         ensure_runtime_vtable() to create the vtable.
17896
17897 2003-09-05  Martin Baulig  <martin@ximian.com>
17898
17899         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
17900         MONO_TYPE_MVAR.
17901
17902 2003-09-04  Martin Baulig  <martin@ximian.com>
17903
17904         * reflection.c (mono_reflection_define_generic_parameter): Generic
17905         parameters start with zero.
17906
17907 2003-09-04  Martin Baulig  <martin@ximian.com>
17908
17909         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17910
17911         * reflection.h (MonoReflectionGenericParam): New typedef.
17912         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
17913         the generic parameters from the managed TypeBuilder.
17914
17915         * reflection.c (mono_reflection_define_generic_parameter): New function.
17916         (mono_reflection_create_runtime_class): Encode generic parameters.
17917         (mono_reflection_setup_generic_class): New function; this is
17918         called after adding adding all generic params to the TypeBuilder.
17919         (encode_type): Added MONO_TYPE_VAR.
17920
17921 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17922
17923         * class.h class.c (mono_class_needs_cctor_run): Moved this method
17924         here from the JIT.
17925
17926         * assembly.h assembly.c: Moved the AOT loading code into an assembly
17927         load hook.
17928
17929 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
17930
17931         * reflection.h reflection.c class.h class.c: Delete duplicate 
17932         definition of mono_type_get_name () from reflection.c and export the
17933         one in class.c.
17934
17935         * class.c: Class loading fixes from Bernie Solomon 
17936         (bernard@ugsolutions.com).
17937
17938         * reflection.c: Endianness fixes from Bernie Solomon 
17939         (bernard@ugsolutions.com).
17940         
17941 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
17942
17943         * assembly.h assembly.c: Define a file format version for AOT
17944         libraries.
17945         
17946         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
17947
17948         * appdomain.h (MonoJitInfo): New field to determine whenever the
17949         code is domain neutral.
17950         
17951 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
17952
17953         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
17954
17955 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
17956
17957         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
17958         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
17959         Avoid caching the result since strings must be domain specific. Fixes
17960         #48050.
17961
17962 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
17963
17964         * marshal.c (mono_marshal_init): Make this callable multiple times
17965         since it is hard to find a correct place to call it.
17966
17967         * object.c (mono_runtime_class_init): Execute static constructors in
17968         the correct appdomain.
17969
17970         * image.c (build_guid_table): Handle the case when multiple images have
17971         the same GUID.
17972
17973 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17974
17975         * icall.c: added a couple of icalls for System.Web.
17976
17977 2003-08-28  Martin Baulig  <martin@ximian.com>
17978
17979         * icall.c (ves_icall_Type_BindGenericParameters): Use
17980         `klass->generic_inst' instead of `&klass->byval_arg' in the
17981         mono_type_get_object() call.  The returned type must be
17982         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
17983
17984 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
17985
17986         * NOTES: New file.
17987
17988         * object.c (mono_class_proxy_vtable): Make it thread safe.
17989
17990         * pedump.c: Fix warning.
17991
17992         * object.c appdomain.h: Get rid of metadata_section. 
17993         It is no longer needed and it was causing deadlocks with domain->lock.
17994
17995         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
17996
17997 2003-08-26  Martin Baulig  <martin@ximian.com>
17998
17999         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
18000
18001 2003-08-26  Martin Baulig  <martin@ximian.com>
18002
18003         * pedump.c (main): Call mono_metadata_init(),
18004         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
18005         and mono_loader_init().
18006
18007 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
18008
18009         * loader.h: Add missing include to fix build.
18010
18011         * image.h: mono_image_load_references is no more.
18012
18013         * assembly.c: Reworked assembly loading to make it really thread safe.
18014         After these changes, the assembly returned by mono_assembly_open is
18015         fully initialized, i.e. all its references assemblies are loaded.
18016
18017         * assembly.c (mono_image_load_references): Renamed to 
18018         mono_assembly_load_references, and made private, since clients no
18019         longer need to call it.
18020
18021         * class.c: Removed calls to mono_assembly_load_references, since it was
18022         a source of deadlocks.
18023
18024         * loader.h loader.c class.h class.c: Protect data structures using a 
18025         new lock, the loader lock.
18026
18027         * class.c (mono_class_setup_vtable): Create temporary hash tables and
18028         GPtrArrays only when needed.
18029
18030         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
18031         into empty structures by mcs. Fixes pinvoke7.cs.
18032         
18033         * domain.c (mono_init): Call a new initialization function.
18034
18035         * appdomain.c (mono_runtime_init): Call the new initializer function
18036         of the marshal module.
18037
18038         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
18039         inserted into empty structures by mcs. Fixes pinvoke7.cs.
18040
18041         * marshal.h marshal.c: Added locks around the wrapper caches to make
18042         this module thread safe.
18043
18044         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
18045         this argument. Fixes pinvoke1.exe.
18046
18047 2003-08-25  Lluis Sanchez <lluis@ximian.com>
18048
18049         * object.h: Added call_type field to MonoMethodMessage and the corresponding
18050         enumeration of values. Removed fields to store remote call output values in
18051         MonoAsyncResult. Not needed any more.
18052         * object.c: Initialize call_type and async_result fields in mono_message_init.
18053         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
18054         dispatching the message.
18055         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
18056         async call to finish. To do it use a message with EndInvoke call type.
18057
18058 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
18059
18060         * loader.h loader.c (mono_method_hash_marhal_info): New function which
18061         determines whenever a method has marshalling info.
18062
18063 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18064
18065         * assembly.c: fix the build on windows.
18066
18067 2003-08-22 Lluis Sanchez <lluis@ximian.com>
18068
18069         * object.cs: Fixed bug #47785.
18070
18071 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
18072
18073         * string-icalls.c (StringReplace): If their are no occurances of
18074         the old string found return a reference to the supplied
18075         string. This saves some memory and matches MS behavoir.
18076         
18077 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18078
18079         * socket-io.c: fixed compilation for systems that define AF_INET6
18080         and don't define SOL_IP/SOL_IPV6.
18081
18082 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
18083
18084         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
18085         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
18086
18087         * rawbuffer.c rawbuffer.h: Make this module thread safe.
18088
18089         * domain.c: Make this module thread safe.
18090
18091         * domain.c (mono_init): Call new initialization function.
18092
18093         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
18094         reference types too. Fixes #38812.
18095
18096         * image.c (mono_image_init): Fixed warnings.
18097
18098         * class.c (mono_class_from_typeref): Handle assembly load failure
18099         correctly.
18100
18101         * appdomain.c (add_assemblies_to_domain): Handle the case when
18102         the references of an assembly are not yet loaded.
18103
18104         * metadata.c image.c assembly.c: Moved initialization of global
18105         variables to a separate function called at startup since lazy 
18106         initialization of these variables is not thread safe.
18107         
18108         * image.c assembly.c: Made this module thread safe by adding locks in 
18109         the appropriate places.
18110
18111         * domain.c (mono_init): Call the new initialization functions of the
18112         three modules.
18113
18114 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
18115
18116         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
18117           make a direct call. It is proxy's work to make the call asynchronous.
18118           mono_delegate_end_invoke(): If the targe is a proxy, just collect
18119           the return values.
18120         * object.cs: mono_method_call_message_new(): read AsyncResult and
18121           state object from parameters list, if this info is requested.
18122         * object.h: Added fields to store remote call output values in
18123           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
18124
18125 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18126
18127         * object.h: add needed fields to MonoThread.
18128         * threads.c, threads.h: allow registering a function to cleanup data
18129         allocated per thread by the JIT.
18130
18131 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18132
18133         * loader.h: portability fix by Bernie Solomon
18134         * <bernard@ugsolutions.com>.
18135
18136 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
18137
18138         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
18139         return a MonoArray. This simplifies the code and also ensures that
18140         the cache allways contains an object reference as a value.
18141
18142         * icall.c (ves_icall_get_parameter_info): Simplified using the new
18143         function.
18144
18145 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18146
18147         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
18148         fixes a problem with byte ordering when getting the address family for
18149         a socket.
18150
18151 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
18152
18153         * .cvsignore: Added monosn.
18154
18155         * reflection.h reflection.c loader.c: Added support for parameter
18156         marshalling to dynamically created types. Fixes #47295.
18157
18158 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18159
18160         * rand.c: remove useless warnings.
18161
18162 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18163
18164         * class.c: implemented ldtoken for methods and fieldrefs.
18165
18166 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18167
18168         * threadpool.c: when mono_async_invoke was called, no one took care of
18169         monitoring the queue. So if the method invoked took some time and we
18170         got new async invoke requests after 500 ms (the thread created waited
18171         that long in WaitForSingleObject), the new async invoke was not called
18172         until the previous one finished.
18173
18174         This is fixed now. Thanks to Totte for helping with it.
18175
18176 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18177
18178         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
18179
18180 2003-08-11  Martin Baulig  <martin@ximian.com>
18181
18182         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
18183
18184 2003-08-06  Martin Baulig  <martin@ximian.com>
18185
18186         * mono-debug-debugger.c: Added support for static fields,
18187         properties and methods.
18188
18189 2003-08-06  Martin Baulig  <martin@ximian.com>
18190
18191         * mono-debug-debugger.c: Don't store the MonoString's vtable to
18192         make this work for applications with multiple application domains.
18193
18194 2003-08-04  Martin Baulig  <martin@ximian.com>
18195
18196         * mono-debug-debugger.c: Completely reworked the type support; the
18197         most important thing is that we're now just using one single
18198         `MonoType' instance per type.
18199
18200 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
18201
18202         * mono-endian.h, mono-endian.c, icall.c: Added icall
18203         ves_icall_System_Double_AssertEndianity to assert double word endianity
18204         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
18205
18206 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18207
18208         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
18209         support, icalls and fixes.
18210
18211 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
18212
18213         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
18214         classes that are a punctuation character in .NET is not the same a
18215         g_unichar_ispunct.
18216
18217 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18218
18219         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
18220
18221 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
18222
18223         * icall.c: Add new MemCopy internalcall.
18224         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
18225         Simplified code; It is not necessary to handle all the cases here,
18226         as the C# code takes care of it.  Only handle the case of the name
18227         resource embedded into the assembly.
18228
18229         Changed signature to return the data pointer and the size of the
18230         data. 
18231
18232 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
18233
18234         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
18235         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
18236
18237 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
18238
18239         * socket-io.c: ignore EINTR error in select.
18240
18241 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18242
18243         * class.h, class.c: removed unused subclasses field in MonoClass.
18244
18245 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
18246
18247         * icall.c: improve fix of get_base_definition(). If the parent class
18248           doesn't have the mehod, look at the parent of the parent.
18249         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
18250           to check if a parameter is an in or out parameter
18251           (PARAM_ATTRIBUTE_IN is not set by default).
18252           mono_method_return_message_restore(): Use mono_class_value_size to
18253           get the size of a value type. mono_type_stack_size (parameterType)
18254           does not return the correct value if parameterType is byRef.
18255           mono_load_remote_field(), mono_load_remote_field_new(),
18256           mono_store_remote_field(), mono_store_remote_field_new():
18257           raise exception if the remote call returns an exception.
18258
18259 2003-07-28  Martin Baulig  <martin@ximian.com>
18260
18261         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
18262         method.  This is a wrapper around mono_runtime_invoke() which
18263         boxes the instance object if neccessary.
18264
18265 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18266
18267         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
18268         metadata.h, row-indexes.h, verify.c: first cut of generics support.
18269
18270 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18271
18272         * icall.c: disable mcs bug workaround.
18273
18274 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
18275
18276         * object.c (mono_runtime_class_init): Take the metadata_section
18277         mutex before obtaining the domain mutex.
18278
18279         * appdomain.h: Added definition of metadata_section mutex here. 
18280
18281         * object.c: define metadata_mutex here.
18282
18283 2003-07-24  Ravi Pratap  <ravi@ximian.com>
18284
18285         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
18286         fixed.
18287
18288 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
18289
18290         * reflection.c: Fix bug #46669
18291
18292 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18293
18294         * exception.c:
18295         * exception.h:
18296         * icall.c:
18297         * object.h: fill in the type name for TypeLoadException.
18298
18299 2003-07-23  Ravi Pratap  <ravi@ximian.com>
18300
18301         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
18302         relationship between TypeBuilders while compiling corlib) and bug
18303         45993 (Array types returned from the runtime while compiling
18304         corlib were from the loaded corlib).
18305
18306 2003-07-22  Martin Baulig  <martin@ximian.com>
18307
18308         * mono-debug-debugger.c: Reworked the type support a bit more;
18309         distinguish between types and classes.
18310
18311 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
18312
18313         * icall.c: add IsArrayImpl icall.
18314
18315 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
18316
18317         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
18318         initializing real_size only once. Also fix bug #46602.
18319
18320 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
18321
18322         * object.c: Renamed mono_metadata_section to metadata_section.
18323
18324 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
18325
18326         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
18327           empty array if the type is an array. Fixed.
18328           ves_icall_MonoMethod_get_base_definition: if the base method
18329           is abstract, get the MethodInfo from the list of methods of
18330           the class.
18331         * reflection.c: ParameterInfo.PositionImpl should be zero-based
18332           and it was 1-based. Fixed in mono_param_get_objects.
18333
18334 2003-07-20  Martin Baulig  <martin@ximian.com>
18335
18336         * mono-debug.h: Set version number to 31.
18337         (mono_debug_init): Added `MonoDomain *' argument.
18338
18339         * mono-debug-debugger.c: Reworked the type support; explicitly
18340         tell the debugger about builtin types; pass the `klass' address to
18341         the debugger.
18342
18343 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
18344
18345         * image.c: Allow new metadata tables to be loaded without a
18346         warning. Also update the warning message to give the new constant value.
18347                 
18348 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18349
18350         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
18351         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
18352         array type representation changes.
18353
18354 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18355
18356         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
18357         on Environment.Exit () call.
18358
18359 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18360
18361         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
18362         requires a matching corlib.
18363
18364 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
18365
18366         * Changelog: My editor decided to add a CR to each line. Sorry about that.
18367           Committed again without the CRs.
18368         
18369 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
18370
18371         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
18372           getting it from the "this" socket instance. Did not work
18373           if the socket is a subclass of Socket.
18374           Also fixed bug #35371.
18375
18376 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18377
18378         * metadata.c: fixed size for TypedByRef.
18379         * loader.c: when searching for a method, consider the vararg amrker.
18380         * unicode.c, decimal.c: constify some arrays.
18381
18382 2003-07-15  Dick Porter  <dick@ximian.com>
18383
18384         * socket-io.c: Fixed compilation for gcc < 3.2.
18385
18386         Fixed compilation for machines that don't have AF_INET6 (thanks to
18387         Bernie Solomon <bernard@ugsolutions.com> for that part.)
18388
18389         Fixed compile warnings.
18390         
18391         Fixed formatting and line endings.
18392
18393 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
18394
18395         * socket-io.h:
18396         * socket-io.c: Added IPv6 support.
18397
18398 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
18399
18400         * class.c (mono_class_is_assignable_from): New function to implement
18401         the is_assignable_from logic. Used by mono_object_isinst, 
18402         Type::IsAssignableFrom () and the interpreter.
18403
18404         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
18405         Object, even interfaces.
18406         
18407         * object.c (mono_object_isinst): Implement in terms of 
18408         is_assignable_from.
18409
18410         * icall.c (ves_icall_type_is_assignable_from): New icall.
18411
18412 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
18413
18414         * domain.c (foreach_domain): fix compiler warning.
18415
18416 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
18417
18418         * image.c (load_metadata_ptrs): use g_strndup because strndup is
18419         not available on all plattforms
18420
18421 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
18422
18423         * image.h image.c: Store the metadata version string in MonoImage.
18424         * icall.c: New icall to retrieve the image version.
18425         * reflection.c (create_dynamic_image): Fill in the image version field
18426         * reflection.c (build_compressed_metadata): Use the image version
18427         from the image structure.
18428
18429 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18430
18431         * appdomain.c: modified comment.
18432         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
18433         That will be its last iteration when mono_gc_cleanup is called from
18434         mono_runtime_cleanup and before the domain is unloaded.
18435
18436         Fixes bug #45962.
18437
18438 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
18439
18440         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
18441         attributes.
18442
18443 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18444
18445         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
18446         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
18447         Bernie Solomon <bernard@ugsolutions.com>.
18448
18449 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18450
18451         * object.c, object.h: provide mono_object_new_fast() for faster
18452         allocation in some special cases.
18453
18454 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18455
18456         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
18457         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
18458
18459 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18460
18461         * threadpool.c: fix leaks.
18462
18463 2003-07-01  Dick Porter  <dick@ximian.com>
18464
18465         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
18466         using MonoGHashTables.  Fixes threadpool bug posted to list.
18467
18468 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
18469
18470         * image.h, image.c: added support to load an assembly from a byte array.
18471         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
18472         assembly bundle support.
18473
18474 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
18475
18476         * threadpool.c (mono_thread_pool_add): keep a reference to the
18477         AsyncResult to prevent GC
18478
18479 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18480
18481         * class.c: leak fix.
18482
18483 2003-06-25  Dick Porter  <dick@ximian.com>
18484
18485         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
18486         for the async object, the WaitHandle object will close the handle.
18487         Fixes bug 45321.
18488
18489 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18490
18491         * class.c: in mono_array_class_get (), lookup from the hash with the
18492         same type we insert: this works around a bug in
18493         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
18494         lluis. The real fix will have to wait for after the release.
18495
18496 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18497
18498         * icall.c: fix memory leak when getting type members.
18499
18500 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18501
18502         * reflection.c: added more pubtoken special cases.
18503
18504 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18505
18506         * class.c: handle field offset correctly when class size
18507         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
18508
18509 2003-06-20  Martin Baulig  <martin@ximian.com>
18510
18511         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
18512         *image' field.
18513
18514 2003-06-20  Martin Baulig  <martin@ximian.com>
18515
18516         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
18517
18518 2003-06-20  Martin Baulig  <martin@ximian.com>
18519
18520         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
18521         just distinguish between variables in registers and variables at
18522         an offset relative to a register.
18523
18524 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18525
18526         * icall.c: #ifdef out latest changes until mcs is fixed.
18527
18528 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18529
18530         * icall.c: return members in metadata order.
18531
18532 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18533
18534         * icall.c: avoid infinite loop in GetTimeZoneData.
18535
18536 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18537
18538         * icall.c: added Marshal.Prelink/All icalls.
18539
18540 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18541
18542         * object.c, object.h: fix warnings and do some overflow checking
18543         when creating arrays.
18544
18545 2003-06-17  Dick Porter  <dick@ximian.com>
18546
18547         * file-io.h:
18548         * file-io.c: File attributes need to be tweaked slightly when
18549         passed from the managed to the w32 world.
18550
18551 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18552         * profiler.h profiler-private.h profiler.c: Rework last patch
18553         based on suggestion by Paolo.
18554         
18555 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18556
18557         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
18558         instruction level coverage data collection.
18559         * profiler.h profiler.c (: Added new callback function which can be
18560         used by the profiler to limit which functions should have coverage
18561         instrumentation.
18562         * profiler.c (mono_profiler_load): Call g_module_build_path to
18563         generate the file name of the profiler library.
18564
18565 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18566
18567         * profiler.c, profiler.h, profiler-private.h: added basic block 
18568         coverage profiling API.
18569
18570 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
18571
18572         * reflection.c (mono_reflection_create_runtime_class): Add support
18573         for events in dynamically generated code.
18574
18575         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
18576         not allocated.
18577
18578 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18579
18580         * icall.c: when getting timezone info, return reasonable values if we
18581         can't get the actual data.
18582
18583 2003-06-14  Dick Porter  <dick@ximian.com>
18584
18585         * threads.c (start_wrapper): Remove the reference to the thread
18586         object in the TLS data, so the thread object can be finalized.
18587         This won't be reached if the thread threw an uncaught exception,
18588         so those thread handles will stay referenced :-( (This is due to
18589         missing support for scanning thread-specific data in the Boehm GC
18590         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
18591
18592 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
18593
18594         * reflection.c: ensure streams and tables are first allocated with
18595         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
18596
18597 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18598
18599         * icall.c: fixed GetElementType for byrefs (bug# 44792).
18600
18601 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
18602
18603         * reflection.c (mono_reflection_create_runtime_class): Add support for
18604         properties to dynamically created classes.
18605         * reflection.c: Fix a few places where non-MonoObjects were inserted
18606         into the tokens hashtable.
18607
18608 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18609
18610         * object.c: some support to handle out of memory exceptions.
18611
18612 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
18613
18614         * marshal.c (mono_marshal_get_native_wrapper): support reference
18615         return types
18616
18617 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18618
18619         * object.h, object.c: more portability stuff from Bernie Solomon.
18620         Unexport mono_object_allocate(). Added mono_object_unbox ().
18621         Set exitcode when an unhandled exception is thrown.
18622
18623 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
18624
18625         * marshal.c (mono_marshal_get_native_wrapper): use custom
18626         marshaler for return types.
18627
18628 2003-06-10  Dick Porter  <dick@ximian.com>
18629
18630         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
18631         ip_mreq is available
18632
18633 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18634
18635         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
18636         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
18637         by Bernie Solomon <bernard@ugsolutions.com>.
18638
18639 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
18640
18641         * gc.c (mono_gc_init): Avoid error message on shutdown when
18642         GC_DONT_GC=1 is used.
18643
18644         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
18645         New icall to return the GUID of a module.
18646
18647 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18648
18649         * class.c: ensure instance size always includes the parent's size
18650         even whem class size is set explicitly (fixes bug#44294).
18651
18652 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18653
18654         * profiler.h, profiler.c: made the simple profiler thread-safe,
18655         get more accurate timing info. Allow the loading of an
18656         externally-developed profiler module.
18657
18658 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
18659
18660         * marshal.c (mono_marshal_get_native_wrapper): improved
18661         class/byref arguments.
18662         (mono_marshal_get_native_wrapper): better string marshaling support.
18663
18664 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18665
18666         * class.c: ensure .pack and .size are handled correctly and
18667         simplified layout of static fields.
18668
18669 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18670
18671         * appdomain.c
18672         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
18673
18674         * loader.c (mono_lookup_pinvoke_call): look for modules in the
18675         current directory (fix bug 44008)
18676
18677 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
18678
18679         * marshal.c (mono_marshal_get_native_wrapper): started support for
18680         custom marshalers.
18681         (mono_delegate_to_ftnptr): consider marshalling specifications
18682
18683 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18684
18685         * reflection.c, reflection.h: emit custom marshal info.
18686
18687 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18688
18689         * object.c: free the GError.
18690         * icall.c: added CloseEvent_internal.
18691         * threads.[ch]:
18692         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
18693         call.
18694
18695 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
18696
18697         * loader.c (mono_method_get_signature): Add support for dynamic
18698         assemblies.
18699
18700 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18701
18702         * reflection.c: fixed bug #43905.
18703
18704 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18705
18706         * class.c, domain.c, icall.c, metadata.h, object.h: support for
18707         handling TypedReference and ArgIterator.
18708         * loader.c, loader.h: added function to get signature at call site.
18709
18710 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18711
18712         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
18713         data readonly. Buglets and warning fixes. Some MethodSpec support.
18714
18715 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18716
18717         * class.h, class.c, object.c: remove relative numbering support.
18718
18719 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
18720
18721         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
18722         free the string, until we get a chance to fix Gtk#
18723
18724 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18725
18726         * marshal.c: revert last patch.
18727
18728 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18729
18730         * icall.c: updates for new mono_class_vtable() not calling
18731         the type constructor anymore.
18732
18733 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18734
18735         * object.h, object.c: separate vtable creation from type
18736         initialization. Make running the .cctor thread safe.
18737
18738 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
18739
18740         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
18741
18742 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
18743
18744         * loader.c (mono_get_method): consider calling convention
18745
18746 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
18747
18748         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
18749         to return the invisible global type for a module.
18750
18751         * reflection.c (mono_image_build_metadata): Emit global fields too.
18752
18753 2003-05-20  Peter Williams  <peterw@ximian.com>
18754
18755         * loader.c (mono_lookup_internal_call): Add a few newlines.
18756
18757 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
18758
18759         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
18760         literal strings.
18761
18762         * appdomain.c (set_domain_search_path): Recalculate search path when
18763         AppDomainSetup.PrivateBinPath changes.
18764
18765         * object.c (mono_class_compute_gc_descriptor): It turns out some
18766         parts of the class libs (like System.Thread) holds pointers to
18767         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
18768         to treat native int a pointer type here.
18769         
18770 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
18771
18772         * appdomain.h, domain.c: add hashtable for jump target resolution.
18773
18774 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
18775
18776         * reflection.h reflection.c icall.c: Added new icalls 
18777         GetManifestResourceInfoInternal, GetModulesInternal and support
18778         infrastructure.
18779
18780 2003-05-16  Dick Porter  <dick@ximian.com>
18781
18782         * icall.c:
18783         * file-io.h:
18784         * file-io.c: Implement System.IO.MonoIO::GetTempPath
18785
18786 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
18787
18788         * object.c: mono_store_remote_field: little fix to previous patch.
18789
18790 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18791
18792         * class.c: add constructors to array classes.
18793         * icall.c: special case array construction for InternalInvoke (),
18794
18795 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
18796
18797         * class.h class.c reflection.c object.c: Added support for field
18798         defaults in dynamically generated classes.
18799
18800 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18801
18802         * reflection.c: properly encode charset for ddlimport.
18803
18804 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18805
18806         * threads.c: allow compiling without GC.
18807
18808 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18809
18810         * appdomain.h, object.c, object.h, threads.c, threads.h: added
18811         handling of thread static data.
18812
18813 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18814
18815         * reflection.h, reflection.c: added mono_custom_attrs_free ().
18816
18817 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
18818
18819         * class.c (mono_array_class_get): always set the serializable flags
18820         (mono_array_class_get): always set the SEALED attribute for array types
18821
18822 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
18823
18824         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
18825         attributes (fix for bug 42021).
18826
18827 2003-05-12  Dick Porter  <dick@ximian.com>
18828
18829         * gc.c: Don't run finalizers when the finalizer thread is
18830         finishing up, because the default domain has already been
18831         destroyed.
18832
18833 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
18834
18835         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
18836         value is null, we should throw an exception.   This is slightly
18837         different than the other conventions used for the constructor.
18838
18839 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18840
18841         * socket-io.c: fixed windows build.
18842
18843 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18844
18845         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
18846
18847 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
18848
18849         * object.c (mono_string_new_wrapper): Compatibility fix for MS
18850         compilers.
18851
18852 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
18853
18854         * class.c (mono_class_layout_fields): Add experimental GC aware
18855         auto layout facility. Requires class library changes to work correctly.
18856
18857         (mono_class_setup_vtable): Avoid overriding explicit interface
18858         method implementations. Fixes iface3.exe test.
18859
18860         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
18861         object reference.
18862         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
18863         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
18864
18865         * metadata.h: Add new type classification macro which determines
18866         whenever the type holds an object reference.
18867
18868 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
18869
18870         * marshal.c (mono_marshal_get_native_wrapper): cleanups
18871
18872 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
18873
18874         * gc.c (finalizer_thread): Work around a GC bug.
18875
18876 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
18877
18878         * marshal.c (emit_struct_conv): allow unions
18879
18880         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
18881
18882 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
18883
18884         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
18885
18886 2003-05-06  Martin Baulig  <martin@ximian.com>
18887
18888         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
18889
18890 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18891
18892         * socket-io.c:
18893         (Select_internal): allow NULLs, don't create arrays if not needed.
18894         Coupled with Socket.cs changes.
18895
18896         * threadpool.c:
18897         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
18898         register a finalizer for it that will close the semaphore handle. This
18899         fixes the leak and make Lupus' test run with > 4080 loops.
18900
18901 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
18902
18903         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
18904         Jerome Laban (bug #42287)
18905
18906 2003-05-02  Martin Baulig  <martin@ximian.com>
18907
18908         * debug-mono-symfile.h
18909         (MonoSymbolFile): Moved declaration into mono-debug.h.
18910         (MonoDebugMethodJitInfo): Likewise.
18911         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
18912         argument.
18913         (_mono_debug_address_from_il_offset): Take a
18914         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
18915
18916         * mono-debug.h
18917         (MonoDebugDomainData): New struct.
18918         (mono_debug_get_domain_data): New function.
18919         (mono_debug_add_method): Take an additional `MonoDomain *'
18920         argument.
18921         (mono_debug_source_location_from_address): Likewise.
18922         (mono_debug_il_offset_from_address): Likewise.
18923         (mono_debug_address_from_il_offset): Likewise.
18924
18925 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
18926
18927         * reflection.c: one more check for null type in custom attrs.
18928
18929 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18930
18931         * reflection.c: avoid warning (comparison is always false due to limited
18932         range of data type).
18933
18934 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18935
18936         * icall.c: throw an exception in Type.GetField if the argument 'name'
18937         is NULL.
18938
18939 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
18940
18941         * reflection.c: fixed handling of enums in named arguments to custom
18942         attributes (bug #42123).
18943
18944 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18945
18946         * reflection.c: use the right array element type and handle
18947         a null for a Type argument, too.
18948
18949 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
18950
18951         * reflection.c: handle arrays as arguments to custom attributes.
18952
18953 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18954
18955         * reflection.c: handle a string value in a custom attr
18956         ctor that takes an object.
18957
18958 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
18959
18960         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
18961         (fix bug #42063)
18962
18963 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
18964
18965         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
18966
18967 2003-04-27  Martin Baulig  <martin@ximian.com>
18968
18969         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
18970         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
18971         MONO_DEBUGGER_EVENT_BREAKPOINT.
18972         (mono_breakpoint_trampoline_code): Removed.
18973         (mono_debugger_event_handler): The last argument is now a
18974         `guint32'.
18975         (mono_debugger_insert_breakpoint_full): Removed the
18976         `use_trampoline' argument.
18977         (mono_debugger_method_has_breakpoint): Likewise.
18978         (mono_debugger_trampoline_breakpoint_callback): Renamed to
18979         mono_debugger_breakpoint_callback(); take the method and
18980         breakpoint number as arguments.
18981
18982 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18983
18984         * metadata.c: fix off by one when loading parameters attributes.
18985
18986 2003-04-24  Martin Baulig  <martin@ximian.com>
18987
18988         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
18989
18990 2003-04-24  Martin Baulig  <martin@ximian.com>
18991
18992         * mono-debug-debugger.c: Moved all code which interacts with the
18993         Mono Debugger here.
18994
18995         * debug-mono-symfile.c: This code now just deals with the symbol
18996         file itself, the debugger code is now in mono-debug-debugger.c.
18997
18998 2003-04-23  Martin Baulig  <martin@ximian.com>
18999
19000         * mono-debug.c (mono_debug_source_location_from_il_offset):
19001         New method; like mono_debug_source_location_from_address(), but
19002         takes an IL offset instead of a machine address.
19003
19004 2003-04-23  Martin Baulig  <martin@ximian.com>
19005
19006         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
19007         `line' field; this is now computed by the debugger.
19008
19009 2003-04-23  Martin Baulig  <martin@ximian.com>
19010
19011         * mono-debug.[ch]: New files.  This is the new debugging interface.
19012
19013         * mono-debug-debugger.[ch]: New files.  Moved all code which
19014         interacts with the Mono Debugger here.
19015
19016 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
19017
19018         * domain.c (mono_init): initialize mono_defaults.monitor_class
19019
19020 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
19021
19022         * reflection.c (method_encode_code): Add a spicy exception to help
19023         future compiler authors.
19024
19025 2003-04-21  Martin Baulig  <martin@ximian.com>
19026
19027         * icall.c
19028         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19029         Make this work with relative pathnames; g_filename_to_uri() needs
19030         an absolute filename.
19031
19032 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
19033
19034         * icall.c: Track name changes in Object and ValueType.
19035
19036 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
19037
19038         * metadata.c (mono_type_stack_size): size should be a multiple of
19039         sizeof (gpointer)
19040
19041 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19042
19043         * gc.c:
19044         (internal_domain_finalize): moved into mono_domain_finalize. No need
19045         to create another thread because the finalizers will be run in the
19046         finalizer thread.
19047         
19048         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
19049         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
19050         to be run (MS does this too).
19051
19052 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
19053
19054         * object.c (mono_class_compute_gc_descriptor): Update comment.
19055
19056         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
19057
19058         * image.h: Add synchronized wrapper cache.
19059
19060         * image.c (do_mono_image_open): Initialize cache.
19061
19062         * reflection.c (create_dynamic_mono_image): Initialize cache.
19063
19064 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19065
19066         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
19067         ves_icall_System_Buffer_ByteLengthInternal.
19068
19069 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
19070
19071         * reflection.c: setup klass->nested_in earlier. Allow
19072         a dash in the assembly name.
19073
19074 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
19075
19076         * metadata.c (mono_type_to_unmanaged): dont access
19077         type->data.klass for MONO_TYPE_OBJECT
19078         (mono_type_to_unmanaged): consider System.Delegate class
19079
19080 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
19081
19082         * class.c: just setup supertypes in the proper place instead of
19083         initializing the full element class for arrays.
19084
19085 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
19086
19087         * class.c: ensure the element class of arrays is initialized.
19088         Setup the supertype info for array classes, too.
19089
19090 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
19091
19092         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
19093
19094 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19095
19096         * Makefile.am: re-added -m option when running cygpath. This way,
19097         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
19098         separator.
19099         * mono-config.c: same codepath for locating mono config file for WIN32
19100         and the rest.
19101         * assembly.c: if mono_assembly_setrootdir is called, don't override
19102         the value set.
19103
19104 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19105
19106         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
19107         MONO_ASSEMBLIES variable.
19108
19109 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
19110
19111         * icall.c: added Assembly::GetNamespaces() icall.
19112
19113 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19114
19115         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
19116
19117 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
19118
19119         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
19120         * object.c: fixed bug in the construction of vtable for proxies
19121
19122 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
19123
19124         * object.c (mono_array_new): Mark mono_array_new as an icall.
19125
19126 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19127
19128         * class.c: fixed test for public method when overriding interfaces.
19129         Closes bug #40970.
19130
19131 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19132
19133         * appdomain.h, domain.c: added mono_domain_foreach() to
19134         be able to access the currently loaded appdomains.
19135         * object.c: make string interning work across sppdomains.
19136         Mark some functions for use as icalls.
19137
19138 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
19139
19140         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
19141
19142         * reflection.h reflection.c: Allocate long living data using 
19143         GC_MALLOC_ATOMIC so the collector does not need to scan it.
19144
19145         * reflection.c: Double the allocation size in streams instead of
19146         increasing it, to prevent unneccesary copying on large assemblies.
19147         
19148         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
19149         creation if the assembly does not have the Run flag set.
19150
19151 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19152
19153         * class.h: avoid the C++ keywords in header files (Jerome Laban
19154         spotted and fixed this).
19155
19156 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19157
19158         * object.c:
19159         (mono_unhandled_exception): fill in the arguments for the
19160         UnhandledException event. Only trigger that event for the default
19161         domain (as MS does).
19162
19163 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
19164
19165         * object.c: Improve typed allocation stuff based on suggestions from
19166         Paolo. Also turn it on if the GC library supports it.
19167
19168 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
19169
19170         * object.c object.h class.h: Added experimental typed allocation
19171         facility using the interfaces in gc_gcj.h.
19172
19173         * os/gc_wrapper.h: Added new include files.
19174         
19175 2003-04-03  Martin Baulig  <martin@ximian.com>
19176
19177         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
19178         which is not yet enabled by default.
19179
19180         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
19181         functions.
19182         (mono_gc_lock, mono_gc_unlock): New static functions.
19183
19184         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
19185         functions; stop/start the world for the garbage collector.  This
19186         is using the windows API; we need to complete the SuspendThread()/
19187         ResumeThread() implementation in the io-layer to make this work on Unix.
19188         (mono_gc_push_all_stacks): New public function; tells the garbage
19189         collector about the stack pointers from all managed threads.
19190
19191 2003-04-03  Martin Baulig  <martin@ximian.com>
19192
19193         * object.h (MonoThread): Added `gpointer stack_ptr'.
19194
19195         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
19196
19197 2003-04-03  Martin Baulig  <martin@ximian.com>
19198
19199         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
19200
19201 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
19202
19203         * reflection.c (typebuilder_setup_fields): Initialize field.first and
19204         field.last.
19205
19206 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
19207
19208         * loader.c (mono_lookup_internal_call): Report the corlib that is
19209         out of sync.
19210
19211 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
19212
19213         * icall.c (ves_icall_type_GetTypeCode): fixed check for
19214         System.DBNull (it's class not valuetype).
19215
19216 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19217
19218         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
19219         if the array method was already assigned a token (fixes bug#40646).
19220
19221 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
19222
19223         * reflection.c (mono_reflection_get_type): Attempt type resolve even
19224         if no assembly is given.
19225
19226 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
19227
19228         * metadata.h: Added the new tables.
19229
19230         * row-indexes.h: Added definitions for new tables.
19231
19232         * metadata.c: Add schemas for new tables, and add support for
19233         computing the sizes of them.
19234
19235         * class.c: Update for handling the new type cases.
19236
19237 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
19238
19239         * metadata.h (MONO_TYPE_IS_VOID): new macro
19240
19241 2003-03-31  Martin Baulig  <martin@ximian.com>
19242
19243         * threads.h (MonoThreadCallbacks): Added `thread_created'.
19244
19245         * threads.c (mono_thread_new_init): Call `thread_created' in the
19246         mono_thread_callbacks.
19247
19248 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
19249
19250         * loader.h: added marshalbyrefobject_class to mono_defaults
19251         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
19252         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
19253           generation of output parameters.
19254           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
19255         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
19256           contextbound and the target object belongs to the context of the caller.
19257         * object.h: added context and unwrapped_server variables in MonoRealProxy.
19258         * object.c: Implemented support for interfaces and abstract classes
19259           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
19260           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
19261
19262 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
19263
19264         * class.h class.c (mono_class_is_subclass_of): New function.
19265         
19266         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
19267         routines for most common case (calls from ArrayList::ToArray).
19268
19269         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
19270         routine so programs which call Environment::Exit() can be profiled.
19271
19272         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
19273         Added MONO_ARCH_SAVE_REGS.
19274
19275         * icall.c (ves_icall_type_is_subtype_of): Use new function.
19276
19277 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
19278
19279         * blob.h: Add a couple of new MonoType types definitions.
19280
19281         * tabledefs.h: Add a couple of new call convs.
19282
19283 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
19284
19285         * reflection.h (MonoReflectionDynamicAssembly): track changes in
19286         the layout of the class.
19287
19288         * reflection.c (alloc_table): double the size on overflow to avoid
19289         unnecessary copying.
19290
19291         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
19292         avoid filling out metadata tables and blobs. Also set mb->ilgen to
19293         null so it can be garbage collected.
19294         
19295 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
19296
19297         * reflection.c (mono_reflection_get_type): Return the resolved type
19298         only if it is in the assembly we searched.
19299
19300         * reflection.c (ensure_runtime_vtable): Initialize method slots.
19301
19302         * class.c (mono_class_setup_vtable): Set the slot of the overriding
19303         method.
19304
19305 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19306
19307         * appdomain.c:
19308         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
19309         the right one is 'file:///blah', but MS allows it.
19310         * assembly.c:
19311         (mono_assembly_open): allow 'file://blah'
19312
19313         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
19314
19315 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
19316
19317         * socket-io.c: fixes bug #40310.
19318
19319 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
19320
19321         * reflection.c (mono_reflection_parse_type): handle deeply nested
19322         types correctly.
19323
19324         * reflection.c (mono_image_create_token): Use unique token values
19325         since they will be put into a hash table.
19326
19327         * class.c (mono_class_setup_vtable): If a method occurs in more than
19328         one place in the vtable, and it gets overriden, then change the
19329         other occurances too.
19330
19331         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
19332         object as return type.
19333
19334 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
19335
19336         * icall.c: Deleted "ToString" implementation for double and float
19337         because they are full implemented in managed code.
19338
19339 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19340
19341         * reflection.c, reflection.h: implemented and exported functions
19342         to retrieve info about custom attributes.
19343
19344 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19345
19346         * appdomain.c: moved Uri handling to assembly.c
19347         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
19348         work when using a file Uri in *nix and windows.
19349
19350         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
19351         GetReferencedAssemblies.
19352
19353 2003-03-18  Dick Porter  <dick@ximian.com>
19354
19355         * icall.c: Rename a couple of internal calls
19356
19357         * threads.c: Set the thread state to Stopped when a thread exits.
19358         Fixes bug 39377.
19359
19360 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
19361
19362         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
19363         New icall.
19364
19365         * object.c (mono_class_vtable): fix warning.
19366
19367 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
19368
19369         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
19370
19371         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
19372         memory.
19373         (method_encode_clauses): Create exception info structures in the right
19374         order.
19375         (mono_reflection_setup_internal_class): Initialize supertypes field.
19376
19377         * class.c object.c: Handle interfaces which implement other interfaces 
19378         correctly.
19379
19380         * class.h class.c: Move the supertypes array initialization code into 
19381         a separate function so it can be used for dynamic types too. Also call
19382         it earlier, in mono_class_init(), since it can be used before the
19383         type is initialized.
19384
19385 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19386
19387         * Makefile.am:
19388         * assembly.c:
19389         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
19390
19391         * appdomain.c:
19392         * appdomain.h:
19393         * marshal.c:
19394         * object.c: remove warnings.
19395
19396 2003-03-13  Martin Baulig  <martin@ximian.com>
19397
19398         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
19399         (MonoDebugLexicalBlockEntry): New types.
19400
19401         * debug-mono-symfile.c
19402         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
19403
19404 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19405
19406         * process.c: ret can be any non-zero value accroding to MS doc.
19407
19408 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
19409
19410         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
19411         fixing a warning for a miss-used prototype, would have cause
19412         random memory corruption.
19413
19414 2003-03-07  Martin Baulig  <martin@ximian.com>
19415
19416         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
19417         getting really annoying ....
19418
19419 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
19420
19421         * reflection.c (fixup_method): added support for array methods.
19422
19423 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19424
19425         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
19426         (pointed out by Michael Adams).
19427
19428 2003-03-04  Dick Porter  <dick@ximian.com>
19429
19430         * icall.c: Temporarily reverted the Double and Single ToString()
19431         change, because it broke nunit.
19432
19433 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
19434
19435         * object.h, threads.h: make include files compatible with C++
19436         (patch by Jerome Laban <jlaban@wanadoo.fr>).
19437
19438 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
19439
19440         * icall.c: Erased ToString helper functions for Double and Single.
19441         Now, that implementations ar all in managed code (Double and Single
19442         Formatters).
19443
19444 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
19445
19446         * appdomain.c: Added method for initializing the default context of
19447         a domain. Added internal call for getting the default context.
19448         * appdomain.h: Added context variable in MonoDomain struct.
19449         * domain.c: mono_domain_set also sets the default context of the domain
19450         * icall.c: Mapped internal method InternalGetDefaultContext.
19451         * object.c: mono_object_get_virtual_method returns always a remoting
19452         wrapper if the object is a transparent proxy.
19453         mono_runtime_invoke_array: when creating an object by calling the
19454         constructor, if the created object is a proxy, then the constructor should
19455         be called using the a remoting wrapper.
19456
19457 2003-03-03  Dick Porter  <dick@ximian.com>
19458
19459         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
19460         variable so it compiles on solaris.  Problem spotted by
19461         Christopher Taylor <ct@cs.clemson.edu>
19462
19463 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19464
19465         * appdomain.c:
19466         (get_info_from_assembly_name): don't leak value.
19467
19468         * icall.c:
19469         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
19470         result.
19471
19472 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
19473
19474         * assembly.c: export mono_image_load_references ().
19475         * class.c: handle function pointers. mono_class_from_name() now
19476         supports nested type names directly.
19477
19478 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
19479
19480         * reflection.h reflection.c: Encode already created dynamic methods 
19481         and fields correctly as a DEF instead of a REF.
19482
19483         * reflection.c: Get rid of the force_ref argument to 
19484         mono_image_typedef_or_ref since it was wrong in the first place.
19485
19486         * string-icalls.c: add error checking to string constructors according
19487         to the MSDN docs.
19488
19489         * reflection.c: Emit types in the order their TypeBuilders were 
19490         created. Previously, a new table index was assigned to each type before
19491         the tables were emitted. This was wrong because the signature blob
19492         might already refer to a type by its original table index.
19493
19494 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
19495
19496         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
19497         change.
19498         
19499 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19500
19501         * Makefile.am: make assemblies dir have \ instead of / on windows.
19502
19503 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
19504
19505         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
19506         iterate over the NESTEDCLASS table using a linear search since the
19507         table is not guaranteed to be sorted by the secondary key.
19508
19509         * class.c (mono_class_create_from_typedef): fixed up call to
19510         mono_metadata_nesting_typedef.
19511         
19512 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
19513
19514         * marshal.c (mono_string_to_byvalstr): clear the memory as
19515         suggested by Jerome Laban <jlaban@wanadoo.fr>
19516
19517 2003-02-26  Dick Porter  <dick@ximian.com>
19518
19519         * process.c: Cope with padding in .rsrc blocks
19520
19521 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
19522
19523         * metadata.h: reverted the filter_len change, it breaks reflection
19524         
19525 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
19526
19527         * metadata.h: added a new field to store the filter_len
19528         
19529
19530 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19531
19532         * reflection.c: handle custom attributes for types and members
19533         created with Reflection.Emit (bug#38422).
19534
19535 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
19536
19537         * reflection.c: define RTSpecialName automatically for constructors for
19538         compatibility with MS.NET.
19539
19540         * reflection.c (mono_reflection_create_runtime_class): initialize
19541         nested_in field of dynamically created classes.
19542
19543 2003-02-22  Martin Baulig  <martin@ximian.com>
19544
19545         * debug-mono-symfile.h: Incremented version number.
19546
19547 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
19548
19549         * object.h icall.c process.c: fix warnings.
19550
19551 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
19552
19553         * appdomain.h appdomain.c:
19554         (mono_domain_try_type_resolve): split the 
19555         name_or_tb argument into a name and a tb argument.
19556         (mono_domain_has_type_resolve): new function to check whenever the
19557         application has registered a TypeResolve event handler.
19558         
19559         * icall.c reflection.h reflection.c: move the type resolve logic into
19560         mono_reflection_get_type () so it will be invoked when 
19561         Assembly::GetType () is called.
19562
19563         * reflection.c:
19564         (mono_reflection_get_type): renamed to get_type_internal.
19565         (mono_reflection_get_type): fixed type name generation so it works 
19566         for nested types too.
19567         (mono_reflection_get_type): call has_type_resolve () to avoid the 
19568         costly type name generation if there is no resolve event handler.
19569
19570 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19571
19572         * class.c, image.c: load exported types from file references.
19573
19574 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
19575
19576         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
19577           used to cache the managed methods used to create proxies and make 
19578           remote invocation of methods.
19579         * class.h: Added in MonoVTable a flag to indicate that a class needs 
19580           to be remotely created.
19581         * object.c: Modified the method mono_class_vtable(). It now initializes 
19582           the remote flag of the vtable. Modified mono_object_new_specific(), 
19583           so now it checks the remote flag.
19584         * icall.c: Added a couple of internal methods, one for enabling instance 
19585           creation interception for a type, and one for creating objects bypassing
19586           the remote check.
19587
19588 2003-02-18  Martin Baulig  <martin@ximian.com>
19589
19590         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
19591         New interncall to get a method's metadata token.
19592
19593         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
19594         New interncall for the debugger.
19595
19596 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
19597
19598         * class.c (mono_class_setup_vtable): allocate supertype array
19599
19600 2003-02-18  Martin Baulig  <martin@ximian.com>
19601
19602         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
19603
19604 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19605
19606         * reflection.c:
19607         (assembly_name_to_aname): jump over unknown properties (i've found
19608         something like: 'type, assembly, version=xxx, custom=null, public...',
19609         so now will ignore custom=null and still get the rest of the values).
19610
19611 2003-02-17  Dick Porter  <dick@ximian.com>
19612
19613         * threads.c: Have Thread.Start() wait for a semaphore to signal
19614         that the thread has set up all its local data.  This fixes bug
19615         34323, where Abort() raced the new thread's TLS data.
19616
19617         Also removes the handle_store() call from start_wrapper, because
19618         threads are now always created suspended and there is no longer a
19619         race between the parent and child threads to store the info.
19620
19621 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
19622
19623         * image.c: explain the #- heap issue in a message, hopefully
19624         avoiding FAQs on mono-list.
19625
19626 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19627
19628         * icall.c:
19629         (GetEntryAssembly): if the domain has not invoked
19630         AppDomain.ExecuteAssembly yet, return the assembly of the default
19631         AppDomain.
19632
19633 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
19634
19635         * class.c (mono_ldtoken): make it work in dynamic assemblies.
19636
19637 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
19638
19639         * metadata.c, reflection.c: simple speedup to type hash
19640         and equals code.
19641
19642 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
19643
19644         * image.c, image.h, class.c, assembly.c: move module loading
19645         to MonoImage. When loading metadata, consider alignemnet from
19646         the start of metadata, not from the metadata address in memory.
19647
19648 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
19649
19650         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
19651         AssemblyBuilder objects. Factored out custom attribute creation into
19652         a separate function.
19653         (create_custom_attr): new function to create custom attributes.
19654
19655 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
19656
19657         * Makefile.am: Got tired of typing the full pathname to pedump.
19658         Until there is another option, am installing this.
19659
19660 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
19661
19662         * class.c (class_compute_field_layout): always set field->parent 
19663         (mono_ldtoken): use mono_defaults.fieldhandle_class;
19664
19665 2003-02-11  Dick Porter  <dick@ximian.com>
19666
19667         * threads-types.h:
19668         * monitor.c: Rewrote Monitor, making lock much faster and
19669         Pulse/Wait work as specified.  Also uses much fewer handles, and only
19670         creates them as needed.
19671
19672         * exception.c: Added SynchronizationLockException
19673
19674         * threads.c: Deleted old Monitor implementation.  The new one is
19675         in a new file.
19676
19677 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19678
19679         * class.c: handled TypedReference type code. Set the correct size for
19680         class data. Setup interface_offsets for interface classes, too.
19681
19682 2003-02-09  Martin Baulig  <martin@ximian.com>
19683
19684         * debug-mono-symfile.h: Reflect latest symbol writer changes.
19685
19686 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
19687
19688         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
19689         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
19690         * object.c: fixed mono_object_get_virtual_method () for interfaces.
19691         * verify.c: check for code that runs after the end of the method.
19692
19693 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
19694
19695         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
19696         "System.Math::Round2".
19697         * sysmath.h: Added Floor, Round and Round2 definitions.
19698         * sysmath.c: Modified certain functions that were not 100% compliant
19699         with MS.NET (math precision) and added the implementation of Floor,
19700         Round and Round2.
19701
19702 2003-02-07  Martin Baulig  <martin@ximian.com>
19703
19704         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
19705
19706 2003-02-07  Martin Baulig  <martin@ximian.com>
19707
19708         * debug-mono-symfile.c: Reflected latest symwriter changes.
19709         (mono_debug_create_mono_symbol_file): Removed.
19710         (mono_debug_open_mono_symbol_file): Take an argument which
19711         specifies whether to create a dynamic symbol file.
19712
19713 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
19714
19715         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
19716
19717 2003-02-05  Martin Baulig  <martin@ximian.com>
19718
19719         * reflection.c (mono_image_build_metadata): Make this public,
19720         protect it against being called multiple times, don't create
19721         resources and don't build the compressed metadata here.
19722         (mono_image_create_pefile): Do this here.
19723
19724         * icall.c
19725         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
19726
19727 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19728
19729         * socket-io.c: fixed bug #36322.
19730
19731 2003-02-06  Piers Haken <piersh@friskit.com>
19732
19733         * appdomain.[ch]:
19734         * class.h:
19735         * debug-mono-symfile.c:
19736         * icall.c:
19737         * loader.c:
19738         * mono-config.c:
19739         * monosn.c:
19740         * reflection.c:
19741         * socket-io.c: warning cleanups
19742
19743 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
19744
19745         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
19746         function. works like remoting invoke, but does a check for the Proxy first.
19747
19748 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
19749
19750         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
19751
19752 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
19753
19754         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
19755         array of pointers.
19756         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
19757         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
19758
19759         * object.c (mono_store_remote_field_new): used by the new jit
19760         instead of mono_store_remote_field
19761         (mono_load_remote_field_new): used by the new jit
19762         instead of mono_load_remote_field
19763
19764 2003-02-05  Patrik Torstensson
19765
19766         * appdomain.c: changed unload to take the domain id instead
19767         of domain
19768         
19769         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
19770
19771
19772 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19773
19774         * appdomain.c: don't look for assemblies in ApplicationBase if
19775         PrivateBinPathProbe is set.
19776
19777 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19778
19779         * object.c: make the first argument in main_args contain the absolute
19780         path to the assembly. Fixes bug #37511.
19781
19782 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19783
19784         * icall.c: get correct UTC offset for countries not using daylight
19785         time saving. Fixes bug #30030.
19786
19787 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19788
19789         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
19790         and 1 are the family).
19791
19792 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
19793
19794         * icall.c (ves_icall_InternalExecute): removed wrong assertion
19795
19796         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
19797
19798 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
19799
19800         * reflection.c: added support for SignatureHelper tokens, which is
19801         needed by the Calli opcode.
19802
19803         * reflection.h: track changes to SignatureHelper class.
19804
19805         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
19806
19807 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19808
19809         * appdomain.c: fixed loading assemblies from PrivateBinPath.
19810
19811 2003-02-03  Patrik Torstensson
19812         * appdomain.[c|h], domain.c : 
19813          - Added support for getting a domain via domain id
19814          - Support for setting and getting domain from System.AppDomain 
19815            (used in cross appdomain channel)
19816          - Added support for get/set for a MonoAppContext on a thread 
19817            (Context class in System.Runtime.Remoting.Contexts),
19818          - Removed hack in Get/SetData and ExecuteAssembly.
19819         
19820         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
19821         the managed world to get control when a proxy is created.
19822
19823         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
19824         
19825 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
19826
19827         * icall.c
19828         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19829         Populate the codebase field as well.
19830
19831 2003-02-02  Martin Baulig  <martin@ximian.com>
19832
19833         * debug-mono-symfile.c
19834         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
19835         (mono_debug_symfile_add_method): Allow interncalls.
19836
19837 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19838
19839         * icall.c: throw parse exception if strtod fails or the string is empty.
19840
19841 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
19842
19843         * marshal.c: handle object type separately from defined
19844         class types.
19845
19846 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
19847
19848         * marshal.c: handle NATIVE_LPSTR for strings when it's
19849         explicitly specified.
19850
19851 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
19852
19853         * reflection.c, reflection.h, icall.c: setup the reflection
19854         handle cache for ModuleBuilders and AssemblyBuilders.
19855
19856 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
19857
19858         * reflection.c (reflection_methodbuilder_to_mono_method): set
19859         pinvoke flag
19860
19861 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19862
19863         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
19864
19865 2003-01-29  Dick Porter  <dick@ximian.com>
19866
19867         * threads.c: No need for the fake_thread kludge now that Thread
19868         doesn't run a class constructor
19869         
19870 2003-01-29  Dick Porter  <dick@ximian.com>
19871
19872         * threads.c: Use g_direct_hash instead of the rather bogus
19873         g_int_hash
19874
19875 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
19876
19877         * marshal.c (mono_marshal_get_native_wrapper): add check for null
19878         (fix pinvoke12.exe)
19879         (mono_marshal_get_struct_to_ptr): generate valid IL code
19880         (mono_marshal_get_ptr_to_struct): generate valid IL code
19881         (*): correctly set sig->pinvoke, we need to memdup the signature
19882         to do that
19883
19884 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19885
19886         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
19887         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
19888
19889 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
19890
19891         * profiler.c: provide more callers information.
19892
19893 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
19894
19895         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
19896
19897         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
19898
19899         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
19900
19901 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19902
19903         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
19904         exception instead of going into an infinite loop on dates which it 
19905         can't yet handle.
19906
19907         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
19908         out-of-range exception if needed.
19909
19910         * class.c (mono_class_setup_vtable): allow a virtual method to provide
19911         an implementation for an interface method and to override an inherited
19912         method at the same time. 
19913         Imagine a scenario when a virtual method is used to override a
19914         virtual abstract method in a parent class, and this same method 
19915         provides an implementation for an method inherited from an interface. 
19916         In this case, the interface resolution code will set im->slot, which 
19917         means that the virtual method override pass will skip this method 
19918         which means a pointer to the abstract method inherited from the parent
19919         will remain in the vtable of this non-abstract class.
19920
19921         * class.c: (mono_class_setup_vtable): continue search for a real 
19922         method if only an abstract method is found.     
19923
19924 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
19925
19926         * reflection.c: add size to encoding for ByValStr and ByValArray
19927         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
19928
19929 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19930
19931         * class.c (mono_class_setup_vtable): pass the override info as an
19932         argument.
19933
19934         * class.c (mono_class_setup_vtable): set the slot of overriding methods
19935         correctly.
19936         
19937         * reflection.c (ensure_runtime_vtable); add support for method 
19938         overrides.
19939         
19940 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19941
19942         * reflection.c (resolution_scope_from_image): Hack to work to work with
19943         dynamic assemblies.
19944
19945         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
19946         added a 'force_ref' argument to force this function to allways return 
19947         a TypeRef. This is needed by mono_image_get_memberref_token ().
19948         
19949 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19950
19951         * reflection.c (mono_image_get_type_info): interfaces really don't have
19952         a parent.
19953
19954         * reflection.c (mono_image_basic_init): fill out missing fields of
19955         image structure.
19956
19957         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
19958         dynamic assemblies. This is required so dynamic assemblies show up in
19959         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
19960         Type::GetType() etc. This is consistent with MS behaviour.
19961
19962         * image.c image.h reflection.c: add newly created classes to the name 
19963         cache so mono_class_get () will find them.      
19964
19965 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19966
19967         First part of changes to get IKVM.NET running under mono.
19968         
19969         * appdomain.h, appdomain.c: added new function 
19970         mono_domain_try_type_resolve() which will emit TypeResolve events. 
19971         This function will call AppDomain::DoTypeResolve to do the actual work.
19972
19973         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
19974         moved existing code dealing with dynamic tokens to a new function 
19975         called mono_reflection_lookup_dynamic_token (). This function will 
19976         raise TypeResolve events when appropriate. Since reflection.c is not 
19977         part of libmetadata, a new hook function called 
19978         mono_lookup_dynamic_token() is added to class.c which will call this.
19979
19980         * assembly.h assembly.c: make the invoke_load_hook function public,
19981         so it can be called for dynamic assemblies.
19982
19983         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
19984
19985         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
19986         type isn't found.
19987
19988         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
19989         MonoGHashTable, since it contains pointers to objects which the GC 
19990         needs to track.
19991
19992         * assembly.c (search_loaded): remove unused variable.
19993         
19994 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
19995
19996         * object.c: fixed issue exposed by gcc-generated IL programs
19997         that use RVA data for pointers.
19998
19999 2003-01-25  Martin Baulig  <martin@ximian.com>
20000
20001         * threads.c (start_wrapper): Moved the initialization of
20002         `start_func' above the mono_new_thread_init() call to which we
20003         pass it as argument.
20004
20005 2003-01-24  Martin Baulig  <martin@ximian.com>
20006
20007         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
20008         the MonoThread pointer.
20009
20010 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
20011
20012         * icall.c: Rename `PowImpl' to Pow.
20013
20014 2003-01-23  Dick Porter  <dick@ximian.com>
20015
20016         * threads.c (start_wrapper): Create a Thread object if needed, so
20017         the Main() thread can do the class initialisation in a subthread
20018         that has been set up to allow managed code execution.
20019
20020         Pass the thread ID instead of the MonoThread pointer to the thread
20021         start and attach callbacks.  This change is required, because the
20022         jit thread start callback must be called _before_ the Thread
20023         object can be created.
20024         
20025         (mono_thread_init): Removed much object creation code that is no
20026         longer needed.  No managed code is called from here now.
20027
20028         * object.c (mono_runtime_exec_managed_code): Create a subthread
20029         for Main, and call back to the runtime to use it.
20030         Set the exit code when Main exits.
20031
20032         * gc.c: Make sure domain finalisation happens in a subthread.
20033         Re-enable threaded GC, fixing bug 31333 (again).
20034
20035         * environment.c: System.Environment internall calls (so far just
20036         ExitCode is here, the others are still in icall.c)
20037
20038         * appdomain.c (mono_runtime_cleanup): All threads running managed
20039         code should have finished before mono_runtime_cleanup() is
20040         reached, so no need to clean up threads.
20041
20042 2003-01-22  Martin Baulig  <martin@ximian.com>
20043
20044         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
20045         `gpointer func' arguments.      
20046         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
20047         but added `MonoThread *thread' argument.
20048         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
20049
20050         * threads.c (mono_new_thread_init): Added `gpointer func' argument
20051         and pass it to the mono_thread_start_cb callback.
20052         (mono_install_thread_callbacks): New public function to install a
20053         set of callbacks which are set by the debugger.
20054         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
20055
20056 2003-01-22  Martin Baulig  <martin@ximian.com>
20057
20058         * Makefile.am: Install debug-mono-symfile.h.
20059
20060 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
20061
20062         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
20063
20064 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
20065
20066         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
20067         * class.c (mono_ptr_class_get): correctly set access levels of pointers
20068         (mono_array_class_get): correctly set access levels of arrays
20069
20070 2003-01-20      Patrik Torstensson
20071         * image.h (MonoAssemblyName): changed major, minor, build, revision
20072         from signed to unsigned.
20073
20074 2003-01-20  sean kasun <skasun@azstarnet.com>
20075
20076         * reflection.c (load_cattr_value): Now this handles
20077         MONO_TYPE_SZARRAY.  Fixes bug #35629
20078
20079 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
20080
20081         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
20082         integer value
20083
20084 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20085
20086         * decimal.c: fixed bug #26056.
20087
20088 2003-01-17  Martin Baulig  <martin@ximian.com>
20089
20090         * gc.c: Raise an ExecutionEngineException instead of using g_error().
20091
20092 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20093
20094         * exception.[ch]:
20095         (mono_get_exception_type_initialization): new function.
20096
20097         * object.c: throw a TypeInitializationException when an exception is
20098         thrown invoking the class constructor.
20099
20100 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20101
20102         * reflection.c: fixed attribute reading.
20103
20104 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20105
20106         * icall.c:
20107         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
20108         provided, look for the type in the calling assembly and then in
20109         mscorlib; if the assembly name is provided, only try that one.
20110
20111 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
20112
20113         * object.c: register the vtable before there is a chance it's
20114         queried again recursively.
20115
20116 2003-01-13  Duncan Mak  <duncan@ximian.com>
20117
20118         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
20119         gc-internal.h. 
20120         
20121 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
20122
20123         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
20124
20125 2003-01-11  Martin Baulig  <martin@ximian.com>
20126
20127         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
20128         this to 20 for the release.
20129
20130 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
20131
20132         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
20133
20134         * loader.c (mono_method_get_marshal_info): bug fix
20135
20136         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
20137         structures with explicit layout
20138
20139 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20140
20141         * profiler.c: made the output more readable (and sorted). 
20142         Added caller information for the allocation profiler.
20143
20144 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
20145
20146         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
20147
20148 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20149
20150         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
20151         to get value types.
20152         
20153 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
20154
20155         * object.c, profiler.h, profiler.c, profiler-private.h:
20156         Added object allocation profiler.
20157
20158 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
20159
20160         * reflection.h, reflection.c: handle global methods.
20161         Compress blob entries.
20162
20163 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
20164
20165         * marshal.c: fix compilation.
20166
20167 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
20168
20169         * loader.c (mono_method_get_marshal_info): impl.
20170
20171         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
20172
20173 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20174
20175         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
20176         for reference types.
20177
20178 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
20179
20180         * loader.c: fixed off by one error in loaded parameter names.
20181
20182 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
20183
20184         * marshal.c (mono_marshal_get_icall_wrapper): like
20185         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
20186         instead of a MonoMethod.
20187
20188 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20189
20190         * decimal.c: fixed bug #36537.
20191
20192 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
20193
20194         * marshal.c: throw a missing method exception if a
20195         P/Invoke method is not found.
20196
20197 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20198
20199         * icall.c: allow a null this for constructors.
20200
20201 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20202
20203         * icall.c: raise the proper exceptions if the arguments to the
20204         internal Invoke are incorrect.
20205
20206 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
20207
20208         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
20209
20210 2003-01-03  Martin Baulig  <martin@ximian.com>
20211
20212         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20213
20214 2002-12-31  Martin Baulig  <martin@ximian.com>
20215
20216         * debug-mono-symfile.c: Completely rewrote the type section.
20217         Instead of using individual malloc()ed fields, we use one big
20218         continuous memory area and offsets into this area.
20219         See the comments in the source code for details.
20220
20221 2002-12-30  Martin Baulig  <martin@ximian.com>
20222
20223         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
20224
20225 2002-12-30  Martin Baulig  <martin@ximian.com>
20226
20227         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
20228         line number table in this data blob instead of using an external
20229         pointer.
20230
20231 2002-12-28  Martin Baulig  <martin@ximian.com>
20232
20233         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20234
20235 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
20236
20237         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
20238         as a boxed return type.
20239
20240 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
20241
20242         * appdomain.c
20243         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
20244         g_build_filename to properly get separators on the filename created.
20245
20246         * object.h: Small change, introduce MonoMarshalByRefObject to
20247         track the layout of that structure in the C# universe as we make
20248         changes there.
20249
20250 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
20251
20252         * object.c: removed assert to allow static fields on interfaces.
20253         * loader.c: a TypeSpec may be used for any type, not just arrays.
20254
20255 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20256
20257         * class.c, class.h: added mono_class_array_element_size ().
20258         Ignore static methods in interfaces.
20259
20260 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20261
20262         * threads.c: fixed the build under cygwin.
20263
20264 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20265
20266         * reflection.c: handle nullref constants. Allocate keys for
20267         reflection handles with the GC.
20268
20269 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20270
20271         * threads.c, threads.h: added mono_thread_get_abort_signal()
20272         to get a suitable signal for thread abort.
20273
20274 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20275
20276         * metadata.c: fix handling of ExportedType table.
20277
20278 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20279
20280         * icall.c: added WriteWindowsDebugString internal call.
20281
20282 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20283
20284         * reflection.h: added fields to match C# implementation.
20285
20286 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20287
20288         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
20289
20290 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
20291
20292         * gc.h, gc-internal.h: Rename header for GC internal calls to
20293         gc-internal.h from gc.h as to not clash with Boehm GC having its
20294         header installed as <gc.h> in outside include paths.
20295         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
20296         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
20297
20298 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20299
20300         * icall.c: assign minor, build and revision in FillName.
20301
20302 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
20303
20304         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
20305         Added support for running code generated by Reflection.Emit.
20306
20307 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20308
20309         * appdomain.c: check for NULL argument in LoadFrom.
20310
20311 2002-12-10  Dick Porter  <dick@ximian.com>
20312
20313         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
20314
20315 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20316
20317         * appdomain.c: fix buglet when building exe file name.  Handle full
20318         assembly name (needed after latest changes to AssemblyName).
20319         * image.c:
20320         (mono_image_close): free some hashtables.
20321
20322 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
20323
20324         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
20325         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
20326         on some systems (redhat 7.3) 
20327
20328 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
20329
20330         * threads.c: delete the critical section of a sync block,
20331         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
20332
20333 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
20334
20335         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
20336
20337 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20338
20339         * appdomain.[ch]: handle the assembly preload event to try loading the
20340         assemblies using the paths we have in the current domain.
20341
20342         * assembly.[ch]: created an assembly preload hook that is called to try
20343         loading the assembly by other means that the ones provided here.
20344
20345         * domain.c: initialize the domain search path.
20346
20347         From now on, assemblies (TODO: except corlib and System) are loaded
20348         according to these rules when using mono_assembly_load ():
20349
20350                 1. It tries to load the assembly from the ApplicationBase
20351                 of the current domain appending .dll and .exe (TODO: have to
20352                 try loading from name/name.dll and name/name.exe).
20353
20354                 2. It tries the search path specified in PrivateBinPath for the
20355                 current domain (if any).
20356
20357                 3. Previous behavior.
20358
20359 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
20360
20361         * icall.c: implemented GetInterfaceMap() related icall.
20362         * domain.c, loader.h: load MethodInfo in mono_defaults.
20363
20364 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20365
20366         * gc.c: disable the finalizer thread for now, untill all the issues
20367         with it are resolved.
20368
20369 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20370
20371         * string-icalls.c: handle embedded nulls in string ctor when the
20372         length is specified.
20373
20374 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20375
20376         * class.c: look for explicit interface implementation in parent
20377         classes, too.
20378
20379 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
20380
20381         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
20382
20383 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20384
20385         * gc.c: protect handles with a critical section.
20386
20387 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20388
20389         * icall.c:
20390         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
20391         parameters. If no assembly specified, try getting the type from all
20392         the assemblies in the current domain, else, load the assembly and get
20393         the type from it.
20394
20395 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20396
20397         * marshal.c: applied patch from Aleksey Demakov that fixes
20398         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
20399
20400 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20401
20402         * icall.c: fixed get_location.
20403
20404 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
20405
20406         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
20407         declarations to make it work with older gcc. 
20408
20409         * loader.c (mono_get_method): set signature->pinvoke for native calls
20410
20411 2002-11-20  Dick Porter  <dick@ximian.com>
20412
20413         * threads.c (mono_thread_init): Set the main thread's handle
20414
20415 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20416
20417         * gc.c: allow compilation without GC support. Changed to match the
20418         mono coding style.
20419
20420 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20421
20422         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
20423
20424 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
20425
20426         * reflection.c: set a public key token on the core assemblies.
20427
20428 2002-11-18  Dick Porter  <dick@ximian.com>
20429
20430         * threads.c: Split out some thread initialisation so that other
20431         files can set the start callback function.
20432
20433         * gc.c: Run finalisers in a separate thread, to avoid stack
20434         overflow.  Fixes bug 31333.
20435
20436         * appdomain.c: Set up GC finalisation thread.
20437
20438         * reflection.c: 
20439         * object.c: 
20440         * domain.c: Use gc.h macros for GC_malloc
20441         
20442 2002-11-15  Dick Porter  <dick@ximian.com>
20443
20444         * threadpool.c: 
20445         * threads.c:
20446         * appdomain.c: Removed mono_runtime_init_with_attach(),
20447         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
20448         merging the extra parameter with the existing function.  Removed
20449         unneeded code in mono_thread_attach().
20450
20451 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
20452
20453         * image.c (mono_image_loaded_by_guid): a method to get loaded
20454         images by guid. 
20455         (load_metadata_ptrs): we store the guid as string.
20456
20457 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
20458
20459         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
20460
20461         * metadata.c (mono_guid_to_string): imported method form Zoltan
20462         Varga (slightly modified)
20463
20464         * assembly.c (mono_assembly_open): load precompiled code
20465
20466         * loader.h (MonoMethod): we store the method token for use in the
20467         aot compiler. 
20468
20469 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20470
20471         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
20472         the hook function called when an assembly is loaded.
20473         
20474         * domain.c: Modified file.
20475         (mono_domain_assembly_load): removed hash table insertion of assemblies.
20476
20477         Fixes bug #33196.
20478
20479 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
20480
20481         * reflection.c: Map PEFileKind to the value expected by the WinNT
20482         image loader. 
20483
20484 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20485
20486         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
20487         Read until the buffer is filled completely.
20488
20489 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20490
20491         * icall.c: implemented MonoType.InternalGetEvent ().
20492
20493 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20494
20495         * appdomain.c: implemented InitAppDomainSetup. Delayed
20496         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
20497         the entry_assembly.
20498
20499         * assembly.c: base_dir is now an absolute path ending with
20500         G_DIR_SEPARATOR.
20501
20502         * icall.c: modified get_location according to the above changes.
20503
20504         * object.c: init AppDomain.SetupInformation for the default domain after
20505         we have the entry assembly.
20506
20507         * domain.c: when unloading a domain, setup = NULL.
20508
20509 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
20510
20511         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
20512
20513 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
20514
20515         * object.h, object.c: introduced mono_object_get_virtual_method ()
20516         to lookup the method invoked on an object when a callvirt is done on
20517         a method.
20518         * icall.c: make MethodInfo::Invoke() always do a virtual call.
20519
20520 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20521
20522         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
20523         current domain when loaded an assembly and failed to load it.
20524
20525         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
20526
20527 2002-10-31  Dick Porter  <dick@ximian.com>
20528
20529         * icall.c: 
20530         * file-io.h: 
20531         * file-io.c: Return the error status in a parameter, as the
20532         GetLastError() value has long since been blown away if we try and
20533         look it up in a subsequent internal call invocation.  Delete the
20534         GetLastError() internal call, because it's useless.
20535
20536 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
20537
20538         * class.[ch]: added cast_class to fix bug 29517
20539
20540 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
20541
20542         * marshal.c: create valid IL code in the filter clause:
20543         the new JIT is less forgiving:-)
20544
20545 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20546
20547         * icall.c: removed get_property internal call.
20548
20549 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
20550
20551         * appdomain.h domain.c: Added an ID to appdomains.
20552         
20553         * threads.c threads.h icall.c: Implement icall
20554         Thread:GetDomainID(), and remove unused icall 
20555         CurrentThreadDomain_internal.
20556
20557 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20558
20559         * icall.c: Don't recurse through the base types in GetConstructor.
20560         Fixes bug #32063. 
20561
20562 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
20563
20564         * mempool.h, mempool.c: added mono_mempool_empty() and
20565         mono_mempool_stats().
20566
20567 2002-10-23  Dick Porter  <dick@ximian.com>
20568
20569         * file-io.c: 
20570         * file-io.h: 
20571         * icall.c: Added MonoIO.GetFileType internal call
20572
20573 2002-10-17  Dick Porter  <dick@ximian.com>
20574
20575         * appdomain.c (mono_runtime_cleanup): Don't signal the async
20576         delegate semaphore before waiting for all threads to finish,
20577         because new threads can also call async delegates.  Fixes bug
20578         32004.
20579
20580         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
20581         of 3 seconds, in case another async job is queued.  (This part is
20582         needed because the bug fix reintroduced the 3s exit lag.)  This
20583         makes the mono_runtime_shutdown flag superfluous.
20584
20585 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
20586
20587         * reflection.c: include ehader size in method section headers.
20588         Really check for suplicated modules entries.
20589
20590 2002-10-17  Martin Baulig  <martin@gnome.org>
20591
20592         * debug-mono-symfile.c: Added back support for locals.
20593
20594 2002-10-14  Martin Baulig  <martin@gnome.org>
20595
20596         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
20597         MONO_TYPE_VOID.
20598
20599 2002-10-14  Martin Baulig  <martin@gnome.org>
20600
20601         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
20602         mono_class_get() instead of looking in the class cache. 
20603
20604 2002-10-13  Martin Baulig  <martin@gnome.org>
20605
20606         * debug-mono-symfile.c: Set version number to 28, include the
20607         signature in method names.
20608
20609 2002-10-13  Martin Baulig  <martin@gnome.org>
20610
20611         * debug-mono-symfile.h: Set version number to 27.
20612
20613 2002-10-11  Martin Baulig  <martin@gnome.org>
20614
20615         * gc.c: Don't register/unregister NULL pointers as disappearing links.
20616
20617 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20618
20619         * metadata.c, metadata.h: added helper function to allocate signatures.
20620
20621 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20622
20623         * icall.c: added internal call to get the location of machine.config.
20624
20625 2002-10-08  Martin Baulig  <martin@gnome.org>
20626
20627         * debug-mono-symfile.c: Ignore classes with a pending init for the
20628         moment.
20629
20630 2002-10-03  Dick Porter  <dick@ximian.com>
20631
20632         * threads.c: Freebsd pthread_t is a pointer
20633
20634 2002-10-03  Dick Porter  <dick@ximian.com>
20635
20636         * socket-io.c: Implemented GetHostName_internal
20637
20638 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20639
20640         * mono-config.c:
20641         (mono_config_parse_file): don't leak the text.
20642
20643 2002-10-02  Martin Baulig  <martin@gnome.org>
20644
20645         * debug-mono-symfile.c: Added support for methods.
20646
20647 2002-10-01  Martin Baulig  <martin@gnome.org>
20648
20649         * debug-mono-symfile.c: Don't emit methods and line numbers for
20650         the dynamic symbol file, just write the type table.  We can easily
20651         have an external helper program which creates a symbol file for an
20652         IL file.        
20653
20654 2002-10-01  Dick Porter  <dick@ximian.com>
20655
20656         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
20657         Only add the handle to the cleanup array when we're about to
20658         launch the thread.  Bug 31425 deadlocked when the test was run on
20659         mono under w32.
20660
20661 2002-10-01  Martin Baulig  <martin@gnome.org>
20662
20663         * debug-mono-symfile.c: Added support for properties.
20664
20665 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20666
20667         * reflection.c: unaligned store fix from Mark Crichton
20668         <crichton@gimp.org>.
20669
20670 2002-09-27  Martin Baulig  <martin@gnome.org>
20671
20672         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
20673         New interncall.
20674
20675 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
20676
20677         * assembly.h, assembly.c: use a sane API to hook into the assembly
20678         loading process instead of a useless special-purpouse hack
20679         (ngen needs a hook, too, for example).
20680
20681 2002-09-27  Dick Porter  <dick@ximian.com>
20682
20683         * threads.c (mono_thread_init): Call GetCurrentProcess() so
20684         io-layer can set up some process handle info.  Not needed on w32,
20685         but doesn't hurt either.
20686
20687         * process.c: Pass the program name in the second parameter to
20688         CreateProcess, so the path is searched.  Include the working
20689         directory. Implemented process name, process enumeration, and some
20690         process detail internal calls.
20691         
20692         * icall.c: Added internal calls for process lookup, and some
20693         process details
20694
20695 2002-09-26  Martin Baulig  <martin@gnome.org>
20696
20697         * assembly.c (mono_install_open_assembly_hook): New global
20698         function to install a function to be invoked each time a new
20699         assembly is loaded.
20700         (mono_assembly_open): Run this callback function if set.
20701
20702         * debug-mono-symfile.c: Put back line numbers for the dynamic
20703         symbol file and also record the .il file as source file.  This
20704         allows us to install the temporary symbol file as `file.dbg' just
20705         like a compiler-generated one.
20706
20707 2002-09-26  Nick Zigarovich <nick@chemlab.org>
20708
20709         * Corrected typo in gc.c (BOHEM vs BOEHM).
20710
20711 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20712
20713         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
20714         GetProperties. Also avoid calling g_slist_length in GetProperties and
20715         GetMethods.
20716
20717 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
20718
20719         * reflection.c: avoid unaligned stores (bug spotted by
20720         Mark Crichton  <crichton@gimp.org>).
20721
20722 2002-09-25  Martin Baulig  <martin@gnome.org>
20723
20724         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
20725         instead of guint64 for addresses and added prologue/epilogue info.
20726
20727 2002-09-25  Martin Baulig  <martin@gnome.org>
20728
20729         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
20730         store line number info.  For the dynamic symbol file, we only need
20731         to provide the JIT generated dynamic line number info for the dynamic
20732         symbol file.
20733
20734 2002-09-25  Martin Baulig  <martin@gnome.org>
20735
20736         * debug-mono-symfile.h: Incremented version number.
20737
20738 2002-09-24  Martin Baulig  <martin@gnome.org>
20739
20740         * class.c (mono_debugger_class_init_func): New global function
20741         pointer variable.
20742         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
20743         call it.
20744
20745         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
20746         function.  This is called via the mono_debugger_class_init_func
20747         hook to add all types to the dynamic type table.
20748         (ves_icall_MonoDebugger_GetType): New interncall to get a class
20749         from its metadata token.
20750
20751         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
20752         New interncall for the debugger.
20753
20754 2002-09-24  Nick Drochak <ndrochak@gol.com>
20755
20756         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
20757         before using it in case it is null.
20758         
20759 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20760
20761         * metadata.c: allow custom modifiers in local var signatures
20762         (bug spotted by Zoltan Varga).
20763
20764 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20765
20766         * class.c: deal with the <Module> class that may have a NULL vtable.
20767         Eliminate warnings.
20768
20769 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20770
20771         * image.c, image.h: more strong name helpers.
20772         * monosn.c: more work: convert pem keys to cryptoapi format.
20773
20774 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
20775
20776         * string-icalls.c: speedup IndexOf.
20777
20778 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20779
20780         * icall.c: updates from Zoltan.2.Varga@nokia.com.
20781
20782 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
20783
20784         * icall.c: cleanup: use mono_object_domain ().
20785
20786 2002-09-23  Martin Baulig  <martin@gnome.org>
20787
20788         * debug-mono-symfile.c: Improved type support.
20789
20790 2002-09-22  Martin Baulig  <martin@gnome.org>
20791
20792         * debug-mono-symfile.c: Added support for reference types and strings.
20793
20794 2002-09-22  Martin Baulig  <martin@gnome.org>
20795
20796         * debug-mono-symfile.c: Started to work on the type table.
20797
20798 2002-09-21  Martin Baulig  <martin@gnome.org>
20799
20800         * debug-mono-symfile.c: Largely reworked the symbol table format.
20801         The symbol table is now incrementally updated each time a new
20802         method is added.  We're now also using our own magic and version
20803         so that you don't need to recompile all your classes if the
20804         dynamic table changes.
20805         (mono_debug_update_mono_symbol_file): Removed.
20806         (mono_debug_symfile_add_method): New function to add a method.
20807
20808 2002-09-21  Martin Baulig  <martin@gnome.org>
20809
20810         * icall.c
20811         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
20812         New interncall.
20813
20814         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
20815         New interncall to get a method from its metadata token.
20816
20817 2002-09-21  Martin Baulig  <martin@gnome.org>
20818
20819         * debug-mono-symfile.c: Create type table.
20820
20821 2002-09-20  Martin Baulig  <martin@gnome.org>
20822
20823         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
20824
20825 2002-09-20  Martin Baulig  <martin@gnome.org>
20826
20827         * debug-mono-symfile.c: Provide information about params and locals.
20828
20829 2002-09-20  Martin Baulig  <martin@gnome.org>
20830
20831         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
20832         New interncall.
20833
20834         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
20835         interncall to get a method from its metadata token.
20836
20837 2002-09-20  Martin Baulig  <martin@gnome.org>
20838
20839         * debug-mono-symfile.c: Added a few checks for method->header
20840         being non-NULL.  This should never happen, but for the moment
20841         let's use a g_warning() rather than a g_assert().
20842
20843 2002-09-19  Mark Crichton  <crichton@gimp.org>
20844
20845         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
20846         even if support for it isn't present.  Added an #ifdef to fix this.
20847
20848         * socket-io.c: Added checks back for Solaris support.
20849
20850 2002-09-19  Martin Baulig  <martin@gnome.org>
20851
20852         * debug-mono-symfile.c (read_string, write_string): Reflect latest
20853         changes in the symbol file format.
20854
20855 2002-09-18  Martin Baulig  <martin@gnome.org>
20856
20857         * debug-mono-symfile.c: Set version number to 21.
20858
20859 2002-09-18  Dick Porter  <dick@ximian.com>
20860
20861         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
20862         on netbsd.  Fixes bug 30051.
20863
20864 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20865
20866         * reflection.c:
20867         (set_version_from_string): little fix.
20868
20869 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20870
20871         * monosn.c, Makefile.am: added strong name utility.
20872         * reflection.h, reflection.c: implemented delayed signing,
20873         locale, version and hash id assembly attributes.
20874
20875 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
20876
20877         * loader.c, metadata.c: load param attributes in signatures.
20878
20879 2002-09-16  Martin Baulig  <martin@gnome.org>
20880
20881         * debug-mono-symfile.c: Added string table with all method names.
20882
20883 2002-09-14  Martin Baulig  <martin@gnome.org>
20884
20885         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
20886         fast method lookup.
20887
20888 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20889
20890         * reflection.c: record the public key token of referenced assemblies.
20891
20892 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20893
20894         * image.c, image.h: added functions to get the strong name and the
20895         public key of an assembly.
20896         * pedump.c: use them.
20897
20898 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
20899
20900         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
20901
20902 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
20903
20904         * marshal.c (mono_marshal_get_managed_wrapper): Added
20905         MONO_TYPE_BOOLEAN 
20906
20907 2002-09-11  Martin Baulig  <martin@gnome.org>
20908
20909         * gc.c: Call GC_unregister_disappearing_link() on all links when
20910         finalizing them, this is necessary to aviod a crash in boehm's
20911         finalize handler.
20912
20913 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
20914
20915         * gc.c: handle GetTarget for finalized objects spotted and fixed by
20916         nick@chemlab.org.
20917
20918 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
20919
20920         * icall.c: implemented MonoType::Module.
20921         * reflection.c, reflection.h: mono_module_get_object () from
20922         Tomi Pakarinen <tomi.pakarinen@welho.com>.
20923
20924 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
20925
20926         * icall.c: ignore overridden methods in GetMethods ().
20927         Fix for FieldInfo::SetValue().
20928         * object.c: handle float/double in runtime invoke.
20929
20930 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20931
20932         * object.c: allow a constructor to be called again on an object.
20933
20934 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20935
20936         * class.h, class.c: move field layout code to it's own function and
20937         export it. Get an interface id earlier. Move fields in MonoClass
20938         so they are more cache friendly and align the bitfields.
20939         * loader.c: temporary handle get_param_names() for a runtime method.
20940         * reflection.c, reflection.h: more code to handle runtime creation of
20941         types.
20942
20943 2002-09-09  Martin Baulig  <martin@gnome.org>
20944
20945         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
20946         signature with the pinvoke field being set for the actual call.
20947
20948 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20949
20950         * icall.c: removed some unused icalls. Start of map of glib charsets
20951         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
20952
20953 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
20954
20955         * debug-helpers.c: break infinite loop (found and fixed by
20956         Holger Arnold <harnold@gmx.de>).
20957
20958 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20959
20960         * icall.c: target may be null in create_delegate.
20961
20962 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20963
20964         * marshal.c: handle a boolean return type.
20965
20966 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20967
20968         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
20969
20970 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
20971
20972         * gc.c: fix weakreferences.
20973
20974 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
20975
20976         * icall.c: added icall to get default codepage.
20977
20978 2002-09-03  Dick Porter  <dick@ximian.com>
20979
20980         * threads.h: 
20981         * threads.c: Use MonoThread instead of MonoObject where
20982         apropriate.
20983
20984         Store running thread objects in a hash table, so that we have all
20985         the info to hand when waiting for them to finish
20986         (means we don't need OpenThread() any more, so mingw builds should
20987         be fully functional again.)
20988
20989         * verify.c:
20990         * object.h: Added thread ID to MonoThread
20991
20992 2002-09-03  Martin Baulig  <martin@gnome.org>
20993
20994         * icall.c (System.Reflection.Assembly::get_location): New interncall.
20995
20996 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20997
20998         * icall.c: fixed leak in get_temp_path. Thanks lupus.
20999
21000 2002-09-03  Martin Baulig  <martin@gnome.org>
21001
21002         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
21003         argument to store the end address of the disassembled instruction.
21004
21005         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
21006         here from debug-symfile.h.
21007         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
21008         JIT into this struct.
21009         (MonoSymbolFile): Added `char *image_file' field.
21010         (MonoDebugGetMethodFunc): Removed.
21011         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
21012         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
21013         (mono_debug_find_method): New method.
21014
21015         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
21016         create a full symbol file.
21017         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
21018         and static symbol files.
21019         (mono_debug_find_method): The symbol file keeps an internal method hash,
21020         call this to get a MonoDebugMethodInfo from a MonoMethod.
21021
21022         * debug-symfile.[ch]: Removed.
21023
21024 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
21025
21026         * image.c (do_mono_image_open): Remove linker version check.
21027
21028 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
21029
21030         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
21031         wrappers for instance methods.
21032         
21033 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21034
21035         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
21036
21037 2002-08-28  Dick Porter  <dick@ximian.com>
21038
21039         * Makefile.am: Export HOST_CC for w32 builds
21040
21041 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21042
21043         * file-io.c process.c: MonoString are null terminated, no
21044         need for mono_string_to_utf16() anymore.
21045
21046 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21047
21048         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
21049
21050 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
21051
21052         * icall.c, reflection.h: speedup System.MonoType.
21053
21054 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
21055
21056         * reflection.c: allow null as the value of a string argument in
21057         custom attributes constructors.
21058
21059 2002-08-27  Martin Baulig  <martin@gnome.org>
21060
21061         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
21062         `trampoline_address' field.
21063
21064 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
21065
21066         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
21067         check (fixes bug #29486) 
21068
21069 2002-08-27  Martin Baulig  <martin@gnome.org>
21070
21071         * debug-mono-symfile.c: Changed the file format in a way that allows us
21072         open it read-only and to use a specially malloced area for all the
21073         dynamic data.  We can now also generate a symbol file on-the-fly if we're
21074         debugging IL code and there is no MCS generated symbol file for it.
21075
21076 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
21077
21078         * object.c: added a define for a good string and array
21079         creation speedup (not enabled by default because we need to deal with
21080         the synch stuff).
21081
21082 2002-08-26  Martin Baulig  <martin@gnome.org>
21083
21084         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
21085         function to create a dynamic symbol file.  This is used by the
21086         debugger to create a symbol file for IL code on-the-fly.
21087
21088 2002-08-26  Martin Baulig  <martin@gnome.org>
21089
21090         * loader.c (mono_lookup_pinvoke_call): Include the error message
21091         from g_module_error() in the error message.
21092
21093 2002-08-24  Martin Baulig  <martin@gnome.org>
21094
21095         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
21096         function to update the symbol file.  The symbol file is mmap()ed
21097         writable, but private.  This allows us to install the symbol file
21098         together with the assembly.
21099
21100 2002-08-24  Martin Baulig  <martin@gnome.org>
21101
21102         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
21103         but they can read the new symbol file format which mcs is now creating.
21104
21105         * debug-symfile.c (mono_debug_find_source_location): Moved to
21106         debug-mono-symfile.c; this is now operating on the new symbol file.
21107
21108 2002-08-23  Martin Baulig  <martin@gnome.org>
21109
21110         * debug-helpers.c (mono_method_desc_from_method): New function to get
21111         a MonoMethodDesc from a MonoMethod.
21112
21113 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
21114
21115         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
21116         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
21117
21118 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
21119
21120         * string-icalls.[ch]: make helper methods static.
21121
21122 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21123
21124         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
21125         types to it and to SetValueInternal.
21126
21127         * object.c: Moved handle_enum label to its proper place. This was the
21128         f... bug! ;-)
21129
21130         This time i compiled mcs and gtk-sharp and they both work.
21131
21132 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21133
21134         * icall.c: reverted partially my previous patch until 
21135         object.c:set_value handles enums correcly.
21136
21137 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21138
21139         * icall.c:
21140         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
21141         (ves_icall_System_Environment_get_MachineName): removed warning when
21142         compiling under cygwin.
21143
21144 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21145
21146         * object.c: fixed field_get_value() for reference types.
21147
21148 2002-08-22  Dick Porter  <dick@ximian.com>
21149
21150         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
21151         Don't free a buffer while it's still needed.  Patch from Jonathan
21152         Liger <Jonathan.liger@wanadoo.fr>
21153
21154 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
21155
21156         * icall.c (ves_icall_System_Environment_get_Platform): Add new
21157         internal call.
21158
21159 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
21160
21161         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
21162         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
21163
21164         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
21165         we call unmanaged code which throws exceptions.
21166
21167 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21168
21169         * appdomain.h: added per-domain entry_assembly.
21170         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
21171         arguments.
21172         * icall.c: Assembly::GetEntryAssembly icall.
21173         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
21174         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
21175
21176 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21177
21178         * appdomain.h, gc.c: added mono_domain_finalize ().
21179
21180 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21181
21182         * object.c:
21183         (mono_print_unhandled_exception): changed g_warning by g_printerr
21184         because g_log has a 1024 characters limit (yeah, i got a big stack
21185         trace). Don't print exception name, that should be in ToString 
21186         returned string.
21187
21188 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21189
21190         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
21191         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
21192
21193 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21194
21195         * object.c:
21196         (mono_print_unhandled_exception): after previous commit, i realized
21197         that MS calls ToString on the exception. I changed this function to
21198         do that. This way we get stack_trace for free.
21199
21200 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21201
21202         * object.c:
21203         (mono_print_unhandled_exception): invoke Message property instead of
21204         getting 'message' field from Exception. Don't allocate memory for
21205         'trace' and 'message' if not needed.
21206
21207 2002-08-18  Dick Porter  <dick@ximian.com>
21208
21209         * unicode.c: Fix asserts to match Encoder.cs checks
21210
21211 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21212
21213         * marshal.c: fix unaligned store issue and a few wrong
21214         opcode argument types.
21215
21216 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21217
21218         * icall.c: added GetUninitializedObjectInternal internal call.
21219
21220 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
21221
21222         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
21223         to the right domain.
21224
21225 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
21226
21227         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
21228
21229         * class.c (class_compute_field_layout): set blittable to false for Strings
21230
21231         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
21232
21233 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21234
21235         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
21236         first chunk of code to create types at runtime. Code to
21237         handle ReflectedType/DeclaringType. Make reflection handles
21238         domain specific.
21239
21240 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
21241
21242         * class.c: set correct name in arrays.
21243
21244 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
21245
21246         * appdomain.c (mono_domain_transfer_object): make it work with
21247         valuetypes. bug fixes.
21248
21249 2002-08-12  Dick Porter  <dick@ximian.com>
21250
21251         * object.h: Rename some parameters to avoid c++ keywords (Patch
21252         from Joseph Wenninger <kde@jowenn.at>)
21253
21254 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
21255
21256         * icall.c: added icall to implement Assembly.GetFile*.
21257
21258 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21259
21260         * reflection.h, reflection.c: code to embed managed resources.
21261
21262 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21263
21264         * class.c: move all the type size stuff into
21265         class_compute_field_layout().
21266
21267 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21268
21269         * class.c: ensure enums have always the correct instance size.
21270         * unicode.c: remove wrong assert.
21271
21272 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21273
21274         * assembly.c: fix mem corruption issue.
21275         * image.h, image.c: added mono_image_get_resource () to access
21276         managed resources.
21277         * icall.c: implemented Assembly.EntryPoint property and some
21278         Managed Resources related internalcalls.
21279
21280
21281 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21282
21283         * image.c, image.h: impemented mono_image_get_entry_point ().
21284         * appdomain.c: use mono_image_get_entry_point.
21285
21286 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21287
21288         * reflection.c: support the object type argument when loading
21289         custom attributes.
21290
21291 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
21292
21293         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
21294         String as return type.
21295
21296 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
21297
21298         * reflection.c: fix encoding of named args for custom attrs to match
21299         the ms implementation. Read them back when instantiating custom
21300         attributes.
21301
21302 2002-08-02  Radek Doulik  <rodo@ximian.com>
21303
21304         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
21305         by Dietmar as quick fix
21306         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
21307         16 as stack size, used on more places as quick fix before Dietmar
21308         will fix it properly
21309
21310 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21311
21312         * object.h, object.c: added accessors for fields and properties.
21313
21314 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21315
21316         * class.c, class.h: made mono_class_get_field_from_name ()
21317         loop on parent types.
21318         Added mono_class_get_property_from_name ().
21319
21320 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21321
21322         * class.c, class.h: move the code to setup the type vtable in its own
21323         function so that it can be reused also for types created at runtime.
21324         Eliminate the "class" identifier from the header file.
21325         * reflection.c: setup the vtable for enums so that we can create
21326         objects for use in SetConstant ().
21327
21328 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
21329
21330         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
21331         instead of the delegate itself as this pointer (bug #28383)
21332
21333 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
21334
21335         * marshal.c (mono_marshal_get_managed_wrapper): added return type
21336         conversions.
21337
21338 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21339
21340         * loader.c: don't set the pinvoke bit on icalls.
21341
21342 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
21343
21344         * debug-helpers.c (mono_method_full_name): only print a number to
21345         indicate wrapper type (so that the output is more readable in traces).
21346
21347 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
21348
21349         * class.c (mono_class_init): include method override patch from Paolo
21350
21351 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
21352
21353         * icall.c: fixed GetTypeCode().
21354
21355 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
21356
21357         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
21358         use real delegate invoke function to make it work with multicast
21359         delegates (fix bug# 28291).
21360
21361 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21362
21363         * object.c: load constant strings.
21364
21365 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21366
21367         * reflection.c: no magic numbers.
21368         * tabledefs.h: security action enum.
21369
21370 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21371
21372         * assembly.c: fix possible memory corruption.
21373
21374 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21375
21376         * reflection.h, reflection.c: added support for linking resources.
21377         * verify.c: check we have an updated corlib.
21378
21379 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
21380
21381         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
21382         string arrays.
21383         (mono_marshal_string_array): null terminate unmanaged string arrays.
21384         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
21385
21386 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21387
21388         * icall.c: Type.GetType () can now return also types from the
21389         calling assembly.
21390
21391 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21392
21393         * loader.h, loader.c: stack walking support.
21394         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
21395         GetCallingAssembly.
21396
21397 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
21398
21399         * marshal.c: added optimisations for blittable types 
21400
21401         * class.c (mono_array_class_get): do not set blittable attribute on arrays
21402         (mono_class_setup_mono_type): set blittable attribute for single
21403         and double.
21404
21405         * marshal.c (mono_string_utf8_to_builder): impl.
21406         (mono_string_builder_to_utf8): impl.
21407         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
21408
21409 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
21410
21411         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
21412         (mono_marshal_get_managed_wrapper): impl. byref types
21413
21414 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21415
21416         * icall.c:
21417         (search_method): don't display debug message. 
21418
21419 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
21420
21421         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
21422
21423 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21424
21425         * appdomain.c: set the missing filename when throwing exception.
21426
21427 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
21428
21429         * metadata.c (mono_type_size): code cleanup
21430         (mono_type_stack_size): removed some test code
21431
21432 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
21433
21434         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
21435         mono_get_exception_file_not_found now.
21436
21437         * exception.c (mono_exception_from_name_two_strings): New version
21438         that will call a constructor with two string arguments. 
21439         (mono_get_exception_file_not_found): New helper routine, used to
21440         report file-not-found errors.
21441
21442 2002-07-20  Dick Porter  <dick@ximian.com>
21443
21444         * process.h:
21445         * process.c: Pass file handles to CreateProcess
21446         
21447         * icall.c:
21448         * file-io.h:
21449         * file-io.c: Implemented CreatePipe
21450
21451 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
21452
21453         * metadata.c (mono_get_param_info): set alignment for value types
21454
21455 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21456
21457         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
21458         Constify mono_domain_assembly_open().
21459         * loader.c: handle null namespace in icalls.
21460
21461 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
21462
21463         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
21464         (emit_str_to_ptr_conv): marshal object as structs
21465
21466         * metadata.c (mono_type_to_unmanaged): marshal object as structs
21467
21468         * marshal.c (mono_marshal_get_runtime_invoke): support value types
21469
21470 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
21471
21472         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
21473         (mono_marshal_get_native_wrapper): we an now return value types
21474
21475 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21476
21477         * verify.c: more checks implemented.
21478
21479 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
21480
21481         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
21482         (fix bug #27695)
21483         (mono_marshal_get_native_wrapper): allow byref arguments
21484         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
21485         impl. PtrToStringXXX methods
21486         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
21487         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
21488         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
21489         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
21490         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
21491
21492 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21493
21494         * reflection.c: fix buglet in parsing an assembly name.
21495
21496 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
21497
21498         * marshal.c (emit_ptr_to_str_conv): first impl.
21499
21500 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21501
21502         * object.c, class.h: cache the vtable in the class as suggested by
21503         vargaz@freemail.hu (Zoltan Varga).
21504
21505 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21506
21507         * class.h, loader.c: added mono_field_from_token().
21508         * verify.c: first cut of type checking code.
21509
21510 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
21511
21512         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
21513
21514 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
21515
21516         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
21517         (fix bug #27782)
21518         (mono_marshal_get_remoting_invoke): impl.
21519         (mono_delegate_begin_invoke): impl.
21520         (mono_mb_emit_save_args): impl.
21521         (mono_delegate_end_invoke): impl.
21522         (mono_marshal_get_delegate_begin_invoke):
21523         (mono_marshal_get_delegate_end_invoke):
21524         (mono_marshal_get_delegate_invoke): generate a special name for
21525         those methods (including the signature) and associate them whith
21526         the delegate class. 
21527
21528 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
21529
21530         * reflection.[ch]: 
21531         (mono_reflection_type_from_name): now it has a MonoImage parameter
21532         which is used as the default image to search the type in. If the image
21533         is NULL or getting the type from it fails, it defaults to corlib.
21534
21535         * icall.c: changed 1 call to mono_reflection_type_from_name to match
21536         new parameter.
21537
21538 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21539
21540         * reflection.c: update the parameter table index.
21541
21542 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21543
21544         * domain.c: don't include the mark byte in the string hash.
21545
21546 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21547
21548         * icall.cs: icall for Type.GetTypeCode ().
21549         * verify: a couple of fixes and disabled local initialization checks.
21550
21551 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
21552
21553         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
21554
21555         * debug-helpers.c (mono_method_full_name): print the type of the
21556         runtime wrapper
21557
21558         * metadata.c (mono_signature_hash): a hash function for signatures
21559         (mono_signature_hash): better hash algorithm
21560
21561         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
21562
21563         * debug-helpers.c (mono_method_full_name): this can now generate
21564         method names with signatures
21565
21566         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
21567         method dont have this pointers.
21568
21569 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
21570
21571         * reflection.c: fixup typebuilder tokens.
21572         * image.c: fix buglet.
21573         * marshal.h: remove whitespace.
21574         * metadata.h, metadata.c: reinstate code that was removed.
21575         * verify.c: handle catch directives and fix another couple of bugs.
21576
21577 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
21578
21579         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
21580         (mono_marshal_get_native_wrapper): make it comp. with the old code
21581         (mono_marshal_get_native_wrapper): support boolean
21582         (mono_marshal_get_managed_wrapper): support more types
21583
21584 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
21585
21586         * class.c (class_compute_field_layout): compute class->blittable attribute.
21587
21588 2002-07-09  Dick Porter  <dick@ximian.com>
21589
21590         * threads.c: Make the thread cleaning up cope with threads that
21591         call ExitThread()
21592
21593 2002-07-08  Radek Doulik  <rodo@ximian.com>
21594
21595         * reflection.c (method_encode_code): use non-translated values to
21596         compute finally_start, this fixes exception handling on ppc, yay!
21597
21598         * decimal.h (struct signscale): fix endianess
21599
21600 2002-07-07  Radek Doulik  <rodo@ximian.com>
21601
21602         * reflection.c: swap box_val and not val
21603
21604 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
21605
21606         * reflection.c, reflection.h: handle full assembly info in type name.
21607         Handle Type arguments when loading custom attributes.
21608         * icall.c: updated to use new mono_reflection_type_from_name () method.
21609
21610 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21611
21612         * loader.c:
21613         (method_from_memberref): also print assembly name when method not found.
21614
21615 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21616
21617         * icall.c:
21618         (ves_icall_TypeGetProperties): fixed bug #27473. 
21619
21620 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21621
21622         * reflection.c: display image name and token when cannot find the
21623         .ctor for an attribute.
21624
21625 2002-07-05  Martin Baulig  <martin@gnome.org>
21626
21627         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21628
21629 2002-07-04  Dick Porter  <dick@ximian.com>
21630
21631         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
21632         compile on mingw.  This will cause mingw builds to not wait for
21633         subthreads to terminate after the main thread does.  I've lodged a
21634         bug with the mingw developers for them to wrap OpenThread().
21635
21636 2002-07-03  Dick Porter  <dick@ximian.com>
21637
21638         * threads.c: Store thread IDs instead of handles, because
21639         GetCurrentThread() returns a pseudohandle and therefore stores
21640         useless values.  mono_thread_cleanup() continues checking the
21641         array of threads until it is empty, to cope with subthreads
21642         spawning new threads after the main thread has finished.
21643
21644         * profiler.h:
21645         * profiler.c:
21646         * profiler-private.h: Pass the thread ID to thread profiler
21647         functions, instead of a handle
21648
21649 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21650
21651         * verify.c: fixes to make it more usable.
21652         * pedump.c: added --verify code to verify IL code in an assembly.
21653
21654 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21655
21656         * reflection.c: turn errors into warnings to allow compiling corlib.
21657
21658 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
21659
21660         * reflection.c: add special cases to compile corlib.
21661
21662 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21663
21664         * reflection.c: handle properties with only a set method.
21665
21666 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21667
21668         * opcodes.h: add enum with opcodes in opval order.
21669
21670 2002-07-01  Dick Porter  <dick@ximian.com>
21671         
21672         * object.h:
21673         * object.c (mono_runtime_run_main): Removed unneeded argument
21674
21675 2002-06-28  Martin Baulig  <martin@gnome.org>
21676
21677         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21678
21679 2002-06-27  Dick Porter  <dick@ximian.com>
21680
21681         * threads.c: Store the handle in both the parent thread and in the
21682         subthread, to minimise the time between starting a new thread and
21683         storing its ID.
21684
21685 2002-06-26  Dick Porter  <dick@ximian.com>
21686
21687         * appdomain.c (mono_runtime_cleanup): Close the socket library
21688         after all the threads have finished, not before
21689
21690 2002-06-26  Martin Baulig  <martin@gnome.org>
21691
21692         * debug-symfile.c (mono_debug_find_source_location): Added
21693         `guint32 *line_number' argument.  If it's not NULL, store the line number
21694         there and return the file name without the line number.
21695
21696 2002-06-25  Dick Porter  <dick@ximian.com>
21697
21698         * icall.c:
21699         * process.h:
21700         * process.c: Process forking and other support functions
21701
21702 2002-06-25  Dick Porter  <dick@ximian.com>
21703
21704         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
21705         things dont happen when the image is closed.
21706         (mono_image_lookup_resource): Walk the resource section looking
21707         for a particular entry
21708
21709         * cil-coff.h: PE resource section decoding
21710
21711 2002-06-25  Dick Porter  <dick@ximian.com>
21712         
21713         * assembly.h:
21714         * assembly.c: 
21715         (mono_assembly_foreach): Accessor functions to walk the list of
21716         loaded assemblies
21717         (mono_assembly_set_main):
21718         (mono_assembly_get_main): Process methods need to know which
21719         assembly is the "main" one
21720
21721         * object.c (mono_runtime_run_main): Record the main assembly
21722
21723         * debug-helpers.c: Fix typo
21724
21725 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
21726
21727         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
21728         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
21729
21730 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21731
21732         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
21733
21734 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
21735
21736         * image.c (do_mono_image_open): Initialize reference count,
21737         otherwise we leak the MonoImage.
21738
21739 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21740
21741         * reflection.c: small tweak to handle self-hosting.
21742
21743 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21744
21745         * reflection.c: fix type name parse code.
21746
21747 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21748
21749         * reflection.c: break out of the loop.
21750         * image.c: special case corlib.
21751
21752 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21753
21754         * reflection.c: add all the custom attrs at the end to ensure the
21755         ctors have been properly initialized when the attributes are defined
21756         in the current assembly.
21757
21758 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21759
21760         * reflection.c: handle correctly multiple-nested types.
21761
21762 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
21763
21764         * row-indexes.h: fix typos.
21765         * reflection.c: adjust for typos and fix method_def_or_ref
21766         encoding in MethodImpl table.
21767
21768 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21769
21770         * reflection.c: fix entry point patching (thanks Serge!).
21771
21772 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
21773
21774         * verify.c: add check for System.Exception
21775
21776 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21777
21778         * image.c, class.c: minifix for code just c&p'ed.
21779         * reflection.c: warning fix.
21780         * object.h, loader.h, domain.c: load also StringBuilder.
21781
21782 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21783
21784         * marshal.h, marshal.c: some support code to handle complex marshaling.
21785
21786 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21787
21788         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
21789         Better signatures with vtable error dump.
21790
21791 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
21792
21793         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
21794
21795 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
21796
21797         * icall.c (ves_icall_Type_GetField): impl.
21798
21799 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21800
21801         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
21802         to retrieve a marshal description blob for a field or param.
21803
21804 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21805
21806         * reflection.h, reflection.c: change order of nested type emission
21807         to avoid table corruption. The NestedTypes table is sorted.
21808         * icall.c: change order of GetConstructor results to workaround mcs bug.
21809
21810 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21811
21812         * reflection.h, reflection.c: handle field and param marshal
21813         information.
21814
21815 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21816
21817         * icall.c, marshal.c marshal.h: more Marshal class implementation.
21818
21819 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21820
21821         * reflection.c: fix call convention.
21822
21823 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21824
21825         * reflection.h, reflection.c: mono_image_get_memberref_token()
21826         takes a type instead of a class, now. Added
21827         mono_image_get_array_token() to create tokens for the special
21828         multi-dim array methods.
21829
21830 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21831
21832         * assembly.c: handle modules (no assembly table). Split
21833         loading references in its own function.
21834         * class.c: handle moduleref resolution scope.
21835         * image.c, image.h: cache module name in image.
21836
21837 2002-06-07  Martin Baulig  <martin@gnome.org>
21838
21839         * reflection.c (mono_image_get_type_info): Only add a class layout entry
21840         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
21841
21842 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21843
21844         * icall.c: more signature fixes that used uint instead of int.
21845
21846 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21847
21848         * reflection.c: fixed signature of field refs.
21849
21850 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21851
21852         * class.c, reflection.c: handle typerefs of nested types
21853         (both on read and when writing files).
21854
21855 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
21856
21857         * icall.c: fix method signatures that tried to workaround the previous
21858         typo, d'oh!
21859
21860 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21861
21862         * debug-helpers.c: fix typo.
21863
21864 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21865
21866         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
21867         rewrote the PE/COFF writing code (our programs are understood by the
21868         ms runtime, now).
21869
21870 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21871
21872         * gc.c, gc.h, icall.c: weakreference support.
21873
21874 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21875
21876         * Makefile.am, mono-config.c: use $(sysconfdir).
21877
21878 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21879
21880         * icall.c: changed default precision of Double.ToString() to 15.
21881         Fixed memory leak. Unified with Single.ToString.
21882
21883 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
21884
21885         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
21886
21887 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
21888
21889         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
21890         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
21891         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
21892         and myself.
21893
21894 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21895
21896         * debug-symfile.c, sysmath.c: yet more compilation fixes.
21897
21898 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21899
21900         * reflection.c, socket-io.c: more compilation fixes.
21901
21902 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21903
21904         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
21905         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
21906         unicode.c: warning and compiler compatibility fixes.
21907
21908 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
21909
21910         * class.h, metadata.c: fixed warnings/compilation errors.
21911
21912 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21913
21914         * Makefile.am, mono-config.c, mono-config.h: configuration file
21915         support routines.
21916         * loader.c, loader.h: make Dll mapping configurable at runtime in the
21917         config file. Export methods to insert and lookup mappings.
21918
21919 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21920
21921         * reflection.c: handle types and boxed objects in custom attr
21922         constructors.
21923
21924 2002-05-30  Martin Baulig  <martin@gnome.org>
21925
21926         * debug-symfile.c
21927         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
21928
21929 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
21930
21931         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
21932         to lookup the implmap row for a P/Invoke method.
21933         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
21934         P/Invoke method from the runtime on an as needed basis.
21935
21936 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
21937
21938         * metadata.c (mono_metadata_parse_signature): impl.
21939
21940 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21941
21942         * class.c: handle .pack directive.
21943
21944 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
21945
21946         * object.c: initialize static fields with RVA data.
21947
21948 2002-05-25  Martin Baulig  <martin@gnome.org>
21949
21950         * debug-symfile.c
21951         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
21952
21953 2002-05-24  Martin Baulig  <martin@gnome.org>
21954
21955         * debug-symfile.c
21956         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
21957         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
21958         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
21959
21960 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
21961
21962         * object.c: special case string ctros in invoke.
21963         * gc.c: silly whitespace changes.
21964
21965 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
21966
21967         * threadpool.[ch]: impl. a threadpool that can
21968         be used by mint and mono.
21969
21970 2002-05-22  Martin Baulig  <martin@gnome.org>
21971
21972         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
21973         The first argument is now a `MonoReflectionModuleBuilder *', the return
21974         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
21975         `methods' field to get the method builder.  The `token' argument is the
21976         unfixed token.
21977
21978         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
21979         invalid characters instead of g_assert_not_reached()ing.  This seems
21980         to be the behaviour of mscorlib.
21981
21982 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
21983
21984         * object.c (mono_runtime_invoke_array): applied patch from Rachel
21985         Hestilow to fix bug #25104
21986
21987 2002-05-21  Martin Baulig  <martin@gnome.org>
21988
21989         * debug-symfile.c (mono_debug_find_source_location): New function.
21990         Looks up an IL offset in the line number table and returns the source
21991         location as a string.
21992
21993 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21994
21995         * icall.c:
21996         (mono_double_ToStringImpl): changed %f by %g until we have something
21997         better.
21998
21999 2002-05-21  Nick Drochak  <ndrochak@gol.com>
22000
22001         * icall.c : Use different name for Math.Pow's icall.  Needed to check
22002         parameters first in C#.
22003
22004 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22005
22006         * icall.c, reflection.h: added icall to get info about an event.
22007
22008 2002-05-20  Radek Doulik  <rodo@ximian.com>
22009
22010         * object.c (mono_value_box): don't use memcpy for boxing on BIG
22011         endian
22012         (mono_value_box): don't use memcpy for small sizes on
22013         architectures with unaligned access
22014
22015 2002-05-20  Martin Baulig  <martin@gnome.org>
22016
22017         * reflection.c (mono_reflection_setup_internal_class): Don't crash
22018         if `tb->parent == NULL'.
22019         (mono_reflection_create_internal_class): New function.  This is
22020         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
22021         for enum types.
22022
22023         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
22024         New interncall.
22025
22026 2002-05-19  Martin Baulig  <martin@gnome.org>
22027
22028         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
22029         argument to get the length, don't default to the array length.
22030
22031 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
22032
22033         * assembly.c (mono_assembly_setrootdir): New function used to
22034         override the MONO_ASSEMBLIES directory.
22035
22036 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22037
22038         * icall.c: ValueType_GetHashCode() initialize local var.
22039
22040 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22041
22042         * reflection.c: sort custom attributes table.
22043
22044 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22045
22046         * reflection.c: support named args in custom attributes (write support).
22047
22048 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
22049
22050         * reflection.c: fix finally position calculation.
22051
22052 2002-05-15  Radek Doulik  <rodo@ximian.com>
22053
22054         * reflection.c: fixed endianess at many places
22055
22056         * icall.c (ves_icall_InitializeArray): comment out debug msg
22057
22058 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
22059
22060         * object.c (mono_unhandled_exception): new function to handle
22061         unhandled exceptions.
22062         (mono_unhandled_exception): call the UnhandledException event.
22063         (mono_runtime_delegate_invoke): impl.
22064
22065 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
22066
22067         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
22068         returns the RVA, not the direct pointer to the data. Handle the case
22069         when the class size is fixed.
22070
22071 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
22072
22073         * reflection.c: fix some endianess issues.
22074
22075 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
22076
22077         * object.c (mono_runtime_invoke): is now able to catch exceptions.
22078
22079         * threads.c (mono_thread_init): added a callback which is invoked
22080         at thread start.
22081
22082 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
22083         
22084         * icall.c: make GetHashCode return non-negative values.
22085
22086 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
22087
22088         * object.c, icall.c, gc.c: revert to address-based hashcode.
22089
22090 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
22091
22092         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
22093
22094 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22095
22096         * icall.c, class.c: special case <Module>.
22097
22098 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
22099
22100         * icall.c: fix bug in GetNow().
22101
22102 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
22103
22104         * object.c (mono_runtime_class_init): make sure that we call all
22105         static class constructors.
22106
22107 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
22108
22109         * reflection.c: sort methodsemantics table.
22110
22111 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
22112
22113         * reflection.h, reflection.c: honour init locals setting.
22114
22115 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
22116
22117         * icall.c: copied Double ToStringImpl for Single ToStringImpl
22118
22119 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22120
22121         * reflection.c: support ContructorBuilders in attribute blob creation.
22122
22123 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22124
22125         * reflection.c: some changes to build a binary that can be run
22126         directly in windows.
22127
22128 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22129
22130         * loader.c: print a big message when an icall can't be found.
22131
22132 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22133
22134         * string-icalls.c: fix bug 24248.
22135
22136 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
22137
22138         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
22139         icall.c, reflection.h: separate assembly loading by pathname and by
22140         assembly name. Use the MONO_PATH env var to search for assemblies.
22141
22142 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22143
22144         * assembly.c, image.h: add some support for assemblies
22145         with multiple modules.
22146         * class.c, class.h: export mono_class_from_typeref().
22147         * loader.c: remove duplicated code and use mono_class_from_typeref(),
22148         instead.
22149
22150 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22151
22152         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
22153         documentation says (the ECMA one is correct).
22154
22155 2002-05-02  Dick Porter  <dick@ximian.com>
22156
22157         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
22158         Don't name the synchronisation mutex.
22159
22160 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
22161
22162         * rand.c
22163         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
22164         Make the prototypes match.
22165         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
22166         Same.
22167
22168         * icall.c
22169         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
22170         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
22171         all systems have tm.tm_zone, so use strftime() with %Z to print
22172         the timezone abreviation into a temp string.
22173
22174         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
22175         rather than mono_array_addr() on a MonoString on Big Endian
22176         machines.
22177
22178 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
22179
22180         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
22181         fix bug 24041
22182
22183 2002-04-30  Dick Porter  <dick@ximian.com>
22184
22185         * socket-io.c: Cope with SOCKET being an integer rather than a
22186         pointer now.
22187
22188         * threads.c: Added Thread_free_internal, to deal with thread
22189         handle cleanup.  Moved calls to handle_store() and handle_remove()
22190         to start_wrapper(), so each can only be called once.  Allocate
22191         synchronisation blocks with GC_malloc(), and use GC finalisation
22192         to close the handles.
22193
22194         * icall.c: added System.Threading.Thread::Thread_free_internal
22195
22196 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22197
22198         * icall.c: support Environment.Exit, CommandLineArgs().
22199
22200 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
22201
22202         * object.c, object.h: added mono_runtime_run_main () and
22203         mono_runtime_get_main_args () for use in System.Environment.
22204
22205 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22206
22207         * gc.c: fix thinko, enable actual finalization since the jit is now
22208         fixed.
22209
22210 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22211
22212         * gc.c, object.c: take into account that an object may be offset wrt the address
22213         returned by GC_malloc().
22214
22215 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
22216
22217         * image.c: handle files without entries in the assembly table (modules).
22218
22219 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
22220
22221         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
22222         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
22223         allowed to be null when it's System.Object class setup.
22224
22225 2002-04-27  Martin Baulig  <martin@gnome.org>
22226
22227         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
22228         if `tb->parent == NULL' rather than crashing.
22229
22230 2002-04-28  Nick Drochak  <ndrochak@gol.com>
22231
22232         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
22233         calling acos() where asin() should have been called.
22234
22235 2002-04-26  Martin Baulig  <martin@gnome.org>
22236
22237         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
22238         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
22239         there's a subdirectory called `System', but we don't want to read that
22240         subdirectory as an assembly.
22241
22242 2002-04-25  Martin Baulig  <martin@gnome.org>
22243
22244         * debug-symfile.c: Reflect latest MonoString changes.
22245
22246 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22247
22248         * rand.c, rand.h: instance method icalls need to have an explicit
22249         this pointer as first argument in the C implementation.
22250
22251 2002-04-25  Nick Drochak <ndrochak@gol.com>
22252
22253         * icall.c: Fix typo in map for GetNonZeroBytes
22254
22255 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
22256
22257         * string-icalls.c : String does now passes unit tests without any 
22258         errors, the following changes has been made:
22259         
22260         Implemented replace methods.
22261         Renaming of methods to (try) follow the standard.
22262         Fixed compare ordinal
22263         Made all memory allocated directly to function instead of via icall function.
22264         Small performance fix in is_in_array function
22265                         
22266  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
22267
22268         c (mono_string_Internal_ctor_charp_int_int):
22269         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
22270         sindex < 0, throw ArgumentOutOfRangeException instead of
22271         ArgumentNullException.
22272
22273         Added new check for length == 0, however
22274         I need to make it return String.Empty from the C code.
22275         
22276         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
22277         that calculate the length for us here.
22278         
22279         (mono_string_Internal_ctor_sbytep_int_int): Replaced
22280         mono_string_new_utf16 with mono_string_new, since value is utf8.
22281
22282 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22283
22284         * object.c: register the object for finalization if needed.
22285         Allocate one more char in the string for the terminating 0 char.
22286
22287 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22288
22289         * class.c, class.h, image.c: check if a type implemenst a destructor.
22290         Use the proper key for array class lookups.
22291         * icall.c: register the icalls in the System.GC class.
22292         * gc.c, gc.h: GC-related functions and icalls.
22293
22294 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22295
22296         * icall.c:
22297         * socket-io.c:
22298         * unicode.c: free some strings gotten from mono_string_to_utf8 and
22299         changed a couple of free () by g_free ().
22300
22301         * decimal.c: one-liner in the comments for decimal2string ().
22302
22303 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
22304
22305         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
22306
22307 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
22308
22309         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
22310         * object.c (mono_runtime_invoke_array) : handle null in params
22311
22312 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
22313
22314         * string-icalls.c: fixed bug in split (one off bug)
22315
22316 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
22317
22318         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
22319         * icalls.c: added String::Equals as internal method
22320
22321 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
22322
22323         * threads.c: fixed bug in the double interlocked functions
22324
22325 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
22326
22327         * threads.c: implemented all of the new interlocked icalls.
22328         * string-icalls.c: fix a bug in insert.
22329         * icalls.c: added the icalls for interlocked, removed old string functions.
22330         
22331 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22332
22333         * loader.c: fix off-by-one error when reading argument names.
22334
22335 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22336
22337         * profiler.c: win32 counter implementation (untested).
22338         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
22339         (the latter needs testing and more complete impl. from win32 folks).
22340
22341 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
22342
22343         * object.c: mono_array_new_full workaround mono_array_class_get
22344         problem.
22345
22346 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22347
22348         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
22349         * object.h (mono_string_chars): Changed casting type.
22350
22351 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22352
22353         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
22354                            method signatures to use gunichar2 instead of gint16.
22355
22356 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
22357
22358         * object.h, object.c: domain-specific versions of mono_object_new and
22359         mono_array_new.
22360
22361 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
22362
22363         * object.c: changed String layout
22364
22365         * string-icalls.c (mono_string_Internal_ctor_chara): added
22366         internal string constructors.
22367
22368 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
22369
22370         * threads.c: pass 'this' to the thread start routine.
22371
22372 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22373
22374         * string-icalls.c: fix IndexOf and LastIndexOf. Now
22375         InternalCompareStr don't call twice mono_string_cmp_char for the last
22376         character. Improved performance in mono_string_cmp_char.
22377
22378 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22379
22380         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
22381         code into its own library: libmonoruntime.
22382
22383 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
22384
22385         * object.h, object.c: changed array format so that szarrays do not
22386         require a bounds structure.
22387         * icall.c, appdomain.c: support for new szarray format.
22388
22389 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22390
22391         * metadata.c: compare also the retuns type when comparing signatures:
22392         we didn't do this as an optimization since really overloaded methods
22393         must differ also in the arguments, but this doesn't work with
22394         low-level IL code (or when using explicit conversion operators: see
22395         bug#23498 for an example).
22396
22397 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22398
22399         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
22400
22401 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
22402
22403         * icall.c: make MonoType::GetElementType its own icall.
22404
22405 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22406
22407         * icall.c: remove MonoMethod_get_Name().
22408         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
22409         object.
22410
22411 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22412
22413         * string-icalls.c: optimized a few methods.
22414
22415 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22416
22417         * icall.c: added all new string internal calls
22418         * string-icalls.c: added, new string internal call implementation.
22419         * object.c: added mono_string_new_size for allocating a string a size
22420
22421 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
22422
22423         * object.c (mono_object_isinst): use the same code as in the
22424         optimized x86 version.
22425
22426 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22427
22428         * profiler.c: TSC-based timer code (faster and more accurate).
22429         Not hooked up in configure, yet (set USE_X86TSC to 1).
22430
22431 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
22432
22433         * profiler.c, profiler.h: track time spent compiling methods.
22434         * threads.c: track thread creation/destruction.
22435
22436 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
22437
22438         * profiler.c, profiler.h, profiler-private.h: profiling interface
22439         and sample implementation. Moved here so that it can be used also by
22440         the jit.
22441
22442 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
22443
22444         * reflection.c, reflection.h: keep types and other handles separate in
22445         the hash tables for referred tokens. Add guid for modules.
22446
22447 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
22448
22449         * assembly.c: fix bugs found with valgrind.
22450         * metadata.h, metadata.c: added mono_metadata_guid_heap().
22451
22452 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
22453
22454         * threads: added icall support for getting current domain for
22455                    the thread.
22456  
22457 2002-04-13  Martin Baulig  <martin@gnome.org>
22458
22459         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
22460         (MonoDebugVarInfo): Added `index' field for register based addresses.
22461         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
22462         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
22463         `MonoDebugVarInfo *params' and `guint32 this_offset' with
22464         `MonoDebugVarInfo *this_var'.
22465
22466         * debug-symfile.c (relocate_variable): New static function to write
22467         a location description for a local variable or method parameter.
22468
22469 2002-04-12  Martin Baulig  <martin@gnome.org>
22470
22471         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
22472         stack offset and begin/end scope address of a local variable.
22473         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
22474         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
22475         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
22476
22477         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
22478         Added new relocation types for start/end scope of a local variable.
22479
22480 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22481
22482         * object.h: add mono_object_domain() macro.
22483         * reflection.c: handle typespecs.
22484         * icall.c: MonoMethod::get_Name() implementation.
22485
22486 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22487
22488         * icall.c: String::GetHashCode() icall implementation.
22489
22490 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22491
22492         * icall.c: String::IndexOfAny icall.
22493         * object.c, object.h: make array->max_length more useful.
22494         Intrduced mono_object_class() and mono_string_length() macros.
22495
22496 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22497
22498         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
22499         instead of g_unichar_isdigit.
22500
22501 2002-04-11  Nick Drochak  <ndrochak@gol.com>
22502
22503         * icall.c: Implement a simple Double.ToString().
22504
22505 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22506
22507         * appdomain.h: only io-layer.h is supposed to be included.
22508         * icall.c: explicitly import environ. Fix warning.
22509
22510 2002-04-10  Nick Drochak  <ndrochak@gol.com>
22511
22512         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
22513                 return true even if it's not Daylight Savings time.
22514                 Only return false for the case where the function isn't
22515                 implemented for a plaform (read Windows).
22516
22517 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22518
22519         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
22520         data with a mutex.
22521
22522 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
22523
22524         * mempool.c (mono_mempool_alloc): only use g_malloc when
22525         absolutely necessary.
22526
22527 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
22528
22529         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
22530
22531         * class.c (mono_class_vtable): use domain mempool to allocate vtable
22532         (mono_class_proxy_vtable): use domain mempool
22533
22534 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
22535
22536         * appdomain.h, appdomain.c: split initialization that requires the
22537         execution engine support into mono_runtime_init().
22538
22539 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
22540
22541         * class.c (mono_class_init): don't include vtable inside MonoClass
22542         to save some memory, gather some statistics.
22543         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
22544
22545 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22546
22547         * icall.c: internalcall implementation for ValueType.Equals().
22548
22549 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
22550
22551         * object.c (mono_message_init): moved 
22552         (mono_runtime_exec_main): new arch. independent impl.
22553         (mono_runtime_invoke_array): new method - like
22554         mono_runtime_invoke, but you can pass an array of objects.
22555         (mono_remoting_invoke): new arch. independent impl.
22556         (mono_message_invoke): new arch. independent impl.
22557         (mono_runtime_class_init): new arch. independent impl.
22558         (mono_runtime_object_init): new arch. independent impl.
22559
22560 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22561
22562         * metadata.c, object.c, reflection.c: documented the exported
22563         functions.
22564
22565 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
22566
22567         * icall.c: simpler code to pass the assembly builder data to corlib.
22568         Implement GetNestedTypes() internalcall.
22569
22570 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22571
22572         * class.c: warn if a type can't be loaded.
22573
22574 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
22575
22576         * image.h: typedef MonoImageOpenStatus
22577         * types.h: removed unused file
22578         
22579 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
22580
22581         * icall.c: Enum_ToObject accepts enum value arguments.
22582
22583 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
22584
22585         * class.c: move initialization of properties, events and nested
22586         classes, so that they happen for interfaces, too.
22587
22588 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
22589
22590         * icall.c: cleanup some ugly casts in Array_SetValue*.
22591
22592 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22593
22594         * icall.c: the values array fro enums is of the correct type, now.
22595         Implement (correctly) getFullName instead of assQualifiedName for
22596         MonoType.
22597         * reflection.h, reflection.c: added mono_type_get_name ().
22598
22599 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22600
22601         * assembly.c, image.h: for each MonoImage, record from wich assembly
22602         it was loaded.
22603         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
22604         Make Type.Assembly work.
22605
22606 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
22607
22608         * debug-symfile.h: use char* instead of gpointer to avoid
22609         unnecessary casts.
22610
22611         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
22612
22613         * icall.c (ves_icall_InternalExecute): impl. FielSetter
22614         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
22615
22616 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
22617
22618         * icall.c (mono_message_init): impl. (code cleanup)
22619         (ves_icall_InternalExecute): impl. FieldGetter
22620
22621         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
22622         defined we call all (non-static)methods through the vtable. 
22623
22624 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
22625
22626         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
22627         finalizer even though the memory is still referenced (and the chunk of
22628         memory is not freed).
22629
22630 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
22631
22632         * assembly.c: fix brokeness.
22633
22634 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
22635
22636         * class.c: kill some warnings. Check explicit interface method
22637         implementation also without considering the namespace.
22638         Load also literal strings in static class data.
22639
22640 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
22641
22642         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
22643         (default_assembly_name_resolver): Make the resolver take the
22644         "base" directory where the assembly was originally defined, so we
22645         can load DLLs that are in the same directory as the assembly that
22646         is being referenced.
22647
22648 2002-03-28  Dick Porter  <dick@ximian.com>
22649
22650         * file-io.h: 
22651         * file-io.c:
22652         * socket-io.c: 
22653         * unicode.h: 
22654         * unicode.c: Warning cleanups
22655
22656 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
22657
22658         * object.h, reflection.h: use the correct type instead of MonoObject.
22659
22660 2002-03-28  Martin Baulig  <martin@gnome.org>
22661
22662         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
22663         (mono_debug_update_symbol_file): Initialize classes if necessary.
22664
22665 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22666
22667         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
22668         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
22669
22670 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
22671
22672         * assembly.h: fix function prototype.
22673         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
22674         * mono-endian.h: use const cast.
22675
22676 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
22677
22678         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
22679
22680 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
22681
22682         * loader.c: don't assert when a typeref can't be loaded, give
22683         a chance to the runtime to trow an exception instead.
22684         * loader.h: fix warning.
22685
22686 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
22687
22688         * class.c (mono_class_proxy_vtable): added proxy support
22689
22690 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
22691
22692         * icall.c: removed last of PAL calls, added System.Environment
22693         * file-io.h, file-io.c: MonoIO implementation
22694         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
22695
22696 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
22697
22698         * appdomain.c: do not use the byte marker in ldstr table lookup.
22699         * debug-helpers.c: allow two ':' to separate class and method name.
22700         * object.c: allocate arrays bounds with the GC, too.
22701         * verify: add a few more checks.
22702
22703 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
22704
22705         * reflection.c: output also literal strings. Allocate parameter data
22706         with GC_malloc() (thanks, Martin, for catching this!).
22707
22708 2002-03-26  Martin Baulig  <martin@gnome.org>
22709
22710         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
22711         include the `this' offset in the `param_offsets'.
22712
22713 2002-03-25  Martin Baulig  <martin@gnome.org>
22714
22715         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
22716         mono_debug_get_class() function to get the classes. Added new
22717         relocation types for arrays and strings.
22718         (mono_debug_get_class): New static function to search in all
22719         referenced assemblies for a metadata token.
22720
22721         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
22722
22723 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22724
22725         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
22726         hold gc-allocated objects. Make the string heap a stream like the
22727         others. Removed duplicated code when writing stream info.
22728         Added asserts to catch possible buffer overflows. Set the sorted map
22729         for tables that need sorting. Added some documentation.
22730
22731 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
22732
22733         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
22734         for interned strings and vtables.
22735
22736 2002-03-24  Martin Baulig  <martin@gnome.org>
22737
22738         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
22739         it in the array since it was created with g_slist_prepend().
22740
22741 2002-03-24  Martin Baulig  <martin@gnome.org>
22742
22743         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
22744         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
22745         (mono_debug_method_from_token): Renamed to
22746         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
22747         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
22748
22749         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
22750         relocation types.
22751
22752         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
22753
22754 2002-03-24  Martin Baulig  <martin@gnome.org>
22755
22756         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
22757         (mono_debug_method_from_token): New func.
22758
22759         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
22760         New interncall, calls mono_debug_local_type_from_signature().
22761         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
22762         calls mono_debug_method_from_token().
22763
22764 2002-03-23  Martin Baulig  <martin@gnome.org>
22765
22766         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
22767         specifies the number of bytes to be converted, not the array size.
22768         Return the number of chars, not the number of bytes.
22769         (ves_icall_iconv_get_chars): The `byteCount' argument
22770         specifies the number of bytes to be converted, not the array size.
22771
22772 2002-03-23  Martin Baulig  <martin@gnome.org>
22773
22774         * reflection.h (MonoReflectionSigHelper): New type.
22775
22776         * reflection.c (mono_reflection_sighelper_get_signature_local),
22777         (mono_reflection_sighelper_get_signature_local): New functions.
22778
22779         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
22780         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
22781         interncalls.
22782
22783 2002-03-23  Martin Baulig  <martin@gnome.org>
22784
22785         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
22786         is_writeable is set.
22787         (mono_raw_buffer_update): New function to write the modified map
22788         back to disk.
22789
22790         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
22791
22792         * debug-symfile.c (mono_debug_update_symbol_file): Call
22793         mono_raw_buffer_update() when done writing.
22794
22795 2002-03-23  Martin Baulig  <martin@gnome.org>
22796
22797         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
22798
22799         * debug-symfile.c: Added support for arguments and local variables.
22800
22801 2002-03-23  Dick Porter  <dick@ximian.com>
22802
22803         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
22804         protected by ifdefs, hence breaking the w32 build.
22805
22806 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22807
22808         * object.c: implement is_interned() the right way.
22809
22810 2002-03-21  Martin Baulig  <martin@gnome.org>
22811
22812         * debug-symfile.[ch]: New files to handle debugging information
22813         files. There's also support to dynamically update these symbol
22814         files to include machine dependent information.
22815
22816 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
22817
22818         * threads.c (mono_thread_create): new function to create thread
22819         from C
22820
22821 2002-03-20  Martin Baulig  <martin@gnome.org>
22822
22823         * icall.c (ves_icall_InternalInvoke): Create a new object if the
22824         method is a constructor.
22825         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
22826         points to ves_icall_InternalInvoke().
22827
22828 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
22829
22830         * file-io.c: Flush shouldn't throw exceptions.
22831
22832 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
22833
22834         * file-io.c: FileStream flush support; FileSetLength now
22835         restores file pointer.
22836
22837 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
22838
22839         * class.c: set image for pointer classes.
22840
22841 2002/03/19  Nick Drochak <ndrochak@gol.com>
22842
22843         * sysmath.c: Forgot one.
22844
22845 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
22846
22847         * sysmath.c: Avoid redefining existing names.
22848
22849 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
22850
22851         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
22852         handled by runtime as icall rather than dllimport from libm.so
22853         * file-io.c, file-io.h: fixed handle argument type.
22854
22855 2002-03-18  Dick Porter  <dick@ximian.com>
22856
22857         * reflection.c (mono_image_get_type_info): rename interface to
22858         iface, because of "#define interface struct" on windows.
22859
22860 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
22861
22862         * class.c, class.h: rename and export mono_ptr_class_get().
22863         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
22864         * reflection.c, reflection.h, icall.c: better/saner type name
22865         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
22866         method signatures.
22867
22868 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
22869
22870         * class.c (mono_class_init): removed hardcoded GHC_SLOT
22871
22872         * icall.c (ves_icall_InternalInvoke): impl.
22873
22874 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
22875
22876         * reflection.c: output the interface map table, too.
22877
22878 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
22879
22880         * class.c (class_compute_field_layout): separate computation of 
22881         static field layout
22882
22883 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
22884
22885         * icall.c: added System.Buffer support.
22886         * file-io.c: moved file icalls from PAL to FileStream.
22887
22888 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
22889
22890         * icall.c (ves_icall_System_Object_GetHashCode): impl.
22891
22892 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
22893
22894         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
22895
22896 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
22897
22898         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
22899
22900 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
22901
22902         * debug-helpers.{c,h}: moved here from monograph some useful functions
22903         to locate a method by name/signature in a class or image. Included
22904         also a small and flexible IL disassembler.
22905
22906 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
22907
22908         * reflection.c: fixup tokens in methods with small header size, too.
22909
22910 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
22911
22912         * object.c (mono_string_to_utf8): remove assert(!error), instead
22913         print a warning. 
22914
22915 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
22916
22917         * icall.c: update to the new mono_Array_class_get interface.
22918
22919 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
22920
22921         * appdomain.c, object.c: Boehm-GC enable.
22922         * icall.c: make get_data_chunk() support split data requests.
22923         Ensure a class is initialized in more cases. Return only the first
22924         property found in GetProperties() or the compiler gets confused. 
22925         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
22926         * reflection.h, reflection.c: add fixup mechanism for field and method
22927         tokens. Initialize assembly->typeref in a single place. Output
22928         properties after events. Support custom attributes for events, too.
22929         Typo fix for paramter custom attrs.
22930
22931 2002-03-07  Martin Baulig  <martin@gnome.org>
22932
22933         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
22934
22935 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
22936
22937         * class.c (mono_array_class_get): fix. for multi. dim. arrays
22938
22939 2002-03-06  Martin Baulig  <martin@gnome.org>
22940
22941         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
22942         non-zero lower bounds. See testcases #F10-#F13.
22943
22944 2002-03-05  Martin Baulig  <martin@gnome.org>
22945
22946         * exception.c (mono_get_exception_argument_out_of_range): New exception.
22947
22948         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
22949         ves_icall_System_Array_GetValue(), only calculate the absolute array position
22950         here.
22951         (ves_icall_System_Array_SetValue): Likewise.
22952         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
22953         as argument and does the actual work. This function is used when copying a
22954         multi-dimensional array.
22955         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
22956         now do all the widening conversions of value types.
22957         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
22958
22959 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22960
22961         * class.c: remove some magic numbers and use the smbolic names,
22962         instead. Added init_events() to load event info at class init time.
22963         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
22964         and mono_metadata_methods_from_event().
22965         * reflection.h, reflection.c: added support for writing out the evnets
22966         related information.
22967
22968 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22969
22970         * reflection.h, icall.c: use a different method (GetInterfaces)
22971         to gather interface info and add isbyref, isprimitive and
22972         ispointer to the ves_icall_get_type_info() return value.
22973
22974 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
22975
22976         * class.h: stared adding support for events.
22977         * icall.c: split find_members implementation. Added debug icall to get
22978         the address of an object.
22979         * reflection.c: handle TypeBuilders in mono_type_get_object().
22980
22981 2002-03-01  Martin Baulig  <martin@gnome.org>
22982
22983         * icall.c (ves_icall_System_Array_GetLength): This must throw an
22984         ArgumentOutOfRangeException(), not an ArgumentException().
22985         (ves_icall_System_Array_GetLowerBound): Likewise.
22986         (ves_icall_System_Array_GetValue): Improved argument checking.
22987         (ves_icall_System_Array_SetValue): Improved argument checking.
22988
22989 2002-03-01  Martin Baulig  <martin@gnome.org>
22990
22991         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
22992         called with invalid arguments rather than just dying with g_assert().
22993         (ves_icall_System_Array_SetValue): Likewise.
22994         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
22995         raise a NotImplementedException instead.
22996         (ves_icall_System_Array_GetLength): Added argument checking.
22997         (ves_icall_System_Array_GetLowerBound): Added argument checking.
22998
22999 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
23000
23001         * object.h (mono_assert): new macros mono_assert and
23002         mono_assert_not_reached
23003
23004 2002-02-28  Martin Baulig  <martin@gnome.org>
23005
23006         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
23007         and "System::String::IsInterned" to "System::String::_IsInterned".
23008
23009 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
23010
23011         * icall.c: remove hacks for typebuilder. Added icall to create a
23012         modified type from a tybebuilder.
23013         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
23014         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
23015         to create a backing MonoClass for a TypeBuilder.
23016
23017 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23018
23019         * class.c, class.h: more refactoring of class init.
23020         Export mono_class_setup_mono_type() and mono_class_setup_parent().
23021
23022 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
23023
23024         * marshal.c, marshal.h: start of marshaling interface.
23025
23026 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23027
23028         * icall.c: fix order in assembly qualified name icall.
23029
23030 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23031
23032         * class.c: do not free str, since we store it in the hash table.
23033         * reflection.h: add label field to MonoILExceptionInfo.
23034         * reflection.c: handle references to more than one assembly. Handle
23035         case when there isn't a module created in the assembly.
23036
23037 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
23038
23039         * class.c: Fix typo. Start refactoring of class init code.
23040
23041 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
23042
23043         * appdomain.c: exit with 1 on error.
23044         * class.c: we already have the name in MonoClassField.
23045         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
23046         MonoStreamHeader instead of an offset of image->raw_metadata.
23047
23048 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
23049
23050         * appdomain.c (mono_init): Be even more descriptive about the error.
23051
23052 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
23053
23054         * appdomain.c: give the user an informative message when corlib can't
23055         be loaded.
23056
23057 2002-02-26  Martin Baulig  <martin@gnome.org>
23058
23059         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
23060         New icall to get the time zone data.
23061
23062 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23063
23064         * reflection.c: set virtual and raw size of section correctly.
23065         * threads.c: transfer domain information to newly created threads.
23066
23067 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23068
23069         * class.c: when instancing a class in a domain, load the default
23070         vaules for static fields from the constant table. Fix System.Enum to
23071         not be an enum.
23072         * icall.c: implement Object::GetType() internalcall. Implemented
23073         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
23074         Fixed checking of binding flags in find_members().
23075         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
23076         * reflection.c: handle enumerations when writing to the constant
23077         table. Use a different object cache for types.
23078
23079
23080 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
23081
23082         * object.c (mono_object_isinst): fix for arrays
23083
23084         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
23085
23086 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23087
23088         * object.c: don't use mprotect ()  and fix intern pool hash table
23089         lookup for big endian systems.
23090
23091 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23092
23093         * icall.c: change type_is_subtype_of () signature.
23094
23095 2002-02-21  Mark Crichton  <crichton@gimp.org>
23096
23097         * rand.c, rand.h: Added random number generator for
23098         System.Security.Cryptography classes.
23099
23100         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
23101
23102         * icall.c: Added System.Security.Cryptography calls.
23103
23104 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
23105
23106         * class.c, icall.c, metadata.c: better support for pointer types.
23107         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
23108         * reflection.c: Add support for getting custom attrs for properties
23109         and simplify some code.
23110
23111 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23112
23113         * icall.c: change getToken () and add custom attribute GetBlob()helper
23114         method.
23115         * reflection.h: add custom attrs array to the reflection builder structures.
23116         * reflection.c: encode and emit custom attributes for all the relevant
23117         reflection objects. Cache fieldref and methodref tokens. Change
23118         mono_image_create_token() interface to take a MonoDynamicAssembly.
23119         More complete custom attributes decoder. Load custom attributes for
23120         Assembly, Field, Method and Constructor objects, too. Make the
23121         returned array an Attribute[] one, not object[]. Added
23122         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
23123         custom attribute constructor.
23124
23125 2002-02-20  Dick Porter  <dick@ximian.com>
23126
23127         * icall.c:
23128         * rawbuffer.c:
23129         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
23130         problem code out for now).
23131
23132 2002-02-19  Radek Doulik  <rodo@ximian.com>
23133
23134         * object.c (mono_ldstr): use hash table to avoid multiple swapping
23135
23136 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
23137
23138         * icall.c: register the GetCustomAttributes method.
23139         * object.c, object.h: add mono_string_new_len ().
23140         * reflection.h, reflection.c: added mono_runtime_invoke(),
23141         mono_install_runtime_invoke(). Added
23142         mono_reflection_get_custom_attrs () to load custom attributes and
23143         create the attribute objects.
23144
23145 2002-02-19  Dick Porter  <dick@ximian.com>
23146         * threads-dummy-types.c:
23147         * threads-dummy-types.h:
23148         * threads-dummy.c:
23149         * threads-dummy.h:
23150         * threads-pthread-types.c:
23151         * threads-pthread-types.h:
23152         * threads-pthread.c:
23153         * threads-pthread.h:  Deleted obsolete files
23154
23155 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
23156
23157         * class.c (mono_class_vtable): runtime init the class when we
23158         allocate static class data.
23159
23160         * icall.c (ves_icall_System_Array_SetValue): check for null values.
23161
23162         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
23163         and String - but we will need generic marshalling support in the
23164         future. 
23165         (mono_init): set the domain name in a ms compatible way
23166
23167         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
23168         String[].
23169
23170 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
23171
23172         * object.c (mono_array_clone): use alloca() instead of g_malloc  
23173         for sizes
23174
23175         * appdomain.c (mono_domain_unload): impl.
23176
23177 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23178
23179         * appdomain.c, object.c: fix intern pool implementation.
23180         * class.c: fix alignment code.
23181
23182 2002-02-16  Radek Doulik  <rodo@ximian.com>
23183
23184         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
23185         and s2 > s1, just copy lower bytes to be compatible with little
23186         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
23187         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
23188
23189         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
23190         force big_endian to be 1 for big endian machines 
23191         (ves_icall_iconv_new_decoder): ditto
23192
23193 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
23194
23195         * socket-io.c (convert_sockopt_level_and_name): If the system
23196         doesn't define SOL_IP or SOL_TCP, get them by hand using
23197         getprotobyname() and caching the values (because this could be a
23198         slow operation).
23199         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
23200         Use the appropriate struct when the system does support it. Ie,
23201         not all systems have struct ip_mreqn so use struct ip_mreq when
23202         appropriate.
23203
23204 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
23205
23206         * reflection.c: handle finally clauses.
23207
23208 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
23209
23210         * socket-io.c: use g_snprintf() instead of snprintf.
23211
23212 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
23213
23214         * reflection.c (mono_param_get_objects): Cast second argument to
23215         mono_method_get_param_names to a const char** to silence the
23216         compiler warning.
23217
23218         * appdomain.c (mono_domain_assembly_open): Put parens around the
23219         truth statement in the for-loop.
23220
23221         * unicode.c (iconv_convert): Got rid of a compiler warning about
23222         int i being unused when the system has a new iconv.
23223         (iconv_get_length): Same.
23224
23225         * image.c (load_class_names): Cast the second argument to
23226         g_hash_table_insert() to char* to hush compiler warnings about the
23227         arg being a const.
23228         (mono_image_open): Same here.
23229
23230         * socket-io.c: Don't conditionally include sys/filio.h or
23231         sys/sockio.h here anymore since we now get them from
23232         io-layer/io-layer.h
23233         (inet_pton): If the system doesn't support inet_aton, implement
23234         using inet_addr and also #define INADDR_NONE if it isn't defined
23235         by the system.
23236
23237 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
23238
23239         * metadata.c, metadata.h: added function to get packing and size info
23240         of a typedef.
23241         * reflection.h, reflection.c: handle field RVA data. Save info about
23242         the table layout if needed. Assign typedef indexes to all the types
23243         before dumping the info about them to avoid forward reference problems.
23244
23245 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
23246
23247         * socket-io.c (convert_sockopt_level_and_name): ifdef
23248         SO_ACCEPTCONN because it is not defined on my system (old debian)
23249
23250 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
23251
23252         * opcode.c: use stddef.h to get NULL.
23253
23254 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
23255
23256         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
23257         for FIONBIO, FIONREAD and SIOCATMARK.
23258         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
23259         define INADDR_NONE and besides, inet_addr() is deprecated and
23260         should not be used. Use inet_pton() instead - it also has the
23261         added bonus that it can easily handle IPv6 addresses as well.
23262         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
23263
23264 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
23265
23266         * decimal.c: remove _MSC_VER conditional.
23267
23268 2002-02-13  Dick Porter  <dick@ximian.com>
23269
23270         * socket-io.c: 
23271         * icall.c: Internal calls for Blocking, Select, Shutdown,
23272         GetSocketOption and SetSocketOption
23273
23274 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23275
23276         * assembly.cs: better resolver: use it instead of some kludgy
23277         code.
23278
23279 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
23280
23281         * reflection.c: the best way to speed-up the compiler is to avoid
23282         infinite loops.
23283
23284 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
23285
23286         * class.c (mono_class_vtable): changed the object layout
23287         (obj->vtable->class). 
23288         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
23289
23290 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23291
23292         * assembly.c: look for assemblies in the assembly dir, too.
23293
23294 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23295
23296         * class.c: fix thinko in mono_class_from_type().
23297
23298 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23299
23300         * exception.h, exception.c: added TypeLoadException.
23301         * object.h, object.c: added mono_array_clone ().
23302         * icall.c: handle throwOnError in AssemblyGetType().
23303         Added Array.Clone().
23304         * opcode.h, opcode.c: use a single value for the opcode val.
23305         Compile fix for non-gcc compilers.
23306
23307 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
23308
23309         * opcodes.c, opcodes.h: export interesting info about opcodes.
23310
23311 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
23312
23313         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
23314         icalls. 
23315
23316         * class.c (class_compute_field_layout): set element_class for enums
23317         (mono_class_create_from_typedef): set element_class for normal classes
23318
23319         * icall.c (ves_icall_System_Enum_get_value): impl.
23320
23321         * class.c (mono_class_create_from_typedef): do not set valuetype
23322         flag for System.ValueType and System.Enum
23323
23324 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
23325
23326         * unicode.c (iconv_convert): fix big endian problem.
23327
23328 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23329
23330         * class.c: add asserts if we are ever going to scribble over memory.
23331         * socket-io.c: not all systems have AF_IRDA defined.
23332
23333 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
23334
23335         * class.c (class_compute_field_layout): do not consider static
23336         fields to compute alignment
23337
23338 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
23339
23340         * appdomain.c (mono_appdomain_get): impl.
23341         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
23342
23343 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
23344
23345         * icall.c: ignore "file://" prefix when loading an assembly.
23346
23347 2002-01-23  Dick Porter  <dick@ximian.com>
23348
23349         * socket-io.c:
23350         * icall.c:
23351         * Makefile.am: Added socket support
23352
23353 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
23354
23355         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
23356         code back.  This should return the assemblies that are loaded by
23357         the runtime on behalf of an application domain. 
23358
23359         The current implementation is still broken, it just returns every
23360         assembly loaded, but until we get real applications domain this
23361         will do.
23362
23363 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
23364
23365         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
23366         AppDomain object.
23367
23368 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
23369
23370         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
23371         the mono_class_from_name lookup.
23372         (ves_icall_get_parameter_info): ditto.
23373         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
23374         method.
23375         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
23376
23377 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
23378
23379         * class.c: load also nested classes on class init.
23380         System.ValueType instance methods gets passed boxed
23381         values, unless methods in derived classed that get a pointer to the
23382         data.
23383         * icall.c: use better name parsing code in GetType().
23384         * image.c, image.h: add mono_image_loaded ().
23385         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
23386         * reflection.c, reflection.h: added mono_reflection_parse_type().
23387
23388 2002-01-22  Veronica De Santis <veron78@interfree.it>
23389
23390         * icall.c : Added mapping of internal calls for Manual and Auto reset events
23391         * threads.c : Added the implementation of internal calls for events
23392         * threads.h : Added prototypes of internal calls for events
23393         
23394 2002-01-21  Radek Doulik  <rodo@ximian.com>
23395
23396         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
23397
23398 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
23399
23400         * class.c (mono_class_init): set min_align to 1 (instead of 0)
23401         (mono_class_value_size): use min_align
23402
23403 2002-01-20  Dick Porter  <dick@ximian.com>
23404
23405         * threads.h:
23406         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
23407         so it compiles on w32.
23408
23409 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
23410
23411         * metadata.c (mono_type_stack_size): impl.
23412
23413         * class.c (mono_class_get_field): impl. memberref token
23414
23415 2002-01-16 Veronica De Santis <veron78@@interfree.it>
23416
23417         * icall.h : Added the internal calls mapping for CreateMutex_internal
23418                     and ReleaseMutex_internal.
23419         * threads.h : Added the prototype of mutexes internal calls.
23420         * threads.c : Added the implementations of mutexes internal calls.
23421
23422 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23423
23424         * metaparse.h: removed unused file.
23425         * reflection.c, reflection.h: added stream_data_align () function 
23426         to align data in streams and keep stream aligned. Add support for
23427         exception support in method headers.
23428
23429 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
23430
23431         * unicode.c: make iconv_convert () return the number of bytess written
23432         in the output buffer.
23433
23434 2002-01-15  Dick Porter  <dick@ximian.com>
23435         * threads.c: Make the runtime's idea of infinite timeouts coincide
23436         with the class library's
23437
23438         Fix a particularly egregious bug in mono_thread_cleanup(). That
23439         code was so utterly bogus it must have been written on a Monday.
23440
23441 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23442
23443         * reflection.h: add subtypes field to TypeBuilder.
23444         * reflection.c: encode constants for literal fields.
23445         Handle subtypes. Fix user string token (and add a zero byte)
23446         at the end.
23447         
23448 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
23449
23450         * class.c (mono_class_init): bug fix: assign slot numbers for
23451         abstract methods.
23452
23453 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23454
23455         * reflection.c: don't try to output a code RVA for abstract methods.
23456         Small fixes for method header format. Output parameter info to the
23457         ParamDef table. Save method overriding info to MethodImpl table.
23458         Fix property support. Allow typedef.extends to be a type in the
23459         building assembly.
23460         * verify.c: fix off-by-one error.
23461
23462 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
23463
23464         * class.c: fix mono_class_from_mono_type () for szarray types.
23465         Remove unused cache check in mono_class_from_type_spec().
23466         * icall.c: *type_from_name () functions handle simple arrays and byref.
23467         * reflection.c: handle byref and szarray types. Handle methods without
23468         body (gets P/Invoke compilation working). Handle types and fields in
23469         get_token ().
23470         * reflection.h: add rank to MonoTypeInfo.
23471
23472 2002-01-10  Dick Porter  <dick@ximian.com>
23473
23474         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
23475         internal calls
23476
23477 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23478
23479         * icall.c: initialize class in type_from_handle ().
23480         Loop also in parent classes for get_method ().
23481         * reflection.c: properly encode class and valuetype types.
23482         Start on encoding TypeBuilder types. Handle fieldrefs.
23483         Use correct length when registering a user string.
23484         Handle ConstructorBuilder and MonoMethod in get_token ().
23485         Make mono_type_get_object () aware of cached types.
23486         * object.c: back out change to mono_string_new ().
23487
23488 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
23489         * object.c: mono_string_new should return a NULL when the string 
23490         passed in is NULL -- not try to deference it.
23491         
23492 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23493
23494         * icall.c: hack to make IsSubType work for TypeBuilders.
23495         * reflection.c: emit constructors before methods.
23496         Retrieve param names in mono_param_get_objects().
23497
23498 2002/01/05  Nick Drochak  <ndrochak@gol.com>
23499
23500         * Makefile.am: fix list of headers and sources so automake 1.5
23501         doesn't complain. Removed \# at end of list.
23502
23503 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23504
23505         * reflection.c: get token for a method ref. Set return type of
23506         constructor to void.
23507         * loader.c: debug message.
23508         * class.c: typo fix.
23509
23510 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
23511
23512         * icall.c: fix array init with rank > 1. FindMembers
23513         loops in parent class as well.
23514         * image.c: do not insert nested types in name cache.
23515         * reflection.c: warning fix.
23516         * reflection.h: add override method (for interface impl).
23517
23518 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
23519
23520         * metadata.c: fix customattr decoding.
23521
23522 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
23523
23524         * rawbuffer.cs: Added native Win32 implementation, avoids using
23525         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
23526
23527 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
23528
23529         * class.c: make the low-level routines handle the cache.
23530
23531 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
23532
23533         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
23534
23535 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
23536
23537         * class.c: fix mono_array_element_size() for objects.
23538         * class.h, class.c: add properties to MonoClass and load them
23539         at init time.
23540         * icall.c: check with isinst() when assigning a value to an array
23541         instead of requiring the classes to match exactly.
23542         Implemented icall for System.Type::GetType().
23543         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
23544         enums. Handle bindingflags when looking for methods and fields.
23545         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
23546         and mono_metadata_methods_from_property().
23547         * reflection.h, reflection.c: added structures for propreties,
23548         parameters and enums. Implemented mono_property_get_object() and
23549         mono_param_get_objects().
23550
23551 2001-12-18  Dick Porter  <dick@ximian.com>
23552
23553         * file-io.c: Use mono_string_to_utf16() instead of
23554         mono_string_chars()
23555
23556         * object.c: Added mono_string_to_utf16(), which copies the non
23557         NULL-terminated MonoString into a new double-null-terminated
23558         buffer.
23559
23560 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
23561
23562         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
23563
23564 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
23565
23566         * file-io.c: raise exceptions if handle is invalid.
23567
23568 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
23569
23570         * assembly.c: yet another check for mscorlib.
23571         * class.c, class.h: load nesting info for classes.
23572         * icall.c: many new functions to support the Reflection classes.
23573         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
23574         * reflection.h, reflection.c: mono_image_create_token(),
23575         mono_assembly_get_object(), mono_type_get_object(),
23576         mono_method_get_object(), mono_field_get_object(): methods to return
23577         objects that parallel the C representation of assemblies, types,
23578         methods, fields.
23579
23580 2001-12-11  Dick Porter  <dick@ximian.com>
23581
23582         * icall.c:
23583         * file-io.c: Internal calls for file IO.
23584
23585 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
23586
23587         * tabledefs.h: missing FileAttributes.
23588         * verify.h, verify.c: use is_valid_string () to simplify and check for
23589         valid strings more correctly. Fix warnings and speeling.
23590         Check more tables: Filed, File, ModuleRef, StandAloneSig.
23591         Check code: branches, maxstack, method calls.
23592
23593 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
23594
23595         * object.c (mono_object_allocate): removed static, so that the jit
23596         can allocate value types.
23597
23598         * icall.c (ves_icall_System_DateTime_GetNow): impl.
23599
23600 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23601
23602         * class.c: init enum types right away and register the
23603         token->MonoClass map in mono_class_create_from_typedef ().
23604         * verify.h, verify.c: first cut of the verifier.
23605         * pedump.c: add --verify switch to verify metadata tables.
23606         * tabledefs.h: add some missing enums.
23607
23608 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
23609
23610         * class.c (mono_install_runtime_class_init): impl.
23611         (mono_class_init): renamed mono_class_metadata_init to
23612         mono_class_init, also removed the metadata_inited flag
23613
23614         * object.c (mono_object_isinst): use faster algorithm
23615
23616 2001-11-30  Radek Doulik  <rodo@ximian.com>
23617
23618         * mono-endian.h: reverted last change
23619         added function prototypes
23620
23621         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
23622         add mono-endian.c back
23623
23624         * mono-endian.c: returned back, as Paolo pointed out, it's needed
23625         for unaligned access, I've mistaked it with endianess. I am
23626         sorry.
23627         (mono_read16): fix reverted endianess
23628         (mono_read64): ditto
23629         (mono_read32): ditto
23630
23631 2001-11-30  Dick Porter  <dick@ximian.com>
23632
23633         * exception.c: Implement mono_exception_from_name()
23634
23635 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23636
23637         * metadata.h, metadata.c: remove params_size and locals_size and their
23638         calculation from the metadata code: they are only usefult to the
23639         interp.
23640
23641 2001-11-29  Radek Doulik  <rodo@ximian.com>
23642
23643         * object.c (mono_ldstr): swap bytes here, it's probably not the
23644         best place, but works for me now, I'll redo it once I know mono
23645         better, also note that I add PROT_WRITE and don't reset back, also
23646         note that it's only affects big endians, so x86 should be OK
23647
23648         * mono-endian.h (read16): use just glib macros for both endians
23649
23650         * mono-endian.c: removed as glib macros are used in in
23651         mono-endian.h so we don't need to care about endianess for read
23652         macros as glib does that for us already
23653
23654 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
23655
23656         * class.h, class.h: take minimum alignment into consideration so
23657         that the fields of a class remain aligned also when in an array.
23658
23659 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23660
23661         * loader.h, loader.c: add mono_method_get_param_names().
23662         * class.c: 0-init class fields.
23663
23664 2001-11-26  Dick Porter  <dick@ximian.com>
23665
23666         * icall.c:
23667         * threads-types.h:
23668         * threads.c: New file that handles System.Threading on all platforms
23669
23670         * object.c: 
23671         * object.h: Remove the synchronisation struct from MonoObject,
23672         replace it with a pointer that gets initialised on demand
23673
23674         * Makefile.am: Replace all the system-specific threading code with
23675         a single file that uses the new wrapper library
23676
23677 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
23678
23679         * class.c, class.h: add mono_install_trampoline() so that the runtime
23680         can register a function to create a trampoline: removes the ugly
23681         requirement that a runtime needed to export arch_create_jit_trampoline.
23682         * object.h, object.c: added mono_install_handler() so that the runtime
23683         can install an handler for exceptions generated in C code (with
23684         mono_raise_exception()). Added C struct for System.Delegate.
23685         * pedump.c: removed arch_create_jit_trampoline.
23686         * reflection.c: some cleanups to allow registering user strings and
23687         later getting a token for methodrefs and fieldrefs before the assembly
23688         is built.
23689         * row-indexes.h: updates and fixes from the new ECMA specs.
23690
23691 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
23692
23693         * class.h, class.c: add enum_basetype field to MonoClass.
23694         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
23695         to get index in the constant table reated to a field, param or
23696         property.
23697         * reflection.h, reflection.c: handle constructors. Set public-key and
23698         version number of the built assembly to 0.
23699         * row-indexes.h: update from new ECMA spec.
23700
23701 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23702
23703         * class.h, class.c: add a max_interface_id to MonoClass.
23704         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
23705         since it's used to do that. Added mono_type_type_from_obj().
23706         Make GetType() return NULL instead of segfaulting if the type was not
23707         found. Handle simple arrays in assQualifiedName.
23708         * object.h: add a struct to represent an Exception.
23709         * reflection.c: output call convention in method signature.
23710         Add code to support P/Invoke methods and fixed offsets for fields.
23711
23712 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
23713
23714         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
23715         the value.
23716         * icall.c: use mono_array_addr instead of array->vector: fixes the
23717         reflection image writing.
23718         * reflection.c: init call convention byte to 0 in method signature.
23719         Encode the property signature. Don't output property-related methods
23720         twice. Really process the properties for a type (don't cast a field to
23721         a property, my mom always told me that).
23722         Fix 64 bit issues in pointer alignment in a different and more
23723         readable way.
23724
23725 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
23726
23727         * loader.h: Removed type class from MonoDefaults, added monotype
23728
23729         * loader.c: Loaded MonoType, removed loading of Type
23730
23731         * icall.c (my_mono_new_object): Now returns a System.MonoType,
23732         and fills in System.Type._impl with a RuntimeTypeHandle rather
23733         than the actual MonoClass *
23734
23735         (ves_icall_type_from_handle): change from type_class to
23736         monotype_class
23737
23738         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
23739         implemented
23740
23741         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
23742         implemented
23743
23744         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
23745
23746         (ves_icall_System_Reflection_Assembly_GetType): implemented
23747
23748         (ves_icall_System_MonoType_assQualifiedName): implemented
23749
23750         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
23751
23752 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
23753
23754         * assembly.c (mono_assembly_open): Implement a cache for the
23755         assemblies. 
23756
23757         (mono_assembly_close): only destroy the assembly when the last
23758         reference is gone.
23759         
23760 2001-11-09  Dick Porter  <dick@ximian.com>
23761
23762         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
23763
23764 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
23765
23766         * class.c (mono_class_metadata_init): bug fix: compute the right slot
23767
23768 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23769
23770         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
23771         from Martin Weindel.
23772         * object.h: add mono_string_chars ().
23773
23774 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
23775
23776         * reflection.c (build_compressed_metadata): Eliminates warnings
23777         and uses 64-bit clean code.
23778
23779         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
23780         (mono_type_equal): Change signature to eliminate warnings.
23781
23782 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23783
23784         * icall.c, loader.c: remove the internalcall array constructors.
23785         Changes to match the new MonoArray structure.
23786         * object.h, object.c: an array object doesn't allocate an extra
23787         vector. Add mono_array_new_full () to create jagged arrays easily.
23788
23789 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23790
23791         * metadata.h, metadata.c: add mono_metadata_field_info () to
23792         retreive all the info about a field from vairous tables.
23793         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
23794         * class.h, class.c: augment MonoClassField with more info.
23795         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
23796         policy and load a field's RVA if needed.
23797
23798 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
23799
23800         * class.c (mono_class_metadata_init): create a trampoline for all
23801         virtual functions instead of actually compiling them.
23802
23803 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
23804
23805         * class.h, class.c: include name in MonoClassField.
23806         * class.c: fix fundamental type of System.Object and System.String.
23807         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
23808         tokens in ldtoken.
23809         * icall.c: remove internalcalls for the Reflection stuff that is now
23810         done in C# code.
23811         * loader.c: mono_field_from_memberref () implementation.
23812         * mono-endian.c: thinko (s/struct/union/g).
23813         * object.c, object.h: make the mono_string_* prototypes actually use
23814         MonoString instead of MonoObject.
23815         * reflection.c, reflection.h: updates for changes in the reflection
23816         code in corlib: we use C structures that map to the actual C# classes.
23817         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
23818         fat method header if needed and use the info from the ILGenerator for
23819         methods. Handle fields in types. Misc fixes.
23820
23821 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
23822
23823         * class.c (mono_class_metadata_init): bug fix: always allocate
23824         space for static class data
23825
23826 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
23827
23828         * class.c (mono_compute_relative_numbering): use relative
23829         numbering to support fast runtime type checks.
23830
23831 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
23832
23833         * class.c (mono_class_create_from_typeref): added debugging output
23834         to print class name when MonoDummy is returned instead of real class
23835
23836 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
23837
23838         * class.c (mono_class_metadata_init): interface offset table now
23839         contains pointers into the vtable - this is more efficient for the jit
23840
23841 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
23842
23843         * class.c (mono_class_metadata_init): use a temporary vtable (the
23844         old algorithm only worked for the interpreter, but not for the jit)
23845
23846 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
23847
23848         * loader.c (method_from_memberref): use mono_class_get to get the
23849         class of an array instead of using System.Array directly.
23850         (mono_get_method): also add MEMBERREF methods to the method cache
23851         which usefull for arrays.
23852
23853 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
23854
23855         * pedump.c (arch_compile_method): added to compute vtable entry
23856
23857         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
23858         number of interfaces.
23859         
23860         * class.h: merged MonoArrayClass into MonoClass
23861
23862         * class.c (mono_class_create_from_typedef): compute the vtable size and
23863         allocate space to include the vtable inside MonoClass
23864         (mono_class_metadata_init): initialize the vtable
23865
23866 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
23867
23868         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
23869         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
23870         * image.c: endian fixes by Laurent Rioux.
23871         * object.h, object.c: rename MonoStringObject to MonoString and
23872         MonoArrayObject to MonoArray. Change some function names to conform to
23873         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
23874         guint16* as first argument, so don't use char*.
23875         Provide macros to do the interesting things on arrays in a portable way.
23876         * threads-pthread.c: updates for the API changes and #include <sched.h>
23877         (required for sched_yield()).
23878         * icall.c: updates for the API changes above.
23879         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
23880         platforms that need them.
23881
23882 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
23883
23884         * class.c: set the correct type for all the fundamental
23885         type when loading the class.
23886
23887 2001-10-05  Dick Porter  <dick@ximian.com>
23888
23889         * threads-pthread.c (pthread_mutex_timedlock): Simple
23890         compatibility version for C libraries that lack this call.
23891
23892 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23893
23894         * class.c: MonoTypes stored in MonoClass are stored as
23895         fundamental MonoTypes when the class represents a
23896         fundamental type (System.Int32, ...).
23897         The TypeHandle return by ldtoken is a MonoType*.
23898         * icall.c: ves_icall_get_data_chunk () write out all the
23899         PE/COFF stuff. Implement ves_icall_define_method (),
23900         ves_icall_set_method_body (), ves_icall_type_from_handle ().
23901         * image.c: properly skip unknown streams.
23902         * loader.h, loader.c: add type_class to mono_defaults.
23903         * metadata.c, metadata.h: export compute_size () as
23904         mono_metadata_compute_size () with a better interface.
23905         Typo and C&P fixes.
23906         * pedump.c: don't try to print the entry point RVA if there is no entry point.
23907         * reflection.c, reflection.h: many cleanups, fixes, output method
23908         signatures and headers, typedef and typeref info, compress the metadata
23909         tables, output all the heap streams, cli header etc.
23910         * row-indexes.h: typo fixes.
23911
23912 2001-10-04  Dick Porter  <dick@ximian.com>
23913
23914         * object.h: Add a synchronisation mutex struct to MonoObject
23915
23916         * object.c (mono_new_object): Initialise the object
23917         synchronisation mutexes
23918
23919         * icall.c: System.Threading.Monitor internal calls
23920         
23921         * threads-pthread.h:
23922         * threads-pthread.c: System.Threading.Monitor internal calls
23923
23924         * threads-types.h: New file, includes the system-specific thread
23925         structures
23926         
23927         * threads-pthread-types.h:
23928         * threads-pthread-types.c: New files, handle pthread-specific
23929         synchronisation types
23930
23931         * threads-dummy-types.h: 
23932         * threads-dummy-types.c: New files of dummy support for
23933         thread-specific types
23934
23935         * metadata.c:
23936         * image.c:
23937         * pedump.c: include mono-endian.h not endian.h
23938         
23939         * Makefile.am: More threads files.
23940         Name mono-endian.h not endian.h
23941
23942 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
23943
23944         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
23945         stuff and implement a few more bits.
23946         * icall.c: a field needs to be dereferenced twice. Do not use the same
23947         name for two variables in the same scope.
23948         * image.c, image.h: cleanups.
23949
23950 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
23951
23952         * class.c (mono_class_metadata_init): bug fix: compute the right size
23953
23954 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
23955
23956         * icall.c: implemented some of the Reflection internalcalls.
23957         * image.c, image.h: start writing out the PE/COFF image.
23958         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
23959         that does the reverse than decode_blob_size ().
23960         * object.c: use mono_metadata_encode_value (). Move here
23961         temporary implementation of mono_string_to_utf8 ().
23962         * rawbuffer.c: make malloc_map static.
23963
23964 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23965
23966         * metadata.c: fix type comparison for arrays.
23967         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
23968         Added a couple of new classes to monodefaults.
23969         * icall.c: added a couple of Reflection-related internalcalls.
23970         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
23971         Added a byval_arg MonoType to MonoClass.
23972
23973 2001-09-28  Dick Porter  <dick@ximian.com>
23974
23975         * icall.c:
23976         * threads-pthread.h: 
23977         * threads-pthread.c: Implemented internal calls for
23978         LocalDataStoreSlot operations.  Applied mutexes around all shared
23979         data.  Reworked the thread creation and Start() operations to
23980         avoid a race condition.
23981         
23982         * threads-dummy.h:
23983         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
23984
23985 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
23986
23987         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
23988
23989 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
23990
23991         * class.c, loader.c: warn and return NULL instead of erroring out.
23992         * icall.c: added System.AppDomain::getCurDomain().
23993         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
23994
23995 2001-09-25  Dick Porter  <dick@ximian.com>
23996
23997         * threads-pthread.h:
23998         * threads-pthread.c: Implemented timed thread joining and added
23999         System.Threading.Thread::Join_internal internal call
24000
24001         * icall.c: Added System.Threading.Thread::Join_internal internal call
24002
24003         * threads-dummy.h:
24004         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
24005
24006 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
24007
24008         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
24009         mono_string_intern () to implement the semantics of the ldstr opcode
24010         and the interning of System.Strings.
24011         * icall.c: provide hooks to make String::IsIntern and String::Intern
24012         internalcalls.
24013
24014 2001-09-23  Dick Porter  <dick@ximian.com>
24015
24016         * threads-dummy.c: 
24017         * threads-dummy.h: New files of dummy threading routines
24018
24019         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
24020         support code based on system specifics
24021
24022         Rename PTHREAD_LIBS to THREAD_LIBS
24023         
24024 2001-09-23  Dick Porter  <dick@ximian.com>
24025
24026         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
24027         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
24028         internal calls.
24029         (mono_thread_init): Set up a Thread object instance to return when
24030         the main thread calls Thread.CurrentThread
24031         (mono_thread_cleanup): Wait for all subthreads to exit
24032
24033         * icall.c: New internal calls for System.Threading.Thread::Sleep
24034         (including Schedule) and CurrentThread
24035
24036         * threads.h: New file, to insulate thread-specific stuff from the
24037         rest of the code
24038
24039 2001-09-21  Dick Porter  <dick@ximian.com>
24040
24041         * threads-pthread.h: 
24042         * threads-pthread.c: New file, for handling pthreads-style
24043         threading support.  Start() now starts a new thread and executes
24044         the ThreadStart delegate instance.
24045
24046         * icall.c: Added the internalcall for
24047         System.Threading.Thread::Start_internal
24048
24049         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
24050
24051 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
24052
24053         * loader.c: work around the different signatures for delegates
24054         constructors csc generates in compiled code vs the ones compiled in mscorlib.
24055
24056 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24057
24058         * class.h, class.c: add mono_class_get_field_from_name ().
24059         * *: Fix C comments and other ANSI C issues.
24060
24061 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
24062
24063         * endian.h, assembly.c: fix some endianness issues.
24064
24065 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
24066
24067         * loader.h, load.c: add delegate_class to mono_defaults.
24068         Handle runtime provided methods in mono_get_method ().
24069
24070 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
24071
24072         * loader.c (mono_get_method): use pinvoke for internal call
24073
24074         * icall.c: use pinvoke for internal call
24075
24076         * loader.c (method_from_memberref): set the method name
24077
24078 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
24079
24080         * metadata.c: help the compiler generate better code for
24081         mono_class_from_mono_type ().
24082
24083 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
24084
24085         * class.c (mono_class_metadata_init): delayed computing of the
24086         class size to mono_class_metadata_init ()
24087
24088 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
24089
24090         * class.c, class.h: add an interfaces member to MonoClass.
24091         * image.c, image.h: add assembly_name field to MonoImage
24092         from the assembly table.
24093         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
24094
24095 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24096
24097         * class.c: Handle Array in mono_class_from_mono_type ().
24098         * metadata.c, pedump.c: some endian fixes.
24099
24100 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
24101
24102         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
24103         * metadata.c: fix small problem introduced with the latest commit.
24104
24105 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
24106
24107         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
24108         We don't need a MonoMetadata pointer anymore to compare signatures in
24109         mono_metadata_signature_equal (), update callers.
24110         Reduced memory usage an number of allocations for MonoMethodHeader and
24111         MonoMethodSignature.
24112
24113 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
24114
24115         * metadata.c: added compare for szarray.
24116
24117 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
24118
24119         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
24120         and add a couple more types to it and mono_defaults. Give an hint on
24121         classes that need implementing in our corlib and are referenced
24122         in mscorlib.
24123
24124 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
24125
24126         * class.h, class.c: keep track if a class is also an Enum.
24127         * loader.c: Implement a couple more types for use in libffi
24128         marshalling. Gives better diagnostics when failing to dlopen
24129         a library. Set method->klass for P/Invoke methods, too.
24130
24131 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
24132
24133         * class.c, class.h: add a MonoType this_arg to MonoClass that
24134         represents a pointer to an object of the class' type that
24135         can be used by the interpreter and later the type cache.
24136         Add best guess alignment info for valuetype objects.
24137
24138 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
24139
24140         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
24141         into MonoType: one less level of indirection and allocation and
24142         simplifies quite a bit of code. Added cache for MonoTypes that are
24143         used frequently, so that we don't need to allocate them all the time.
24144
24145 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
24146
24147         * class.c (mono_class_create_from_typedef): System.Enum is also a
24148         value type, although it does not derive from System.ValueType
24149         (maybe a bug in the ms compiler?)
24150
24151         * metadata.c (mono_type_size): return the right size for value types
24152
24153         * loader.c (mono_get_method): only initialize method header if not abstract
24154
24155         * class.c (mono_class_from_mono_type): use mono_default values. 
24156
24157 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
24158
24159         * *: use MonoClass pointers instead of <type_tokens>
24160         
24161         * class.h: new flag: metadata_inited.
24162
24163         * class.c (mono_class_metadata_init): impl.
24164         (mono_class_instance_size): impl.
24165         (mono_class_data_size): impl.
24166
24167 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
24168
24169         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
24170         MonoClass now has the name and name_space fields. 
24171         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
24172         mono_get_method () takes and optional MonoClass as argument.
24173         Removed mono_typedef_from_name() and added mono_class_token_from_name()
24174         instead that takes advantage of a map from class names to typedef
24175         tokens in MonoImage.
24176
24177 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
24178
24179         * metadata.c: zero is not a valid alignment boundary.
24180         Merge MONO_TYPE_VOID in default decoding code.
24181
24182 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
24183
24184         * image.h: merged MonoMetadata into MonoImage
24185
24186         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
24187         identify the type of elements.
24188
24189 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
24190
24191         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
24192         * cil-coff.h: split MonoMSDOSHeader and add size info.
24193         * image.c: add some consistency checks.
24194         * metadata.c: fix row size computation: one programmer
24195         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
24196         add explanation for the locator routine.
24197         Fix decoding of size in method header.
24198         
24199 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
24200
24201         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
24202         (g_concat_dir_and_file): Bring g_concat_dir_and_file
24203         function from gnome-libs.  This uses the right path separator
24204         based on the OS, and also works around a bug in some systems where
24205         a double slash is not allowed. 
24206         (default_assembly_name_resolver): Use g_concat_dir_and_file
24207         (mono_assembly_open): ditto.
24208
24209 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
24210
24211         * metadata.c (mono_metadata_signature_equal): impl.
24212
24213         * *: void is now a realy MonoType (instead of using NULL)
24214         
24215         * metadata.c (do_mono_metadata_parse_type): use
24216         mono_metadata_parse_type to parse void value.
24217
24218 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
24219
24220         * metadata.c, metadata.h: in the signature and method header store
24221         only the space required for holding the loca vars and incoming arguments.
24222
24223 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
24224
24225         * metadata.c (do_mono_metadata_parse_type): treat void like any
24226         other type (instead of assigning NULL);
24227
24228 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
24229
24230         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
24231
24232 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
24233
24234         * image.c (do_mono_image_open): added a cache for arrays.
24235
24236 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24237
24238         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
24239         decode a single column from a row in a metadata table and changes
24240         to take advantage of it in the typedef locator (gives a nice speed up).
24241         Store offset info for function params.
24242
24243 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
24244
24245         * image.h (MONO_IMAGE_IS_CORLIB): removed 
24246
24247 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
24248
24249         * assembly.c: how could mono_assembly_close () had ever worked?
24250         * metadata.c, metadata.h: provide offset info for local vars.
24251         Implement mono_type_size () to take care of alignment as well
24252         as size (it was mono_field_type_size in cli/class.c before).
24253
24254 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
24255
24256         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
24257
24258         * assembly.h (CORLIB_NAME): set to corlib.dll
24259
24260         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
24261
24262 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24263
24264         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
24265         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
24266         tokentype.h: massive namespace cleanup.
24267
24268 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24269
24270         * metadata.h, metadata.c: decode exception clauses when parsing method header.
24271
24272 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
24273
24274         * metadata.c (mono_metadata_free_type): added check for type !=
24275         NULL (void) before calling mono_metadata_free_type()
24276
24277 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
24278
24279         * metadata.h, row_indexes.h: added header with enumerations to use
24280         to index in the columns from tables in metadata and to decode coded
24281         tokens: we should start using this instead of embedding magic numbers
24282         all over the code.
24283
24284 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
24285
24286         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
24287         Move metadata_t info from cli_image_info_t to MonoImage, where
24288         it's easily accessible. Changed all the uses accordingly.
24289         Added the method and class caches to MonoImage.
24290         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
24291         and mono_metadata_decode_value () signature to be more consistent
24292         with the other parse functions (and simplify code). Taken advantage
24293         of zero-length array allocation with GCC. Removed reduntant (and
24294         wrong) MonoFieldType struct and use MonoParam instead. Changed
24295         mono_metadata_parse_field_type () to use common code for parsing.
24296         Added mono_metadata_typedef_from_field () and
24297         mono_metadata_typedef_from_method () to lookup a typedef index from a
24298         field or method token.
24299         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
24300
24301 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
24302
24303         * metadata.c (mono_metadata_parse_field_type): Implement. 
24304         (do_mono_metadata_parse_type): Split engine from
24305         mono_metadata_parse_type, so that we can create smaller structures
24306         for things that just have one pointer to the MonoType (look at
24307         the MonoFieldType)
24308
24309 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
24310
24311         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
24312         as Jan Gray found out, it is incorrect. 
24313
24314 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
24315
24316         * assembly.c: Implement asssembly loading.  This loads an image
24317         and loads all the referenced assemblies.  Come to think of it, we
24318         could always do lazy loading of the assemblies. 
24319
24320         * image.c (mono_image_open): Keep loaded images in a hashtable.
24321
24322         * image.h (MonoImage): Add reference count.
24323
24324 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
24325
24326         * assembly.c (mono_assembly_open): Keep track of the file name in
24327         case the assembly has no ASSEMBLY table.
24328
24329         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
24330         from get.c here.
24331
24332 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
24333
24334         * metadata.c, metadata.h: decode local vars in method header
24335         parse function. Change callers accordingly.
24336
24337 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
24338
24339         * metadata.h, cil-coff.h: protect against multiple inclusion.
24340         Added some new structures to hold information decoded from metadata:
24341         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
24342         and relevant decoding/free functions.
24343         * metadata.c: implement decoding functions. Add warning for out of bounds
24344         index in mono_metadata_locate(). Implement mono_get_method () to retreive
24345         all the info about a method signature and invocation. Remove check on
24346         uninitialized local var in parse_mh() and fix memory leak.
24347
24348 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
24349
24350         * metadata.h: More macros.
24351
24352         * tokentype.h: New file.
24353
24354 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
24355
24356         * assembly.c: added a consistency check and initialize
24357         some structures with g_new0().
24358         * metadata.c: fixed a couple more bugs in table size computation
24359         and add other checks for out-of bound access to metadata.
24360
24361 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
24362
24363         * metatada.c: fix bugs computing table sizes. Spew a
24364         warning when index in string heap is out of bounds.
24365
24366 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
24367
24368         * metadata.h: Add a couple of macros to manipulate tokens. 
24369
24370 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24371
24372         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
24373         cli_section_tables).
24374
24375 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
24376
24377         * metadata.c (mono_metadata_user_string): New function, provides
24378         access to the UserString heap. 
24379
24380 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
24381
24382         * metadata.c: Add inline documentation.
24383
24384 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
24385
24386         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
24387         files. 
24388
24389 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
24390
24391         * typeattr.h: New file, TypeAttribute flags. 
24392
24393 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
24394
24395         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
24396         mono_assembly_ensure_section): Section loading code.
24397         (load_section_tables): Load the sections.
24398
24399         * mono/metadata/metadata.c (mono_metadata_locate_token,
24400         mono_metadata_locate): Functions to locate the information
24401         definition given a token or a table and an index.
24402         (mono_metadata_compute_table_bases): New.
24403         (compute_size): New function to compute the sizes of the various
24404         tables.
24405
24406         * mono/metadata/metadata.h: Finish listing the different index
24407         types. 
24408
24409         * mono/metadata/pedump.c: Improve to dump new information.
24410
24411 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
24412
24413         * mono/metadata/metadata.c: Entered all the tables matching
24414         Beta2. 
24415
24416         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
24417
24418
24419