2008-01-05 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
2
3         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
4         barrier.
5         (mono_array_clone_in_domain): Ditto.
6         (mono_array_clone_in_domain): Ditto.
7
8         * threads.c (start_wrapper): Register the thread start argument as a GC root.
9         (cache_culture): Use a write barrier.
10
11         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
12         (ves_icall_get_property_info): Ditto.
13
14         * object.h (MONO_STRUCT_SETREF): New macro.
15
16         * class-internals.h (MonoStats): Add some GC statistics.
17
18         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
19
20 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
21
22         * exception.c (mono_exception_from_name_two_strings):
23         Break from loop after method is found.
24
25 2008-01-04  Dick Porter  <dick@ximian.com>
26
27         * process.c (process_module_string_read): Rename variable to
28         reflect correct usage, after fixing bug 345972.
29
30 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
31
32         * verify.c (mono_type_create_fnptr_from_mono_method): 
33         created a MonoType function pointer instance to be used during
34         verification. The verifier releases this memory at end.
35
36         * verify.c (mono_method_is_constructor): extracted repeated
37         checks for constructor into a single class.
38
39         * verify.c (do_push_field): use new extracted method
40         for constructor check.
41
42         * verify.c (do_newobj): same.
43
44         * verify.c (do_ldftn): renamed to do_load_function_ptr
45         and make it verify ldvirtftn too.
46
47         * verify.c (mono_method_verify: proper verification
48         of ldvirtftn. release created MonoMethod instances.
49
50 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
51
52         * verify.c (token_bounds_check): added.
53
54         * verify.c (do_ldftn): added.
55
56         * verify.c (mono_method_verify): proper verificartion of ldftn.
57
58 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
59
60         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
61         than the table row count. It's the resposibility of the caller to
62         make the bounds check and raise the correct error.
63
64         * metadata.c (mono_metadata_decode_row_col): Same.
65
66         * loader.c (mono_get_method_from_token): perform bounds check
67         on token for methoddef table.
68
69 2007-12-29  Miguel de Icaza  <miguel@novell.com>
70
71         * icall.c
72         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
73         assert into a negative result, the managed code already coped with
74         that.
75
76         Some folks on Windows reported this error. 
77
78 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
79
80         * appdomain.c: Bump corlib version.
81         * icall.c:
82         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
83         CultureInfo.CreateCulture to create CultureInfo for name.
84         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
85         create CultureInfo for name. Fixes bug #347174.
86
87 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
88
89         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
90         flags.
91
92         * verify.c (is_valid_branch_instruction): allow branching to the
93         first instruction of the protected block.
94
95         * verify.c (is_valid_cmp_branch_instruction): same.
96
97         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
98         avoid double initialization.
99
100         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
101         detect which cases the eval stack should just be copied.
102
103         * verify.c (mono_method_verify): check if the eval stack
104         is empty when entering a protected block.
105
106 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
107
108         * verify.c: added is_clause_in_range, is_clause_inside_range,
109         is_clause_nested and verify_clause_relationship. They perform
110         the verifications stated in P1 12.4.2.7.
111
112         * verify.c (mono_method_verify): remove some unused variables,
113         add the new exception clause checks, add instruction border
114         checks for protected block start/end, improved some error 
115         messages and fixed a bug in the way invalid instruction access
116         is detected.
117
118 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
119
120         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
121         from GC 7.0 if available.
122
123         * object.c: Remove an unused define.
124         
125         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
126
127         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
128
129         * null-gc.c (mono_gc_make_descr_for_array): Implement.
130
131         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
132
133         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
134         to take the same arguments as the other make_descr functions.
135
136         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
137
138         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
139         directly.
140
141         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
142         mini.c.
143
144         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
145         call to boehm-gc.c.
146
147         * boehm-gc.c (mono_gc_register_root): Fix a warning.
148
149         * null-gc.c (mono_gc_register_root): Fix a warning.
150
151         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
152
153         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
154         (mono_gc_base_init): Call GC_init ().
155
156         * null-gc.c: Define mono_gc_register_root () as a no-op.
157
158         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
159
160 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
161
162         * verify.c: add prototype for merge_stacks at top
163
164         * verify.c (do_switch): added.
165
166         * verify.c (merge_stacks): on some cases the stack merging
167         was not happening properly. Unequal stack sizes at merge
168         points should be invalid.
169
170         * verify.c (mono_method_verify): added more debug info on stack state.
171         verify switch properly.
172
173 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
174
175         * method-builder.h: New file, moved the mono_mb_ declarations here from 
176         marshal.h.
177
178         * boehm-gc.c marshal.c: Include method-builder.h.
179
180         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
181
182         * marshal.c: Remove some code which is now in method-builder.c.
183
184 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
185
186         * method-builder.c: New file, extraction of the method builder functionality 
187         from marshal.c.
188
189         * marshal.c: Move the mb functions into method-builder.c.
190
191         * marshal.h marshal.c: Export some mono_mb_... functions.
192
193         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
194
195         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
196         the caller.
197
198         * class.c (mono_class_get_full): Check the token type in the dynamic case.
199
200         * loader.c (mono_field_from_token): Ditto.      
201
202         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
203         type as well.
204         
205         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
206         Fixes #342565.
207
208         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
209         a helper function for setting it.
210
211         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
212
213         
214         * assembly.c: Significally simplify code now that referenced assemblies are 
215         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
216
217         * threads.h: Don't include  the internal threads-types.h header file. Fixes
218         #349952.
219
220 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
221
222         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
223         instructions that were target of branches or are at protected block boundaries.
224
225         * verify.c (in_same_block): handle filter clauses.
226
227         * verify.c (is_valid_branch_instruction): added. checks the target of
228         instructions br or brtrue/false.
229
230         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
231         binary branch instructions such as beq and bge.
232
233         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
234         and made it pin the instruction as been part of the exception block.
235
236         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
237         of in_same_block.
238
239         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
240         of in_same_block.
241
242         * verify.c (do_ret): ret from a protected block is unverifiable and
243         not invalid.
244
245         * verify.c (do_static_branch): verify br and br.s instructions.
246
247         * verify.c (merge_stacks): add extra param to support detection
248         of branches in the middle of instructions.
249         
250         * verify.c (mono_method_verify): verify branches and exception blocks
251         that target the middle of instructions. Proper verification of br and br.s.
252
253 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
254
255         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
256         skip_visibility field.
257         (reflection_methodbuilder_from_dynamic_method): Ditto.
258
259         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
260         registrations. Fixes #348193.
261
262         * threads.h: Move the internal mono_thread_get_pending_exception () to
263         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
264
265 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
266
267         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
268         icall registration. Fixes #348193.
269
270         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
271         for corlib classes into object. Fixes #349621.
272
273 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
274
275         * icall.c (property_accessor_nonpublic): new function to determine
276         whether an accessor allows a property to be considered non-public.
277         Returns false for private accessor(s) from parent class, and internal
278         accessor(s) from parent on 2.0 profile (and higher).
279         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
280         to determine whether property should be included if NonPublic flag
281         is set. Fixes bug #349078.
282
283 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
284
285         * verify.c (init_stack_with_value): added.
286
287         * verify.c (mono_method_verify): extracted common
288         code for exception initialization into init_stack_with_value.
289
290         * verify.c (mono_method_verify): initialize the exception
291         for handler clauses as well.
292
293         * verify.c (mono_method_verify): fix the exception clause
294         ordering rules, it should use handler end offset and not
295         start offset.
296
297 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
298
299         * rawbuffer.c: remove useless warning.
300
301 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
302
303         * threads.h, threads-types.h: move functions to the correct header
304         (fixes bug#349952).
305
306 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
307
308         * verify.c (mono_method_verify): proper verification
309         of exception handling clauses ranges and fallthru in
310         and out of protected blocks.
311
312 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
313
314         * verify.c (mono_method_verify): fixed compilation issue.
315
316 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
317
318         * verify.c (mono_method_verify): a printf slipped in, changed
319         to use verifier debug macro.
320
321 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
322
323         * verify.c (is_correct_leave): check for filter clauses.
324
325         * verify.c (do_filter): added.
326
327         * verify.c (mono_method_verify): property verification of leave.
328
329
330 2007-12-18  Mark Probst  <mark.probst@gmail.com>
331
332         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
333         Win32 build, until we figure out how to do the proper thing on
334         Win32.
335
336 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
337
338         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
339         by the previous patch.
340         
341         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
342         the assembly resolve handler for refonly assemblies.
343
344 2007-12-17  Mark Probst  <mark.probst@gmail.com>
345
346         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
347         Make sure only one thread is allowed to commence shutdown, and
348         don't allow new threads to be started once shutdown is in
349         progress.
350
351 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
352
353         * verify.c (is_correct_endfilter): added.
354
355         * verify.c (is_unverifiable_endfilter): added.
356
357         * verify.c (do_endfilter): added.
358
359         * verify.c (mono_method_verify): property verification of endfilter
360         and fixed a corner case or endfinally.
361
362 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
363
364         * verify.h: new flags to support fail fast of unverifiable code and
365         do non-strict verification. Non-strict verification is required to
366         have MS runtime compatibility. There are a huge amount of unverifiable
367         code that it accepts as verifiable. The strict mode verifies the code
368         as the specs says.
369         Non-strict mode will be required in cases where code needs to be
370         accepted as verifiable but fails under strict mode.
371
372         * pedump.c: added support to fail fast and non-strict verification.
373
374         * verify.c: added support for both fail fast and non-strict verification.
375
376 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
377
378         * verify.c (is_correct_endfinally): added.
379
380         * verify.c (mono_method_verify): property verification of endfinally.
381
382 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
383
384         * verify.c (in_any_block): check for filter clauses.
385
386         * verify.c (is_correct_rethrow): added.
387
388         * verify.c (mono_method_verify): property verification of rethrow.
389
390         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
391
392 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
393
394         * verify.c (do_throw): added.
395
396         * verify.c (mono_method_verify): property verification of throw
397
398 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
399
400         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
401         assemblies. Fixes #346425.
402
403 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
404
405         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
406         FieldBuilders.
407
408         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
409
410         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
411         prevent asserts when this is called with a token which might not be valid.
412
413         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
414         lookup_dynamic_token_class with valid_token == FALSE.
415
416         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
417
418         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
419
420         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
421         
422 2007-12-10  Mark Probst  <mark.probst@gmail.com>
423
424         * gc.c: Don't delay threadpool thread finalization unless Mono is
425         shutting down.
426
427 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
428
429         * threads.c: turn an assert into a non-fatal warning.
430
431 2007-12-09  Robert Jordan  <robertj@gmx.net>
432
433         * icall.c (GetVirtualMethod): Add missing argument validation.
434
435 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
436
437         * verify.c (do_cast): added.
438
439         * verify.c (mono_method_verify): property verification of castclass and isinst.
440
441
442 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
443
444         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
445
446         * verify.c (do_stelem): added.
447
448         * verify.c (mono_method_verify): property verification of stelem.X.
449
450 2007-12-07  Mark Probst  <mark.probst@gmail.com>
451
452         * class.c, class-internals.h: Introduce an environment variable
453         (MONO_GENERIC_SHARING) through which the extent of generic code
454         sharing can be controlled (share all classes, share only corlib
455         classes, or share nothing).
456
457         * object.c: Only create runtime generic context for classes for
458         which sharing is enabled.
459
460 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
461
462         * verify.c (do_ldelem): refactor it to work with ldelem.any.
463
464         * verify.c (mono_method_verify): property verification of ldelem.any.
465
466 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
467
468         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
469         added ldelem.X opcodes.
470
471         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
472
473         * verify.c: proper verification of ldelem.X 
474
475 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
476
477         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
478
479 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
480
481         * verify.c (mono_method_verify): null literal requires special handling,
482         the value pushed on stack need to be flagged as so.
483
484         * verify.c (do_ldelema): Verify ldelema properly.
485
486 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
487
488         * verify.c: Verify ldlen properly.
489
490 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
491
492         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
493         to the target object's type. Fixes #346160.
494
495 2007-12-05  Dick Porter  <dick@ximian.com>
496
497         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
498         Solaris needs the same workaround as BSD-derived systems.  Fixes
499         bug 323524, patch by Burkhard Linke
500         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
501
502 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
503
504         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
505         handle to use when error dialog is shown; otherwise, update mask
506         to show no error dialog when an error occurs.
507
508 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
509
510         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
511
512         * class.c (mono_class_get_field_default_value): New helper function to initialize
513         field->def_type and field->data.
514
515 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
516
517         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
518         the general one.
519
520         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
521
522         * marshal.c: Avoid depending on delegate->method_info being set.
523
524         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
525         
526         * object.c (mono_delegate_ctor): Set delegate->method.
527
528         * object-internals.h (struct _MonoDelegate): Add 'method' field.
529
530         * appdomain.c: Bump corlib version.
531
532 2007-11-27  Raja R Harinath  <harinath@gmail.com>
533
534         * metadata.c (mono_generic_inst_equal_full): Short-circuit
535         equality check if we're comparing canonicalized MonoGenericInsts.
536
537 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
538
539         * class.c (generic_array_methods): Call mono_class_setup_methods () before
540         accessing class->methods.
541
542 2007-11-22  Dick Porter  <dick@ximian.com>
543
544         * threads.c: Ensure that the synch_cs is set before trying to use
545         it.
546
547 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
548
549         * profiler.c: r89126 broke the statistial profiler, unbreak.
550
551 2007-11-22  Martin Baulig  <martin@ximian.com>
552
553         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
554
555         * mono-debug.c
556         (mono_debug_debugger_version): Bump to 3.
557         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
558         -> mono_debugger_class_initialized().
559
560         * mono-debug-debugger.c
561         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
562
563         * class.c
564         (mono_debugger_start_class_init_func): Removed.
565         (mono_debugger_class_loaded_methods_func): Added.
566         (mono_class_setup_methods): Call it here.
567
568 2007-11-22  Martin Baulig  <martin@ximian.com>
569
570         * mono-debug.c
571         (mono_debug_add_delegate_trampoline): New public method.
572         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
573
574         * mono-debug.h
575         (MonoSymbolTable): Added `global_data_table'.
576         (MonoDebuggerTypeKind): Removed.
577
578 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
579
580         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
581         these methods.
582
583         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
584         
585 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
586
587         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
588
589 2007-11-20  Martin Baulig  <martin@ximian.com>
590
591         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
592
593         * mono-debug-debugger.c
594         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
595         (mono_debugger_remove_breakpoint): Likewise.
596         (mono_debugger_check_breakpoints): Likewise.
597         (mono_debugger_register_class_init_callback): New public method.
598         (mono_debugger_remove_class_init_callback): Likewise.
599         (mono_debugger_add_type): Likewise.
600
601         * mono-debug-debugger.h
602         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
603
604 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
605
606         * class.c: more interface implementations needed for the
607         array enumerator (fixes bug #341112).
608
609 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
610
611         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
612         fix ParamName of ArgumentNullExceptions.
613
614 2007-11-17  Miguel de Icaza  <miguel@novell.com>
615
616         * reflection.c (mono_reflection_encode_sighelper): Generate the
617         modopts and modreqs.   I have a useless test that crashes monodis,
618         but that shows the code working.
619
620 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
621
622         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
623         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
624
625 2007-11-15  Dick Porter  <dick@ximian.com>
626
627         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
628         When joining a thread, it's the thread that's calling Join that
629         gets WaitSleepJoin state not the target.  Fixes the standalone
630         test case in bug 334740, and hopefully the whole bug too.
631
632 2007-11-15  Dick Porter  <dick@ximian.com>
633
634         * process.c: Read file version info from the files pointed at by
635         process modules, not the current process.  Fixes bug 315969.
636
637         Use windows typedef names in some places to fix warnings on the
638         windows build.
639
640 2007-11-15  Mark Probst  <mark.probst@gmail.com>
641
642         * image.c, metadata-internals.h: Added a generic_class_cache hash
643         to MonoImage for looking up generic classes when sharing generics.
644
645 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
646
647         * sgen-gc.c: warning cleanups.
648
649 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
650
651         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
652         inherited properties.
653
654 2007-11-14  Mark Probst  <mark.probst@gmail.com>
655
656         * object.c, class-internals.h: Added more information to the
657         runtime generic context.
658
659 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
660
661         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
662         instead of just the target method. Generalize the abstract method handling to
663         handle any non-static method.
664
665         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
666         mono_marshal_get_delegate_invoke () signature change.
667
668 2007-11-13  Mark Probst  <mark.probst@gmail.com>
669
670         * class.c, class-internals.h: Made
671         mono_type_get_basic_type_from_generic () public.  Fixed member
672         access check for shared generics.
673
674         * loader.c: Don't insert field into field cache if it's part of a
675         non-inflated generic class.
676
677         * domain.c, domain-internals.h: The generic sharing context is now
678         part of the jit info data structure.  Added two accessor
679         functions.
680
681 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
682
683         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
684         the array Get/Set/Address methods, since the JIT inlines them.
685
686         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
687
688         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
689         (mono_image_init): Initialize runtime_invoke_direct_cache.      
690
691         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
692         mono_marshal_get_delegate_invoke signature change.
693
694         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
695         an additional argument. Add support for invoking abstract methods.
696
697         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
698
699         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
700
701 2007-11-09  Mark Probst  <mark.probst@gmail.com>
702
703         * class.c: Do field layout for open generic classes as well.
704
705 2007-11-09  Mark Probst  <mark.probst@gmail.com>
706
707         * gc.c, gc-internal.h: Don't finalize threadpool threads with
708         other objects, because the threadpool is still around.  Put them
709         in a list instead and after finalizing all other objects in the
710         root domain shut down the thread pool and then finalize the
711         threads.  Fixes bug #337383.
712
713         * threads.c, thread-types.h: New mono_thread_create_internal()
714         function for marking a thread with the threadpool flag before it
715         started.  Set synch_cs to NULL after freeing it.
716
717         * threadpool.c: Mark threadpool threads before they start.
718
719 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
720
721         * reflection.h, reflection.c: don't export random functions
722         and lazy load dbnull and missing objects.
723
724 2007-11-07  Jonathan Chambers <joncham@gmail.com>
725
726         * class.c: Initialize COM types if COM interfaces
727         are present (not just COM classes).
728         
729         Code is contributed under MIT/X11 license.
730
731 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
732         * reflection.c:
733         create_dynamic_mono_image: hook module profiler events (dynamic case).
734         mono_image_basic_init: hook assembly profiler events (dynamic case).
735
736 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
737         * profiler.c:
738         simple_appdomain_unload: completely terminate the profiler
739         instead of only processing the statistical samples.
740         simple_shutdown: make sure this is really called exactly once,
741         even in multithreaded applications, and always listen to
742         appdomain events.
743         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
744         here, the "[un]load" functions will do it.
745         Fixes bugs #333791 and #325261.
746
747 2007-11-07  Geoff Norton  <gnorton@novell.com>
748
749         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
750         rather than depend on __APPLE__.
751
752 2007-11-07  Mark Probst  <mark.probst@gmail.com>
753
754         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
755
756 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
757
758         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
759         UTF16 MonoString. Fix the crash from bug #335488
760
761 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
762
763         * marshal.c: Correct (for non-Win32 OS) length != size in 
764         mono_string_from_bstr. Fix #339530.
765
766 2007-11-06  Geoff Norton  <gnorton@novell.com>
767
768         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
769         to succeed
770
771 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
772
773         * process.c: Added run-time GetProcessId API detection for Windows.
774
775 2007-11-04  Miguel de Icaza  <miguel@novell.com>
776
777         * reflection.c  (mono_param_get_objects): If a parameter has the
778         attribute [System.Runtime.InteropServices.Optional] we should
779         set the DefaultValue of the ParameterInfo to be
780         System.Reflection.Missing instead of DBNull.
781
782         See bug #339013.
783
784         (mono_get_reflection_missing_object): New method,
785         returns the System.Reflection.Missing.Value singleton instance.
786
787 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
788
789         * culture-info-table.h : regenerated.
790
791 2007-11-02  Jonathan Chambers <joncham@gmail.com>
792
793         * icall.c: Use GetEnvironmentStrings on windows
794         so we are using the same environment block as 
795         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
796         #333740.
797         
798         Code is contributed under MIT/X11 license.
799
800 2007-10-31  Martin Baulig  <martin@ximian.com>
801
802         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
803
804         * mono-debug-debugger.h
805         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
806
807 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
808
809         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
810         classes.
811
812 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
813
814         * culture-info-table.h : regenerated.
815
816 2007-10-30  Robert Jordan  <robertj@gmx.net>
817
818         * icall-def.h, icall.c:
819         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
820
821         Code is contributed under MIT/X11 license.
822
823 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
824
825         * class.c (mono_class_setup_vtable): Find the inflated methods in the
826         inflated class instead of inflating them again.
827         
828         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
829         dynamic case.
830
831         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
832         Call setup_supertypes () after klass->parent is set.
833         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
834
835         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
836         for inflated instances of not yet created dynamic generic classes.
837         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
838         times from inflated_method.
839         (methodbuilder_to_mono_method): Ditto.
840
841 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
842
843         * gc.c: code cleanup and removed old untested option of not creating the
844         finalizer thread.
845
846 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
847
848         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
849         creating a jump trampoline for dynamic methods.
850
851 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
852
853         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
854         generic TypeBuilders when called from another method of the same type (bug #335131).
855
856
857 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
858
859         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
860         doesn't seem to work perfectly.
861         
862         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
863         called multiple times.
864         (methodbuilder_to_mono_method): Ditto.
865         (resolve_object): Inflate FieldBuilder's.
866
867 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
868
869         * string-icalls.c, string-icalls.h, appdomain.c: patch from
870         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
871         RemoveEmptyEntries in the string.Split implementation (bug #322375).
872
873 2007-10-26  Dick Porter  <dick@ximian.com>
874
875         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
876         Thread initialisation changes
877
878 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
879
880         * verify.c: fix compatibility check between arrays and System.Array
881
882 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
883
884         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
885         too. Fixes #336999.
886
887 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
888
889         * object.c (mono_value_box): Use typed allocation here.
890
891 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
892
893         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
894         trampoline instead of compiling the method right away.
895
896         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
897
898 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
899
900         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
901         related fields for dynamic classes. Fixes #334493.
902
903 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
904
905         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
906         
907         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
908
909         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
910         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
911
912         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
913
914         * reflection.c (create_generic_typespec): Initialize klass->generic_container
915         if needed.
916         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
917
918 2007-10-18  Jonathan Chambers <joncham@gmail.com>
919
920         * marshal.c: Use correct key when removing item
921         from ccw_hash.
922         
923         Code is contributed under MIT/X11 license.
924
925 2007-10-17  William Holmes  <billholmes54@gmail.com>
926
927         *marshal.c: Adding a case to marshal booleans to U1
928
929         Code is contributed under MIT/X11 license.
930
931 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
932
933         * class.c (mono_class_from_name): Search the modules compromising dynamic
934         assemblies. Fixes #331601.
935
936 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
937
938         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
939         exception if the type name contains an assembly component. Fixes #334203.
940
941         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
942         modules inside dynamic assemblies. Fixes #334200.
943         
944         * reflection.c: Set image->public_key and image->public_key_length;
945
946         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
947         fields.
948
949         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
950         
951 2007-10-16  Mark Probst  <mark.probst@gmail.com>
952
953         * metadata.c: Implemented correct comparing of generic classes.
954         An inflated generic class can be equal to a non-inflated one if it
955         is inflated with generic type variables as type arguments.  Fixes
956         bug #333798.
957
958 2007-10-15  Dick Porter  <dick@ximian.com>
959
960         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
961         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
962         81646.
963
964         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
965         instead of a monitor lock.  This means that monitor_try_enter and
966         co can set the thread state safely.
967         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
968         thread_interrupt_requested, so interrupt actually works.
969
970         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
971         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
972         state accessor function
973
974 2007-10-15  Martin Baulig  <martin@ximian.com>
975
976         * mono-debug.h
977         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
978         the debugger with the current runtime.
979
980 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
981
982         * object.c, object-internals.h: added the ability to set a single
983         trampoline for all the slots in a vtable.
984
985 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
986
987         * marshal.c: deal with a possible race condition during multicast
988         delegate invocation.
989
990 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
991
992         * class.c: ensure value type methods don't have the synchronized
993         flag set.
994
995 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
996
997         * string-icalls.c, string-icalls.h: reverted unapproved patch that
998         breaks the build.
999
1000 2007-10-11  Joel Reed  <joelwreed@comcast.com>
1001
1002         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
1003         to take an options parameter so that empty entries can be removed during
1004         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
1005
1006 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1007
1008         * marshal.c: make sure we don't store the signature from a dynamic
1009         method into the runtime invoke cache (bug #327189).
1010
1011 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1012
1013         * marshal.c: make sure the wrapper methods are properly initialized.
1014
1015 2007-10-11  Mark Probst  <mark.probst@gmail.com>
1016
1017         * metadata.c, metadata-internals.h: Generalized
1018         mono_type_stack_size() to mono_type_stack_size_internal() which
1019         takes an additional argument specifying whether it allows open
1020         types.
1021
1022 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1023
1024         * verify.c (do_invoke_method): handle typedbyref params
1025         correctly and check for unverifiable return values.
1026
1027         * verify.c (do_newobj): fix a warning.
1028
1029 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1030
1031         * verify.c: don't tread typedbyref as allways unverifable,
1032         so uses, like (ld/st)loc.0 are valid. verify for the cases
1033         that it matters, like boxing related operations.
1034
1035 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1036
1037         * verify.c: add verification of the newobj opcode. verification
1038         of delegate instantation still missing due ldftn and virldftn not
1039         pushing the function type on stack
1040
1041 2007-10-08  Mark Probst  <mark.probst@gmail.com>
1042
1043         * class-internals.h: Runtime generic context data structure
1044         definition.
1045
1046         * object.c: Initialization of runtime generic context at runtime
1047         vtable creation time.
1048
1049 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
1050         * class.c (mono_class_create_from_typedef,
1051         mono_class_from_generic_parameter, mono_ptr_class_get,
1052         mono_fnptr_class_get, mono_bounded_array_class_get)
1053         * domain.c (mono_domain_create, mono_domain_free)
1054         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
1055         * image.c (do_mono_image_load, mono_image_close):
1056         Hooked up load-unload profiler events.
1057
1058 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1059
1060         * domain.c: track statistics about the actual amount of native code
1061         allocated.
1062
1063 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1064
1065         * class.c: the valuetype enumerators don't have the additional
1066         supertypes interfaces.
1067
1068 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1069
1070         * class.c: need more interfaces setup for the IEnumerator<T>
1071         object created for arrays (tests/ienumerator-interfaces.2.cs).
1072
1073 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
1074
1075         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
1076
1077 2007-10-05  Alp Toker  <alp@atoker.com>
1078
1079         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
1080         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
1081         #315863.
1082
1083 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
1084
1085         * verify.c (verify_type_compatibility_full): verification of
1086         compatibility improved, validates correctly non-strict checks between
1087         native int and I4 types different than (unsigned)int32.
1088
1089         * verify.c (do_store_indirect): added, do all verification of
1090         ldind.X opcodes. 
1091
1092         * verify.c (get_load_indirect_mono_type): renamed to
1093         get_indirect_op_mono_type, as it now returns the MonoType for 
1094         ldind.X and stind.X opcodes.
1095
1096 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
1097
1098         * reflection.c: Fix the encoding of generic type definition for
1099         TypeBuilders.
1100
1101         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
1102         mono_image_typedef_or_ref but allows to specify if typespec lookups should
1103         be made. Typespec check is done prior to typeref cache lookup.
1104
1105         * reflection.c (mono_image_typedef_or_ref): now just delegate to
1106         mono_image_typedef_or_ref_full.
1107
1108         * reflection.c (encode_generic_class): encode the generic class
1109         directly instead of calling encode_type.
1110
1111         * reflection.c (encode_type): encode the generic type definition
1112         MonoClass as a generic instantiation.
1113
1114         * reflection.c (create_typespec): cache typespec tokens in
1115         the assembly->typespec cache. Don't create typespec for a generic
1116         instance MonoClass. Create typespec for the generic type defintion.
1117
1118         * reflection.c (create_generic_typespec): encode the generic
1119         class directly instead of calling encode_type.
1120
1121         * reflection.c (mono_image_create_token): encode the generic
1122         type definition not using a typespec for MonoType instances.
1123
1124
1125 2007-10-04  Raja R Harinath  <rharinath@novell.com>
1126
1127         Fix #328812
1128         * class.c (mono_image_init_name_cache): Don't return nested
1129         'protected internal' classes.
1130         (mono_class_from_name_case): Likewise.
1131
1132 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
1133
1134         * icall-def.h, icall.c : get_bundled_machine_config() is now the
1135           common function used by both DefaultConfig in System.dll and
1136           InternalConfigurationHost in System.Configuration.dll.
1137
1138 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1139
1140         * class.c: automatically add to vectors only a few essential explicit
1141         generic interfaces. The rest of the interfaces that arrays should
1142         provide are currently implicitly added (but still not lazily, see the
1143         design in the discussion of bug#325495 for the details of what is
1144         needed for that). Additionally, implicit interfaces are assigned the
1145         same vtable slot as the explicit interfaces (as they are compatible):
1146         this enables huge memory savings since we don't need to instantiate
1147         as many memthods and as large vtables anymore. Also, Since
1148         GetEnumerator<T> returns an instance of a type that is required to
1149         support a similarly large set of interfaces as arrays, we add
1150         implicit interfaces and interface offset sharing support to those
1151         types, too. This change adds all the required interfaces so that
1152         the anonarray.cs test case in the bug report works (we don't add
1153         all the interfaces to arrays of arrays 3-level deep and more because
1154         of the memory requirements explained in the bug and since they are much
1155         less common: the lazy-loading support will enabled them to work, too).
1156
1157 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
1158
1159         * verify.c (merge_stacks): major clean up, all type compatibility
1160         checks are done by verify_type_compatibility. This fix my earlier lack
1161         of understanding of the CLR type system and merge_stacks no longer looks
1162         scary.
1163
1164         * verify.c: fixed some bad spelling.
1165
1166 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
1167
1168         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
1169         a given stack slock.
1170         
1171         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
1172         verify_type_compatibility_full. This removed a near indentical function and fixed
1173         handling of Int32 and IntPtr across all opcodes.
1174
1175 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1176
1177         * class.c: only vectors have the additional generic interfaces.
1178
1179 2007-10-01  Jonathan Chambers <joncham@gmail.com>
1180
1181         * mono-config.c: Use g_strcasecmp instead of
1182         strcasecmp like everywhere else to fix
1183         compilation with MSVC.
1184         
1185         Code is contributed under MIT/X11 license.
1186
1187 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1188
1189         * object.c, object-internals.h: refactored the IMT code to enable
1190         building a single slot at a time and lazily creating the IMT trampolines
1191         and thunks.
1192
1193 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
1194
1195         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
1196
1197         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
1198         Fixes #328501.
1199         
1200 2007-09-29  Raja R Harinath  <harinath@gmail.com>
1201
1202         * loader.c (method_from_methodspec): Rearrange to avoid
1203         un-necessary exposition.  Don't assert out if the method's
1204         declaring type is a generic type definition.
1205
1206 2007-09-28  Martin Baulig  <martin@ximian.com>
1207
1208         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
1209
1210 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
1211
1212         * class-internals.h: optimize field layout of MonoClass to
1213         requires less cachelines at runtime and save a few bytes on 64 bit
1214         systems.
1215
1216 2007-09-28  Jb Evain  <jbevain@novell.com>
1217
1218         * reflection.c: when encoding type names in custom attributes,
1219         if the type is a closed generic type, its generic arguments
1220         have to be serialized as AssemblyQualifiedName, so that when
1221         they are deserialized, it's possible to re-create them properly.
1222         Fixes #329450.
1223
1224
1225 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1226
1227         * object.c, class-internals.h: added delegate-creation counter.
1228
1229 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1230
1231         * class.c: cleanup of the code that synthetizes interfaces for
1232         arrays in 2.0: saves quit a bit of corlib mempool memory.
1233         Code to fix bug #325495 ifdeffed out for now until the issues
1234         with memory usage and O(n^2) behaviour are fixed.
1235
1236 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1237
1238         * marshal.c: when possible, do not duplicate the name of the methods
1239         in the method builder and in the generated MonoMethod.
1240
1241 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
1242         * verify.c: added support for type checking ldind_* opcodes.
1243
1244 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
1245
1246         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
1247         which is used to distinguish the fully open instantiation of a TypeBuilder
1248         with the rest. This temporary hack is required to restore the property that
1249         the fully open instantiation is the same type of the generic type definition.
1250
1251         * class-internals.h (mono_generic_class_is_generic_type_definition):
1252         new function as part of the internal API.
1253
1254         * class.c (inflate_generic_type): return NULL when the generic inst is
1255         fully open. The fully open generic type is now the same as the generic type
1256         definition for non TypeBuilder types.
1257
1258         * class.c (mono_generic_class_get_class): removed assert since it is
1259         no longer valid, gklass->cached_class can point to the generic type definition.
1260
1261         * class.c (mono_generic_class_is_generic_type_definition): new.
1262
1263         * metadata.c (mono_generic_class_hash): added is_tb_open field
1264         to the hash calculation.
1265
1266         * metadata.c (free_generic_class): if the generic class is associated
1267         with the generic type definition, its field will come from the mempool and
1268         must not be freed.
1269
1270         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
1271         new, this function identifies the corner case of a TypeBuilder fully open
1272         instantiation.
1273
1274         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
1275         for lookup. Set gclass->cached_class to be the container class in case of
1276         the fully open instantiation of non TypeBuilder types.
1277
1278         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
1279         to compare generic classes.
1280
1281         * reflection.c (method_encode_methodspec): remove assert that
1282         no longer is valid.
1283
1284         * reflection.c (mono_reflection_generic_class_initialize): add
1285         an aditional assert to ensure the proper type is used.
1286
1287 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
1288
1289         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
1290         to enjoy it.
1291
1292 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
1293
1294         * verify.c (push_arg): Fixed support for ldarga
1295         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
1296         MonoType used as first arg in case of instance calls.
1297
1298 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
1299
1300         * verify.c: Support for verifying VAR and MVAR types, 
1301
1302 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
1303
1304         * icall.c (ves_icall_get_property_info): Set the reflected type of the
1305         accessors correctly.
1306
1307 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
1308
1309         * threads.c: support OSX and other systems in
1310         mono_thread_get_stack_bounds (bug #328026).
1311
1312 2007-09-25  Martin Baulig  <martin@ximian.com>
1313
1314         * mono-debug.h
1315         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
1316
1317 2007-09-24  Martin Baulig  <martin@ximian.com>
1318
1319         * mono-debug.h
1320         (MonoDebugClassEntry): Moved the definition of this struct into
1321         mono-debug.c to make it private.
1322
1323         * mono-debug.c
1324         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
1325         type table per symbol file, we don't need to store the symfile id
1326         any longer.
1327
1328 2007-09-24  Martin Baulig  <martin@ximian.com>
1329
1330         Create one type table per symbol file, since a `MonoClass *' gets
1331         invalid when its image is unloaded.
1332
1333         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
1334         (MonoDebugHandle): Added `type_table'.
1335
1336 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
1337
1338         * mempool.c, mempool.h: added mono_mempool_new_size () API
1339         to be able to specify a smaller initial size for the pool.
1340         Adjusted the code to slowly increase pool size before using
1341         the previous default size.
1342         * image.c: use a small initial size for image mempools.
1343
1344 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
1345
1346         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
1347         Fixes ##320990.
1348
1349         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
1350         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
1351
1352 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
1353
1354         * metadata.c (mono_type_create_from_typespec): Remove an invalid
1355         free. Fixes #327438.
1356
1357 2007-09-21  Raja R Harinath  <harinath@gmail.com>
1358
1359         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
1360         generic instantiations, etc.
1361         <MONO_TYPE_ARRAY>: Likewise.
1362
1363 2007-09-21  Martin Baulig  <martin@ximian.com>
1364
1365         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
1366         these structs were never defined.
1367         (MonoDebugHandle): Removed the `_priv' field, it was never used.
1368
1369 2007-09-21  Martin Baulig  <martin@ximian.com>
1370
1371         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
1372
1373 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
1374
1375         * image.c: removed the guid hash tables: we can get the same info
1376         without the additional memory usage hit (partially fixes also bug #327052).
1377
1378 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
1379
1380         * profiler.h, profiler-private.h, profiler.c: add a new profiler
1381         event to handle unloading methods. After the event is called, the
1382         corresponding MonoMethod* must be considered invalid.
1383         * loader.c (mono_free_method): call the new mono_profiler_method_free
1384         event.
1385
1386 2007-09-20  Mark Probst  <mark.probst@gmail.com>
1387
1388         * domain-internals.h: New flag in MonoJitInfo which marks shared
1389         generic methods.  New hash table (shared_generics_hash) in
1390         MonoDomain to keep track of shared generic methods.  Prototypes
1391         for functions to register and lookup shared generic methods.
1392
1393         * domain.c: Support for registering and looking up shared generic
1394         methods via a hash table (shared_generics_hash) in MonoDomain.
1395
1396         * class-internals.h: New exception to signal failure of shared
1397         compilation of a generic method.  New counters for generics
1398         sharing in MonoStats.
1399
1400 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
1401
1402         * image.c, metadata-internals.h: don't keep a file descriptor open
1403         for loaded assemblies (bug#325988).
1404
1405 2007-09-19  Raja R Harinath  <rharinath@novell.com>
1406
1407         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
1408         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
1409         use the corresponding datatypes.
1410         (type_in_image): Update to changes.
1411         (CleanForImageUserData): Simplify.
1412         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
1413         Avoid quadratic behaviour in handling the "stolen" list by
1414         separating the filter predicate out, and by prepending the stolen
1415         items rather than appending them.
1416         (steal_ginst_in_image): Likewise.
1417         (mono_metadata_clean_for_image): Update to changes.
1418
1419 2007-09-19  Martin Baulig  <martin@ximian.com>
1420
1421         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
1422
1423 2007-09-19  Martin Baulig  <martin@ximian.com>
1424
1425         * mono-debug.c (mono_debug_cleanup): Don't call
1426         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
1427
1428 2007-09-19  Raja R Harinath  <harinath@gmail.com>
1429
1430         Fix crash on 'make run-test' in mcs/errors
1431         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
1432         Avoid more potential allocations in mono_class_from_mono_type.
1433         (ginst_in_image): Update to changes.
1434         (gclass_in_image): Rearrange slightly.
1435
1436 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
1437
1438         * class.c (mono_class_init): Move the code that sets up class->methods to 
1439         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
1440
1441         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
1442         canonical instance of an inflated generic signature.
1443         (mono_type_create_from_typespec): Remove an invalid free.
1444
1445         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
1446
1447 2007-09-18  Marek Habersack  <mhabersack@novell.com>
1448
1449         * domain-internals.h: added a declaration of the
1450         mono_assembly_load_full_nosearch internal function.
1451
1452         * assembly.c (mono_assembly_load_with_partial_name): use
1453         mono_try_assembly_resolve return value properly.
1454         (mono_assembly_load_full_nosearch): copied the function body from
1455         mono_assembly_load_full, without the code to invoke assembly
1456         search hooks.
1457         (mono_assembly_load_full): calls the above new function and if the
1458         assembly is not resolved, invokes the search hooks.
1459
1460         * appdomain.c (mono_runtime_init): restore the global postload
1461         assembly search handlers.
1462
1463 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
1464
1465         * class.c (mono_class_init): Make sure class->methods and class->properties
1466         are never NULL in the generics case.
1467
1468         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
1469
1470 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
1471
1472         * metadata.c (free_generic_class): Disable some code to fix the build.
1473
1474         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
1475
1476         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
1477         from the image mempool.
1478
1479         * metadata.c (free_generic_class): Free more data from the inflated class.
1480
1481         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
1482
1483         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
1484         mempool.
1485         (mono_type_create_from_typespec): Ditto.
1486
1487         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
1488         MonoImage to the caller.
1489         (mono_init_internal): Save the opened image in a global variable.
1490         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
1491
1492         * reflection.c (resolve_object): Fix a leak.
1493
1494         * metadata.c: Fix the freeing of data in the generics caches.
1495         
1496         * metadata.c (free_generic_inst): Comment this out to fix the build.
1497         (free_generic_class): Ditto.
1498
1499         * metadata.c: Free cached generic methods, instantinations and classes when
1500         they are removed from the caches.
1501         (mono_metadata_free_type): Free the type itself.
1502
1503         * class.c: Free the result of mono_class_inflate_generic_type () in a few
1504         places.
1505
1506 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1507
1508         * boehm-gc.c: restrict managed allocs to __thread supporting
1509         architectures.
1510
1511 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
1512
1513         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
1514         (mono_generic_class_get_class): Fix a leak.
1515
1516         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
1517         mono_metadata_free_type ().
1518         (mono_metadata_inflate_generic_inst): Fix a leak.
1519
1520 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1521
1522         * mono-debug.c (free_header_data): Fix a leak missed earlier.
1523
1524         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
1525         mempool.
1526
1527         * mono-debug.c (mono_debug_close_image): Fix call to 
1528         g_hash_table_remove ().
1529
1530 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1531
1532         * icall-def.h: redirect all the string ctor to the managed
1533         CreateString () methods.
1534         * string-icalls.c, string-icalls.h: removed dead code for string
1535         ctors and icalls.
1536
1537 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1538
1539         * mono-debug.c: Fix memory leaks.
1540
1541 2007-09-14  Jonathan Chambers <joncham@gmail.com>
1542
1543         * threads-types.h: Implement mono_hazard_pointer_set and 
1544         mono_hazard_pointer_clear macros using do/while(0) to fix
1545         compilation with MSVC.
1546         
1547         Code is contributed under MIT/X11 license.
1548
1549 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
1550
1551         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
1552         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
1553
1554 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1555
1556         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
1557         icalls.
1558
1559 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1560
1561         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
1562         managed-code allocated as well.
1563
1564 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
1565
1566         * class.c (mono_class_is_assignable_from): Add support for generic variance.
1567
1568 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
1569
1570         * boehm-gc.c: fixed the build after the AOT changes.
1571
1572 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
1573
1574         * wrapper-types.h: Add an ALLOC wrapper type.
1575
1576         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
1577         reference managed allocator methods.
1578
1579 2007-09-12  Marek Safar  <marek.safar@gmail.com>
1580
1581         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
1582         of Type array and not MonoType, a fix suggested by Hari.
1583         
1584 2007-09-12  Jonathan Chambers <joncham@gmail.com>
1585
1586         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
1587         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
1588         
1589         Code is contributed under MIT/X11 license.
1590
1591 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
1592
1593         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
1594
1595 2007-09-12  Marek Habersack  <mhabersack@novell.com>
1596
1597         * image.c (do_mono_image_open): if assembly file fails to open and
1598         MONO_IOMAP is in effect, try to find the path in a
1599         case-insensitive way.
1600
1601         * appdomain.c (mono_runtime_init): do not install postload hooks -
1602         tests show that MS.NET doesn't use anything of that sort to
1603         trigger the AppDomain.AssemblyResolve event.
1604         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
1605         made non-static.
1606         (mono_runtime_init): init portability helpers here.
1607
1608         * assembly.c (mono_assembly_load_with_partial_name): if other   
1609         attempts fail, trigger the AppDomain.AssemblyResolve event handler
1610         to resolve the assembly.
1611
1612         * domain-internals.h: added mono_try_assembly_resolve and marked
1613         it as internal.
1614
1615 2007-09-11  Jb Evain  <jbevain@novell.com>
1616
1617         * object-internals.h (MonoReflectionDynamicMethod): add
1618         a `MonoReflectionType *owner` field. The owner is used
1619         * reflection.c:
1620         (mono_reflection_create_dynamic_method): use the owner of the dynamic
1621         method as the class declaring the dynamic method.
1622         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
1623         dynamic method to the declaring type of the methodbuilder.
1624
1625 2007-09-11  Mark Probst  <mark.probst@gmail.com>
1626
1627         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
1628         rules for calling methods via reflection.
1629
1630 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
1631
1632         * reflection.c (resolve_object): Add support for MonoGenericClass. 
1633         Inflate MonoType's.
1634
1635 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
1636
1637         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
1638         provide a managed method that does fast allocations without needing
1639         a managed->unmanaged transition. Boehm GC implementation currently
1640         enabled for ptrfree objects on sane architectures.
1641
1642 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1643
1644         * marshal.c, marshal.h: exported a couple of useful functions and
1645         added mono_mb_get_label () to easily handle backward branches.
1646
1647 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
1648
1649         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
1650
1651 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
1652
1653         * loader.c (find_method): Fixed the regression introduced while
1654         fixing bug #81466.
1655
1656 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
1657
1658         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
1659         well.
1660         
1661         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
1662         icall.c reflection.c: Pass a MonoGenericContext argument to 
1663         mono_lookup_dynamic_token ().
1664
1665         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
1666         #82744.
1667         
1668 2007-09-09  Robert Jordan  <robertj@gmx.net>
1669
1670         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
1671         for generic methods.
1672
1673         * object.c (mono_object_get_virtual_method): Handle generic methods.
1674         Fixes bug #78882.
1675
1676         Code is contributed under MIT/X11 license.
1677
1678 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
1679
1680         * image.c: fix locking in mono_image_load_file_for_image ().
1681
1682 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
1683
1684         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
1685         used only as a cache: added an icall to fill it.
1686
1687 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
1688
1689         * reflection.h: exposed mono_reflection_free_type_info
1690         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
1691         since mono_reflection_bind_generic_parameters makes a copy of it.
1692         * reflection.c (free_type_info): subinfos should be freed.
1693         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
1694         made non static.
1695         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
1696         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
1697         this fixes #82695 and #81726.
1698    
1699
1700 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
1701
1702         * process.h, process.c:  added support for user profile/info in
1703           ProcessStartInfo. For now only Windows works.
1704
1705 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1706
1707         * metadata.c: consider the generic arguments when comparing
1708         signatures (bug #82614).
1709
1710 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1711
1712         * cil-coff.h, image.c: updated assembly loader to cope with the
1713         PE32+ 64 bit file format.
1714
1715 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1716
1717         * assembly.c, class.c, domain.c, loader.c: remove useless
1718         inclusion of cil-coff.h.
1719
1720 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
1721
1722         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
1723         if interface is marked with CoClassAttribute. 
1724    
1725         Code is contributed under MIT/X11 license.
1726
1727 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1728
1729         * sgen-gc.c: ensure no object from the to space is copied again or finalized
1730         if it's seen twice in major collections.
1731
1732 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1733
1734         * sgen-gc.c: big objects are not copied to the gray area, but they
1735         need to be considered for scanning, too, if they are brought alive
1736         by an object ready for finalizations or a survived one.
1737
1738 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1739
1740         * sgen-gc.c: properly account the number of disappearing links when
1741         they are nullified.
1742
1743 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1744
1745         * sgen-gc.c: share the code to scan the registered roots between the
1746         different types of collections.
1747
1748 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
1749
1750         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
1751
1752 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
1755         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
1756
1757 2007-08-28  Mark Probst  <mark.probst@gmail.com>
1758
1759         * security-manager.c (mono_security_manager_get_methods):
1760         LinkDemandSecurityException now has 2 arguments instead of 3.
1761
1762 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
1763
1764         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
1765         platforms which need it.
1766
1767 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
1768
1769         * sgen-gc.c: unregister thread data structures with a pthread_key_t
1770         dtor.
1771
1772 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1773
1774         * threads.c: free the thread static data on thread exit.
1775
1776 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
1777
1778         * class.c: walk the hierarchy to find the generic definition for
1779         a class (fixes runtime part of bug #82498).
1780
1781 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
1782
1783         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
1784         ...
1785
1786         * image.c (mono_image_close): Here. Hopefully fixes #82510.
1787
1788 2007-08-24  Mark Probst  <mark.probst@gmail.com>
1789
1790         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
1791
1792 2007-08-24  Robert Jordan  <robertj@gmx.net>
1793
1794         * appdomain.c: don't perform the ':'->';' substitution on Win32.
1795
1796 2007-08-24  Jb Evain  <jbevain@novell.com>
1797
1798         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
1799         for byref types.
1800
1801 2007-08-24  Mark Probst  <mark.probst@gmail.com>
1802
1803         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
1804         #82286.
1805
1806 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
1807
1808         * assembly.c: Fix a warning.
1809         
1810 2007-08-23  Marek Habersack  <mhabersack@novell.com>
1811
1812         * appdomain.c: parse the <runtime> section looking for the probing
1813         element with the 'privatePath' attribute, which sets additional
1814         directories in which the runtime should look for assemblies.
1815
1816 2007-08-23  Robert Jordan  <robertj@gmx.net>
1817
1818         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
1819         Fixes #82499.
1820
1821 2007-08-23  Martin Baulig  <martin@ximian.com>
1822
1823         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
1824         _mono_debug_init_corlib() and remove it from the header file.
1825
1826 2007-08-23  Martin Baulig  <martin@ximian.com>
1827
1828         * mono-debug-debugger.c
1829         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
1830         don't notify the debugger about it.
1831
1832         * mono-debug-debugger.h
1833         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
1834
1835 2007-08-23  Robert Jordan  <robertj@gmx.net>
1836
1837         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
1838         Code is contributed under MIT/X11 license.
1839
1840 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
1841
1842         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
1843
1844 2007-08-22  Martin Baulig  <martin@ximian.com>
1845
1846         * mono-debug.c: Store debugging info on a per-domain basis and
1847         free it on domain unload.  Add support for unloading symbol files.
1848
1849         * mono-debug.h
1850         (MonoDebugList): New typedef.
1851         (MonoSymbolTable):
1852         - add `data_tables and `type_table'.
1853         - replace 'symbol_files' and `num_symbol_files' with a
1854           `MonoDebugList *'.
1855         (mono_debug_data_table): Removed.
1856         (mono_debug_list_add): New public function.
1857         (mono_debug_list_remove): New public function.
1858         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
1859         (mono_debug_init_2_memory): Renamed into
1860         mono_debug_open_image_from_memory().
1861         (mono_debug_close_image): New public function.
1862         (mono_debug_domain_create): Likewise.
1863         (mono_debug_domain_unload): Likewise.
1864         (MONO_DEBUGGER_VERSION): Bump to 60.
1865
1866         * mono-debug-debugger.h
1867         (MonoDebuggerEvent):
1868         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
1869         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
1870         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
1871         - rename `THREAD_CREATED' and `THREAD_EXITED' into
1872           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
1873         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
1874           meaning.
1875         (mono_debugger_add_symbol_file): Removed.
1876         (mono_debugger_add_type): Removed.
1877         (mono_debugger_lookup_type): Removed.
1878         (mono_debugger_lookup_assembly): Removed.
1879
1880         * domain.c
1881         (mono_domain_create): Call mono_debug_domain_create().
1882         (mono_init_internal): Call mono_debug_init_corlib().
1883
1884         * assembly.c
1885         (mono_assembly_close): Call mono_debug_close_image().
1886
1887 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
1888
1889         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
1890         mmap call.
1891
1892 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
1893
1894         * sgen-gc.c: ensure section->pin_queue_end is initialized
1895         correctly when non pinning objects in the section have been found.
1896
1897 2007-08-22  Marek Habersack  <mhabersack@novell.com>
1898
1899         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
1900         containing a list of directories separated by ':'. MSDN docs say
1901         the directories should be separated with ';'. Part of a bugfix for
1902         bug #81446
1903
1904 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
1905
1906         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
1907         it should MonoType and not MonoClass.
1908
1909 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
1910
1911         * culture-info-table.h : regenerated.
1912
1913 2007-08-20  William Holmes  <billholmes54@gmail.com>
1914
1915         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
1916          to call ReplaceFile Kernel32 on windows or in io-layer.
1917         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
1918         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
1919          as an internal call.
1920
1921         Code is contributed under MIT/X11 license.
1922
1923 2007-08-20  Jb Evain  <jbevain@novell.com>
1924
1925         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
1926         and MONO_EXCEPTION_FIELD_ACCESS.
1927
1928         * debug-helpers.[c|h]: new mono_field_full_name function.
1929
1930 2007-08-20  Mark Probst  <mark.probst@gmail.com>
1931
1932         * class.c: Removed class_security_level() and moved it to
1933         security-core-clr.c.
1934
1935         * security-core-clr.c, security-core-clr.h: class_security_level()
1936         is now public and renamed to mono_security_core_clr_class_level().
1937         It also looks for security attributes in the classes a class is
1938         nested in.
1939
1940 2007-08-20  Mark Probst  <mark.probst@gmail.com>
1941
1942         * security-core-clr.c, security-core-clr.h: CoreCLR security
1943         utility functions.
1944
1945         * Makefile.am: Added security-core-clr.[ch].
1946
1947         * security-manager.c, security-manager.h: Functions and enum for
1948         setting and getting the security mode.
1949
1950         * class.c: CoreCLR security checks.
1951
1952 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1953
1954         * icall-def.h, process.c, process.h: implemented icall to get
1955         user/system processor times.
1956
1957 2007-08-17  Mark Probst  <mark.probst@gmail.com>
1958
1959         * domain.c, threads.c, class-internals.h, domain-internals.h: New
1960         reader-lock-free jit_info_table.
1961
1962 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
1963
1964         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
1965
1966         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
1967
1968         * object-internals.h (MonoException): Add missing _data member.
1969
1970 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
1971
1972         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
1973         checking that only methods with matching qname or fqname are picked
1974         from implemented interfaces.
1975
1976 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
1977
1978         * verify.c (do_newarr):added, do type verification of
1979         newarr ops, push the right value on the eval stack.
1980         * verify.c (mono_method_verify): use do_newarr
1981
1982
1983 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
1984
1985         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
1986         factored the common code into get_boxable_mono_type, which
1987         is now using mono_type_get_full, this fixed byref related tests.
1988
1989 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
1990
1991         * class.c: added mono_type_get_full, this function has the same
1992         behavior of mono_class_get_full but the returned MonoType has
1993         all metadata of the associated token in case of a typespec token.
1994         * class.c: added mono_type_retrieve_from_typespec, used by 
1995         mono_type_get_full to retrieve the token type.
1996         * class.c (mono_class_create_from_typespec): changed to use
1997         mono_type_retrieve_from_typespec.
1998         * class.c (mono_ldtoken): changed to use mono_type_get_full
1999         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
2000         * class-internals.h: exported mono_type_get_full for internal use.
2001
2002 2007-08-16  Jb Evain  <jbevain@novell.com>
2003
2004         * domain.c (supported_runtimes): add entry for
2005         the 'moonlight' runtime version.
2006
2007 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2008
2009         * verify.c (mono_method_verify): small typo sliped in.  
2010
2011 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2012
2013         * verify.c (do_unbox_value): added, do type verification of
2014         unboxing ops
2015         * verify.c (mono_method_verify): use do_unbox_value
2016
2017
2018 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2019
2020         * verify.c (dump_stack_value): fixed typo, was printing string
2021         instead of object on stack.
2022         * verify.c (do_box_value): moved the byref check up as it leads
2023         to invalid code and should be done earlier.
2024         * verify.c: improved error messages for and ldobj
2025
2026 2007-08-15  William Holmes  <billholmes54@gmail.com>
2027
2028         * marshal.c (emit_marshal_custom): Omit the call to 
2029           marshal_native_to_managed when calling native to managed 
2030           and the argument is specified as an out argument.
2031
2032         Code is contributed under MIT/X11 license.
2033
2034 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
2035
2036         * verify.c: fixed the type checks for generics, function pointers and vectors.
2037         Added type verification for ldobj and ldtoken. The verifier
2038         would segfault if header or signature of a method contained references
2039         to non-existant types.
2040
2041 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
2042
2043         * marshal.c (cominterop_get_ccw): Patch from
2044         Bill Holmes to no walk up interface hierarchy. 
2045         All parent methods should be present in the interface for COM.
2046    
2047         Code is contributed under MIT/X11 license.
2048
2049 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
2050
2051         * marshal.c (emit_marshal_com_interface): Patch from
2052         Bill Holmes to handle COM Interfaces as return values
2053         for native->managed calls.
2054    
2055         Code is contributed under MIT/X11 license.
2056
2057 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
2058
2059         * marshal.c (cominterop_get_idispatch_for_object): Implement
2060         for runtime callable wrappers.
2061    
2062         Code is contributed under MIT/X11 license.
2063
2064 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
2065
2066         * pedump.c (main): changed from mono_init to mono_init_from_assembly
2067         so 2.0 types are accessible
2068
2069
2070 2007-08-13  Miguel de Icaza  <miguel@novell.com>
2071
2072         * domain.c (mono_init_internal): Call mono_assembly_load_friends
2073         once we load mscorlib.   Due to the order in which we initialize,
2074         the mono_assembly_load_full routine that loads mscorlib did not
2075         load friends.   We now load it once we load the
2076         mono_defaults.internals_visible_class class. 
2077
2078         * assembly.c: Expose the mono_load_friend_assemblies method.
2079
2080 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
2081
2082         * verify.c: improved the handling of boxing, better
2083         type checking for unary ops and conversion. Fix bug
2084         regarding managed pointer compatibility checking
2085
2086 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
2087
2088         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
2089
2090         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
2091
2092 2007-08-09  Raja R Harinath  <rharinath@novell.com>
2093
2094         * reflection.c (dup_type): Remove.
2095         * class.c (dup_type): Remove.
2096         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
2097         instead of the dodgy 'dup_type'.
2098         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
2099         handle the case where 'dup_type' needed the second argument.
2100
2101 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
2102
2103         * domain.c: Fix a warning.
2104
2105 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
2106
2107         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
2108         checking that methods with the same fqname are not overridden
2109         with a method from an ancestor.
2110
2111 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
2112
2113         * threads.c (free_thread_static_data_helper): Avoid a crash if
2114         thread->static_data is not yet set.
2115
2116 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
2117
2118         * marshal.c: Use correct image when emitting
2119         native wrapper for COM calls.
2120    
2121         Code is contributed under MIT/X11 license.
2122
2123 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
2124
2125         * icall-def.h, security.c, security.h :
2126           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
2127
2128 2007-08-07  Martin Baulig  <martin@ximian.com>
2129
2130         * mono-debug-debugger.h
2131         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
2132
2133         * domain.c (mono_domain_free): Call
2134         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
2135
2136 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2137
2138         * verify.c (check_underflow, check_overflow): error message now returns IL offset
2139         * verify.c (in_same_block): code should test if either offset is inside the clauses
2140         * verify.c (mono_method_verify): push the exception into the eval stack of exception
2141         and filter blocks
2142
2143 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
2144
2145         * image.c (mono_image_close): Fix a leak.
2146
2147         * object.c (mono_runtime_invoke_array): Avoid using alloca.
2148
2149         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
2150
2151 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2152
2153         * domain.c, threads.c, threads-types.h: fix memory retention issue
2154         with thread static variables not being cleared on domain unload.
2155         Reuse thread static slots after domain unload.
2156
2157 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
2158
2159         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
2160         nullable type.
2161
2162         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
2163         now done in mono_runtime_invoke_array.
2164
2165         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
2166         receiver is a nullable type.
2167
2168         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
2169         generic parameter.
2170
2171 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
2172
2173         * marshal.c: Implement COM Objects as return type for 
2174         managed->unmanaged calls. Added Release calls for COM Object
2175         out/return values in managed->unmanaged calls.
2176
2177         Code is contributed under MIT/X11 license.
2178
2179 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2180
2181         * threads.h, threads-type.h: move the hazard pointer declarations
2182         to the private header.
2183
2184 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2185
2186         * file-io.c, appdomain.c: memory leak fixes.
2187
2188 2007-08-02  Dick Porter  <dick@ximian.com>
2189
2190         * socket-io.c
2191         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
2192         SO_REUSEADDR setting into io-layer/sockets.c.
2193
2194 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
2195
2196         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
2197         from Object when called on a generic parameter. Fixes #82211.
2198
2199 2007-08-01  Dick Porter  <dick@ximian.com>
2200
2201         * file-io.c (convert_share): Test FileShare values bit-by-bit.
2202         Fixes bug 79250 yet again.
2203
2204 2007-07-30  Martin Baulig  <martin@ximian.com>
2205
2206         Merged the `debugger-dublin' branch.
2207
2208         * mono-debug.h
2209         (MonoDebugDataTable): New typedef.
2210         (MonoDebugMethodAddressList): New typedef.
2211         (MonoDebugWrapperData): Removed.
2212         (MonoDebugSymbolTable): Removed `current_data_table',
2213         `current_data_table_size', `current_data_table_offset'.
2214         (MonoDebugDataItemType): Moved into mono-debug.c.
2215         (MonoDebugMethodJitInfo): Remove `address'.
2216         (mono_debug_data_table): New global variable.
2217         (mono_debug_lookup_method_addresses): New public function.
2218         (mono_debug_find_method): Take a `MonoMethod *', not a
2219         `MonoDebugMethodInfo *'.
2220
2221         * mono-debug.c: Drop support for the old symbol tables.
2222
2223 2007-06-28  Martin Baulig  <martin@ximian.com>
2224
2225         * mono-debug.c (mono_debug_debugger_version): New public variable.
2226
2227 2007-07-31  William Holmes  <billholmes54@gmail.com>
2228
2229         * metadata.c Changed mono_type_create_from_typespec to not insert
2230           the type into the hash map until after
2231           do_mono_metadata_parse_type has completed.
2232         Fixes Bug #82194
2233         Code is contributed under MIT/X11 license.
2234
2235 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
2236
2237         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
2238         generic parameter. Fixes #82211.
2239
2240 2007-07-27  Jb Evain  <jbevain@novell.com>
2241
2242         * pedump.c (dump_metadata, dump_metadata_header): dump
2243         versions contained in the metadata header.
2244
2245 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2246
2247         * threads.c: register small_id_table with the GC.
2248
2249 2007-07-27  Mark Probst  <mark.probst@gmail.com>
2250
2251         * threads.c, threads.h, class-internals.h, object-internals.h:
2252         Hazard pointers, to be used by lock-free parallel algorithms.
2253
2254 2007-07-26  Dick Porter  <dick@ximian.com>
2255
2256         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
2257         routine on non-windows platforms, as I've not managed to think of
2258         a non-kludgy way of doing this.  Finishes off bug 78739.
2259
2260 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2261
2262         * object.c: properly setup interface_bitmap in proxy vtables.
2263
2264 2007-07-25  Marek Habersack  <mhabersack@novell.com>
2265
2266         * appdomain.c (get_shadow_assembly_location): do not use TickCount
2267         to create unique shadow copy target directories, use the domain's
2268         serial number instead. Each domain gets a unique target directory
2269         that way.
2270
2271         * domain.c (mono_domain_create): added code to increment domain
2272         shadow copy serial number and cache the value in the current
2273         domain structure.
2274
2275         * domain-internals.h (struct _MonoDomain): added a new field -
2276         shadow_serial to hold the serial number used in generation of
2277         shadow-copy directories. This is to make sure that the directory
2278         name is unique for each and every domain created. We avoid a race
2279         condition with overriding assemblies already in use by other app
2280         domains.
2281
2282 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
2283
2284         * class.c (mono_bounded_array_class_get): fixed memory leak when 
2285         binding generic parameters.
2286
2287 2007-07-24  Raja R Harinath  <rharinath@novell.com>
2288
2289         * metadata.c (do_mono_metadata_parse_generic_class): Use
2290         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
2291         error.
2292
2293 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2294
2295         * loader.c, class-internals.h, reflection.c: removed the per-method
2296         generics hashtable: we use the global one through the call of
2297         mono_class_inflate_generic_method ().
2298
2299 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2300
2301         * class.c, metadata.c, class-internals.h: introduce yet another
2302         generics global cache for inflated methods (fixes 98% of the perf
2303         issue in bug #81806).
2304
2305 2007-07-23  Raja R Harinath  <rharinath@novell.com>
2306
2307         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
2308         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
2309         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
2310         return a MonoGenericInst containing (a copy) of those types.
2311         (mono_metadata_inflate_generic_inst): Update to changes.
2312         (mono_metadata_parse_generic_inst): Likewise.
2313         (mono_get_shared_generic_inst): Likewise.
2314         * reflection.c (mono_class_bind_generic_parameters): Likewise.
2315         (mono_reflection_bind_generic_method_parameters): Likewise.
2316         * metadata-internals.h: Likewise.
2317         * icall.c (free_generic_context): Kill.
2318         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
2319
2320         * reflection.c (reflection_methodbuilder_to_mono_method): Use
2321         mono_metadata_type_dup.
2322         * marshal.c (mono_mb_create_method): Likewise.
2323
2324         * metadata.c (mono_metadata_type_dup): Rename from
2325         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
2326         MonoImage.  Handle a few more cases, esp. when no mempool is given.
2327         * marshal.c, metadata-internals.h: Update to changes.
2328
2329 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
2330
2331         * class.c: fixed a small leak for array classes and removed warning.
2332
2333 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
2334
2335         * loader.c (mono_method_get_param_token): Make this work on generic methods.
2336         Return 0x8000000 for return parameters. Fixes #82161.
2337
2338 2007-07-21  Marek Habersack  <grendello@gmail.com>
2339
2340         * appdomain.c (get_shadow_assembly_location): append the current
2341         ticks value to the path. Avoids overwriting the same assemblies by
2342         several threads at the same time.
2343
2344 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
2345         and Raja R Harinath  <rharinath@novell.com>
2346
2347         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2348         Simplify slightly.
2349         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
2350         property for testing if a method is a generic method definition.
2351
2352 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
2353
2354         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
2355
2356 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2357
2358         * verify.c: used function from private branch, reverted to the one in class.h 
2359
2360 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2361
2362         * verify.c: a typo slipped in and the code wont compile
2363
2364 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2365
2366         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
2367         disabled box instruction as it is doing the wrong thing
2368         improved stack dump messages, now it is easier to debug type related issues
2369
2370
2371 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
2372
2373         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
2374
2375 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2376
2377         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
2378         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
2379         grouped with class and valuetype. This change will simply 
2380         the code as it should be handled just like unmanaged pointers.
2381
2382 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2383
2384         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
2385
2386 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
2387
2388         * verify.c: several stack merge issues fixed, reference comparisons now
2389         check the type size. strict type check now works correctly.
2390         added more uses of IS_MANAGED_POINTER macro.
2391         fixed issues pointed by running the test suite against .net.
2392         
2393
2394 2007-07-19  Mark Probst  <mark.probst@gmail.com>
2395
2396         * class.c, loader.c, class-internals.h: Removed the
2397         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
2398         defines.
2399
2400         * icall.c: Better error checking in some internal reflection
2401         methods.
2402
2403 2007-07-18  William Holmes  <billholmes54@gmail.com>
2404
2405         * filewatcher.c : removed unused variable 'filename' in 
2406           ves_icall_System_IO_FSW_SupportsFSW
2407
2408 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2409
2410         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
2411         obsolete, removed.
2412
2413 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
2414
2415         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
2416         
2417         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
2418
2419 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
2420
2421         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
2422         Implement generics support.
2423         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2424
2425         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
2426         type_args and method_args arguments.
2427         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
2428         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2429         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
2430
2431 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
2432
2433         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
2434           It adds a rootimage parameter to mono_reflection_get_type_internal,
2435           adds new function mono_reflection_get_type_with_rootimage and use
2436           the rootimage to resolve the types instead of the current image
2437
2438 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
2439
2440         * culture-info-table.h: Forgot to update after r78304.
2441
2442 2007-07-13  Raja R Harinath  <rharinath@novell.com>
2443
2444         * class.c (mono_class_is_open_constructed_type)
2445         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
2446
2447 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
2448
2449         * class.c (mono_bounded_array_class_get):  method fails if used with
2450         an incomplete TypeBuilder enum (no basetype field), fixed it by 
2451         avoiding calculating the size for such array as it cannot be instantiated.
2452         Fix bug #82015
2453
2454 2007-07-12  Raja R Harinath  <rharinath@novell.com>
2455
2456         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
2457         field.
2458         * metadata.c, reflection.c: Update to changes.
2459
2460 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
2461
2462         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
2463         mono_class_is_valid_enum, they are used to valide a enum when loading.
2464         * reflection.c: used new functions to throw TypeLoadException when and
2465         invalid enum is build with TypeBuilder. Fixes #82018
2466   
2467 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
2468
2469         * object.c: forgot commit of mono_class_setup_methods () to access
2470         iface->methods.
2471         * object-internals.h: added a few more handy fields to
2472         MonoIMTCheckItem.
2473
2474 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
2475
2476         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
2477         iface->methods.
2478
2479 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
2480
2481         * class-internals.h, object-internals.h, object.c: IMT-based
2482         interface invocation core from Massimiliano Mantione
2483         (massi@ximian.com) with a reworked arch-specific interface,
2484         bsearch implementation and a few bugfixes and memory savings by me.
2485
2486 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
2487
2488         * class.c (mono_class_create_from_typedef): mono would segfault if 
2489         an enum did not have a __value field. It now throws a TypeLoadException
2490         for such cases. Fix bug #82022
2491
2492 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2493
2494         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
2495
2496 2007-07-09  Mark Probst  <mark.probst@gmail.com>
2497
2498         * class.c (mono_class_init): If a class is already inited but has
2499         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
2500
2501 2007-07-09  Mark Probst  <mark.probst@gmail.com>
2502
2503         * class.c: Properly handle the case of an unimplemented interface
2504         method.  Fixes: 81673.
2505
2506 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
2507
2508         * class-internals.h, object.c: cleanup patch from massi: use
2509         MonoVTable->interface_bitmap since the vtable interfaces offset array
2510         is going away.
2511
2512 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
2513
2514         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
2515         GetMDStreamVersion icall instead.
2516
2517 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2518
2519         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
2520         not use mono_dl_build_path() with a full library name: makes
2521         fallbacks to libgaim and libfam work.
2522
2523 2007-07-06  William Holmes  <billholmes54@gmail.com>
2524
2525         * assembly.c: Added a continue statement in probe_for_partial_name when
2526          parse_assembly_directory_name fails.  Fixes : 82002
2527
2528 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
2529
2530         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
2531         and added a verification  for TYPEDBYREF.
2532         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
2533         make native int interchangeable with int32 and some small cleanup and formating.
2534         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
2535         handle byref of byref.
2536         * verify.c (push_local): handle byref of byref.
2537         * verify.c (do_binop): invalid mix of values is unverifiable
2538         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
2539         added visibility checks
2540         * verify.c (field related method): added visibility checks
2541         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
2542
2543 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
2544
2545         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
2546         string.
2547
2548 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
2549
2550         * profiler.c (mono_profiler_load): Fix an off-by-one error.
2551
2552         * marshal.c (emit_marshal_string): When returning a string from managed code,
2553         allways make a copy even for unicode strings. Fixes #81990.
2554
2555 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
2556
2557         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
2558         of byref generic inst types (bug #81997).
2559
2560 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
2561
2562         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
2563         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
2564
2565 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
2566
2567         * marshal.c (emit_marshal_string): Add support for unicode strings in
2568         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
2569
2570 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
2571
2572         * verify.c: field load/store are now verified, missing only access checks now
2573
2574 2007-06-28  Martin Baulig  <martin@ximian.com>
2575
2576         * mono-debug.c (mono_debug_debugger_version): New public variable.
2577
2578 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
2579
2580         * locales.c: When constructing DateTimeFormat or NumberFormat for
2581         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
2582         MonoCultureInfo contructed from the current locale is always
2583         read-only and has UseUserOverride set to true. All MonoCultureInfo
2584         instances returned for GetCultures have both IsReadOnly and
2585         UseUserOverride set to true. Fixes part of bug #81930.
2586
2587 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
2588
2589        * icall-def.h: Update System.__ComObject icalls
2590        * marshal.c: Avoid managed transition (and object creation)
2591        when looking up COM interface in RCW.
2592        * marshal.h: Ditto.
2593        
2594        Code is contributed under MIT/X11 license.
2595
2596 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
2597
2598         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
2599         to avoid crashes during assembly unloading.
2600
2601 2007-06-22  Raja R Harinath  <rharinath@novell.com>
2602
2603         Fix MethodInfo.IsGenericMethodDefinition
2604         * reflection.c (mono_reflection_bind_generic_method_parameters):
2605         Rearrange code to ensure we always uses a generic method definition.
2606         * class.c (mono_class_inflate_generic_method_full): Set
2607         'generic_container' field only for generic method definitions.
2608         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2609         Use presense of 'generic_container' field as indication of being a
2610         generic method definition.
2611
2612 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
2613
2614         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2615
2616         * object-internals.h: Reflect changes in the layout of the managed Delegate
2617         class.
2618         
2619         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
2620         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
2621         runtime memory used by the dynamic method. Fixes #77146.
2622
2623 2007-06-21  Dick Porter  <dick@ximian.com>
2624
2625         * file-io.h: 
2626         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
2627         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
2628         81767.
2629
2630 2007-06-21  Raja R Harinath  <rharinath@novell.com>
2631
2632         * reflection.c (method_encode_methodspec): Add a tripwire.
2633         * class.c (inflate_generic_type): The fully open generic type is
2634         not the same as the generic type definition.
2635
2636 2007-06-21  Martin Baulig  <martin@ximian.com>
2637
2638         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
2639
2640         * mono-debug-debugger.h
2641         (MonoDebuggerBreakpointInfo): Removed.
2642         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
2643         (mono_debugger_remove_breakpoint): Likewise.
2644         (mono_debugger_breakpoint_callback): Likewise.
2645         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
2646
2647 2007-06-21  Raja R Harinath  <rharinath@novell.com>
2648
2649         * metadata.c (mono_metadata_lookup_generic_class): The fully open
2650         generic type is not the same as the generic type definition.
2651         * class.c (mono_generic_class_get_class): Likewise.
2652
2653 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
2654
2655         * icall.c: The second argument to 
2656         System.Reflection.MethodBase.GetMethodFromHandleInternalType
2657         is a MonoType not a MonoClass.
2658
2659 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
2660
2661         * verify.c: support for function pointers in the verifier
2662
2663 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
2664
2665         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
2666
2667 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2668
2669         * assembly.c: removed Mono.Data.SqliteClient from the list of
2670         forward-compatible assemblies as it breaks the ABI (bug #81899).
2671
2672 2007-06-19  Raja R Harinath  <rharinath@novell.com>
2673
2674         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
2675         lookup/update with the loader lock.
2676         * reflection.c (mono_class_bind_generic_parameters): No need to
2677         protect mono_metadata_lookup_* with the loader lock.
2678         * class.c (inflate_generic_type): Likewise.
2679         
2680         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
2681         on a generic instantiated type.
2682
2683 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
2684
2685         *verify.c: produce meanfull error messages on verification error
2686         *verify.c: fixed some cases of verification errors reported as validation errors
2687         *pedump.c: fixed the error name array, now it shows validation errors properly
2688         *verify.h: fixed the contant that should be used for verification errors
2689
2690 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2691
2692         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
2693         for bug #77596, 81858 and 80743 (generics data structures on domain
2694         unload).
2695
2696 2007-06-15  Raja R Harinath  <rharinath@novell.com>
2697
2698         Avoid allocating 'MonoGenericContext' on the heap.
2699         * class-internals (_MonoMethodInflated::context): Make field
2700         inline, not a pointer.
2701         * loader.c (method_from_methodspec): Allocate 'new_context' on the
2702         stack.  Use the context embedded within the inflated method as the
2703         hash key, rather than 'new_context'.
2704         * class.c (inflate_generic_context): Simplify.  Return a struct
2705         rather than allocating on the heap.
2706         (mono_class_inflate_generic_method_full): Update to changes.  Now,
2707         doesn't salt away a copy of the context -- simplifying the
2708         lifetime rules of a 'MonoGenericContext *'.
2709         (mono_method_get_context): Return pointer to embedded context.
2710         (setup_generic_array_ifaces): Allocate temporary context on stack.
2711         * reflection.c (inflate_mono_method): Likewise.
2712         (mono_reflection_bind_generic_method_parameters): Likewise.
2713         Use the context embedded within the inflated method as the hash key.
2714
2715         Avoid a source of allocation of 'MonoGenericContext'.
2716         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
2717         and 'cached_context' fields into embedded 'MonoGenericContext' field.
2718         * class.c: Update to changes.
2719         (mono_generic_class_get_context): Simplify drastically.  Now just
2720         returns a pointer to the field.
2721         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
2722         argument as a const pointer.
2723         (mono_metadata_generic_context_equal): Likewise.
2724         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
2725         Update to changes.
2726
2727 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
2728
2729         * verify.c improved the handling of brtrue/brfalse, factored out common code
2730
2731 2007-06-14  Raja R Harinath  <rharinath@novell.com>
2732
2733         Kill MonoGenericMethod.
2734         * class-internals.h (MonoGenericContext::method_inst): Rename from
2735         'gmethod' and convert to a MonoGenericInst.
2736         (MonoGenericMethod): Remove.
2737         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
2738         * loader.c (method_from_methodspec): Update to changes.  Use a
2739         MonoGenericContext as the key to the hashtable.
2740         * metadata.c (mono_metadata_generic_context_equal): Rename from 
2741         'mono_metadata_generic_method_equal' and take MonoGenericContext.
2742         (mono_metadata_generic_context_hash): Likewise from
2743         'mono_metadata_generic_method_hash'.  Change hash function.
2744         (mono_metadata_load_generic_params): Update to changes.
2745         (mono_get_shared_generic_method): Remove.
2746         * metadata-internals.h (mono_get_shared_generic_method): Remove.
2747         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
2748         (inflate_generic_context): Likewise.
2749         (mono_class_inflate_generic_method_full): Likewise.
2750         (setup_generic_array_ifaces): Likewise.
2751         (mono_class_create_from_typespec): Likewise.
2752         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
2753         (method_encode_methodspec): Update callsite.
2754         (reflection_methodbuilder_to_mono_method): Update to changes.
2755         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
2756         MonoGenericContext as the key to the hashtable.
2757         (inflate_mono_method): Update to changes.
2758
2759         * class-internals.h (MonoGenericMethod::container): Remove.
2760         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
2761
2762 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2763
2764         * profiler-private.h, profiler.c, profiler.h: added API to profile
2765         exception events.
2766
2767 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
2768
2769         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
2770
2771 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
2772
2773         * verify.c: method invocation is now validated, now we verify parameter types on stack.
2774         Fixed overflow and underflow not aborting the verification process.
2775
2776 2007-06-13  Mark Probst  <mark.probst@gmail.com>
2777
2778         * class-internals.h (MonoStats): Added stats entries for dynamic
2779         code allocations.
2780
2781 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
2782
2783         * loader.c (mono_free_method): Free header->locals and header->clauses.
2784
2785         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
2786         dynamic case.
2787
2788         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
2789
2790         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
2791
2792 2007-06-12  Raja R Harinath  <rharinath@novell.com>
2793
2794         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
2795         the tables.
2796
2797 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
2798
2799         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
2800
2801 2007-06-11  Raja R Harinath  <harinath@gmail.com>
2802
2803         MonoGenericMethod on a diet
2804         * class-internals.h (_MonoMethodInflated::reflection_info): Move
2805         here ...
2806         (_MonoGenericMethod::reflection_info): ... from here.
2807         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
2808         Update to changes.
2809         * reflection.c (inflate_mono_method): Likewise.
2810         (mono_reflection_bind_generic_method_parameters): Likewise.
2811
2812 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
2813
2814         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
2815         *verify.c: factored long ldarg forms to share code with short forms
2816
2817 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
2818
2819         *verify.c: fixed code formating factored some duplicate code
2820         into a new function
2821
2822         *verify.h: fixed binary incompatibility introduced earlier
2823
2824         *pedump.c: fixed formating
2825
2826 2007-06-11  Raja R Harinath  <harinath@gmail.com>
2827
2828         Fix assertion when disassembling Mono.C5.dll
2829         * loader.c (method_from_methodspec): Avoid inflating a method
2830         twice with the same context.  If the methodref is inflated, use
2831         the declaring method instead.
2832
2833         * class.c (mono_class_from_generic_parameter): Fix case similar to
2834         bug #81830 handled below, but for method containers.
2835
2836 2007-06-10  Raja R Harinath  <harinath@gmail.com>
2837
2838         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
2839         get_shared_generic_class.  Directly inflate the instance.
2840         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
2841         (inflate_generic_class): Delete.
2842         (get_shared_generic_class): Delete.  Move setting of
2843         'cached_class' and 'cached_context' ...
2844         * metadata.c (mono_metadata_lookup_generic_class): ... here.
2845
2846         * metadata.c (mono_metadata_lookup_generic_class): Change
2847         signature to take the components of a MonoGenericClass rather than
2848         an allocated MonoGenericClass.  Change semantics to be intern-like.
2849         * reflection.c (mono_class_bind_generic_parameters): Update to
2850         changes.  Make locking region tighter.
2851         * class.c (inflate_generic_class): Update to changes.
2852         (get_shared_generic_class): Likewise.
2853         * metadata-internals.h: Likewise.
2854
2855         * reflection.c (mono_class_bind_generic_parameters): Take and
2856         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
2857         (mono_reflection_bind_generic_parameters): Use
2858         'mono_class_bind_generic_parameters' rather than duplicate the code.
2859         * class.c (mono_bounded_array_class_get): Update to changes.
2860         * object-internals.h: Likewise.
2861
2862         * reflection.c (mono_class_bind_generic_parameters): Only support
2863         parameterizing generic type definitions.  Remove support for other
2864         open types.
2865
2866 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
2867
2868         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
2869
2870         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
2871         in the dynamic case.
2872
2873 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
2874
2875         * threads.c: When cleaning up thread, reset the Background bit.
2876         Fixes bug #81720.
2877
2878 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
2879
2880        * metadata.c: Move variable declarations to top of scope.
2881        * verify.c: Move variable declarations to top of scope.
2882
2883        Code is contributed under MIT/X11 license.
2884
2885 2007-06-08  Raja R Harinath  <rharinath@novell.com>
2886
2887         * reflection.c (mono_class_bind_generic_parameters): Replace
2888         open-coded loop with mono_metadata_inflate_generic_inst.
2889
2890         * class.c (get_shared_generic_class): Don't call
2891         mono_get_shared_generic_inst.  Use the container's own
2892         'class_inst'.
2893
2894         * metadata.c (mono_metadata_load_generic_params): Move
2895         initialization of 'context' field here from ...
2896         * class.c (mono_class_create_from_typedef): ... here, and ...
2897         * loader.c (mono_get_method_from_token): ... here.
2898
2899         * class.c (get_shared_generic_class): Rename from
2900         mono_get_shared_generic_class and make static.
2901         (mono_get_shared_generic_inst): Move to metadata.c.
2902         * loader.c (mono_get_shared_generic_method): Likewise.
2903         * class-internals.h, metadata-internals.h: Update to changes.
2904
2905         Fix #81830
2906         * class.c (mono_class_from_generic_parameter): Don't assume a
2907         generic container owner exists.  Generic containers from monodis
2908         don't have any.
2909
2910 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
2911
2912         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
2913         * verify.h: new typedefs to returns the non-verifiable status
2914         * verify.c: initial implementation of generics, stack merging and object compatibility check
2915
2916 2007-06-06  Mark Probst  <mark.probst@gmail.com>
2917
2918         * class.c, image.c, class-internals.h (MonoImage): class_cache is
2919         a MonoInternalHashTable again (fixed bug in internal hash table
2920         code).
2921
2922 2007-06-06  Mark Probst  <mark.probst@gmail.com>
2923
2924         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
2925         MonoInternalHashTable again (fixed bug in internal hash table
2926         code).
2927
2928 2007-06-06  Mark Probst  <mark.probst@gmail.com>
2929
2930         * class.c, image.c, class-internals.h, domain.c,
2931         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
2932         changes.  Have to figure out what makes them break the SWF
2933         regression.
2934
2935 2007-06-04  Mark Probst  <mark.probst@gmail.com>
2936
2937         * class.c, image.c, class-internals.h (MonoImage): class_cache is
2938         a MonoInternalHashTable now.
2939
2940 2007-06-04  Mark Probst  <mark.probst@gmail.com>
2941
2942         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
2943         MonoInternalHashTable now.
2944
2945 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
2946
2947         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
2948         invoke_impl code.
2949
2950         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
2951
2952         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
2953         dependent trampoline.
2954
2955         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2956
2957         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
2958
2959 2007-05-29  Robert Jordan  <robertj@gmx.net>
2960
2961         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
2962
2963 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
2964
2965         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
2966
2967 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
2968
2969        * marshal.c: Fix interface lookup loops for
2970        cominterop_get_com_slot_for_method and 
2971        cominterop_get_method_interface. Only need to lookup
2972        if type is a class, else use interface type method is on.
2973
2974        Code is contributed under MIT/X11 license.
2975
2976 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
2977
2978         * reflection.c: HasSecurity can be present even if no specially 
2979         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
2980         SecurityAttribute). Fix CAS regression tests on buildbot.
2981
2982 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
2983
2984        * appdomain.c: Add configure checks for header files.
2985        * image.c: Add configure checks for header files.
2986        * file-io.c: Add configure checks for header files.
2987        * debug-mono-symfile.c: Add configure checks for header files.
2988        * threadpool.c: Add configure checks for header files.
2989        * console-io.c: Add configure checks for header files.
2990        * profiler.c: Add configure checks for header files.
2991        * rawbuffer.c: Add configure checks for header files.
2992        * icall.c: Add configure checks for header files.
2993        * rand.c: Add configure checks for header files.
2994        * socket-io.c: Add configure checks for header files.
2995
2996        Code is contributed under MIT/X11 license.
2997
2998 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
2999
3000         * reflection.c (mono_custom_attrs_from_builders): Remove the 
3001         assertion as it breaks the build.
3002         
3003         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
3004
3005         * reflection.c (lookup_custom_attr): Make a copy here too.
3006
3007         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
3008         dynamic images.
3009
3010         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
3011         images.
3012
3013         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
3014         info.
3015
3016 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
3017
3018         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
3019         (load_cattr_value): Ditto.
3020
3021 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
3022
3023         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
3024
3025 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
3026
3027         * threads.c: In "start_wrapper", set apartment_state to MTA if
3028         apartment_state is Unknown and we're running on 2.0 profile or
3029         higher.
3030         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
3031         to main method, then set apartment_state to Unknown on 1.0 profile,
3032         and MTA on 2.0 profile.
3033
3034 2007-05-16  Jb Evain  <jb@nurv.fr>
3035
3036         * class-internals.h (MonoDefaults): Add an attribute_class and
3037           customattribute_data_class.
3038         * domain.c (mono_init_internal): Populate them.
3039         * reflection.c: Use them to remove duplicates. Make a vew
3040         MonoClass variables `static'.
3041
3042 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3043
3044         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
3045         step in implementing IMT, so that all isinst checks now can go
3046         through the bitmap.
3047         This was needed because vtables for TransparentProxy need to look
3048         like the vtable of the "target" class, so they need to point to
3049         its interface bitmap directly.
3050
3051         * object.c: inside "mono_class_create_runtime_vtable" and
3052         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
3053
3054 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
3055
3056         * object-internals.h
3057           culture-info.h : added territory field in MonoCulture and
3058           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
3059         * locales.c : fill territory field above too.
3060         * culture-info-table.h : regenerated.
3061
3062 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
3063
3064         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
3065         Fixes #81599.
3066
3067 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
3068
3069         * object.c: Always initialize apartment, even if 
3070         there is no custom attributes on entry point.
3071         
3072         Code is contributed under MIT/X11 license.
3073
3074 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
3075
3076         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
3077         * metadata.c: If no encoding is set, check for unicode
3078         on class.
3079         
3080         Code is contributed under MIT/X11 license.
3081
3082 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
3083
3084         * threads.c: Handle if mono_thread_current returns NULL 
3085         
3086         Code is contributed under MIT/X11 license.
3087
3088 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
3089
3090         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
3091         in start_wrapper. Added mono_thread_init_apartment_state and
3092         mono_thread_cleanup_apartment_state.
3093         * object.c: Initialize thread apartment state on main thread
3094         by checking for STAThreadAttribute on entry point.
3095         * object-internals.h: Add apartment_state field to MonoThread.
3096         * threads-types.h: Add unmanaged definition of 
3097         System.Threading.ApartmentState, MonoThreadApartmentState.
3098         
3099         Code is contributed under MIT/X11 license.
3100         
3101 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
3102
3103         * class.c: Fix windows build.
3104         * class-internals.h: Fix windows build.
3105         
3106         Code is contributed under MIT/X11 license.
3107
3108 2007-05-08  Robert Jordan  <robertj@gmx.net>
3109
3110         * process.c (CreateProcess_internal):
3111         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
3112         .CreateNoWindow was specified. Fixes #81496.
3113
3114 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3115
3116         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
3117         step in implementing IMT, replaced it with two compact arrays
3118         (interfaces_packed and interface_offsets_packed) and a bitmap that
3119         is used for isinst checks (interface_bitmap).
3120
3121         * class.c: (compare_interface_ids): compare function to pass to
3122         bsearch when looking for an interface with a given id.
3123         (mono_class_interface_offset): reimplemented using bsearch on
3124         interfaces_packed, getting the offset from interface_offsets_packed.
3125         (print_implemented_interfaces): utility debugging function.
3126         (setup_interface_offsets): reworked to initialize interfaces_packed,
3127         interface_offsets_packed and interface_bitmap.
3128
3129         * object.c: replaced all accesses to "MonoClass.interface_offsets"
3130         with uses of interfaces_packed and interface_offsets_packed.
3131
3132 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
3133
3134         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
3135         mono_class_interface_offset prototype to wrap all accesses to
3136         "MonoClass.interface_offsets".
3137
3138         * class.c: Implemented mono_class_interface_offset, and wrapped all
3139         accesses to "MonoClass.interface_offsets".
3140
3141         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
3142         "MonoClass.interface_offsets".
3143
3144 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
3145
3146         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
3147         GetMethodFromHandle overloads (bug #78637).
3148
3149 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3150
3151         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
3152         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
3153
3154 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
3155
3156         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
3157         #81498.
3158
3159         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
3160         gracefully.
3161         (mono_custom_attrs_from_index): Ditto.
3162
3163         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
3164         Fixes #81501.
3165
3166 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
3167
3168         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
3169         is now allocated from a mempool.
3170
3171 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
3172
3173         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
3174         caller holds threads_lock, leading to deadlocks. Fixes #81476.
3175
3176 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
3177
3178         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
3179         mono_loader_clear_error () too late. Fixes #81463.
3180
3181 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
3182
3183         * culture-info-table.h : regenerated.
3184
3185 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
3186
3187         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
3188         is missing.
3189
3190 2007-04-25  Dick Porter  <dick@ximian.com>
3191
3192         * Makefile.am: Put the mingw enforced-optimisation back into the
3193         PLATFORM_WIN32 section.
3194
3195 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
3196
3197         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
3198         patch.
3199
3200         * image.c (mono_image_load_module): New API function to load a module reference.
3201
3202         * image.c (load_modules): Load modules lazily. Fixes #80812.
3203
3204         * class.c (mono_class_from_typeref): Use mono_image_load_module.
3205         
3206         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
3207
3208         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
3209         to mono_image_load_module_dynamic.
3210
3211 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
3212
3213         * marshal.c: Fix calling convention for CCW on non-windows
3214         platforms. STDCALL on windows, CDECL everywhere else to work 
3215         with XPCOM and MainWin COM.
3216         
3217         Code is contributed under MIT/X11 license.
3218
3219 2007-04-23  Martin Baulig  <martin@ximian.com>
3220
3221         Fix #80969.
3222
3223         * loader.c
3224         (method_from_memberref): Added `gboolean *used_context' argument.
3225         (mono_get_method_from_token): Likewise.
3226         (mono_get_method_full): Don't insert the method in the cache when
3227         `used_context' is true.
3228
3229 2007-04-23  Raja R Harinath  <rharinath@novell.com>
3230
3231         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
3232
3233         * reflection.c (mono_reflection_bind_generic_parameters): Don't
3234         create new MonoTypes for returned types.
3235         * class.c (mono_generic_class_get_class): Export mono-internal.
3236         * class-internals.h: Update to changes.
3237
3238 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
3239
3240         * threadpool.c, threadpool.h, icall-def.h: patch from
3241         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
3242
3243 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
3244
3245         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
3246         
3247         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
3248
3249         * threads.c (mono_thread_get_stack_bounds): New helper function.
3250
3251         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
3252         Correctly compute stack bounds when attaching. Fixes #81394.
3253
3254 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
3255
3256         * reflection.c: fix handling of doubles in custom attributes
3257         for the arm-fpa format (bug #81368).
3258
3259 2007-04-18  Raja R Harinath  <rharinath@novell.com>
3260
3261         * reflection.c (assembly_add_win32_resources): Mildly relax an
3262         bounds check to let the end pointer point just past the end of the
3263         allocated buffer.  (may fix #81384)
3264
3265 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
3266
3267         * culture-info-table.h : regenerated.
3268
3269 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
3270
3271         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
3272         the thread is aborted early.
3273
3274 2007-04-05  Dick Porter  <dick@ximian.com>
3275
3276         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
3277         FindFirstFile()/FindNextFile() to find entries.  This lets the
3278         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
3279         81038.
3280
3281         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
3282         the parameters of
3283         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
3284
3285 2007-04-04  Martin Baulig  <martin@ximian.com>
3286
3287         * debug-helpers.c
3288         (mono_method_desc_full_match): Add support for nested classes.
3289
3290 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
3291
3292         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
3293
3294 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
3295
3296         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
3297         waiting for too many threads.
3298
3299 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
3300
3301         * environment.c: Fix return value check on uname so we can get the 
3302         executing version on Solaris operating systems.
3303
3304 2007-03-28  Jb Evain  <jbevain@gmail.com>
3305
3306         * class.c (mono_type_get_name_recurse): Complete the
3307         fix for the creation of assembly qualified names for
3308         pointer types. Fixes #81208.
3309
3310 2007-03-27  Dick Porter  <dick@ximian.com>
3311
3312         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
3313         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
3314         changed.
3315
3316         * threads.c
3317         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
3318         the value of ReleaseMutex().
3319
3320 2007-03-27  Dick Porter  <dick@ximian.com>
3321
3322         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
3323         in little-endian order, not network endian, so must be converted
3324         to host endian here.  Fixes bug 80593.
3325
3326 2007-03-22  Jb Evain  <jbevain@gmail.com>
3327
3328         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
3329         qualified names for pointer types. Fixes #81208.
3330
3331 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
3332
3333         * marshal.c: Add support for PreserveSigAttribute. 
3334         
3335         Code is contributed under MIT/X11 license.
3336
3337 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
3338
3339         * process.c: Fix endianness issues. Fixes #81126.
3340
3341         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
3342         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
3343
3344         * image.c (mono_image_lookup_resource): Make this work on big-endian
3345         machines.Change API contract so the caller needs to free the return value.
3346         
3347         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
3348         API change.
3349         
3350 2007-03-14  Martin Baulig  <martin@ximian.com>
3351
3352         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
3353         mono_type_get_desc() as well.
3354
3355 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
3356
3357         * icall.c:  Fix environ access in VS.  
3358         
3359 2007-03-13  Alp Toker  <alp@atoker.com>
3360
3361         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
3362         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
3363         #63841.
3364
3365 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
3366
3367         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
3368         circular references among dynamic methods. Fixes #81091.
3369
3370         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
3371
3372 2007-03-09  Martin Baulig  <martin@ximian.com>
3373
3374         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
3375
3376 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
3377
3378         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
3379         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
3380         
3381         Code is contributed under MIT/X11 license.
3382         
3383 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
3384
3385         * loader.c: Reapply patch for bug #79424.
3386
3387 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3388
3389         * metadata.c (mono_type_to_unmanaged): Only convert object to
3390         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
3391
3392 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
3393
3394         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
3395         (and incorrectly set) is_reference field from MonoGenericInst.
3396
3397 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
3398
3399         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
3400         a little earlier.
3401
3402         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
3403
3404         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
3405
3406 2007-03-05  Miguel de Icaza  <miguel@novell.com>
3407
3408         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
3409         FileOptions.1 value to mean "temporary", map that to
3410         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
3411
3412         Fixes 80688
3413
3414 2007-03-03  Marek Habersack  <mhabersack@novell.com>
3415
3416         * appdomain.c: implement MS .Net style shadow copying. Copies of
3417         the assemblies are made in a subdirectory of the dynamic base
3418         directory, the assembly names are preserved.
3419         Copy .mdb and .config files along with the assemblies being shadowed.
3420
3421 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
3422
3423         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
3424         (emit_marshal_handleref): Ditto.
3425
3426         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
3427         on Visual C++. Fixes #80671.
3428
3429 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3430
3431         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
3432         for clone operations.
3433
3434 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
3435
3436         * marshal.c: Fix warnings.
3437
3438 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
3439
3440         * loader.c: allow case-insensitive matching of the dll name
3441         in dllmap handling when prefixed with "i:".
3442
3443 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
3444
3445         * threads.c: Fix #ifdef for dummy_apc function for VS.
3446
3447 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3448
3449         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
3450
3451 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
3452         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
3453         giving precedence to the methods with a fully qualified name
3454         (InterfaceName.MethodName) when building the interface sections
3455         of the vtable.
3456
3457 2007-02-16  Dick Porter  <dick@ximian.com>
3458
3459         * threadpool.c (append_job): Fix fast-path array handling, so it's
3460         less likely the array will grow exponentially when the load is
3461         heavy.
3462
3463 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3464
3465         * metadata-internals.h, loader.c: fix dllmap lookup order
3466         for non-function maps, too, and prepare for fallback code.
3467
3468 2007-02-12  Robert Jordan  <robertj@gmx.net>
3469
3470         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
3471         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
3472         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
3473         GlobalFree. Fixes a part of bug #77075.
3474
3475 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
3476
3477         * loader.c: implemented typedef parent in field memberref.
3478
3479 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
3480
3481         * marshal.c: Fix warnings and remember to call Release on
3482         IUnknown of RCW.
3483         
3484         Code is contributed under MIT/X11 license.
3485
3486 2007-02-10  Miguel de Icaza  <miguel@novell.com>
3487
3488         * class-internals.h: Add MonoHandleRef definition, and
3489         handleref_class to mono_defaults. 
3490
3491         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
3492         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
3493
3494         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
3495         (do nothing on this stage)
3496         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
3497         (emit_marshal_handleref): New method, used for argument handling
3498         of HandleRefs. 
3499
3500 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
3501
3502         * class.c (mono_class_setup_parent): Lazily init com types.
3503         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
3504         init com types.
3505         * object.c (mono_remote_class_vtable): Lazily init com types.
3506         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
3507         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
3508         * domain-internals.h: Expose mono_init_com_types.
3509         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
3510         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
3511         Add support for COM Callable Wrapper marshalling.
3512         * marshal.h: Add icall definitions.
3513         * gc.c: Handle freeing of CCWs in finalizer code.
3514         
3515         Code is contributed under MIT/X11 license.
3516
3517 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
3518
3519         * reflection.c: changed all the signature encoding code to use
3520         a variable-sized buffer.
3521
3522 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3523
3524         * marshal.c: locking fixes: never take the loader lock
3525         or other runtime locks when holding the marshal lock
3526         (fixes bug#80664).
3527
3528 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
3529
3530         * marshal.c: make the delegate function pointer mapping
3531         work for the moving GC.
3532
3533 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
3534
3535         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
3536         for bug #80618.
3537
3538 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3539
3540         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
3541         gmodule.
3542
3543 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3544
3545         * threadpool.c: made the code moving-GC safe.
3546
3547 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
3548
3549         * assembly.c, boehm-gc.c, class-internals.h, class.c,
3550         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
3551         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
3552         warning cleanup.
3553         * reflection.c: warning cleanup, some threading and moving GC fixes.
3554
3555 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
3556
3557         * class.c, loader.c: create the needed Set/Get/Address array methods
3558         as well as the .ctors in mono_class_init (), fixes bug #80567.
3559
3560 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
3561
3562         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
3563         we doesn't decrease its alignment. Should fix the sparc build.
3564
3565 2007-01-24  Dick Porter  <dick@ximian.com>
3566
3567         * socket-io.c
3568         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3569         Create the returned object if we need to ignore an unsupported
3570         socket option.  Fixes a segfault reported by Atsushi.
3571
3572 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3573
3574         * class.c, object.c: restrict GC-tracked fields to
3575         UIntPtr fields used inside corlib, so we provide better
3576         type info to the GC and also allow broken packing as in
3577         bug #80580.
3578
3579 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
3580
3581         * sgen-gc.c: removed duplicated function.
3582
3583 2007-01-19  Miguel de Icaza  <miguel@novell.com>
3584
3585         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
3586         value that means that the value is not supported, but that we
3587         should not return a failure, but instead report this as a
3588         successful operation.
3589
3590 2007-01-19  Raja R Harinath  <rharinath@novell.com>
3591
3592         Fix tests/bug79956.2.il
3593         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
3594         (mono_generic_class_get_class): If the generic definition in an
3595         enum, copy over other fields related to it.
3596
3597 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3598
3599         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
3600         genericinst enums (bug #79215).
3601
3602 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
3603         * class.c: Fix bug 80307.
3604
3605 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
3606
3607         * image.c: if the file table is not present, try to load
3608         all the modules, since we don't have info about them
3609         having or not metadata (bug #80517).
3610         * assembly.c: allow mono_assembly_load_references () to
3611         work for netmodules.
3612
3613 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3614
3615         * image.c, metadata-internals.h, object.c: execute module
3616         cctors when running on the 2 runtime if present (bug #80487).
3617
3618 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
3619
3620         * icall.c: optimized InitializeArray() on bigendian.
3621
3622 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
3623
3624         * icall.c: fix for the broken ARM FPA double format.
3625
3626 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3627
3628         * icall.c: handle endian issues for r4 and r8 types, too, in
3629         the InitializeArray() icall.
3630
3631 2007-01-15  Miguel de Icaza  <miguel@novell.com>
3632
3633         * loader.c (mono_loader_error_prepare_exception): Clear the error
3634         once we have extracted the information from it, do this before we
3635         call into the JIT's class loading mechanisms.
3636
3637         * object.c (mono_class_create_runtime_vtable): Do not clear the
3638         loader error before calling mono_class_get_exception_for_failure
3639         as the loader error is needed inside
3640         mono_class_get_exception_for_failure to throw the error (thinko).
3641
3642         Fixes #80521
3643         
3644 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3645
3646         * reflection.c: align fields rva data so it's faster to load at
3647         runtime.
3648
3649 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3650
3651         Prepare to simplify GenericMethod handling.
3652         * class-internals.h (mono_method_get_context): New accessor function.
3653         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
3654         rather than directly accessing '->context' field.
3655
3656         * class-internals.h (_MonoGenericParam.method): Move ...
3657         (_MonoGenericContainer): ... here.  Add into union with klass field.
3658         * class.c, icall.c, loader.c, metadata.c, reflection.c:
3659         Update to changes.
3660
3661 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
3662
3663         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
3664         the wrapper type enum and reduce relocations.
3665
3666 2007-01-12  Raja R Harinath  <rharinath@novell.com>
3667
3668         * reflection.c (inflate_mono_method): Reuse method instantiation
3669         from the generic method, if available.
3670
3671 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
3672
3673         * marshal.c (emit_marshal_variant): Fix conv_arg
3674         type in last commit, based on whether parameter is byref.
3675         
3676 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
3677
3678         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
3679         marshalling.
3680         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
3681         MONO_TYPE_OBJECT back for VARIANT support.
3682
3683 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
3684
3685         * marshal.c, marshal.h, icall-def.h: Implement 
3686         Marshal.ReAllocCoTaskMem.
3687
3688 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
3689
3690         * marshal.c: memory retention fixes: use the proper
3691         image cache for runtime_invoke method lookups.
3692
3693 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3694
3695         * mempool.c: added code to help debug mempool allocations.
3696
3697 2007-01-11  Dick Porter  <dick@ximian.com>
3698
3699         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
3700         support (experimenting with faking it with IP_MTU_DISCOVER for
3701         systems that don't have IP_DONTFRAGMENT.)
3702         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
3703         icall.
3704
3705         * icall-def.h: new System.Net.Sockets.Disconnect icall.
3706
3707         * socket-io.h: Add new fields to MonoSocketAsyncResult
3708         corresponding to the new ones in Socket.cs.
3709
3710 2007-01-11  Raja R Harinath  <rharinath@novell.com>
3711
3712         Fix IronPython regression mentioned in #80249
3713         * metadata.c (do_mono_metadata_parse_generic_class): Clear
3714         'cached_context' field, since it may have been initialized as a
3715         side-effect of metadata parsing.
3716
3717         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
3718         (_MonoGenericClass.cached_class): Move here and rename from lone
3719         remaining field of ...
3720         (_MonoInflatedGenericClass): ... this.  Remove.
3721         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
3722         to changes.
3723
3724         Fix mcs/tests/test-128.cs regression.
3725         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
3726         2007-01-10 change below.
3727         [MONO_TYPE_OBJECT]: Recurse into array case.
3728
3729 2007-01-11  Raja R Harinath  <harinath@gmail.com>
3730
3731         * class-internals.h (mono_get_inflated_generic_class): Remove.
3732         * class.c (mono_get_inflated_generic_class): Remove.
3733         (mono_generic_class_get_class): Rename from
3734         mono_class_create_generic.
3735         (mono_class_from_mono_type) [GENERICINST]: Use it.
3736         * reflection.c, metadata.c: Update to changes.  Use
3737         'mono_class_from_mono_type'.
3738
3739 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3740
3741         * reflection.c: use passed type when encoding an array element
3742         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
3743
3744 2007-01-09  Robert Jordan  <robertj@gmx.net>
3745
3746         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
3747         result arguments (someDelegate.EndInvoke (unrelatedAres)).
3748         Fixes bug #80392.
3749
3750 2007-01-09  Raja R Harinath  <rharinath@novell.com>
3751
3752         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
3753
3754         * object.c (set_value): Avoid aliasing between type->data.klass
3755         and type->data.generic_class.
3756
3757         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
3758
3759 2007-01-08  Raja R Harinath  <rharinath@novell.com>
3760
3761         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
3762         between type->data.klass and type->data.generic_class.
3763
3764 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
3765
3766         * marshal.c: In MS.NET, StringBuilder objects are not copied by
3767         value in out parameters.
3768
3769 2007-01-08  Raja R Harinath  <rharinath@novell.com>
3770
3771         Simplify invariant for MonoGenericClass::klass field.
3772         * class.c (mono_class_create_generic): Verify 'klass' is null.
3773         * metadata.c (do_mono_metadata_parse_generic_class): Don't
3774         initialize 'klass' field.
3775
3776 2007-01-05  Raja R Harinath  <rharinath@novell.com>
3777
3778         Ongoing work to avoid redundant data and simplify invariants.
3779         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
3780         'generic_class', and change type to a GenericInst.
3781         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
3782         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
3783
3784 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
3785
3786         * class.c : skip io-layer under PLATFORM_WIN32.
3787
3788 2007-01-03  Tor Lillqvist  <tml@novell.com>
3789
3790         Fix #80305: In a bundled executable, look in the bundled exe
3791         assembly to determine the runtime version. Add the possibility to
3792         bundle also the machine.config file.
3793         
3794         * assembly.c (mono_assembly_open_from_bundle): Make
3795         non-static. Allow being called even if we have no bundled
3796         assemblies, and return NULL right away in that case.
3797
3798         * domain-internals.h: Declare mono_assembly_open_from_bundle()
3799         here.
3800
3801         * domain.c (app_config_parse): Take an assembly exe file name as
3802         parameter instead of a config file name. Check for a bundled
3803         config file for that assembly by calling
3804         mono_config_string_for_assembly_file() (see below) before looking
3805         for one in the file system.
3806         (get_runtimes_from_exe): Corrsponding change to call of
3807         app_config_parse().
3808         (get_runtimes_from_exe): Check for bundled assembly exe file first
3809         by calling mono_assembly_open_from_bundle(). If no bundled
3810         assembly exe file is found, call mono_image_open() as before to
3811         look it up in the file system.
3812
3813         * mono-config.c: Add variable bundled_machinec_onfig.
3814         (mono_config_string_for_assembly_file): New function.
3815         (mono_config_for_assembly): Move code snippet that looks for a
3816         bundled assembly .config file into the above new function. Call
3817         it.
3818         (mono_register_machine_config, mono_get_machine_config): New
3819         functions to set and retrieve
3820
3821         * assembly.h: Declare mono_register_machine_config().
3822
3823         * mono-config.h: Declare mono_get_machine_config() and
3824         mono_config_string_for_assembly_file().
3825
3826         * icall.c: No declaration of environ necessary on Win32. It is
3827         declared (as a macro expanding to a function call) in stdlib.h.
3828         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
3829         New internal mono function. Returns the value of
3830         mono_get_machine_config() as a Mono string.
3831
3832         * icall-def.h: Add get_bundled_machine_config().
3833
3834 2007-01-04  Raja R Harinath  <rharinath@novell.com>
3835
3836         Remove redundant field
3837         * class-internals.h (_MonoGenericContext.container): Remove field.
3838         * loader.c (mono_method_get_signature_full): Don't parse a
3839         "container" for a signature parse when the signature is inflated
3840         immediately.
3841         (method_from_methodspec): Likewise, for a generic_inst.
3842         * class.c, metadata.c, reflection.c: Update to changes.
3843
3844 2006-01-04  Raja R Harinath  <rharinath@novell.com>
3845
3846         * class-internals.h (_MonoGenericClass): Rename 'context' field to
3847         'cached_context', and change semantics -- it starts off NULL, and
3848         is initialized on demand.
3849         * class.c (mono_generic_class_get_context): New accessor to
3850         replace 'context' field accesses.
3851         (mono_class_get_context): New helper.
3852         (*): Update to changes.
3853         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
3854
3855 2007-01-03  Miguel de Icaza  <miguel@novell.com>
3856
3857         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
3858         before the memcpy.   Fixes Marshal2 regression.
3859
3860 2007-01-02  Jb Evain  <jbevain@gmail.com>
3861
3862         * blob.h: add a MONO_TYPE_ENUM definition
3863         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
3864         fix the encoding of arrays of enums in custom attributes.
3865
3866         Fixes #79666.
3867
3868 2007-01-01  Miguel de Icaza  <miguel@novell.com>
3869
3870         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
3871         string is null terminated, but only cut the string short if it
3872         overflows the buffer.   
3873         
3874         (mono_string_to_byvalstr): Also fix this routine.   The code here
3875         was not properly terminating a string (it was only terminated
3876         because of the previous catch-all memset). 
3877
3878         I left the memset, because I do not know if applications expect
3879         the runtime to clear this region. 
3880
3881         Fixes #79944.
3882
3883         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3884         Clear the error before returning to unmanaged code to prevent the
3885         runtime from being confused later on (fixes  80420).
3886         (ves_icall_type_from_name): Always call mono_loader_clear_error
3887         after parsing a type that could have failed.
3888         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
3889
3890         * loader.c (mono_loader_clear_error): Fix indentation.
3891
3892 2006-12-28  Martin Baulig  <martin@ximian.com>
3893
3894         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
3895
3896 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
3897
3898         * reflection.c: patch from Rolf Bjarne Kvinge to fix
3899         getting a token for an EnumBuilder.
3900
3901 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
3902
3903         * reflection.c: be more careful in case resource generation
3904         fails to create the data array.
3905
3906 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
3907
3908         * sgen-gc.c: write barrier for clone and fix unregister handles.
3909
3910 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
3911
3912         * reflection.c: some fixes needed in the generics code for the moving GC.
3913
3914 2006-12-22  Robert Jordan  <robertj@gmx.net>
3915
3916         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
3917         account. Fixes bug #80299.
3918
3919 2006-12-21  Raja R Harinath  <rharinath@novell.com>
3920
3921         Fix WaitHandle usage in delegates.
3922         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
3923         * object.c (mono_wait_handle_new): Use the property set method to
3924         initialize the handle.
3925         (mono_wait_handle_get_handle): New.
3926         * threadpool.c (mono_async_invoke): Use it.
3927         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
3928         Likewise.
3929         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
3930
3931 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
3932
3933         * marshal.c (emit_marshal): Call emit_marshal_variant and
3934         emit_marshal_com_interface when applicable.
3935         (emit_marshal_variant, emit_marshal_com_interface): Add
3936         methods for this case and remove if's from emit_marshal_object.
3937         
3938 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
3939
3940         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
3941
3942 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
3943
3944         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
3945         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
3946         and GlobalFree on Windows. Remove FIXME.
3947
3948 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
3949
3950         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
3951         implementation for managed objects.
3952
3953 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
3954
3955         * object.c: implemented code to be used for checking
3956         that no reference field overlaps with non-references.
3957
3958 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3959
3960         * threadpool.c: fix queue code to be compatible with the
3961         moving GC.
3962
3963 2006-12-18  Miguel de Icaza  <miguel@novell.com>
3964
3965         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
3966         in structures by throwing ArgumentNullException.
3967
3968         (emit_marshal_safehandle): Also when they are null parameters.
3969
3970         (emit_marshal_safehandle): Add support for ref
3971         SafeHandles parameters
3972
3973 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3974
3975         * profiler.c: updated to use the mono-dl API instead of
3976         gmodule.
3977
3978 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3979
3980         * profiler.c: updated to use the mono-dl dynamic loading
3981         API instead of gmodule.
3982
3983 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
3984
3985         * profiler.c: use readlink, older versions of glib don't have
3986         g_file_read_link ().
3987
3988 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3989
3990         * profiler.c: try to detect the path to mono if libc fails to provide
3991         a useful name (bug #80286).
3992
3993 2006-12-16  Raja R Harinath  <rharinath@novell.com>
3994
3995         Fix #80242
3996         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
3997         instance, use the generic type definition instead.
3998         (ves_icall_Type_GetNestedTypes): Likewise.
3999         * class.c (mono_class_create_generic): Always set the
4000         nested_classes of a generic instance to NULL, even if the generic
4001         type definition has nested types.
4002
4003 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
4004
4005         * marshal.c (mono_string_from_bstr): Revert previous Windows change
4006         and fix on Linux.
4007         
4008 2006-12-15  Miguel de Icaza  <miguel@novell.com>
4009
4010         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
4011         my arguments were in the wrong order.   I also fixed the Windows
4012         version which seems to have had the same issue.
4013
4014         (mono_free_bstr): On Unix, this is g_free.
4015         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
4016         conversions (for the tests in corlib to pass).
4017
4018 2006-12-14  Miguel de Icaza  <miguel@novell.com>
4019
4020         * marshal.c (emit_ptr_to_object_conv): For now, ignore
4021         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
4022         exception if a ref SafeHandle in a struct has changed).
4023         
4024         (emit_struct_conv): Do not perform layout checks for classes
4025         derived from SafeHandle, as those are specially handled. 
4026
4027         (emit_object_to_ptr_conv): Add support for
4028         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
4029
4030         (emit_marshal_safehandle): Implement conversion of return values
4031         of safehandles (MARSHAL_ACTION_CONV_RESULT).
4032         
4033         * threads.c: WaitHandle now is compiled with two different handles
4034         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
4035         for 2.0.
4036         
4037         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
4038         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
4039         these routines to cope with both kinds of fields.
4040
4041 2006-12-12  Miguel de Icaza  <miguel@novell.com>
4042
4043         * metadata.c (mono_type_to_unmanaged): Handle the case where
4044         type->data.klass is a SafeHandle, and in that case, return the
4045         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
4046         MONO_MARSHAL_CONV_SAFEHANDLE. 
4047
4048 2006-12-11  Miguel de Icaza  <miguel@novell.com>
4049
4050         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
4051         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
4052         calling emit_marshal_object.
4053
4054         (emit_marshal_safehandle): Implement marshalling of
4055         SafeHandle parameters (no ref support yet).
4056
4057         (MarshalAction): Document the defines as I implement
4058         them for SafeHandle.
4059
4060         (emit_marshal_object): indentation police.
4061
4062         * class-internals.h: Define MonoSafeHandle.
4063         Add safehandle_class to MonoDefaults type.
4064
4065         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
4066         list of classes to check for fields. 
4067
4068         * domain.c (mono_init_internal): Add SafeHandle to the list of
4069         mono_defaults loaded.
4070
4071 2006-12-15  Raja R Harinath  <rharinath@novell.com>
4072
4073         Fix #80253
4074         * reflection.c (mono_reflection_bind_generic_parameters): If the
4075         generic type definition is a type builder, ensure that it is fully
4076         initialized before instantiating it.  Kill some dead code.
4077
4078 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
4079
4080         * object.c: clear the loader_error () before loading
4081         more metadata stuff (bug #80258).
4082
4083 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
4084
4085         * icall.c, icall-defs.h: type modifiers icalls for
4086         parameters and properties.
4087
4088 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4089
4090         * object.c, icall.c: fixed warnings.
4091
4092 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4093
4094         * marshal.c: fixed a couple of leaks and coding style in a few places.
4095
4096 2006-12-08  Dick Porter  <dick@ximian.com>
4097
4098         * process.c: Cope with NULL ProcessStartInfo arguments on windows
4099         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
4100         80173.
4101
4102 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4103
4104         * process.c: ProcessStartInfo may have only filename set and
4105         arguments can be NULL.
4106
4107 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4108
4109         * icall.c: fix leak found by Robert Jordan.
4110
4111 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4112
4113         * marshal.c, marshal.h: generate managed method to access an element
4114         of a multi-dimensional array.
4115
4116 2006-11-30  Paolo Molaro (lupus@ximian.com)
4117
4118         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
4119
4120 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4121
4122         * icall.c: back out GetFields () fix until the serialization code is
4123         fixed to not depend on the incorrect behaviour.
4124
4125 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
4126
4127         * profiler.c: provide defaults if none are set.
4128
4129 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4130
4131         * Makefile.am, attrdefs.h: new public header file with
4132         constants for attributes for use by embedders.
4133
4134 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4135
4136         * icall.c: GetFields () fix for bug #80064.
4137
4138 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
4139
4140         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
4141         removed long unused icalls.
4142
4143 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
4144   
4145         * marshal.c: 
4146                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
4147                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
4148                 can be generated without a delegate class.
4149                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
4150         
4151         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4152
4153 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4154
4155         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
4156         #80069.
4157
4158 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4159
4160         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
4161         icall-def.h: added icalls needed by System.GC.
4162
4163 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
4164
4165         * loader.c: ensure the class in catch clauses is handled
4166         correctly for generics methods (fixes bug#79980).
4167
4168 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4169
4170         * monitor.h, monitor.c: added mono_locks_dump () function
4171         to help debug deadlocks involving managed locks.
4172
4173 2006-11-13  Dick Porter  <dick@ximian.com>
4174
4175         * file-io.c (get_file_attributes): If the file is a symlink try
4176         and get the stat data for the target, but also add the
4177         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
4178         the specs for the windows symlink support, but will probably have
4179         to be reworked when I have test data from a vista machine.  Fixes
4180         bug 79887.
4181
4182 2006-11-13  Dick Porter  <dick@ximian.com>
4183
4184         * gc.c (mono_domain_finalize): 
4185         * marshal.c (mono_delegate_begin_invoke): 
4186         * threadpool.c (socket_io_init, mono_thread_pool_init)
4187         (mono_thread_pool_finish): 
4188         * monitor.c (mono_monitor_try_enter_internal): 
4189         * threads.c (mono_thread_resume, mono_thread_init)
4190         (mono_thread_suspend_all_other_threads)
4191         (mono_thread_execute_interruption): 
4192         * appdomain.c (mono_domain_unload): Check for NULL error returns
4193         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
4194         75733.
4195
4196 2006-11-11  Miguel de Icaza  <miguel@novell.com>
4197
4198         * process.c
4199         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
4200         Only close the handle if the value of the handle is not
4201         INVALID_HANDLE_VALUE.  This just makes the process a bit more
4202         robust.
4203
4204         Improvement for #75733, so that we do not run into this problem. 
4205
4206         
4207         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
4208         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
4209         internal variables.  Fixes #79462 
4210         
4211
4212 2006-11-09  Dick Porter  <dick@ximian.com>
4213
4214         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4215         Use poll() not select().  Fixes bug 79397.
4216
4217 2006-11-09  Raja R Harinath  <rharinath@novell.com>
4218
4219         Fix #79872
4220         * assembly.c (mono_assembly_load_from_full): Check that the given
4221         image has an assembly manifest.
4222
4223 2006-11-09  Ankit Jain  <jankit@novell.com>
4224
4225         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
4226         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
4227         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
4228
4229 2006-11-07  Dick Porter  <dick@ximian.com>
4230
4231         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4232         Put the old resolver behaviour back for pre-2.0 profiles.
4233
4234 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
4235
4236         * threadpool.c: precise GC and locking fixes.
4237
4238 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
4239
4240         * class.c: don't load types that have an explicit unaligned
4241         managed reference. Provide better info in the TypeLoad exception.
4242         Part of the fix for bug #79744.
4243         * object.c: use the correct check for class type load issues.
4244
4245 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4246
4247         * class.c: enforce alignment of fields with managed references
4248         even when Pack=1 is forced by the user (bug #77788).
4249
4250 2006-11-03  Dick Porter  <dick@ximian.com>
4251
4252         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4253         If the address reverse lookup fails, return it as the hostname
4254         anyway.  Fixes bug 79721.
4255
4256 2006-11-03  Dick Porter  <dick@ximian.com>
4257
4258         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
4259         Fix build on Windows.
4260
4261 2006-11-02  Dick Porter  <dick@ximian.com>
4262
4263         * icall-def.h: 
4264         * object-internals.h: 
4265         * exception.c (mono_get_exception_thread_interrupted): 
4266         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
4267         Fixes bug 74525.
4268
4269         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
4270         Check for pending Thread.Interrupt.
4271
4272 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
4273         * loader.c: Fixed bug 79684.
4274
4275 2006-10-27  Dick Porter  <dick@ximian.com>
4276
4277         * file-io.c (get_file_attributes): Force symlinks to directories
4278         to be returned as a regular file.  Fixes bug 79733.
4279 2006-10-26  Dick Porter  <dick@ximian.com>
4280
4281         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
4282         CreateFile to open a directory then we need to set the
4283         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
4284
4285 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
4286
4287         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
4288         friends.
4289
4290 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4291
4292         * sgengc.c: small cleanup of timer code.
4293
4294 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4295
4296         * sgen-gc.c: fix some warnings and start adding support for
4297         complete object removal on domain unload.
4298
4299 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
4300
4301         * assembly.c: build_assembly_name should not consider a version
4302         number without build or revision number invalid. Fixes bug #79715.
4303
4304 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
4305
4306         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
4307         call kernel32 function OutputDebugString directly.
4308         
4309         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4310         
4311 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
4312
4313         * reflection.c: small cleanup, using a function to insert a MonoString
4314         in the string heap.
4315
4316 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
4317
4318         * reflection.c: moving GC fixes.
4319
4320 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4321
4322         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
4323         all the objects with finalizers belonging to an unloading appdomain.
4324
4325 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4326
4327         * sgen-gc.c: added ability to allocate even when the nursery is fully
4328         pinned and fixed a couple of bugs.
4329
4330 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4331
4332         * threads.h: Revert the last change for now.
4333
4334         * threads.h (mono_thread_get_pending_exception): Rename this to
4335         mono_thread_get_undeniable_exception ().
4336
4337 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
4338
4339         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
4340         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
4341         when fname does not refer to valid assembly. This result in a more
4342         meaningful error message.
4343         * exception.c: added mono_get_exception_bad_image_format2 which 
4344         constructs a BadImageFormatException using the ctor taking a custom
4345         message and the file name. Passing in a NULL msg results in a default
4346         message.
4347         * exception.h: define mono_get_exception_bad_image_format2 function.
4348         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
4349         when file name pointed to an invalid IL image. Use 
4350         mono_get_exception_file_not_found2 to construct FileNotFoundException,
4351         as this results in a more meaningful error message.
4352
4353 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
4354
4355         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
4356         #79465.
4357
4358 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
4359
4360         * metadata.c (mono_type_size): Change the align parameter to guint32 for
4361         consistency with the other _size functions.
4362         (mono_type_stack_size): Ditto.
4363
4364         * class.c object.c icall.c: Fix warnings caused by the above change.
4365
4366         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
4367
4368         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
4369
4370         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
4371
4372 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
4373
4374         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
4375         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
4376         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
4377         threadpool.h, threads-types.h: mark more internal functions.
4378
4379 2006-10-11  Dick Porter  <dick@ximian.com>
4380
4381         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4382         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
4383         reproduce the bug even before applying the fix.)
4384
4385 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
4386
4387         * reflection.c: allow retrieving attributes for arguments in generic
4388         methods (bug #79241).
4389
4390 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
4391
4392         * debug-mono-symfile.c: properly check fopen () result (found by
4393         coverity).
4394
4395 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
4396
4397         * reflection.c: make error message clearer and fixed two
4398         issuelets found by Coverity.
4399
4400 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
4401
4402         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
4403
4404 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
4405
4406         * object-internals.h, gc-internal.h, profiler-private.h:
4407         mark internal functions.
4408
4409 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4410
4411         * reflection.c: put data in the text section.
4412         * icall.c: recognize more types in type_from_typename ().
4413         * process.c, marshal.c: added some GC FIXMEs.
4414
4415 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4416
4417         * loader.c: check for NULL before initializing.
4418
4419 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
4420
4421         * gc.c (finalizer_thread): Use a non-alertable wait here.
4422
4423         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
4424         until the correct solution is found.
4425
4426 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
4427
4428         * reflection.c (mono_module_get_object): Avoid an assert when operating on
4429         modules with no metadata. Fixes #79596.
4430
4431         * image.c (load_metadata_ptrs): Put back the error message when
4432         the #- heap is encountered since the support is not complete yet.
4433
4434 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4435
4436         * gc.c: do not allow the user to SuppressFinalize () a
4437         delegate because it would leak the trampoline if present.
4438
4439 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
4440
4441         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
4442         PropertyPtr table.
4443
4444 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
4445
4446         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
4447
4448         * metadata.c (mono_metadata_get_param_attrs): Ditto.
4449
4450         * row-indexes.h: Add definitions for *Ptr tables.
4451
4452         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
4453
4454         * metadata.c (mono_metadata_translate_token_index): New helper function to
4455         translate table indexes used in uncompressed metadata.
4456         (mono_metadata_decode_table_row): Ditto.
4457         (mono_metadata_decode_table_row_col): Ditto.
4458
4459         * metadata.c: Add table schema for *Ptr tables.
4460
4461         * class.c loader.c: Use the new helper function to access the affected metadata
4462         tables.
4463         
4464         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
4465         #38532.
4466         
4467 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
4468
4469         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
4470         sequences which can be unbounded in size. Fixes #79583.
4471
4472 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
4473
4474         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
4475         static initialization.
4476
4477         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
4478
4479         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
4480
4481         * domain.c (mono_domain_free): Free up type_init_exception_hash.
4482
4483         * object.c (mono_runtime_class_init): Implement correct semantics when a static
4484         ctor fails, i.e. throw the same exception on subsequent accesses.
4485         
4486 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
4487
4488         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
4489         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
4490         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
4491         Handle marshalling of interfaces and VARIANTs contained in structs.
4492         
4493         Code is contributed under MIT/X11 license.
4494         
4495 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
4496
4497         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
4498         
4499         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
4500         mempool.
4501
4502 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4503
4504         * console-io.c: ignore previous SIGINT handler.
4505
4506 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
4507
4508         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
4509         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
4510         #79460, #79461, #79485.
4511
4512         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
4513
4514         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
4515         #79217.
4516
4517 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
4518
4519         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
4520         could be generated from it.
4521
4522 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
4523
4524         * rand.c: fix read loop to correctly handle EINTR.
4525
4526 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4527
4528         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
4529         internal calls are defined to keep methods closer to the declaring
4530         type and allow a significant reduction in runtime relocations and
4531         memory usage.
4532
4533 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
4534
4535         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
4536         exception message to have FileNotFoundException use the default
4537         assembly load error message. Fixes bug #79426.
4538         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
4539
4540 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4541
4542         * threadpool.c: (start_thread_or_queue) use the root domain when
4543         creating the thread instead of the async object one.
4544
4545 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
4546
4547         * class.c, object.c, class-internals.h, reflection.c:
4548         for arrays, store element_size inside MonoClass (speedup
4549         for array object creation).
4550
4551 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
4552
4553         * icall.c: fixed CodeBase to use the file name and not the module
4554         name (bug #79365).
4555
4556 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
4557
4558         * mono-debug.c, mono-debug.h: export find_method as
4559         mono_debug_find_method ().
4560
4561 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4562
4563         * debug-helpers.c, class-internals.h: added a few functions useful
4564         when debugging under gdb.
4565
4566 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4567
4568         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
4569         characters that need special handling.
4570
4571 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4572
4573         * mono-config.c: make the os/cpu specification more flexible,
4574         allowing lists and negation.
4575
4576 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
4577
4578         * marshal.c: COM Interop fixes. Handle case where method->klass.
4579         is interface. Handle BSTR/MonoString when null. Use CDECL as 
4580         calling convention on non-windows platforms. This is for
4581         compatibility with XPCOM and MainWin COM.
4582         
4583         Code is contributed under MIT/X11 license.
4584         
4585
4586 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
4587
4588         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
4589         correctly. Fixes #79217.
4590
4591         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
4592
4593 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
4594
4595         * mono-config.c: allow both an os and cpu attribute for dllmap
4596         and dllentry elemnets to enable a single config file to be used
4597         for multiple architectures.
4598
4599 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
4600
4601         * loader.c: MonoLoaderError was cleared too soon on load failure.
4602         Fixes bug #79424.
4603
4604 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
4605
4606         * icall.c: use the defining class vtable when accessing a
4607         static field, not a pobblibly derived class.
4608
4609 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
4610
4611         * icall.c string-icalls.c: Remove references to unicode.h.
4612
4613         * unicode.h unicode.c Makefile.am: Remove these unused source files.
4614
4615         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
4616
4617         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
4618         indicating the image where custom marshaller types should be looked up.
4619         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
4620         custom marshallers, instead of corlib. Fixes #79425.
4621
4622 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
4623
4624         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
4625
4626 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
4627
4628         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
4629         Implement Environment.ProcessorCount.
4630         
4631         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
4632         Implement Environment.ProcessorCount.
4633         
4634         * icall.c: 
4635         Add Environment.ProcessorCount icall.
4636         
4637         Patch by Jason McFall.
4638
4639 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4640
4641         * assembly.c: don't append .exe/.dll when the filename already contains
4642         one of those extensions.
4643
4644 2006-09-12  Martin Baulig  <martin@ximian.com>
4645
4646         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
4647         to array interfaces.
4648
4649 2006-09-11  Martin Baulig  <martin@ximian.com>
4650
4651         * reflection.c (mono_image_build_metadata): Create the
4652         MethodImpl's after emitting all types and methods, so we don't
4653         need another fixup pass for them.
4654
4655 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
4656
4657         * class.c (mono_class_from_name_case): Fix regression introduced by the last
4658         change.
4659
4660 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
4661
4662         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
4663         unload.
4664
4665 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
4666
4667         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
4668         args is not set. Fixes #78926.
4669
4670 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
4671
4672         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
4673
4674         * image.c (load_class_names): Move this to class.c, and rename it to 
4675         'mono_image_init_name_cache'.
4676         (load_modules): Fix a warning.
4677
4678         * class.c icall.c image.c: Initialize image->name_cache lazily.
4679
4680         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
4681         on its name using information in the AOT file.
4682
4683         * class.c (mono_class_from_name): Use the new hook function.
4684
4685 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
4686
4687         * reflection.c (mono_param_get_objects): Handle enum default parameter values
4688         correctly.
4689
4690         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
4691         Fixes #79289.
4692         
4693 2006-09-06  Martin Baulig  <martin@ximian.com>
4694
4695         * icall.c (mono_lookup_internal_call): Small fix.
4696
4697 2006-09-05  Raja R Harinath  <rharinath@novell.com>
4698
4699         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
4700         double g_free.
4701
4702 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
4703
4704         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
4705         when --debug is specified.
4706
4707 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
4708
4709         * class.c (setup_generic_array_ifaces): Fix a warning.
4710
4711 2006-09-04  Miguel de Icaza  <miguel@novell.com>
4712
4713         * Temporarily remove the patch to assemly.c that checks the
4714         assembly versions as it breaks our gacutil.
4715
4716 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
4717
4718         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
4719
4720         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
4721         a net 1.0 runtime.
4722
4723         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
4724         created using the default ctor. Fixes #79152.
4725         (mono_string_builder_to_utf16): Ditto.
4726
4727 2006-09-01  Martin Baulig  <martin@ximian.com>
4728
4729         Fix handling of the generic array interfaces.
4730
4731         * class-internals.h
4732         (MonoDefaults): Removed `generic_array_class' and added
4733         `generic_ilist' class.
4734
4735         * class.c
4736         (mono_bounded_array_class_get): Add the new generic array interfaces.
4737         (setup_generic_array_ifaces): New static method; create vtable
4738         entries for each method in the generic array interfaces.
4739
4740         * metadata.c
4741         (select_container): Allow "parent-less" generic methods.
4742
4743         * marshal.c
4744         (mono_marshal_get_generic_array_helper): New public method.
4745
4746         * icall.c
4747         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
4748         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
4749         moved the interncall into System.Array.
4750
4751 2006-09-01  Raja R Harinath  <rharinath@novell.com>
4752
4753         A few more cases of avoiding work on types with ->byref set.
4754         Has the real fix for #79238
4755         * icall.c (is_generic_parameter): New helper.
4756         (ves_icall_Type_GetGenericParameterPosition): Use it.
4757         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
4758         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
4759         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
4760         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
4761         reference types.
4762         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
4763         reference types.
4764         (ves_icall_Type_get_IsGenericInstance): Likewise.
4765         (ves_icall_Type_get_IsGenericType): Likewise.
4766
4767 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
4768
4769         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
4770         class if possible.
4771
4772         * mempool.h (mono_mempool_get_allocated): New helper function.
4773
4774         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
4775         change.
4776
4777         * mempool.c: Fix warnings and the calculation of stats.
4778
4779         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
4780
4781         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
4782
4783         * loader.c (mono_get_method_from_token): Update method_count stat.
4784
4785         * class-internals.h (MonoStats): Add some stats.
4786
4787 2006-08-31 Robert Jordan  <robertj@gmx.net>
4788
4789         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
4790         with managed variants.
4791         All code is contributed under the MIT/X11 license.
4792         
4793 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
4794
4795         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
4796         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
4797
4798         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
4799
4800         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
4801         with cycles in classes.
4802
4803         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
4804
4805         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
4806         missing a [MarshalAs] directive. Fixes #79203.
4807
4808         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
4809         klass->marshal_info. Fixes #79217.
4810
4811 2006-08-30  Martin Baulig  <martin@ximian.com>
4812
4813         Committing a patch from Joachim Ante <joe@otee.dk>:
4814         Add support for binary data symbol stores.
4815
4816         * debug-mono-symfile.c
4817         (mono_debug_open_mono_symbol_file): Renamed into
4818         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
4819         arguments.
4820
4821         * mono-debug.c
4822         (mono_debug_open_image): Added `raw_contents' and `size' args.
4823         (mono_debug_init_2_memory): New public function.
4824
4825 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
4826
4827         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
4828
4829 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4830
4831         * appdomain.c: implement support for ShadowCopyFiles.
4832
4833 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
4834
4835         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
4836         when value is NULL (and should remove CID #51).
4837
4838 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4839
4840         * image.c: moved 2 functions to ../utils.
4841
4842 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
4843
4844         * gc.c: cope with the target object of a GC handle being NULL
4845         (bug #78877).
4846
4847 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
4848
4849         * class.c: recursively check parent's explicit implementations
4850         of interface methods (fixes bug #79125).
4851
4852 2006-08-19  Miguel de Icaza  <miguel@novell.com>
4853
4854         * filewatcher.c: Avoid warnings when building, do not redefine
4855         constants that are defined.
4856
4857         Remove warnings.
4858
4859 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4860
4861         * image.c: don't fail when the link points to an absolute path.
4862
4863 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
4864
4865         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
4866         Fix CID #3.
4867
4868 2006-08-17  Miguel de Icaza  <miguel@novell.com>
4869
4870         * image.c (full_path): A new method used to obtain the actual path
4871         of an assembly even in the presence of symbolic links.  
4872
4873         This is necessary for the case where we are running a binary that
4874         has been GACed, but we are using the "published" path name
4875         ($prefix/mono/1.0/blah.exe) which happens to point to the real
4876         file in the GAC.
4877
4878         This was the source of the failure for the `xsp' command with the
4879         recent AppDomain changes, as far as the runtime was concerned,
4880         there were two different assemblies: $prefix/mono/1.0/blah.exe and
4881         $prefix/mono/gac/blah/version/blah.exe.
4882
4883         (do_mono_image_open): use full path
4884
4885 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4886
4887         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
4888
4889 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
4890
4891         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
4892         domain_id is supplied. Fix CID #241 and corlib's unit tests.
4893
4894 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4895
4896         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
4897         small structures. Fixes #78990.
4898
4899 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
4900
4901         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
4902
4903         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
4904
4905 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4906
4907         * appdomain.c:
4908         * marshal.c: don't load all the assemblies from a domain into newly
4909         created ones. The new domains might have different rules and load
4910         assemblies from different locations. Fixes bug #76757.
4911
4912         Patch by Lluis. Conflicts resolved by Brian Crowell.
4913
4914 2006-08-16  Alp Toker  <alp@atoker.com>
4915
4916         * socket-io.c: First half of the fix for #79084.
4917         Set sa_size to the length of the content, not that of the struct.
4918         Don't add NULL suffix to the content, this should be done in
4919         managed code if needed.
4920
4921 2006-08-14  Raja R Harinath  <rharinath@novell.com>
4922
4923         Fix part of #79012
4924         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
4925         mono_metadata_parse_type returns NULL.
4926
4927 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
4928
4929         * normalization-tables.h : new file for string normalization data.
4930         * locales.c, locales.h, icall.c :
4931           added load_normalization_resource() for string normalization,
4932           and icall as well.
4933         * Makefile.am : added normalization-tables.h to the sources.
4934
4935 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
4936
4937         * marshal.c: Add more helper functions to reduce code duplication and use them
4938         everywhere.
4939
4940 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
4941
4942         * marshal.c: Fix non-x86 stdcall warnings.
4943         
4944         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
4945         them everywhere.
4946
4947 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
4948
4949         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
4950         type check on multi-dimensional arrays. Fixes #79000.
4951
4952 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
4953
4954         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
4955         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
4956         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
4957         * class-internals.h: add is_com_object to class structure.
4958         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
4959         null checks to COM object marshalling. Fix .ctor call on RCW.
4960         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
4961         
4962         All code is contributed under the MIT/X11 license.
4963
4964 2006-08-09  Dick Porter  <dick@ximian.com>
4965
4966         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
4967         racing mono_monitor_allocator_lock() somewhere, so don't delete
4968         the critical section for now.  Found by running and exiting
4969         monodevelop.
4970
4971 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
4972
4973         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
4974         (ves_icall_System_ComObject_FindInterface): Ditto.
4975         (ves_icall_System_ComObject_CacheInterface): Ditto.
4976
4977         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
4978         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
4979
4980 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4981
4982         * threadpool.c: treat pipes from process asynchronous reads as sockets
4983         when reading from them, so we get select/poll or epoll to wait for
4984         data.
4985
4986 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
4987
4988         * loader.c: Fix a typo (CID #233) in the null check.
4989
4990 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
4991
4992         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
4993         Hopefully fixes #78949.
4994         
4995         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
4996         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
4997         bytes. Fixes #78972.
4998
4999 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5000
5001         * filewatcher.c: we need to set errno here.
5002
5003 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5004
5005         * filewatcher.c: let Win32Exception get the error value.
5006
5007 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5008
5009         * filewatcher.c: translate errno into win32 errors for Win32Exception
5010         to know what happened.
5011
5012 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
5013
5014         * threadpool.c: Fix more warnings.
5015
5016         * assembly.c (search_loaded): Fix warnings.
5017
5018         * threadpool.c (mono_thread_pool_finish): Fix warnings.
5019         (mono_async_invoke): Ditto.
5020
5021 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
5022
5023         * object.c (mono_remote_class_vtable): Need to create proxy vtable
5024         entries for __ComObject type in addition to ComImport types.
5025         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
5026         about hash table.
5027         
5028         All code is contributed under the MIT/X11 license.
5029
5030 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
5031
5032         * image.c: avoid tentative loading of modulerefs that contain
5033         no metadata (P/Invoke library names).
5034
5035 2006-07-28  Dick Porter  <dick@ximian.com>
5036
5037         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
5038         mono_loader_lock() somewhere, so don't delete the critical section
5039         for now.  Found by running and exiting monodevelop.
5040
5041 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5042
5043         * filewatcher.c: define the inotify syscalls when we're building on
5044         linux and have sys/syscall.h. The build system might not have support
5045         for inotify but the target system might have it.
5046
5047 2006-07-26  Miguel de Icaza  <miguel@novell.com>
5048
5049         * domain.c: Documentation updates.
5050
5051         * loader.c (mono_free_method): Do not release the method
5052         information if we are being profiled, as profilers will use this
5053         information at shut down to present some data to the user.
5054
5055         This is needed so that the profiler does not crash, as the
5056         profiler tends to keep MonoMethods around, and they might become
5057         invalid if we free these.
5058
5059         (mono_get_method_constrained): Return the original CIL stream
5060         method as well, so verification can be performed against it.
5061
5062 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5063
5064         * filewatcher.[ch]: support for inotify file system watcher.
5065         * icall.c: add new internal calls for the inotify file system watcher.
5066
5067 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5068
5069         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
5070         #78888.
5071
5072 2006-07-20  Dick Porter  <dick@ximian.com>
5073
5074         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
5075         warning.
5076
5077 2006-07-20  Dick Porter  <dick@ximian.com>
5078
5079         * threads.c (start_wrapper): Do the thread cleanup while we still
5080         hold a reference to its object.  Fixes bug 78123.
5081
5082 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
5083
5084         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
5085         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
5086           "managed-to-managed".
5087         * icall.c: Redirect string constructors that take sbyte* to
5088           ves_icall_System_String_ctor_RedirectToCreateString.
5089         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
5090           to CreateString () methods with matching signature.
5091         * reflection.c: Use original security informations for
5092           MONO_WRAPPER_MANAGED_TO_MANAGED.
5093         * security-manager.c: Use original security informations for
5094           MONO_WRAPPER_MANAGED_TO_MANAGED.
5095         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
5096           that is a placeholder and only its address should be used.
5097         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
5098           that is a placeholder and only its address should be used.
5099
5100 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
5101
5102         Begin implementing COM Interop.
5103         * appdomain.c: Increment corlib version.
5104         * class.c: Set ComImport classes' parent to __ComObject.
5105         * loader.c: Mark cominterop methods as such.
5106         * domain.c: Add __ComObject class to MonoDefaults structure.
5107         * image.c: Add 2 hashtables to the image for COM Interop related methods
5108         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
5109         using the mempool allocator
5110         
5111         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
5112         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
5113         declaration for mono_metadata_type_dup_mp.
5114         
5115         * debug-helpers.c: Added strings for two additional wrapper types
5116         * object.c: Create proxy objects for ComImport classes
5117         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
5118         and added __ComObject class to MonoDefaults structure.
5119         
5120         * object-internals.h: Finish MonoRealProxy definition, and add definition of
5121         MonoComInteropProxy and MonoComObject.
5122         
5123         * marshal.c: Added support for COM Interop
5124         (signature_cominterop): Converts managed signature to corresponding
5125         unmanaged COM signature.
5126         (cominterop_get_function_pointer): gets unmanaged function pointer via
5127         COM object vtable
5128         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
5129         (cominterop_get_method_interface): returns interface type that method is defined on
5130         (mono_mb_emit_cominterop_call): emits native call to function pointer
5131         gotten from vtable
5132         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
5133         that matches signature of unmanaged function.
5134         (cominterop_get_native_wrapper): wrapper around adjusted method call.
5135         (cominterop_get_invoke): forwards call from proxy to __ComObject
5136         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
5137         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
5138         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
5139         
5140         * marshal.h: Added Marshal icall declarations.
5141         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
5142         so we can access them in finalizer
5143         
5144 2006-07-14  Dick Porter  <dick@ximian.com>
5145
5146         * object.c (mono_type_initialization_cleanup): Fix a race
5147         condition by temporarily commenting out the critical section
5148         deletion.
5149
5150 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
5151
5152         * reflection.c (create_custom_attr): Fix some warnings.
5153         (create_custom_attr_data): Ditto.
5154         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
5155         types. Fixes #78855.
5156
5157 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
5158
5159         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
5160
5161         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
5162
5163 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
5164
5165         * reflection.c (resolve_object): Add support for DynamicMethod.
5166
5167         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
5168         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
5169
5170 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
5171
5172         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
5173         don't leak GPtrArray's pdata has we have no use (nor free) for it.
5174
5175 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
5176
5177         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
5178         Fixes #77888.
5179
5180 2006-06-30  Raja R Harinath  <rharinath@novell.com>
5181
5182         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
5183         slightly: remove a shadow local variable.
5184
5185 2006-06-29  Raja R Harinath  <rharinath@novell.com>
5186
5187         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
5188         definition that introduces the virtual function slot.
5189         Also fix Coverity #105.
5190
5191 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
5192
5193         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
5194         for dynamic assemblies. Fixes #78724.
5195
5196 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
5197
5198         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
5199         Fixes #78722.
5200
5201 2006-06-21  Martin Baulig  <martin@ximian.com>
5202
5203         * reflection.c
5204         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
5205         fixes #76484.
5206
5207 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
5208
5209         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
5210
5211 2006-06-20  Raja R Harinath  <rharinath@novell.com>
5212
5213         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
5214         nor TYPEREFs.
5215         * class.c (mono_class_create_from_typespec): Add 'context' argument.
5216         Inflate result if necessary.
5217         (mono_class_get_full): Remove old version.  Rename from
5218         'mono_class_get' and add 'context' argument.  Pass it to
5219         ..._create_from_typespec.
5220         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
5221         (mono_ldtoken): Revert change below.
5222
5223 2006-06-20  Martin Baulig  <martin@ximian.com>
5224
5225         * class.c (mono_ldtoken): Don't pass the generic context to
5226         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
5227
5228 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
5229
5230         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
5231         and later freeing it. Fixes #78638.
5232
5233 2006-06-15  Miguel de Icaza  <miguel@novell.com>
5234
5235         * icall.c (mono_class_get_throw): Revert over-zealous error
5236         throwing, the caller for mono_class_get_throw will cope with
5237         errors when classes are not properly initialized already.
5238
5239         The code still copes with loader exceptions though.
5240
5241         Fixes the regression in reftype1 and reftype3 from the CAS tests.
5242         
5243 2006-06-14  Miguel de Icaza  <miguel@novell.com>
5244
5245         Fixes the `make run1' version of RuntimeAbort (to be commited,
5246         source is in Bugzilla).
5247         
5248         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
5249         FALSE on class loading failure instead of returning true.
5250
5251         * class.c (mono_class_create_from_typedef): It is possible for
5252         mono_metadata_interfaces_from_typedef_full to fail if a class is
5253         not found, cope with this.
5254         
5255
5256 2006-06-14  Dick Porter  <dick@ximian.com>
5257
5258         * socket-io.c: 
5259         * process.c: Fix a bunch of signed/unsigned warnings from gcc
5260         4.1.1
5261
5262 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
5263
5264         * culture-info-table.h : oops, forgot to make it nsync with r61548.
5265
5266 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5267
5268         * icall.c: Another fix for building mono in Visual Studio.
5269
5270 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5271
5272         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
5273         
5274 2006-06-09  Martin Baulig  <martin@ximian.com>
5275
5276         * debug-mono-symfile.c: Put this back and really fix it this
5277         time. Sorry for all the trouble.
5278
5279 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
5280
5281         * icall.c (mono_class_get_throw): Fix a warning.
5282         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
5283         ReflectionTypeLoadException if needed. Fixes #78606.
5284
5285         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
5286         (mono_class_init): Ditto.
5287
5288         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
5289         ref_only exceptions.
5290         (mono_loader_clear_error): Make this work even if there is no error.
5291
5292 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
5293
5294         * object-internals.h marshal.c marshal.h icall.c: Implement method 
5295         Marshal.GetComSlotForMethodInfo using internal call.
5296
5297 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
5298
5299         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
5300         a function for signalling it.
5301
5302         * class.c (mono_class_from_typeref): Use the new kind of loader error when
5303         a referenced assembly is not found.
5304
5305         * loader.c (mono_loader_error_prepare_exception): Add support for 
5306         LOADER_ERROR_ASSEMBLY. Fix formatting.
5307
5308 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
5309
5310         * domain.c appdomain.c class-internals.h marshal.c: Add support 
5311         for VARIANT marshalling on windows and increment corlib version
5312         since Variant struct was added.
5313
5314 2006-06-03  Miguel de Icaza  <miguel@novell.com>
5315
5316         * debug-mono-symfile.c: Revert Martin's previous patch which broke
5317         stack trace line information:
5318
5319         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
5320         (Martin) when looking up B which is between A and C, return A not C.
5321
5322         Bug is #78573.
5323
5324         Thanks to Alexander Olk for tracking this down.
5325
5326 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5327
5328         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
5329         
5330         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
5331         avoid clobbering its value.
5332         (mono_string_to_lpstr): Fix a warning on windows.
5333
5334 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
5335
5336         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
5337
5338         * reflection.c loader.c: Removed references to 'dummy' flag.
5339
5340         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
5341
5342         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
5343         it gets GC tracking.
5344
5345         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
5346         GC tracking.
5347         
5348         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
5349
5350         * marshal.c threadpool.c: Update callers of mono_async_result_new.
5351
5352         * appdomain.c: Bump corlib version.
5353
5354 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
5355
5356         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5357         CEE_STIND_REF when working with object references.
5358
5359 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
5360
5361         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
5362         Fixes #78539.
5363
5364 2006-05-30  Miguel de Icaza  <miguel@novell.com>
5365
5366         * loader.c (method_from_memberref): Fix argument value for
5367         mono_loader_set_error_method_load (I was passing the MonoClass
5368         instead of the class name char *).
5369
5370 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
5371
5372         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5373         CEE_STIND_REF when working with object references.
5374
5375 2006-05-30  Martin Baulig  <martin@ximian.com>
5376
5377         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
5378         mono_method_full_name() change and replace the ':' with a '.'
5379         here.
5380
5381 2006-05-30  Martin Baulig  <martin@ximian.com>
5382
5383         * debug-mono-symfile.c
5384         (mono_debug_symfile_lookup_location): Fix the algorithm:
5385         when looking up B which is between A and C, return A not C.
5386
5387 2006-05-29  Martin Baulig  <martin@ximian.com>
5388
5389         * mono-debug.h
5390         (MonoDebugMethodInfo): Make the typedef public.
5391         (MonoDebugSourceLocation): New public struct.
5392
5393         * mono-debug.c
5394         (mono_debug_source_location_from_address): Removed.
5395         (mono_debug_source_location_from_il_offset): Removed.
5396         (mono_debug_il_offset_from_address): Removed.
5397         (mono_debug_address_from_il_offset): Removed.
5398         (mono_debug_lookup_method): New public function.
5399         (mono_debug_lookup_source_location): New public function; replaces
5400         the old mono_debug_source_location_from_*() functions; see the
5401         inline documentation.
5402         (mono_debug_free_source_location): New public function.
5403         (mono_debug_print_stack_frame): New public function; see the
5404         inline documentation.
5405
5406         * debug-mono-symfile.c
5407         (mono_debug_find_source_location): Renamed into
5408         mono_debug_symfile_lookup_location(); only take a
5409         `MonoDebugMethodInfo *' and an `offset' argument; added inline
5410         documentation.
5411         (mono_debug_find_method): Renamed into
5412         mono_debug_symfile_lookup_method().
5413
5414 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5415
5416         * assembly.c (mono_assembly_open_full): Dont overwrite the status
5417         returned by mono_image_open_full ().
5418
5419         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
5420         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
5421         #78517.
5422
5423         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
5424         #78518.
5425
5426 2006-05-27  Miguel de Icaza  <miguel@novell.com>
5427
5428         * class.c (mono_class_from_typeref): handle missing images
5429         earlier, deals with bug #78418.   Refactor code; 
5430
5431         Fix a warning introduced in my previous commit (some stale code
5432         from before I revisited my patch).
5433
5434         * class.c (mono_class_create_from_typedef): On failure, remove the
5435         class from the MonoImage->class_cache as the class is not
5436         initialized;   Fixes the leak pointed out by Paolo.
5437
5438 2006-05-25  Dick Porter  <dick@ximian.com>
5439
5440         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
5441         DeleteCriticalSections until I figure out which one may still be
5442         sometimes locked when mono_thread_cleanup is called.
5443
5444 2006-05-24  Dick Porter  <dick@ximian.com>
5445
5446         * threads.c (mono_thread_cleanup): Move the threading cleanup out
5447         of mono_thread_manage and back into its own function, so it can be
5448         called after the finalizer thread has finished.
5449
5450         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
5451
5452 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
5453
5454         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
5455         Fixes #78495.
5456
5457         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
5458         with non-blittable elements.
5459         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
5460
5461 2006-05-24  Martin Baulig  <martin@ximian.com>
5462
5463         * mono-debug-debugger.h (MonoDebuggerEvent): Added
5464         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
5465
5466         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
5467         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
5468         `mono_debugger_event_handler' to NULL.
5469
5470 2006-05-24  Martin Baulig  <martin@ximian.com>
5471
5472         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
5473
5474 2006-05-24  Martin Baulig  <martin@ximian.com>
5475
5476         * mono-debug-debugger.h
5477         (mono_debugger_create_notification_function): Added
5478         `MonoCodeManager *' argument.
5479
5480 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
5481
5482         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
5483
5484 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
5485
5486         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
5487         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
5488         implementation.
5489
5490 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
5491
5492         * icall.c: precise GC support: objects can't be stored in unmanaged
5493         memory anymore, even if they are kept alive by other references: since
5494         they can move the GC needs to be able to always find them.
5495
5496 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5497
5498         * object.c: precise GC support for static fields. Support
5499         for moving GCs: write barriers and pinned allocation for interned
5500         strings.
5501
5502 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
5503
5504         * domain.c, domain-internals.h: precise GC support for the MonoDomain
5505         structure.
5506
5507 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5508
5509         * class.c, gc.c: sgen and precise GC updates.
5510
5511 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5512
5513         * marshal.h, marshal.c: added write barrier wrapper and precise type
5514         fixes.
5515
5516 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
5517
5518         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
5519         support.
5520
5521 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5522
5523         * reflection.c: precise and sgen GC updates.
5524
5525 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5526
5527         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
5528
5529 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
5530
5531         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
5532
5533 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
5534
5535         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
5536         MONO_TYPE_OBJECT. Fixes #78462.
5537
5538 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5539
5540         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
5541         and blittable types.
5542
5543 2006-05-17  Miguel de Icaza  <miguel@novell.com>
5544
5545         * class.c (mono_class_get_exception_for_failure): Implement parts
5546         of a TODO: if the loader error is set (instead of the class
5547         error), we return a Loader exception that can be properly thrown
5548         elsewhere.
5549
5550         This was exposed by some Winforms 2.0 code that I tried to run
5551         (Atsushi pointed me to it).
5552
5553 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
5554
5555         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
5556         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
5557         
5558         * marshal.c (emit_marshal_vtype): Add limited support for 
5559         UnmanagedType.LPStruct. Fixes #78427.
5560
5561         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
5562         Applied a patch from kangaroo to fix #77523.
5563
5564 2006-05-17  Martin Baulig  <martin@ximian.com>
5565
5566         * threads.c
5567         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
5568         (debugger_thread_created): Removed.
5569         (debugger_thread_exited): Removed.
5570
5571 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
5572
5573         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5574
5575         * object-internals.h (MonoReflectionResource): Sync with managed version.
5576
5577 2006-05-12  Wade Berrier <wberrier@novell.com>
5578
5579         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
5580
5581 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
5582
5583         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
5584         functions try to allocate from the image mempool.
5585
5586 2006-05-12  Dick Porter  <dick@ximian.com>
5587
5588         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
5589
5590 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
5591
5592         * object.c: The FieldGetter and FieldSetter methods require the full
5593         name of the class, not only the name. Fixes bug #78277.
5594
5595 2006-05-11  Miguel de Icaza  <miguel@novell.com>
5596
5597         * loader.c (method_from_memberref): Do not pass the NULL klass to
5598         mono_loader_set_error_() methods.  Pass the non-NULL value
5599         (class). 
5600
5601 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5602
5603         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
5604         (mono_assembly_close): Null out assembly->image->references after freeing it.
5605
5606         * image.c (mono_image_close): Free image->references.
5607         
5608         * reflection.c (mono_image_basic_init): Fix a small memory leak.
5609
5610 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
5611
5612         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
5613         before checking if it's NULL (g_assert).
5614
5615 2006-05-10  Martin Baulig  <martin@ximian.com>
5616
5617         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
5618         I thought I already killed that two months ago, but now it somehow reappeared.
5619
5620 2006-05-10  Martin Baulig  <martin@ximian.com>
5621
5622         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
5623
5624 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5625
5626         * reflection.c: Allocate memory for dynamically created methods in the image
5627         mempools.
5628
5629 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
5630
5631         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
5632         don't use the ad pointer before checking if it's NULL (g_assert).
5633
5634 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5635
5636         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
5637         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
5638
5639         * marshal.c: Allocate all signatures from mempools.
5640
5641         * marshal.c: Allocate some more signatures from mempools.
5642
5643 2006-05-09  Miguel de Icaza  <miguel@novell.com>
5644
5645         * object.c (mono_load_remote_field): The code used to provide a
5646         temporary variable for returning results if the user did not
5647         provide a result pointer.  But our temporary variable was allocted
5648         on the satck.
5649
5650         Fix calling code to always pass a result area.   Coverity ID 103.
5651
5652 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5653
5654         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
5655         value, not the old. Fixes #78312.
5656         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
5657
5658         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
5659         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
5660         per-image cache.
5661
5662         * assembly.c (mono_assembly_close): Free image->references.
5663
5664         * assembly.c (mono_assembly_names_equal): Fix a warning.
5665         (mono_assemblies_cleanup): Cleanup more global data.
5666
5667         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
5668
5669         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
5670         ptr_cache and image->modules.
5671
5672         * image.c (mono_image_init): Allocate array_cache lazily.
5673         
5674 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5675
5676         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
5677         behavior was changed recently and has bad side effects.
5678
5679 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5680
5681         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
5682         
5683         * assembly.c (mono_assembly_close): Remove a debug printf.
5684
5685         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
5686
5687         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
5688         to also allow for temporary references between mono_image_open ()/close ().
5689
5690         * domain.c (get_runtimes_from_exe): Add a FIXME.        
5691
5692 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5693
5694         * marshal.c: Fix support for dynamic methods.
5695
5696         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
5697
5698         * marshal.c (mono_marshal_cleanup): New cleanup function.
5699
5700         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
5701         image mempools.
5702
5703         * class.c (mono_class_init): Fix leaking class->nested_classes.
5704
5705         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
5706
5707         * image.c (mono_image_init): Initialize the new cashes.
5708
5709         * image.c (mono_image_close): Destroy the new cashes.
5710
5711         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
5712
5713         * mempool.c (mono_mempool_strdup): New helper function.
5714
5715         * class-internals.h: Add prototype for mono_loader_unlock ().
5716
5717         * domain.c (mono_jit_info_table_find): Fix a warning.
5718         (mono_debugger_check_runtime_version): Ditto.
5719
5720         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
5721         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
5722         functions to these modules.
5723
5724         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
5725         metadata modules.
5726         
5727         * marshal.c (mono_free_bstr): Fix a warning.
5728
5729         * assembly.c (mono_assembly_open_full): Fix another small leak.
5730
5731         * object.c: Fix some unload leaks in the remoting code.
5732
5733         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
5734         function.
5735
5736         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
5737
5738         * reflection.c: Fix some unload leaks in dynamic assemblies.
5739
5740 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
5741
5742         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
5743         * marshal.h: Add BSTR support on Win32
5744         * icall.c: Add BSTR icalls
5745         * metadata.h: Add BSTR enums
5746
5747 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5748
5749         Work to catch the crash from #76795 and turn it into an
5750         exception.   As I stubbed out pieces of the VisualBasic support,
5751         I found a number of places where the code was failing and I added
5752         checks to those places. 
5753         
5754         * metadata.c (do_mono_metadata_parse_generic_class): Make this
5755         function return a status code.  If we fail to parse the signature
5756         from mono_metadata_parse_generic_inst, return FALSE.
5757
5758         * loader.c (mono_get_method_from_token): If we fail to load the
5759         method (mono_class_get) return NULL.   
5760
5761         * (method_from_memberref): Return NULL if we are unable to parse
5762         the method signature
5763
5764         (mono_loader_error_prepare_exception): Since we now use the
5765         loader_error flag internally to stop processing, and obtaining
5766         exceptions that might be thrown will walk this code path the
5767         proper way of going from a MonoLoaderError into a
5768         MonoException was convoluted.   This new routine encapsulates the
5769         process of turning the error into an exception and *clearing* the
5770         error afterwards.
5771         
5772 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5773
5774         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
5775         with missing assemblies), and to cope with:
5776
5777                 * Missing fieldref from a non-existing assembly.
5778                 * Missing methodref from a non-existing assembly.
5779
5780         The first batch of work to address *some* of the issues from 76661.
5781         
5782         * object.c (mono_class_create_runtime_vtable): If we fail to
5783         initialize the class raise the exception here. 
5784
5785         * metadata.c (mono_class_get_overrides_full): If any methods fail
5786         to load return the failure to the caller.
5787
5788         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
5789         flagging assemblies that failed to load.   
5790
5791         Do not crash if we are unable to load the assembly.
5792
5793         (mono_assembly_close): Do nothing with REFERENCE_MISSING
5794         assemblies. 
5795
5796         * loader.c (mono_loader_set_error_type_load): Change the
5797         convention to always pass unallocated strings, so we make our own
5798         copies (I know our own code had duplicated strings before, but
5799         this keeps the normal conventions).
5800         (method_from_memberref): Call mono_loader_set_error_method_load
5801         for all possible failures of loading the class. 
5802         Remove assert, turn into a loader error.
5803
5804         (mono_loader_error_to_exception): Move this routine from mini
5805         (mini_loader_error_to_exception) there was no need to have that in
5806         mini. 
5807
5808         * class.c (mono_class_from_typeref): If we were not able to load
5809         the assembly with mono_assembly_load_reference, call the
5810         mono_loader_set_error_type_load to register the problem.
5811
5812         (mono_class_setup_fields): If we fail to load the type from
5813         mono_metadata_parse_type_full, call mono_class_set_failure and
5814         break from the loop.
5815
5816         If class->exception_type is set, we do not layout the fields as
5817         that might crash the runtime, and instead return (from breaking
5818         from the previous loop).
5819
5820         (mono_class_setup_vtable): This now returns a boolean indicating
5821         whether the table was properly setup.   The decision is driven by
5822         mono_class_get_overrides_full which might run into non-existing
5823         methods. 
5824         
5825         (mono_class_init): Returns TRUE on success or FALSE if there was a
5826         problem in loading the type (incorrect assemblies, missing
5827         assemblies, methods, etc).
5828
5829         When we call mono_class_setup_fields we also check for a potential
5830         error inside this call (either a class exception or a general
5831         loader exception).
5832
5833         (mono_class_create_from_typedef): If the parent fails to load
5834         (calling mono_class_get_full) return NULL.
5835         
5836         ** Important **
5837
5838         calls to mono_metadata_parse_type_full should be checked
5839         everywhere and set the mono_class_set_failure
5840         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
5841
5842         The current patch checks the places where my manually constructed
5843         tests show the errors are showing up, but we should do it
5844         everywhere. 
5845
5846         ** Important2 **
5847
5848         mono_class_init return values should be tested everywhere, like
5849         the previous case this is something that we should audit
5850         everywhere and not only on the cases exposed by the tests I
5851         created. 
5852
5853 2006-04-26  Miguel de Icaza  <miguel@novell.com>
5854
5855         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
5856         boolean parameter and instead pass the information on `options'
5857         parameter (FileOptions).
5858
5859         * icall.c: Register the new signature for MonoIO.Open.
5860
5861         * debug-helpers.c (dis_one): Trying to understand how coverity
5862         works.  Fix Run 5, item 78.
5863
5864 2006-04-26  Dick Porter  <dick@ximian.com>
5865
5866         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
5867         dereference.
5868
5869 2006-04-25  Martin Baulig  <martin@ximian.com>
5870
5871         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
5872
5873         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
5874         debugger_thread_created().
5875         (debugger_gc_push_all_stacks): Don't handle the main thread in any
5876         special way.
5877         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
5878         (mono_debugger_finalize_threads): New function; undo the effects
5879         of mono_debugger_init_threads().
5880         (mono_debugger_create_all_threads): Removed.
5881
5882 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
5883
5884         * image.c (mono_image_close): Tidy up trace messages.
5885
5886         * assembly.c (mono_assembly_close): Ditto.
5887
5888         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
5889         no longer references an already freed assembly. Fixes #78168.
5890
5891 2006-04-21  Dick Porter  <dick@ximian.com>
5892
5893         * threads.c (mono_thread_detach): Fix reference counting when
5894         detaching threads.
5895
5896 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
5897
5898         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
5899         #78155.
5900
5901 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
5902
5903         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
5904         (mono_type_to_stind): Ditto.
5905
5906         * marshal.c: Use the new helper functions to simplify code.
5907
5908         * image.c (mono_image_close): Add some code for help debug assembly unloading
5909         problems.
5910
5911         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
5912         image mempool.
5913
5914         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
5915         assembly was already loaded in another appdomain. Fixes #78083.
5916
5917 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
5918
5919         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
5920         referenced assemblies.
5921         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
5922
5923         * domain.c (mono_domain_free): Add a trace message.
5924
5925         * appdomain.c (add_assemblies_to_domain): Ditto.        
5926
5927         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
5928         field.  
5929
5930 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5931
5932         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
5933
5934 2006-04-12  Martin Baulig  <martin@ximian.com>
5935
5936         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
5937         `USE_INCLUDED_LIBGC'.   
5938
5939 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
5940
5941         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
5942         the patch contains ../ and a small directory name later. Hopefully fixes
5943         #78035.
5944
5945 2006-04-10  Martin Baulig  <martin@ximian.com>
5946
5947         Clean up the debugger's thread-handling code.
5948
5949         The debugger's thread-handling code has been moved from
5950         ../mini/debug-debugger.c to threads.c.  We now iterate directly
5951         over the `threads' hash, keep track of exiting threads and also
5952         use proper locking.
5953
5954         We can now debug XSP and XSP based applications with the debugger.
5955
5956         * object-internals.h (MonoThread): Added `gpointer end_stack'.
5957
5958         * threads.h
5959         (MonoThreadCallbacks): Removed; this was only used by the debugger.
5960         (mono_install_thread_callbacks): Likewise.      
5961
5962         * threads.c (mono_thread_callbacks): Removed.
5963         (debugger_thread_created, debugger_thread_exited): New static functions.
5964         (start_wrapper): Call debugger_thread_created().
5965         (thread_cleanup): Call debugger_thread_exited().
5966         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
5967         (mono_debugger_init_threads): New public function.
5968         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
5969         iterate directly over the `threads' hash and also use proper locking.
5970
5971         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
5972
5973         * mono-debug-debugger.h
5974         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
5975
5976 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
5977
5978         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
5979         argument type=array. Fixes #78057.
5980
5981 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
5982
5983         * culture-info-table.h : regenerated. Fixed bug #69652.
5984
5985 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
5986
5987         * loader.c metadata.c: Reapply a variant r59116.
5988         
5989         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
5990
5991         * class.c (mono_class_setup_interface_offsets): New internal function.
5992
5993         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
5994         interfaces too. Fixes #77398.
5995
5996         * reflection.c (encode_cattr_value): Add support for 
5997         parameter type=object, argument type=array.
5998         (load_cattr_value): Ditto. Fixes #77916.
5999
6000         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
6001         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
6002
6003         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
6004         a byval char array and CharSet is Ansi.
6005
6006         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
6007
6008 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
6009
6010         * metadata.c: Add some locking comments.
6011         
6012         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
6013         mempool.
6014         (mono_metadata_free_method_signature): Don't free the signature itself.
6015
6016         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
6017
6018         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
6019         reference the same MonoImage.
6020         (mono_assembly_load_from_full): Add an assert.
6021
6022 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
6023
6024         * image.c (mono_image_close): Don't put the image we are about to free into the
6025         loaded_images_guid_hash.
6026
6027         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
6028         to reduce code duplication.
6029
6030         * marshal.c: Register the native functions called by this module as icalls, to
6031         somewhat centralize the creation of MonoMethodSignature's.
6032
6033         * loader.c (mono_method_signature): Add a cache for method signatures.
6034
6035         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
6036         the parameter attributes of a method.
6037         (mono_metadata_parse_method_signature_full): Refactored the computation of
6038         parameter attributes into a separate function. Also avoid one allocation in
6039         most cases.
6040
6041         * assembly.c (mono_assembly_close): Ditto.
6042
6043         * image.c (mono_image_close): Log trace messages with INFO level.
6044
6045         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
6046
6047         * image.c reflection.c: Correct reference counting of image modules.
6048         
6049         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
6050         of this function from the image mempool.
6051         
6052         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
6053         to allow more cached types to be used.
6054
6055         * mono-debug.c (mono_debug_add_method): Appled patch from
6056         David S. Miller  <davem@sunset.davemloft.net>: Access 
6057         minfo->lexical_blocks[] entry elements using read32().
6058
6059 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
6060
6061         * loader.c (mono_free_method): No longer free the method header for non-dynamic
6062         methods as it is allocated from the mempool.
6063
6064         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
6065         image mempool.
6066
6067         * metadata-internals.h: Add comments describing the reference counting scheme
6068         used for MonoImage and MonoAssembly.
6069
6070         * image.c assembly.c reflection.c: Rework reference counting of images and 
6071         assemblies so they are freed when the runtime is shut down. Free some 
6072         additional memory structures when an image is unloaded.
6073         
6074 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
6075
6076         * class.c loader.c reflection.c: Allocate more data structures in
6077         the image mempool.
6078
6079 2006-03-31  Miguel de Icaza  <miguel@novell.com>
6080
6081         * icall.c
6082         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
6083         build on pre glib 2.4 systems.
6084
6085 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
6086
6087         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
6088
6089         * icall.c: Fix some warnings.
6090
6091 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
6092
6093         * culture-info-table.h : regenerated.
6094
6095 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
6096
6097         * threads.c, object-internals.h, verify.c: changed the culture caching
6098         code to use a normal MonoArray for storage so the GC can keep track of
6099         them easily. Fixed bits of the cache logic, too and simplified the
6100         code.
6101
6102 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
6103
6104         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
6105         thread for non-Boehm GCs.
6106
6107 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
6108
6109         * domain.c, object.c, domain-internals.h: reduce the amount of memory
6110         needed to keep track of the data for static fields.
6111
6112 2006-03-29  Raja R Harinath  <rharinath@novell.com>
6113
6114         Fix #75172
6115         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
6116         for interface classes.  Use 'num_methods' instead.
6117         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
6118         before using '->vtable_size' field.
6119
6120 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6121
6122         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
6123         doesn't contain managed pointers, so use a normal hashtable.
6124
6125 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6126
6127         * reflection.c, class-internals.h, domain.c: fixed handling of types
6128         used as values for objects in custom attributes (bug #77915):
6129
6130 2006-03-24  Martin Baulig  <martin@ximian.com>
6131
6132         * class.c (mono_class_setup_fields): Added support for generic
6133         instances; fixes #77580.
6134
6135 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6136
6137         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
6138
6139 2006-03-24  Dick Porter  <dick@ximian.com>
6140
6141         * file-io.c (get_file_attributes): More stat macro breakage.
6142         Fixes bug 77759.
6143
6144 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
6145
6146         * profiler.c: added the file=filename option in the default profiler
6147         to output the profile data to filename.
6148
6149 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6150
6151         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
6152         bug #77877.
6153
6154 2006-03-22  Martin Baulig  <martin@ximian.com>
6155
6156         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
6157         allocated `MonoClassField *' in `fb->handle'.
6158
6159 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6160
6161         * class.c, image.c, metadata-internals.h: implemented new mechanism to
6162         allocate interface ID to save memory and allow better ID reuse on
6163         appdomain unload. setup_generic_vtable () removal from Martin.
6164
6165 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6166
6167         * object.h, appdomain.c, domain.c, exception.c, icall.c,
6168         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
6169         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
6170         write barriers for reference stores with managed objects accessed with
6171         C structures in the runtime and in embedding programs.
6172
6173 2006-03-20  Raja R Harinath  <rharinath@novell.com>
6174
6175         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
6176         'interface_id' and 'max_interface_id' fields of MonoClasses
6177         representing open generic types.
6178
6179 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
6180
6181         * object.h, object.c, icall.c: added functions to deal with
6182         storing valuetypes that contain references in managed objects.
6183         * reflection.c, string-icalls.c, threads.c, marshal.c: small
6184         fixes and comments around uses of mono_array_addr ().
6185
6186 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
6187
6188         * object.h, icall.c, monitor.c: object.GetHashCode ()
6189         implementation that supports the moving garbage collector.
6190
6191 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6192
6193         * icall.c, threads-types.h, threads.c: implemented finalizer for
6194         LocalDataStoreSlot.
6195
6196 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
6197
6198         * metadata.c (mono_type_size): Add a fixme.
6199         (mono_type_stack_size): Ditto.
6200
6201         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
6202         'type_forwarders' field.
6203
6204         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
6205         attribute from net 2.0.
6206
6207         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
6208         from class.c.
6209
6210         * class.c (mono_class_setup_fields): Fix a warning.
6211         
6212         * class.c (mono_class_from_name): Add support for assemblyref entries
6213         in the EXPORTEDTYPE table.
6214
6215         * reflection.c: Add support for handling type forwarders under net 2.0.
6216
6217         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
6218         
6219 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
6220
6221         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
6222         overwriting entries in ModuleBuild->types, also clean up the code
6223         a little. Fixes #77774.
6224
6225 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6226
6227         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
6228         load friend assembly info when present.
6229
6230 2006-03-14  Raja R Harinath  <rharinath@novell.com>
6231
6232         Fix crasher on gtest-158.cs.
6233         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
6234         the return value if the MonoClass we want is yet in an
6235         inconsistent state.
6236         * class.c (mono_class_create_from_typedef): Add an comment
6237         explaining an order dependency between mono_class_setup_parent and
6238         mono_class_setup_mono_type.
6239
6240 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6241
6242         * class.c: documentation updates and events bug fix.
6243
6244 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
6245
6246         * class.c: some cleanup, locking fixes.
6247
6248 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6249
6250         * class.c: fix the generics code to setup nested
6251         type info to the instantiated type (bug #77770).
6252
6253 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6254
6255         * marshal.c: fixed a few type correctness issues.
6256
6257 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6258
6259         * loader.c: the Set/Get/Addrtess array methods should be public.
6260
6261 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6262
6263         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
6264         
6265         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
6266         info->wrapper.
6267
6268 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
6269
6270         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
6271
6272         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
6273
6274         * mempool.c (mono_mempool_alloc): Speed this up a bit.
6275         (mono_mempool_alloc0): Ditto.
6276
6277 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6278
6279         * socket-io.c:
6280         (create_object_from_sockaddr): it was allocating 4 extra bytes
6281         for the AF_UNIX data. Fixes bug #77747.
6282
6283 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
6284
6285         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
6286
6287 2006-03-09  Dick Porter  <dick@ximian.com>
6288
6289         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
6290         Fixes bug 76966 again.
6291
6292 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
6293
6294         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
6295         names from r57532
6296         * appdomain.c: Bumped corlib version to 48 (due to r57532)
6297
6298 2006-03-07  Martin Baulig  <martin@ximian.com>
6299
6300         * object.c
6301         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
6302
6303 2006-03-07  Martin Baulig  <martin@ximian.com>
6304
6305         * class.c
6306         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
6307         regression introduced in r56970; see gtest-252.cs.
6308
6309         * loader.c (mono_get_method_constrained): Correctly handle generic
6310         methods; see gtest-253.cs.
6311
6312 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
6313
6314         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
6315
6316 2006-03-04  Martin Baulig  <martin@ximian.com>
6317
6318         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
6319         compute the parent type at runtime, just like we're already doing
6320         it for interfaces.
6321
6322         * reflection.c
6323         (mono_reflection_bind_generic_parameters): Don't compute the
6324         parent type anymore.
6325
6326         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
6327
6328 2006-03-04  Martin Baulig  <martin@ximian.com>
6329
6330         * mono-debug-debugger.h
6331         (mono_debugger_create_notification_function): Allocate memory at
6332         runtime and return a pointer to it.
6333
6334 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
6335
6336         * assembly.c: Fix windows build.
6337         
6338         * assembly.c: Fix build.
6339
6340         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
6341
6342         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
6343         
6344 2006-03-03  Dick Porter  <dick@ximian.com>
6345
6346         * process.c
6347         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
6348         Check parameters before dereferencing them.  Fixes Aaron's part of
6349         bug 77393.
6350
6351 2006-03-03  Raja R Harinath  <rharinath@novell.com>
6352
6353         Fix performance regression.
6354         * loader.c (find_method_in_class): Add 'from_class' argument.
6355         Rename 'klass' argument to 'in_class'.  The signature is compared
6356         against the method in 'in_class', and the corresponding method is
6357         returned from 'from_class'.
6358         (find_method): Walk both 'in_class' and 'from_class' in parallel.
6359         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
6360         type definition and generic instantiation in parallel.
6361         (mono_get_method_constrained): Update to changes.
6362
6363 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6364
6365         * threads.c: make sure the domain is correct, too when doing
6366         mono_thread_attach ().
6367
6368 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
6369
6370         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
6371         windows. Fixes #77683.
6372
6373 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6374
6375         * object.h, *: introduced specific way to set elements of an array
6376         of references to be used as write barrier. Still need to audit the
6377         uses of mono_array_addr.
6378
6379 2006-03-01  Miguel de Icaza  <miguel@novell.com>
6380
6381         * object-internals.h: New field to cache the assmebly name, patch
6382         from Tambet Ingo (tambet@ximian.com)
6383
6384 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6385
6386         * decimal.h, class-internals.h, metadata-internals.h,
6387         file-io.h: mark a few function declarations as internal, to
6388         reduce the number of PLT entries.
6389
6390 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6391
6392         * file-io.c: fix typo in warning message.
6393
6394 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
6395
6396         * loader.c: on unix, lookup the "*A" version of a function
6397         if charset is auto as a second option before failing.
6398
6399 2006-02-28  Raja R Harinath  <rharinath@novell.com>
6400
6401         * class.h (mono_class_inflate_generic_method): Revert to two
6402         argument version.
6403         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
6404         (mono_class_inflate_generic_method_full): Add.
6405         * class.c (mono_class_inflate_generic_method_full): Rename from
6406         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
6407         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
6408         * loader.c, reflection.c: Update to changes.
6409
6410 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6411
6412         * icall.c: const fixes and small improvements.
6413
6414 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6415
6416         * threadpool.c: for asynchronous connect(), enable the same workaround
6417         for BSD 6 as for the Mac. Fixes bug #77637.
6418
6419 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
6420
6421         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
6422         formatted classes. Fixes #77524.
6423
6424 2006-02-24  Raja R Harinath  <rharinath@novell.com>
6425
6426         * class.c (inflate_generic_type): Add a couple more
6427         micro-optimizations.
6428         (inflate_generic_context): Don't use the 'gmethod' from
6429         'inflate_with'.
6430         (mono_class_inflate_generic_method): If the method has generic
6431         parameters, but the passed-in context doesn't have a 'gmethod',
6432         create one.  Use the possibly simplified generic instantiation
6433         from the declaring class instead of the one passed in.
6434
6435 2006-02-24  Raja R Harinath  <harinath@gmail.com>
6436
6437         Make generic method signature and method header handling lazy.
6438         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
6439         (inflate_generic_header): Likewise.
6440         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
6441         parameter to avoid inflating types.
6442         (mono_get_inflated_method): Empty out.
6443         * class.h (mono_class_inflate_generic_method): Update to changes.
6444         * loader.c (mono_get_method_from_token): Don't parse signature for
6445         generic methods, nor methods of generic classes.
6446         (mono_method_signature): Rename from 'mono_method_signature'.
6447         Inflate signature on demand.
6448         (mono_method_get_header): Inflate method header on demand.
6449         * reflection.c: Update to changes.
6450
6451 2006-02-23  Raja R Harinath  <rharinath@novell.com>
6452
6453         * metadata.c (mono_metadata_inflate_generic_inst): If the
6454         instantiation is closed, don't bother expanding it in the new
6455         context.
6456         * class.c (inflate_generic_class): If the generic instantiation
6457         doesn't change after inflation, return the argument itself.
6458         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
6459         Add bounds checks.
6460         (inflate_generic_context): If neither the generic class nor the
6461         generic method instantiations change, return the original context.
6462         * reflection.c (mono_method_get_object): Do
6463         'mono_get_inflated_method' before accessing the ->klass field.
6464         (inflate_mono_method): Don't create a MonoGenericMethod unless
6465         necessary.
6466         (inflate_method): Don't pass a constructed type as the declaring
6467         type of a methodbuilder.
6468
6469 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
6470
6471         * object.c: fix memory overwrite.
6472
6473 2006-02-22  Dick Porter  <dick@ximian.com>
6474
6475         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
6476         it doesn't work any more.
6477         (mono_threads_request_thread_dump): Fix unused variable warnings.
6478
6479 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6480
6481         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
6482         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
6483         the public header file.
6484
6485 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
6486
6487         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
6488
6489 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6490
6491         * class-internals.h, object.c: reduce the size of MonoVTable
6492         and store the interface_offsets array at negative offsets.
6493
6494 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6495
6496         * metadata.c: tweak table descriptors data structures to reduce
6497         size and runtime relocations.
6498
6499 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6500
6501         * marshal.c: fix some types and opcodes to be type-safe
6502         in marshaling wrappers.
6503
6504 2006-02-21  Ankit Jain  <jankit@novell.com>
6505
6506         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
6507
6508 2006-02-21  Raja R Harinath  <rharinath@novell.com>
6509
6510         * metadata.c (get_constraints): Relax debugging checks for monodis.
6511
6512 2006-02-21  Ankit Jain  <jankit@novell.com>
6513
6514         * metadata.c (mono_metadata_load_generic_params): Move the code
6515         checking for ambiguous generic params from here to mono/dis/get.c
6516         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
6517
6518 2006-02-21  Raja R Harinath  <harinath@gmail.com>
6519
6520         Fix assertion triggered when compiling nemerle.
6521         * class.c (mono_get_shared_generic_inst): Rename from
6522         get_shared_inst and make non-static.
6523         * loader.c (mono_get_shared_generic_method): New.  Used to create
6524         the MonoGenericContext-equivalent of a MonoGenericContainer.
6525         (mono_get_method_from_token): Initialize the 'context' field of
6526         the created MonoGenericContainer.
6527         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
6528         * metadata.c (get_constraints): Add sanity check.
6529         * class-internals.h: Add new internal methods.
6530
6531         * reflection.c (verify_safe_for_managed_space): New sanity check.
6532         Currently checks that owner-less generic parameters aren't allowed
6533         in managed space.
6534         (mono_type_get_object): Use it.
6535         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
6536         that are now in mono_type_get_object.
6537         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
6538
6539 2006-02-19  Raja R Harinath  <harinath@gmail.com>
6540
6541         * metadata.c (mono_type_create_from_typespec): Rename from
6542         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
6543         argument and caching of types in the generic container.
6544         (unwrap_arrays, find_generic_param): Remove.
6545         * metadata-internals.h: Update.
6546         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
6547
6548 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
6549
6550         * class.c (mono_class_get_exception_for_failure): Fix a warning.
6551
6552         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
6553         return values. Fixes #77581.
6554
6555         * class.c (mono_fnptr_class_get): Switch name and name_space.
6556
6557         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
6558         classes and add support for [In, Out] attributes.
6559         (mono_marshal_free_asany): Ditto. Fixes #77524.
6560
6561 2006-02-18  Raja R Harinath  <harinath@gmail.com>
6562
6563         * class.c (mono_class_from_generic_parameter): Make more robust to
6564         incomplete MonoGenericContainers from monodis.
6565
6566 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6567
6568         * class-internals.h: added some more exception types.
6569         * class.c, metadata.c: added a few checks to handle missing
6570         types.
6571
6572 2006-02-17  Raja R Harinath  <rharinath@novell.com>
6573
6574         Use owner-less generic-params some more.
6575         * class.c (my_mono_class_from_generic_parameter): Remove.
6576         (mono_class_from_generic_parameter): Handle null image,
6577         param->name and param->owner.
6578         (mono_class_from_mono_type): Update.
6579         (mono_class_create_from_typespec): Remove 'container' parameter.
6580         If that parameter is non-null, the result is always inflated by
6581         'mono_class_get_full' anyway.
6582         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
6583         parameter.
6584         (mono_class_get_full): Update.
6585
6586         * class.c (inflate_generic_type) [GENERICINST]: If the generic
6587         instance is not open, don't bother inflating.
6588         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
6589         parse metadata for inflated classes.
6590         (_mono_class_get): Change GenericContext* parameter to
6591         GenericContainer*.
6592         (mono_class_create_from_typespec): Likewise.  Simplify, and
6593         implement trivially.  All the cases are handled in
6594         mono_class_from_mono_type.  Don't inflate returned class.
6595         (mono_class_get_full): Delegate GENERICINST optimization to
6596         inflate_generic_type.
6597         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
6598
6599 2006-02-16  Dick Porter  <dick@ximian.com>
6600
6601         * socket-io.c (create_object_from_sockaddr): Fix typo.
6602         (create_sockaddr_from_object): Check array lengths before
6603         potentially accessing items off the end.
6604         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
6605         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
6606         (ves_icall_System_Net_Sockets_Socket_Send_internal)
6607         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
6608         length checks to avoid wraparound overflows.
6609         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
6610         contents of the array of sockets
6611         (hostent_to_IPHostEntry2)
6612         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
6613         Check return value of inet_ntop ().
6614         (addrinfo_to_IPHostEntry): Fix typo
6615
6616 2006-02-16  Raja R Harinath  <rharinath@novell.com>
6617
6618         Type metadata parsing doesn't use generic-instantiation information.
6619         * metadata.c (mono_metadata_parse_array_full): Change
6620         MonoGenericContext* parameter to MonoGenericContainer*.
6621         (mono_metadata_parse_type_full): Likewise.
6622         (mono_type_create_from_typespec_full): Likewise.
6623         (mono_metadata_parse_mh_full): Likewise.
6624         (mono_metadata_parse_generic_inst): Likewise.
6625         (do_mono_metadata_parse_generic_class): Likewise.
6626         (do_mono_metadata_parse_type): Likewise.
6627         * metadata-internals.h: Update to changes.
6628         * class.c (mono_class_find_enum_basetype): Likewise.
6629         (mono_class_setup_fields): Likewise.
6630         (mono_class_create_from_typespec): Likewise.
6631         * loader.c (method_from_methodspec): Likewise.
6632         (mono_get_method_from_token): Likewise.
6633         (mono_method_get_header): Likewise.
6634
6635 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6636
6637         * marshal.c: handle additional GENERICINST case (patch from
6638         Thong Nguyen <tum@veridicus.com>).
6639         Fix a few cases where LDIND_I/STIND_I was used for references.
6640
6641 2006-02-16  Raja R Harinath  <rharinath@novell.com>
6642
6643         * reflection.c (mono_reflection_get_token): Remove unused variable.
6644
6645 2006-02-16  Martin Baulig  <martin@ximian.com>
6646
6647         * reflection.c (mono_reflection_get_token): Add support for fields
6648         in instantiated generic types.
6649
6650         * icall.c
6651         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
6652
6653 2006-02-15  Martin Baulig  <martin@ximian.com>
6654
6655         * icall.c
6656         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
6657         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
6658         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
6659         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
6660
6661 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
6662
6663         * class.c, metadata.c, metadata.h, object.c, icall.c,
6664         marshal.c: changed mono_type_get_underlying_type () to do
6665         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
6666         Fixed handling of instantiated generic valuetypes (bug #75479).
6667
6668 2006-02-15  Raja R Harinath  <rharinath@novell.com>
6669
6670         * metadata.c (mono_metadata_decode_signed_value): Simplify.
6671         Delegate to mono_metadata_decode_value, and work on the returned value.
6672
6673         * icall.c (ves_icall_MonoType_GetGenericArguments):
6674         Add consistency check here too.
6675         
6676 2006-02-15  Ankit Jain  <jankit@novell.com>
6677
6678         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
6679         char/short etc.
6680
6681 2006-02-15  Ankit Jain  <jankit@novell.com>
6682
6683         * metadata.c (mono_metadata_decode_signed_value): New function to decode
6684         signed values, used only for representing lower bounds of arrays.
6685         (mono_metadata_parse_array_full): Use new
6686         mono_metadata_decode_signed_value to decode lower bounds.
6687
6688 2006-02-14  Martin Baulig  <martin@ximian.com>
6689
6690         * reflection.c
6691         (mono_reflection_get_token): Support "MonoGenericMethod" and
6692         "MonoGenericCMethod" and allow generic instances / methods.
6693
6694 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
6695
6696         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
6697         to obtain the terminal size using an ioctl.
6698
6699         * object.c (mono_nullable_init): Revert this as nullable reference
6700         types are not valid.
6701         (mono_nullable_box): Ditto.
6702
6703 2006-02-09  Dick Porter  <dick@ximian.com>
6704
6705         * threads.c (mono_thread_detach): Drop a reference to the thread
6706         we're detaching.
6707
6708 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
6709
6710         * object.c (mono_nullable_init): Handle nullable reference types.
6711         (mono_nullable_box): Ditto. Fixes #77446.
6712
6713 2006-02-07  Martin Baulig  <martin@ximian.com>
6714
6715         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
6716
6717 2006-02-07  Ankit Jain  <jankit@novell.com>
6718
6719         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
6720         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
6721         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
6722         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
6723         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
6724         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
6725
6726 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
6727
6728         * class.c (mono_class_create_generic): Set type_token as well.
6729
6730         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
6731         compatible with MS.
6732
6733 2006-02-02  Martin Baulig  <martin@ximian.com>
6734
6735         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
6736         has never been used so far.
6737
6738 2006-02-02  Martin Baulig  <martin@ximian.com>
6739
6740         * mono-debug-debugger.h: Changed comment at the top of this file;
6741         the header is not installed, but it's safe to #include it from
6742         within the JIT.
6743
6744         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
6745         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
6746
6747 2006-02-02  Martin Baulig  <martin@ximian.com>
6748
6749         * mono-debug.h
6750         (MonoSymbolTable): Removed the `metadata_info' field.
6751
6752         * mono-debug.c
6753         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
6754
6755         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
6756         (mono_debugger_add_builtin_types): Removed.
6757         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
6758         (mono_debugger_create_notification_function): We now operate on a
6759         pre-allocated area; take a `gpointer' and return `void'.
6760
6761         * mono-debug-debugger.c
6762         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
6763         (mono_debugger_add_builtin_types): Removed.
6764
6765 2006-02-02  Martin Baulig  <martin@ximian.com>
6766
6767         * threads.c (mono_debugger_create_all_threads): New public method.
6768
6769 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6770
6771         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
6772         breaks on several platforms.
6773
6774 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
6775
6776         * assembly.c: the VS.NET build doesn't supply default values for
6777         MONO_ASSEMBLIES and MONO_CFG_DIR.
6778
6779 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
6780
6781         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
6782         helper function.
6783
6784         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
6785
6786         * loader.c (method_from_memberref): Fix a warning.
6787
6788         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
6789
6790         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
6791         with explicit layout. Fixes #77433.
6792
6793 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
6794
6795         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
6796         max_interface_id is initialized before using it. Fixes #77398.
6797         (ves_icall_Type_GetInterfaces): Ditto.
6798
6799 2006-01-30  Raja R Harinath  <rharinath@novell.com>
6800
6801         * metadata.c (mono_metadata_parse_method_signature_full): Don't
6802         allocate memory for parameter attributes when parsing memberref
6803         signatures.
6804         * loader.c (mono_loader_set_error_method_load): Don't warn.
6805         (method_from_memberref): Ensure MissingMethodException gets thrown
6806         if method is not found.  Make warning more informative.
6807
6808 2006-01-29  Raja R Harinath  <harinath@gmail.com>
6809
6810         Fix #77397
6811         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
6812         return true if is byref.
6813         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
6814         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
6815         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
6816
6817 2006-01-27  Raja R Harinath  <rharinath@novell.com>
6818
6819         Fix tests/find-method.2.il
6820         * loader.c (find_method, find_method_in_class): Remove is_inflated
6821         argument.  Revert 2006-01-18 change.
6822         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
6823         is generic, search for method in its generic definition.
6824         * class.c (mono_class_setup_vtable_general): Print generic
6825         arguments of generic types in debugging printf.
6826
6827 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
6828
6829         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
6830
6831         * threads.c (mono_threads_request_thread_dump): New helper function.
6832
6833 2006-01-25  Raja R Harinath  <rharinath@novell.com>
6834
6835         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
6836
6837 2006-01-25  Ankit Jain  <jankit@novell.com>
6838
6839         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
6840         move definition to ..
6841         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
6842         
6843 2006-01-25  Ankit Jain  <jankit@novell.com>
6844             Raja R Harinath  <rharinath@novell.com>
6845
6846         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
6847         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
6848         as necessary.
6849
6850 2006-01-25  Martin Baulig  <martin@ximian.com>
6851
6852         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
6853         `MonoDebuggerThread' into debug-debugger.c.
6854
6855 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6856
6857         * profiler.c: fix printing of data.
6858
6859 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
6860
6861         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
6862           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
6863
6864 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
6865
6866         * object.c: fix deadlock related to string interning.
6867
6868 2006-01-23  Martin Baulig  <martin@ximian.com>
6869
6870         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
6871
6872         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
6873
6874 2006-01-23  Martin Baulig  <martin@ximian.com>
6875
6876         * mono-debug.h: Moved the prototypes of some functions which are
6877         used by the JIT here from mono-debug-debugger.h.
6878
6879 2006-01-21  Martin Baulig  <martin@ximian.com>
6880
6881         * Makefile.am: Don't install mono-debug-debugger.h.
6882
6883 2006-01-21  Martin Baulig  <martin@ximian.com>
6884
6885         * mono-debug-debugger.h: Enforce the private status of this header
6886         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
6887         Moved some stuff from mono-debugger-jit-wrapper.h here.
6888
6889 2006-01-20  Raja R Harinath  <rharinath@novell.com>
6890
6891         * class.c (mono_class_from_typeref): Add a sanity test to help
6892         catch lack of assembly load/search hooks.
6893
6894 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
6895
6896         * marshal.c (emit_struct_conv): Relax the fields with same offset
6897         check even more. Fixes #77230.
6898
6899 2006-01-18  Martin Baulig  <martin@ximian.com>
6900
6901         * loader.c (find_method_in_class): Added `gboolean is_inflated'
6902         argument; if false, we compare the uninstantiated signatures.
6903         (method_from_memberref): Compare the uninstantiated signatures;
6904         fixes #76417.
6905
6906 2006-01-18  Robert Jordan  <robertj@gmx.net>
6907
6908         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
6909         Clear the weak link. Fixes bug #77170.
6910
6911         * gc.c (mono_gchandle_free):
6912         Reflect *-gc.c changes (tiny optimization).
6913
6914 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
6915
6916         * metadata.c (mono_metadata_signature_dup): Applied patch from
6917         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
6918         Fixes #77288.
6919
6920 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
6921
6922         * marshal.c (emit_struct_conv): Allow fields with the same offset when
6923         marshalling from native to managed code. Fixes #77230.
6924
6925 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6926
6927         * threadpool.c: fix problem (Mac only) when more than one asynchronous
6928         connect. Fixes bug #77020.
6929
6930 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6931
6932         * class.c: fixed id assignement for nested interfaces (bug #77275).
6933         Added also better info for --print-vtable debugging.
6934
6935 2006-01-12  Martin Baulig  <martin@ximian.com>
6936
6937         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
6938         interfaces on-the-fly; fixes #76625.
6939
6940         * class-internals.h
6941         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
6942         don't need that anymore.
6943
6944 2006-01-12  Miguel de Icaza  <miguel@novell.com>
6945
6946         * socket-io.c
6947         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
6948         To avoid initing the nested_classes when not needed I turned the
6949         PeerCredData as a toplevel internal class, as it has to be shared
6950         anyways. 
6951
6952         Fixes the CASA issue.
6953
6954 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
6955
6956         * domain.c: Accessors for MonoJitInfo
6957
6958         * profiler-private.h: Add jitinfo to the end jit hook
6959
6960         * profiler.[ch]: Define new hooks, called after jitting which give
6961         the MonoJitInfo that was compiled
6962
6963 2006-01-10  Martin Baulig  <martin@ximian.com>
6964
6965         * class.c (mono_class_setup_events): Add support for generic
6966         classes; fixes #76440.
6967
6968 2006-01-06  Raja R Harinath  <rharinath@novell.com>
6969
6970         Fix #77160.
6971         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
6972         on passed-in method.
6973
6974 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6975
6976         * object.c (mono_runtime_invoke_array): Add Nullable support.
6977
6978         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
6979
6980 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
6981
6982         * file-io.c: Don't consider sockets as directory and avoid an endless
6983         loop. Fix bug #76966.
6984
6985 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6986
6987         * object.c (mono_nullable_init): New helper function.
6988         (mono_nullable_box): Ditto.
6989
6990         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
6991
6992         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
6993
6994         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
6995         
6996 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
6997
6998         * class.c (mono_class_is_assignable_from): Make T assignable to 
6999         Nullable<T>.
7000
7001 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
7002
7003         * appdomain.c: Bump corlib version to 46.
7004         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
7005         serialization purpose) and changed ves_icall_System_Reflection_
7006         Assembly_get_code_base signature to accept a boolean (to escape, or 
7007         not, the assembly code base).
7008
7009 2005-12-23  Dick Porter  <dick@ximian.com>
7010
7011         * icall.c: 
7012         * threads-types.h: 
7013         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
7014         CreateEvent icall now returns "created" boolean parameter.
7015
7016 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
7017
7018         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
7019         #76967.
7020
7021         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
7022         when attr_klass is an interface. Fixes #77045.
7023
7024 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
7025
7026         * marshal.c (emit_struct_conv): Fix previous patch.
7027         
7028         * marshal.c (emit_struct_conv): Add a check for fields with the same
7029         offset.
7030
7031 2005-12-20  Raja R Harinath  <rharinath@novell.com>
7032
7033         Fix regression in Mono.C5.
7034         * class.c (mono_class_create_generic): If 'klass' is an interface
7035         set up the interface offsets.
7036         (mono_class_is_assignable_from): Don't throw away generic arguments.
7037
7038 2005-12-19  Raja R Harinath  <rharinath@novell.com>
7039
7040         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
7041         type parameters.
7042
7043 2005-12-15  Raja R Harinath  <rharinath@novell.com>
7044
7045         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
7046         dead store.
7047         (do_mono_metadata_parse_generic_class): Don't pass the current
7048         generic context when parsing the type being instantiated: it
7049         cannot use it, anyway.
7050
7051         * loader.c (method_from_memberref): Don't inflate a signature if
7052         it doesn't contain any type parameters.
7053
7054 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
7055
7056         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
7057
7058 2005-12-14  Martin Baulig  <martin@ximian.com>
7059
7060         * class.c
7061         (mono_type_get_name_recurse): Don't return null for type
7062         parameters and open generic classes.
7063         (mono_class_setup_methods): Don't exclude generic instances.
7064         (mono_get_unique_iid): Use different IDs for different
7065         instantiations of the same generic type.
7066         (mono_class_setup_vtable): Only use setup_generic_vtable() for
7067         open generic instances; create a normal vtable for closed generic
7068         instances.
7069         (mono_class_setup_vtable_general): We're now also called for
7070         closed generic instances.
7071
7072         * reflection.c
7073         (mono_reflection_bind_generic_parameters): Correctly use
7074         mono_metadata_lookup_generic_inst() everywhere.
7075
7076 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
7077
7078         * object.c (mono_class_create_runtime_vtable): Call 
7079         mono_class_setup_vtable ().
7080
7081         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
7082         function.
7083         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
7084         #76959.
7085
7086         * loader.c (mono_loader_set_error_type_load): Print the type load
7087         warnings to the console so they are more visible to the user.
7088         (mono_loader_set_error_method_load): Ditto.
7089
7090         * reflection.c (ensure_runtime_vtable): Revert the last change as it
7091         is still broken.
7092         
7093         * reflection.c (ensure_runtime_vtable): Fix build.
7094
7095         * reflection.c (ensure_runtime_vtable): Disable an optimization which
7096         doesn't work in all cases.
7097
7098 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
7099
7100         * object.c (mono_array_new_full): Treat a single dimensional array
7101         with 0 lower bounds as an szarray. Fixes #76973.
7102
7103         * reflection.c (custom_attr_visible): Really fix this.
7104
7105 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
7106
7107         * reflection.c (custom_attr_visible): Allow nested public attributes
7108         as well.
7109
7110         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
7111         interface check.
7112
7113 2005-12-12  Raja R Harinath  <harinath@gmail.com>
7114
7115         * class.c (set_generic_param_owner): Delete.
7116         (mono_class_create_from_typedef): Don't set ->owner field of
7117         generic parameters to "param containers" of enclosing classes.
7118         * reflection.c (mono_reflection_initialize_generic_parameter):
7119         Likewise.
7120
7121 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
7122
7123         * reflection.c (custom_attr_visible): Fix build.
7124
7125 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
7126
7127         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
7128         private attributes.
7129         
7130         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
7131         handling of null parameter defaults.
7132
7133 2005-12-09  Raja R Harinath  <rharinath@novell.com>
7134
7135         * class.c (mono_class_from_generic_parameter): Don't set
7136         klass->generic_container.
7137         (my_mono_class_from_generic_parameter): Likewise.
7138
7139 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
7140
7141         * reflection.c (load_public_key): Fix a warning.
7142         (method_encode_code): Fix unaligned accesses.
7143
7144 2005-12-07  Martin Baulig  <martin@ximian.com>
7145
7146         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
7147
7148         * reflection.c
7149         (write_generic_param_entry): Encode our custom attrs.
7150
7151         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
7152
7153 2005-12-07  Martin Baulig  <martin@ximian.com>
7154
7155         * reflection.c (encode_new_constraint): Removed; we don't use the
7156         `NewConstraintAttribute' anymore.
7157
7158 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
7159
7160         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
7161         not fire a TypeResolve event when Assembly.GetType () is called.
7162
7163 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
7164
7165         Beginning of support for nullable types in the runtime. Parts of
7166         this patch are from Martin.
7167
7168         * appdomain.c (MONO_CORLIB_VERSION): Bump
7169
7170         * domain.c (mono_init_internal): get the nullable type
7171
7172         * class.c (mono_class_is_nullable): New method
7173         (mono_class_get_nullable_param): New mehod
7174         (mono_class_create_generic): In types T? set cast_class to T
7175
7176         * class-internals.h (MonoDefaults): new nullable default class
7177         (mono_class_get_nullable_param, mono_class_get_nullable_param):
7178         new methods.
7179
7180 2005-12-05  Raja R Harinath  <rharinath@novell.com>
7181
7182         * metadata.c (select_container): New.  Refactor code to select the
7183         appropriate GenericContainer given the type of generic parameter
7184         we are looking for.
7185         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
7186         not a MonoGenericContext.  Use select_container.  Update parameters.
7187         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
7188         and MONO_TYPE_MVAR.
7189         (unwrap_arrays): Remove duplicate tests.
7190         (find_generic_param): Rename from 'has_same_context'.  Now walks a
7191         generic instantiated class to find any arguments that are generic
7192         parameters.
7193         (mono_type_create_from_typespec_full): Use find_generic_param to
7194         avoid evicting some generic instantiations from the typespec
7195         cache.
7196
7197 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
7198
7199         * reflection.c: fixed writing of doubles on ARM FPA.
7200
7201 2005-12-02  Robert Jordan  <robertj@gmx.net>
7202
7203         * icall.c: Fixed EventInfo.ReflectedType (#76829).
7204
7205 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7206
7207         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
7208         least on SUSE 10 they are not the same (on debian, they are just the
7209         same thing).
7210
7211 2005-12-01  Raja R Harinath  <rharinath@novell.com>
7212
7213         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
7214         DeclaringType for VARs and MVARs.
7215         * class.c (set_generic_param_owner): Fix initialization of owner
7216         fields.
7217
7218 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7219
7220         * icall.c: fixed Enum.ToObject() to correctly convert the values.
7221
7222 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7223
7224         * threadpool.c: workaround for a bug that shows up on the Mac:
7225         select()+connect() on a blocking socket is not like it should
7226         be, so we proceed to connect() in that case, wasting the I/O
7227         threadpool thread until connect succeedes. Fixes bug #75436.
7228
7229 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7230
7231         * threadpool.c: fix typo when setting file descriptor states.
7232
7233 2005-11-28  Raja R Harinath  <rharinath@novell.com>
7234
7235         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
7236         * metadata.c (mono_metadata_parse_method_signature_full): Don't
7237         create a temporary signature container.
7238         (mono_metadata_parse_generic_param): Update to changes.
7239         (mono_type_create_from_typespec_full): Update to changes.
7240         * loader.c (method_from_memberref): Don't use a
7241         MonoGenericContainer while parsing a memberref signature.
7242         (method_from_methodspec): Remove dead-store of the 'container'
7243         variable.  It's overwritten before use.
7244
7245         * metadata.c (mono_type_create_from_typespec_full): Make debugging
7246         checks tighter.
7247         (mono_metadata_parse_generic_param): Likewise.
7248         * loader.c (find_method_in_class): Does not need a
7249         MonoGenericContainer.  Use 'mono_method_signature' rather than
7250         'mono_method_signature_full'.
7251         (find_method, mono_get_method_constrained, method_from_memberref):
7252         Update to changes.
7253
7254         * metadata.c (mono_type_create_from_typespec_full): Ensure that
7255         owner-less generic-parameters are never evicted from the typespec
7256         cache.
7257
7258         * loader.c (method_from_memberref): Don't use the current context
7259         when parsing signatures.
7260         (method_from_methodspec, mono_get_method_from_token): Update to changes.
7261
7262         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
7263         side-effects in g_assert.
7264         * loader.c (mono_get_method_from_token): Resolve klass earlier so
7265         that we don't potentially lose information.
7266
7267 2005-11-26  Dick Porter  <dick@ximian.com>
7268
7269         * icall.c:
7270         * threads.c: icalls to implement basic (ie, not named)
7271         System.Threading.Semaphore.
7272
7273 2005-11-24  Dick Porter  <dick@ximian.com>
7274
7275         * process.c
7276         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
7277         Use GetProcessId() if it's available.
7278
7279 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
7280
7281         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
7282
7283 2005-11-23  Raja R Harinath  <rharinath@novell.com>
7284             Ankit Jain  <jankit@novell.com>
7285
7286         * loader.c (mono_get_method_from_token): Initialize 'method' field
7287         of all generic parameters before parsing the signature.  Remove
7288         code that "fixed"-up MVAR references.
7289
7290 2005-11-23  Ankit Jain  <jankit@novell.com>
7291
7292         * metadata.c (mono_metadata_has_generic_params):
7293         (mono_metadata_load_generic_param_constraints):
7294         (mono_metadata_load_generic_params): Move duplicate code ...
7295         (mono_metadata_get_generic_param_row): ... here. Returns the
7296         first row-id in GenericParam table for a given owner (token).
7297         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
7298         prototype.
7299
7300 2005-11-23  Raja R Harinath  <rharinath@novell.com>
7301             Ankit Jain  <jankit@novell.com>
7302
7303         * metadata.c (mono_metadata_class_equal): Pass signature_only when
7304         comparing VARs too.
7305         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
7306         type->data.generic_param only if the type is an MVAR.
7307         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
7308         leak owner-less VARs and MVARs into managed space.
7309
7310 2005-11-21  Martin Baulig  <martin@ximian.com>
7311
7312         * class-internals.h
7313         (MonoMethod): Moved the `generic_container' here from
7314         `MonoMethodNormal' since we now also need it for
7315         `MonoMethodPInvoke';
7316         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
7317         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
7318         an union containing both `MonoMethodNormal' and
7319         `MonoMethodPInvoke'.
7320
7321         * loader.c
7322         (mono_get_method_from_token): Allow implementing generic methods
7323         as interncalls.
7324
7325         * threads.c
7326         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
7327         icall.
7328
7329 2005-11-17  Dick Porter  <dick@ximian.com>
7330
7331         * icall.c: 
7332         * process.h: 
7333         * process.c: Split the Process Start_internal icall into
7334         ShellExecuteEx_internal and CreateProcess_internal, which are
7335         called depending on whether UseShellExecute is true.  Fixes bug
7336         76670.
7337
7338         * appdomain.c (MONO_CORLIB_VERSION): Incremented
7339
7340 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
7341
7342         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
7343         'msize' parameters, use the information in 'mspec' instead.
7344         (emit_object_to_ptr_conv): Ditto.
7345
7346         * marshal.c (emit_struct_conv): Handle explicit layout structs with
7347         fields out of order. Fixes #76733.
7348
7349 2005-11-17  Ankit Jain  <jankit@novell.com>
7350
7351         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
7352
7353 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
7354
7355         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
7356           bug #76575.
7357
7358 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
7359
7360         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
7361         for types with non-auto layout. Fixes #76717.
7362
7363 2005-11-16  Ankit Jain  <jankit@novell.com>
7364
7365         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
7366         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
7367         if generic_context is null.
7368           (mono_metadata_generic_param_equal): param->owner can be null.
7369           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
7370         null.
7371
7372 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
7373
7374         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
7375         the correct value.
7376
7377 2005-11-15  Martin Baulig  <martin@ximian.com>
7378
7379         * object.c (set_value): Use mono_class_from_mono_type() instead of
7380         the hack for generic instances; fixes #76136.
7381
7382 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
7383
7384         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
7385         fields.
7386
7387         * image.c (load_metadata_ptrs): Initialize the new fields.
7388
7389         * reflection.c (create_dynamic_mono_image): Ditto.
7390
7391         * reflection.c (build_compressed_metadata): Use the new fields.
7392
7393         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
7394         icall.
7395
7396         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
7397         icall.
7398         
7399 2005-11-15  Ankit Jain  <jankit@novell.com>
7400             Raja R Harinath  <harinath@gmail.com>
7401
7402         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
7403         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
7404         new per-generic_container cache if the cached MonoType's context matches
7405         the current context.
7406           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
7407         to the expected context.
7408           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
7409
7410 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7411
7412         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
7413         we changed the signature of an icall.
7414         * icall.c: Modify to mono_double_ParseImpl return true/false 
7415         depending on the success, instead of throwing the exception. This will
7416         help us in Double.TryParse methods.
7417         
7418 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
7419
7420         * marshal.c (emit_marshal_object): Throw an exception when
7421         marshalling 'object' instead of crashing. Fixes #76696.
7422
7423 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7424
7425         * class-internals.h: Add prototype for mono_type_get_full_name ().
7426
7427 2005-11-11  Dick Porter  <dick@ximian.com>
7428
7429         * threads.c (mono_thread_manage): Make sure the main thread has
7430         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
7431
7432 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7433
7434         * loader.c (mono_loader_set_error_type_load): Log a warning to the
7435         console about the missing type.
7436         (mono_loader_set_error_method_load): Ditto.
7437
7438 2005-11-09  Miguel de Icaza  <miguel@novell.com>
7439
7440         * mono-config.c (mono_get_config_dir): Set the system defaults if
7441         none is specified.
7442
7443         * assembly.c (mono_set_dirs): New API entry point to set the
7444         assembly and the config directory in one call
7445
7446 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
7447
7448         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
7449         the ftnptr was created from a delegate in a domain other than the
7450         current domain. Fixes #75377.
7451
7452         * exception.h exception.c: Add mono_get_exception_not_supported ().
7453
7454 2005-11-08  Martin Baulig  <martin@ximian.com>
7455
7456         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
7457
7458 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
7459
7460         * security-manager.h: Added definitions to deal with strongname key 
7461         pairs bigger (and smaller) than 1024 bits.
7462         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
7463         adjust wrt the public key length being used.
7464
7465 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
7466
7467         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
7468           Windows build (r51396-51397).
7469
7470 2005-11-03  Martin Baulig  <martin@ximian.com>
7471
7472         * class.c (mono_class_setup_vtable_general): Also add generic
7473         methods to the vtable; fixes #76581.
7474
7475 2005-11-01  Miguel de Icaza  <miguel@novell.com>
7476
7477         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
7478         sure that we lookup GetString method from the System.Text.Encoding
7479         class, not the derived class or we get an empty method.
7480
7481         Fixed class #76612.
7482
7483 2005-10-25  Miguel de Icaza  <miguel@novell.com>
7484
7485         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
7486         if it has been previously set (embedders). 
7487
7488         Make mono_set_rootdir available also on Unix.
7489
7490 005-10-24  Robert Jordan  <robertj@gmx.net>
7491
7492         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
7493
7494 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7495
7496         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
7497         only calls which are made to native code use this flag.
7498
7499         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
7500
7501 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
7502
7503         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7504         Add support for FieldBuilders.
7505
7506 2005-10-29  Martin Baulig  <martin@ximian.com>
7507
7508         * mono-debug.c
7509         (mono_debug_using_mono_debugger): New public method; returns
7510         whether we're running inside the debugger.
7511
7512 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
7513
7514         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
7515         for Method/Constructor/FieldBuilders.
7516
7517 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
7518
7519         * reflection.c (module_add_cattrs): Save custom attributes for global methods
7520         and fields as well.
7521
7522 2005-10-26  Martin Baulig  <martin@ximian.com>
7523
7524         * mono-debug-debugger.c
7525         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
7526
7527 2005-10-24  Raja R Harinath  <harinath@gmail.com>
7528
7529         * icall.c (base64_to_byte_array): Don't pass an out-of-range
7530         integer to isspace.
7531
7532 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
7533
7534         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
7535         when passing valuetypes byref. Fixes #76502.
7536
7537 2005-10-19  Jackson Harper  <jackson@ximian.com>
7538
7539         * profiler.c: Don't put a . in front of types that are not in a
7540         namespace.
7541
7542 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
7543
7544         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
7545
7546 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
7547
7548         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
7549         #76436.
7550         (mono_marshal_get_ldflda_wrapper): Fix a warning.
7551
7552 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7553
7554         * assembly.c metadata-internals.h icall.c: Define an additional
7555         parameter for mono_assembly_name_parse_full, so we can avoid creating
7556         S.R.AssemblyName.Version when no version info wasn't passed.
7557         
7558 2005-10-09  Miguel de Icaza  <miguel@novell.com>
7559
7560         * class.c (mono_type_get_full_name): Reimplement method that was
7561         removed. 
7562
7563         * image.c: Some docs
7564
7565 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
7566
7567         * profiler.c (output_newobj_profile): Fix printing of Total memory
7568         on x86.
7569
7570 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7571
7572         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
7573
7574 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
7575
7576         * threads.c: remove debug output.
7577
7578 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7579
7580         * threads.c (mono_thread_manage): Fix crashes if more than 64
7581         threads need to be aborted. Hopefully fixes #75899.
7582
7583         * assembly.c (mono_stringify_assembly_name): New helper function.
7584
7585         * class.c: Use mono_stringify_assembly_name instead of the similar
7586         static function.
7587
7588         * assembly.h assembly.c: Add support for calling a postload search 
7589         hook if an assembly cannot be loaded.
7590
7591         * appdomain.c: Register new search hooks which call the AssemblyResolve
7592         events in AppDomain. Fixes #75231
7593
7594 2005-10-07  Martin Baulig  <martin@ximian.com>
7595
7596         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
7597         methods without debug info.
7598
7599 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
7600
7601         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
7602         wrappers.
7603
7604 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7605
7606         * file-io.c: now that we return symlinks, use lstat and, when the file
7607         is a symbolic link, stat, to get the file attributes. Also avoid the
7608         conversion to/from utf16/external.
7609
7610 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
7611
7612         * class.c (mono_class_layout_fields): Compute klass->has_references
7613         correctly if an embedded valuetype is not yet initialized. Fixes
7614         #76331.
7615
7616 2005-10-04  Martin Baulig  <martin@ximian.com>
7617
7618         * metadata.c
7619         (mono_metadata_load_generic_param_constraints): New public
7620         function; splitted the constraints loading out from
7621         mono_metadata_load_generic_params().
7622
7623         * class.c (mono_class_create_from_typedef): Call
7624         mono_metadata_load_generic_param_constraints() after setting up
7625         the type and creating our parent; fixes #75329.
7626
7627 2005-10-04  Martin Baulig  <martin@ximian.com>
7628
7629         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
7630         non-dynamic parent classes.
7631
7632 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
7633
7634         * file-io.c : win32 build fix (ETXTBSY seems not found).
7635
7636 2005-10-04  Martin Baulig  <martin@ximian.com>
7637
7638         * reflection.c
7639         (mono_image_get_methodspec_token): Make the cache actually work;
7640         fixes #75974.
7641
7642 2005-10-04  Martin Baulig  <martin@ximian.com>
7643
7644         * class.c (mono_class_name_from_token): Removed the unneccessary
7645         `MonoGenericContext *' argument.
7646
7647 2005-10-04  Martin Baulig  <martin@ximian.com>
7648
7649         * loader.c
7650         (method_from_methodspec): Make the caching work again; fixes the
7651         performance regression from #76262.
7652
7653 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7654
7655         * file-io.c:
7656         * file-io.h:
7657         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
7658         GetFileSystemEntries that performs the same work but without going
7659         into io-layer, locking, etc.
7660
7661 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
7662
7663         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
7664         ThreadState_Stopped as well. Fixes #76047.
7665
7666 2005-09-29  Martin Baulig  <martin@ximian.com>
7667
7668         * class.c
7669         (inflate_generic_context): If the new context has a `gmethod', set
7670         its `container' that that gmethod's `container'.
7671
7672         * metadata.c
7673         (mono_metadata_parse_generic_param): Simplify things;
7674         `generic_container = generic_context->container;' is just fine.
7675
7676         * loader.c (method_from_methodspec): Code cleanups.
7677
7678 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7679
7680         * decimal.c: fix warning (and let gcc generate correct
7681         code on ARM with optimizations).
7682
7683 2005-09-28  Martin Baulig  <martin@ximian.com>
7684
7685         * loader.c
7686         (method_from_memberref): Added `MonoGenericContext *class_context'
7687         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
7688         (method_from_methodspec): If we're a memberref, use the enclosing
7689         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
7690
7691 2005-09-28  Martin Baulig  <martin@ximian.com>
7692
7693         * object.c (mono_runtime_invoke_array): Added support for
7694         MONO_TYPE_GENERICINST; fixes #75917.
7695
7696 2005-09-27  Martin Baulig  <martin@ximian.com>
7697
7698         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
7699         `k->byval_arg.type' to determine the actual type.
7700
7701         * loader.c (method_from_methodspec): Removed some hacks.
7702
7703 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
7704
7705         * class-internals.h (mono_field_is_deleted): Do the test for
7706         rtspecialname before we check the actual name of the field. This
7707         prevents us from dereferencing a pointer into the string table,
7708         saving us from accessing a few pages
7709
7710         * *.c: Replace the use of {Enter,Leave}CriticalSection with
7711         macros. This will allow a deadlock debugger to easily be plugged
7712         in.
7713
7714 2005-09-27  Martin Baulig  <martin@ximian.com>
7715
7716         * loader.c (method_from_methodspec): Create a "signature"
7717         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
7718
7719 2005-09-27  Martin Baulig  <martin@ximian.com>
7720
7721         * class.c
7722         (inflate_generic_class): Correctly set the new context's
7723         container.
7724
7725         * loader.c
7726         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
7727         instead of a `MonoGenericContext *'.
7728         (mono_method_signature_full): Take a `MonoGenericContainer *'
7729         instead of a `MonoGenericContext *'.
7730
7731         * metadata.c
7732         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
7733         instead of a `MonoGenericContext *'.
7734         (mono_metadata_parse_method_signature_full): Likewise.
7735
7736 2005-09-26  Martin Baulig  <martin@ximian.com>
7737
7738         * class.c
7739         (mono_class_from_generic_parameter): Set `klass->generic_container'
7740         (mono_class_from_generic_parameter): Likewise.
7741         (mono_bounded_array_class_get): We inherit the generic container
7742         from the element class.
7743
7744         * loader.c
7745         (find_method, find_method_in_class): Take a `MonoGenericContext *'
7746         argument rather than computing it here.
7747         (method_from_memberref): Correctly set the generic context before
7748         parsing the signature.  Fixes #75681.
7749
7750 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
7751
7752         * object.c (mono_class_has_special_static_fields): Fix warnings.
7753
7754 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
7755
7756         * assembly.c: Add parse_public_key function, to
7757         par the public keys. Also added mono_assembly_name_parse_full,
7758         to define it the parsed key should be freed or not.
7759         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
7760         to parse a long format assembly name.
7761         * metadata-internals.h: Keep mono_assembly_name_parse_full as
7762         private, since calling it to preserve the key requires
7763         freeing it manually.
7764         
7765 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
7766
7767         * locales.c : removed HAVE_ICU part.
7768
7769 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7770
7771         * object.c (mono_class_create_runtime_vtable): Avoid calling 
7772         field_is_special_static if the klass has no special static fields.
7773
7774         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
7775         (MonoCachedClassInfo): Likewise.
7776
7777         * object.c (mono_class_has_special_static_fields): New helper function.
7778
7779 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7780
7781         * class.c (mono_class_create_from_typedef): Don't call 
7782         interfaces_from_typedef_full for enums.
7783         (mono_class_create_from_typedef): Compute the base types of enums directly
7784         without calling mono_class_setup_fields ().
7785         (mono_class_find_enum_basetype): New helper function.
7786
7787         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
7788         one place inside the string heap.
7789         
7790 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
7791
7792         * class.c: locking fixes, code cleanups, some docs added.
7793         Allocate some data structures in the image mempool.
7794
7795 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7796
7797         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
7798         the example code.
7799         
7800 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
7801
7802         * class-internals.h, class.c, reflection.c: reduce memory taken by
7803         MonoClass.
7804
7805 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
7806
7807         * metadata.c, metadata.h, loader.h: documentation updates, code and
7808         API cleanups.
7809
7810 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7811
7812         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
7813         the example code.
7814
7815         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
7816         page faults caused by the runtime while reading metadata.
7817
7818 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7819
7820         * socket-io.c: the field names were changed 3 months ago and no one
7821         realized until bug #76077 got filed!
7822
7823 2005-09-20  Martin Baulig  <martin@ximian.com>
7824
7825         * icall.c (assembly_icalls): Removed some unused debugger icalls.
7826
7827 2005-09-20  Martin Baulig  <martin@ximian.com>
7828
7829         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
7830         write the rank into the class entry.
7831
7832 2005-09-20  Martin Baulig  <martin@ximian.com>
7833
7834         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
7835
7836 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
7837
7838         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7839
7840         * icall.c (custom_attrs_defined_internal): New icall.
7841
7842         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
7843         function.
7844         (mono_custom_attrs_construct_by_type): New helper function.
7845
7846 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
7847
7848         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
7849         terminate the resulting string. Fixes #76123.
7850
7851 2005-09-16  Martin Baulig  <martin@ximian.com>
7852
7853         * mono-debug.c
7854         (mono_debug_add_method): Ignore inflated methods for the moment.
7855
7856 2005-09-14  Martin Baulig  <martin@ximian.com>
7857
7858         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
7859
7860 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
7861
7862         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
7863         return a success/failure indication.
7864         (mono_metadata_interfaces_from_typedef_full): Ditto.
7865         (get_constraints): Ditto.
7866
7867 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
7868
7869         * marshal.c (emit_marshal_array): Fix handling of null arrays.
7870         
7871         * marshal.c (emit_marshal_array): Add support for returning string
7872         arrays from delegates. Fixes #76063.
7873
7874         * marshal.c: Use the emit_ldloc/stloc macros where possible.
7875
7876 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
7877
7878         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
7879         icall.
7880
7881 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
7882
7883         * reflection.c icall.c: Fix after mono_get_exception_type_load
7884         signature change.
7885
7886         * assembly.c (mono_assembly_get_assemblyref): New helper function.
7887         (mono_assembly_load_reference): Use the new helper.
7888
7889         * class-internals.h (MonoLoaderError): New structure containing 
7890         information about type loading errors.
7891
7892         * class-internals.h loader.c: Add APIs to store per-thread loader
7893         error information.
7894
7895         * loader.c class.c: Set the loader error if needed.
7896
7897         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
7898
7899 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
7900
7901         * decimal.c: fixed to handle the broken ARM fp format.
7902
7903 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
7904
7905         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
7906         broken.
7907
7908 2005-09-06  Martin Baulig  <martin@ximian.com>
7909
7910         * domain.c (supported_runtimes): Added v2.0.50727.
7911
7912 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
7913
7914         * culture-info.h: reduce the size of some structures.
7915
7916 2005-09-05  Martin Baulig  <martin@ximian.com>
7917
7918         Reflect latest API changes in the August CTP.
7919
7920         * icall.c
7921         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
7922         ("MonoType.HasGenericArguments"): Removed.
7923         ("MonoMethod.BindGenericParameters"): Renamed to
7924         "MakeGenericMethod".
7925         ("MethodBuilder.BindGenericParameters"): Renamed to
7926         "MakeGenericMethod".    
7927
7928 2005-09-05  Martin Baulig  <martin@ximian.com>
7929
7930         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
7931
7932 2005-09-05  Martin Baulig  <martin@ximian.com>
7933
7934         Applying a patch from Michal Moskal <malekith@nemerle.org>.
7935
7936         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
7937         generic_container is non-NULL.
7938
7939 2005-09-05  Martin Baulig  <martin@ximian.com>
7940
7941         Applying a patch from Michal Moskal <malekith@nemerle.org>.
7942
7943         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
7944
7945 2005-08-29  Michal Moskal  <malekith@nemerle.org>
7946
7947         * reflection.c (encode_locals,
7948         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
7949         for large generic types.
7950
7951 2005-09-05  Martin Baulig  <martin@ximian.com>
7952
7953         Applying a patch from Michal Moskal <malekith@nemerle.org>.
7954
7955         * class.c (mono_dup_array_type): New public method.
7956         (mono_metadata_signature_deep_dup): New public method.
7957         (dup_type): Correctly duplicate array and function types.
7958
7959 2005-09-05  Martin Baulig  <martin@ximian.com>
7960
7961         Applying a patch from Michal Moskal <malekith@nemerle.org>.
7962
7963         * reflection.c (get_default_param_value_blobs): Handle generic types
7964         and generic methods.
7965
7966 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
7967
7968         * class.c: Fixed error reporting (method/class were inversed) for 
7969         inheritance demands.
7970         * security-manager.c|h: Added the AppDomain when calling the managed
7971         System.Security.SecurityManager.InheritanceDemand method.
7972
7973 2005-09-01  Raja R Harinath  <rharinath@novell.com>
7974
7975         * reflection.c (encode_marshal_blob): 'marshaltype' and
7976         'marshaltyperef' are alternate sources for the custom marshaler
7977         name.
7978
7979 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
7980
7981         * class.c: fix creation of array classes with rank == 1
7982         (patch by Ankit Jain <jankit@novell.com>).
7983
7984 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
7985
7986         * object.c: fix check for creating the bound data for arrays vs
7987         szarrays.
7988
7989 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7990
7991         * object.c: configuration file name is now based on the executable name,
7992         not the image name. Fixes bug #75931.
7993
7994 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
7995
7996         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
7997         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
7998
7999 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
8000
8001         * rand.c: Use wincrypt.h instead of WinCrypt.h.
8002
8003 2005-08-24  Ankit Jain  <jankit@novell.com>
8004             Raja R Harinath  <rharinath@novell.com>
8005
8006         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
8007           called by it recursively.
8008           (mono_class_init): Remove special case in pending_init handling, since it's
8009           superseded by the fix to mono_class_from_typeref.
8010
8011 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8012
8013         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
8014         BROKEN_THREAD_START stuff.
8015
8016 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
8017
8018         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
8019         trampoline.
8020
8021         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
8022         
8023         * object.c (mono_delegate_ctor): Replace the original function address with
8024         a delegate trampoline.
8025
8026 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
8027
8028         * icall.c: add boolean argument to base64_to_byte_array and 
8029         InternalFromBase64String to control whether a whitespace-only string
8030         is allowed (or should casue a FormatException to be thrown). We need
8031         this as the behavior has changed between MS.NET 1.x and 2.0, and we
8032         to match the MS behaviour in both profiles.
8033         * appdomain.c: Bump corlib version.
8034
8035 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8036
8037         This patch implements a big portion of publisher policy
8038         support, used to bind assembly versions and redirect
8039         one assembly from version A to version B.
8040
8041         * assembly.c:
8042         New GSList loaded_assembly_bindings, for storing the cached
8043         assembly bindings.
8044         (assembly_binding_maps_name): New static function for checking if a 
8045         assembly binding information maps an assembly name.
8046         (mono_assembly_binding_info_free): New function for freeing
8047         assembly binding information resources.
8048         (get_publisher_policy_info): New static function for retrieving 
8049         assembly binding information from a MonoImage.
8050         (compare_versions): New static function for comparing an assembly
8051         binding information data and the version of an assembly name.
8052         (check_policy_versions): New static function for checking if an
8053         assembly binding info mapping an assembly name is valid for it.
8054         (mono_assembly_load_publisher_policy): New static function for
8055         loading the 'policy.major.minor.MyAssembly' image for an assembly
8056         with an assembly name 'aname'.
8057         (mono_assembly_bind_version): New static function for updating
8058         assembly redirection.
8059         (mono_assembly_apply_binding): New static function for applying
8060         assembly binding.
8061         (search_binding_loaded): New static function for searching 
8062         loaded assembly binding infos in the cache domain.
8063         (mono_assembly_load_full): Don't apply assembly binding for
8064         reflection only assemblies.
8065
8066         * metadata-internals.h: Add MonoAssemblyBindingInfo,
8067         which contains information about assembly binding. Also
8068         declare signature for mono_config_parse_publisher_policy ()
8069         function, used to retrieve pub policy info.
8070         
8071         * mono-config.c:
8072         (publisher_policy_start): New static function used to parse publisher 
8073         policy config files.
8074         (publisher_policy_parser): New static MonoParseHandler containing 
8075         the functions used when parsing config files.
8076         (mono_config_parse_publisher_policy): New function for parsing
8077         publisher policy files.
8078         
8079 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
8080
8081         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
8082
8083         * marshal.c (mono_delegate_free_ftnptr): Ditto.
8084
8085         * object.c (mono_get_addr_from_ftnptr): New helper function.
8086
8087         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
8088
8089         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8090
8091 2005-08-19  Dick Porter  <dick@ximian.com>
8092
8093         * threads.c, threads.h, appdomain.c, appdomain.h,
8094         profiler-private.h, monitor.c, object.c, object-internals.h,
8095         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
8096         store the thread ID, so it can hold a 64 bit value if needed.
8097
8098 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
8099
8100         * reflection.c (mono_reflection_create_dynamic_method): Store the
8101         handle class into the method references as well so ldtoken works in
8102         dynamic methods.
8103
8104         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
8105         types.
8106
8107 2005-08-19  Ankit Jain <jankit@novell.com>
8108
8109         Fix #75847.
8110         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
8111           here rather than using the method signature of a arbitrary function
8112           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
8113           two arguments.
8114           Hack done with Harinath.
8115
8116 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8117
8118         * threadpool.c: disable printing stack traces when we get a exception
8119         in a threadpool thread. I need to do more testing to figure out which
8120         cases actually print this. Fixes bug #75828.
8121
8122 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8123
8124         * icall.c: there might be ignored whitespace after the last '='. This
8125         fixes length computation and bug #75840.
8126
8127 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
8128
8129         * assembly.c (mono_assembly_load_full): Consider .exe extension as
8130         well. Fixes #75809.
8131
8132         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
8133         #75784.
8134         
8135         * reflection.c (create_custom_attr_data): Ditto.
8136
8137 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
8138
8139         * locales.c, culture-info.h : removed RegionLCIDMap.
8140         * culture-info-tables.h : regenerated.
8141
8142 2005-08-16  Martin Baulig  <martin@ximian.com>
8143
8144         * class.c (mono_type_get_name_recurse): Small fix.
8145
8146 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
8147
8148         * locales.c : indentation fixie.
8149
8150 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
8151
8152         * object-internals.h,
8153           locales.h,
8154           locales.c,
8155           culture-info.h,
8156           icall.c : added RegionInfo table support.
8157         * culture-info-table.h : regenerated for region support.
8158
8159 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
8160
8161         * reflection.c (resolve_object): handle all kinds of MonoMethod
8162         including generic ones
8163
8164 2005-08-12  Ankit Jain <jankit@novell.com>
8165
8166         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
8167           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
8168
8169 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
8170
8171         * process.c: Don't close a thread handle when it's NULL. This is a
8172         workaround for bug #75733.
8173
8174 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
8175
8176         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
8177
8178 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
8179
8180         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
8181
8182 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8183
8184         * threadpool.c: if a work item in the thread pool has a callback that
8185         catches a exception, don't propagate it after invoking the callback.
8186         Fixes bug #75336.
8187
8188 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
8189
8190         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
8191
8192         * class-internals.h (MonoCachedClassInfo): Add some new fields.
8193
8194         * class.c (mono_class_init): Load field info lazily in the AOT case.    
8195
8196         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
8197
8198 2005-08-03  Ankit Jain  <jankit@novell.com>
8199
8200         Fix #75683.
8201         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
8202           PInvoke calling convention is 0.
8203
8204 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
8205
8206         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
8207         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
8208
8209 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
8210
8211         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
8212         to handle threads not started by the GC (patch by Michael Meeks
8213         <michael.meeks@novell.com>).
8214
8215 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
8216
8217         * reflection.c: Make buffer used in emitting types larger for some
8218         big generic types (patch by Michal Moskal).
8219
8220 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
8221
8222         * mono-debug.c: Fix some (not all) alignment problems.
8223
8224 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8225
8226         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
8227         Invoke mono_image_load_from_data_full passing the refonly
8228         parameter.
8229
8230         * assembly.c
8231         (mono_assembly_open_from_bundle): Add the refonly argument, 
8232         in order to pass it to other methods it calls to.
8233         (do_mono_assembly_open): Add the refonly argument, in order 
8234         to pass it to other methods it calls to.
8235         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
8236         the refonly parameter to it.
8237
8238         * image.c: Add loaded_images_refonly_hash and
8239         loaded_images_refonly_guid_hash to cache the reflection
8240         only loaded images.
8241         (mono_images_init): Initialize the hash tables used for
8242         caching the reflection only images.
8243         (load_modules): Invoke mono_image_open_full passing the refonly
8244         parameter to load the modules the correct way.
8245         (build_guid_table): Add the refonly argument, to re-build the 
8246         correct hash table.
8247         (do_mono_image_open): Added the refonly argument, in order to
8248         define it for the loaded image.
8249         (mono_image_loaded_full): New function, which receives an
8250         additional parameter to look for the image in the refonly or
8251         non-refonly section.
8252         (mono_image_loaded): Updated, using mono_image_loaded_full.
8253         (mono_image_loaded_by_guid_full): The same case that happens
8254         with mono_image_loaded_full.
8255         (mono_image_loaded_by_guid): Likewise.
8256         (register_image): Use the ref_only variable inside MonoImage
8257         to decide in which hash table store the current image.
8258         (mono_image_open_from_data_full): Rename
8259         mono_image_open_from_data to mono_image_open_from_data_full,
8260         adding the refonly argument, to define the ref_only variable 
8261         inside MonoImage.
8262         (mono_image_open_from_data): Return 
8263         mono_image_open_from_data_full.
8264         (mono_image_open_full): Rename mono_image_open to
8265         mono_image_open_full, receiving the new refonly argument,
8266         to pass it to inner methods.
8267         (mono_pe_file_open): Update this function, to open
8268         a MonoImage as a non-refonly image.
8269         (mono_image_close): Use the refonly variable inside
8270         MonoImage to remove the image from the correct caches.
8271
8272         * image.h: Add the signatures of mono_image_open_full,
8273         mono_image_open_from_data_full, mono_image_loaded_full,
8274         mono_image_loaded_by_guid_full.
8275
8276         * metadata-internals.h: Add the ref_only field to 
8277         MonoImage.
8278         
8279 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8280
8281         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
8282         Fix the last behavior, which used to load the assemblies and
8283         extract MonoReflectionAssemblyName information, instead of
8284         extract it from the metadata tables. Needed for Reflection
8285         Only assemblies.
8286         
8287 2005-07-29  Martin Baulig  <martin@ximian.com>
8288
8289         * mono-debug-debugger.c
8290         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
8291         not initialized.
8292
8293         * mono-debug.c
8294         (mono_debug_address_from_il_offset): Check whether we have
8295         debugging support before attempting to take the lock.
8296         (mono_debug_source_location_from_address): Likewise.
8297         (mono_debug_source_location_from_il_offset): Likewise.
8298         (mono_debug_il_offset_from_address): Likewise.
8299         (mono_debug_address_from_il_offset): Likewise.
8300
8301 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
8302
8303         * class.c (mono_class_from_name_case): Add support for dynamic images.
8304         Fixes #75650.
8305
8306         * object.c (mono_class_compute_gc_descriptor): Add a workaround
8307         for #75479.
8308
8309 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8310         
8311         * reflection.c (mono_method_get_object): Fix warning.
8312
8313 2005-07-28  Martin Baulig  <martin@ximian.com>
8314
8315         * mono-debug.c
8316         (mono_debug_add_wrapper): Also write the wrapper type.
8317
8318 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8319
8320         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
8321         
8322         * class.c (mono_class_init): Avoid reading nested classes if the AOT
8323         data indicates the class has none.
8324
8325 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
8326
8327         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
8328         loader lock with the debugger lock. Prevents deadlocks for beagle.
8329
8330         Beagle can now run on an smp box for a weekend without any
8331         issues. Woohoo!
8332
8333 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
8334
8335         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
8336         in a module. Fixes #75629.
8337
8338 2005-07-26  Martin Baulig  <martin@ximian.com>
8339
8340         * mono-debug.c (mono_debug_add_wrapper): New static method.
8341         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
8342         interncall or a wrapper.
8343
8344         * mono-debug.h (MonoDebugWrapperData): New public typedef.
8345         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
8346         (MONO_DEBUGGER_VERSION): Bump to 51.
8347
8348         * mono-debug-debugger.c
8349         (mono_debugger_add_type): Removed this empty function.
8350         (mono_debugger_add_method): Likewise.
8351
8352 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
8353
8354         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
8355         before accessing method->slot.
8356
8357 2005-07-21  Jb Evain  <jbevain@gmail.com>
8358
8359         * reflection.c (method_encode_clauses/class): Handle filters clauses.
8360         Fixes #75010.
8361
8362 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
8363
8364         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
8365         #75587.
8366
8367 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8368
8369         * image.h image.c: Add mono_image_get_guid () API function.
8370
8371 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
8372
8373         There were issues when multiple threads tried to load
8374         assemblies. A deadlock was created between assemblies_mutex and
8375         mono_domain_assemblies_lock. This fixes the issue by making the
8376         assembly ref counting be lock free. See bug 75586.
8377         
8378         * image.c (mono_image_close): The add ref function here was using
8379         Interlocked operations while the unref was using a mutex and a
8380         --. I don't think this was ever a bug that would be exposed in a
8381         non-pendantic way (ie, by an embedder doing a ref on one thread
8382         and an unref on another), but for the sake of correctness, this is
8383         now Interlocked.
8384
8385         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
8386         (mono_assembly_load_reference): Call mono_assembly_addref rather
8387         than touching the refcount ourselves.
8388         (mono_assembly_close): Use InterlockedDecrement to unref the
8389         assembly. Don't acquire the lock unless it is actually needed.
8390
8391 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
8392
8393         * class.c (mono_class_layout_fields): Fix calculation of has_references
8394         for generic types.
8395
8396 2005-07-12  Martin Baulig  <martin@ximian.com>
8397
8398         Applying a patch from Michal Moskal <malekith@nemerle.org>.
8399
8400         * metadata.c
8401         (mono_type_hash): Provide better hashing for generic instances.
8402         (mono_generic_inst_hash): Improve hashing.
8403         (mono_generic_class_hash): Likewise.
8404
8405         * reflection.c (mymono_metadata_type_hash): Improve hashing for
8406         generic instances.
8407
8408 2005-07-12  Martin Baulig  <martin@ximian.com>
8409
8410         * reflection.c (mono_reflection_create_runtime_class): Remove the
8411         hack for generic type definitions and non-`Run' assemblies.
8412         (mono_reflection_bind_generic_parameters): Also use
8413         `klass->wastypebuilder' to check for TypeBuilders.
8414
8415 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
8416
8417         * class.c (mono_class_layout_fields): Fix calculation of has_references
8418         for generic types.
8419
8420         * class.c (inflate_generic_class): Fix a leak.
8421         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
8422         for generic types.
8423
8424 2005-07-11  Martin Baulig  <martin@ximian.com>
8425
8426         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
8427         on error.
8428
8429 2005-07-11  Martin Baulig  <martin@ximian.com>
8430
8431         * loader.c (find_method): Also lookup in
8432         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
8433
8434 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8435
8436         * appdomain.c (mono_domain_unload): Don't free the error message
8437         before passing it to mono_get_exception_...
8438
8439         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
8440         
8441 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
8442
8443         * threads.c: try to better guess an available RT signal (bug #75387).
8444
8445 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8446
8447         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
8448         and CACHE_OBJECT.
8449
8450 2005-07-07  Martin Baulig  <martin@ximian.com>
8451
8452         * class.c (mono_type_get_name_full): Return NULL for
8453         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
8454         fixes #75408.
8455
8456 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8457
8458         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
8459         exit the appdomain as well being aborted.
8460
8461         * threadpool.c: Create all threadpool threads inside the root appdomain, and
8462         change back to the root domain after calling managed code. This enables
8463         appdomains using threadpools to be unloaded.
8464
8465 2005-07-07  Martin Baulig  <martin@ximian.com>
8466
8467         * class-internals.h
8468         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
8469         into `MonoDynamicGenericClass' since we only need it for dynamic
8470         types.
8471
8472         * reflection.c (mono_class_bind_generic_parameters): We don't need
8473         to compute the `parent' here.
8474
8475 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
8476
8477         * culture-info-table.h : regenerated.
8478
8479 2005-07-06  Martin Baulig  <martin@ximian.com>
8480
8481         * icall.c
8482         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
8483
8484         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
8485
8486 2005-07-06  Martin Baulig  <martin@ximian.com>
8487
8488         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
8489         we're doing a signature-only comparision; fixes #74945.
8490
8491 2005-07-06  Martin Baulig  <martin@ximian.com>
8492
8493         * class-internals.h (MonoGenericClass): Moved some things out into
8494         a new `MonoInflatedGenericClass' type.  
8495         (MonoInflatedGenericClass): New type; the `klass' of a
8496         `MonoGenericClass' is now computed lazyly in
8497         mono_get_inflated_generic_class().      
8498
8499         * class.c (mono_get_inflated_generic_class): New public function.
8500         (mono_class_inflate_generic_method): Removed the unused
8501         `MonoClass *' argument.
8502         (setup_generic_vtable): Don't call mono_get_inflated_method() on
8503         all the methods.
8504         (mono_class_create_generic): Make this static and merge it with
8505         mono_class_create_generic_2(); we're now called automatically from
8506         mono_get_inflated_generic_class().
8507
8508         * loader.c (mono_method_signature): Call
8509         mono_get_inflated_method() here.
8510
8511 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
8512
8513         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
8514         type of fields with RVA.
8515
8516         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
8517         for this pseudo class.
8518         (my_mono_class_from_generic_parameter): Likewise.
8519         (mono_class_init): Allow interfaces to have cctors.
8520
8521 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8522
8523         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
8524         lazily for AOT methods.
8525
8526 2005-07-05  Martin Baulig  <martin@ximian.com>
8527
8528         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
8529         returns FALSE for a successful match, not TRUE.
8530
8531 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8532
8533         * loader.c (mono_method_get_index): Optimize this a bit.
8534
8535 2005-07-04  Martin Baulig  <martin@ximian.com>
8536
8537         * class.c
8538         (class_compute_field_layout): Move the check for generic type
8539         definitions into mono_class_layout_fields().  Fixes #74684.
8540         (mono_class_from_generic_parameter): Correctly compute
8541         `klass->parent'; fixes #75457.
8542
8543         * reflection.c (register_assembly, register_module): Make sure
8544         `domain->rejobject_hash' is already created.
8545
8546 2005-07-02  Martin Baulig  <martin@ximian.com>
8547
8548         * class-internals.h
8549         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
8550         `MonoDynamicGenericClass'.      
8551
8552 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
8553
8554         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
8555         returned by a field getter is null, since null is a valid value.
8556
8557 2005-07-01  Martin Baulig  <martin@ximian.com>
8558
8559         * reflection.c (mono_reflection_generic_class_initialize): Update
8560         the `dgclass->fields [i].parent' to the correct class.
8561         (mono_image_get_fieldref_token): Use the declaring type, not the
8562         reflected type.
8563
8564 2005-07-01  Martin Baulig  <martin@ximian.com>
8565
8566         * loader.c (find_method): Also look in the interfaces; fixes #75429.
8567
8568 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
8569
8570         * threads.c (thread_cleanup): assert that thread != NULL
8571         (wait_for_tids_or_state_change): We were using the wrong variable
8572         when accessing wait->threads. `i' was always out of the bounds of
8573         the array.
8574
8575 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8576
8577         * loader.c: map user32 and kernel32 to libMonoSupportW
8578
8579 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
8580
8581         * appdomain.c (unload_thread_main): Mark this as WINAPI.
8582
8583 2005-06-28  Martin Baulig  <martin@ximian.com>
8584
8585         * loader.c (method_from_methodspec): Fix #75334.
8586
8587 2005-06-28  Martin Baulig  <martin@ximian.com>
8588
8589         Fix #74953 - Arrays now implement the generic IList<T> interface
8590         on the 2.0 platform.
8591
8592         * class-internals.h (MonoDefaults): Added `generic_array_class'.
8593
8594         * reflection.c (mono_class_bind_generic_parameters): New public
8595         function; similar to mono_reflection_bind_generic_parameters(),
8596         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
8597
8598         * domain.c (mono_init_internal): Try to initialize.
8599         `mono_defaults.generic_array_class' here; this'll only succeed if
8600         we're using the 2.0 corlib.
8601
8602         * icall.c
8603         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
8604         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
8605         (mono_lookup_internal_call): Added support for nested classes.
8606
8607         * loader.c
8608         (mono_get_method_from_token): Set `result->signature->pinvoke' if
8609         we're an interncall and have generic arguments.
8610
8611         * class.c
8612         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
8613         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
8614         instance of System.Array.InternalArray<T> for arrays, so they
8615         implement the generic IList<T> interface.
8616
8617 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
8618
8619         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
8620         (chastamar@yahoo.com). Fixes #75374.    
8621
8622 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
8623
8624         * culture-info-table.h: regenerated.
8625
8626 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8627
8628         * icall.c: handle spaces correctly for base64 strings.
8629
8630 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
8631
8632         * *.c: Kill some warnings.
8633
8634 2005-06-23  Duncan Mak  <duncan@novell.com>
8635
8636         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
8637         that this builds on Solaris 10 (x86).
8638
8639 2005-06-23  Martin Baulig  <martin@ximian.com>
8640
8641         * class.c
8642         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
8643         generic type definitions.
8644
8645 2005-06-23  Martin Baulig  <martin@ximian.com>
8646
8647         Fix #75331.
8648
8649         * metadata.c (mono_class_get_overrides): Renamed to
8650         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
8651         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
8652         pass it to mono_get_method_full().
8653
8654 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
8655
8656         * reflection.c (mono_reflection_create_runtime_class): take the
8657         mono_domain_lock in this method. Prevents deadlocks
8658
8659 2005-06-22  Martin Baulig  <martin@ximian.com>
8660
8661         * loader.c (method_from_methodspec): Fix #75330.
8662
8663 2005-06-22  Martin Baulig  <martin@ximian.com>
8664
8665         * reflection.c (type_get_qualified_name): Use
8666         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
8667         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
8668         argument; use it if we don't have an assembly name.
8669
8670 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
8671
8672         * object.c: In mono_message_init, set "copy out" flag for in
8673         parameters with the [Out] flag.
8674
8675 2005-06-21  Martin Baulig  <martin@ximian.com>
8676
8677         * class.c
8678         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
8679         and MONO_TYPE_PTR.
8680
8681 2005-06-21  Martin Baulig  <martin@ximian.com>
8682
8683         * class.c (mono_class_init): Don't initialize `class->fields' for
8684         generic instances since they're initialized again in
8685         compute_field_layout(). 
8686         (compute_field_layout): Set the field's `generic_info' here; fix
8687         #75320. 
8688
8689 2005-06-21  Martin Baulig  <martin@ximian.com>
8690
8691         * class-internals.h
8692         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
8693
8694         * metadata.c (mono_metadata_generic_method_equal): Also
8695         distinguish the `generic_class'; fixes #75334.
8696
8697 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8698
8699         * domain.c:
8700         * appdomain.c:
8701         * domain-internals.h:
8702         * reflection.c: 'domain_assemblies' field is now protected by its own
8703         lock. Don't call into managed code to run the AssemblyLoad event if we
8704         now there are no registered delegates for it.
8705
8706 2005-06-20  Martin Baulig  <martin@ximian.com>
8707
8708         * class.c (mono_class_is_assignable_from): Use a custom version of
8709         mono_class_has_parent() to make things work for generic instances;
8710         fix #75300.
8711
8712 2005-06-20  Martin Baulig  <martin@ximian.com>
8713
8714         * loader.c (method_from_methodspec): Apply a patch from
8715         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
8716
8717 2005-06-20  Martin Baulig  <martin@ximian.com>
8718
8719         * class.c (mono_class_init): Reverted Zoltan's last change; it
8720         breaks generics.
8721
8722 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
8723
8724         * threads.c (wait_for_tids_or_state_change): Add missing locking.
8725
8726 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8727
8728         * socket-io.c: fix the index in the socket array for writable/error
8729         sockets. Fixes bug #75306.
8730
8731 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
8732
8733         * class.c (mono_class_init): Allow interfaces to have static ctors.
8734
8735 2005-06-17  Martin Baulig  <martin@ximian.com>
8736
8737         * loader.c (method_from_methodspec): Use `context->container' when
8738         parsing the `gmethod->inst'.
8739
8740 2005-06-17  Martin Baulig  <martin@ximian.com>
8741
8742         * class.c (mono_type_get_name_recurse): Don't add the assembly
8743         name for type arguments.
8744
8745 2005-06-15  Martin Baulig  <martin@ximian.com>
8746
8747         * reflection.c (mono_image_get_inflated_method_token): Encode
8748         correct klass; fixes #75260.
8749
8750 2005-06-13 Michal Moskal <malekith@nemerle.org>
8751
8752         * icall.c: Make GetCorrespondingMethod/Constructor take
8753         MonoReflectionMethod method not MonoMethod. Removed
8754         MonoType.GetCorrespondingField, and make
8755         MonoGenericType.GetCorrespondingField take name not
8756         MonoClassField.
8757
8758 2005-06-13  Michal Moskal <malekith@nemerle.org>
8759
8760         * reflection.c (field_encode_signature, encode_locals):
8761          Make sizes of buffers for types larger (for big generic types).
8762          (create_generic_typespec,
8763          mono_reflection_sighelper_get_signature_local,
8764          mono_reflection_sighelper_get_signature_field):
8765          Add asserts for too small buffers.
8766
8767 2005-06-15  Martin Baulig  <martin@ximian.com>
8768
8769         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
8770         if our parent is not a dynamic type.
8771
8772 2005-06-15  Martin Baulig  <martin@ximian.com>
8773
8774         * class-internals.h (MonoTypeNameFormat): New enum.
8775
8776         * class.c
8777         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
8778         (mono_type_get_full_name): Removed.
8779         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
8780         argument instead of the boolean's.
8781
8782         * icall.c (ves_icall_System_MonoType_getFullName):
8783         Added `gboolean assembly_qualified'.    
8784
8785         * reflection.h
8786         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
8787
8788         * reflection.c (mono_reflection_parse_type): Parse the new type
8789         name format.
8790
8791 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8792
8793         * icall.c: no need to convert from utf16 to utf8 and then back again
8794         after the call to GetLogicalDrives.
8795
8796 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8797
8798         * icall.c: frombase64. Fix problems exposed by new tests.
8799
8800 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8801
8802         * icall.c: added internal calls for converting char [] and strings in
8803         base64 into byte [].
8804
8805 2005-06-10  Martin Baulig  <martin@ximian.com>
8806
8807         * class.c (mono_class_create_generic_2): Read the nested classes
8808         from the metadata rather than from `gklass->nested_classes' since
8809         `gklass' might not be initialized yet.
8810
8811 2005-06-09  Duncan Mak  <duncan@novell.com>
8812
8813         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
8814         all public headers. Fixes #74919.
8815
8816 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
8817
8818         * domain.c: The key for proxy_vtable_hash is now a pointer
8819         array. Added new GHashFunc and GCompareFunc functions for this.
8820
8821         * class.h: The list of interfaces in MonoRemoteClass is known in
8822         advance and can't grow (we create a new MonoRemoteClass if needed),
8823         so now the interface array can be allocated together with
8824         MonoRemoteClass.
8825         
8826         * object.c: Added a new method create_remote_class_key.
8827         Fixed mono_remote_class so it does not depend on
8828         mono_upgrade_remote_class.
8829         Removed extend_interface_array.
8830         Added new method clone_remote_class(), which makes a copy of a remote
8831         class and adds a new interface or class to it.
8832         mono_upgrade_remote_class() now creates a new remote class (or gets
8833         it from the cache) if an vtable upgrade is needed. In this way
8834         we make sure that other objects sharing the same remote class
8835         don't get the new vtable with unwanted interfaces.
8836         
8837         * object-internals.h:
8838         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
8839         
8840         * marshal.c: Track changes in mono_upgrade_remote_class().
8841
8842 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
8843         * icall.c: Add runtime methods for obtaining members of inflated
8844         class, which were created from supplied non-inflated members. It
8845         is used in internal Get{Method,Constructor,Field} methods in
8846         System.Type
8847
8848 2005-06-09  Martin Baulig  <martin@ximian.com>
8849
8850         * reflection.c
8851         (mono_reflection_bind_generic_method_parameters): Fix #75169.
8852
8853 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8854         * reflection.c (mono_image_basic_init): Define
8855         Version in MonoDynamicAssembly. 
8856         
8857 2005-06-08  Martin Baulig  <martin@ximian.com>
8858
8859         Fix #75136.
8860
8861         * loader.c
8862         (mono_method_signature_full): New public method; takes a
8863         `MonoGenericContext *'.
8864         (find_method): Use mono_method_signature_full() and pass the
8865         klass'es context to it.
8866
8867         * class.c (mono_class_is_inflated_method): Use
8868         mono_method_signature_full() and pass the context to it.
8869
8870 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
8871
8872         * object.c: add proper locking in mono_remote_class_vtable(),
8873         fixes possible memory corruption.
8874
8875 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
8876
8877         * marshal.c (mono_remoting_marshal_init): set
8878         initialized after initialization.
8879
8880 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
8881
8882         * locales.c : hush.
8883
8884 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
8885
8886         * object.c (extend_interface_array): fix really silly
8887         memory corrupting / comparison bug.
8888
8889 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8890
8891         * reflection.c: Functions added to support the creation
8892         of CustomAttributeData, which includes Attribute data
8893         used by ReflectionOnly methods.
8894
8895         * reflection.h:  mono_reflection_get_custom_attrs_data and
8896          mono_custom_attrs_data_construct added (functions exposed).
8897
8898          * icall.c: Added mono_reflection_get_custom_attrs_data
8899          as icall.
8900         
8901 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
8902
8903         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
8904         lupus's request.
8905
8906 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
8907
8908         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
8909
8910         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
8911         dynamic DllImportAttribute.
8912
8913         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
8914         dynamic DllImportAttribute.
8915
8916         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
8917         Fixes #75162.
8918
8919 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8920
8921         * threads.c: avoid segfault when an unstarted thread is aborted.
8922
8923 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
8924
8925         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
8926         Returns the name and version of the runtime for reporting.
8927
8928 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8929
8930         * appdomain.c: bump corlib version.
8931         * object-internals.h: new field in MonoReflectionAssembly.
8932
8933 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8934
8935         * object-internals.h: Carlos forgot to add this field.
8936
8937 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
8938
8939         * icall.c: Added create_version to create instances
8940         of Version of MonoReflectionAssemblyName. This change helps
8941         the AssemblyName tests to keep running fine.
8942         
8943 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
8944   
8945         * object.c (mono_method_return_message_restore): A somehow less
8946         intrusive fix for #75138.
8947
8948 2005-06-03  Raja R Harinath  <rharinath@novell.com>
8949
8950         * object.c (mono_method_return_message_restore): Fix computation
8951         of expected number of out args.
8952
8953 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
8954
8955         * reflection.c (mono_image_get_method_info): Fix the case when the
8956         charset is empty.
8957
8958 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
8959
8960         * object.c: Added missing null check in
8961           mono_method_return_message_restore.
8962
8963 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
8964
8965         * reflection.c (mono_image_get_method_info): Handle the case when
8966         dllentry is empty.
8967
8968 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
8969
8970         * object.c: When creating the vtable for a proxy, take into account
8971         all inherited interfaces, not only the ones registered in
8972         iclass->interfaces. This fixs bug #74996.
8973         Also, in mono_method_return_message_restore, verify that the array
8974         of out args has the expected lengh.
8975
8976 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8977
8978         * socket-io.c: update the timeout in Poll when the call is interrupte.
8979
8980 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8981
8982         * socket-io.c: support abort/suspend in Select_internal after last
8983         change.
8984
8985 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8986
8987         * threadpool.c: remove warning.
8988
8989 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8990
8991         * icall.c:
8992         * socket-io.[ch]: Select_internal uses poll() now when available, thus
8993         removing the 1024 limit from select(). Runtime part of the fix for
8994         bug #71203.
8995
8996 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8997
8998         * socket-io.c: when resolving the addresses for the same
8999         host returned by gethostname(), get the local IPs from the interface
9000         list. Loopback addresses are discarded if the are interfaces up with
9001         non-loopback ones. Fixes bug #63265.
9002
9003 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
9004
9005         * appdomain.c, verify.c, object-internals.h, reflection.c:
9006         bumped corlib number to 36, and added new extra_flags field
9007         to ReflectionMethodBuilder and friends.  Fixes #75060.
9008
9009 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
9010
9011         * gc.c: register a new weak link only if the object is non-null
9012         (fixes bug#75047).
9013
9014 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9015
9016         * culture-info.h : short time pattern too.
9017
9018 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9019
9020         * culture-info.h : expand long time pattern string length.
9021
9022 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9023
9024         * culture-info-table.h : update (more French date format; #72788).
9025
9026 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
9027
9028         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
9029         the method is static. Fixes #75029.
9030
9031 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
9032
9033         * reflection.c: Update the table_idx field of method builders after
9034         saving the module, since it can change. This is a workaround for
9035         bug #74914. 
9036
9037 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9038
9039         * culture-info-table.h : update (additional French date format).
9040
9041 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9042
9043         * icall.c (ves_icall_type_Equals): Revert last change.
9044         
9045         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
9046
9047         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
9048
9049 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
9050
9051         * class-internals.h: Added executioncontext_class field to 
9052         MonoDefaults structure.
9053         * domain.c: Cache System.Threading.ExecutionContext class in 
9054         mono_defaults.
9055         * object.c: Capture the ExecutionContext for asynchroneous calls in
9056          mono_async_result_new.
9057         * object-internals.h: Added execution_context and original_context 
9058         fields to MonoAsyncResult. Added execution_context to MonoThread.
9059         * security-manager.c|.h: Added mono_get_context_capture_method to 
9060         return the capture method (if required by the security manager or by
9061         the framework version used).
9062         * threadpool.c: Apply capture (if present) ExecutionContext in 
9063         mono_async_invoke and revert to original context after it completes.
9064
9065 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
9066
9067         * culture-info-table.h : updated (real hacky solution for zh-CHT).
9068
9069 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
9070
9071         * culture-info-table.h : zh-CHT related workaround.
9072
9073 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
9074
9075         * marshal.c (emit_marshal_custom): Add some error checking and call the
9076         methods in the ICustomMarshaler interface. Fixes #74875.
9077         
9078         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
9079         native->managed wrappers.
9080
9081 2005-05-12  Martin Baulig  <martin@ximian.com>
9082
9083         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
9084         here and use the loader lock.
9085
9086         * mono-debug.c: Properly lock when the debugger is not attached.
9087         (mono_debug_init): Release the initial lock if we're not running
9088         in the debugger.
9089
9090 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
9091
9092         * marshal.c (emit_marshal_custom): Pass through NULL values without
9093         calling the custom marshalling routines.
9094
9095         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
9096         conversion in structures. Fixes #74882.
9097
9098 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
9099
9100         * culture-info-table.h : zh-* cultures were missing.
9101
9102 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
9103
9104         * threads.c: Added a new event background_change_event which is signaled
9105         when a thread changes its background mode.
9106         Moved here several checks previously done in managed code. The checks
9107         require the thread lock, and using the thread lock in managed code
9108         can result in deadlocks.
9109         Merged Start_internal and Thread_internal into a single method. Now 
9110         Thread_internal does all work of creating and starting a thread.
9111         Added icalls for setting and getting the state of the object. Moved from
9112         managed code to avoid locking there.
9113         Added wait_for_tids_or_state_change() which is called instad of
9114         wait_for_tids when waiting for non-backround threads to end. This method
9115         will return if one of the threads ends or the background_change_event
9116         is signaled.
9117         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
9118         the background mode. This method signals the background_change_event
9119         event.
9120         * icall.c:
9121         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
9122         removed Start_internal.
9123         
9124 2005-05-11  Martin Baulig  <martin@ximian.com>
9125
9126         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
9127         to order of some fields to get proper alignment on 64-bit machines.
9128
9129 2005-05-11  Martin Baulig  <martin@ximian.com>
9130
9131         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
9132         changes as they're broken and completely fuck up the debugger.
9133
9134         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
9135
9136 2005-05-10  Martin Baulig  <martin@ximian.com>
9137
9138         * reflection.c (mono_reflection_generic_class_initialize): Don't
9139         call mono_class_setup_parent() here.
9140
9141 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9142
9143         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
9144         send/receive timeout use an integer in milliseconds. We were using a
9145         struct timeval.
9146
9147 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9148
9149         * locales.c:
9150         (internal_get_cultures): reserve the first slot of the array for the
9151         InvariantCulture, which will be filled in managed code.
9152
9153 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
9154
9155         * reflection.c (mono_image_fill_module_table): Initialize the
9156         GENERATION field as well.
9157
9158 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9159
9160         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
9161         Monitor.Enter on the object.
9162
9163 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9164
9165         * threads.c: Enable the wait for running threads when exiting.
9166         * icall.c: Suspend all threads before exiting.
9167
9168 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9169
9170         * assembly.c (mono_assembly_load_reference): Fix warning.
9171
9172 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9173
9174         * threadpool.c: changed the default number of threads per cpu. From now
9175         on, the default will be 20 + (5 * number of cpus) instead of 50.
9176
9177 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
9178
9179         * loader.c (mono_method_get_signature_full): Add locking here.
9180
9181 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
9182
9183         * appdomain.c: Moved methods for parsing and freeing assembly
9184         names to assembly.c.
9185         * assembly.c, domain-internals.h: Created public methods for parsing
9186         assembly names. Fixed mono_assembly_load_with_partial_name:
9187         it now finds the best match, taking into account the version,
9188         token and culture specified in the partial name. Also return
9189         the latest version if no version information is specified.
9190
9191 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
9192
9193         * threadpool.c: replace check for SocketAsyncCall class.
9194
9195 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9196
9197         * threadpool-internals.h:
9198         * Makefile.am: added threadpool-internals.h
9199
9200         * threadpool.c: call mono_unhandled_exception on exceptions not handled
9201         that happen in threadpool threads (tested on MS).
9202         (mono_thread_pool_remove_socket): new function that dispatch any pending
9203         AIO call on a socket that is closing. By now only epoll really needs it,
9204         as select/poll wake up when the socket closes.
9205
9206
9207         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
9208
9209 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
9210
9211         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
9212
9213 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
9214
9215         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
9216
9217 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
9218
9219         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
9220         has an abort request, convert it into a suspend request.
9221
9222 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
9223
9224         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
9225         warning for the usage of `UnmanagedFunctionPointerAttribute' which
9226         is not supported yet.
9227
9228 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9229
9230         * image.c: register assemblies loaded from data (bundles) in the loaded
9231         assemblies hash. Fixes bug #74772.
9232
9233 2005-04-29  Martin Baulig  <martin@ximian.com>
9234
9235         * class.c (mono_type_get_name_recurse): Update to the new naming
9236         schema from the latest .NET 2.x beta2.
9237         (mono_class_setup_vtable_general): If we're a generic instance,
9238         copy the vtable from our generic type definition and inflate all
9239         the methods in it.
9240
9241         * loader.c (find_method): Update to the new naming schema from the
9242         latest .NET 2.x beta2.
9243
9244 2005-04-29  Raja R Harinath  <harinath@gmail.com>
9245
9246         * class.c (mono_class_init): Add a mono_loader_unlock to the
9247         #74734 fix.
9248
9249 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9250
9251         * icall.c (ves_icall_System_Environment_Exit): Remove the 
9252         suspend_all_other_threads () call for the time being, since it can hang.
9253
9254         * threads.c (mono_thread_manage): Similarly, disable the waiting for
9255         the background threads to exit, since it can also hang.
9256
9257         * class.c (mono_class_init): Applied patch from Ankit Jain 
9258         (radical@gmail.com). Avoid pending init errors when a field refers
9259         to a nested class using a typeref. Fixes #74734.
9260
9261         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
9262         this for dynamic modules.
9263
9264 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9265
9266         * threads.c: don't wait for threads that are in the process of aborting
9267         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
9268         and waiting for background threads to finish. This makes xsp and
9269         mod-mono-server exit without random length delays and/or hangs.
9270
9271 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9272
9273         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
9274
9275 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
9276
9277         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
9278         dynamic types to prevent infinite loops. Fixes #74727.
9279
9280         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
9281         ..._is_assignable_to.
9282
9283 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
9284
9285         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
9286
9287 2005-04-25  Martin Baulig  <martin@ximian.com>
9288
9289         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
9290
9291         * domain.c
9292         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
9293
9294         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
9295
9296         * reflection.c (build_compressed_metadata): Set metadata header
9297         version to 2.0.
9298
9299 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9300
9301         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
9302         number into an integral and a decimal part. Fixes #70473.
9303
9304         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
9305
9306 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
9307
9308         * culture-info-table.h : reflected the latest locale-builder output.
9309
9310 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9311
9312         * threadpool.c: check for SuspendRequested too when deciding if
9313         mono_thread_interruption_checkpoint should be called.
9314
9315 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9316
9317         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
9318         * threads.c: remove interruption_mutex and use Interlocked instead. When
9319         suspending all the threads, wait for all the suspended events at once.
9320         If we're shutting down and get an APC that is going to be queued,
9321         call mono_thread_execute_interruption immediately, as the thread might
9322         be sleeping on a pthread condition or mutex.
9323
9324         * icall.c: call mono_runtime_set_shutting_down before suspending the
9325         threads.
9326
9327         Fixes bug #74693. And now xsp is happier when exiting.
9328
9329 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9330
9331         * loader.c (mono_stack_walk): Fix #74690.
9332
9333 2005-04-22  Martin Baulig  <martin@ximian.com>
9334
9335         * mono-debug.h (MonoDebugMethodJitInfo): Added
9336         `MonoDebugMethodJitInfo *jit'.
9337
9338         * mono-debug.c (mono_debug_read_method): Cache the
9339         MonoDebugMethodJitInfo in `address->jit'.
9340         (mono_debug_free_method_jit_info): New public method.
9341
9342 2005-04-22  Martin Baulig  <martin@ximian.com>
9343
9344         * class.c (mono_class_is_assignable_from): Disallow
9345         type parameter -> interface.
9346
9347 2005-04-21  Dick Porter  <dick@ximian.com>
9348
9349         * threads.c (mono_thread_create): Turn an assertion into an error.
9350
9351 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9352
9353         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
9354         
9355         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
9356         Fix some gcc 4.0 warnings.
9357
9358 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
9359
9360         * file-io.c: fix alt dir separator char on unix systems
9361         and cleanup (fixes bug #71214).
9362
9363 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
9364
9365         * marshal.c: Use CALLVIRT instead of CALL when dispatching
9366         a call to a remote domain, since the method may be an
9367         interface method in the client domain. This fixes bug #74192.
9368
9369 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9370
9371         * threadpool.c: recv/send are now performed before going back to managed
9372         code to save one transition.
9373
9374 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9375
9376         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
9377
9378         * metadata/threadpool.c: removed hack to workaround the bug above.
9379
9380         Fixes bug #74618.
9381
9382 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9383
9384         * reflection.c reflection.h: Fix handling of parameter defaults in
9385         dynamic methods. Also fixes handling of parameter attributes.
9386         Fixes #74609.
9387
9388         * mono-debug.c (mono_debug_close_image): Fix warning.
9389
9390 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9391
9392         * socket-io.h: replaced old unused field with new 'blocking'.
9393         * threadpool.c: restore socket blocking state on windows(tm).
9394
9395 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
9396
9397         * icall.c: don't return the codebase in the AssemblyName[] returned by
9398         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
9399         * object-internals.h: Removed FIXME (fields were presents) and fixed
9400         versioncompat declaration.
9401
9402 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9403
9404         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
9405         not closed, so don't cleanup when it happens.
9406
9407 2005-04-13  Chris Toshok  <toshok@ximian.com>
9408
9409         * mono-debug-debugger.h: change prototype for
9410         mono_debugger_lookup_type.
9411
9412         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
9413         this function, although it should probably be named
9414         mono_debugger_init_type.
9415
9416 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9417
9418         * threadpool.c: fix non-AIO case.
9419
9420 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9421
9422         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
9423         the built-in profiler to measure just JIT compilation times.
9424
9425 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9426
9427         * threadpool.c: the epollfd might be closed by another thread at
9428         any time, so ignore EBADF at treat it as a "we're closing" sign.
9429
9430 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9431
9432         * threadpool.c: release the semaphores with a count equals to the number
9433         of working threads in both IO and regular pools. Fixed typo that messed
9434         up the count of IO pool threads. Don't initialize the pipe handles if
9435         we're using epoll.
9436
9437 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9438
9439         * threadpool.c: some systems don't like a NULL when deleting the socket
9440         from epoll.
9441
9442 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9443
9444         * threadpool.c: fix semaphore allocation.
9445
9446 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9447
9448         * threadpool.c: added epoll() based implementation for asynchronous IO
9449         that is used instead of the default poll() when available.
9450         It can be disabled by setting MONO_DISABLE_AIO.
9451
9452 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9453
9454         * threadpool.c: windows needs 'closesocket' and instead of returning
9455         0 when the stream is closed while in select, it returns -1. Fixes bug
9456         #74573.
9457
9458 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
9459
9460         * class.c (class_compute_field_layout): Fix the regression caused by
9461         the previous try.
9462
9463 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9464
9465         * threadpool.c: separate pool for socket async. IO.
9466         * threadpool.h: mono_max_worker_threads is not a global any more.
9467
9468 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9469
9470         * class.c (class_compute_field_layout): Fix #74549.
9471
9472 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9473
9474         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
9475         use 2 connected sockets instead.
9476
9477 2005-04-08  Miguel de Icaza  <miguel@novell.com>
9478
9479         * mono-config.c: Add new entry point for mkbundle
9480         mono_config_parse_memory. 
9481
9482 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9483
9484         * threadpool.c: removed another unused function.
9485
9486 2005-04-08  Ankit Jain  <radical@corewars.org>
9487
9488         * reflection.c (get_default_param_value_blobs): Add 'types'
9489         parameter to get the types encoded in the constant table.
9490         (mono_param_get_objects): Use the type from the constant table,
9491         not the type of the parameter, when creating default values.
9492         Handle null default values correctly.
9493
9494 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9495
9496         * file-io.c:
9497         * file-io.h:
9498         * threadpool.c:
9499         * threadpool.h:
9500         * icall.c:
9501         * socket-io.c: removed dead code for async IO.
9502
9503 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9504
9505         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
9506
9507         * threadpool.c: intercept socket async. calls and pass them to a thread
9508         that is polling and dispatching the job items to the threadpool as
9509         socket become ready. Fixes bugs #71217, #71933.
9510
9511         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
9512         between char and short/ushort arrays.
9513
9514         * socket-io.c: remove dead code.
9515
9516 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
9517
9518         * locales.c,
9519           icall.c : removed InternalToUpper_Comp() and
9520           InternalToLower_Comp().
9521
9522 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
9523
9524         * char-conversions.h : The tables were incorrectly generated. Should
9525           be generated against invariant culture.
9526
9527 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9528
9529         * object.c (mono_runtime_invoke_array): Fix return value when 
9530         passing pre-created valuetype objects to ctors.
9531
9532         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
9533         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
9534         Fixes #74338.
9535
9536 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
9537
9538         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
9539         only used with --security and hides the wrong corlib version error.
9540
9541 2005-03-30  Joshua Tauberer  <tauberer@for.net>
9542
9543         * class.c: Changed mono_class_name_from_token so that types
9544         outside of a namespace don't have an initial period.  Improved
9545         the g_warning message used in _mono_class_get when loading
9546         fails.
9547         * assembly.c: In mono_assembly_load_reference, when an assembly
9548         can't be found, "No such file or directory" is misleading and
9549         unhelpful because a few paths were checked for the presence of
9550         the assembly.  When that happens (ENOENT), display a nicer
9551         message indicating the directories that were searched.  In all
9552         cases, the warning is made easier to read for non-hackers.
9553
9554 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9555
9556         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
9557         project/solution.
9558         * appdomain.h|domain.c: Removed inline from functions.
9559         * appdomain.c: Reduced warnings when compiling on windows.
9560         * icall.c: Fixed output_debug declaration to gunichar2*.
9561         * mono-config.c: Reduced warnings when compiling on windows.
9562         * rand.c: Added missing "windows.h". Added missing return value.
9563         * rawbuffer.c: Added missing winsock2.h for windows.
9564         * sysmath.h: Added mono-compiler.h header to allow/ease 
9565         compilation with non-GCC compilers.
9566         * threads.c: Fixed declarations to compile with VS.NET C compiler.
9567         Removed cast warnings.
9568
9569         Adapted from the work of J Lothian (for VC6).
9570
9571 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9572
9573         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
9574         from default_path.
9575
9576 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9577
9578         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
9579         the 2.0 profile.
9580
9581 2005-03-27  Raja R Harinath  <harinath@gmail.com>
9582
9583         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
9584         has to be in $(exec_prefix).  $(prefix) is for arch-independent
9585         stuff, and it would probably use $(prefix)/share rather than
9586         $(prefix)/lib.
9587
9588 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9589
9590         * console-io.c: added 2 includes that might be missing.
9591
9592 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9593
9594         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
9595         profile.
9596
9597         * reflection.c (create_custom_attr): Allocate the params array using
9598         alloca so it gets GC tracking.
9599
9600 2005-03-23  Chris Toshok  <toshok@ximian.com>
9601
9602         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
9603         out some spew.
9604
9605 2005-03-24  Raja R Harinath  <rharinath@novell.com>
9606
9607         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
9608         changes to pick up any changes in prefix, etc.
9609
9610 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9611
9612         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
9613         
9614         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
9615         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
9616
9617 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9618
9619         * class-internals.h object-internals.h class.c reflection.c: Extend the
9620         mono_lookup_dynamic_token () function to return the class of the
9621         token as well. 
9622
9623         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
9624         well. Fixes #73848.
9625
9626 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
9627
9628         * security-manager.c: Skip inheritance checks for intra-corlib
9629         class inheritance and method overrides. This skips a lot of checks
9630         and (anyway) permissions cannot work until corlib is loaded.
9631
9632 2005-03-23  Martin Baulig  <martin@ximian.com>
9633
9634         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
9635         MONO_TYPE_GENERICINST.  
9636
9637 2005-03-23  Martin Baulig  <martin@ximian.com>
9638
9639         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
9640
9641 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9642
9643         * class.c: added locking comments to some functions.
9644         Cache the interface offsets arrays (saves about 20 KB
9645         of runtime memory in a typical app).
9646         Reduce the time overhead in mono_class_setup_supertypes ().
9647
9648 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
9649
9650         * icall.c: speedup and fix leaks in GetMethodsByName and
9651         GetPropertiesByName.
9652
9653 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9654
9655         * reflection.c: some locking fixes.
9656
9657 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9658
9659         * metadata.c: added missing break in case statement.
9660
9661 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
9662
9663         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
9664         typedbyref return values. Fixes #73941.
9665
9666 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
9667
9668         * security-manager.c|h: Added demandunmanaged method and 
9669         suppressunmanagedcodesecurity class to MonoSecurityManager.
9670         Renamed aptc class to allowpartiallytrustedcallers.
9671
9672 2005-03-17  Martin Baulig  <martin@ximian.com>
9673
9674         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
9675
9676 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9677
9678         * file-io.c: disabled file async. IO using aio_*. It uses the
9679         threadpool now. Workaround for bug #73718.
9680
9681 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
9682
9683         * assembly.h, mono-config.c: added code to deal with bundled configs
9684         for bundled assemblies.
9685
9686 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
9687
9688         * *.c, private.h: cleanup, removing old private.h header file.
9689
9690 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9691
9692         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
9693         and throw_on_unmappable_char attributes.
9694
9695 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
9696
9697         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
9698         _ProcessName_internal.
9699
9700 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
9701
9702         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
9703         #73631.
9704
9705         * icall.c threads.c threads-types.h: Remove slothash icalls as they
9706         are no longer used.
9707
9708 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
9709
9710         * object.c (compute_class_bitmap): Add support for generics. Fixes
9711         #73527.
9712
9713 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
9714
9715         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
9716
9717 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9718
9719         * filewatcher.c: commented out the code for windows watcher, as we don't
9720         use it (we use the managed implementation instead).
9721
9722 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
9723
9724         * object-internals.h (MonoThread): Remove 'unused1' field.
9725
9726         * appdomain.c: Bump corlib version.
9727
9728         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
9729
9730         * reflection.c (mono_reflection_create_runtime_class): Remove the
9731         AssemblyBuilder.Save optimization since it causes too many problems.
9732
9733 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
9734
9735         * exception.c|h: Added mono_get_exception_reflection_type_load to
9736         create a ReflectionTypeLoadException object.
9737         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
9738         to return NULL is a InheritanceDemand fails during reflection. Updated
9739         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
9740         ReflectionTypeLoadException if an InheritanceDemand fails during 
9741         reflection. Added icall mapping for GetLinkDemandSecurity.
9742         * security-manager.c|h: Added ves_icall_System_Security_
9743         SecurityManager_GetLinkDemandSecurity internal call to return the
9744         class and methods permissions set for a LinkDemand. Removed unused
9745         fields in MonoSecurityManager.
9746
9747 2005-03-10  Martin Baulig  <martin@ximian.com>
9748
9749         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
9750         it's a generic instance.
9751
9752 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
9753
9754         * reflection.c (mono_get_object_from_blob): Applied patch from
9755         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
9756
9757         * class.c (mono_class_is_assignable_from): Another try at fixing 
9758         #73469 without breaking anything.
9759
9760 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
9761
9762         * class.c: (mono_class_is_assignable_from): Revert the last changes
9763         since they don't work with generics.
9764         
9765         * class.c (mono_class_is_assignable_from): Fix build bustage.
9766
9767         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
9768         the managed IsAssignableFrom method. Fixes #73469.
9769
9770         * reflection.c (mono_reflection_call_is_assignable_from): New helper
9771         function.
9772
9773 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
9774
9775         * object.c (mono_load_remote_field_new): Fix returning uninitialized
9776         memory when the remoting callback does not sets the out arguments.
9777         Fixes #73007.
9778
9779         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
9780         by mistake.
9781
9782         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
9783
9784         * object-internals.h (MonoStackFrame): Sync with managed object layout.
9785
9786         * appdomain.c: Bump corlib version.
9787
9788 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
9789
9790         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
9791         function.
9792
9793         * threads.c (mono_thread_attach): Detect threads which are not started
9794         by the GC pthread wrappers.
9795
9796 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
9797
9798         * icall.c: Added new icall for RNG.
9799         * rand.c|h: Added new icall to open the RNG. This allows to share a 
9800         single handle on Linux to access /dev/urandom and fix #73183.
9801
9802 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9803
9804         * object.c: setting the new vtable in a transparent proxy object must
9805         not change the GC descriptor.
9806
9807 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
9808
9809         * object.c: fixed compilation without GCJ support.
9810         * reflection.c: for runtime-created types ensure klass->has_references
9811         is correct (bug #73215).
9812
9813 2005-03-02  Martin Baulig  <martin@ximian.com>
9814
9815         * class.c (mono_class_is_assignable_from): Make this work if
9816         `oklass' is a generic instance; fixes #72831.
9817
9818 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
9819
9820         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
9821         with hasthis set.
9822         
9823         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
9824
9825         * marshal.c: Reorganize native->managed marshalling code to also use
9826         the emit_marshal_... functions.
9827
9828 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
9829
9830         * object.c: typed allocs have issues with bitmap sizes > 30,
9831         so check for max_set >= 30.
9832
9833 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
9834
9835         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
9836         managed code. Fixes #73012.
9837
9838         * metadata.h (MonoMarshalSpec): Add elem_mult field.
9839
9840         * metadata.c reflection.c: Load/Emit elem_mult as well.
9841         
9842         * metadata.h (MonoMarshalSpec): Add comment.
9843
9844         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
9845
9846         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
9847         num_elem to -1 if not given.
9848
9849         * object-internals.h (MonoReflectionMarshal): Add has_size field.
9850
9851         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
9852         given values.
9853
9854 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
9855
9856         * null-gc.c (mono_gc_free_fixed): Was not compilable.
9857
9858 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
9859
9860         * reflection.c (encode_marshal_blob): Encode param_num field as well.
9861
9862         * object-internals.h (MonoReflectionMarshal): Add param_num field.
9863
9864 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
9865
9866         * object.c: generalized the reference bitmap creation
9867         and added hooks for the new GC.
9868         * class-internals.c: removed the gc_bitmap field from MonoClass.
9869
9870 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
9871
9872         * domain.c: help the compiler to produce better code
9873         in mono_jit_info_table_find ().
9874
9875 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
9876
9877         * object.c: make all allocations look typed.
9878
9879 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
9880
9881         * socket-io.c: load Mono.Posix if it's not loaded already
9882         (fixes bug#73033).
9883
9884 2005-02-24  Martin Baulig  <martin@ximian.com>
9885
9886         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
9887         * reflection.c (dup_type): Likewise.
9888
9889 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
9890
9891         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
9892         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
9893
9894 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9895
9896         * domain.c, threads.c, object-internals.h: make the critical thread
9897         local vars use the fast access mode (even when we're compiled in
9898         a lib). Provide accessors to be used by the jit during codegen.
9899
9900 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
9901
9902         * appdomain.c: Changed hook functios behavior to include
9903         support for the reflection only assemblies. Some icalls were changed
9904         to support the mentioned assemblies too. Signatures of static methods
9905         try_assembly_resolve and real_load now have an additional parameter:
9906         refonly.
9907
9908         * assembly.c: General changes to mono_assembly_ methods to support
9909         reflection only api. Functions mono_assembly_open, mono_assembly_load,
9910         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
9911         suffix, to support an additional gbool parameter to specify whether
9912         the assembli is reflection only or not. Created some new hook functions 
9913         to add support for reflection only assemblies. Signatures of static 
9914         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
9915         have now an additional parameter: refonly.
9916
9917         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
9918         indicating whether the assembly is reflection only or not.
9919
9920         * exception.c: Add mono_get_exception_invalid_operation.
9921
9922         * icall.c: Throw an InvalidOperationException when trying to invoke
9923         a property/method/event, or trying to set/get the value of a field.
9924         Also add an icall to retrieve the ref_only flag to the
9925         MonoReflectionAssembly.
9926
9927 2005-02-23  Chris Toshok  <toshok@ximian.com>
9928
9929         Part of fix for #72827.
9930         * mono-debug.c (mono_debug_add_method): add lexical block data to
9931         the info we write.  Kind of a hack at the moment - we copy the
9932         lexical block info from the MonoDebugMethodInfo to the
9933         MonoDebugMethodJitInfo here, before writing it.
9934         (mono_debug_read_method): read the lexical block info.
9935
9936         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
9937
9938         * debug-mono-symfile.h: add lexical block support.
9939
9940         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
9941         support.
9942
9943 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
9944
9945         * loader.c (mono_lookup_pinvoke_call): Fix warning.
9946
9947         * object.c (mono_runtime_free_method): Call mono_free_method () and
9948         put the TODOs there.
9949
9950         * loader.c (mono_free_method): Free up most memory allocated for 
9951         dynamic methods.
9952
9953 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9954
9955         * reflection.c: properly flag a Type argument to a
9956         named custom attr value (bug #72248).
9957
9958 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9959
9960         * reflection.c: reduce code duplication in named custom
9961         attribute encoding.
9962
9963 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
9964
9965         * reflection.c: properly encode custom attrs of type object
9966         (bug #72649).
9967
9968 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
9969
9970         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
9971
9972 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
9973
9974         * socket-io.c: load System.dll if it's not loaded already
9975         (bug #72850 and #70477).
9976
9977 2005-02-21  Martin Baulig  <martin@ximian.com>
9978
9979         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
9980         generic instances.
9981
9982 2005-02-21  Martin Baulig  <martin@ximian.com>
9983
9984         * reflection.c (mono_image_build_metadata): We also need to
9985         "fixup" the MethodImpl table after we computed the final method
9986         indices.  Call fixup_methodimpl() to do that.
9987         (fixup_methodimpl): New private method.
9988
9989 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
9990
9991         * assembly.c: special case mscorlib.dll (bug#72536),
9992         patch from Carlos Alberto Cortez.
9993
9994 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
9995
9996         * threads-types.h threads.c: Fix build bustage.
9997
9998         * threads.c: Use a union for long<->double conversions.
9999
10000         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
10001         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
10002
10003         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
10004         containing the checkpoint call with NOT_TAKEN.
10005         
10006         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
10007         checkpoint before pushing the arguments, so they won't have to be
10008         spilled to stack.
10009
10010 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10011
10012         * domain.c, assembly.c, domain-internals.h: make some data
10013         const and relocation-free.
10014
10015 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10016
10017         * object.c, appdomain.c, class-internals.h: introduce the
10018         MonoClassRuntimeInfo structure to hold the info needed to
10019         use a class at runtime. Made mono_class_vtable() lock-free
10020         for all the appdomains.
10021
10022 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
10023
10024         * metadata-internals.h, image.c: introduce a per-image mempool to
10025         be used for memory that has the same lifetime as the image.
10026
10027 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
10028
10029         * domain.c: In mono_init_internal(), instead of selecting the first
10030         runtime version supported by an executable, get a list of all
10031         supported versions and select the one for which an mscorlib exists
10032         (since even if the runtime supports a given version, it doesn't mean
10033         that the framework for that version is installed).
10034         Modified get_runtimes_from_exe to support this behavior.
10035         In supported_runtimes, added information about additional system
10036         assembly versions.
10037         
10038         * assembly.c: Added support for more than one system assembly version
10039         per runtime version. Updated the assembly list.
10040         In mono_assembly_remap_version, removed the initial version check,
10041         since we don't know to which version we need to compare until we
10042         get the version set on which the assembly is based.
10043         Moved the code for loading corlib into the new method
10044         mono_assembly_load_corlib(), so it can be used by the initialization
10045         code.
10046         
10047         * domain-internals.h: Updated data structures and added declaration
10048         for mono_assembly_load_corlib.
10049
10050 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10051
10052         * reflection.c (resolve_object): Fix the creation of the signature in 
10053         the SignatureHelper case.
10054
10055         * assembly.c (mono_assembly_remap_version): Fix binary search.
10056         
10057 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
10058  
10059         * class.c: Added inheritance check when a method is overloaded (from a
10060         virtual method or when implementing an interface) and when a class is
10061         inherited. Added functions to set a failure for a class and to 
10062         retreive the exception from a failure.
10063         * class-internals.h: Added fields to MonoClass to keep the exception
10064         information status for inheritance (or other exceptions) to be thrown
10065         later (i.e. not at load time).
10066         * object.c: Throw the inheritance SecurityException when a type is to 
10067         be created with either class or method inheritance violations.
10068         * reflection.c|h: Fix when getting declsec from a class. Removed 
10069         unrequired code for class. Improved sanity in parameter naming.
10070         * security-manager.c|h: Added functions to check for class and method
10071         inheritance.
10072
10073 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10074
10075         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
10076         and has_finalize in dynamic types as well.
10077
10078 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
10079
10080         * culture-info-table.h : fixed currency format for en-GB (and so on).
10081
10082 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
10083
10084         * gc.c: ensure the GC handles never have 0 as a value.
10085
10086 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
10087
10088         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
10089         a pointer to a struct to unmanaged code. Fixes #72625.
10090
10091 2005-02-16  Martin Baulig  <martin@ximian.com>
10092
10093         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
10094
10095 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
10096
10097         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
10098
10099 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
10100
10101         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
10102
10103         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
10104         UnmanagedFunctionPointerAttribute, use it for determining calling convention
10105         etc. Fixes #71471.
10106
10107         * reflection.c (mono_custom_attrs_get_attr): New helper function.
10108
10109         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
10110
10111 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
10112
10113         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
10114         changes to make the current context a field in MonoThread.
10115
10116 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
10117
10118         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
10119         the last change.
10120         
10121         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
10122         extracted from mono_marshal_get_native_wrapper.
10123
10124         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
10125         to create wrappers around native functions.
10126
10127         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
10128         delegates for arbitrary function pointers. Fixes #71472.
10129
10130 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10131
10132         * threads.c: cleaned up the code a little.
10133
10134 2005-02-15  Martin Baulig  <martin@ximian.com>
10135
10136         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
10137         the data table.
10138
10139         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
10140         allocate larger chunks if needed.
10141
10142 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10143
10144         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
10145         in by mistake.
10146
10147 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
10148
10149         * domain.c: keep the domains in an array and ensure the domain ids
10150         are kept small, so they can be used as indexes to domain-specific data
10151         with a small memory overhead.
10152
10153 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10154
10155         * icall.c: Handle byref types in Type icalls. Fixes #72544.
10156
10157 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
10158
10159         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
10160
10161 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10162
10163         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
10164
10165         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
10166         values.
10167
10168         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
10169         
10170 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10171
10172         * domain-internals.h: add the hashtable here.
10173
10174         * class-internals.h: Remove `info' from MonoMethod
10175
10176         * domain.c: Add a new hashtable, jit_trampoline_hash
10177
10178 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10179
10180         * object.c: don't set the value of static fields
10181         (fixes bug#72494).
10182
10183 2005-02-11  Martin Baulig  <martin@ximian.com>
10184
10185         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
10186         (mono_debug_add_method): Silently ignore the method if it's too big.
10187         (mono_debug_add_type): Likewise.
10188
10189 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
10190
10191         * threads.c, appdomain.c: remove #ifdefs from the code.
10192
10193 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10194
10195         * metadata-internals.h: Added flags to MonoAssembly to cache the most
10196         common security informations. This allows us to stay in unmanaged code
10197         when doing LinkDemand and it's special cases (except for the first 
10198         time for initialization). The flags a very much used with --security.
10199         * reflection.c|h: Added code to get declarative security attributes 
10200         for LinkDemand and InheritanceDemand. This required to refactor the
10201         existing code for Demand.
10202         * security-manager.c|h: Added new method fields for the special cases
10203         of LinkDemand.
10204
10205 2005-02-10  Martin Baulig  <martin@ximian.com>
10206
10207         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
10208         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
10209
10210 2005-02-10  Martin Baulig  <martin@ximian.com>
10211
10212         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
10213         debugging code; this is almost a complete rewrite.
10214
10215         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
10216
10217 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10218
10219         * domain.c, object.h: expose mono_string_equal () and 
10220         mono_string_hash ().
10221         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
10222         it's implemented in managed code.
10223
10224 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10225
10226         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
10227         lo leak objects between appdomains.
10228
10229 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10230
10231         * assembly.c: old compilers compilation fix from 
10232         robertj@gmx.net (Robert Jordan).
10233
10234 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
10235
10236         * class-internals.h: Little reminder for the future.
10237
10238         * debug-helpers.c: Fix up wrapper_type_names
10239
10240 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10241
10242         * image.c, metadata-internals.h: when loading an image from a file,
10243         mmap all of it and use the same codepaths as when using a
10244         in-memory image: the code is simpler and we use less memory
10245         (both writable and readonly).
10246
10247 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10248
10249         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
10250         API to alloc runtime data structures that need to be tracked by the
10251         GC and contain pointers.
10252         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
10253         make the code more readable and eventually use a different GC.
10254
10255 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
10256
10257         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
10258         for out arguments.
10259         
10260 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
10261
10262         * object.c: In release_type_locks(), don't release the cctor lock
10263         if it has already been released. This fixes a crash in the
10264         thread5 test.
10265
10266 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10267
10268         * gc.c, marshal.c, icall.c: register a delegate for finalization
10269         only when the native function pointer has been allocated for it.
10270
10271 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10272
10273         * object.c: cleaned up some code, allocate objects that are
10274         pointer free with the atomic malloc variant. Allocate memory
10275         for static data from the mempool if it's pointer-free.
10276         Allocate the bounds array at the end of the array data, when needed.
10277         * object-internals.h, object.h: move a private function in a private
10278         header.
10279         * class.c: handle missing case in tracking references in fields.
10280
10281 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10282
10283         * class.c, class-internals.h: keep track if a type has
10284         reference fields in either the instance or static fields.
10285
10286 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
10287
10288         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
10289         and renamed to MonoRuntimeInfo. Added fields to store the expected
10290         framework assembly version. Changed mono_get_framework_version and
10291         mono_get_runtime_version for a single mono_get_runtime_info method.
10292         
10293         * assembly.c: Added method to remap system assembly versions to the
10294         current executing runtime version. Removed old mapping code.
10295         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
10296         
10297         * icall.c, reflection.c: Track api changes.
10298
10299 2005-02-06  Miguel de Icaza  <miguel@novell.com>
10300
10301         * loader.c (method_from_memberref): Improve error reporting,
10302         produce the class name instead of the typeref/typedef index. 
10303
10304 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
10305
10306         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
10307
10308 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10309
10310         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
10311         stdcall and charset name mangling.  Reorganize the code and add
10312         some tracing stuff.
10313
10314 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
10315
10316         * monodiet.c: More iters!
10317
10318         * marshal.c: Iter usage.
10319
10320         * icall.c: Iter usage.
10321
10322         * object.c: Use iters.
10323
10324         * debug-helpers.c: More iters
10325
10326 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10327
10328         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
10329         under win32.
10330
10331 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
10332
10333         * mono-debug-debugger.c: use iters
10334
10335         * class.c, class-internals.h: mono_class_setup_events is static
10336         now
10337
10338         * All callers: use iters
10339
10340 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10341
10342         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
10343         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10344
10345 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10346
10347         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
10348
10349         * marshal.h: Add prototypes for ldfld/stfld_remote.
10350
10351         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
10352         this is called during startup.
10353         
10354 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10355
10356         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
10357         MonoThreadsSync struct private in monitor.c. Changed the way
10358         MonoThreadsSync is allocated so it's faster and there is no
10359         need to keep track of it with a finalizer and it uses less memory.
10360         This also finally allows us to allocate mono objects as ptrfree when
10361         there are no reference fields.
10362
10363 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
10364
10365         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
10366         disappearing link to the GC interface and use them to simplify
10367         the gchandles code.
10368
10369 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10370
10371         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
10372         stfld_remote which call mono_load/store_field_new. This allows methods
10373         calling ldfld/stfld wrappers to be AOTed.
10374
10375         * console-io.c: Include sys/filio.h under solaris.
10376         
10377         * console-io.c: Include curses.h if needed correctly.
10378
10379 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10380         
10381         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
10382         method->klass as well.
10383
10384         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
10385
10386         * class.c (mono_class_init): Switch on lazy initialization of 
10387         methods.
10388
10389         * class.c (mono_class_get_finalizer): Handle the case when the 
10390         finalizer is inherited.
10391
10392 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10393
10394         * console-io.c: <curses.h> is needed by term.h on solaris.
10395
10396 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
10397
10398         * icall.c, class-internals.h, monodiet.c, class.c: Remove
10399         mono_class_setup_properties where possible. Remove this ftn from
10400         the header file, and make it static.
10401
10402 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10403
10404         * loader.c: Add missing setup_... call.
10405
10406         * class.c: Add missing setup_... calls.
10407
10408         * class.c (mono_class_init): Switch on lazy initialization of 
10409         the generic vtable.
10410         
10411         * class.c (mono_class_init): Fix generics broken by the recent changes.
10412
10413         * monodiet.c (handle_type): Add missing setup_... calls.
10414
10415         * class.c: Back out garbage in previous patch.
10416         
10417         * class.c: Add missing setup_... calls.
10418
10419         * class.c (mono_class_get_method_from_name_flags): Avoid calling
10420         mono_class_setup_methods () if possible.
10421
10422         * class-internals.h (MonoClass): Add 'has_cctor' flag.
10423
10424         * class-internals.h (MonoCachedClassInfo): New structure.
10425
10426         * class.c: Initialize properties and events fields of MonoClass lazily.
10427
10428         * class.c: Add infrastructure for lazily initializing the methods and
10429         vtable fields of MonoClass. Not yet used.
10430
10431         * class.c (mono_class_get_finalizer): New helper function.
10432
10433         * class.c: Add infrastructure for loading some class related data from
10434         an AOT file.
10435
10436         * object.c: Add infrastructure for initializing the vtable from data
10437         in the AOT file.
10438
10439         * gc.c (run_finalize): Use mono_class_get_finalizer ().
10440
10441         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
10442         appropriate initialization function before accessing parts of the
10443         MonoClass structure.
10444
10445         * marshal.c: Fix warnings.
10446         
10447         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
10448
10449         * mono-debug-debugger.c (get_exception_message): Use 
10450         mono_class_get_method_from_name_flags ().
10451
10452 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
10453
10454         * reflection.c, appdomain.c: Replace a few manual searches that
10455         Zoltan missed. (Paolo approved this part of my initial patch).
10456
10457 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
10458
10459         * profiler.c: disable recording statistical events at report time.
10460
10461 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10462
10463         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
10464         to byteswap arrays of enum values, too (bug #72080).
10465
10466 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10467
10468         * appdomain.c (set_domain_search_path): Allow this to be called if
10469         domain->setup is not yet set.
10470
10471         * loader.c (mono_method_get_index): New helper function.
10472
10473         * loader.c reflection.c: Use mono_method_get_index ().
10474
10475         * class.c (mono_class_get_method_from_name_flags): New helper method.
10476
10477         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
10478         this.
10479
10480         * class.c (mono_class_get_cctor): New helper method.
10481
10482         * string-icalls.c object.c class.c marshal.c reflection.c: Use
10483         mono_class_get_method () to look up methods.
10484
10485 2005-02-01  Miguel de Icaza  <miguel@novell.com>
10486
10487         * console-io.c: Fix the build, this should work on Windows.
10488
10489 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
10490
10491         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
10492         be set to null to keep things valid
10493
10494 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10495
10496         * icall.c: added Console 2.0 icalls.
10497         * Makefile.am: added console-io.[ch]
10498         * console-io.[ch]: internal calls for Console 2.0 API.
10499
10500 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10501
10502         * class.c: make sure we consider all the interfaces
10503         when calculating max_interface_id (bug found by
10504         Jeroen Frijters running ikvm).
10505
10506 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10507
10508         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
10509         valuetype fields to null.
10510
10511         * object.c (set_value): Ditto. Fixes #71669.    
10512
10513 2005-01-31  Martin Baulig  <martin@ximian.com>
10514
10515         * metadata.c (mono_metadata_has_generic_params): New public
10516         function; checks whether something is a generic method.
10517
10518 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10519
10520         * appdomain.c: fix infinite recursion when adding assemblies.
10521
10522 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
10523
10524         * object.c: Fix small typo to return all items for Environment.
10525         GetCommandLineArgs.
10526
10527 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10528
10529         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
10530         reflection.c: more domain and assembly-unload related fixes
10531         and memory leaks plugs.
10532
10533 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10534
10535         * 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.
10536
10537 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10538
10539         * loader.c (mono_method_signature): Make this method lazy
10540         (mono_get_method_from_token): Don't computate the signature here.
10541
10542         Doing this saves quite a bit of memory. I got 90 kb on starting up
10543         monodoc. It should also save some disk reads on startup.
10544
10545         * *: MonoMethod->signature might be NULL now. You *MUST* use
10546         mono_method_signature.
10547
10548 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
10549
10550         * object.c (mono_runtime_get_main_args): Return an array from the
10551         current domain here. Fixes #71938.
10552
10553 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10554
10555         * monitor.c: formatting changes to comply with the
10556         mono coding style and remove #ifdefs from the code.
10557
10558 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10559
10560         * metadata.c, private.h: remove some unneeded data
10561         and use a more compact representation for table schemas.
10562
10563 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10564
10565         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
10566         to get a better distribution in hash tables.
10567         * *.c: use mono_aligned_addr_hash() where appropriate.
10568         * assembly.c: make var static.
10569
10570 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10571
10572         * domain-internals.h: Put MonoJitInfo on a diet.
10573
10574         * domain.c: Fix a warning.
10575
10576 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10577
10578         * gc.c: rework the gc handles code to reuse handles
10579         when freed.
10580
10581 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10582
10583         * domain.c: fixed long standing bug in mono_string_equal() which
10584         was brought to light with the ldstr changes.
10585
10586 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10587
10588         * reflection.c: Remove warning by adding missing include for marshal.h
10589
10590 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10591
10592         * domain.c, object.c: change the ldstr_table to hold
10593         MonoString* as keys: makes the runtime isinterned lookup
10594         faster and simplifies memory management.
10595
10596 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
10597  
10598         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
10599         possible to add imperative security checks before calling the icall.
10600         * reflection.c: Return security attributes on the original MonoMethod
10601         (and not the wrapped one). This fix permissions on icalls.
10602
10603 2005-01-25  Dick Porter  <dick@ximian.com>
10604
10605         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
10606         the check for mktime() support actually test the mktime() return
10607         value.  "Fixes" bug 71682, though the output is still different to
10608         MS.
10609
10610 2005-01-25  Martin Baulig  <martin@ximian.com>
10611
10612         * class.c (mono_class_is_assignable_from): Make this work for
10613         generic instances.
10614
10615 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
10616
10617         * marshal.c (mono_string_utf8_to_builder)
10618         (mono_string_builder_to_utf16): We might not have ownership of the
10619         string. In thise case, we need to create a new buffer.
10620
10621         * object-internals.h (mono_stringbuilder_capacity): sb->str might
10622         be null, in which case, use the default capacity.
10623
10624 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10625
10626         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
10627         GC events to the profiler.
10628
10629 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10630
10631         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
10632         if you don't want the GC to run.
10633
10634 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
10635
10636         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
10637         start providing a GC API and keeping different implementations in
10638         their own file.
10639         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
10640
10641 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10642
10643         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
10644         mmap rather than allocating a huge buffer.
10645         (mono_debug_close_mono_symbol_file): Free the buffer allocated
10646         above.
10647
10648 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10649
10650         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
10651         and CheckExecutionRights.
10652         * reflection.c|h: Keep the index of the declarative security to be 
10653         used, instead of the pointer, when AOT compiler is used. Also add 
10654         class initialization when requesting demands.
10655         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
10656         CheckExecutionRights. Both properties are now FALSE by default, and
10657         unmodifiable, unless the --security option is used.
10658
10659 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10660
10661         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
10662         reflection.c: properly refcount images and assemblies, many leaks fixed.
10663
10664 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10665
10666         * threadpool.c: increase the timeout for threads in the thread pool to
10667         10s.  Fixes bug #67159.
10668
10669 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
10670
10671         * class-internals.h: Sun's compiler insists on explicit
10672         signed on bit fields to handle then correctly.
10673
10674 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
10675
10676         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
10677         Make the size of the array fit only the number of invalid path
10678         chars that we have.
10679
10680         * class.c (_mono_class_get): Improve the error reporting when a
10681         class referenced is not found, to assist debugging. 
10682
10683 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
10684
10685         * threads.c: fix off-by-one error.
10686         * domain.c: free data allocated in the domain.
10687
10688 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
10689
10690         * reflection.c (mono_method_body_get_object): Fill out exception info
10691         as well.
10692
10693         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
10694         structure.
10695         
10696 2005-01-19  Martin Baulig  <martin@ximian.com>
10697
10698         * loader.c (mono_get_method_constrained): Make this work again.
10699
10700 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
10701
10702         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
10703         guint16 to match the managed side.
10704
10705         * reflection.c (mono_reflection_body_get_object): Fill out local
10706         variables array.
10707
10708         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
10709         as well.
10710
10711         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
10712         'local_var_sig_token'.
10713
10714 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10715
10716         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
10717         System.Drawing.
10718
10719         * reflection.c (mono_method_body_get_object): Handle abstract and
10720         runtime methods.
10721
10722 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
10723
10724         * marshal.c, loader.c, class-internals.h, reflection.c:
10725         store the emthod data for a wrapper in an array instead of a list.
10726
10727 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
10728
10729         * marshal.c: change the code to allocate memory more
10730         conservatively for method wrappers.
10731
10732 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10733
10734         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
10735         fields from MonoClass to the marshal info structure where they belong.
10736
10737 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10738
10739         * class.c, object.c, class-internals.h, marshal.c: rearrange
10740         some fields and tweak some types to lower memory usage.
10741
10742 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10743
10744         * threads.c (signal_thread_state_change): Handle the case when the
10745         target thread is the current thread.
10746
10747         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
10748
10749         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
10750         emit_ptr_to_object_conv. 
10751
10752         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
10753         marshalling. Fixes #71352.
10754
10755 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10756
10757         * metadata.h, blob.h: move table enum to blob.h so it can be included
10758         in any header.
10759         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
10760         cut the size of MonoImage/MonoDynamicImage.
10761
10762 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
10763
10764         * profiler.c (mono_profiler_install_simple): Fix default arguments.
10765
10766 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
10767
10768         * reflection.c, reflection.h, icall.c: add a function to check
10769         if an attribute type is defined for a metadata object.
10770
10771 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
10772
10773         * object-internals.h: Added some needed fields from StringBuilder class.
10774         * marshal.c: Set the maxCapacity when creating a StringBuilder.
10775
10776 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
10777
10778         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
10779         threads before shutting down the runtime.
10780
10781         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
10782
10783 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10784
10785         * object-internal.h, threads.c: implement stacksize and 
10786         parameterized thread start functionality (requires
10787         matching corlib). Marked broken code for later removal.
10788
10789 2005-01-12  Martin Baulig  <martin@ximian.com>
10790
10791         * class-internals.h (MonoGenericClass): Moved the `initialized'
10792         flag to MonoDynamicGenericClass, removed `init_pending'.
10793         (MonoGenericInst): Added `is_reference' flag.
10794
10795 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
10796
10797         * reflection.c (mono_image_create_pefile): Only set the pe_offset
10798         inside the MSDOS header. Fixes #71201.
10799
10800         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
10801         gc thread.
10802         (mono_domain_finalize): Ditto.
10803
10804 2005-01-12  Martin Baulig  <martin@ximian.com>
10805
10806         * class.c (mono_get_shared_generic_class): Use the cache for
10807         non-dynamic generic classes.
10808
10809         * class-internals.h (mono_class_create_generic_2): Removed
10810         function prototype, this function is now static inside class.c.
10811
10812         * class.c (mono_class_create_generic_2): Made this static, only
10813         call it from mono_class_init() and mono_class_setup_parent().
10814         (collect_implemented_interfaces_aux): Call mono_class_init() on
10815         the interfaces we collect.
10816         (mono_class_setup_vtable): Call mono_class_init (class->parent).
10817
10818 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
10819
10820         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
10821         it a real thread handle.
10822
10823         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
10824         MonoJitExceptionInfo, since each catch clause needs its own variable.
10825         
10826 2005-01-11  Dick Porter  <dick@ximian.com>
10827
10828         * image.c (mono_pe_file_open): New variant on mono_image_open()
10829         that does not set up the CLI metadata; used for FileVersionInfo so
10830         it can get the data for windows binaries too.
10831         
10832         * process.c (process_read_string_block): Don't read off the end of
10833         the StringTable block.
10834
10835         These both fix bug 70766.
10836
10837 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
10838
10839         * gc.c: set some fields to NULL at GC cleanup time.
10840         * threads.c: if we quit the main thread, call exit ().
10841
10842 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
10843
10844         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
10845
10846 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
10847
10848         * threads.h, threads.c, object.c: added accessor and settor for
10849         main_thread. Handle it specially when exiting from it: wait
10850         for other foreground threads to exit.
10851
10852 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
10853
10854         * process.c, verify.c: remove some bloat.
10855
10856 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
10857
10858         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
10859         the calling convention to cdecl under win32.
10860
10861 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
10862
10863         * object.c (mono_object_get_size): New function to get the size of
10864         an object instance.
10865
10866         * profiler.c (simple_allocation): Use above.
10867
10868 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
10869
10870         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
10871         ves_icall_System_AppDomain_getRootDomain (as it's not required to
10872         get an appdomain by it's id and we can't assume the root's id is 0).
10873         * domain-internals.h: Change the function prototype to match.
10874         * icall.c: Change the icall table for AppDomain.
10875
10876 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
10877
10878         * locales.c (string_invariant_compare_char): Only compute
10879         GUnicodeTypes in the case where we need them.  Test for ordinality
10880         first and return if so.
10881
10882         From the commit:
10883
10884                 /*
10885                  * FIXME: here we must use the information from c1type and c2type
10886                  * to find out the proper collation, even on the InvariantCulture, the
10887                  * sorting is not done by computing the unicode values, but their
10888                  * actual sort order.
10889                  */
10890
10891 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10892
10893         * loader.c: for P/Invoke methods, allow the "Internal" shared
10894         library name to refer to the calling process symbol namespace.
10895
10896 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
10897
10898         * Makefile.am: Add the security manager to the build.
10899         * security-manager.c|h: New. Initialization of the security manager.
10900
10901 2005-01-07  Dick Porter  <dick@ximian.com>
10902
10903         * threads.c: 
10904         * monitor.c: Update thread state during Monitor and WaitHandle
10905         waits.  Fixes bug 71031.
10906
10907 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10908
10909         * reflection.c (property_encode_signature): Correctly handle when the
10910         property has no methods.
10911
10912 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
10913
10914         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
10915         
10916         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
10917         fields from mb, not rmb. Fixes #71017.
10918
10919         * marshal.c (emit_ptr_to_str_conv): Add support for 
10920         ByValTStr -> string conversion. Fixes #71015.
10921
10922         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
10923
10924         * mempool.c (mono_mempool_contains_addr): New helper function.
10925
10926 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10927
10928         * metadata.c (mono_metadata_compute_size): Fix size calculation of
10929         HasSematics encoded fields.
10930         
10931         * metadata.c (mono_type_to_unmanaged): Improve error message for 
10932         invalid string marshalling.
10933
10934         * metadata.c: Fix warnings.
10935         
10936 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10937
10938         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
10939         profiler support.
10940
10941 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10942
10943         * domain.c object.c domain-internals.h: Revert part of r38077 since the
10944         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
10945         tests.
10946
10947 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
10948
10949         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
10950         so methods containing these can be AOTed.
10951
10952 2005-01-03  Martin Baulig  <martin@ximian.com>
10953
10954         * loader.c (find_method): Removed the hack for generic instances.
10955         (method_from_memberref): If our parent is a generic instance, pass
10956         its generic type definition to find_method() and then inflate the
10957         method.
10958         (mono_get_method_constrained): Pass the generic type definition to
10959         find_method() and inflate the method later.
10960
10961         * class-internals.h (MonoStats): Added `generic_class_count'.
10962
10963         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
10964         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
10965
10966         * reflection.c (mono_custom_attrs_from_params): Don't ignore
10967         generic type definitions.
10968
10969 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
10970
10971         * loader.c icall.c: Fix warnings.
10972
10973 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
10974
10975         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
10976         blittable types. Fixes #70864.
10977
10978 2004-12-29  Martin Baulig  <martin@ximian.com>
10979
10980         * icall.c
10981         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
10982
10983         * reflection.c (mono_method_get_object): Create a
10984         "System.Reflection.MonoGenericMethod" for inflated methods; don't
10985         call mono_get_inflated_method().
10986
10987         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
10988
10989 2004-12-27  Martin Baulig  <martin@ximian.com>
10990
10991         * class-internals.h (MonoMethod): Added `is_inflated' flag.
10992         (MonoMethodInflated): Added `inflated' field.
10993
10994         * class.c (mono_class_inflate_generic_method): Don't really
10995         inflate the method here; just set the `is_inflated' flag in the
10996         MonoMethod.
10997         (mono_class_get_inflated_method): Actually inflate the method here
10998         if it's not already inflated; we use the MonoMethodInflated's new
10999         `inflated' field as a cache.
11000
11001 2004-12-26  Martin Baulig  <martin@ximian.com>
11002
11003         * class.c
11004         (inflate_generic_class): Moved some code out of inflate_generic_type().
11005         (mono_class_inflate_generic_method): If we're already inflated,
11006         inflate the context and use the declaring method; ie. make sure
11007         the declaring method of an inflated method is always the generic
11008         method definition.
11009         (mono_class_create_from_typedef): Create
11010         `class->generic_container->context->gclass'.
11011
11012 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11013
11014         * metadata-internals.h, marshal.c, reflection.c: More
11015         MonoGHashTable->GHashTable.
11016
11017         * domain-internals.h, class.c: Change MonoGHashTable's into
11018         GHashTables for some cases where no gc stuff is used
11019
11020         All users: update apis
11021
11022 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
11023
11024         * metadata.c (builtin_types): Make this `const'. Makes this get
11025         put into the shareable section.
11026         (mono_metadata_init): Casts to make gcc happy.
11027
11028 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
11029
11030         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
11031
11032 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
11033
11034         * icall.c: Added an internal call to retrieve the position and length
11035         of assembly-level declarative security attributes (RequestMinimum, 
11036         RequestOptional and RequestRefuse). This is used by the Assembly class
11037         to re-create the corresponding permission sets.
11038
11039 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11040
11041         * marshal.c: fix the stelemref wrapper to be type correct
11042         (and faster).
11043
11044 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11045
11046         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
11047         to do key & 0x7fffffff. Hashtable already does this. It just
11048         results in longer code.
11049
11050 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11051
11052         * appdomain.c: Bump corlib version.
11053         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
11054         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
11055         * reflection.c|h: Add functions to get declarative security infos
11056         (blob position and length) for assemblies, classes and methods.
11057
11058 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
11059
11060         * reflection.c: sort the constant table (bug #70693).
11061
11062 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
11063
11064         * object-internals.h, threads.c, domain.c: add accessors for
11065         the MonoThread and MonoDomain tls keys.
11066
11067 2004-12-18  Martin Baulig  <martin@ximian.com>
11068
11069         * class.c (inflate_generic_type): If we're inflating a generic
11070         instance, set `ngclass->context->container = context->container';
11071         ie. the container we inflated into.
11072
11073         * metadata.c (mono_metadata_parse_generic_param): Reflect above
11074         inflate_generic_type() changes.
11075
11076 2004-12-17  Martin Baulig  <martin@ximian.com>
11077
11078         * class-internals.h
11079         (MonoGenericClass): Replaced `MonoType *generic_type' with
11080         `MonoClass *generic_class'.  Removed `dynamic_info'; if
11081         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
11082         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
11083
11084 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11085
11086         * exception.c (mono_exception_from_token): New helper function.
11087
11088 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11089
11090         * assembly.c (mono_assembly_load_with_partial_name): Call 
11091         mono_assembly_loaded before invoking the preload hooks. Fixes
11092         #70564.
11093
11094         * object-internals.h (MonoThread): Change culture_info and 
11095         ui_culture_info into an array.
11096
11097         * threads.c: Cache culture info objects from more than one appdomain.
11098
11099         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
11100         current UI culture.
11101
11102 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11103
11104         * threads.h threads.c appdomain.c: Clear the culture_info field of
11105         all threads during unloading if they point to an object in the dying
11106         appdomain.
11107
11108 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
11109
11110         * culture-info.h (TextInfoEntry): New struct
11111         * object-internals.h: sync with managed
11112         * locales.c: fill the `text_info_data' field
11113         * culture-info-tables.h: update
11114
11115 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11116
11117         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
11118         collector.
11119
11120 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
11121
11122         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
11123         (ves_icall_ModuleBuilder_getMethodToken): Ditto
11124
11125 2004-12-12  Martin Baulig  <martin@ximian.com>
11126
11127         * mono-debug-debugger.c (write_type): If we're an enum and the
11128         builtin types have already been initialized, call mono_class_init().
11129
11130 2004-12-11  Martin Baulig  <martin@ximian.com>
11131
11132         * metadata.c (mono_metadata_load_generic_params): Added
11133         `MonoGenericContainer *parent_container' argument; automatically
11134         compute `container->is_method'; pass the correct owner to
11135         get_constraints().      
11136
11137         * reflection.c (compare_genericparam): Sort the GenericParam table
11138         according to increasing owners. 
11139
11140 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11141
11142         * profiler.c: allow disabling the default profiler.
11143
11144 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
11145
11146         * decimal.c, icall.c: allow disabling System.Decimal support.
11147
11148 2004-12-09  Marek Safar <marek.safar@seznam.cz>
11149
11150         * reflection.c: Add support for null attribute arguments.
11151
11152 2004-12-09  Martin Baulig  <martin@ximian.com>
11153
11154         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
11155         names to get rid of compiler warnings.
11156
11157 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11158
11159         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
11160         mono_marshal_load_type_info (). Fixes #69625.
11161         (mono_marshal_get_ptr_to_struct): Likewise.
11162
11163 2004-12-08  Martin Baulig  <martin@ximian.com>
11164
11165         * mono-debug.h: Bumped version number to 47.
11166
11167         * mono-debug-debugger.c
11168         (mono_debugger_event_handler, mono_debugger_event): Take two
11169         guint64 arguments insteed of a gpointer and a guint32.  
11170
11171 2004-12-08  Martin Baulig  <martin@ximian.com>
11172
11173         * debug-mono-symfile.h
11174         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
11175         `address' to `native_offset'.
11176
11177 2004-12-08  Martin Baulig  <martin@ximian.com>
11178
11179         * class.c (mono_class_create_from_typespec): Only inflate if we
11180         either have `context->gclass' or `context->gmethod'.
11181
11182 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11183
11184         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
11185
11186         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
11187
11188         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
11189
11190         * reflection.c (mono_assembly_get_object): Remove the workaround put
11191         in for the release.
11192         
11193         * appdomain.c: Use the corlib_internal field from MonoAssembly.
11194
11195         * appdomain.c: Bump corlib version.
11196
11197         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
11198         be visible in other appdomains.
11199
11200 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
11201
11202         * threads.c: Interlocked inc and dec for longs were messed up,
11203         use a KISS based impl for this. Fixes 70234
11204
11205 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11206
11207         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
11208
11209 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11210
11211         * icall.c: fix to follow policy not to allow struct
11212         arguments in icalls.
11213
11214 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11215
11216         * process.c: make the patch that handles spaces in file paths work
11217         on mono/windows too.
11218
11219 2004-12-06  Martin Baulig  <martin@ximian.com>
11220
11221         * class.c (mono_class_create_generic): Call
11222         mono_class_setup_supertypes() if we're dynamic.
11223         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
11224
11225 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11226
11227         * object-internals.h: Add new fields to MonoThread.
11228
11229         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11230
11231         * icall.c threads-types.h threads.c: Add new icalls.
11232
11233         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
11234
11235         * object-internals.h (MonoReflectionAssembly): Sync object layout with
11236         managed side.
11237
11238         * appdomain.c: Bump corlib version.
11239
11240         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
11241         internal assemblies. Fixes #69181.
11242
11243 2004-12-05  Martin Baulig  <martin@ximian.com>
11244
11245         * class.c (mono_class_inflate_generic_signature): Make this a
11246         no-op if `context' is NULL or we don't have any type parameters;
11247         also copy `sentinelpos'.        
11248
11249 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
11250
11251         * image.c: Add unbox_wrapper_cache.
11252
11253         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
11254
11255         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
11256         function generator.
11257         
11258         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
11259         Fixes #70173.
11260
11261         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
11262         
11263 2004-12-04  Martin Baulig  <martin@ximian.com>
11264
11265         * loader.c (mono_method_get_signature_full): New public function;
11266         like mono_method_get_signature(), but with an additional
11267         `MonoGenericContext *' argument.
11268
11269         * class.c (mono_class_inflate_generic_signature): Formerly known
11270         as inflate_generic_signature(); make this public.
11271
11272 2004-12-04  Martin Baulig  <martin@ximian.com>
11273
11274         * metadata.c
11275         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
11276         instead of a `MonoGenericContainer *'.  
11277         (mono_metadata_parse_array_full): Likewise.
11278         (mono_metadata_parse_signature_full): Likewise.
11279         (mono_metadata_parse_method_signature_full): Likewise.
11280         (mono_metadata_parse_generic_inst): Likewise.
11281         (mono_metadata_parse_generic_param): Likewise.
11282         (mono_metadata_parse_mh_full): Likewise.
11283         (mono_type_create_from_typespec_full): Likewise.
11284
11285 2004-12-03  Martin Baulig  <martin@ximian.com>
11286
11287         * class-internals.h (MonoGenericContainer): Replaced the
11288         `MonoGenericContext * pointer with a `MonoGenericContext'
11289         structure and made it the first element.
11290
11291 2004-12-03  Martin Baulig  <martin@ximian.com>
11292
11293         * class.c
11294         (inflate_generic_type): Set the `context->container' when creating
11295         a new MonoGenericContext.
11296         (mono_class_inflate_generic_method): Likewise.
11297         (mono_class_create_from_typespec): Just use `context->container'
11298         to get the container.
11299
11300         * loader.c (method_from_methodspec): Set `context->parent' from
11301         `context->container' - and if that's a method container, use its
11302         parent.  Also set the `context->container' when creating a new
11303         MonoGenericContext.
11304         (mono_get_method_from_token): Use just `context->container' to get
11305         the container.
11306
11307         * metadata.c (do_mono_metadata_parse_generic_class): Also set
11308         `gclass->context->container'.
11309
11310         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
11311         the `context->container' when creating a new MonoGenericContext.
11312
11313 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
11314
11315         * reflection.c (compare_genericparam): Sort params with identical
11316         owner by their number. Fixes gen-111 on sparc.
11317
11318 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11319
11320         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
11321         around the domain changes.
11322
11323         * appdomain.c (mono_domain_unload): Handle the case when the thread
11324         calling Unload is itself being aborted during unloading. Fixes #70022.
11325
11326         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
11327
11328         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
11329         checkpoint_func as an icall so it gets a wrapper.
11330         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
11331         in the cross-appdomain wrappers too.
11332
11333         * threads.c (mono_thread_has_appdomain_ref): Make this public.
11334
11335         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
11336
11337         * reflection.c: Fix some memory leaks.
11338         
11339 2004-12-02  Martin Baulig  <martin@ximian.com>
11340
11341         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
11342
11343         * metadata.c (generic_class_cache): New static hashtable.
11344         (mono_metadata_lookup_generic_class): New public method.
11345
11346 2004-12-02  Martin Baulig  <martin@ximian.com>
11347
11348         * class.c (mono_class_create_from_typedef): Call
11349         mono_class_setup_parent() and mono_class_create_mono_type() before
11350         parsing the interfaces.
11351
11352 2004-12-02  Martin Baulig  <martin@ximian.com>
11353
11354         * metadata.c (generic_inst_cache): New static hashtable.
11355         (mono_metadata_lookup_generic_inst): New public function.
11356         (mono_metadata_inflate_generic_inst): New public function.
11357         (mono_metadata_parse_generic_inst): New public function.
11358         (do_mono_metadata_parse_generic_class): Use the new
11359         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
11360         since this'll also use the cache.
11361
11362         * reflection.c (mono_reflection_bind_generic_method_parameters):
11363         Use mono_metadata_lookup_generic_inst() to use the new cache.
11364
11365         * class.c (inflate_mono_type): Use
11366         mono_metadata_inflate_generic_inst() to inflate a generic
11367         instance; this'll also use the new cache.
11368
11369         * loader.c (method_from_methodspec): Use
11370         mono_metadata_parse_generic_inst() and
11371         mono_metadata_inflate_generic_inst() rather than parsing it
11372         manually, so we can use the new cache.
11373
11374 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11375
11376         * threads.c (wait_for_tids): Do not incorrectly free threads when 
11377         the wait times out.
11378
11379 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11380
11381         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
11382         iter->args based on whether parameters are passed in registers (i.e.
11383         MONO_ARCH_REGPARMS is defined)
11384
11385 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
11386
11387         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
11388         the exception message. Fixes #70070.
11389         (method_from_methodspec): Fix warnings.
11390
11391 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11392
11393         * process.c: (complete_path) return the path quoted
11394
11395 2004-12-01  Martin Baulig  <martin@ximian.com>
11396
11397         * class-internals.h (MonoGenericInst): New structure.
11398         (MonoGenericClass): Replaced `type_argc', `type_argv' and
11399         `is_open' with `MonoGenericInst *inst'.
11400         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
11401         `is_open' with `MonoGenericInst *inst'.
11402
11403 2004-11-30  Martin Baulig  <martin@ximian.com>
11404
11405         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
11406
11407         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
11408         to `generic_class_cache'.
11409
11410         * metadata.c
11411         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
11412         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
11413         (mono_generic_inst_is_valuetype): Renamed to
11414         mono_generic_class_is_valuetype().
11415
11416         * class-internals.h
11417         (MonoGenericInst): Renamed to MonoGenericClass.
11418         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
11419         (MonoClass): Renamed `generic_inst' to `generic_class'.
11420         (MonoGenericContext): Renamed `ginst' to `gclass'.
11421
11422         * object-internals.h
11423         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
11424
11425         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
11426         mono_reflection_generic_class_initialize().
11427
11428         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
11429         now known as "System.Reflection.MonoGenericClass".
11430         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
11431
11432 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
11433
11434         * class-internals.h: Added a flag field to MonoClass to cache the
11435         declarative security attributes actions associated with the class.
11436         * domain-internals.h: Added booleans to MonoJitInfo to cache the
11437         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
11438         applicable to the JITted method.
11439         * reflection.c|h: Added functions to extract (as flags) which security
11440         actions are available (declaratively) for a method, class or assembly.
11441         * metadata.c|h: Added functions to search the declarative security
11442         table in the metadata.
11443         
11444 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
11445
11446         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
11447         EXPORTEDTYPES are already in the class name cache, so there is no
11448         need to add extra code here to look at them. Just removes a bit of
11449         cruft.
11450
11451         (ves_icall_System_Environment_get_TickCount): No need for #if
11452         WINDOWS. We already have the code in io-layer.
11453
11454 2004-11-28  Martin Baulig  <martin@ximian.com>
11455
11456         * loader.c
11457         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
11458         Fixes gen-112.cs.
11459
11460 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
11461
11462         * assembly.c (do_mono_assembly_open): Instead of having a
11463         conditional WITH_BUNDLE, incorporate support for bundles here, by
11464         having a global `bundles' variable holding a pointer to the actual
11465         bundles. 
11466
11467         (mono_register_bundled_assemblies): New API call used by the
11468         bundle code. 
11469
11470         See mkbundle.1 for details.
11471         
11472 2004-11-27  Martin Baulig  <martin@ximian.com>
11473
11474         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
11475         the vtable for generic methods.
11476
11477 2004-11-26  Martin Baulig  <martin@ximian.com>
11478
11479         * metadata.c
11480         (mono_metadata_generic_method_hash): New public function.
11481         (mono_metadata_generic_method_equal): Likewise.
11482
11483         * class-internals.h
11484         (MonoGenericContainer): Added `GHashTable *method_hash'.
11485
11486         * reflection.c (ReflectionMethodBuilder): Added
11487         `MonoGenericContainer *generic_container'.
11488         (reflection_methodbuilder_to_mono_method): Don't create a new
11489         MonoGenericContainer each time we're called.
11490         (mono_reflection_bind_generic_method_parameters): Use
11491         `container->method_hash' to cache the results so we don't create a
11492         different method if we're called several times with the same
11493         arguments.
11494
11495         * loader.c (method_from_methodspec): Use the new
11496         `container->method_hash' here, too.
11497
11498 2004-11-26  Martin Baulig  <martin@ximian.com>
11499
11500         * class.c (inflate_generic_signature): Correctly compute
11501         `res->has_type_parameters'.
11502         (mono_class_vtable): Use the `has_type_parameters' flag to
11503         determine whether we're a generic method.
11504
11505         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
11506
11507 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11508
11509         * object.c (mono_runtime_run_main): Fix a small memory leak.
11510
11511 2004-11-25  Martin Baulig  <martin@ximian.com>
11512
11513         * class.c (set_generic_param_owner): Fixed the loop.
11514
11515 2004-11-25  Martin Baulig  <martin@ximian.com>
11516
11517         * object.c (mono_class_vtable): Don't create any JIT wrappers for
11518         generic methods.
11519
11520 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11521
11522         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
11523         names. Fixes #69787.
11524
11525 2004-11-24  Martin Baulig  <martin@ximian.com>
11526
11527         * class.c (mono_class_create_generic_2): If we don't have a
11528         `ginst->parent', inflate `gklass->parent' to get our parent.
11529
11530 2004-11-24  Martin Baulig  <martin@ximian.com>
11531
11532         * reflection.c (compare_genericparam): Correctly sort the
11533         GenericParam table; fixes #69779.
11534
11535 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
11536
11537         * reflection.c: When writing a PE file, don't create a huge
11538         buffer in memory. Just write the arrays we have to the file.
11539         This reduces memory usage.
11540
11541         * metadata-internals.h: MonoDynamicStream pefile is no longer used
11542         globally.
11543
11544 2004-11-17  Martin Baulig  <martin@ximian.com>
11545
11546         * class.c (mono_class_init): Don't setup `class->parent' for
11547         dynamic instances; moved this to mono_class_generic_2().
11548         (mono_class_create_generic): Also set `klass->inited' for dynamic
11549         generic instances.
11550         (mono_class_create_generic_2): Don't do anything for dynamic
11551         generic instances.  Set `klass->parent' here and also call
11552         mono_class_setup_parent() here. 
11553
11554         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
11555         `MonoType *parent' argument; set `ginst->parent' before calling
11556         mono_class_create_generic_2(), so we set the correct parent.
11557
11558 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
11559
11560         * reflection.c: allow getting attributes from ModuleBuilder
11561         (used by ikvm).
11562
11563 2004-11-17  Martin Baulig  <martin@ximian.com>
11564
11565         * class.c (mono_class_create_from_typedef): If a type parameter is
11566         inherited from an outer class, set its owner to that class.
11567
11568 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
11569
11570         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
11571           for (int*) written size. This fixes bug #69592.
11572
11573 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11574
11575         * icall.c: Added IsAuthenticodePresnet internal call.
11576         * image.c|h: New function that check a MonoImage for an Authenticode
11577         signature in the certificate PE data directory.
11578         * security.c|h: New internal call to ask the runtime if an 
11579         Authenticode signature seems referenced in the PE header.
11580
11581 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
11582
11583         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
11584
11585         * reflection.c (mono_image_create_pefile): Free the assembly streams
11586         after writing out the assembly file.
11587
11588         * object.c (mono_runtime_run_main): Fix small memory leak.
11589
11590         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
11591         property access modifiers. Fixes #69389.
11592
11593 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11594
11595         * domain.c, object.c, object-internals.h, domain-internals.h,
11596         object.h, marshal.c: keep dynamic code info per domain.
11597
11598 2004-11-15  Martin Baulig  <martin@ximian.com>
11599
11600         * class.c (mono_type_get_name_recurse): Put type arguments in
11601         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
11602         see bug #68387.
11603
11604 2004-11-15  Martin Baulig  <martin@ximian.com>
11605
11606         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
11607         (mono_class_setup_vtable): When computing `the_cname' for a
11608         generic instance, don't include the namespace since we'd otherwise
11609         add it twice.
11610
11611 2004-11-15  Martin Baulig  <martin@ximian.com>
11612
11613         * class.c (mono_class_create_generic): Changed return type to void.
11614         (mono_class_create_generic_2): New public function; setup
11615         `class->method', `class->field' and `class->interfaces' here
11616         instead of in mono_class_init().
11617
11618         * class.h (mono_class_create_generic): Moved to class-internals.h.
11619
11620 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
11621
11622         * reflection.c (mono_image_create_pefile): take a file HANDLE.
11623         rather than writing to memory, write to this file. Right now,
11624         we are just writting into a buffer, and copying that. However
11625         we can avoid the buffer later.
11626
11627         (mono_dynamic_stream_reset): new function
11628
11629         * icall.c, object-internals.h: update for the above.
11630
11631 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
11632
11633         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
11634         have been using gc'd memory. First it is slower, unlikely
11635         the comment in the source code said, secondly, it increases
11636         our footprint to do it in the gc.
11637
11638         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
11639         the method so that it does not have to copy to managed code.
11640
11641 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11642
11643         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
11644
11645 2004-11-12  Martin Baulig  <martin@localhost>
11646
11647         * reflection.c (mono_image_create_token): Allow generic method
11648         definitions here, since they may appear in an `.override'; see
11649         gen-98/gen-99 for an example.
11650
11651 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
11652
11653         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
11654         #69365.
11655
11656         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
11657         descriptive.
11658
11659 2004-11-11  Martin Baulig  <martin@ximian.com>
11660
11661         * class.c (mono_class_setup_vtable): In an explicit interface
11662         implementation, the method name now includes the arity.
11663
11664 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
11665
11666         * object.c (mono_array_full_copy): Fix warning.
11667
11668 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
11669
11670         * appdomain.c: Removed look_for_method_by_name(). Use the new method
11671         mono_class_get_method_from_name() instead.
11672         
11673         * class-internals.h: Added two new types of wrappers. 
11674         Added MonoRemotingTarget enum. Added new trampoline function type, which
11675         takes an additional MonoRemotingTarget value as parameter, so it is
11676         possible to request a trampoline for a specific target.
11677         
11678         * class.c: Added new mono_class_get_method_from_name() method.
11679         
11680         * class.h: In MonoRemoteClass, we can have now to vtables, one for
11681         general remoting sinks and one specific for cross domain calls.
11682         
11683         * debug-helpers.c: Added new wrapper names.
11684         
11685         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
11686         of a remote class.
11687         
11688         * image.c: Porperly delete value objects form the remoting invoke hashtable.
11689         
11690         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
11691         with several other methods (mono_marshal_get_xappdomain_dispatch,
11692         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
11693         and others) can generate a fast remoting wrapper for cross domain calls.
11694         More information can be found in docs/remoting.
11695         Other changes: Removed mono_find_method_by_name, and used
11696         mono_class_get_method_from_name instead.
11697         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
11698         is stored in the remoting invoke hashtable.
11699         
11700         * marshal.h: published the new method for getting the xdomain wrapper,
11701         and also added a method for getting the adequate wrapper for a given
11702         method and target.
11703         
11704         * object-internals.h, object.c: Added a couple of methods for capying and
11705         cloning arrays.
11706         Modified mono_install_remoting_trampoline, which takes the new remoting
11707         trampoline that has a remoting target as parameter.
11708         mono_class_proxy_vtable now also takes a remoting target as parameter, and
11709         will return the most suitable vtable for the target.
11710         Added mono_remote_class_vtable, which returns the vtable of a remote class
11711         (which can be the normal remoting vtable or the xdomain vtable).
11712         
11713         * threads.c: the xdomain invoke and dispatch wrappers must also be
11714         protected against interruptions.
11715
11716 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11717
11718         * icall.c: use memmove in BlockCopyInternal when the source and
11719         destination arrays are the same.
11720
11721 2004-11-09  Martin Baulig  <martin@ximian.com>
11722
11723         * class-internals.h (MonoGenericContainer): Removed `method' and
11724         `signature', replaced them with `is_method' and `is_signature'
11725         flags.  Added `context'.
11726
11727         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
11728         instead of a `MonoGenericContainer *'.
11729
11730         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
11731         for dynamic type parameters.
11732         (mono_metadata_load_generic_params): Setup `container->context'.
11733
11734         * reflection.c (mono_reflection_setup_generic_class): Setup
11735         `tb->generic_container->context'.
11736         (do_mono_reflection_bind_generic_parameters): Use
11737         mono_class_inflate_generic_type() to correctly inflate types,
11738         rather than using our own hack just for MONO_TYPE_VAR.
11739
11740 2004-11-09  Martin Baulig  <martin@ximian.com>
11741
11742         * class.c (mono_class_inflate_generic_method): Small fix; don't
11743         crash here.
11744
11745         * icall.c
11746         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
11747         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
11748         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
11749         (ves_icall_Type_BindGenericParameters): Likewise.
11750         (ves_icall_Type_get_IsGenericInstance): Likewise.
11751         (ves_icall_Type_GetGenericParameterPosition): Likewise.
11752         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
11753         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
11754         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
11755
11756 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11757
11758         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
11759         assembly versions and public key tokens. Fixes #69113.
11760
11761 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
11762
11763         * metadata.c: fix bug introduced with the type cache changes
11764         on 2004-11-06.
11765
11766 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
11767
11768         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
11769         the MonoClass pointer instead of the token in exception clauses.
11770         * reflection.c: updates for the above and make the code not depend
11771         on the structure of MonoExceptionClause.
11772
11773 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11774
11775         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
11776         Add support for dynamic assemblies. Fixes #69114.
11777
11778         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
11779
11780 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11781
11782         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
11783         since most only those methods use it. the code member of
11784         MonoMethodPInvoke was dead, so that can be removed too. Also,
11785         remove inline_count (again, not used), and move slot so that it
11786         can share bits with some other flags. This saves 8 bytes in the
11787         structure and gives us about 50 kb back for mcs helloworld.cs
11788
11789         * *.[ch]: Do naming changes for the above.
11790
11791         * loader.c (mono_method_get_header): Lazily init the header
11792         on first access.
11793         (mono_get_method_from_token): don't init the header here
11794         (mono_free_method): the header may never be allocated
11795
11796         Overall, this saves 150 kb of unmanaged allocations
11797         for mcs helloworld.cs. That accounts for 10% of the unmanaged
11798         memory at runtime.
11799         
11800         * loader.c, loader.h (mono_method_get_header): new accessor.
11801
11802         * *.[ch]: use the above method. Prepares us to lazily load
11803         the header.
11804
11805         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
11806         three warnings, which are actual bugs (see 69206).
11807
11808         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
11809         unused. Saves a cool 4 bytes / method.
11810
11811 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
11812
11813         * metadata.c (builtin_types): Add types for System.Object here.
11814         (mono_metadata_parse_type_full): Cache MonoType*'s that are
11815         for a class or valuetype from klass->this_arg or klass->byval_arg.
11816
11817         On mcs for a hello world, this gets us down from 21836 MonoType's
11818         to 14560.
11819
11820         (mono_metadata_free_type): Account for the above change.
11821
11822 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
11823
11824         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
11825         exception instead of asserting if name is null.
11826         (ves_icall_System_AppDomain_GetData): Ditto.
11827
11828 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
11829
11830         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
11831         EnumBuilder.
11832
11833         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
11834         Return NULL when the domain does not have entry_assembly set.
11835
11836         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
11837         Add a 'resource_modules' argument.
11838         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
11839
11840         * reflection.c (mono_reflection_create_runtime_class): Move setting
11841         of wastypebuilder here, so mono_get_type_object () returns a MonoType
11842         for enums too.
11843
11844         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
11845         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
11846         Throw an ArgumentNullException if 'ptr' is null.
11847
11848         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
11849         assemblies here. Fixes #69020.
11850
11851 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
11852
11853         * reflection.c (build_compressed_metadata): Fix the previous patch for
11854         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
11855         the stack.
11856
11857 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
11858
11859         * assembly.c (mono_assembly_names_equal): Allow a match if one of
11860         the cultures is false. Fixes #69090.
11861
11862         * reflection.c (build_compressed_metadata): Fix invalid memory read 
11863         detected by valgrind.
11864         
11865         * reflection.c (mono_reflection_get_type): Avoid triggering a 
11866         TypeResolve multiple times for the same type. Fixes #65577.
11867
11868 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
11869
11870         * marshal.c: Avoid using ldftn to call managed functions. It is
11871         much slower than just a call.
11872
11873         * reflection.c (mono_module_get_object): free the basename we
11874         allocate here from glib.
11875         
11876         * reflection.c (ensure_runtime_vtable): make sure to free
11877         overrides.  Also, we were allocating an array of MonoMethod not an
11878         array of MonoMethod*.
11879
11880         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
11881
11882         * image.c (mono_image_close): free image->guid here.
11883
11884 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
11885
11886         * reflection.c: Fix some spec conformance issues with the PE file
11887         structures so mcs compiled apps run on the Net 2.0 beta.
11888
11889 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
11890
11891         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
11892         Implement this. Fixes #67264.
11893
11894         * debug-helpers.h debug-helpers.c marshal.c: Move 
11895         mono_find_method_by_name to debug-helpers.c.
11896
11897 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
11898
11899         * object.c (mono_release_type_locks): type_initialization_hash is
11900         a GHashTable.
11901
11902         * reflection.c object.c object-internals.h: Fix warnings.
11903
11904         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
11905         without accessors. Fixes #61561.
11906
11907         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
11908         application base from the root domain if not set. Fixes #65641.
11909         (mono_runtime_init): Fix warning.
11910
11911 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11912
11913         * appdomain.c: call mono_thread_pool_init.
11914         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
11915         of worker threads based on the number of CPUs and the environment
11916         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
11917         for non-windows (windows) systems.
11918
11919 2004-10-27  Chris Toshok  <toshok@ximian.com>
11920
11921         * mono-debug-debugger.c (write_class): don't call mono_class_init
11922         here, as even with the check for (!klass->init_pending), we get
11923         into a situation where we're hitting cycles in class
11924         initialization.  Fixes #68816.
11925
11926 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
11927
11928         * image.c: Avoid overwriting values in the loaded_images_hash when an
11929         assembly is loaded multiple times. Fixes #61152.
11930
11931         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
11932         so multiple satellite assemblies for the same name can be loaded.
11933         Fixes #68259.
11934
11935         * mono_domain_assembly_preload: Actually return the loaded assembly, 
11936         not NULL.
11937
11938         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
11939         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
11940
11941         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
11942         pending finalizers are not invoked after the appdomain has been 
11943         unloaded. Fixes #67862.
11944
11945 2004-10-22  Martin Baulig  <martin@ximian.com>
11946
11947         * mono-debug-debugger.c
11948         (mono_debugger_runtime_invoke): Don't box valuetypes.
11949
11950 2004-10-22  Chris Toshok  <toshok@ximian.com>
11951
11952         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
11953         don't hide private methods.
11954
11955 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
11956
11957         * icall.c: Allows the runtime to "share" (when known) the public key
11958         token of an assembly. This avoid the need to recalculate the token 
11959         (from the public key) in managed code.
11960
11961 2004-10-21  Chris Toshok  <toshok@ximian.com>
11962
11963         * debug-helpers.c (append_class_name): argh, revert last patch.
11964         
11965 2004-10-21  Chris Toshok  <toshok@ximian.com>
11966
11967         * debug-helpers.c (append_class_name): use '+' as the delimiter,
11968         not '/', so that it matches what the debugger uses to look up
11969         methods.
11970
11971 2004-10-21  Martin Baulig  <martin@ximian.com>
11972
11973         * mono-debug-debugger.c (mono_debugger_throw_exception): New
11974         public method; this is called each time an exception is thrown and
11975         allows the debugger to use exception catch points.
11976
11977 2004-10-21  Martin Baulig  <martin@ximian.com>
11978
11979         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
11980         the stack pointer and the exception object in some struct and pass
11981         that to the debugger.
11982
11983 2004-10-21  Chris Toshok  <toshok@ximian.com>
11984
11985         * mono-debug-debugger.c (do_write_class): add instance/static
11986         event support.  We don't expose "raise" or "other" yet.
11987         (event_is_static): new method.
11988
11989 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
11990
11991         * mono-debug-debugger.c
11992         (mono_debugger_handle_exception): Remove
11993         bogus return value for fussy compilers.
11994
11995 2004-10-20  Martin Baulig  <martin@ximian.com>
11996
11997         * mono-debug-debugger.c
11998         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
11999         (mono_debugger_handled_exception): Likewise.
12000
12001 2004-10-20  Martin Baulig  <martin@ximian.com>
12002
12003         * mono-debug-debugger.h (MonoDebuggerEvent): Added
12004         MONO_DEBUGGER_EVENT_EXCEPTION.
12005
12006         * mono-debug-debugger.c (mono_debugger_handle_exception): New
12007         public function to send the debugger a notification for an
12008         exception and inform it about a catch/finally clause.
12009
12010 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
12011
12012         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
12013         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
12014         fix 2.95 build. 
12015
12016         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
12017
12018 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12019
12020         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
12021         marshalled as [In,Out]. Fixes #58325.
12022
12023 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
12024
12025         * reflection.c (mono_method_body_get_object): Implement some fields.
12026
12027 2004-10-12  Martin Baulig  <martin@ximian.com>
12028
12029         * reflection.c (mono_reflection_bind_generic_parameters): Small
12030         fix, correctly retrieve our parent from a generic instance.
12031
12032 2004-10-12  Martin Baulig  <martin@ximian.com>
12033
12034         * metadata.c (mono_metadata_generic_param_equal): We always have
12035         an owner.
12036
12037         * class.c
12038         (mono_class_from_generic_parameter): We need to have an owner.
12039         (my_mono_class_from_generic_parameter): Likewise.
12040
12041         * reflection.c (mono_reflection_setup_generic_class): Renamed to
12042         mono_reflection_create_generic_class() and added a new
12043         mono_reflection_setup_generic_class().  
12044         (mono_reflection_initialize_generic_param): If we're a nested
12045         generic type and inherited from the containing class, set our
12046         owner to the outer class.
12047
12048 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
12049
12050         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
12051
12052         * reflection.c (mono_method_body_get_object): New function to create
12053         a MethodBody object.
12054
12055         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
12056
12057 2004-10-11  Martin Baulig  <martin@ximian.com>
12058
12059         * metadata.c (_mono_metadata_type_equal): Renamed to
12060         do_mono_metadata_type_equal() and made static.
12061
12062 2004-10-11  Martin Baulig  <martin@ximian.com>
12063
12064         * appdomain.c: Bump corlib version number to 28.
12065
12066 2004-10-10  Martin Baulig  <martin@ximian.com>
12067
12068         * class-internals.h
12069         (MonoGenericInst): Added `MonoGenericContainer *container'.
12070         (MonoGenericMethod): Likewise.
12071         (MonoGenericContext): Likewise.
12072         (MonoGenericParam): Added `MonoGenericContainer *owner'.
12073
12074         * metadata.c
12075         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
12076         (do_mono_metadata_parse_generic_inst): Likewise.
12077         (mono_metadata_parse_type_full): New public method.  This is the actual
12078         mono_metadata_parse_type() implementation - with an additional
12079         `MonoGenericContainer *' argument.
12080         (mono_metadata_parse_array_full): Likewise.
12081         (mono_metadata_parse_signature_full): Likewise.
12082         (mono_metadata_parse_method_signature_full): Likewise.
12083         (mono_metadata_parse_mh_full): Likewise.
12084         (mono_type_create_from_typespec): Likewise.
12085         (mono_metadata_interfaces_from_typedef_full): New public method;
12086         this is similar to the other _full() methods, but we take a
12087         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
12088         (mono_metadata_parse_generic_param): Take an additional
12089         `MonoGenericContainer *' argument and lookup the MonoGenericParam
12090         from that container.
12091         (mono_metadata_generic_param_equal): New static method to compare
12092         two type parameters.
12093         (_mono_metadata_type_equal): New static method; takes an
12094         additional `gboolean signature_only' argument - if true, we don't
12095         compare the owners of generic parameters.
12096         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
12097         with a TRUE argument - do a signature-only comparision.
12098
12099         * loader.c: Use the new _full() methods and pass the
12100         MonoGenericContainer to them.
12101
12102         * object-internals.h (MonoReflectionTypeBuilder): Added
12103         `MonoGenericContainer *generic_container' field.
12104         (MonoReflectionMethodBuilder): Likewise.
12105
12106 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12107
12108         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
12109         case initial images of dynamic assemblies.
12110
12111         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
12112
12113         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
12114
12115         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
12116         length of event->other array.
12117         (typebuilder_setup_events): Ditto.
12118
12119         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
12120         'assembly_by_name' and add an 'assemblies' list.
12121
12122         * assembly.h assembly.c: Add a new search hook for determining whenever
12123         an assembly is already loaded. Use this instead of searching in the
12124         loaded_assemblies list.
12125
12126         * domain.c appdomain.c: Implement the new search hook so loaded 
12127         assemblies are now scoped by appdomain. Fixes #67727.
12128
12129 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
12130
12131         * threads.c (mono_thread_attach): Initialize synch_lock field so
12132         mono_thread_detach works again.
12133
12134         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
12135         'lib' too. Fixes #63130.
12136
12137 2004-10-06  Jackson Harper  <jackson@ximian.com>
12138
12139         * culture-info-tables.h: regenerated.
12140
12141 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
12142
12143         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
12144         implemented by other interfaces in the result. Fixes #65764.
12145         
12146         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
12147         Handle unloadable modules without crashing.
12148
12149         * image.c (load_modules): Revert the previous patch since modules must
12150         have a fixed index inside the array.
12151         
12152         * image.c (load_modules): Don't include native modules in the modules
12153         array.
12154
12155 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12156
12157         * reflection.h: Add param_defaults field.
12158
12159         * reflection.c: Add support for parameter defaults in dynamic methods.
12160         Fixes #64595.
12161
12162         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
12163         an empty string when a type has no namespace. Fixes #64230.
12164
12165 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
12166
12167         * tabledefs.h: Added "internal" security actions to support non-CAS
12168         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
12169         Note: they do not seems to be used anymore in 2.0 (new metadata format)
12170
12171 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
12172
12173         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
12174         constructor of abstract class. Fixes #61689.
12175
12176 2004-10-04  Martin Baulig  <martin@ximian.com>
12177
12178         * class-internals.h (MonoGenericContainer): New type.
12179         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
12180         `MonoGenericContainer *generic_container'.
12181         (MonoClass): Replaced `gen_params' and `num_gen_params' with
12182         `MonoGenericContainer *generic_container'.
12183
12184         * metadata.c (mono_metadata_load_generic_params): Return a
12185         `MonoGenericContainer *' instead of a `MonoGenericParam *';
12186         removed the `num' argument.
12187
12188 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12189
12190         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
12191         for dynamic images.
12192
12193         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
12194         machine fields.
12195
12196         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
12197
12198         * reflection.c: Save pe_kind and machine values into the generated
12199         image file.
12200
12201         * appdomain.c: Bump corlib version number.
12202
12203         * object-internals.h: Reorganize layout of LocalBuilder.
12204
12205         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
12206         New helper function.
12207
12208         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
12209         created MonoType for dynamic types. Fixes #66180.
12210
12211 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
12212
12213         * threadpool.c: the ares hashtable needs a critical section around it.
12214         this prevents some nasty segfaults
12215
12216 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12217
12218         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
12219         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
12220         bug 67324).
12221         
12222 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
12223
12224         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
12225         
12226 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12227
12228         * image.c: Always canonicalize image file names, to avoid loading
12229         the same assembly twice when referenced using a relative path.
12230
12231 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
12232
12233         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
12234
12235         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
12236
12237         * marshal.c: Fix warnings.
12238
12239 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
12240
12241         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
12242         attempting to marshal the delegate_trampoline as the method_addr.
12243         This patch has a static hashtable of marshalled delegates so that 
12244         we can map delegate_trampoline addresses back to delegates.  This
12245         allows a delegate passed to managed code to be passed back into native
12246         code.  Fixes #67039
12247
12248 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12249
12250         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
12251
12252         * reflection.c (method_encode_code): Align method headers properly.
12253         Fixes #66025.
12254
12255 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12256
12257         * marshal.c: In the runtime invoke wrapper, reset the abort
12258         exception if it is cached. This avoids the automatic rethrowal of 
12259         the exception after the catch of the wrapper. Also check for pending
12260         interruptions before calling the managed method. This is done using
12261         the new method emit_thread_force_interrupt_checkpoint, since the
12262         normal checkpoint method is ignored when running the invoke wrapper.
12263         * object.c: If the abort exception is rethrown, set the abort_exc
12264         field of the thread, so it will be rethrown aftere every catch.
12265         * threadpool.c: Only run an interruption checkpoint if what has been
12266         requested is a stop of the thread (aborts will be ignored).
12267         * threads.c: By default, a thread will now never be interrumped while
12268         running the runtime invoke wrapper (this ensures that runtime_invoke
12269         will always return to the caller if an exception pointer is provided).
12270         There is a new special method mono_thread_force_interruption_checkpoint()
12271         to force an interruption checkpoint even if running a protected
12272         wrapper, which is used by the same runtime invoke wrapper to do a check
12273         at a safe point.
12274
12275 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12276
12277         * object.c, object-internals.h: Implemented mono_release_type_locks,
12278         which releases the cctor locks held by a thread.
12279         * threads.c, threads.h: In thread_cleanup, release cctor locks held
12280         by a thread. Added mono_thread_exit() method to be used to safely stop
12281         a thread.
12282
12283 2004-09-28  Raja R Harinath  <rharinath@novell.com>
12284
12285         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
12286         Move null check before dereference.  Avoid indexing beyond the end
12287         of the 'modules' array.
12288
12289 2004-09-28  Raja R Harinath  <rharinath@novell.com>
12290
12291         * metadata-internals.h (MonoImage): Add module_count field.
12292         * image.c (load_modules): Set image->module_count.
12293         (mono_image_load_file_for_image): Use image->module_count.
12294         * reflection.c (mono_image_load_module): Append to image->modules array 
12295         of dynamic assembly.
12296         (mono_module_get_object): Fix loop to actually increment index.
12297         Use image->module_count.
12298         * assembly.c (mono_assembly_load_references): Use image->module_count.
12299         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12300         Likewise.
12301
12302 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12303
12304         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
12305         Avoid assert on generic types.
12306
12307 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
12308
12309         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
12310
12311         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
12312
12313         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
12314         function to convert a MarshalSpec structure to its managed counterpart.
12315
12316         * reflection.c: Fix warnings.
12317         
12318         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
12319         field.
12320
12321         * icall.c (mono_create_icall_signature): Fix build.
12322
12323 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12324
12325         * icall.c: Add MakePointType icall.
12326
12327         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
12328         warnings.
12329
12330 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12331
12332         * threadpool.c: reuse allocated slots in the queue.
12333
12334 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12335
12336         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
12337
12338         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
12339
12340         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
12341         previous change.
12342
12343         * tabledefs.h: Add constants for pinvoke attributes BestFit and
12344         ThrowOnUnmappableChar.
12345
12346         * icall.c (ves_icall_Type_GetPacking): New icall.
12347
12348 2004-09-24  Martin Baulig  <martin@ximian.com>
12349
12350         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
12351
12352 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12353
12354         * appdomain.c:
12355         (mono_domain_set): allow setting a domain that is being unloaded.
12356         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
12357         being unloaded.
12358
12359 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12360
12361         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
12362         the GetCustomAttributes icall.
12363
12364 2004-09-23  Martin Baulig  <martin@ximian.com>
12365
12366         * object-internals.h (MonoReflectionGenericParam): Replaced
12367         'has_ctor_constraint', `has_reference_type' and `has_value_type'
12368         with `guint32 attrs'.
12369
12370 2004-09-23  Martin Baulig  <martin@ximian.com>
12371
12372         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
12373
12374 2004-09-23  Martin Baulig  <martin@ximian.com>
12375
12376         * object-internals.h (GenericParameterAttributes): New enum.
12377
12378 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12379
12380         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
12381         
12382         * class.c (init_events): Fill out event->other field.
12383
12384         * class.c: Fix warnings.
12385
12386         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
12387
12388 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12389
12390         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
12391         walk which doesn't supply the IL offset.
12392
12393 2004-09-22  Martin Baulig  <martin@ximian.com>
12394
12395         * reflection.c (mono_reflection_setup_internal_class): If we're
12396         System.ValueType, System.Object or System.Enum, set
12397         `klass->instance_size' and create the vtable.
12398         (mono_reflection_create_internal_class): If we're an enum type,
12399         get the base class from our current corlib.
12400
12401 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
12402
12403         * reflection.h (MonoResolveTokenError): New type.
12404
12405         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
12406         icall.
12407
12408         * icall.c: Add an 'error' argument to the ResolveToken icalls.
12409
12410 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
12411
12412         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
12413         Support also calling constructors, but only for already allocated objects.
12414
12415 2004-09-17  Geoff Norton <gnorton@customerdna.com>
12416
12417         * reflection.c (type_get_qualified_name): If the klass is null
12418         return the typename to avoid a NullRefEx.
12419         (encode_cattr_value): Get the qualified name of the boxed type,
12420         not the underlying enumtype.  Fixes #62984.
12421
12422 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
12423
12424         * marshal.c: Fix problems with previous checkin.
12425
12426 2004-09-21    <vargaz@freemail.hu>
12427
12428         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
12429         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
12430
12431         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
12432
12433 2004-09-21  Geoff Norton <gnorton@customerdna.com>
12434
12435         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
12436         should only return a type for pointers, arrays, and passbyref types.
12437         Fixes bug #63841.
12438
12439 2004-09-21  Martin Baulig  <martin@ximian.com>
12440
12441         * domain.c (mono_debugger_check_runtime_version): New public
12442         function.
12443
12444         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
12445
12446 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
12447
12448         * reflection.c: Added missing sort to the declarative security 
12449         attributes table. MS implementation stops seeing the attributes if the
12450         token number regress in the table (as shown by ildasm and permview).
12451
12452 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
12453
12454         * object-internals.h (MonoReflectionModule): Add 'token' field.
12455         
12456         * reflection.c (mono_reflection_get_token): Add support for Module
12457         and Assembly.
12458         (mono_module_get_object): Set 'token' field.
12459         (mono_module_file_get_object): Set 'token' field.
12460
12461         * icall.c: Add new Assembly and Module icalls.
12462
12463         * appdomain.c: Bump corlib version.
12464
12465 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
12466
12467         * loader.h loader.c class.h class.c: Add helper functions for obtaining
12468         tokens of metadata objects.
12469
12470         * reflection.h reflection.c (mono_reflection_get_token): New function
12471         to obtain the token of a metadata object.
12472
12473         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
12474
12475 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12476
12477         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
12478         
12479         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
12480
12481 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
12482
12483         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
12484         * object-internals.h: Added 3 MonoArray* members to MonoReflection
12485         AssemblyBuilder to access the permissions set in the class lib.
12486         * reflection.c: Added security attributes encoding step in 
12487         mono_image_build_metadata.
12488         * tabledefs.h: Added new security actions defined in 2.0:
12489         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
12490
12491 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
12492
12493         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
12494         macro parameter.
12495
12496 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
12497  
12498         * locales.c: nullify the ICU_collator member of CompareInfo when it is
12499           finalized. There where random SIGSEVs at program termination, when
12500           an object being finalized was trying to do a string comparison and
12501           the current culture was already finalized.
12502  
12503 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12504
12505         * threads.c: call thread_cleanup before finishing the thread if we get
12506         there.
12507
12508 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
12509
12510         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
12511         assemblies from the parent. Fixes #65665.
12512
12513 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
12514
12515         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
12516         modifiers.
12517
12518 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
12519
12520         * reflection.h: add prototype for mono_get_dbnull_object
12521         * reflection.c: add prototypes for get_default_param_value_blobs 
12522         and mono_get_object_from_blob for fussier compilers
12523
12524 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
12525  
12526         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
12527         false deadlock checks in class initialization.
12528  
12529 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12530
12531         * image.c (mono_image_addref): Fix comment.
12532
12533         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
12534         possible.
12535
12536 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
12537
12538         * reflection.c (mono_param_get_objects): Modified to return
12539         ParameterInfo.DefaultValue object.
12540
12541         (get_default_param_value_blobs):
12542         (mono_get_object_from_blob):
12543         (mono_get_dbnull_object): New helper routines. 
12544
12545         * object.c (mono_get_constant_value_from_blob): New helper routine
12546         carved out from get_default_field_value ()
12547
12548         * object-internals.h (mono_get_constant_value_from_blob): Added
12549         function declaration.
12550
12551 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12552
12553         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
12554         referenced assemblies. Fixes #62135.
12555
12556         * exception.h exception.c (mono_get_exception_file_not_found2): New
12557         helper function.
12558
12559 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12560
12561         * class.h class.c: Add mono_type_get_underlying_type ().
12562
12563 2004-09-09  Geoff Norton <gnorton@customerndna.com>
12564
12565         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
12566         Fix GetTypes() to support dynamically created assemblies.
12567
12568 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
12569
12570         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
12571         
12572         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
12573         previous patch.
12574
12575         * reflection.h reflection.c loader.c: Allow dynamic construction of
12576         pinvoke methods. Fixes #65571.
12577         
12578         * reflection.c (mono_reflection_get_type): Revert previous change since
12579         it causes regressions.
12580
12581 2004-09-08  Martin Baulig  <martin@ximian.com>
12582
12583         * class.c (class_compute_field_layout): Don't call
12584         mono_class_layout_fields() for open generic instances.
12585
12586 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
12587         * threads.c appdomain.c: fix typo in GC macro
12588
12589 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12590
12591         * threads.c: don't call mono_thread_detach() in start_wrapper(),
12592         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
12593
12594 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
12595
12596         * image.c (mono_image_close): Applied patch from 
12597         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
12598         assembly is loaded multiple times from data.
12599         
12600         * image.c (mono_image_open): Fix warning.
12601
12602 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12603
12604         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
12605         once. Fixes #58334.
12606         
12607         * reflection.c (mono_reflection_create_runtime_class): Initialize
12608         klass->nested_classes. Fixes #61224.
12609
12610 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12611
12612         * threads.c: sched_yield() on exit, to allow threads to quit.
12613
12614 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12615
12616         * object.c (mono_unhandled_exception): Remove leftover debug code.
12617
12618 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
12619
12620         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
12621
12622 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12623
12624         * marshal.c (emit_marshal_array): Really null terminate string arrays.
12625         
12626         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
12627
12628 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12629
12630         * marshal.c (emit_marshal_array): Null terminate string arrays.
12631         
12632         * marshal.c (raise_auto_layout_exception): Fix warning.
12633
12634         * reflection.c (mono_param_get_objects): Initialize the default value
12635         with DBNull.Value, not null. Fixes #62123.
12636
12637 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
12638
12639         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
12640         throw an exception with a cute explanation.
12641
12642 2004-09-06  Dick Porter  <dick@ximian.com>
12643
12644         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
12645         Close the new process's thread handle, as we don't use it.  The
12646         handle stays around forever otherwise.
12647
12648 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12649
12650         * object.c (arith_overflow): Fix warning.
12651
12652         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
12653         calling conventions in method refs. Fixes #65352.
12654
12655         * reflection.c: Fix warnings.
12656
12657 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
12658
12659         * icall.c: Add a new icall for Array.Clear
12660
12661 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
12662
12663         * object.c: When allocating an array, we have to throw
12664         an overflow exception if any of the lengths are < 0.
12665
12666 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12667
12668         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
12669         properly. Also move implementation of string array marshalling to 
12670         managed code. Fixes #42316.
12671
12672 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12673
12674         * assembly.c: provide more information when loading an assembly fails.
12675
12676 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12677
12678         * filewatcher.c: don't expect the development fam package to be
12679         installed.
12680
12681 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
12682
12683         * marshal.c: Make a copy of the signature cookie since it will be
12684         freed by the caller.
12685         
12686         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
12687
12688         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
12689
12690         * metadata.c (mono_metadata_free_marshal_spec): New function to free
12691         marshal specs.
12692
12693         * marshal.c: More refactoring.
12694         
12695         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
12696         smaller functions.
12697
12698 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
12699
12700         * object.c: In mono_message_invoke, fill the output parameter array after
12701           calling the managed method (it was done before the call). This fixes
12702           bug #59299.
12703
12704 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12705
12706         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
12707         as well.
12708
12709 2004-09-02  Martin Baulig  <martin@ximian.com>
12710
12711         * class.c (mono_class_instance_size): Don't allow generic type
12712         definitions or open generic instances.
12713         (mono_class_array_element_size): If we're a value type, call
12714         mono_class_instance_size() on the original class.
12715
12716         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
12717         handle generic instances.
12718
12719         * mono-debug-debugger.c (write_type): Handle generic instances
12720         like classes.
12721
12722 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12723
12724         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
12725         the allocation request fails. Fixes #65089.
12726
12727         * object.c (mono_runtime_free_method): Do not call mono_free_method.
12728         
12729         * object.c (mono_runtime_free_method): New function to free a dynamic
12730         method.
12731
12732         * marshal.c (mono_delegate_free_ftnptr): New function to free the
12733         delegate trampoline.
12734
12735         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
12736         with hasthis as dynamic,
12737
12738         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
12739
12740         * domain.c (mono_jit_info_table_remove): New function to remove an
12741         entry from the jit info table.
12742
12743         * class-internals.h (MonoMethod): Add 'dynamic' field.
12744
12745         * loader.c: Fix warnings.
12746
12747 2004-09-01  Martin Baulig  <martin@ximian.com>
12748
12749         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
12750         instead of mono_debugger_lock() because the latter one is a no-op
12751         unless running in the debugger.
12752
12753 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
12754
12755         * class.c (class_compute_field_layout): Classes with auto-layout or
12756         reference fields are not blittable.
12757         
12758 2004-09-01  Dick Porter  <dick@ximian.com>
12759
12760         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
12761         mono_image_get_filename() to get the assembly location.
12762
12763         * icall.c:
12764         * metadata.h: Fix compile warnings
12765
12766 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
12767
12768         * class.c (class_compute_field_layout): System.Object is blittable.
12769
12770         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
12771         as in/out. Fixes #59909.
12772
12773 2004-09-01  Martin Baulig  <martin@ximian.com>
12774
12775         * metadata.h (MONO_TYPE_ISREFERENCE): Call
12776         mono_metadata_generic_inst_is_valuetype() if we're a generic
12777         instance to check whether our underlying type is a reference type.
12778
12779 2004-09-01  Martin Baulig  <martin@ximian.com>
12780
12781         * metadata.c (mono_type_size): If we're a generic instance, call
12782         mono_class_value_size() for value types.
12783
12784 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
12785
12786         * marshal.c: Implement more custom marshalling functionality. Fixes
12787         #64915.
12788
12789 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12790
12791         * mono-debug.c, debug-mono-symfile.c: add some locking love.
12792
12793 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12794
12795         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
12796
12797         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
12798
12799         * icall.c: Fix some warnings.
12800
12801         * threads.c (abort_appdomain_thread): Fix unref errors.
12802         (mono_thread_current): Fix THREAD_DEBUG define.
12803
12804 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12805
12806         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
12807
12808         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
12809
12810 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
12811
12812         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
12813         string arrays.
12814
12815 2004-08-28  Martin Baulig  <martin@ximian.com>
12816
12817         * metadata.c
12818         (mono_metadata_generic_inst_is_valuetype): New public function.
12819
12820         * metadata.h (MONO_TYPE_ISSTRUCT): Call
12821         mono_metadata_generic_inst_is_valuetype() if we're a generic
12822         instance to check whether our underlying type is a valuetype.
12823
12824 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12825
12826         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
12827         #63768.
12828
12829 2004-08-25  Martin Baulig  <martin@ximian.com>
12830
12831         * loader.c (mono_get_method_from_token): Abstract methods can also
12832         be generic and thus have type parameters.
12833
12834         * metadata-internals.h
12835         (MonoDynamicImage): Added `GPtrArray *gen_params'.
12836
12837         * reflection.c (mono_image_get_generic_param_info): Don't create a
12838         metadata row, just add an entry to the `gen_params' array.
12839         (build_compressed_metadata): Sort the `gen_params' array and then
12840         actually create the metadata.
12841
12842 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12843
12844         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
12845
12846 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12847
12848         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
12849
12850 2004-08-24  Martin Baulig  <martin@ximian.com>
12851
12852         * class.cs (mono_class_is_subclass_of): Like an interface, a
12853         generic instance also derives from System.Object.
12854
12855 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12856
12857         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
12858         custom modifiers to be in any order. Fixes #61990.
12859
12860 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12861
12862         * object.c: Register mono_object_new_fast icall.
12863         
12864         * object.c (mono_class_get_allocation_ftn): Return to calling
12865         mono_object_new_fast, since it seems faster to compute the object 
12866         size in unmanaged code than passing it as a parameter.
12867
12868         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
12869
12870         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
12871         this function with Boehm as the oom handler, so we don't have to check
12872         the result of GC_malloc.
12873
12874         * object.c: Remove checks for oom.
12875
12876         * object.h object.c (mono_class_get_allocation_ftn): New function to
12877         return the icall which can be used to allocate an instance of a given
12878         class. 
12879
12880         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
12881
12882         * class-internals.h: Add 'enabled' field.
12883
12884 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
12885
12886         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
12887
12888 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
12889         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
12890         value 0x0010.
12891
12892 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12893
12894         * appdomain.c: use the Tls function for appdomain too,
12895         at Zoltan's request. Actually return in mono_context_get
12896
12897         * appdomain.c, profiler.c, threads.c: use __thread
12898
12899 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12900
12901         * appdomain.c threads.c: Call GC_CreateThread on windows.
12902
12903         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
12904         multiple libraries since this don't work on windows.
12905
12906 2004-08-18  Martin Baulig  <martin@ximian.com>
12907
12908         * class-internals.h
12909         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
12910         MonoMethodHeader.
12911
12912         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
12913         MonoMethodNormal since we also need it for abstract and interface
12914         methods.
12915
12916         * reflection.c
12917         (build_compressed_metadata): Sort the GenericParam table.
12918         (mono_image_create_token): Added `gboolean create_methodspec'
12919         argument; this is false when generating a MethodImpl token.
12920         (reflection_methodbuilder_to_mono_method): Abstract and interface
12921         methods may also have generic parameters.
12922
12923 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12924
12925         * appdomain.c: thread local alloc
12926
12927 2004-08-17  Martin Baulig  <martin@ximian.com>
12928
12929         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
12930
12931         * icall.c
12932         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
12933         argument.
12934
12935         * class.c (mono_type_get_full_name): New public function.
12936         (mono_type_get_name): Don't include the type arguments.
12937
12938 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12939
12940         * Makefile.am: Build static versions of libmetadata and libmonoruntime
12941         for inclusion into the mono executable.
12942
12943 2004-08-16  Martin Baulig  <martin@ximian.com>
12944
12945         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
12946         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
12947
12948 2004-08-14  Martin Baulig  <martin@ximian.com>
12949
12950         * class.c (dup_type): Also copy the `byref' field.
12951
12952 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12953
12954         * reflection.c (create_dynamic_mono_image): Revert the last change 
12955         since it breaks bootstrap.
12956
12957 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12958
12959         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
12960
12961         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
12962         not free them with g_free.
12963
12964 2004-08-11  Martin Baulig  <martin@ximian.com>
12965
12966         * reflection.c (mono_reflection_setup_internal_class): Also call
12967         mono_class_setup_mono_type() if we already have a `tb->type.type'.
12968
12969 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
12970
12971         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
12972         called during default (first) AppDomain creation. Keep track of
12973         Evidence when loading assemblies.
12974
12975 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12976
12977         * opcodes.c, opcodes.h: reduce runtime relocations.
12978
12979 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
12980
12981         * culture-info.h, locales.c: fixes and chages to sue the new
12982         optimized format of the locale data.
12983         * culture-info-tables.h: regenerated.
12984
12985 2004-08-06  Geoff Norton <gnorton@customerdna.com>
12986         
12987         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
12988
12989 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
12990
12991         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
12992         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
12993         * domain-internals.h: icall declaration.
12994         * icall.c: icall registration.
12995         * object-internals.h: New fields in MonoAssembly for CAS.
12996
12997 2004-08-05  Duncan Mak  <duncan@ximian.com>
12998
12999         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13000         CEE_LDELEM_ANY.
13001
13002 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13003
13004         * reflection.c: fix to deal with object[] arrays in custom ctors
13005         (bug #62550).
13006
13007 2004-08-05  Martin Baulig  <martin@ximian.com>
13008
13009         * class.c (mono_class_array_element_size): Added support for
13010         generic instances and correctly handle "recursive" types.
13011
13012 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13013
13014         * assembly.c: Fix warnings.
13015
13016 2004-08-04  Martin Baulig  <martin@ximian.com>
13017
13018         * class.c
13019         (mono_type_get_name_recurse): Added `gboolean include_arity'
13020         argument specifying whether or not we should include the generic
13021         arity in the type name.
13022         (_mono_type_get_name): New static function.
13023         (mono_class_setup_vtable): If we're a generic instance, don't
13024         include the generic arity in the names of explicit method
13025         implementations.        
13026
13027 2004-08-03  Martin Baulig  <martin@ximian.com>
13028
13029         * class.c (mono_type_get_name_recurse): Enclose the generic type
13030         arguments in `<', '>'.
13031
13032 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13033
13034         * gc.c: make GC warning messages use the trace API, they are just
13035         noise to most of the users.
13036
13037 2004-08-03  Martin Baulig  <martin@ximian.com>
13038
13039         * debug-mono-symfile.c (read_string): Correctly read the string.
13040
13041 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13042
13043         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
13044         
13045         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
13046         icalls.
13047         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
13048
13049 2004-07-30  Martin Baulig  <martin@ximian.com>
13050
13051         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
13052         Reflect latest symbol writer changes.   
13053
13054 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13055
13056         * object.c: always create an object if null is passed
13057         to Invoke() where a valuetype is expected.
13058
13059 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13060
13061         * marshal.c (mono_marshal_init): make managed
13062         signatures match native ones better for 64bits.
13063
13064 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13065
13066         * appdomain.c: hack to build correctly the private bin path on windows.
13067         Fixes bug #61991.
13068
13069 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13070
13071         * assembly.c: Load mscorlib from the correct framework directory
13072           (mono/<version>/mscorlib.dll).
13073         * appdomain.h: Added prototypes for new functions.
13074         * internals.h: Added some prototypes.
13075         * domain.c: When initializing the runtime, get from the executable and
13076           the configuration files the runtime version that the app supports.
13077           Added support methods for reading app.exe.config. Added list of versions
13078           supported by the JIT. Added two new methods: mono_init_from_assembly,
13079           which initializes the runtime and determines the required version from
13080           the provided exe file, and mono_init_version, which initializes
13081           the runtime using the provided version.
13082         * icall.c: Get machine.config from version-specific directory.
13083         * reflection.c: When generating an image, embed the version number
13084           of the current runtime.
13085
13086 2004-07-28  Dick Porter  <dick@ximian.com>
13087
13088         * socket-io.c
13089         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
13090         returned sockaddr size before creating the remote address object.
13091         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
13092         61608.
13093
13094 2004-07-28  Dick Porter  <dick@ximian.com>
13095
13096         * locales.c (string_invariant_compare_char): Fix invariant char
13097         compares between upper and lower cases.  Fixes bug 61458.
13098
13099 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
13100         
13101         * marshal.c: actually cache stelem.ref wrappers.
13102         
13103 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13104
13105         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
13106         sections and remove the mono_cli_rva_map () function.
13107
13108 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13109
13110         * debug-mono-symfile.c: fix one more endianess issue, from a patch
13111         by Geoff Norton (<gnorton@customerdna.com>).
13112
13113 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13114
13115         * class.c: fix class loads for pointer types (typeof(int) !=
13116         typeof(int*)).
13117
13118 2004-07-27  Martin Baulig  <martin@ximian.com>
13119
13120         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
13121         reading the debugging information from an external ".mdb" file.
13122
13123 2004-07-24  Martin Baulig  <martin@ximian.com>
13124
13125         * reflection.c (mono_image_get_type_info): Only write a class
13126         layout entry if we actually have a size or a packing size.
13127
13128 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
13129
13130         * reflection.c (type_get_fully_qualified_name): 
13131         insert cast to get type checking of ?: with non-gcc compilers
13132
13133 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
13134
13135         * rand.c: use g_getenv for both lookups of
13136         MONO_EGD_SOCKET
13137
13138 2004-07-17  Martin Baulig  <martin@ximian.com>
13139
13140         * reflection.c (mono_reflection_bind_generic_method_parameters):
13141         Set `gmethod->reflection_info'.
13142
13143 2004-07-17  Martin Baulig  <martin@ximian.com>
13144
13145         * class.c (mono_class_create_from_typedef): Insert the newly
13146         created class into the hash table before computing the interfaces
13147         since we could be called recursively.
13148
13149 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
13150
13151         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
13152         function to implement stelem.ref in managed code
13153         * class-internals.h, debug-helpers.c: a new wrapper type
13154         for the above.
13155
13156 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13157
13158         * gc.c: allow GC handles to work even when no GC is compiled in.
13159         Fix part of bug #61134 (GetAddrOfPinnedObject).
13160
13161 2004-07-13  Peter Williams  <peter@newton.cx>
13162  
13163         * process.c (complete_path): Make sure we don't attempt to execute
13164         directories.
13165  
13166 2004-07-12  Geoff Norton <gnorton@customerdna.com>
13167
13168         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
13169           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
13170           and will add/subtract the hour if needed
13171
13172 2004-07-12  Martin Baulig  <martin@ximian.com>
13173
13174         * reflection.c (mono_field_get_object): If we have
13175         `field->generic_info', take the attributes from
13176         `field->generic_info->generic_type'.    
13177
13178 2004-07-12  Martin Baulig  <martin@ximian.com>
13179
13180         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
13181         This function must be called before initializing the runtime.
13182         (mono_debug_init_1): New function; call this after initializing
13183         the runtime, but before loading the assembly.  It tells the
13184         debugger to load corlib and the builtin types.
13185
13186         * mono-debug-debugger.c: Did some larger changes in the debugging
13187         code; support recursive class declarations, make sure we actually
13188         add all classes.
13189
13190 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13191
13192         * debug-helpers.c: undo my previous patch and fixed the real issue in
13193         ../mini/exceptions-x86.c
13194
13195 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13196
13197         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
13198         when no HOME env. variable was set and a NullRef was thrown in a .cctor
13199         called from other .cctors.
13200
13201 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
13202
13203         * loader.c: Removed the mono_loader_wine_init hack now that we are
13204         doing a managed version of Windows.Forms.
13205
13206 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
13207
13208         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
13209         threadpool.c, threads.c: remove static data from rootset.
13210
13211 2004-07-09  Dick Porter  <dick@ximian.com>
13212
13213         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
13214         Don't do any more processing if the matched length was 0.  It was
13215         increasing the size of the string before.  Fixes bug 61167.
13216
13217 2004-07-09  Dick Porter  <dick@ximian.com>
13218
13219         * socket-io.h:
13220         * socket-io.c
13221         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13222         Add support for SO_PEERCRED if its available.
13223
13224 2004-07-09  Peter Bartok <pbartok@novell.com>
13225         * loader.c: winelib.exe.so error message is now only displayed if
13226         MONO_DEBUG is set. To help us avoid questions when people are trying
13227         out the new Managed.Windows.Forms.
13228
13229 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
13230
13231         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
13232         for isinst and castclass wrappers.
13233
13234         * class-internals.h icall.c: Move registration and lookup of JIT icalls
13235         to libmetadata from the JIT, so they could be used by the marshalling
13236         code and the interpreter.
13237
13238         * marshal.c: Register marshalling related JIT icalls here instead of
13239         in mini.c. Use CEE_MONO_ICALL instead of the family of 
13240         CEE_MONO_PROC<x> opcodes to call marshalling functions.
13241
13242         * metadata.h: Remove unneeded marshalling conversions.
13243
13244         * opcodes.c: Update for new opcodes.
13245         
13246 2004-07-08  Martin Baulig  <martin@ximian.com>
13247
13248         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
13249         (mono_debug_get_domain_data): Make this function static.
13250
13251 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13252
13253         * gc.c, object.h: add nice GC handle API for embedders.
13254
13255 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13256
13257         * reflection.c: more changes for the new api
13258
13259         * object.c: When we reflect on a field w/ a constant value, it
13260         will not have a memory location, so we must access metadata. Also,
13261         allow easier reading of strings so that we can read them from
13262         the constant data.
13263
13264         * class.c (mono_class_layout_fields): no need for literal fields here.
13265
13266         * class-internals.h: api changes for const fields
13267
13268         * icall.c (ves_icall_get_enum_info): use new apis for const fields
13269
13270 2004-07-06  Martin Baulig  <martin@ximian.com>
13271
13272         * mono-debug.h: Increment version number to 44.
13273
13274         * mono-debug.c (mono_debug_add_wrapper): The second argument is
13275         now a gpointer, rewrote this whole method.
13276
13277         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
13278         function.  Add information about the wrapper in a new "misc table".
13279
13280         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
13281         for the new misc table.
13282
13283 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13284
13285         * metadata-internals.h image.c: Add a cache for helper signatures.
13286
13287         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
13288
13289 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13290
13291         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
13292         delegates from a delegate. Fixes #61033.
13293         
13294         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
13295         marshalling of stringbuilder arrays. Fixes #59900.
13296
13297 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13298
13299         * icall.c: Add EnumBuilder:setup_enum_type icall.
13300
13301 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13302
13303         * icall.c: Added a new icall for the property version of
13304         OffsetOfStringData.
13305
13306 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13307
13308         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
13309         it has a constant size across platforms.
13310
13311         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
13312         stack trace.
13313
13314 2004-06-29  Martin Baulig  <martin@ximian.com>
13315
13316         * mono-debug.c (mono_debug_add_method): Protect the whole function
13317         in mono_debugger_lock(), not just parts of it.
13318
13319 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13320
13321         * reflection.c: make sure padding bytes in heaps are zeroed.
13322
13323 2004-06-24  David Waite  <mass@akuma.org>
13324
13325         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
13326         image.c, loader.c, locales.c, marshal.c, metadata.c,
13327         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
13328         string-icalls.c, threads.c: change to C90-style comments from C99 /
13329         C++ -style
13330
13331 2004-06-24  Dick Porter  <dick@ximian.com>
13332
13333         * threads.c
13334         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
13335         return createdNew.  Fixes bug 60412.
13336
13337         * threads-types.h: 
13338         * icall.c: Add createdNew parameter to CreateMutex icall
13339
13340 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13341
13342         * reflection.c, object-internals.h: save default value in params.
13343
13344 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13345
13346         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
13347         no need to build a new path combining that with the application base.
13348         Fixes bug #60442.
13349
13350 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13351
13352         * reflection.c: fixed minor standard compliance issues.
13353
13354 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13355
13356         * reflection.c: fixed issue with encoding some custom attributes
13357         (arrays in properties and fields, bug #60411).
13358
13359 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13360
13361         * reflection.c: fix start address when copying the public key token.
13362
13363 2004-06-23  Martin Baulig  <martin@ximian.com>
13364
13365         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
13366         the `exc' object in a static object to put it into the GC's root set.
13367
13368 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13369
13370         * reflection.c: make mono_reflection_setup_internal_class ()
13371         callable a second time to setup a new parent class.
13372
13373 2004-06-23  Dick Porter  <dick@ximian.com>
13374
13375         * threads.c: Check for WAIT_IO_COMPLETION return values.
13376
13377 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
13378
13379         * appdomain.c: Removed the g_free on the public key token. Now copy 
13380         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
13381         * assembly.c: Added public key token string value when loading 
13382         assemblies. Fix bug #60439.
13383         * icall.c: Added missing informations (like public key) in 
13384         GetReferencedAssemblies. Fix #60519.
13385         * image.h: Changed definition for public key token from const char*
13386         public_tok_value to guchar public_key_token [17];
13387         * reflection.c: Updated for changes to public key token.
13388
13389 2004-06-22  Lluis Sanchez Gual
13390
13391         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
13392         for the field in base classes.
13393
13394 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13395
13396         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
13397         mark headers as not supported, they are installed only for use by the
13398         debugger.
13399
13400 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
13401
13402         * *.c, *.h: avoid namespace pollution in public headers.
13403
13404 2004-06-21  Martin Baulig  <martin@ximian.com>
13405
13406         * exception.c (mono_get_exception_security): It's in
13407         "System.Security", not in "System".
13408
13409         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
13410         the exception classes.
13411
13412 2004-06-21  Martin Baulig  <martin@ximian.com>
13413
13414         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
13415         Protect the exception object from being finalized.
13416
13417 2004-06-21  Martin Baulig  <martin@ximian.com>
13418
13419         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
13420         public function.
13421
13422 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
13423
13424         * reflection.c: Load the assembly in mono_reflection_type_from_name,
13425         if it was not loaded before. Fix parts of #60439.
13426
13427 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
13428
13429         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
13430         code that was broken since Ben's change: wrappers are now
13431         dependent on the method signature only again.
13432
13433 2004-06-21  Martin Baulig  <martin@ximian.com>
13434
13435         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
13436         added interface support.
13437
13438 2004-06-21  Martin Baulig  <martin@ximian.com>
13439
13440         * class.c (mono_vtable_get_static_field_data): New public method.
13441
13442 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
13443
13444         * filewatcher.c : Windows build fix to be compliant with API changes.
13445
13446 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13447
13448         * class.h, class.c: more accessors.
13449         * metadata.h, metadata.c: prepare for hiding MonoType and
13450         MonoMethodSignature: people should use the accessors from now on
13451         outside of the tree.
13452
13453 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13454
13455         * *.c, *.h: more API cleanups.
13456
13457 2004-06-18  Jackson Harper  <jackson@ximian.com>
13458
13459         * assembly.c: Trace loading assemblies.
13460         * loader.c: Trace loading native libraries.
13461         * mono-config.c: Trace loading config files.
13462         
13463 2004-06-18  Dick Porter  <dick@ximian.com>
13464
13465         * locales.c: Tell ICU the lengths of strings, it can cope with
13466         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
13467
13468 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13469
13470         * image.c: swapped name/filename;
13471
13472 2004-06-18  Martin Baulig  <martin@ximian.com>
13473
13474         * mono-debug-debugger.c (write_class): Write the parent class at
13475         the end of the header.
13476
13477 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13478
13479         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
13480
13481 2004-06-17  Raja R Harinath  <rharinath@novell.com>
13482
13483         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
13484         (bundle_obj): New conditional define.
13485         (BUILT_SOURCES): Remove.
13486         ($(bundle_srcs)): Make parallel-make safe.
13487         (libmonoruntime_la_LIBADD): Make unconditional.
13488         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
13489         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
13490
13491 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
13492
13493         * culture-info-tables.h: It was inconsistent with the latest
13494           supp info files.
13495
13496 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
13497
13498         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
13499         be loaded.
13500
13501         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
13502         with gcc 2.95.
13503
13504 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13505
13506         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
13507         cleaned up public header threads.h.
13508
13509 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13510
13511         * Makefile.am, *.c, *.h: more API cleanups.
13512
13513 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13514
13515         * Makefile.am: removed monosn from compilation.
13516         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
13517         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
13518         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
13519         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
13520         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
13521         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
13522
13523 2004-06-15  Jackson Harper  <jackson@ximian.com>
13524
13525         * assembly.c: Make locales lower case when searching the GAC for
13526         assemblies. gacutil will always make locales lowercase when
13527         installing so this effectively makes them case insensitive.
13528         
13529 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
13530
13531         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
13532         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
13533           parameter which allows to choose whether the wait can be interrupted or 
13534           not. Also added the method mono_monitor_enter(), which locks the monitor
13535           using an infinite wait and without allowing interruption.
13536           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
13537           interrupted.
13538         * object.h: Added new fields in MonoThread. suspend_event holds the event
13539           used to susped/resume the thread. synch_lock is the lock object to use for
13540           modifying the thread state.
13541         * threads.c: Use the new synch_lock object for locking, instead of "this",
13542           which can generate deadlocks.
13543           Moved thread state change in Thread.Sleep and Thread.Join from managed
13544           to unmanaged code. This avoids a deadlock when the thread was suspended
13545           just after acquiring the thread lock.
13546           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
13547           Implemented Thread.Suspend using an event instead of ThreadSuspend,
13548           which is not fully implemented in the io-layer.
13549         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
13550
13551 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
13552
13553         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
13554         threads-types.h: more API cleanups.
13555
13556 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13557
13558         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
13559         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
13560         threadpool.c, threads.c: first pass at the exported API cleanup.
13561
13562 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13563
13564         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
13565
13566 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13567
13568         * icall.c: added internalGetHome.
13569
13570 2004-06-14  Dick Porter  <dick@ximian.com>
13571
13572         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
13573         possible to return successfully when '.' or '..' were the only
13574         entries in a directory, but were skipped.  The MonoIOStat was not
13575         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
13576         Fixes bug 59574.
13577
13578 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13579
13580         * reflection.c: make binaries run on .Net 1.1 by default.
13581
13582 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13583
13584         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
13585
13586 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
13587
13588         * marshal.c: keep track of struct size with explicit layout
13589         (bug #59979).
13590
13591 2004-06-12  Martin Baulig  <martin@ximian.com>
13592
13593         * mono-debug-debugger.c: Comment out a debugging g_message().
13594
13595 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13596
13597         * reflection.c, reflection.h: do not free custom attrs that are cached.
13598         * icall.c: use braces to make code clearer.
13599
13600 2004-06-11  Martin Baulig  <martin@ximian.com>
13601
13602         * class.h (MonoInflatedField): New type.
13603         (MonoClassField): Replaced `MonoType *generic_type' with
13604         `MonoInflatedField *generic_info'.
13605
13606         * icall.c
13607         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
13608
13609 2004-06-11  Martin Baulig  <martin@ximian.com>
13610
13611         * reflection.c (mono_image_create_method_token): Correctly encode
13612         varargs methods.
13613
13614 2004-06-11  Martin Baulig  <martin@ximian.com>
13615
13616         * metadata.c (mono_metadata_parse_method_signature): When parsing
13617         a MethodDef which has VarArgs, also set sentinelpos if we don't
13618         have any parameters.
13619
13620 2004-06-11  Martin Baulig  <martin@ximian.com>
13621
13622         * verify.c (mono_method_verify): In CEE_CALL, use
13623         mono_method_get_signature() to get the method's signature, unless
13624         we're a PInvoke method.
13625
13626 2004-06-10  Jackson Harper  <jackson@ximian.com>
13627
13628         * assembly.c: Use <path>/lib/mono/gac for the extra paths
13629         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
13630         logical name as the supplied path is just a prefix to the gac not
13631         the direct path to it.
13632         
13633 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
13634
13635         * reflection.c: make the token for a created method match
13636         the token of the MethodBuilder it was created from
13637         (IKVM requires this behaviour now).
13638
13639 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
13640
13641         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
13642         reflection.c, socket-io.c: leak fixes.
13643
13644 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13645
13646         * icall.c: handle sentinel pos in vararg methods in position different
13647         from 0.
13648
13649 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13650
13651         * culture-info-tables.h: freshly generated.
13652
13653 2004-06-09  Martin Baulig  <martin@ximian.com>
13654
13655         * loader.c (mono_get_method_constrained): Call `mono_class_init
13656         (constrained_class)'.   
13657
13658 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
13659
13660         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
13661         any methods. Fixes #59629.
13662
13663 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
13664
13665         * culture-info-tables.h: reflecting locale-builder updates.
13666
13667 2004-06-08  Dick Porter  <dick@ximian.com>
13668
13669         * object.h:
13670         * locales.c: Fixed compile warnings, including a real bug in
13671         CompareInfo_internal_compare.
13672         
13673 2004-06-08  Dick Porter  <dick@ximian.com>
13674
13675         * locales.c
13676         (ves_icall_System_Globalization_CompareInfo_internal_index):
13677         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
13678         Double-check the resuls of usearches, because ICU currently
13679         ignores most of the collator settings here.  Fixes bug 59720.
13680         
13681 2004-06-08  Dick Porter  <dick@ximian.com>
13682
13683         * locales.c
13684         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
13685         Fix memory leak and segfault-causing typo.  No idea how this one
13686         lasted so long without being noticed.
13687
13688 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
13689
13690         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
13691         any methods. Fixes #59629.
13692
13693 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13694
13695         * assembly.c:
13696         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
13697         own the critical section before). Removed dead code (that's done
13698         in the preload hook).
13699
13700         (mono_assembly_load_with_partial_name): call the preload hook.
13701
13702 2004-06-08  Martin Baulig  <martin@ximian.com>
13703
13704         * metadata.c (mono_metadata_signature_alloc): Default
13705         `sentinelpos' to -1.
13706
13707         * reflection.c (mono_image_get_array_token): Likewise.
13708
13709 2004-06-08  Martin Baulig  <martin@ximian.com>
13710
13711         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
13712
13713         * metadata.c (mono_metadata_parse_method_signature): When parsing
13714         a MethodDef which has VarArgs, set sentinelpos.
13715
13716         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
13717         `gint16' since we're using -1 for non-varargs methods.
13718
13719         * reflection.c
13720         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
13721         (method_encode_signature): Added varargs support.
13722         (method_builder_encode_signature): Likewise.
13723         (mono_image_get_varargs_method_token): New static method.
13724         (mono_image_create_method_token): New public method; this is
13725         called via an icall instead of mono_image_create_token() when
13726         calling a varargs method.       
13727
13728 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
13729
13730         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
13731
13732 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
13733
13734         * culture-info-tables.h : Reflecting the latest locale-builder that
13735           fixed empty array representation ({} to {0}).
13736
13737 2004-06-07  Jackson Harper  <jackson@ximian.com>
13738
13739         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
13740         looking up extra gac paths. This allows MONO_GAC_PATH to act
13741         exactly like a prefix.
13742         
13743 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
13744
13745         * reflection.c (mono_reflection_type_from_name): Make a copy of the
13746         type name before modifying it. Fixes #59405.
13747
13748 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
13749
13750         * culture-info.h: added fields for "all datetime patterns".
13751         * locales.c: (  ves_icall_System_Globalization_CultureInfo
13752           _construct_datetime_format ()): fill xxx_patterns fields.
13753         * object.h: added fields for "all datetime patterns" to
13754           MonoDateTimeFormatInfo.
13755         * culture-info-tables.h: reflecting locale-builder updates.
13756
13757 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
13758
13759         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
13760         the event has no add and remove methods. Fixes #59629.
13761
13762 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
13763
13764         * object.c: Fixed possible integer overflow when allocating large
13765         strings.
13766
13767 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
13768
13769         * culture-info-tables.h: reflecting locale-builder updates.
13770
13771 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
13772
13773         * culture-info-tables.h: reflecting locale-builder updates.
13774
13775 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
13776
13777         * culture-info-tables.h: reflecting locale-builder updates.
13778
13779 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
13780
13781         * threads.c: Made Thread.Sleep abortable.
13782
13783 2004-06-02  Martin Baulig  <martin@ximian.com>
13784
13785         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
13786
13787         * debug-mono-symfile.h: Bumped symbol file version number to 37.
13788
13789 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
13790
13791         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
13792
13793 2004-05-30  Jackson Harper  <jackson@ximian.com>
13794
13795         * reflection.c: Do not hardcode assembly versions or public key
13796         tokens anymore. All of this except the corlib section was dead
13797         code anyways.
13798         
13799 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13800
13801         * object.c (mono_runtime_invoke_array): Automatically create boxed
13802         objects for byref valuetypes if needed. Fixes #59300.
13803         
13804         * object.c (mono_method_return_message_restore): Handle 
13805         MONO_TYPE_OBJECT as well.
13806
13807 2004-05-28  Jackson Harper  <jackson@ximian.com>
13808
13809         * reflection.c: The modified type encoding was causing build
13810         problems. Reverted for now.
13811         
13812 2004-05-28  Jackson Harper  <jackson@ximian.com>
13813
13814         * reflection.c/h: Take an assembly ref so that we dont create
13815         fully qualified names when encoding types in the same assembly as
13816         the custom attribute being emitted.
13817         * appdomain.c: Increment version number.
13818         
13819 2004-05-26  Duncan Mak  <duncan@ximian.com>
13820
13821         * icall.c
13822         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13823         Set the full version number (major, minor, build, revision).
13824
13825 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
13826
13827         * marshal.c (emit_struct_conv): increment src/dst after blit
13828         (mono_marshal_get_managed_wrapper,
13829         mono_marshal_get_native_wrapper): make sure we have marshalling
13830         info before marshalling params (info computation affects
13831         blittable)
13832
13833         * class.c (class_compute_field_layout): correctly deal with
13834         blittable
13835         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
13836         value types (as per what windows dows by default)
13837         (mono_class_setup_mono_type): System.ValueType is blittable
13838         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
13839         blittable
13840
13841         * marshal.c (mono_marshal_load_type_info): flag types  as
13842         non-blittable if the native layout doesn't match the managed
13843         layout
13844
13845 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13846
13847         * appdomain.c: don't add stuff in the private search path that is
13848         above the application base. If application base is not set, there's
13849         no private search path.
13850
13851 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
13852
13853         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
13854         byref struct arguments in native->managed marshalling.
13855
13856 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
13857
13858         * marshal.c (mono_marshal_get_runtime_invoke): correctly
13859         cache methods using signature (special case for methods
13860         that are value type or string class)
13861         
13862         * image.c (mono_image_close): clean up allocated GSList's
13863         in runtime_invoke_cache.
13864
13865 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13866
13867         * mono-config.c: set the correct path for mono_cfg_dir on windows when
13868         there's no MONO_CFG_DIR environment variable defined.
13869
13870 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13871
13872         * threads.c: windows version must be >= 0x0500 to include OpenThread.
13873
13874 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
13875
13876         * threadpool.c: Really wait for 500ms after the async call, even if the wait
13877           is interrumped.
13878         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
13879           before waiting for it, and call CloseHandle after the wait to unref it.
13880           This will make sure that handles are not disposed too early.
13881
13882 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13883
13884         * appdomain.c:
13885         * appdomain.h:
13886         * icall.c: removed
13887         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
13888         needed now.
13889
13890         * object.c: se the application_base only for the domain that runs
13891         Main. Fixes bug #59216,
13892
13893 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13894
13895         * appdomain.c:
13896         * object.c: only the domain in which Main is run have
13897         SetupInformation.ConfigurationFile set, so moved a few lines from
13898         appdomain.c to object.c.
13899
13900 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13901
13902         * appdomain.c: we tried to load [name].(dll|exe), but according
13903         to bug #57710, we must also try [culture]/[name].(dll|exe) and
13904         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
13905         There's a test case attached to bug #58922.
13906
13907 2004-05-27  Dick Porter  <dick@ximian.com>
13908
13909         * icall.c:
13910         * file-io.c: Implemented icalls for locking and unlocking regions
13911         in a file.
13912         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
13913         FALSE on error (fixes both compiler warning and real bug.)
13914
13915 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
13916
13917         * culture-info-tables.h: reflecting locale-builder updates.
13918
13919           (Added missing ChangeLog entry for 05/26)
13920
13921 2004-05-27  Jackson Harper  <jackson@ximian.com>
13922
13923         * locales.c: Fix some cut and paste errors.
13924         
13925 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13926
13927         * mono-config.c: set the correct path for config. directory on windows.
13928
13929 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
13930
13931         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
13932           on win32.
13933
13934 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13935
13936         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
13937         from pinvoke functions.
13938         
13939         * marshal.c (mono_ftnptr_to_delegate): Implement this.
13940
13941 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
13942
13943         * culture-info-tables.h: reflecting locale-builder updates.
13944
13945 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13946
13947         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
13948         #59086.
13949
13950 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
13951
13952         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
13953         * icall.c: Modified icalls for RNG.
13954         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
13955         Windows (CryptoAPI).
13956
13957 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13958
13959         * locales.c: Fix build.
13960
13961 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
13962
13963         * culture-info-tables.h: reflecting locale-builder updates.
13964
13965 2004-05-25  Jackson Harper  <jackson@ximian.com>
13966
13967         * locales.c: When creating the current culture use the $LANGs
13968         specific culture. So DateTimeFormat and NumberFormat entries are created.
13969         
13970 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13971
13972         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
13973         a char array as parameter.
13974
13975 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
13976
13977         * image.c: In mono_image_open(), always use an absolute path name to
13978           look for already loaded images.
13979
13980 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
13981
13982         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
13983         missing in the windows build (like older cygwin include files).
13984
13985 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
13986
13987         * icall.c: Fixed check for possible integer overflow in Buffer_
13988         BlockCopy icall. Replaced comments style // by /* */.
13989
13990 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13991
13992         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
13993         
13994         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
13995         check after MONO_VTADDR. Fixes pinvoke2.exe.
13996
13997         * marshal.h marshal.c metadata.h: Add beginnings of support for
13998         ftnptr -> delegate marshalling.
13999
14000 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
14001
14002         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
14003         * threads.c: Fix warnings.
14004
14005 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
14006
14007         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
14008         * icall.c: Registered icalls for Suspend and Resume.
14009         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
14010           Thread.Abort.
14011         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
14012         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
14013         * process.c: Use WaitForSingleObjectEx.
14014         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
14015           checkpoints.
14016         * threads.c, threads.h: Make use of new Ex wait methods. Improved
14017           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
14018           for Suspend and Resume. Added new mono_thread_stop, used for stoping
14019           background threads. Added basic support for Abort in Windows.
14020           Start new threads using a managed delegate invoke wrapper. This wrapper
14021           has an interruption checkpoint that is needed since an interruption
14022           can be requested before the thread leaves the unmanaged code that starts 
14023           the thread.
14024         * marshal.c: Added interruption checkpoint after every native call, and
14025           also before managed calls for wrappers called from unmanaged code to
14026           go into managed code.
14027         * object.h: Added new field in MonoThread to keep track of interruption
14028           requests.
14029
14030 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
14031
14032         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
14033         calls.
14034
14035 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14036
14037         * appdomain.c:
14038         * assembly.c:
14039         * gc.c:
14040         * locales.c:
14041         * mono-config.c:
14042         * rand.c: getenv -> g_getenv (windows!)
14043
14044         * process.c: complete_path is also used on non-windows platforms.
14045
14046 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14047
14048         * icall.c: new signature for Process_Start.
14049
14050         * process.[ch]: new signature for Process_Start. If we're on windows
14051         and UseShellExecute is false, we have to search for the program by
14052         ourselves if we don't get a full path.
14053
14054 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14055
14056         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
14057         marshalling and call CleanUpNativeData if needed. Fixes #58646.
14058
14059 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14060
14061         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
14062         Fixes bug #58373.
14063
14064 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14065
14066         * process.c: use double quotes to quote program name and arguments on
14067         windows. Fixes bug #58575.
14068
14069 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14070
14071         * file-io.c: don't return "." and ".." when using windows Find*File.
14072
14073 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
14074
14075         * marshal.c: Don't pass wrappers to message init because method 
14076         addressed used to lookup metadata. part of remoting[2|3] fix.
14077
14078 2004-05-15  Jackson Harper  <jackson@ximian.com>
14079
14080         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
14081         path is essentially the same as MONO_PATH except that it points to
14082         GACs instead of lib directories.
14083         * loader.h: The user gac is gone so we dont need function to
14084         enable/disable it.
14085         * mono-config.c: user gac option is now gone.
14086         
14087 2004-05-15  Jackson Harper  <jackson@ximian.com>
14088
14089         * culture-info.h: Make defines more consistent, add calendar data
14090         to the culture info table.
14091         * culture-info-tables.h: Add basic calendar data. Basically
14092         everyone gets default gregorian until all the data is
14093         updated.
14094         * locales.c: Use the new consistent defines. Set calendar data for
14095         culture info objects.
14096         * object.h: add a field for calendar data to CultureInfo
14097         
14098 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
14099
14100         * image.c: image->runtime_invoke_cache is keyed on signatures now.
14101         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
14102         a signature.
14103         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
14104         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
14105         an extra param that is the pointer of the method to invoke. The IL for
14106         the invoke method is no longer specific to the method, but to the
14107         signature of the method. Thus, we can share the same code for multiple
14108         methods. This reduces the number of methods that have to be compiled.
14109
14110 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
14111
14112         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
14113
14114         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14115
14116         * icall.c: Optimize Buffer.BlockCopy.
14117
14118 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14119
14120         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
14121         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
14122         quote). Changed them to "MMMM yyyy".
14123
14124 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
14125
14126         * rand.c
14127         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
14128
14129 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
14130
14131         * reflection.h: Updated after changes to managed structures.
14132
14133         * appdomain.c: Bump corlib version.
14134
14135 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14136
14137         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
14138         windows.
14139
14140 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14141
14142         * Makefile.am: link to ../os/libmonoos.la on windows.
14143
14144         * assembly.c:
14145                 -If MONO_DEBUG, warn about non-existing directories in
14146                 MONO_PATH.
14147                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
14148                 compile time variable.
14149                 -Removed init_default_path and call mono_set_rootdir from
14150                 libmonoos.a instead (windows only).
14151
14152         * assembly.h: declare mono_assembly_getrootdir().
14153
14154         * domain.c:
14155         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
14156
14157         * loader.c: s/getenv/g_getenv/
14158
14159 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14160
14161         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
14162
14163         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
14164
14165         * metadata.h: Add new marshalling conversions.
14166
14167         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
14168         function.
14169
14170         * reflection.c (mono_reflection_get_type): Lookup the type in all
14171         modules of a multi-module assembly. Fixes #58291.
14172
14173 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14174
14175         * threads.c: Before aborting a background, set the StopRequested
14176         state.  This avoids throwing the Abort exception.
14177         In mono_thread_manage, don't continue with the shutdown until all
14178         aborted threads have actually stopped.
14179
14180 2004-05-10  Jackson Harper  <jackson@ximian.com>
14181
14182         * locales.c: Remove the modifier from culture names.
14183         
14184 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14185
14186         * Makefile.am: monosn is not installed any more. It has been deprecated
14187         in favor of sn.
14188
14189 2004-05-07  Jackson Harper  <jackson@ximian.com>
14190
14191         * locales.c
14192         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
14193         Fix array construction, add bailout if the length is 0.
14194
14195 2004-05-07  Dick Porter  <dick@ximian.com>
14196
14197         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
14198         machine doesn't have a DNS entry.  Patch by Urs Muff
14199         (umuff@quark.com), fixes bug 57928.
14200
14201 2004-05-06  Jackson Harper  <jackson@ximian.com>
14202
14203         * reflection.c: Handle null PublicTokens properly. alloc mem for
14204         assembly names culture so we dont crash when freeing it.
14205         
14206 2004-05-06  Jackson Harper  <jackson@ximian.com>
14207
14208         * assembly.c: Check the usergac when loading with partial names.
14209         
14210 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
14211
14212         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
14213         does nothing for now (not required for Linux/Windows) but the class
14214         library can call it (and a newer or modified runtime could need it).
14215         * icall.c: Registred icall.
14216
14217 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14218
14219         * loader.c: prints a message on module loading error we set MONO_DEBUG
14220         environment variable.
14221
14222 2004-05-05  Jackson Harper  <jackson@ximian.com>
14223
14224         * appdomain.c: Handle PublicKeyToken=null properly.
14225         
14226 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
14227
14228         * environment.c|h: Added icall ves_icall_System_Environment_
14229         GetOSVersionString to get the current OS version as a string.
14230         * icall.c: Registred icall.
14231
14232 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
14233
14234         * object.c: in mono_object_get_virtual_method(), take into account that
14235         non-virtual methods don't have a slot in the vtable. Check needed when
14236         the object is a proxy.
14237
14238 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14239
14240         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
14241         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
14242
14243         * object.c (mono_class_compute_gc_descriptor): Fix warning.
14244
14245         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
14246         passed when a valuetype is expected.
14247
14248         * object.c (mono_unhandled_exception): Only set the exit code if the
14249         exception happens in the main thread. Fixes thread5.exe.
14250
14251         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
14252         invalid names. Fixes #58047.
14253
14254 2004-05-03  Jackson Harper  <jackson@ximian.com>
14255
14256         * assembly.c: This line was committed accidently and is unneeded.
14257         
14258 2004-05-03  Jackson Harper  <jackson@ximian.com>
14259
14260         * icall.c: Add new icall for Assembly::LoadWithPartialName
14261         * assembly.c/.h: new function that probes the GAC to load partial
14262         assembly names by Paolo Molaro.
14263         
14264 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14265
14266         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
14267         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
14268         (type_get_fully_qualified_name): Added PublicKeyToken when building a
14269         full type name.
14270
14271 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14272
14273         * appdomain.c: fixed check for 'neutral' culture and removed warning.
14274         * reflection.c: fix bug when parsing a full type name and Version is not
14275         the last thing in the string.
14276
14277 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
14278
14279         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
14280         crashes when it is freed.
14281
14282 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14283
14284         * assembly.c: print the compat warning to stderr.
14285
14286 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
14287
14288         * assembly.c (mono_assembly_load_references): Add a compatibility
14289         hack to run old applications that might be still referencing the
14290         3300-based assemblies, only do this for System.xxx.
14291
14292 2004-05-01  Jackson Harper  <jackson@ximian.com>
14293
14294         * appdomain.c: If the culture is neutral we set it to "".
14295         
14296 2004-04-29  Jackson Harper  <jackson@ximian.com>
14297
14298         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
14299
14300 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
14301  
14302         * string-icalls.c: added low overhead function for copying chars
14303         * icall.c: added needed icall for the above function
14304  
14305 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14306
14307         * icall.c: fix return value of get_global_assembly_cache.  Implemented
14308         Environment.GetLogicalDrives.
14309
14310 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
14311
14312         * rand.c: try and talk to egd or prngd
14313         for random bytes if opening devices fail.
14314
14315 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14316
14317         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
14318         alignment for the type using the native alignment of its members 
14319         instead of using klass->min_align.
14320
14321         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
14322
14323 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14324
14325         * file-io.c:
14326         * socket-io.c: added check for sys/aio.h.
14327
14328 2004-04-28  Dick Porter  <dick@ximian.com>
14329
14330         * threads.c: Don't abort a thread thats already aborting, when
14331         terminating everything.
14332
14333 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14334
14335         * icall.c: added 2 new async calls for Socket.
14336
14337         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
14338         IO on *nix systems.
14339
14340         * threadpool.c: removed unused variable.
14341
14342 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
14343
14344         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
14345
14346 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
14347
14348         * locales.c: put back string_invariant_tolower () and
14349         string_invariant_toupper ().
14350
14351 2004-04-26 David Waite <mass@akuma.org>
14352
14353         * file-io.h:
14354         * socket-io.h:
14355         * threads.h:
14356         * unicode.h: remove comma from end of enumeration declarations
14357
14358 2004-04-26 David Waite <mass@akuma.org>
14359
14360         * debug-mono-symfile.h:
14361         * decimal.c:
14362         * mono_debug.h:
14363         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
14364
14365
14366 2004-04-26  Jackson Harper  <jackson@ximian.com>
14367
14368         * appdomain.c: Increment version number.
14369         
14370 2004-04-26  Jackson Harper  <jackson@ximian.com>
14371
14372         * appdomain.c: Set assembly references public token value when
14373         PublicKeyToken is specified, not the hash_value. Free public token
14374         values when free assembly name data. Previously the public key
14375         token was hex decoded, however we are using hex encoded public key
14376         tokens, so this is not neccasary.
14377         * assembly.c: Lookup assemblies in the gac if their public token
14378         value is set. Add function to allow enabling user gac
14379         lookups. Specify whether or not the assembly was loaded from the
14380         GAC. Compare full assembly names when checking the cache for
14381         assemblies (Temporarily disabled see comment in code). Remove
14382         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
14383         specifies trace-loader they get extra info to stdout on the
14384         loading of assemblies.
14385         * image.h: Add a field for an assembly references public token
14386         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
14387         whether an assembly has been loaded from the GAC.
14388         * image.c: Remove a corlib -> mscorlib name mapping.
14389         * loader.h: Add function to enable/disable the user gac.
14390         * mono-config.c: Check if the usergac is enabled in the config
14391         file.
14392         * icall.c: New icall to determine whether or not an assembly has
14393         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
14394         * tabldefs.h: Add constant for assemblyref flag that specifies a
14395         full public key is used instead of a public token.
14396         * reflection.c: Remove mscorlib -> corlib mappings. Set
14397         PublicTokenValue instead of hash value. This value is a hex
14398         string so it does not need to be expanded.
14399
14400 2004-04-26  Martin Baulig  <martin@ximian.com>
14401
14402         * mono-debug-debugger.c (mono_debugger_initialize): Set
14403         `mono_debugger_initialized' before calling mono_debug_lock().
14404
14405 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
14406
14407         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
14408           InternalToUpper/InternalToLower.
14409         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
14410           removed invariant culture shortcut.  This is now done in managed code.
14411         * locales.c: (string_invariant_toupper/tolower) removed.
14412
14413 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14414
14415         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
14416         Added Poll internal call.
14417
14418         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
14419         call for Poll. Select was too heavy for polling a single socket.
14420
14421         * threadpool.[ch]: added mono_threadpool_cleanup.
14422         * threads.c: use it. Don't use Thread_Abort on windows.
14423
14424 2004-04-23  Martin Baulig  <martin@ximian.com>
14425
14426         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
14427
14428 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
14429
14430         * icall.c: Registred new icalls for key pair protection and added an
14431         icall for Environment.GetFolderPath on Windows.
14432         * security.c|h: Added new icalls for key pair protection.
14433
14434 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14435
14436         * socket-io.c: don't display the non-supported family warning for known
14437         families. Now this is not displayed on windows when checking support
14438         for IPv4/IPv6.
14439
14440 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14441
14442         * class.c: don't display the layout warning for static fields.
14443
14444 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
14445
14446         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
14447         * locales.c, locales.h: Added new icalls for culture-specific
14448         Char.ToLower and Char.ToUpper.
14449
14450 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14451
14452         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
14453         by David Waite.
14454
14455 2004-04-20  Martin Baulig  <martin@ximian.com>
14456
14457         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
14458         of the type name before passing it to mono_reflection_type_from_name().
14459
14460 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14461
14462         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
14463         encodings here. Fixes #56965.
14464
14465 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
14466
14467         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14468         fix test on strstr result not that I can see anything that
14469         relies on the result.
14470
14471 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14472
14473         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
14474         Fixes #57081.
14475
14476         * marshal.c (mono_marshal_get_string_encoding): New helper function.
14477
14478         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
14479         function to determine which marshalling to use for strings. Fixes
14480         #56965.
14481
14482         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
14483
14484         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
14485
14486 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
14487
14488         * icall.c: #include mono-config.h
14489
14490 2004-04-15  Jackson Harper  <jackson@ximian.com>
14491
14492         * culture-info-tables.h: Fix date formats for en-US culture.
14493         
14494 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
14495
14496         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
14497         ThreadPool.SetMinThreads.
14498         * threadpool.c: Implemented ThreadPool.GetMinThreads and
14499         ThreadPool.SetMinThreads.
14500
14501 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14502
14503         * mono-config.c: also load the .config file in the directory
14504         where the assembly was found.
14505
14506 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14507
14508         * assembly.c: load per-assembly config files.
14509         * icall.c: decrapified code to get the config dir and moved to
14510         mono-config.c.
14511         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
14512         per-assembly config files. When doing a dll map lookup give precedence
14513         to the per-assembly data.
14514
14515 2004-04-14  Martin Baulig  <martin@ximian.com>
14516
14517         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
14518         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
14519         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
14520
14521         * mono-debugger-debugger.c: While the debugger is locked, remember
14522         whether the symbol tables have changes and send one single
14523         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
14524
14525 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14526
14527         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
14528
14529         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
14530         function.
14531
14532         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
14533         account when marshalling string arrays. Fixes #56965.
14534
14535 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
14536
14537         * icall.c: Add new icalls mapping for security.
14538         * security.c|h: Add internal calls for WindowsIdentity,
14539         WindowsImpersonationContext and WindowsPrincipal.
14540
14541 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
14542
14543         * class.c: Added comment to ensure the System.MonoDummy class
14544         is removed when no longer necessary
14545
14546 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14547
14548         * appdomain.c: Pass arguments to the bootstraping exceptions to
14549         minimize JITed methods at boot
14550
14551         * metadata.c (mono_exception_from_name_two_strings): Allow for the
14552         second string to be null.
14553
14554         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14555         Change the protocol to minimize the JIT methods at startup.  Now
14556         it Returns the internal codepage, if the value of "int_code_page"
14557         is 1 at entry, and we can not compute a suitable code page
14558         number, returns the code page as a string.
14559
14560 2004-04-13  Jackson Harper  <jackson@ximian.com>
14561
14562         * culture-info-tables.h: Fix number of decimal digits for all
14563         english locales.
14564
14565 2004-04-13  Jackson Harper  <jackson@ximian.com>
14566
14567         * icall.c: Clairfy out of sync error message. It is not always
14568         your corlib that is out of sync.
14569
14570 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
14571
14572         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
14573         properties when only the set accessor is overriden. Fixes #55874.
14574
14575 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
14576
14577         * assembly.c (mono_assembly_load_references): Make this thread safe.
14578         Fixes #56327.
14579
14580 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14581
14582         * monosn.c: Add missing initialization calls.
14583
14584 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
14585
14586         * locales.c:
14587         ves_icall_System_Globalization_CultureInfo_construct_number_format
14588         Fix g_assert so it compiles on fussier compilers re int/ptr
14589         mismatch
14590
14591 2004-04-08  Dick Porter  <dick@ximian.com>
14592
14593         * socket-io.h:
14594         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
14595         53992.  Also rearrange the code so that the internal calls return
14596         an error value and exceptions are thrown from managed code.
14597
14598         * icall.c: Add type info to the socket icalls.
14599
14600 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14601
14602         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
14603         owes me a beer.
14604
14605 2004-04-07  Martin Baulig  <martin@ximian.com>
14606
14607         * class.c (mono_class_from_generic_parameter): Don't default
14608         `klass->parent' to `mono_defaults.object_type'.
14609
14610 2004-04-07  Martin Baulig  <martin@ximian.com>
14611
14612         * reflection.c (mono_reflection_initialize_generic_parameter): Set
14613         `param->pklass->reflection_info'.       
14614
14615 2004-04-07  Jackson Harper  <jackson@ximian.com>
14616
14617         * culture-info-tables.h: Fix date separator symbol.
14618         
14619 2004-04-07  Martin Baulig  <martin@ximian.com>
14620
14621         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
14622         from System.Type to System.MonoType.
14623
14624 2004-04-07  Martin Baulig  <martin@ximian.com>
14625
14626         * reflection.h
14627         (MonoReflectionGenericParam): Added `has_reference_type' and
14628         `has_value_type' fields.
14629
14630         * reflection.c (mono_image_get_generic_param_info): Encode the
14631         correct flags if we have the `class' or `struct' constraint.
14632
14633 2004-04-07  Martin Baulig  <martin@ximian.com>
14634
14635         * reflection.h
14636         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
14637
14638 2004-04-07  Jackson Harper  <jackson@ximian.com>
14639
14640         * appdomain.c: Revert extra patches, just wanted to bump the
14641         version number.
14642         
14643 2004-04-07  Jackson Harper  <jackson@ximian.com>
14644
14645         * Makefile.am: Add culture-info private headers.
14646         * icall.c: Add new icalls for contructing locales.
14647         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
14648         * locales.h: Declare new culture info construction methods.
14649         * object.h: Add new fields used to avoid the CultureMap to
14650         MonoCultureInfo.
14651         * culture-info.h: Definition of structs used in the culture info
14652         tables.
14653         * culture-info-tables.h: Autogenerated tables that contain culture
14654         info data. This file was generated with the locale-builder tool.
14655         * appdomain.c: Incement corlib version number.
14656         
14657 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
14658
14659         * appdomain.c: (mono_runtime_init) move mono_thread_init
14660         to before mono_object_new calls so critical sections
14661         are initialized before use.
14662
14663 2004-04-07  Martin Baulig  <martin@ximian.com>
14664
14665         * icall.c
14666         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
14667         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
14668         (ves_icall_MonoGenericParam_initialize): Removed.
14669         (monogenericparam_icalls): Removed.
14670         (generictypeparambuilder_icalls): Added new table for
14671         System.Reflection.Emit.GenericTypeParameterBuilder.
14672
14673         * reflection.c
14674         (mono_reflection_define_generic_parameter): Removed.
14675         (mono_reflection_initialize_generic_parameter): This is now called
14676         from GenericTypeParameterBuilder's .ctor.
14677
14678 2004-04-06  Martin Baulig  <martin@ximian.com>
14679
14680         * class.c (mono_class_init): Don't inflate nested classes in a
14681         generic instance.
14682         (mono_type_get_name_recurse): Include the generic arguments for
14683         generic instances and generic type declarations.
14684         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
14685         (_mono_class_get_instantiation_name): Removed.
14686         (mono_class_create_generic): Always use `gklass->name' as our name.
14687
14688         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
14689
14690         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
14691         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
14692         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
14693         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
14694         closed generic methods here.
14695
14696         * reflection.c
14697         (mono_reflection_generic_inst_get_nested_types): Removed.
14698         (inflate_mono_method): Copy the generic parameters from the
14699         MonoMethodHeader into out MonoGenericMethod.
14700
14701 2004-04-06  Martin Baulig  <martin@ximian.com>
14702
14703         * row-indexes.h
14704         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
14705
14706         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
14707
14708         * reflection.c (build_compressed_metadata): If we have any entries
14709         in the GenericParam, MethodSpec or GenericParamConstraint tables,
14710         set the header version to 1.1.
14711
14712 2004-04-06  Martin Baulig  <martin@ximian.com>
14713
14714         * class.c (mono_class_init): If we're a generic instance,
14715         initialize our nested classes, too.
14716         (_mono_class_get_instantiation_name): Deal with the new `!%d'
14717         suffix. 
14718
14719 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14720
14721         * process.c: quote the argument passed to the shell on windows.
14722
14723 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14724
14725         * threads.c (mono_alloc_special_static_data): Allow this to be
14726         called during startup.
14727
14728 2004-04-02  Martin Baulig  <martin@ximian.com>
14729
14730         * icall.c
14731         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
14732
14733 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14734
14735         * icall.c: Fix build.
14736
14737 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
14738
14739         * Makefile.am: Added security.c|h.
14740         * icall.c: Added icall for get_UserName;
14741         * security.c: New file for security related icalls. Added function
14742         get_UserName for System.Environment (fix #56144).
14743         * security.h: New. Header file for security.c
14744
14745 2004-04-02  Dick Porter  <dick@ximian.com>
14746
14747         * icall.c: Deleted the icalls that were obsoleted some time ago
14748         by the ICU string code, and which were mixed into the icall
14749         rearranging.  Fixes bug 55969.
14750
14751         * string-icalls.h: 
14752         * string-icalls.c: Deleted the code that those icalls reference.
14753
14754 2004-04-01  Martin Baulig  <martin@ximian.com>
14755
14756         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
14757
14758         * class.c (mono_class_from_generic_parameter): Don't set 
14759         TYPE_ATTRIBUTE_INTERFACE.
14760         (my_mono_class_from_generic_parameter): Likewise.
14761
14762 2004-04-01  Martin Baulig  <martin@ximian.com>
14763
14764         * loader.c (find_method): Added an optional `MonoClass *ic'
14765         argument to search in a specific interface.
14766         (mono_get_method_constrained): New public function.
14767
14768 2004-04-01  Martin Baulig  <martin@ximian.com>
14769
14770         * reflection.c (mono_image_get_generic_field_token): Use the
14771         `handleref' cache here.
14772
14773 2004-04-01  Martin Baulig  <martin@ximian.com>
14774
14775         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
14776
14777         * reflection.c (create_generic_typespec): Use the `typespec' hash
14778         here, not the `typeref' one.    
14779
14780 2004-04-01  Martin Baulig  <martin@ximian.com>
14781
14782         * class.c (mono_class_inflate_generic_type): Moved the
14783         functionality into a new static inflate_generic_type() which
14784         returns NULL if it didn't do anything.  Only increment the
14785         `mono_stats.inflated_type_count' if we actually inflated
14786         something.
14787         (mono_class_get_full): Check the classes type to see whether we
14788         need to inflate it; also inflate MONO_TYPE_(M)VAR.
14789
14790 2004-04-01  Jackson Harper  <jackson@ximian.com>
14791
14792         * reflection.c: Set culture for assembly references.
14793         
14794 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
14795
14796         * reflection.[ch], icall.[ch], Fix support for pinning variables.
14797
14798 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14799
14800         * assembly.c:
14801         (do_mono_assembly_open): the critical section also covers
14802         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
14803
14804 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14805
14806         * threads.c:
14807         (mono_manage_threads): abort the background threads when finishing.
14808         Fixes bug #47232.
14809
14810 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14811
14812         * gc.c: only close the done_event handle if there was no timeout.
14813         C-ified comments.
14814
14815 2004-03-30  Martin Baulig  <martin@ximian.com>
14816
14817         * icall.c (icall_entries): It's called "System.Activator", not
14818         "System.Activation".    
14819
14820 2004-03-30  Martin Baulig  <martin@ximian.com>
14821
14822         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
14823         (mono_class_create_from_typespec): Likewise.
14824
14825 2004-03-30  Martin Baulig  <martin@ximian.com>
14826
14827         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
14828         `has_ctor_constraint' and `initialized'.
14829
14830 2004-03-30  Martin Baulig  <martin@ximian.com>
14831
14832         * reflection.c (encode_new_constraint): New static function to add
14833         the constructor constraint attribute to a type parameter.
14834         (encode_constraints): Call encode_new_constraint() if necessary.
14835
14836         * reflection.h
14837         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
14838
14839         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
14840         
14841 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
14842
14843         * reflection.c, icall.c: add support for pinning variables. 
14844
14845 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
14846
14847         * marshal.c (mono_marshal_get_managed_wrapper):
14848         init bool local with zero rather than null.
14849
14850 2004-03-29  Martin Baulig  <martin@ximian.com>
14851
14852         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
14853         the "official" behavior here.
14854         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
14855
14856 2004-03-29  Martin Baulig  <martin@ximian.com>
14857
14858         * icall.c: Reflect latest API changes.
14859
14860 2004-03-29  Martin Baulig  <martin@ximian.com>
14861
14862         * loader.c (mono_get_method_from_token): Also call
14863         mono_metadata_load_generic_params () for abstract and interface
14864         methods; replace the type arguments in the method signature with
14865         the ones which are loaded from the metadata.
14866
14867 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
14868
14869         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
14870         of the lock is not the current thread. MS.NET don't do it, in spite of
14871         what the documentation says. See bug #56157.
14872
14873 2004-03-28  Martin Baulig  <martin@ximian.com>
14874
14875         * class.c (mono_class_init): Don't call init_properties() and
14876         init_events() for generic instances; set `prop->parent' when
14877         inflating properties.
14878
14879         * reflection.c (mono_generic_inst_get_object): Call
14880         `mono_class_init (ginst->klass)'.
14881         (mono_type_get_object): Only create a MonoGenericInst if your
14882         generic type is a TypeBuilder.
14883         (do_mono_reflection_bind_generic_parameters): Only set
14884         `ginst->is_dynamic' if our generic type is a TypeBuilder.
14885
14886 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
14887
14888         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
14889         Fixes #56091.
14890
14891 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14892
14893         * icall.c: added Kill_internal icall.
14894         * process.[ch]: added Kill_internal icall.
14895
14896 2004-03-25  Martin Baulig  <martin@ximian.com>
14897
14898         * class.h (MonoStats): Added `generic_instance_count',
14899         `inflated_method_count', `inflated_type_count' and
14900         `generics_metadata_size'.       
14901
14902 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14903
14904         * reflection.c: no warnings now.
14905
14906 2004-03-25  Martin Baulig  <martin@ximian.com>
14907
14908         * class.c (mono_class_get_full): New public function; does a
14909         mono_class_get(), but also takes a `MonoGenericContext *'.
14910
14911         * loader.c (mono_field_from_memberref): Renamed to
14912         `field_from_memberref', made static and added `MonoGenericContext *'
14913         argument.
14914         (mono_field_from_token): Added `MonoGenericInst *' argument.
14915         (method_from_memberef): Likewise.
14916         (mono_get_method_from_token): Likewise.
14917         (mono_get_method_full): New public function; does a
14918         mono_get_method(), but also takes a `MonoGenericContext *'.
14919
14920         * verify.c (mono_method_verify): Get the method's generic context
14921         and pass it to mono_field_from_token(), mono_get_method_full() and
14922         mono_class_get_full().
14923
14924 2004-03-25  Martin Baulig  <martin@ximian.com>
14925
14926         * class.c (mono_class_inflate_generic_type): Take a
14927         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
14928         `MonoGenericMethod *'.
14929
14930 2004-03-25  Martin Baulig  <martin@ximian.com>
14931
14932         * loader.h (MonoMethodInflated): Store the MonoGenericContext
14933         instead of the MonoGenericMethod here.
14934
14935 2004-03-25  Martin Baulig  <martin@ximian.com>
14936
14937         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
14938         each time we create a new MonoGenericInst, we also create a new
14939         context which points back to us.
14940
14941         * class.c (inflate_method): Use `ginst->context' instead of
14942         creating a new context.
14943
14944         * loader.c (method_from_memberref): Use
14945         `klass->generic_inst->context' instead of creating a new context.
14946
14947 2004-03-25  Martin Baulig  <martin@ximian.com>
14948
14949         * class.h (MonoGenericContext): New struct.
14950         (MonoGenericMethod): Removed `generic_inst'.
14951
14952         * class.c (mono_class_inflate_generic_method): Take a
14953         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
14954
14955 2004-03-25  Martin Baulig  <martin@ximian.com>
14956
14957         * loader.h (MonoMethodInflated): New typedef.
14958
14959         * metadata.h (MonoMethodSignature): Removed `gen_method', make
14960         `generic_param_count' consume just 30 bits, added `is_inflated'
14961         and `has_type_parameters' flags (one bit each).
14962
14963         * class.c (mono_class_inflate_generic_method): Create a
14964         MonoMethodInflated instead of a MonoMethodNormal and set
14965         `is_inflated' in the method signature.
14966
14967         * class.h (MonoGenericMethod): Removed `generic_method'.
14968
14969 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
14970
14971         * image.c: Make sure the name of a MonoImage is always an absolute path.
14972           This fixes bug #54415.
14973
14974 2004-03-24  Martin Baulig  <martin@ximian.com>
14975
14976         * class.c (mono_class_setup_vtable): If we're a generic instance,
14977         use our generic type's vtable size.
14978
14979 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
14980
14981         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
14982         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
14983         problems.
14984
14985 2004-03-23  Martin Baulig  <martin@ximian.com>
14986
14987         * class.h (MonoDynamicGenericInst): Added `int count_events' and
14988         `MonoEvent *events'.
14989
14990         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
14991         (typebuilder_icalls): Added "get_event_info"; calls
14992         mono_reflection_event_builder_get_event_info(). 
14993
14994         * reflection.c (mono_reflection_generic_inst_initialize): Added
14995         `MonoArray *events'.
14996         (mono_reflection_event_builder_get_event_info): New function.
14997
14998 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
14999
15000         * object.h: add mono_type_initialization_init
15001
15002         * object.c (mono_runtime_class_init): 
15003         implement class constructor synchronization rules
15004         to cope with threading issues.  
15005         add mono_type_initialization_init
15006
15007         * appdomain.c (mono_runtime_init): call 
15008         mono_type_initialization_init
15009
15010         * class.h: removing initializing field from MonoVTable
15011
15012 2004-03-23  Martin Baulig  <martin@ximian.com>
15013
15014         * class.c (my_mono_class_from_generic_parameter): Use
15015         `param->name' if it's not NULL. 
15016
15017 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
15018
15019         * class.c: do not insert non-virtual methods in the vtable.
15020         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
15021         that means the method is non-virtual. This never would have
15022         happened before.
15023
15024 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
15025
15026         * profiler.c: Added lock for accessing coverage_hash.
15027
15028 2004-03-22  Martin Baulig  <martin@ximian.com>
15029
15030         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
15031         `method->method->signature->generic_param_count != 0' to make it
15032         work for interface methods.
15033
15034 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15035
15036         * process.c: quote the string passed to the shell using g_shell_quote.
15037
15038 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15039
15040         * threads.c:
15041         (mono_threads_manage): don't remove the finalizer thread and self
15042         from the threads hash table so that mono_thread_manage can be called
15043         more than once.
15044
15045 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15046
15047         * process.c: quote the arguments when UseShellExecute is true. Fixes
15048         bug #55790.
15049
15050 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15051
15052         * threads.c: set mono_thread_detach as a cleanup routine for every
15053         thread. This way it's always executed upon thread termination, either
15054         aborted or finished normally. No more xsp hangs!
15055
15056 2004-03-17  Martin Baulig  <martin@ximian.com>
15057
15058         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
15059         `int count_nested' and a `MonoType **nested'.
15060
15061         * reflection.c (mono_reflection_bind_generic_parameters): Moved
15062         most of the functionality into a new static
15063         do_mono_reflection_bind_generic_parameters() and don't take a
15064         `MonoType *nested_in' argument any more.  Don't compute nested
15065         types here.
15066         (mono_reflection_generic_inst_get_nested_types): New public method
15067         to get nested types.
15068
15069         * class.c (mono_class_create_generic): Set `klass->nested_in' if
15070         we're a nested class.
15071
15072         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
15073         mono_reflection_generic_inst_get_nested_types() to compute the
15074         nested types.
15075
15076 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15077
15078         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
15079         descriptive error message under windows.
15080         
15081 2004-03-17  Martin Baulig  <martin@ximian.com>
15082
15083         * class.c (dup_type): Added `const MonoType *original' argument;
15084         copy the attrs from the original type.
15085
15086 2004-03-17  Martin Baulig  <martin@ximian.com>
15087
15088         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
15089         `m->generic_inst_cache' here.
15090
15091 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15092
15093         * exception.h exception.c: Add stack_overflow_exception.
15094
15095 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15096
15097         * threadpool.c:
15098         (overlapped_callback): call SetEvent *after* invoking the callback.
15099         No need to call CloseHandle.
15100
15101 2004-03-16  Martin Baulig  <martin@ximian.com>
15102
15103         * reflection.c (mono_image_get_fieldref_token): Take a
15104         `MonoReflectionField *' instead of a `MonoClassField *' and a
15105         `MonoClass *'; store the `MonoReflectionField *' in the hash.
15106
15107 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15108
15109         * appdomain.c: don't add the culture to the filename we're looking for
15110         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
15111
15112 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15113
15114         * locales.c: don't ignore symbols when doing case insensitive compares.
15115         Thanks Dick! Fixes bug #54046.
15116
15117         * threads.c: surround 'threads' usage with enter/leave in
15118         mono_thread_manage.
15119
15120 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
15121
15122         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
15123         implicitly marshalled as [Out]. Fixes #55450.
15124
15125         (mono_marshal_get_runtime_invoke): Zero out the result if there is
15126         an exception.
15127
15128 2004-03-16  Martin Baulig  <martin@ximian.com>
15129
15130         * class.c (mono_class_from_generic_parameter): Use the actual
15131         parameter name. 
15132
15133 2004-03-16  Martin Baulig  <martin@ximian.com>
15134
15135         * reflection.c (type_get_signature_size): New static function.
15136         Compues the size of the type in a method signature.
15137         (method_get_signature_size): New static function; calls
15138         type_get_signature_size() to compute the actual size of the
15139         method's signature.
15140         (method_encode_signature): Use method_get_signature_size() to get
15141         the signature's size rather than using `nparams * 10'.
15142
15143 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15144
15145         * file-io.h: define here WapiOverlapped on windows. I don't want the
15146         regular OVERLAPPED one.
15147
15148         * file-io.c:
15149         * threadpool.c: somehow, BindIoCompletionCallback is not found.
15150         Disabling AIO on windows.
15151
15152 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15153
15154         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
15155         bug #55385.
15156
15157 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15158
15159         * appdomain.c: upgraded corlib version.
15160
15161         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
15162         and BeginWrite. Allow opening files for asynchrnous operations.
15163
15164         * file-io.h: new struct that maps FileStreamAsyncResult.
15165         * icall.c: added new icalls.
15166         * process.[ch]: support setting child process environment variables
15167         and use the SHELL or COMSPEC when UseShellExecute is true.
15168
15169         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
15170         callback for async. IO is here and also BindHandle.
15171
15172         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
15173         from here.
15174
15175 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15176
15177         * reflection.c (create_custom_attr): Allow len == 0.
15178
15179         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
15180         computation on big-endian machines.
15181
15182 2004-03-13  Martin Baulig  <martin@ximian.com>
15183
15184         * class.h (MonoGenericInst): Added `int count_ifaces'.
15185
15186         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
15187         `ginst->count_ifaces' instead `klass->interface_count' since we
15188         may get called before the vtable is created.
15189
15190         * loader.c (mono_method_get_param_names): If we're a generic
15191         instance, return and don't initialize the class.
15192
15193         * reflection.c (mono_reflection_setup_generic_class): Don't call
15194         ensure_runtime_vtable().
15195         (mono_reflection_bind_generic_parameters): Set
15196         `ginst->count_ifaces'.
15197
15198 2004-03-11  Jackson Harper <jackson@ximian.com>
15199
15200         * icall.c:
15201         * unicode.c:
15202         * unicode.h: Remove unused System.Char icalls.
15203         
15204 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
15205
15206         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
15207         code when we P/Invoke the first library in Windows.Forms, instead
15208         of when we first open the assembly.
15209
15210         * assembly.c: Drop the lookup from here.
15211
15212 2004-03-10  Martin Baulig  <martin@ximian.com>
15213
15214         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
15215         class for properties, fields and events.  Finally fixes #54945.
15216
15217 2004-03-10  Martin Baulig  <martin@ximian.com>
15218
15219         * metadata.c (mono_metadata_class_equal): New static function;
15220         checks whether two generic instances or two generic parameters are
15221         equal.
15222         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
15223         compare classes.        
15224
15225 2004-03-10  Martin Baulig  <martin@ximian.com>
15226
15227         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
15228
15229         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
15230         argument and write it into the `reflection_info' field.
15231
15232         * icall.c
15233         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
15234         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
15235
15236 2004-03-09  Jackson Harper  <jackson@ximian.com>
15237
15238         * char-conversions.h: use 8 bits for numeric data its all we need
15239         * icall.c: numeric data is only 8 bits now.
15240
15241 2004-03-09  Martin Baulig  <martin@ximian.com>
15242
15243         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
15244
15245         * class.c (init_properties, init_events): Initialize the new
15246         `parent' field.
15247
15248         * reflection.c (typebuilder_setup_properties): Likewise.
15249         (typebuilder_setup_events): Likewise.
15250
15251         * reflection.h (MonoEventInfo): Replaced `parent with
15252         `declaring_type' and `reflected_type'.
15253
15254         * icall.c (ves_icall_get_property_info): Distinguish between
15255         declaring and reflected type.
15256         (ves_icall_get_event_info): Likewise.
15257
15258 2004-03-09  Martin Baulig  <martin@ximian.com>
15259
15260         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
15261         (ves_icall_Type_GetField): Correctly set field->klass.
15262
15263 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15264
15265         * loader.h: Fix warning.
15266
15267 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
15268
15269         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
15270         library routine if present.  Notice that it will still continue
15271         executing even if its missing, for those working on the Gtk#
15272         edition of Windows.Forms.
15273
15274         * assembly.c (do_mono_assembly_open): If loading the
15275         System.Windows.Forms call mono_loader_wini_init.
15276
15277 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
15278
15279         * class.h: Added MonoRemoteClass struct.
15280         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
15281         function for MonoStrings.
15282         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
15283         Added internal call for getting the proxy type.
15284         * marshal.c: Get the type of transparent proxies from its remote_class.
15285         Added methods that generate the IL for type checks and casts:
15286         mono_marshal_get_isinst, mono_marshal_get_castclass, 
15287         mono_marshal_get_proxy_cancast.
15288         * marshal.h: Declaration of the previous new methods.
15289         * object.c: Added new moethods for creating and updating MonoRemoteClass
15290         instances: mono_remote_class, mono_upgrade_remote_class, 
15291         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
15292         * verify.c: FIx transparent_proxy_fields layout.
15293         * appdomain.c: Bump corlib version.
15294
15295 2004-03-04  Jackson Harper  <jackson@ximian.com>
15296
15297         * icall.c: Add icall to access char conversion tables.
15298         * char-conversions.h: Character conversion tables.
15299         * Makefile.am: Add char-conversions.h private header file.
15300         
15301 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
15302
15303         * appdomain.c (unload_thread_main): Increase unloading timeout to
15304         10 sec as a temporary workaround for Nant problems.
15305
15306 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
15307
15308         * gc.c: Add checks for GC_enable and GC_disable.
15309
15310         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
15311         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
15312         (bug #54988).
15313         
15314 2004-02-27  Martin Baulig  <martin@ximian.com>
15315
15316         * reflection.c (mono_reflection_bind_generic_parameters): Take a
15317         `MonoReflectionType *' instead of a `MonoType *'.
15318
15319 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
15320
15321         * gc.c (run_finalize): Avoid finalizing the object representing the
15322         finalizer thread.
15323         (finalizer_thread): Fix warning.
15324
15325 2004-02-25  Martin Baulig  <martin@ximian.com>
15326
15327         * class.c (_mono_class_get_instantiation_name): Added `int offset'
15328         argument for nested types.
15329         (mono_class_create_generic): Added support for nested generictypes.
15330
15331         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
15332         `GList *nested'.
15333
15334         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
15335
15336         * reflection.c (method_encode_signature): Increase the minimum
15337         value of `size' from 10 to 11.
15338         (mono_reflection_bind_generic_parameters): Take `int type_argc'
15339         and `MonoType **types' arguments instead of the `MonoArray
15340         *types'; added `MonoType *nested_in'.  Recursively instantiate
15341         nested classes. 
15342
15343 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
15344
15345         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
15346         stack_overflow_ex members which are used by exception handling.
15347
15348         * appdomain.c (mono_runtime_init): Initialize the new members.
15349
15350         * gc.c (mono_gc_enable): New helper function.
15351         * gc.c (mono_gc_disable): New helper function.
15352
15353 2004-02-23  Martin Baulig  <martin@ximian.com>
15354
15355         * icall.c: I must have been really stupid - make it actually work
15356         this time ;-)
15357
15358 2004-02-23  Martin Baulig  <martin@ximian.com>
15359
15360         * loader.c (method_from_memberref): Only inflate the method if
15361         it's in another klass.
15362
15363 2004-02-23  Martin Baulig  <martin@ximian.com>
15364
15365         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
15366         (mono_class_init): If we're a generic instance and an interface,
15367         compute `class->interface_id'; also create `class->interfaces'
15368         here and inflate them.
15369
15370         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
15371         `ginst->is_open'.
15372         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
15373
15374         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
15375
15376 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
15377
15378         * reflection.c (method_encode_code): Improved the error message
15379         generated by the exception.
15380
15381 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15382
15383         * icall.c: Martin did not do what he said in the ChangeLog for
15384         2004-02-18, but put back the changes for properties and events.
15385         Commenting those changes out again and adding comment to bug #54518.
15386         
15387         * process.c: removed warning.
15388
15389 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
15390
15391         * marshal.c (emit_struct_conv): Print an error message instead of
15392         asserting when a type does not have the StructLayout attribute.
15393
15394 2004-02-20  Martin Baulig  <martin@ximian.com>
15395
15396         * reflection.c (mono_type_get_object): Also use the cache for
15397         generic instances.
15398         (mono_reflection_bind_generic_parameters): Always compute
15399         `ginst->ifaces'.        
15400
15401 2004-02-20  Martin Baulig  <martin@ximian.com>
15402
15403         * class.h (MonoGenericMethod): Removed `klass'.
15404
15405         * class.c (mono_class_inflate_generic_method): Added `MonoClass
15406         *klass' argument.
15407
15408 2004-02-20  Martin Baulig  <martin@ximian.com>
15409
15410         * reflection.c (method_encode_methodspec): Actually use the
15411         uninflated signature for the memberref.
15412
15413 2004-02-20  Martin Baulig  <martin@ximian.com>
15414
15415         * class.h (MonoGenericMethod): Removed `declaring'.
15416
15417         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
15418         is NULL, compute it here.
15419
15420 2004-02-20  Martin Baulig  <martin@ximian.com>
15421
15422         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
15423
15424         * metadata.c (mono_metadata_generic_inst_hash): New method.
15425         (mono_metadata_generic_inst_equal): New method.
15426
15427         * reflection.c (mono_reflection_bind_generic_parameters): Use the
15428         `klass->image->generic_inst_cache' cache to avoid creating
15429         duplicate MonoGenericInst's.
15430
15431         * class.c (mono_class_inflate_generic_type): Use the cache.
15432
15433 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
15434
15435         * object.c: fixed gc descriptor calculation for embedded valuetypes.
15436
15437 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15438
15439         * icall.c: added Socket.WSAIoctl icall.
15440
15441         * socket-io.[ch]: implemented
15442         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
15443
15444 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
15445
15446         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
15447
15448 2004-02-18  Urs C Muff  <umuff@quark.com>
15449
15450         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
15451         this work on PPC and other big-endian architectures.
15452
15453         * debug-mono-symfile.h: Prepended the names of all the `guint32'
15454         fields with an underscore to make sure they're only accessed by
15455         the read32() macro.
15456
15457 2004-02-18  Martin Baulig  <martin@ximian.com>
15458
15459         * icall.c: Put the klass->refclass changes back for methods and
15460         fields, but not for properties and events.  We're currently not
15461         distinguishing between DeclaringType and ReflectedType for
15462         properties and events, that's what caused the regressions.
15463
15464 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15465
15466         * object.c:
15467         (mono_async_result_new): the handle can be NULL.
15468
15469         * threadpool.c: Use an event instead of a semaphore, don't initialize
15470         it until needed. This saves quite a few semaphores from being created
15471         when using the threadpool.
15472
15473 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
15474
15475         * object.c (mono_string_is_interned_lookup): Fix interning of long
15476         strings. Fixes #54473.
15477
15478         * domain.c (ldstr_equal): Optimize if the two strings are equal.
15479
15480         * icall.c: Revert the klass->refclass changes since they introduce
15481         regressions (bug #54518).
15482
15483 2004-02-18  Martin Baulig  <martin@ximian.com>
15484
15485         * class.c (mono_class_init): If we're a generic instance and don't
15486         come from a TypeBuilder, inflate our members here.
15487         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
15488         (mono_class_create_generic): New public method.
15489         (mono_class_initialize_generic): Removed.
15490         (get_instantiation_name): Renamed to
15491         _mono_class_get_instantiation_name() and made it public.
15492
15493 2004-02-18  Martin Baulig  <martin@ximian.com>
15494
15495         * class.c (mono_class_inflate_generic_type): Clear the new
15496         instance's `nginst->klass' when inflating a generic instance.
15497         (mono_class_is_subclass_of): Added (basic) support for generic
15498         instances.
15499
15500 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
15501
15502         * appdomain.h, domain.c: use a MonoCodeManager instead of a
15503         MonoMempool to hold compiled native code.
15504
15505 2004-02-17  Martin Baulig  <martin@ximian.com>
15506
15507         * class.h (MonoDynamicGenericInst): Added `count_properties' and
15508         `properties'.
15509
15510         * reflection.c (mono_reflection_generic_inst_initialize): Added
15511         `MonoArray *properties' argument.
15512
15513         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
15514
15515 2004-02-17  Martin Baulig  <martin@ximian.com>
15516
15517         * icall.c (ves_icall_Type_GetFields): Renamed to
15518         ves_icall_Type_GetFields_internal() and added a
15519         `MonoReflectionType *rtype' argument; pass it to
15520         mono_field_get_object() to set the field's "reflected" type.
15521         (ves_icall_Type_GetConstructors): Likewise.
15522         (ves_icall_Type_GetEvents): Likewise.
15523         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
15524         argument; pass it to mono_method_get_object() to set the method's
15525         "reflected" type.       
15526
15527 2004-02-17  Martin Baulig  <martin@ximian.com>
15528
15529         * class.h (MonoDynamicGenericInst): New type.
15530         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
15531
15532         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
15533         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
15534         (ves_icall_MonoGenericInst_GetFields): New interncall.
15535
15536         * class.c (mono_class_from_generic): Don't call
15537         mono_class_initialize_generic() if this is a dynamic instance;
15538         ie. it's being created from a TypeBuilder.
15539         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
15540         `class->byval_arg.type'.
15541
15542         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
15543         to `inflate_method' and made static.
15544         (mono_reflection_inflate_field): Removed.
15545         (mono_reflection_generic_inst_initialize): New public method.
15546
15547         * reflection.h (MonoReflectionGenericInst): Removed `methods',
15548         `ctors' and `fields'; added `initialized'.
15549
15550 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
15551
15552         * debug-helpers.c (mono_method_full_name): Fix output for empty
15553         namespaces.
15554
15555 2004-02-12  Martin Baulig  <martin@ximian.com>
15556
15557         * class.h (MonoClassField): Added `MonoType *generic_type'.
15558
15559         * reflection.c (mono_image_get_fieldref_token): Added support for
15560         instantiated generic types.
15561         (field_encode_inflated_field): Removed.
15562         (mono_image_get_inflated_field_token): Removed.
15563         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
15564
15565         * reflection.h (MonoReflectionInflatedField): Removed.
15566
15567 2004-02-12  Martin Baulig  <martin@ximian.com>
15568
15569         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
15570         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
15571
15572         * reflection.c (mono_image_get_methodspec_token): Take a
15573         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
15574         (mono_image_create_token): Check whether we have a
15575         `method->signature->gen_method' and call
15576         mono_image_get_methodspec_token() if appropriate.
15577         (inflated_method_get_object): Removed.
15578         (mono_reflection_bind_generic_method_parameters): Return a
15579         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
15580         (mono_reflection_inflate_method_or_ctor): Likewise.
15581
15582         * reflection.h (MonoReflectionInflatedMethod): Removed.
15583
15584 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
15585
15586         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
15587         for custom valuetype marshalling.
15588
15589         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
15590
15591 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15592
15593         * icall.c: fixed WSAGetLastError_internal name.
15594
15595 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
15596
15597         * threads.c (mono_thread_attach): Allow this to be called multiple
15598         times for a thread.
15599         
15600         * threads.c (build_wait_tids): Do not wait for ourselves.
15601
15602         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
15603         appdomain list is empty.
15604
15605         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
15606         memory returned by mono_string_builder_to_utf16, since it points into
15607         managed memory. Thanks to Bernie Solomon for noticing this.
15608
15609         * icall.c: Add AppDomainSetup icalls.
15610
15611         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
15612
15613         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
15614         types.
15615
15616         * reflection.c (reflection_methodbuilder_to_mono_method): Save
15617         custom attributes to the method_aux struct. Also fix array indexes etc.
15618
15619         * loader.c (mono_method_get_param_names): Make dynamic case work again.
15620         
15621 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
15622
15623         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
15624         (both static and runtime) and reduce startup time.
15625
15626 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
15627
15628         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
15629         AsAny marshalling conversion instead of crashing.
15630
15631         * marshal.c: Fix warnings.
15632
15633 2004-02-09  Martin Baulig  <martin@ximian.com>
15634
15635         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
15636
15637         * reflection.h (MonoReflectionInflatedMethod): Removed the
15638         `declaring' field, it's now in the unmanaged MonoGenericMethod.
15639
15640         * reflection.c (method_encode_methodspec): Removed the `method'
15641         argument; we get it from `gmethod->declaring'.
15642         (inflated_method_get_object): Removed the `declaring' argument.
15643
15644 2004-02-09  Martin Baulig  <martin@ximian.com>
15645
15646         * class.h (MonoGenericMethod): New type.
15647         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
15648         `generic_method'.
15649
15650         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
15651         a `MonoGenericMethod *gen_method' one.
15652
15653         * class.c (mono_class_inflate_generic_type): Take an additional
15654         `MonoGenericMethod * argument.  This is only non-NULL if we're
15655         inflating types for a generic method.   
15656         (mono_class_inflate_generic_signature): Renamed to
15657         inflate_generic_signature() and made static; take a
15658         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15659         (inflate_generic_header): Take a `MonoGenericMethod *' argument
15660         instead of a `MonoGenericInst *' one.
15661         (mono_class_inflate_generic_method): Likewise.
15662
15663         * reflection.c (encode_generic_method_sig): Take a
15664         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15665         (method_encode_methodspec): Likewise.
15666         (inflated_method_get_object): Likewise. 
15667
15668         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
15669         field with a `MonoGenericMethod *gmethod' one.  
15670
15671 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
15672
15673         * class.h (mono_class_has_parent): add parens to expansion
15674         so you can ! this.
15675
15676 2004-02-08  Martin Baulig  <martin@ximian.com>
15677
15678         * image.h (MonoImage): Removed `generics_cache'.
15679
15680         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
15681         instead of a `MonoType *' argument; removed the `inflate_methods'
15682         argument.  Don't inflate methods here.
15683
15684         * loader.c (find_method): If it's a generic instance, call
15685         mono_class_init() on the `sclass->generic_inst->generic_type'.
15686
15687         * metadata.c (mono_type_size): Make this work on uninitialized
15688         generic instances; call it on the `ginst->generic_type's class.
15689
15690         * reflection.c (mono_reflection_bind_generic_parameters): Call
15691         mono_class_from_generic() to create the `ginst->klass'.
15692
15693 2004-02-08  Martin Baulig  <martin@ximian.com>
15694
15695         * class.h (MonoClass): Changed type of `generic_inst' from
15696         `MonoType *' to `MonoGenericInst *'.
15697
15698 2004-02-08  Martin Baulig  <martin@ximian.com>
15699
15700         * icall.c (ves_icall_Type_BindGenericParameters): Just call
15701         mono_type_get_object(), this is now creating a `MonoGenericInst'
15702         for MONO_TYPE_GENERICINST.
15703         (ves_icall_MonoGenericInst_GetParentType): Likewise.
15704         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
15705
15706         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
15707         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
15708         (inflated_method_get_object): Added `MonoClass *refclass' argument.
15709         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
15710         and reflected type.
15711
15712         * reflection.h (MonoReflectionInflatedMethod): Removed
15713         `declaring_type' and `reflected_type'.
15714
15715 2004-02-08  Martin Baulig  <martin@ximian.com>
15716
15717         * class.h (MonoGenericInst): Added `MonoType *parent' and
15718         `MonoType **ifaces'.
15719
15720         * reflection.h (MonoReflectionGenericInst): Removed `klass',
15721         `parent' and `interfaces'.
15722
15723         * reflection.c (mono_reflection_bind_generic_parameters): Take a
15724         `MonoType *' argument and return a `MonoType *'.
15725
15726         * icall.c
15727         (ves_icall_MonoGenericInst_GetParentType): New interncall.
15728         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
15729
15730 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
15731
15732         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
15733         valuetype marshalling.
15734
15735 2004-02-06  Martin Baulig  <martin@ximian.com>
15736
15737         * class.c
15738         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
15739         (my_mono_class_from_generic_parameter): Likewise.
15740
15741 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
15742
15743         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
15744         contents of the symbol files lazily.
15745
15746         * object.h (MonoThread): Add 'name' and 'name_len' fields.
15747
15748         * threads.h threads.c icall.c: New icalls for getting and setting the
15749         threads name.
15750
15751 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
15752
15753         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
15754         Raise an exception when the domain is not found.
15755
15756 2004-02-03  Martin Baulig  <martin@ximian.com>
15757
15758         * reflection.c (mono_image_get_methodspec_token): Use the
15759         uninflated signature; fixes gen-33.
15760
15761 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
15762
15763         * gc.c threads.c: Make the finalizer thread a normal managed thread so
15764         the finalizer code can use thread functionality.
15765
15766         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
15767         the finalizer thread.
15768
15769         * threads.c: Make some functions more robust.
15770
15771         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
15772
15773         * metadata.h: Add new marshalling conventions.
15774
15775         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
15776         stringbuilder marshalling. Fixes #53700.
15777
15778         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
15779
15780         * reflection.c (mono_image_get_type_info): Save declarative security
15781         info.
15782
15783         * reflection.c (mono_image_get_field_info): Handle uninitialized 
15784         unmanaged fields as well.
15785
15786         * appdomain.c: Bump corlib version.
15787
15788 2004-02-01  Martin Baulig  <martin@ximian.com>
15789
15790         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
15791         method type arguments.  
15792
15793 2004-01-30  Duncan Mak  <duncan@ximian.com>
15794
15795         * marshal.h: Add prototype for
15796         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
15797         and
15798         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
15799         fix the build.
15800
15801 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
15802
15803         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
15804         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
15805
15806 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
15807
15808         * marshal.c (mono_marshal_get_native_wrapper): Add support for
15809         custom marshalling of valuetypes.
15810
15811         * marshal.c: Fix some warnings.
15812
15813 2004-01-29  Martin Baulig  <martin@ximian.com>
15814
15815         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
15816         for generic method parameters.
15817
15818         * reflection.c (method_encode_methodspec): Write the uninflated
15819         signature into the methodspec table.
15820         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
15821         is always the uninflated method.
15822         (reflection_methodbuilder_to_mono_method): Copy the generic
15823         parameters from the MethodBuilder into `header->gen_params'.
15824
15825 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
15826
15827         * class.c (mono_class_from_generic_parameter): Fix warning.
15828
15829 2004-01-27  Martin Baulig  <martin@ximian.com>
15830
15831         * class.c (mono_class_from_generic_parameter): Don't create
15832         `klass->methods' here.  
15833
15834 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
15835
15836         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
15837         extension since it does not work with libraries named lib<FOO>.dll.so.
15838
15839 2004-01-25  Martin Baulig  <martin@ximian.com>
15840
15841         * class.c (mono_class_inflate_generic_type): Added support for
15842         MONO_TYPE_GENERICINST.
15843
15844         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
15845         inflate methods on open constructed types.      
15846
15847 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15848
15849         * object.c: fire ProcessExit event in the root AppDomain after running
15850         Main. Fixes bug #53299.
15851
15852 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15853
15854         * socket-io.c: include the new socket-wrappers.h header.
15855         Use the wrappers instead of the unix socket functions to make the code
15856         more clear.
15857
15858 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
15859
15860         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
15861
15862         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
15863         Fixes #22532.
15864
15865 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
15866
15867         * reflection.c (mono_image_create_pefile): Handle the case when the
15868         entry point is not a MethodBuilder.
15869
15870         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
15871         field to ReflectionMethod since it is not allways a builder.
15872
15873         * reflection.c (type_get_fully_qualified_name): New helper function to
15874         return the fully qualified name of a type.
15875
15876         * reflection.c (encode_marshal_blob): Always emit the fully qualified
15877         type name for custom marshallers.
15878
15879         * reflection.c (mono_marshal_spec_from_builder): Ditto.
15880
15881         * class.c (mono_class_setup_vtable): If a parent class already 
15882         implements an interface, use the implementing methods from that class.
15883         Fixes #53148.
15884
15885 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15886
15887         * threadpool.c: just return instead of ExitThread to allow for thread
15888         clean up earlier.
15889
15890 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
15891
15892         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
15893         when closing resource modules.
15894
15895         * reflection.c (mono_image_create_pefile): Handle the case when the
15896         entry point is not a MethodBuilder.
15897
15898         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
15899         field to ReflectionMethod since it is not allways a builder.
15900
15901 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
15902
15903         * marshal.c (mono_marshal_get_managed_wrapper): 
15904         mono_marshal_alloc takes native int so CONV_I
15905         the arg for 64bits.
15906
15907 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
15908
15909         * reflection.c (fixup_cattrs): New function to fixup the methoddef
15910         tokens in the cattr table. Fixes #53108.
15911
15912 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15913
15914         * loader.c: don't trim ".dll" before looking up in the config file.
15915         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
15916
15917 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
15918
15919         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
15920         Return the module which contains the resource as well.
15921         (ves_icall_System_Reflection_Module_Close): New icall.
15922
15923         * appdomain.c: Bump corlib version number.
15924
15925         * image.c (mono_image_addref): New public function.
15926
15927         * assembly.c: Call mono_image_addref.
15928
15929         * reflection.c (mono_module_get_object): Increase reference count of 
15930         the image.
15931
15932         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
15933         Fixes #22532.
15934
15935         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
15936         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
15937         proper exceptions on DllImport problems.
15938
15939 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
15940
15941         * class.c, metadata.c: eliminate CSIZE macro.
15942
15943 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
15944
15945         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
15946         * object.h: Added async_callback field in MonoAsyncResult.
15947         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
15948         * verify.c: Added async_callback in MonoAsyncResult layout.
15949
15950 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
15951
15952         * reflection.c (mono_reflection_get_custom_attrs): Add support
15953         for Modules.
15954
15955 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
15956
15957         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
15958         marshalling.
15959         (mono_marshal_method_from_wrapper): Add null pointer check.
15960
15961 2004-01-16  Martin Baulig  <martin@ximian.com>
15962
15963         * debug-mono-symfile.h: Set version number to 36 and reflect
15964         latest symbol writer changes.
15965
15966 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
15967
15968         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
15969         multi-dimensional arrays.
15970         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
15971         (mono_class_from_mono_type): Use bounded_array_class_get.
15972         
15973         * class.c (mono_bounded_array_class_get): New function which takes
15974         a 'bounded' bool argument to distinguish vectors from one dimensional
15975         arrays.
15976
15977         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
15978         bounded_array_class_get if the array has bounds.
15979
15980         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
15981         Search modules loaded using AssemblyBuilder:AddModule as well.
15982
15983 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15984
15985         * appdomain.c: increased corlib version.
15986         * filewatcher.c: removed g_print.
15987         * icall.c:
15988         (get_property_info): only allocate what is actually requested.
15989         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
15990
15991 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15992
15993         * Makefile.am: added filewatcher.[ch]
15994         * filewatcher.[ch]: FileSystemWatcher runtime support.
15995         * icall.c: added new FSW icalls.
15996
15997 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
15998
15999         * string-icalls.c: fix stringbuilder regression as suggested by
16000         Iain McCoy <iain@mccoy.id.au>.
16001
16002 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
16003
16004         * process.c (process_read_stringtable_block): Recognize '007f' as
16005         a language neutral stringtable block.
16006
16007 2004-01-12  Patrik Torstensson
16008
16009         * object.h (MonoStringBuilder) : Changed layout to support our
16010         new stringbuilder class.
16011         * marshal.c: Change marshalling to support the new layout of 
16012         string builder.
16013         * appdomain.c: increased version number because new layout of
16014         string builder.
16015
16016 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
16017
16018         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
16019         assembly name as an string instead of an AssemblyName, since it is
16020         easier to extract info from it.
16021
16022         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
16023         the culture subdirectories too. Fixes #52231.
16024
16025 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16026
16027         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
16028         It takes 2 new parameters with an optional name for the method to look
16029         for and case ignoring info.
16030
16031         * threadpool.c: removed unused variable.
16032
16033 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16034
16035         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
16036         It takes 2 new parameters with an optional name for the property to look
16037         for and case ignoring info.
16038         Fixes bug #52753.
16039
16040 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
16041
16042         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
16043         Fix #52451.
16044
16045 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16046
16047         * appdomain.c:
16048         * assembly.c: escape the uri before passing it to g_filename_from_uri.
16049         Fixes bug #52630.
16050
16051 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
16052
16053         * reflection.c: Add support for more than one unmanaged resource.
16054
16055         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
16056         in field->def_value, as done in all other cases.
16057
16058         * reflection.c (mono_reflection_get_custom_attrs): Add support for
16059         TypeBuilders.
16060
16061         * reflection.c (mono_reflection_create_runtime_class): Remove 
16062         errorneous assignment to klass->element_class, since it is already
16063         done in mono_reflection_setup_internal_class.
16064
16065 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16066
16067         * gc.c: added missing LeaveCriticalSection.
16068         * icall.c: indented a couple of lines.
16069         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
16070         if we call EndInvoke inside a callback. Fixes bug #52601.
16071
16072 2004-01-07  Martin Baulig  <martin@ximian.com>
16073
16074         * mono-debug-debugger.h
16075         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
16076
16077 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
16078
16079         * appdomain.c: Use messages in NotImplementedException.
16080
16081         * exception.c (mono_get_exception_not_implemented): Now this takes
16082         a message argument.
16083
16084         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
16085         exception instead of g_asserting an aborting when something is not
16086         implemented.
16087
16088         Add some inline docs.
16089
16090 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
16091
16092         * reflection.h: Update after changes to object layout.
16093
16094         * reflection.c: Implement saving of unmanaged aka win32 resources.
16095
16096         * appdomain.c: Bump version number.
16097
16098         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
16099         Handle missing domains gracefully.
16100
16101 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
16102
16103         * file-io.c : On Windows, there are much more invalid_path_chars.
16104
16105 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16106
16107         * class.h, object.c: prepare for GetType () speedup.
16108
16109 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
16110
16111         * profiler.c: workaround for --profile null reference exception on
16112           cygwin. Patch by Patrik Torstensson.
16113
16114 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
16115
16116         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
16117         make work for unaligned access.
16118
16119 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
16120
16121         * class.c: small cleanup (class->fields [i] -> field).
16122         * image.c: check address of metadata is valid.
16123
16124 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
16125
16126         * assembly.h assembly.c (mono_assembly_loaded): New public function to
16127         search the list of loaded assemblies.
16128
16129         * reflection.c (mono_reflection_type_from_name): Use 
16130         mono_assembly_loaded instead of mono_image_loaded.
16131
16132         * reflection.c: Fix warnings.
16133
16134 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
16135
16136         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
16137         is dynamic. This is needed since an assembly can contain both dynamic and
16138         non-dynamic images.
16139
16140         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
16141         assembly->dynamic.
16142
16143         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
16144
16145         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
16146         to store modules loaded using AddModule.
16147
16148         * reflection.c (mono_image_fill_file_table): Generalize this so it works
16149         on Modules.
16150
16151         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
16152
16153         * reflection.c (mono_image_fill_export_table_from_module): New function to
16154         fill out the EXPORTEDTYPES table from a module.
16155
16156         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
16157         into a separate function. Also handle loaded non-dynamic modules.
16158
16159         * reflection.c (mono_image_basic_init): Fix memory allocation.
16160
16161         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16162
16163         * assembly.c (mono_assembly_load_references): Make this public.
16164
16165 2003-12-19  Martin Baulig  <martin@ximian.com>
16166
16167         * class.c (mono_class_initialize_generic): Made this static, take
16168         a `MonoGenericInst *' instead of a `MonoClass *'.
16169         (mono_class_from_generic): Call mono_class_initialize_generic()
16170         unless we're already initialized or being called from
16171         do_mono_metadata_parse_generic_inst().
16172
16173         * class.h (MonoGenericInst): Added `initialized' and
16174         `init_pending' flags.
16175
16176         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
16177         `mono_class_init (gklass)' or mono_class_initialize_generic()
16178         here; set `generic_inst->init_pending' while parsing the
16179         `type_argv'.
16180
16181 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
16182
16183         * locales.c: include string.h for memxxx prototypes
16184
16185 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
16186
16187         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
16188         constructor when accessing literal fields.
16189
16190 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
16191
16192         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16193
16194         * reflection.c (assembly_add_resource_manifest): New function to fill
16195         the MANIFESTRESOURCE table.
16196
16197         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
16198
16199         * reflection.h: Update to changes in class layout.
16200
16201         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
16202         Reenable call to mono_runtime_is_shutting_down ().
16203
16204         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
16205         determine if the runtime is shutting down.
16206
16207 2003-12-16  Jackson Harper <jackson@ximian.com>
16208
16209         * icall.c: comment out call to mono_runtime_is_shutting_down to
16210         fix build.
16211         
16212 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
16213
16214         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
16215         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
16216
16217 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
16218
16219         * reflection.c: move definition of swap_with_size
16220         to before its first call
16221
16222 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
16223
16224         * appdomain.c (mono_runtime_is_shutting_down): New public function.
16225
16226         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
16227         icall.
16228
16229         * object.c: Fix warnings.
16230
16231         * icall.c (ves_icall_Type_Get...): Only consider inherited static
16232         members if FlattenHierarchy is set.
16233
16234         * reflection.c (mono_image_add_decl_security): New function to emit
16235         declarative security.
16236
16237         * reflection.h reflection.c: Add support for declarative security.
16238
16239         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16240         
16241 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
16242
16243         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16244         
16245         * appdomain.c verify.c: Moved corlib version checking into its own
16246         function in appdomain.c since it needs to create vtables etc.
16247
16248 2003-12-13  Patrik Torstensson <p@rxc.se>
16249
16250         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
16251         instead of unwrapped server.
16252
16253 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
16254
16255         * verify.c (check_corlib): Fix field index.
16256
16257 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
16258
16259         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
16260         GetGacPath icall.
16261
16262 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
16263
16264         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
16265         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
16266         cope with sizeof(size_t) != sizeof(guint32).
16267
16268 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16269
16270         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
16271         in case of failure.
16272
16273 2003-12-10  Mark Crichton <crichton@gimp.org>
16274
16275         * icall.c: removed the GetNonZeroBytes.  We now handle this case
16276         in managed code.
16277
16278         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
16279
16280 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
16281
16282         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
16283         marked as deleted.
16284
16285 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
16286
16287         * verify.c (check_corlib): Handle the case when the version field is 
16288         initialized by a static constructor.
16289
16290 2003-12-08  Patrik Torstensson  <p@rxc.se>
16291
16292     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
16293
16294 2003-12-08  Martin Baulig  <martin@ximian.com>
16295
16296         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
16297         a MonoReflectionGenericParameter, also take the parameter index
16298         and name as arguments.
16299         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
16300         (ves_icall_MonoGenericParam_initialize): New interncall.
16301         (ves_icall_Type_make_byref_type): New interncall.
16302
16303         * reflection.h (MonoReflectionGenericParam): Derive from
16304         MonoReflectionType, not just from MonoObject.  Added `refobj' and
16305         `index' fields.
16306
16307         * reflection.c (mono_reflection_define_generic_parameter): Create
16308         and return a new MonoReflectionGenericParam; don't initialize the
16309         constraints here.
16310         (mono_reflection_initialize_generic_parameter): New public method;
16311         initializes the constraints and creates the `param->pklass'.
16312
16313 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
16314
16315         * reflection.h reflection.c: Use the new fields 'num_types', 
16316         'num_fields' and 'num_methods' to track the number of types etc.
16317
16318         * verify.c (check_corlib): Check corlib version number.
16319
16320 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
16321
16322         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
16323         function works on all methods.
16324
16325 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
16326
16327         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
16328         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
16329         the custom_type_info flag of the transparent proxy.
16330         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
16331         objects that supports IRemotingTypeInfo.
16332         * object.h: Added custom_type_info field in transparent proxy.
16333
16334 2003-12-06  Martin Baulig  <martin@ximian.com>
16335
16336         * class.c (mono_class_create_from_generic): Removed.
16337         (mono_class_from_generic): Check `ginst->klass' before doing
16338         anything else.  This is important to fully support "recursive"
16339         generic types.
16340
16341         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
16342         empty `generic_inst->klass' before doing anything else.
16343
16344 2003-12-06  Dick Porter  <dick@ximian.com>
16345
16346         * verify.c: 
16347         * object.h:
16348         * icall.c:
16349         * locales.c: Use C structs to access class fields.  Don't do a
16350         conversion between MonoString and UChar because both are
16351         platform-endian UTF-16.  Compare now takes startindex and count
16352         parameters.  Add a char overload for IndexOf.  Speed up the
16353         invariant string IndexOf.
16354
16355 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
16356
16357         * Makefile.am (monosn_LDADD): Fix parallel build.
16358
16359 2003-12-04  Martin Baulig  <martin@ximian.com>
16360
16361         * icall.c
16362         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
16363         (ves_icall_Type_make_array_type): New interncall.       
16364
16365 2003-12-04  Martin Baulig  <martin@ximian.com>
16366
16367         * locales.c: also change it in the !HAVE_ICU case.
16368
16369 2003-12-04  Dick Porter  <dick@ximian.com>
16370
16371         * icall.c:
16372         * locales.c: construct_compareinfo is now in CompareInfo, not
16373         CultureInfo.
16374
16375 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
16376
16377         * image.c (mono_image_load_file_for_image): Cache loaded images in the
16378         image->files array.
16379
16380         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
16381         table as well.
16382
16383         * assembly.c (mono_assembly_load_references): Only load references
16384         once.
16385
16386         * class.c (mono_class_from_name): Avoid linear search of the 
16387         EXPORTEDTYPE table.
16388
16389         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
16390
16391 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
16392
16393         * image.h (MonoImage): Add 'field_cache' field.
16394
16395         * loader.c (mono_field_from_token): Cache field lookups.
16396         
16397         * reflection.c (mono_module_get_object): Fix name property.
16398
16399         * icall.c (ves_icall_get_enum_info): Update after changes to 
16400         mono_metadata_get_constant_index ().
16401
16402         * icall.c: Get rid of get_type_info icall, use a separate icall for
16403         each type property to avoid needless memory allocations. Fixes #51514.
16404
16405         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
16406         to avoid needless binary searches.
16407
16408         * class.c (class_compute_field_layout): Move the initialization of
16409         field->def_value to mono_class_vtable ().
16410
16411         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
16412         non-corlib types.
16413
16414         * object.c (mono_object_allocate): Make it inline.
16415
16416         * object.c (mono_object_allocate_spec): Make it inline.
16417         
16418 2003-12-02  Dick Porter  <dick@ximian.com>
16419
16420         * locales.c (create_NumberFormat): NumberFormatInfo construction.
16421         Patch by Mohammad DAMT (mdamt@cdl2000.com).
16422
16423 2003-12-01  Dick Porter  <dick@ximian.com>
16424
16425         * threads.c: Fix signature and call in CreateMutex and
16426         CreateEvent.
16427
16428 2003-12-01  Dick Porter  <dick@ximian.com>
16429
16430         * icall.c: 
16431         * locales.c: Implement string compares and searching
16432
16433         * object.h: Add extra Thread field
16434
16435 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
16436
16437         * reflection.c (fixup_method): Add support for MonoCMethod.
16438
16439 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
16440
16441         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
16442
16443         * reflection.c (assembly_name_to_aname): Allow extra characters in
16444         assembly names. Fixes #51468.
16445
16446 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
16447
16448         * exception.c (mono_exception_from_name_domain): New helper function.
16449
16450         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
16451         exception object in the correct domain.
16452
16453         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
16454         formatting + make a copy a the input data.
16455
16456         * loader.c (mono_get_method_from_token): Methods which contain
16457         native code do not have entries in the ImplMap.
16458
16459         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
16460         Thanks to Gonzalo for spotting this.
16461         
16462         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
16463         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
16464
16465         * assembly.h (mono_assembly_load_from): Split the second part of 
16466         assembly loading into a new public function.
16467
16468         * exception.h (mono_get_exception_bad_image_format): New function.
16469
16470 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
16471
16472         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
16473         Enumerate all modules inside a dynamic assembly. Fixes #51293.
16474         
16475         * icall.c: Add new icall for creating dynamic methods.
16476
16477         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
16478
16479         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
16480
16481         * reflection.c (mono_reflection_create_dynamic_method): New icall to
16482         create a dynamic method.
16483
16484         * reflection.c (resolve_object): New helper function.
16485
16486         * reflection.c: Generalize ReflectionMethodBuilder and the functions
16487         which manipulate it so they can also work on dynamic methods.
16488
16489         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
16490         creating the MonoReflectionMethodAux structure if it is not needed.
16491         
16492         * reflection.h verify.c: Update after changes to object layout.
16493
16494         * reflection.c (method_builder_encode_signature): Fix compilation on
16495         gcc 2.95.x.
16496
16497 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
16498
16499         * appdomain.h: Added support for context static fields. Added static_data
16500           field to MonoAppContext and renamed thread_static_fields to a more
16501           generic special_static_fields in MonoAppDomain, since it can now contain
16502           context static fields.
16503         * domain.c: Updated hashtable name.
16504         * object.c: Replaced field_is_thread_static() for a more generic
16505           field_is_special_static() which also checks for context static attribute.
16506           In mono_class_vtable(), added support for static context fields.
16507         * threads.c: Changed methods that manage thread static fields to more
16508           generic methods so they can be reused both for thread and context static
16509           data.
16510         * threads.h: Declared some new methods.
16511
16512 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
16513
16514         * reflection.h: Update after changes to the managed types.
16515
16516         * reflection.c (encode_custom_modifiers): New helper function.
16517
16518         * reflection.c (method_encode_signature): Emit custom modifiers.
16519
16520         * reflection.c (field_encode_signature): Emit custom modifiers.
16521
16522 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
16523
16524         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
16525
16526         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
16527         implementation.
16528
16529         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
16530         icall.
16531
16532         * object.c (mono_field_get_value_object): New function.
16533
16534         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
16535         specific.
16536
16537 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
16538
16539         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
16540         return a preallocated out-of-memory exception instance.
16541
16542         * object.c (out_of_memory): Use the new function.
16543
16544         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
16545         flag is before the custom modifiers. Fixes #49802.
16546
16547 2003-11-16  Martin Baulig  <martin@ximian.com>
16548
16549         * class.c (mono_class_is_open_constructed_type): Implemented the
16550         MONO_TYPE_GENERICINST case.
16551
16552 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
16553
16554         * assembly.c (mono_assembly_fill_assembly_name): New function to
16555         fill out the MonoAssemblyName structure.
16556         (mono_assembly_open): Use the new function.
16557
16558         * icall.c (fill_reflection_assembly_name): New helper function.
16559
16560         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
16561         new function.
16562
16563         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
16564
16565 2003-11-15  Martin Baulig  <martin@ximian.com>
16566
16567         * class.c (mono_class_is_open_constructed_type): New public
16568         function; checks whether a type is an open constructed type,
16569         ie. whether it still contains type parameters.
16570         (mono_class_inflate_generic_type): If we're a type parameter and
16571         the inflated type is also a MONO_TYPE_(M)VAR, return the original
16572         type.
16573
16574         * class.h (MonoGenericInst): Added `guint32 is_open'.
16575
16576         * loader.c (method_from_methodspec): Check whether we're an open
16577         or closed constructed type and set `ginst->is_open'.
16578
16579         * reflection.c (mono_reflection_bind_generic_parameters): Check
16580         whether we're an open or closed constructed type and set
16581         `ginst->is_open'.
16582         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
16583         from open constructed types.
16584
16585 2003-11-15  Martin Baulig  <martin@ximian.com>
16586
16587         * reflection.c (mono_reflection_bind_generic_parameters): If we're
16588         a generic instance (instead of a generic type declaration) with
16589         unbound generic parameters, bind them to our actual types.
16590
16591 2003-11-14  Martin Baulig  <martin@ximian.com>
16592
16593         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
16594
16595         * reflection.c (mono_reflection_bind_generic_parameters): If we're
16596         an interface type, populate `res->interfaces' with instantiated
16597         versions of all the interfaces we inherit.
16598
16599 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
16600
16601         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
16602         when MONO_PATH is set but doesn't contain the install dir.
16603
16604 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16605
16606         * icall.c:
16607         (ves_icall_Type_GetInterfaces): don't return an interface twice when
16608         it's also implemented in base classes. Fixes bug #50927.
16609
16610 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
16611
16612         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
16613         if this method is called from a finalizer. Fixes #50913.
16614
16615 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
16616
16617         * threads.c: Implement VolatileRead/VolatileWrite
16618
16619         * icall.c: Add new icalls for VolatileRead/VolatileWrite
16620
16621 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16622
16623         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
16624         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
16625         2.95.3.
16626
16627         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
16628         from Peter Ross (pro@missioncriticalit.com).
16629         
16630 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
16631
16632         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
16633
16634 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16635
16636         * assembly.c (mono_assembly_load_references): Disable check because it
16637         triggers on older corlibs which lots of people have.
16638
16639 2003-11-12  Jackson Harper  <jackson@ximian.com>
16640
16641         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
16642         load corlib.dll if mscorlib.dll is not found.
16643         * assembly.h: Remove corlib name define.
16644         * class.c:
16645         * domain.c:
16646         * image.c: Change corlib name to mscorlib.
16647         
16648 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16649
16650         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
16651
16652 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
16653
16654         * appdomain.h: Added loader_optimization here to sync with the C#
16655         code, and add disallow_binding_redirects field.
16656
16657 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
16658
16659         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
16660
16661         * reflection.c (mono_image_build_metadata): Fix crash on modules
16662         with no types.
16663
16664         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
16665
16666         * icall.c (ves_icall_get_method_info): Return callingConvention as
16667         well.
16668
16669         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
16670         namespaces from the EXPORTEDTYPE table as well.
16671
16672         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
16673         from all modules inside the assembly.
16674         
16675 2003-11-11  Martin Baulig  <martin@ximian.com>
16676
16677         * reflection.c (mono_reflection_bind_generic_parameters): Make
16678         this work for interfaces.
16679
16680 2003-11-11  Martin Baulig  <martin@ximian.com>
16681
16682         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
16683
16684 2003-11-11  Martin Baulig  <martin@ximian.com>
16685
16686         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
16687         "MonoInflatedMethod" and "MonoInflatedCtor".
16688
16689 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
16690
16691         * reflection.c (resolution_scope_from_image): Use the assembly table
16692         from the manifest module, since other modules don't have it.
16693
16694         * debug-helpers.c (mono_type_full_name): New helper function.
16695
16696         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
16697
16698         * image.c (mono_image_load_file_for_image): New public function which
16699         is a replacement for the load_file_for_image in class.c.
16700
16701         * assembly.c (mono_assembly_load_module): A wrapper for the function
16702         above which does assembly association and reference loading too.
16703
16704         * class.c (mono_class_from_name): Call mono_assembly_load_module.
16705
16706 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16707
16708         * appdomain.c: not all of the attributes for the full assembly name
16709         are required and the order doesn't matter. Fixes bug #50787.
16710
16711 2003-11-10  Dick Porter  <dick@ximian.com>
16712
16713         * locales.c: Use platform-endian UTF16
16714
16715 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
16716
16717         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
16718         
16719 2003-11-10  Martin Baulig  <martin@ximian.com>
16720
16721         * metadata.c
16722         (mono_metadata_load_generic_params): Make this actually work.
16723
16724         * reflection.c (mono_reflection_bind_generic_parameters): If our
16725         parent is a generic instance, pass all the `types' to it, no
16726         matter whether it has the same number of type parameters or not.
16727
16728 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
16729
16730         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
16731
16732         * assembly.c (mono_assembly_load_references): Move the image<->assembly
16733         assignment code to this function so it gets called recursively for all
16734         modules.
16735
16736         * image.c (load_modules): Remove the assembly assignment since it is
16737         now done by mono_assembly_load_references.
16738         
16739         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
16740         Add 'module' argument.
16741         (mono_module_get_types): New helper function.
16742         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
16743
16744 2003-11-08  Martin Baulig  <martin@ximian.com>
16745
16746         * class.c (mono_class_inflate_generic_method): Interface method
16747         don't have a header.
16748
16749         * reflection.c (mono_image_get_methodspec_token): Take an
16750         additional `MonoGenericInst *' argument instead of reading it from
16751         the header; this is necessary to support interfaces.
16752         (mono_image_create_token): Pass the `MonoGenericInst *' from the
16753         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
16754         (inflated_method_get_object): Take an additional `MonoGenericInst *'
16755         argument.
16756
16757         * reflection.h (MonoReflectionInflatedMethod): Added
16758         `MonoGenericInst *ginst'.
16759
16760 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
16761
16762         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
16763
16764 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
16765
16766         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
16767
16768 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
16769
16770         * reflection.c 
16771         (reflection_methodbuilder_from_method_builder):
16772         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
16773         initialize a ReflectionMethodBuilder structure.
16774         (mono_image_get_methodbuilder_token):
16775         (mono_image_get_ctorbuilder_token): New functions to emit memberref
16776         tokens which point to types in another module inside the same assembly.
16777
16778         * reflection.c: Use the new helper functions.
16779         
16780         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
16781
16782         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
16783         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
16784
16785         * reflection.c (resolution_scope_from_image): Emit a moduleref if
16786         neccesary.
16787
16788         * reflection.c (mono_image_build_metadata): Emit metadata only for the
16789         current module. Emit the manifest only for the main module.
16790
16791         * reflection.c (mono_image_create_token): Add assertion when a 
16792         memberref needs to be created.
16793
16794         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
16795
16796         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
16797         larger buffer for the custom attribute blob. Fixes #50637.
16798         
16799 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16800
16801         * threadpool.c: notify listener on async processing handles after
16802         invoking the async callback. Thanks to Zoltan.
16803
16804 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
16805
16806         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
16807         avoid code duplication.
16808
16809         * reflection.h (MonoDynamicImage): New type which is currently unused,
16810         but will be used through the ref.emit code in place of 
16811         MonoDynamicAssembly.
16812
16813         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
16814         object layout.
16815
16816         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
16817         a MonoDynamicImage instead of just a MonoImage.
16818         
16819         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
16820         icalls to ModuleBuilder but keep their semantics, so they will work
16821         with moduleb->assemblyb. This will change later.
16822         
16823 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
16824
16825         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
16826         object layout.
16827
16828         * reflection.c (mono_image_build_metadata): Avoid creation of a default
16829         main module, since it is now done by the managed code.
16830
16831 2003-11-03  Martin Baulig  <martin@ximian.com>
16832
16833         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
16834         `ginst->klass' here.
16835         (method_encode_methodspec): Don't use the `ginst->generic_method's
16836         klass if it's a generic instance, use `ginst->klass' in this case.
16837
16838 2003-11-03  Martin Baulig  <martin@ximian.com>
16839
16840         * reflection.c (mono_image_get_generic_method_param_info):
16841         Removed, use mono_image_get_generic_param_info() instead.
16842         (mono_image_get_type_info): Write the GenericParam table before
16843         the Method table.  This is neccessary because in the GenericParam
16844         table, type parameters of the class (ie. '!0' etc.) must come
16845         before the ones from its generic methods (ie. '!!0' etc).
16846
16847 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
16848
16849         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
16850
16851 2003-11-02  Martin Baulig  <martin@ximian.com>
16852
16853         * reflection.c (create_generic_typespec): Take a
16854         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
16855         the generic parameters from it.
16856
16857 2003-11-02  Martin Baulig  <martin@ximian.com>
16858
16859         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
16860         instead of a `MonoClassField *' since we just need the type.
16861         (create_generic_typespec): New static function.  Creates a
16862         TypeSpec token for a generic type declaration.
16863         (mono_image_get_generic_field_token): New static function.
16864         (mono_image_create_token): If we're a FieldBuilder in a generic
16865         type declaration, call mono_image_get_generic_field_token() to get
16866         the token.
16867
16868 2003-11-02  Martin Baulig  <martin@ximian.com>
16869
16870         * reflection.h
16871         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
16872         `MonoReflectionGenericInst *declaring_type' and
16873         `MonoReflectionGenericInst *reflected_type' fields.
16874
16875         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
16876         `MonoReflectionGenericInst *declaring_type' and a
16877         `MonoReflectionGenericInst *reflected_type' argument instead of a
16878         single `MonoReflectionGenericInst *type' one.  Set
16879         `res->declaring_type' and `res->reflected_type' from them.
16880         (mono_reflection_inflate_field): Likewise.      
16881
16882 2003-11-02  Martin Baulig  <martin@ximian.com>
16883
16884         * class.c (mono_class_setup_vtable): Don't store generic methods
16885         in the vtable.  
16886
16887 2003-11-02  Martin Baulig  <martin@ximian.com>
16888
16889         * reflection.h (MonoReflectionGenericInst): Added
16890         `MonoReflectionType *declaring_type'.
16891
16892         * reflection.c (mono_reflection_bind_generic_parameters): Use
16893         `if (tb->parent)' instead of `klass->parent'.
16894
16895 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
16896
16897         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
16898         with an empty ASSEMBLY table.
16899
16900         * reflection.c (mono_image_build_metadata): Avoid using the same loop
16901         variable in the inner and outer loops.
16902
16903 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
16904
16905         * metadata.h (mono_metadata_make_token): Put parentheses around macro
16906         argument.
16907
16908         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
16909         
16910         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
16911         icalls. Instead, do everything in managed code. This is needed since
16912         it is hard to restore the original domain etc. in unmanaged code in the
16913         presence of undeniable exceptions.
16914
16915         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
16916         New icalls to push and pop appdomain refs.
16917
16918 2003-10-31  Martin Baulig  <martin@ximian.com>
16919
16920         * class.c (inflate_generic_type): Renamed to
16921         mono_class_inflate_generic_type() and made it public.
16922
16923         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
16924         New interncall.
16925
16926         * loader.c (mono_field_from_memberref): Also set the retklass for
16927         typespecs.
16928
16929         * fielder.c (mono_image_get_inflated_field_token): New static
16930         method; creates a metadata token for an inflated field.
16931         (mono_image_create_token, fixup_method): Added support for
16932         "MonoInflatedField".
16933         (fieldbuilder_to_mono_class_field): New static function.
16934         (mono_reflection_inflate_field): New public function.
16935
16936         * reflection.h
16937         (MonoReflectionGenericInst): Added `MonoArray *fields'.
16938         (MonoReflectionInflatedField): New typedef.     
16939
16940 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
16941
16942         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
16943         for Solaris and other platforms without s6_addr16
16944
16945 2003-10-30  Martin Baulig  <martin@ximian.com>
16946
16947         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
16948         argument instead of two.
16949         (mono_class_inflate_generic_signature): Likewise.
16950         (inflate_generic_header): Likewise.
16951         (mono_class_inflate_generic_method): Likewise.  In addition, if
16952         `ginst->klass' is set, it becomes the new `method->klass'.
16953
16954         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
16955         field.
16956
16957         * reflection.c (encode_generic_method_sig): Write a 0xa as the
16958         first byte. [FIXME]
16959         (method_encode_methodspec): If we have generic parameters, create
16960         a MethodSpec instead of a MethodRef.
16961         (fixup_method): Added support for "MonoInflatedMethod" and
16962         "MonoInflatedCtor".
16963         (mono_image_create_token): Added support for "MonoInflatedMethod"
16964         and "MonoInflatedCtor".
16965         (inflated_method_get_object): New static function; returns a
16966         managed "System.Reflection.MonoInflatedMethod" object.
16967         (mono_reflection_bind_generic_method_parameters): Return a
16968         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
16969         (mono_reflection_inflate_method_or_ctor): Likewise.
16970         (mono_image_get_generic_method_param_info): Initialize unused
16971         fields to zero.
16972         (mono_image_get_generic_param_info): Likewise.
16973
16974         * reflection.h (MonoReflectionInflatedMethod): New public
16975         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
16976         "S.R.MonoInflatedCtor" classes.
16977
16978         * loader.c (method_from_memberref): If we're a TypeSpec and it
16979         resolves to a generic instance, inflate the method.
16980
16981 2003-10-28  Dick Porter  <dick@ximian.com>
16982
16983         * object.c (mono_runtime_run_main): Convert command-line arguments
16984         into utf8, falling back to the user's locale encoding to do so.
16985
16986 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
16987
16988         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
16989         at this time.
16990
16991         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
16992
16993         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
16994         up icalls at method definition time. Partially fixes #33569.
16995
16996 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
16997
16998         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
16999         marshalling of arrays. Fixes #50116.
17000
17001         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
17002
17003         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
17004         points to a vtable in the dying appdomain.
17005
17006         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
17007         listeners into unmanaged code inside the lock.
17008
17009         * object.c (mono_class_vtable): Turn off typed allocation in non-root
17010         domains and add some comments.
17011
17012 2003-10-25  Martin Baulig  <martin@ximian.com>
17013
17014         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
17015
17016         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
17017
17018         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
17019         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
17020         currently parsing.  Create the generic class and store it in
17021         `generic_inst->klass' before parsing the type arguments.  This is
17022         required to support "recursive" definitions; see mcs/tests/gen-23.cs
17023         for an example.
17024         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
17025         to support recursive typespec entries.
17026
17027         * class.c (mono_class_setup_parent): If our parent is a generic
17028         instance, we may get called before it has its name set.
17029         (mono_class_from_generic): Splitted into
17030         mono_class_create_from_generic() and mono_class_initialize_generic().
17031
17032 2003-10-25  Martin Baulig  <martin@ximian.com>
17033
17034         * icall.c (ves_icall_Type_BindGenericParameters): Return a
17035         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
17036         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
17037         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
17038
17039         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
17040         (create_typespec): Likewise.
17041         (mono_reflection_bind_generic_parameters): Return a
17042         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
17043         (mono_reflection_inflate_method_or_ctor): New public function.
17044
17045         * reflection.h (MonoReflectionGenericInst): New typedef.        
17046
17047 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
17048
17049         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
17050         inside the domain lock. Fixes #49993.
17051         
17052         * object.c (mono_class_vtable): When typed allocation is used, 
17053         allocate vtables in the GC heap instead of in the mempool, since the
17054         vtables contain GC descriptors which are used by the collector even
17055         after the domain owning the mempool is unloaded.
17056
17057         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
17058
17059         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
17060         reflect what it does. Also invalidate mempools instead of freeing
17061         them if a define is set.
17062
17063         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
17064         of the appdomain.
17065         
17066         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
17067         hold the finalizable objects in this domain.
17068
17069         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
17070         appdomain.
17071
17072         * appdomain.c (mono_domain_set): New function to set the current
17073         appdomain, but only if it is not being unloaded.
17074
17075         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
17076         appdomain which is being unloaded.
17077         
17078         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
17079         unloading of the root appdomain.
17080
17081         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
17082         icall to execute a method in another appdomain. Intended as a 
17083         replacement for InternalSetDomain, which can confuse the code 
17084         generation in the JIT.
17085
17086         * appdomain.c (mono_domain_is_unloading): New function to determine
17087         whenever an appdomain is unloading.
17088
17089         * appdomain.c (mono_domain_unload): New function to correctly unload
17090         an appdomain.
17091
17092         * assembly.c (mono_assembly_load_references): Check that an assembly
17093         does not references itself.
17094
17095         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
17096         domain manually, it asks the finalizer thread to do it, then waits for
17097         the result. Also added a timeout.
17098
17099         * icall.c: Register the new icalls.
17100
17101         * threads.h threads.c: Export the mono_gc_stop_world and 
17102         mono_gc_start_world functions.
17103         
17104         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
17105         function to fill out the mempool with 0x2a.
17106
17107 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
17108
17109         * reflection.h (MonoReflectionMethodAux): New structure to store
17110         information which is rarely used, thus is not in the MonoMethod
17111         structure.
17112
17113         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
17114         store the aux info.
17115
17116         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
17117         and marshalling info into the aux structure.
17118
17119         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
17120         from the aux structure.
17121
17122         * loader.c (mono_method_get_param_names): Retrieve the param names from
17123         the aux structure.
17124         
17125 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
17126
17127         * exception.h exception.c: Add AppDomainUnloadedException && fix 
17128         warning.
17129
17130 2003-10-21  Dick Porter  <dick@ximian.com>
17131
17132         * socket-io.c
17133         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
17134         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
17135
17136 2003-10-21  Martin Baulig  <martin@ximian.com>
17137
17138         * reflection.c (mono_reflection_bind_generic_parameters):
17139         `klass->parent' is NULL for interfaces.
17140
17141 2003-10-21  Martin Baulig  <martin@ximian.com>
17142
17143         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17144
17145 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
17146
17147         * exception.c (mono_exception_from_name_msg): New helper function for
17148         creating exceptions and initializing their message field.
17149
17150         * exception.c: Simplify functions using the new helper.
17151
17152         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
17153         New function.
17154
17155         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
17156         mono_raise_exception, since otherwise gcc doesn't generate the function
17157         epilog for raise_exception, confusing the stack unwinding in the JIT.
17158         Fixes #45043.
17159
17160         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
17161         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
17162         Fixes #49499.
17163
17164 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17165
17166         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
17167         utf8.
17168
17169 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
17170
17171         * icall.c: Removed GetUninitializedObject method because
17172           AllocateUninitializedClassInstance does the same.
17173
17174 2003-10-18  Martin Baulig  <martin@ximian.com>
17175
17176         * class.c (inflate_generic_signature): Renamed to
17177         mono_class_inflate_generic_signature() and made it public.
17178         (my_mono_class_from_generic_parameter): New static function; if we
17179         don't already have the generic parameter's MonoClass, create a
17180         very simple one which is just used internally in the runtime and
17181         not passed back to managed code.
17182
17183         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
17184
17185         * metadata.h (MonoMethodSignature): Moved the
17186         `MonoGenericParam *gen_params' to the MonoMethodHeader.
17187         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
17188
17189         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
17190         ves_icall_MonoMethod_GetGenericArguments(); this is now an
17191         interncall on the MonoMethod class, not on MethodInfo.
17192         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
17193         calling mono_reflection_bind_generic_method_parameters() directly.
17194
17195         * loader.c (mono_method_get_signature): If this is a MethodSpec;
17196         return the already computed `method->signature'.
17197         (method_from_methodspec): New static function to load a method
17198         from a MethodSpec entry.
17199         (mono_get_method_from_token): Call the new method_from_methodspec()
17200         for MethodSpec tokens.  
17201         (mono_get_method_from_token): If we're a generic method, load the
17202         type parameters.
17203
17204         * reflection.c (mono_image_get_memberref_token): Allow
17205         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
17206         table.
17207         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
17208         (mono_image_create_token): First check whether it's a generic
17209         method (so we'd need to create a MethodSpec), then do the other
17210         two alternatives.
17211         (mono_reflection_bind_generic_method_parameters): Return a
17212         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
17213         called directly from the interncall.
17214
17215 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
17216
17217         * reflection.c (load_public_key): Move loading of the public key
17218         into managed code.
17219
17220         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
17221
17222         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
17223         fields.
17224
17225         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
17226         culture, hash_alg and public_key. Fixes #49555.
17227
17228 2003-10-17  Martin Baulig  <martin@ximian.com>
17229
17230         * class.h (MonoGenericInst): Moved this declaration here and added
17231         `MonoMethod *generic_method'.
17232
17233         * icall.c
17234         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
17235         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
17236
17237         * metadata.c (mono_metadata_type_equal): Two types of
17238         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
17239         index; ie. don't compare the address of the `MonoGenericParam'
17240         structure.
17241         (mono_metadata_load_generic_params): Removed the `MonoMethod
17242         *method' argument.
17243
17244         * metadata.h (MonoGenericInst): Moved declaration to class.h.
17245         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
17246
17247         * reflection.c (method_encode_signature): Encode the number of
17248         generic parameters.
17249         (encode_generic_method_sig): New static function.
17250         (method_encode_methodspec): New static function; creates an entry
17251         in the MethodSpec table for a generic method.
17252         (mono_image_get_methodspec_token): New static function.
17253         (mono_image_create_token): Call mono_image_get_methodspec_token()
17254         for generic methods.
17255         (mono_reflection_bind_generic_method_parameters): New public
17256         function.  Instantiates a generic method.
17257
17258 2003-10-16  Martin Baulig  <martin@ximian.com>
17259
17260         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
17261         *gen_params' here from MonoMethodHeader.
17262
17263         * metadata.c (mono_metadata_parse_method_signature): If we have
17264         generic parameters, initialize `method->gen_params' and then set
17265         the correct `type->data.generic_param' in all the parameters.
17266
17267 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
17268
17269         * threads.c (mono_threads_get_default_stacksize): New function to 
17270         return the default stacksize.
17271
17272         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
17273         termination of the finalizer thread, since the previous method had
17274         race conditions. Fixes #49628.
17275
17276         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
17277         as for the other managed threads.
17278
17279 2003-10-16  Martin Baulig  <martin@ximian.com>
17280
17281         * class.c (inflate_generic_signature): Copy `generic_param_count'
17282         and `gen_params'.
17283
17284         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
17285         New interncall.
17286
17287         * metadata.c (mono_metadata_parse_method_signature): Actually set
17288         the `method->generic_param_count' here.
17289         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
17290
17291 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
17292
17293         * object.h: Add a new field to TypedRef to simplify the implementation
17294         of the REFANY opcodes in the JIT.
17295
17296         * icall.c: Make use of the new field.
17297
17298         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
17299         dynamically.
17300
17301 2003-10-15  Martin Baulig  <martin@ximian.com>
17302
17303         * class.c (mono_class_from_gen_param): Renamed to
17304         mono_class_from_generic_parameter() and moved most of the
17305         functionality from mono_reflection_define_generic_parameter()
17306         here; ie. we create a "real" class here.
17307         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
17308         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
17309         previously been called.
17310
17311         * class.h (MonoGenericParam): Moved the declaration of this struct
17312         here from metadata.h and added `MonoMethod *method'.
17313
17314         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
17315         interncall.
17316
17317         * loader.c (mono_get_method_from_token): If we have any generic
17318         parameters, call mono_metadata_load_generic_params() to read them
17319         from the MONO_TABLE_GENERICPAR.
17320
17321         * metadata.c (mono_metadata_load_generic_params): Added
17322         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
17323
17324         * metadata.h (MonoMethodSignature): Replaced
17325         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
17326         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
17327
17328         * reflection.c (mono_reflection_define_generic_parameter): Moved
17329         most of the functionality into the new
17330         mono_class_from_generic_parameter(); set the `method' field if
17331         we're a method parameter.       
17332
17333 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
17334
17335         * marshal.c (emit_struct_conv): if native size is 0
17336         emit no code.
17337
17338 2003-10-14  Martin Baulig  <martin@ximian.com>
17339
17340         * icall.c: The generics API has changed in the spec since it was
17341         added to System.Type; these modifications make it match the spec
17342         again.
17343         (ves_icall_Type_GetGenericParameters): Renamed to
17344         `ves_icall_Type_GetGenericArguments'.
17345         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
17346         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
17347         `ves_icall_MonoType_get_HasGenericArguments'.
17348         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
17349         `ves_icall_MonoType_get_IsGenericParameter'.
17350         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
17351         this is no interncall anymore.
17352         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
17353         `ves_icall_TypeBuilder_get_IsGenericParameter'.
17354
17355 2003-10-14  Martin Baulig  <martin@ximian.com>
17356
17357         * reflection.c (mono_reflection_bind_generic_parameters): Also
17358         inflate generic methods if we're reading the class from IL.
17359
17360 2003-10-13  Martin Baulig  <martin@ximian.com>
17361
17362         * reflection.c (mono_reflection_define_generic_parameter): This
17363         method isn't called directly from the icall anymore; take a
17364         `MonoReflectionAssemblyBuilder *' so we can use this for type and
17365         method generic parameters.
17366         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
17367         (method_builder_encode_signature): Encode generic parameters.
17368         (mono_image_get_method_info): Write generic params to the
17369         MONO_TABLE_GENERICPARAM table.
17370
17371         * reflection.h (MonoReflectionMethodBuilder): Added
17372         `MonoArray *generic_params'.
17373
17374         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
17375
17376         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
17377         wrapper for mono_reflection_define_generic_parameter().
17378         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
17379
17380 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
17381
17382         * marshal.h: Add missing function to fix build.
17383
17384         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
17385         the SetLastError pinvoke attribute.
17386
17387         * marshal.c (mono_marshal_set_last_error): New helper function called
17388         by the generated code.
17389         
17390         * marshal.c (mono_mb_emit_branch): New helper function.
17391
17392         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
17393
17394         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
17395         classes as parameters and return values of delegates. Fixes #29256. 
17396
17397 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
17398
17399         * locales.c: use gint32 in non HAVE_ICU case
17400
17401 2003-10-11  Martin Baulig  <martin@ximian.com>
17402
17403         * mono-debug.c (mono_debug_add_method): Added a workaround for
17404         bug #48591.
17405
17406 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
17407
17408         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
17409         delegates passed to native code must use the STDCALL calling 
17410         convention. Fixes #35987.
17411
17412 2003-10-10  Martin Baulig  <martin@ximian.com>
17413
17414         * class.c (inflate_generic_type): If we're inflating for a generic
17415         type instance (and not for a generic method), return
17416         MONO_TYPE_MVAR unchanged.
17417
17418 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17419
17420         * string-icalls.c: Join ignores null strings in the source array.
17421         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
17422         * threads.c: GetAvailableTheads is slightly more accurate.
17423
17424 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
17425
17426         * threads.h threads.c : add mono_threads_set_default_stacksize
17427         and pass default to CreateThread calls.
17428
17429 2003-10-09  Dick Porter  <dick@ximian.com>
17430
17431         * icall.c:
17432         * locales.h:
17433         * locales.c: Internal calls for constructing CultureInfo and
17434         related objects from libicu (if its available.)
17435
17436 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
17437
17438         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
17439
17440 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17441
17442         * threadpool.c: added an argument to async_invoke_thread that is the
17443         item to process, pass the MonoAsyncResult to the thread start function
17444         when creating a new thread. This way we don't need to acquire any lock
17445         when we're creating a new thread. Readded a semaphore for faster
17446         response times (instead of that Sleep i added).
17447
17448 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
17449
17450         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17451         get daylight change dates better on Windows, fix handling
17452         of platforms without tm_gmtoff.
17453
17454 2003-10-06  Martin Baulig  <martin@ximian.com>
17455
17456         * class.c (inflate_generic_method): Renamed to
17457         mono_class_inflate_generic_method() and made public.
17458         (mono_class_init): Don't inflate the generic methods here.
17459         (mono_class_from_generic): Added `gboolean inflate_methods'
17460         argument.  Inflate the methods here.
17461
17462         * loader.c (mono_method_get_param_names): Ignore instances of
17463         generic types for the moment.
17464
17465         * reflection.c (fixup_method): Added support for inflated methods.
17466         (mono_image_create_token): Use mono_image_get_methodref_token()
17467         for inflated methods.
17468         (mono_custom_attrs_from_param): Ignore instances of generic types
17469         for the moment.
17470         (mono_reflection_bind_generic_parameters): New public function.
17471         Moved all the functionality from
17472         ves_icall_Type_BindGenericParameters() here and added support for
17473         dynamic types.
17474         (mono_reflection_define_generic_parameter): Initialize
17475         `klass->methods' here.
17476
17477         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
17478         functionality into mono_reflection_define_generic_parameter().
17479         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
17480         TypeBuilder, return that TypeBuilder.
17481
17482 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17483
17484         * appdomain.c: removed mono_delegate_semaphore.
17485
17486         * threadpool.c:
17487         (mono_thread_pool_add): moved hash table creation inside and the thread 
17488         creation outside of the critical region.
17489         (mono_thread_pool_finish): removed obsolete code.
17490         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
17491         continue or exit the thread depending on the queue.
17492
17493 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
17494
17495         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
17496         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
17497         handle more bool marshalling options
17498
17499 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
17500
17501         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
17502         arrays of structs. Also add a more descriptive error message when
17503         a structure member is marshalled as LPArray.
17504
17505 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
17506
17507         * marshal.c (mono_marshal_get_native_wrapper): Add support for
17508         marshalling arrays of complex types. Fixes #29098. Also remove an
17509         usused and incomplete function.
17510
17511 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
17512
17513         * gc.c: report heap_size - free_bytes as total memory allocated
17514         (bug#49362).
17515
17516 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
17517
17518         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
17519         fix timezone handling problems on Windows.
17520         
17521         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
17522         asserts when the year is outside the range handled by ms the functions.
17523
17524         * class.c (setup_interface_offsets): If the class is an interface,
17525         fill out its interface_offsets slot.
17526
17527 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17528
17529         * threadpool.c: mark threadpool threads as background.
17530
17531 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
17532
17533         * decimal.c - define DECINLINE to nothing if not using GCC
17534
17535 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
17536
17537         * assembly.c: More refcount fixes.
17538
17539 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17540
17541         * string-icalls.c: if we're not trimming, return the same string.
17542         When not splitting, don't create a new string.
17543
17544 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17545
17546         * image.c:
17547         (mono_image_open): increment the ref_count inside the critical section.
17548
17549 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
17550
17551         * image.c (mono_image_open): Fix reference counting bug.
17552
17553 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
17554
17555         * marshal.c (mono_marshal_type_size) struct alignment changed for 
17556         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
17557         64bits. Avoid leak in mono_marshal_get_native_wrapper when
17558         mono_lookup_pinvoke_call throws.        
17559
17560 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
17561
17562         * reflection.c (mono_reflection_parse_type): Fix #49114.
17563
17564         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
17565         temporary workaround for cygwin header problem.
17566
17567         * object.c (mono_object_isinst): Synchronize this with the code
17568         generated by the JIT for casts.
17569
17570 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
17571
17572         * reflection.c (encode_type): Fix #38332.
17573
17574 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
17575
17576         * marshal.c (mono_marshal_method_from_wrapper): New function to return
17577         the original method from the wrapper method.
17578
17579 2003-09-25  Martin Baulig  <martin@ximian.com>
17580
17581         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
17582         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
17583         (ves_icall_Type_get_IsGenericInstance): New interncall.
17584
17585 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
17586
17587         * object.c: fix cast warning in big endian code.
17588
17589 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
17590
17591         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
17592         
17593 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17594
17595         * assembly.c: don't call check_env from mono_assembly_load. It's
17596         already done once in mono_assemblies_init and may cause headaches when
17597         multiple threads are loading assemblies.
17598
17599 2003-09-19  Martin Baulig  <martin@ximian.com>
17600
17601         * reflection.c (mono_reflection_define_generic_parameter): Don't
17602         allocate `klass->methods', set `klass->flags' to
17603         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
17604
17605 2003-09-18  Martin Baulig  <martin@ximian.com>
17606
17607         * class.c (mono_class_init): Don't create `class->methods' if it's
17608         already initialized.
17609
17610         * metadata.c (mono_metadata_load_generic_params): Make this
17611         actually work.
17612
17613         * reflection.c (mono_reflection_define_generic_parameter): Set
17614         parent class and interfaces from the constraints.
17615
17616         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
17617         to keep this struct in sync with the declaration in TypeBuilder.cs.
17618
17619 2003-09-17  Martin Baulig  <martin@ximian.com>
17620
17621         * metadata.h (MonoType): Replaced the data's `int type_param'
17622         field with `MonoGenericParam *generic_param'.
17623         (MonoGenericParam): Added `MonoClass *klass'.
17624
17625         * class.c (mono_class_from_gen_param): Removed the
17626         `MonoImage *image' and `int type_num' arguments.
17627
17628         * metadata.c (mono_metadata_parse_generic_param): New static
17629         method; creates a MonoGenericParam which just contains the index.
17630         (do_mono_metadata_parse_type): Call
17631         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
17632         MONO_TYPE_MVAR.
17633
17634         * reflection.c (mono_image_typedef_or_ref): Generic type
17635         parameters may be in the same assembly, but never use a typedef
17636         for them.
17637         (mono_reflection_define_generic_parameter): We're now creating a
17638         "real" class for the type parameter; it's now safe to call
17639         mono_class_from_mono_type() on the class'es type, it'll do the
17640         right thing.
17641
17642 2003-09-16  Martin Baulig  <martin@ximian.com>
17643
17644         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
17645         `symfile->range_entry_size' and `symfile->class_entry_size' here;
17646         the `symfile' data structure must be fully initialized before it
17647         gets added to the table.
17648
17649 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
17650
17651         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
17652
17653         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
17654         class init trampolines.
17655
17656 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
17657
17658         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
17659         to the built-in profiler to turn off time and allocation profiling
17660         respectively.
17661
17662 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
17663
17664         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
17665         g_direct_equal.
17666
17667         * debug-helpers.c (mono_method_full_name): Print the wrapper type
17668         in human readable form.
17669
17670 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
17671
17672         * reflection.c icall.c: Fixed warnings.
17673
17674         * image.c (load_class_names): Use a temporary hash table to hold the
17675         namespaces in order to avoid doing many string comparisons.
17676
17677         * image.h: Fix typo.
17678
17679         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
17680         Pass NULL instead of g_direct_equal to the GHashTable constructor 
17681         since the NULL case is short-circuited inside g_hash_table_lookup, 
17682         leading to better performance.  
17683
17684         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
17685         obtain the first custom attribute for a given index. Depends on the
17686         CustomAttribute table being sorted by the parent field.
17687
17688         * reflection.c (mono_custom_attrs_from_index): Use the new function 
17689         for better performance.
17690
17691 2003-09-07  Martin Baulig  <martin@ximian.com>
17692
17693         * class.c (mono_class_init): If we're a generic instance, inflate
17694         all our methods instead of loading them from the image.
17695         (mono_class_from_generic): Set `class->methods = gklass->methods'.
17696
17697 2003-09-07  Martin Baulig  <martin@ximian.com>
17698
17699         * mono-debug-debugger.c: Added support for constructors.
17700
17701 2003-09-06  Martin Baulig  <martin@ximian.com>
17702
17703         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
17704         New interncall.
17705
17706         * reflection.c (mono_reflection_setup_generic_class): Call
17707         ensure_runtime_vtable() to create the vtable.
17708
17709 2003-09-05  Martin Baulig  <martin@ximian.com>
17710
17711         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
17712         MONO_TYPE_MVAR.
17713
17714 2003-09-04  Martin Baulig  <martin@ximian.com>
17715
17716         * reflection.c (mono_reflection_define_generic_parameter): Generic
17717         parameters start with zero.
17718
17719 2003-09-04  Martin Baulig  <martin@ximian.com>
17720
17721         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17722
17723         * reflection.h (MonoReflectionGenericParam): New typedef.
17724         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
17725         the generic parameters from the managed TypeBuilder.
17726
17727         * reflection.c (mono_reflection_define_generic_parameter): New function.
17728         (mono_reflection_create_runtime_class): Encode generic parameters.
17729         (mono_reflection_setup_generic_class): New function; this is
17730         called after adding adding all generic params to the TypeBuilder.
17731         (encode_type): Added MONO_TYPE_VAR.
17732
17733 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
17734
17735         * class.h class.c (mono_class_needs_cctor_run): Moved this method
17736         here from the JIT.
17737
17738         * assembly.h assembly.c: Moved the AOT loading code into an assembly
17739         load hook.
17740
17741 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
17742
17743         * reflection.h reflection.c class.h class.c: Delete duplicate 
17744         definition of mono_type_get_name () from reflection.c and export the
17745         one in class.c.
17746
17747         * class.c: Class loading fixes from Bernie Solomon 
17748         (bernard@ugsolutions.com).
17749
17750         * reflection.c: Endianness fixes from Bernie Solomon 
17751         (bernard@ugsolutions.com).
17752         
17753 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
17754
17755         * assembly.h assembly.c: Define a file format version for AOT
17756         libraries.
17757         
17758         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
17759
17760         * appdomain.h (MonoJitInfo): New field to determine whenever the
17761         code is domain neutral.
17762         
17763 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
17764
17765         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
17766
17767 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
17768
17769         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
17770         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
17771         Avoid caching the result since strings must be domain specific. Fixes
17772         #48050.
17773
17774 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
17775
17776         * marshal.c (mono_marshal_init): Make this callable multiple times
17777         since it is hard to find a correct place to call it.
17778
17779         * object.c (mono_runtime_class_init): Execute static constructors in
17780         the correct appdomain.
17781
17782         * image.c (build_guid_table): Handle the case when multiple images have
17783         the same GUID.
17784
17785 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17786
17787         * icall.c: added a couple of icalls for System.Web.
17788
17789 2003-08-28  Martin Baulig  <martin@ximian.com>
17790
17791         * icall.c (ves_icall_Type_BindGenericParameters): Use
17792         `klass->generic_inst' instead of `&klass->byval_arg' in the
17793         mono_type_get_object() call.  The returned type must be
17794         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
17795
17796 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
17797
17798         * NOTES: New file.
17799
17800         * object.c (mono_class_proxy_vtable): Make it thread safe.
17801
17802         * pedump.c: Fix warning.
17803
17804         * object.c appdomain.h: Get rid of metadata_section. 
17805         It is no longer needed and it was causing deadlocks with domain->lock.
17806
17807         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
17808
17809 2003-08-26  Martin Baulig  <martin@ximian.com>
17810
17811         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
17812
17813 2003-08-26  Martin Baulig  <martin@ximian.com>
17814
17815         * pedump.c (main): Call mono_metadata_init(),
17816         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
17817         and mono_loader_init().
17818
17819 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
17820
17821         * loader.h: Add missing include to fix build.
17822
17823         * image.h: mono_image_load_references is no more.
17824
17825         * assembly.c: Reworked assembly loading to make it really thread safe.
17826         After these changes, the assembly returned by mono_assembly_open is
17827         fully initialized, i.e. all its references assemblies are loaded.
17828
17829         * assembly.c (mono_image_load_references): Renamed to 
17830         mono_assembly_load_references, and made private, since clients no
17831         longer need to call it.
17832
17833         * class.c: Removed calls to mono_assembly_load_references, since it was
17834         a source of deadlocks.
17835
17836         * loader.h loader.c class.h class.c: Protect data structures using a 
17837         new lock, the loader lock.
17838
17839         * class.c (mono_class_setup_vtable): Create temporary hash tables and
17840         GPtrArrays only when needed.
17841
17842         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
17843         into empty structures by mcs. Fixes pinvoke7.cs.
17844         
17845         * domain.c (mono_init): Call a new initialization function.
17846
17847         * appdomain.c (mono_runtime_init): Call the new initializer function
17848         of the marshal module.
17849
17850         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
17851         inserted into empty structures by mcs. Fixes pinvoke7.cs.
17852
17853         * marshal.h marshal.c: Added locks around the wrapper caches to make
17854         this module thread safe.
17855
17856         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
17857         this argument. Fixes pinvoke1.exe.
17858
17859 2003-08-25  Lluis Sanchez <lluis@ximian.com>
17860
17861         * object.h: Added call_type field to MonoMethodMessage and the corresponding
17862         enumeration of values. Removed fields to store remote call output values in
17863         MonoAsyncResult. Not needed any more.
17864         * object.c: Initialize call_type and async_result fields in mono_message_init.
17865         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
17866         dispatching the message.
17867         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
17868         async call to finish. To do it use a message with EndInvoke call type.
17869
17870 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
17871
17872         * loader.h loader.c (mono_method_hash_marhal_info): New function which
17873         determines whenever a method has marshalling info.
17874
17875 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17876
17877         * assembly.c: fix the build on windows.
17878
17879 2003-08-22 Lluis Sanchez <lluis@ximian.com>
17880
17881         * object.cs: Fixed bug #47785.
17882
17883 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
17884
17885         * string-icalls.c (StringReplace): If their are no occurances of
17886         the old string found return a reference to the supplied
17887         string. This saves some memory and matches MS behavoir.
17888         
17889 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17890
17891         * socket-io.c: fixed compilation for systems that define AF_INET6
17892         and don't define SOL_IP/SOL_IPV6.
17893
17894 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
17895
17896         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
17897         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
17898
17899         * rawbuffer.c rawbuffer.h: Make this module thread safe.
17900
17901         * domain.c: Make this module thread safe.
17902
17903         * domain.c (mono_init): Call new initialization function.
17904
17905         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
17906         reference types too. Fixes #38812.
17907
17908         * image.c (mono_image_init): Fixed warnings.
17909
17910         * class.c (mono_class_from_typeref): Handle assembly load failure
17911         correctly.
17912
17913         * appdomain.c (add_assemblies_to_domain): Handle the case when
17914         the references of an assembly are not yet loaded.
17915
17916         * metadata.c image.c assembly.c: Moved initialization of global
17917         variables to a separate function called at startup since lazy 
17918         initialization of these variables is not thread safe.
17919         
17920         * image.c assembly.c: Made this module thread safe by adding locks in 
17921         the appropriate places.
17922
17923         * domain.c (mono_init): Call the new initialization functions of the
17924         three modules.
17925
17926 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
17927
17928         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
17929           make a direct call. It is proxy's work to make the call asynchronous.
17930           mono_delegate_end_invoke(): If the targe is a proxy, just collect
17931           the return values.
17932         * object.cs: mono_method_call_message_new(): read AsyncResult and
17933           state object from parameters list, if this info is requested.
17934         * object.h: Added fields to store remote call output values in
17935           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
17936
17937 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
17938
17939         * object.h: add needed fields to MonoThread.
17940         * threads.c, threads.h: allow registering a function to cleanup data
17941         allocated per thread by the JIT.
17942
17943 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17944
17945         * loader.h: portability fix by Bernie Solomon
17946         * <bernard@ugsolutions.com>.
17947
17948 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
17949
17950         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
17951         return a MonoArray. This simplifies the code and also ensures that
17952         the cache allways contains an object reference as a value.
17953
17954         * icall.c (ves_icall_get_parameter_info): Simplified using the new
17955         function.
17956
17957 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17958
17959         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
17960         fixes a problem with byte ordering when getting the address family for
17961         a socket.
17962
17963 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
17964
17965         * .cvsignore: Added monosn.
17966
17967         * reflection.h reflection.c loader.c: Added support for parameter
17968         marshalling to dynamically created types. Fixes #47295.
17969
17970 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17971
17972         * rand.c: remove useless warnings.
17973
17974 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17975
17976         * class.c: implemented ldtoken for methods and fieldrefs.
17977
17978 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17979
17980         * threadpool.c: when mono_async_invoke was called, no one took care of
17981         monitoring the queue. So if the method invoked took some time and we
17982         got new async invoke requests after 500 ms (the thread created waited
17983         that long in WaitForSingleObject), the new async invoke was not called
17984         until the previous one finished.
17985
17986         This is fixed now. Thanks to Totte for helping with it.
17987
17988 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17989
17990         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
17991
17992 2003-08-11  Martin Baulig  <martin@ximian.com>
17993
17994         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
17995
17996 2003-08-06  Martin Baulig  <martin@ximian.com>
17997
17998         * mono-debug-debugger.c: Added support for static fields,
17999         properties and methods.
18000
18001 2003-08-06  Martin Baulig  <martin@ximian.com>
18002
18003         * mono-debug-debugger.c: Don't store the MonoString's vtable to
18004         make this work for applications with multiple application domains.
18005
18006 2003-08-04  Martin Baulig  <martin@ximian.com>
18007
18008         * mono-debug-debugger.c: Completely reworked the type support; the
18009         most important thing is that we're now just using one single
18010         `MonoType' instance per type.
18011
18012 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
18013
18014         * mono-endian.h, mono-endian.c, icall.c: Added icall
18015         ves_icall_System_Double_AssertEndianity to assert double word endianity
18016         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
18017
18018 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18019
18020         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
18021         support, icalls and fixes.
18022
18023 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
18024
18025         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
18026         classes that are a punctuation character in .NET is not the same a
18027         g_unichar_ispunct.
18028
18029 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18030
18031         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
18032
18033 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
18034
18035         * icall.c: Add new MemCopy internalcall.
18036         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
18037         Simplified code; It is not necessary to handle all the cases here,
18038         as the C# code takes care of it.  Only handle the case of the name
18039         resource embedded into the assembly.
18040
18041         Changed signature to return the data pointer and the size of the
18042         data. 
18043
18044 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
18045
18046         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
18047         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
18048
18049 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
18050
18051         * socket-io.c: ignore EINTR error in select.
18052
18053 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18054
18055         * class.h, class.c: removed unused subclasses field in MonoClass.
18056
18057 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
18058
18059         * icall.c: improve fix of get_base_definition(). If the parent class
18060           doesn't have the mehod, look at the parent of the parent.
18061         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
18062           to check if a parameter is an in or out parameter
18063           (PARAM_ATTRIBUTE_IN is not set by default).
18064           mono_method_return_message_restore(): Use mono_class_value_size to
18065           get the size of a value type. mono_type_stack_size (parameterType)
18066           does not return the correct value if parameterType is byRef.
18067           mono_load_remote_field(), mono_load_remote_field_new(),
18068           mono_store_remote_field(), mono_store_remote_field_new():
18069           raise exception if the remote call returns an exception.
18070
18071 2003-07-28  Martin Baulig  <martin@ximian.com>
18072
18073         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
18074         method.  This is a wrapper around mono_runtime_invoke() which
18075         boxes the instance object if neccessary.
18076
18077 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18078
18079         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
18080         metadata.h, row-indexes.h, verify.c: first cut of generics support.
18081
18082 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18083
18084         * icall.c: disable mcs bug workaround.
18085
18086 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
18087
18088         * object.c (mono_runtime_class_init): Take the metadata_section
18089         mutex before obtaining the domain mutex.
18090
18091         * appdomain.h: Added definition of metadata_section mutex here. 
18092
18093         * object.c: define metadata_mutex here.
18094
18095 2003-07-24  Ravi Pratap  <ravi@ximian.com>
18096
18097         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
18098         fixed.
18099
18100 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
18101
18102         * reflection.c: Fix bug #46669
18103
18104 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18105
18106         * exception.c:
18107         * exception.h:
18108         * icall.c:
18109         * object.h: fill in the type name for TypeLoadException.
18110
18111 2003-07-23  Ravi Pratap  <ravi@ximian.com>
18112
18113         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
18114         relationship between TypeBuilders while compiling corlib) and bug
18115         45993 (Array types returned from the runtime while compiling
18116         corlib were from the loaded corlib).
18117
18118 2003-07-22  Martin Baulig  <martin@ximian.com>
18119
18120         * mono-debug-debugger.c: Reworked the type support a bit more;
18121         distinguish between types and classes.
18122
18123 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
18124
18125         * icall.c: add IsArrayImpl icall.
18126
18127 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
18128
18129         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
18130         initializing real_size only once. Also fix bug #46602.
18131
18132 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
18133
18134         * object.c: Renamed mono_metadata_section to metadata_section.
18135
18136 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
18137
18138         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
18139           empty array if the type is an array. Fixed.
18140           ves_icall_MonoMethod_get_base_definition: if the base method
18141           is abstract, get the MethodInfo from the list of methods of
18142           the class.
18143         * reflection.c: ParameterInfo.PositionImpl should be zero-based
18144           and it was 1-based. Fixed in mono_param_get_objects.
18145
18146 2003-07-20  Martin Baulig  <martin@ximian.com>
18147
18148         * mono-debug.h: Set version number to 31.
18149         (mono_debug_init): Added `MonoDomain *' argument.
18150
18151         * mono-debug-debugger.c: Reworked the type support; explicitly
18152         tell the debugger about builtin types; pass the `klass' address to
18153         the debugger.
18154
18155 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
18156
18157         * image.c: Allow new metadata tables to be loaded without a
18158         warning. Also update the warning message to give the new constant value.
18159                 
18160 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18161
18162         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
18163         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
18164         array type representation changes.
18165
18166 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18167
18168         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
18169         on Environment.Exit () call.
18170
18171 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18172
18173         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
18174         requires a matching corlib.
18175
18176 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
18177
18178         * Changelog: My editor decided to add a CR to each line. Sorry about that.
18179           Committed again without the CRs.
18180         
18181 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
18182
18183         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
18184           getting it from the "this" socket instance. Did not work
18185           if the socket is a subclass of Socket.
18186           Also fixed bug #35371.
18187
18188 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18189
18190         * metadata.c: fixed size for TypedByRef.
18191         * loader.c: when searching for a method, consider the vararg amrker.
18192         * unicode.c, decimal.c: constify some arrays.
18193
18194 2003-07-15  Dick Porter  <dick@ximian.com>
18195
18196         * socket-io.c: Fixed compilation for gcc < 3.2.
18197
18198         Fixed compilation for machines that don't have AF_INET6 (thanks to
18199         Bernie Solomon <bernard@ugsolutions.com> for that part.)
18200
18201         Fixed compile warnings.
18202         
18203         Fixed formatting and line endings.
18204
18205 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
18206
18207         * socket-io.h:
18208         * socket-io.c: Added IPv6 support.
18209
18210 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
18211
18212         * class.c (mono_class_is_assignable_from): New function to implement
18213         the is_assignable_from logic. Used by mono_object_isinst, 
18214         Type::IsAssignableFrom () and the interpreter.
18215
18216         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
18217         Object, even interfaces.
18218         
18219         * object.c (mono_object_isinst): Implement in terms of 
18220         is_assignable_from.
18221
18222         * icall.c (ves_icall_type_is_assignable_from): New icall.
18223
18224 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
18225
18226         * domain.c (foreach_domain): fix compiler warning.
18227
18228 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
18229
18230         * image.c (load_metadata_ptrs): use g_strndup because strndup is
18231         not available on all plattforms
18232
18233 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
18234
18235         * image.h image.c: Store the metadata version string in MonoImage.
18236         * icall.c: New icall to retrieve the image version.
18237         * reflection.c (create_dynamic_image): Fill in the image version field
18238         * reflection.c (build_compressed_metadata): Use the image version
18239         from the image structure.
18240
18241 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18242
18243         * appdomain.c: modified comment.
18244         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
18245         That will be its last iteration when mono_gc_cleanup is called from
18246         mono_runtime_cleanup and before the domain is unloaded.
18247
18248         Fixes bug #45962.
18249
18250 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
18251
18252         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
18253         attributes.
18254
18255 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18256
18257         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
18258         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
18259         Bernie Solomon <bernard@ugsolutions.com>.
18260
18261 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18262
18263         * object.c, object.h: provide mono_object_new_fast() for faster
18264         allocation in some special cases.
18265
18266 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18267
18268         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
18269         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
18270
18271 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18272
18273         * threadpool.c: fix leaks.
18274
18275 2003-07-01  Dick Porter  <dick@ximian.com>
18276
18277         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
18278         using MonoGHashTables.  Fixes threadpool bug posted to list.
18279
18280 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
18281
18282         * image.h, image.c: added support to load an assembly from a byte array.
18283         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
18284         assembly bundle support.
18285
18286 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
18287
18288         * threadpool.c (mono_thread_pool_add): keep a reference to the
18289         AsyncResult to prevent GC
18290
18291 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18292
18293         * class.c: leak fix.
18294
18295 2003-06-25  Dick Porter  <dick@ximian.com>
18296
18297         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
18298         for the async object, the WaitHandle object will close the handle.
18299         Fixes bug 45321.
18300
18301 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18302
18303         * class.c: in mono_array_class_get (), lookup from the hash with the
18304         same type we insert: this works around a bug in
18305         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
18306         lluis. The real fix will have to wait for after the release.
18307
18308 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18309
18310         * icall.c: fix memory leak when getting type members.
18311
18312 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18313
18314         * reflection.c: added more pubtoken special cases.
18315
18316 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18317
18318         * class.c: handle field offset correctly when class size
18319         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
18320
18321 2003-06-20  Martin Baulig  <martin@ximian.com>
18322
18323         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
18324         *image' field.
18325
18326 2003-06-20  Martin Baulig  <martin@ximian.com>
18327
18328         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
18329
18330 2003-06-20  Martin Baulig  <martin@ximian.com>
18331
18332         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
18333         just distinguish between variables in registers and variables at
18334         an offset relative to a register.
18335
18336 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18337
18338         * icall.c: #ifdef out latest changes until mcs is fixed.
18339
18340 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18341
18342         * icall.c: return members in metadata order.
18343
18344 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18345
18346         * icall.c: avoid infinite loop in GetTimeZoneData.
18347
18348 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18349
18350         * icall.c: added Marshal.Prelink/All icalls.
18351
18352 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18353
18354         * object.c, object.h: fix warnings and do some overflow checking
18355         when creating arrays.
18356
18357 2003-06-17  Dick Porter  <dick@ximian.com>
18358
18359         * file-io.h:
18360         * file-io.c: File attributes need to be tweaked slightly when
18361         passed from the managed to the w32 world.
18362
18363 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18364         * profiler.h profiler-private.h profiler.c: Rework last patch
18365         based on suggestion by Paolo.
18366         
18367 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18368
18369         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
18370         instruction level coverage data collection.
18371         * profiler.h profiler.c (: Added new callback function which can be
18372         used by the profiler to limit which functions should have coverage
18373         instrumentation.
18374         * profiler.c (mono_profiler_load): Call g_module_build_path to
18375         generate the file name of the profiler library.
18376
18377 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18378
18379         * profiler.c, profiler.h, profiler-private.h: added basic block 
18380         coverage profiling API.
18381
18382 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
18383
18384         * reflection.c (mono_reflection_create_runtime_class): Add support
18385         for events in dynamically generated code.
18386
18387         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
18388         not allocated.
18389
18390 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18391
18392         * icall.c: when getting timezone info, return reasonable values if we
18393         can't get the actual data.
18394
18395 2003-06-14  Dick Porter  <dick@ximian.com>
18396
18397         * threads.c (start_wrapper): Remove the reference to the thread
18398         object in the TLS data, so the thread object can be finalized.
18399         This won't be reached if the thread threw an uncaught exception,
18400         so those thread handles will stay referenced :-( (This is due to
18401         missing support for scanning thread-specific data in the Boehm GC
18402         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
18403
18404 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
18405
18406         * reflection.c: ensure streams and tables are first allocated with
18407         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
18408
18409 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18410
18411         * icall.c: fixed GetElementType for byrefs (bug# 44792).
18412
18413 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
18414
18415         * reflection.c (mono_reflection_create_runtime_class): Add support for
18416         properties to dynamically created classes.
18417         * reflection.c: Fix a few places where non-MonoObjects were inserted
18418         into the tokens hashtable.
18419
18420 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18421
18422         * object.c: some support to handle out of memory exceptions.
18423
18424 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
18425
18426         * marshal.c (mono_marshal_get_native_wrapper): support reference
18427         return types
18428
18429 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18430
18431         * object.h, object.c: more portability stuff from Bernie Solomon.
18432         Unexport mono_object_allocate(). Added mono_object_unbox ().
18433         Set exitcode when an unhandled exception is thrown.
18434
18435 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
18436
18437         * marshal.c (mono_marshal_get_native_wrapper): use custom
18438         marshaler for return types.
18439
18440 2003-06-10  Dick Porter  <dick@ximian.com>
18441
18442         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
18443         ip_mreq is available
18444
18445 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18446
18447         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
18448         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
18449         by Bernie Solomon <bernard@ugsolutions.com>.
18450
18451 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
18452
18453         * gc.c (mono_gc_init): Avoid error message on shutdown when
18454         GC_DONT_GC=1 is used.
18455
18456         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
18457         New icall to return the GUID of a module.
18458
18459 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18460
18461         * class.c: ensure instance size always includes the parent's size
18462         even whem class size is set explicitly (fixes bug#44294).
18463
18464 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18465
18466         * profiler.h, profiler.c: made the simple profiler thread-safe,
18467         get more accurate timing info. Allow the loading of an
18468         externally-developed profiler module.
18469
18470 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
18471
18472         * marshal.c (mono_marshal_get_native_wrapper): improved
18473         class/byref arguments.
18474         (mono_marshal_get_native_wrapper): better string marshaling support.
18475
18476 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18477
18478         * class.c: ensure .pack and .size are handled correctly and
18479         simplified layout of static fields.
18480
18481 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18482
18483         * appdomain.c
18484         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
18485
18486         * loader.c (mono_lookup_pinvoke_call): look for modules in the
18487         current directory (fix bug 44008)
18488
18489 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
18490
18491         * marshal.c (mono_marshal_get_native_wrapper): started support for
18492         custom marshalers.
18493         (mono_delegate_to_ftnptr): consider marshalling specifications
18494
18495 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18496
18497         * reflection.c, reflection.h: emit custom marshal info.
18498
18499 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18500
18501         * object.c: free the GError.
18502         * icall.c: added CloseEvent_internal.
18503         * threads.[ch]:
18504         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
18505         call.
18506
18507 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
18508
18509         * loader.c (mono_method_get_signature): Add support for dynamic
18510         assemblies.
18511
18512 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18513
18514         * reflection.c: fixed bug #43905.
18515
18516 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18517
18518         * class.c, domain.c, icall.c, metadata.h, object.h: support for
18519         handling TypedReference and ArgIterator.
18520         * loader.c, loader.h: added function to get signature at call site.
18521
18522 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18523
18524         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
18525         data readonly. Buglets and warning fixes. Some MethodSpec support.
18526
18527 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18528
18529         * class.h, class.c, object.c: remove relative numbering support.
18530
18531 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
18532
18533         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
18534         free the string, until we get a chance to fix Gtk#
18535
18536 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18537
18538         * marshal.c: revert last patch.
18539
18540 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18541
18542         * icall.c: updates for new mono_class_vtable() not calling
18543         the type constructor anymore.
18544
18545 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18546
18547         * object.h, object.c: separate vtable creation from type
18548         initialization. Make running the .cctor thread safe.
18549
18550 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
18551
18552         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
18553
18554 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
18555
18556         * loader.c (mono_get_method): consider calling convention
18557
18558 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
18559
18560         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
18561         to return the invisible global type for a module.
18562
18563         * reflection.c (mono_image_build_metadata): Emit global fields too.
18564
18565 2003-05-20  Peter Williams  <peterw@ximian.com>
18566
18567         * loader.c (mono_lookup_internal_call): Add a few newlines.
18568
18569 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
18570
18571         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
18572         literal strings.
18573
18574         * appdomain.c (set_domain_search_path): Recalculate search path when
18575         AppDomainSetup.PrivateBinPath changes.
18576
18577         * object.c (mono_class_compute_gc_descriptor): It turns out some
18578         parts of the class libs (like System.Thread) holds pointers to
18579         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
18580         to treat native int a pointer type here.
18581         
18582 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
18583
18584         * appdomain.h, domain.c: add hashtable for jump target resolution.
18585
18586 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
18587
18588         * reflection.h reflection.c icall.c: Added new icalls 
18589         GetManifestResourceInfoInternal, GetModulesInternal and support
18590         infrastructure.
18591
18592 2003-05-16  Dick Porter  <dick@ximian.com>
18593
18594         * icall.c:
18595         * file-io.h:
18596         * file-io.c: Implement System.IO.MonoIO::GetTempPath
18597
18598 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
18599
18600         * object.c: mono_store_remote_field: little fix to previous patch.
18601
18602 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18603
18604         * class.c: add constructors to array classes.
18605         * icall.c: special case array construction for InternalInvoke (),
18606
18607 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
18608
18609         * class.h class.c reflection.c object.c: Added support for field
18610         defaults in dynamically generated classes.
18611
18612 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18613
18614         * reflection.c: properly encode charset for ddlimport.
18615
18616 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18617
18618         * threads.c: allow compiling without GC.
18619
18620 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18621
18622         * appdomain.h, object.c, object.h, threads.c, threads.h: added
18623         handling of thread static data.
18624
18625 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18626
18627         * reflection.h, reflection.c: added mono_custom_attrs_free ().
18628
18629 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
18630
18631         * class.c (mono_array_class_get): always set the serializable flags
18632         (mono_array_class_get): always set the SEALED attribute for array types
18633
18634 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
18635
18636         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
18637         attributes (fix for bug 42021).
18638
18639 2003-05-12  Dick Porter  <dick@ximian.com>
18640
18641         * gc.c: Don't run finalizers when the finalizer thread is
18642         finishing up, because the default domain has already been
18643         destroyed.
18644
18645 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
18646
18647         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
18648         value is null, we should throw an exception.   This is slightly
18649         different than the other conventions used for the constructor.
18650
18651 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18652
18653         * socket-io.c: fixed windows build.
18654
18655 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18656
18657         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
18658
18659 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
18660
18661         * object.c (mono_string_new_wrapper): Compatibility fix for MS
18662         compilers.
18663
18664 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
18665
18666         * class.c (mono_class_layout_fields): Add experimental GC aware
18667         auto layout facility. Requires class library changes to work correctly.
18668
18669         (mono_class_setup_vtable): Avoid overriding explicit interface
18670         method implementations. Fixes iface3.exe test.
18671
18672         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
18673         object reference.
18674         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
18675         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
18676
18677         * metadata.h: Add new type classification macro which determines
18678         whenever the type holds an object reference.
18679
18680 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
18681
18682         * marshal.c (mono_marshal_get_native_wrapper): cleanups
18683
18684 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
18685
18686         * gc.c (finalizer_thread): Work around a GC bug.
18687
18688 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
18689
18690         * marshal.c (emit_struct_conv): allow unions
18691
18692         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
18693
18694 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
18695
18696         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
18697
18698 2003-05-06  Martin Baulig  <martin@ximian.com>
18699
18700         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
18701
18702 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18703
18704         * socket-io.c:
18705         (Select_internal): allow NULLs, don't create arrays if not needed.
18706         Coupled with Socket.cs changes.
18707
18708         * threadpool.c:
18709         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
18710         register a finalizer for it that will close the semaphore handle. This
18711         fixes the leak and make Lupus' test run with > 4080 loops.
18712
18713 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
18714
18715         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
18716         Jerome Laban (bug #42287)
18717
18718 2003-05-02  Martin Baulig  <martin@ximian.com>
18719
18720         * debug-mono-symfile.h
18721         (MonoSymbolFile): Moved declaration into mono-debug.h.
18722         (MonoDebugMethodJitInfo): Likewise.
18723         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
18724         argument.
18725         (_mono_debug_address_from_il_offset): Take a
18726         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
18727
18728         * mono-debug.h
18729         (MonoDebugDomainData): New struct.
18730         (mono_debug_get_domain_data): New function.
18731         (mono_debug_add_method): Take an additional `MonoDomain *'
18732         argument.
18733         (mono_debug_source_location_from_address): Likewise.
18734         (mono_debug_il_offset_from_address): Likewise.
18735         (mono_debug_address_from_il_offset): Likewise.
18736
18737 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
18738
18739         * reflection.c: one more check for null type in custom attrs.
18740
18741 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18742
18743         * reflection.c: avoid warning (comparison is always false due to limited
18744         range of data type).
18745
18746 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18747
18748         * icall.c: throw an exception in Type.GetField if the argument 'name'
18749         is NULL.
18750
18751 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
18752
18753         * reflection.c: fixed handling of enums in named arguments to custom
18754         attributes (bug #42123).
18755
18756 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18757
18758         * reflection.c: use the right array element type and handle
18759         a null for a Type argument, too.
18760
18761 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
18762
18763         * reflection.c: handle arrays as arguments to custom attributes.
18764
18765 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18766
18767         * reflection.c: handle a string value in a custom attr
18768         ctor that takes an object.
18769
18770 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
18771
18772         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
18773         (fix bug #42063)
18774
18775 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
18776
18777         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
18778
18779 2003-04-27  Martin Baulig  <martin@ximian.com>
18780
18781         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
18782         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
18783         MONO_DEBUGGER_EVENT_BREAKPOINT.
18784         (mono_breakpoint_trampoline_code): Removed.
18785         (mono_debugger_event_handler): The last argument is now a
18786         `guint32'.
18787         (mono_debugger_insert_breakpoint_full): Removed the
18788         `use_trampoline' argument.
18789         (mono_debugger_method_has_breakpoint): Likewise.
18790         (mono_debugger_trampoline_breakpoint_callback): Renamed to
18791         mono_debugger_breakpoint_callback(); take the method and
18792         breakpoint number as arguments.
18793
18794 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18795
18796         * metadata.c: fix off by one when loading parameters attributes.
18797
18798 2003-04-24  Martin Baulig  <martin@ximian.com>
18799
18800         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
18801
18802 2003-04-24  Martin Baulig  <martin@ximian.com>
18803
18804         * mono-debug-debugger.c: Moved all code which interacts with the
18805         Mono Debugger here.
18806
18807         * debug-mono-symfile.c: This code now just deals with the symbol
18808         file itself, the debugger code is now in mono-debug-debugger.c.
18809
18810 2003-04-23  Martin Baulig  <martin@ximian.com>
18811
18812         * mono-debug.c (mono_debug_source_location_from_il_offset):
18813         New method; like mono_debug_source_location_from_address(), but
18814         takes an IL offset instead of a machine address.
18815
18816 2003-04-23  Martin Baulig  <martin@ximian.com>
18817
18818         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
18819         `line' field; this is now computed by the debugger.
18820
18821 2003-04-23  Martin Baulig  <martin@ximian.com>
18822
18823         * mono-debug.[ch]: New files.  This is the new debugging interface.
18824
18825         * mono-debug-debugger.[ch]: New files.  Moved all code which
18826         interacts with the Mono Debugger here.
18827
18828 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
18829
18830         * domain.c (mono_init): initialize mono_defaults.monitor_class
18831
18832 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
18833
18834         * reflection.c (method_encode_code): Add a spicy exception to help
18835         future compiler authors.
18836
18837 2003-04-21  Martin Baulig  <martin@ximian.com>
18838
18839         * icall.c
18840         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
18841         Make this work with relative pathnames; g_filename_to_uri() needs
18842         an absolute filename.
18843
18844 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
18845
18846         * icall.c: Track name changes in Object and ValueType.
18847
18848 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
18849
18850         * metadata.c (mono_type_stack_size): size should be a multiple of
18851         sizeof (gpointer)
18852
18853 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18854
18855         * gc.c:
18856         (internal_domain_finalize): moved into mono_domain_finalize. No need
18857         to create another thread because the finalizers will be run in the
18858         finalizer thread.
18859         
18860         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
18861         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
18862         to be run (MS does this too).
18863
18864 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
18865
18866         * object.c (mono_class_compute_gc_descriptor): Update comment.
18867
18868         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
18869
18870         * image.h: Add synchronized wrapper cache.
18871
18872         * image.c (do_mono_image_open): Initialize cache.
18873
18874         * reflection.c (create_dynamic_mono_image): Initialize cache.
18875
18876 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18877
18878         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
18879         ves_icall_System_Buffer_ByteLengthInternal.
18880
18881 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18882
18883         * reflection.c: setup klass->nested_in earlier. Allow
18884         a dash in the assembly name.
18885
18886 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
18887
18888         * metadata.c (mono_type_to_unmanaged): dont access
18889         type->data.klass for MONO_TYPE_OBJECT
18890         (mono_type_to_unmanaged): consider System.Delegate class
18891
18892 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
18893
18894         * class.c: just setup supertypes in the proper place instead of
18895         initializing the full element class for arrays.
18896
18897 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18898
18899         * class.c: ensure the element class of arrays is initialized.
18900         Setup the supertype info for array classes, too.
18901
18902 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
18903
18904         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
18905
18906 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18907
18908         * Makefile.am: re-added -m option when running cygpath. This way,
18909         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
18910         separator.
18911         * mono-config.c: same codepath for locating mono config file for WIN32
18912         and the rest.
18913         * assembly.c: if mono_assembly_setrootdir is called, don't override
18914         the value set.
18915
18916 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18917
18918         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
18919         MONO_ASSEMBLIES variable.
18920
18921 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18922
18923         * icall.c: added Assembly::GetNamespaces() icall.
18924
18925 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18926
18927         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
18928
18929 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
18930
18931         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
18932         * object.c: fixed bug in the construction of vtable for proxies
18933
18934 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
18935
18936         * object.c (mono_array_new): Mark mono_array_new as an icall.
18937
18938 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18939
18940         * class.c: fixed test for public method when overriding interfaces.
18941         Closes bug #40970.
18942
18943 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18944
18945         * appdomain.h, domain.c: added mono_domain_foreach() to
18946         be able to access the currently loaded appdomains.
18947         * object.c: make string interning work across sppdomains.
18948         Mark some functions for use as icalls.
18949
18950 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
18951
18952         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
18953
18954         * reflection.h reflection.c: Allocate long living data using 
18955         GC_MALLOC_ATOMIC so the collector does not need to scan it.
18956
18957         * reflection.c: Double the allocation size in streams instead of
18958         increasing it, to prevent unneccesary copying on large assemblies.
18959         
18960         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
18961         creation if the assembly does not have the Run flag set.
18962
18963 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18964
18965         * class.h: avoid the C++ keywords in header files (Jerome Laban
18966         spotted and fixed this).
18967
18968 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18969
18970         * object.c:
18971         (mono_unhandled_exception): fill in the arguments for the
18972         UnhandledException event. Only trigger that event for the default
18973         domain (as MS does).
18974
18975 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
18976
18977         * object.c: Improve typed allocation stuff based on suggestions from
18978         Paolo. Also turn it on if the GC library supports it.
18979
18980 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
18981
18982         * object.c object.h class.h: Added experimental typed allocation
18983         facility using the interfaces in gc_gcj.h.
18984
18985         * os/gc_wrapper.h: Added new include files.
18986         
18987 2003-04-03  Martin Baulig  <martin@ximian.com>
18988
18989         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
18990         which is not yet enabled by default.
18991
18992         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
18993         functions.
18994         (mono_gc_lock, mono_gc_unlock): New static functions.
18995
18996         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
18997         functions; stop/start the world for the garbage collector.  This
18998         is using the windows API; we need to complete the SuspendThread()/
18999         ResumeThread() implementation in the io-layer to make this work on Unix.
19000         (mono_gc_push_all_stacks): New public function; tells the garbage
19001         collector about the stack pointers from all managed threads.
19002
19003 2003-04-03  Martin Baulig  <martin@ximian.com>
19004
19005         * object.h (MonoThread): Added `gpointer stack_ptr'.
19006
19007         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
19008
19009 2003-04-03  Martin Baulig  <martin@ximian.com>
19010
19011         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
19012
19013 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
19014
19015         * reflection.c (typebuilder_setup_fields): Initialize field.first and
19016         field.last.
19017
19018 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
19019
19020         * loader.c (mono_lookup_internal_call): Report the corlib that is
19021         out of sync.
19022
19023 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
19024
19025         * icall.c (ves_icall_type_GetTypeCode): fixed check for
19026         System.DBNull (it's class not valuetype).
19027
19028 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19029
19030         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
19031         if the array method was already assigned a token (fixes bug#40646).
19032
19033 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
19034
19035         * reflection.c (mono_reflection_get_type): Attempt type resolve even
19036         if no assembly is given.
19037
19038 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
19039
19040         * metadata.h: Added the new tables.
19041
19042         * row-indexes.h: Added definitions for new tables.
19043
19044         * metadata.c: Add schemas for new tables, and add support for
19045         computing the sizes of them.
19046
19047         * class.c: Update for handling the new type cases.
19048
19049 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
19050
19051         * metadata.h (MONO_TYPE_IS_VOID): new macro
19052
19053 2003-03-31  Martin Baulig  <martin@ximian.com>
19054
19055         * threads.h (MonoThreadCallbacks): Added `thread_created'.
19056
19057         * threads.c (mono_thread_new_init): Call `thread_created' in the
19058         mono_thread_callbacks.
19059
19060 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
19061
19062         * loader.h: added marshalbyrefobject_class to mono_defaults
19063         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
19064         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
19065           generation of output parameters.
19066           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
19067         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
19068           contextbound and the target object belongs to the context of the caller.
19069         * object.h: added context and unwrapped_server variables in MonoRealProxy.
19070         * object.c: Implemented support for interfaces and abstract classes
19071           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
19072           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
19073
19074 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
19075
19076         * class.h class.c (mono_class_is_subclass_of): New function.
19077         
19078         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
19079         routines for most common case (calls from ArrayList::ToArray).
19080
19081         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
19082         routine so programs which call Environment::Exit() can be profiled.
19083
19084         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
19085         Added MONO_ARCH_SAVE_REGS.
19086
19087         * icall.c (ves_icall_type_is_subtype_of): Use new function.
19088
19089 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
19090
19091         * blob.h: Add a couple of new MonoType types definitions.
19092
19093         * tabledefs.h: Add a couple of new call convs.
19094
19095 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
19096
19097         * reflection.h (MonoReflectionDynamicAssembly): track changes in
19098         the layout of the class.
19099
19100         * reflection.c (alloc_table): double the size on overflow to avoid
19101         unnecessary copying.
19102
19103         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
19104         avoid filling out metadata tables and blobs. Also set mb->ilgen to
19105         null so it can be garbage collected.
19106         
19107 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
19108
19109         * reflection.c (mono_reflection_get_type): Return the resolved type
19110         only if it is in the assembly we searched.
19111
19112         * reflection.c (ensure_runtime_vtable): Initialize method slots.
19113
19114         * class.c (mono_class_setup_vtable): Set the slot of the overriding
19115         method.
19116
19117 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19118
19119         * appdomain.c:
19120         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
19121         the right one is 'file:///blah', but MS allows it.
19122         * assembly.c:
19123         (mono_assembly_open): allow 'file://blah'
19124
19125         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
19126
19127 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
19128
19129         * socket-io.c: fixes bug #40310.
19130
19131 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
19132
19133         * reflection.c (mono_reflection_parse_type): handle deeply nested
19134         types correctly.
19135
19136         * reflection.c (mono_image_create_token): Use unique token values
19137         since they will be put into a hash table.
19138
19139         * class.c (mono_class_setup_vtable): If a method occurs in more than
19140         one place in the vtable, and it gets overriden, then change the
19141         other occurances too.
19142
19143         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
19144         object as return type.
19145
19146 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
19147
19148         * icall.c: Deleted "ToString" implementation for double and float
19149         because they are full implemented in managed code.
19150
19151 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19152
19153         * reflection.c, reflection.h: implemented and exported functions
19154         to retrieve info about custom attributes.
19155
19156 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19157
19158         * appdomain.c: moved Uri handling to assembly.c
19159         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
19160         work when using a file Uri in *nix and windows.
19161
19162         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
19163         GetReferencedAssemblies.
19164
19165 2003-03-18  Dick Porter  <dick@ximian.com>
19166
19167         * icall.c: Rename a couple of internal calls
19168
19169         * threads.c: Set the thread state to Stopped when a thread exits.
19170         Fixes bug 39377.
19171
19172 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
19173
19174         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
19175         New icall.
19176
19177         * object.c (mono_class_vtable): fix warning.
19178
19179 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
19180
19181         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
19182
19183         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
19184         memory.
19185         (method_encode_clauses): Create exception info structures in the right
19186         order.
19187         (mono_reflection_setup_internal_class): Initialize supertypes field.
19188
19189         * class.c object.c: Handle interfaces which implement other interfaces 
19190         correctly.
19191
19192         * class.h class.c: Move the supertypes array initialization code into 
19193         a separate function so it can be used for dynamic types too. Also call
19194         it earlier, in mono_class_init(), since it can be used before the
19195         type is initialized.
19196
19197 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19198
19199         * Makefile.am:
19200         * assembly.c:
19201         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
19202
19203         * appdomain.c:
19204         * appdomain.h:
19205         * marshal.c:
19206         * object.c: remove warnings.
19207
19208 2003-03-13  Martin Baulig  <martin@ximian.com>
19209
19210         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
19211         (MonoDebugLexicalBlockEntry): New types.
19212
19213         * debug-mono-symfile.c
19214         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
19215
19216 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19217
19218         * process.c: ret can be any non-zero value accroding to MS doc.
19219
19220 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
19221
19222         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
19223         fixing a warning for a miss-used prototype, would have cause
19224         random memory corruption.
19225
19226 2003-03-07  Martin Baulig  <martin@ximian.com>
19227
19228         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
19229         getting really annoying ....
19230
19231 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
19232
19233         * reflection.c (fixup_method): added support for array methods.
19234
19235 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19236
19237         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
19238         (pointed out by Michael Adams).
19239
19240 2003-03-04  Dick Porter  <dick@ximian.com>
19241
19242         * icall.c: Temporarily reverted the Double and Single ToString()
19243         change, because it broke nunit.
19244
19245 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
19246
19247         * object.h, threads.h: make include files compatible with C++
19248         (patch by Jerome Laban <jlaban@wanadoo.fr>).
19249
19250 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
19251
19252         * icall.c: Erased ToString helper functions for Double and Single.
19253         Now, that implementations ar all in managed code (Double and Single
19254         Formatters).
19255
19256 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
19257
19258         * appdomain.c: Added method for initializing the default context of
19259         a domain. Added internal call for getting the default context.
19260         * appdomain.h: Added context variable in MonoDomain struct.
19261         * domain.c: mono_domain_set also sets the default context of the domain
19262         * icall.c: Mapped internal method InternalGetDefaultContext.
19263         * object.c: mono_object_get_virtual_method returns always a remoting
19264         wrapper if the object is a transparent proxy.
19265         mono_runtime_invoke_array: when creating an object by calling the
19266         constructor, if the created object is a proxy, then the constructor should
19267         be called using the a remoting wrapper.
19268
19269 2003-03-03  Dick Porter  <dick@ximian.com>
19270
19271         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
19272         variable so it compiles on solaris.  Problem spotted by
19273         Christopher Taylor <ct@cs.clemson.edu>
19274
19275 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19276
19277         * appdomain.c:
19278         (get_info_from_assembly_name): don't leak value.
19279
19280         * icall.c:
19281         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
19282         result.
19283
19284 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
19285
19286         * assembly.c: export mono_image_load_references ().
19287         * class.c: handle function pointers. mono_class_from_name() now
19288         supports nested type names directly.
19289
19290 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
19291
19292         * reflection.h reflection.c: Encode already created dynamic methods 
19293         and fields correctly as a DEF instead of a REF.
19294
19295         * reflection.c: Get rid of the force_ref argument to 
19296         mono_image_typedef_or_ref since it was wrong in the first place.
19297
19298         * string-icalls.c: add error checking to string constructors according
19299         to the MSDN docs.
19300
19301         * reflection.c: Emit types in the order their TypeBuilders were 
19302         created. Previously, a new table index was assigned to each type before
19303         the tables were emitted. This was wrong because the signature blob
19304         might already refer to a type by its original table index.
19305
19306 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
19307
19308         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
19309         change.
19310         
19311 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19312
19313         * Makefile.am: make assemblies dir have \ instead of / on windows.
19314
19315 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
19316
19317         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
19318         iterate over the NESTEDCLASS table using a linear search since the
19319         table is not guaranteed to be sorted by the secondary key.
19320
19321         * class.c (mono_class_create_from_typedef): fixed up call to
19322         mono_metadata_nesting_typedef.
19323         
19324 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
19325
19326         * marshal.c (mono_string_to_byvalstr): clear the memory as
19327         suggested by Jerome Laban <jlaban@wanadoo.fr>
19328
19329 2003-02-26  Dick Porter  <dick@ximian.com>
19330
19331         * process.c: Cope with padding in .rsrc blocks
19332
19333 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
19334
19335         * metadata.h: reverted the filter_len change, it breaks reflection
19336         
19337 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
19338
19339         * metadata.h: added a new field to store the filter_len
19340         
19341
19342 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19343
19344         * reflection.c: handle custom attributes for types and members
19345         created with Reflection.Emit (bug#38422).
19346
19347 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
19348
19349         * reflection.c: define RTSpecialName automatically for constructors for
19350         compatibility with MS.NET.
19351
19352         * reflection.c (mono_reflection_create_runtime_class): initialize
19353         nested_in field of dynamically created classes.
19354
19355 2003-02-22  Martin Baulig  <martin@ximian.com>
19356
19357         * debug-mono-symfile.h: Incremented version number.
19358
19359 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
19360
19361         * object.h icall.c process.c: fix warnings.
19362
19363 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
19364
19365         * appdomain.h appdomain.c:
19366         (mono_domain_try_type_resolve): split the 
19367         name_or_tb argument into a name and a tb argument.
19368         (mono_domain_has_type_resolve): new function to check whenever the
19369         application has registered a TypeResolve event handler.
19370         
19371         * icall.c reflection.h reflection.c: move the type resolve logic into
19372         mono_reflection_get_type () so it will be invoked when 
19373         Assembly::GetType () is called.
19374
19375         * reflection.c:
19376         (mono_reflection_get_type): renamed to get_type_internal.
19377         (mono_reflection_get_type): fixed type name generation so it works 
19378         for nested types too.
19379         (mono_reflection_get_type): call has_type_resolve () to avoid the 
19380         costly type name generation if there is no resolve event handler.
19381
19382 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19383
19384         * class.c, image.c: load exported types from file references.
19385
19386 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
19387
19388         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
19389           used to cache the managed methods used to create proxies and make 
19390           remote invocation of methods.
19391         * class.h: Added in MonoVTable a flag to indicate that a class needs 
19392           to be remotely created.
19393         * object.c: Modified the method mono_class_vtable(). It now initializes 
19394           the remote flag of the vtable. Modified mono_object_new_specific(), 
19395           so now it checks the remote flag.
19396         * icall.c: Added a couple of internal methods, one for enabling instance 
19397           creation interception for a type, and one for creating objects bypassing
19398           the remote check.
19399
19400 2003-02-18  Martin Baulig  <martin@ximian.com>
19401
19402         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
19403         New interncall to get a method's metadata token.
19404
19405         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
19406         New interncall for the debugger.
19407
19408 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
19409
19410         * class.c (mono_class_setup_vtable): allocate supertype array
19411
19412 2003-02-18  Martin Baulig  <martin@ximian.com>
19413
19414         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
19415
19416 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19417
19418         * reflection.c:
19419         (assembly_name_to_aname): jump over unknown properties (i've found
19420         something like: 'type, assembly, version=xxx, custom=null, public...',
19421         so now will ignore custom=null and still get the rest of the values).
19422
19423 2003-02-17  Dick Porter  <dick@ximian.com>
19424
19425         * threads.c: Have Thread.Start() wait for a semaphore to signal
19426         that the thread has set up all its local data.  This fixes bug
19427         34323, where Abort() raced the new thread's TLS data.
19428
19429         Also removes the handle_store() call from start_wrapper, because
19430         threads are now always created suspended and there is no longer a
19431         race between the parent and child threads to store the info.
19432
19433 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
19434
19435         * image.c: explain the #- heap issue in a message, hopefully
19436         avoiding FAQs on mono-list.
19437
19438 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19439
19440         * icall.c:
19441         (GetEntryAssembly): if the domain has not invoked
19442         AppDomain.ExecuteAssembly yet, return the assembly of the default
19443         AppDomain.
19444
19445 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
19446
19447         * class.c (mono_ldtoken): make it work in dynamic assemblies.
19448
19449 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
19450
19451         * metadata.c, reflection.c: simple speedup to type hash
19452         and equals code.
19453
19454 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
19455
19456         * image.c, image.h, class.c, assembly.c: move module loading
19457         to MonoImage. When loading metadata, consider alignemnet from
19458         the start of metadata, not from the metadata address in memory.
19459
19460 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
19461
19462         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
19463         AssemblyBuilder objects. Factored out custom attribute creation into
19464         a separate function.
19465         (create_custom_attr): new function to create custom attributes.
19466
19467 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
19468
19469         * Makefile.am: Got tired of typing the full pathname to pedump.
19470         Until there is another option, am installing this.
19471
19472 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
19473
19474         * class.c (class_compute_field_layout): always set field->parent 
19475         (mono_ldtoken): use mono_defaults.fieldhandle_class;
19476
19477 2003-02-11  Dick Porter  <dick@ximian.com>
19478
19479         * threads-types.h:
19480         * monitor.c: Rewrote Monitor, making lock much faster and
19481         Pulse/Wait work as specified.  Also uses much fewer handles, and only
19482         creates them as needed.
19483
19484         * exception.c: Added SynchronizationLockException
19485
19486         * threads.c: Deleted old Monitor implementation.  The new one is
19487         in a new file.
19488
19489 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19490
19491         * class.c: handled TypedReference type code. Set the correct size for
19492         class data. Setup interface_offsets for interface classes, too.
19493
19494 2003-02-09  Martin Baulig  <martin@ximian.com>
19495
19496         * debug-mono-symfile.h: Reflect latest symbol writer changes.
19497
19498 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
19499
19500         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
19501         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
19502         * object.c: fixed mono_object_get_virtual_method () for interfaces.
19503         * verify.c: check for code that runs after the end of the method.
19504
19505 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
19506
19507         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
19508         "System.Math::Round2".
19509         * sysmath.h: Added Floor, Round and Round2 definitions.
19510         * sysmath.c: Modified certain functions that were not 100% compliant
19511         with MS.NET (math precision) and added the implementation of Floor,
19512         Round and Round2.
19513
19514 2003-02-07  Martin Baulig  <martin@ximian.com>
19515
19516         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
19517
19518 2003-02-07  Martin Baulig  <martin@ximian.com>
19519
19520         * debug-mono-symfile.c: Reflected latest symwriter changes.
19521         (mono_debug_create_mono_symbol_file): Removed.
19522         (mono_debug_open_mono_symbol_file): Take an argument which
19523         specifies whether to create a dynamic symbol file.
19524
19525 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
19526
19527         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
19528
19529 2003-02-05  Martin Baulig  <martin@ximian.com>
19530
19531         * reflection.c (mono_image_build_metadata): Make this public,
19532         protect it against being called multiple times, don't create
19533         resources and don't build the compressed metadata here.
19534         (mono_image_create_pefile): Do this here.
19535
19536         * icall.c
19537         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
19538
19539 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19540
19541         * socket-io.c: fixed bug #36322.
19542
19543 2003-02-06  Piers Haken <piersh@friskit.com>
19544
19545         * appdomain.[ch]:
19546         * class.h:
19547         * debug-mono-symfile.c:
19548         * icall.c:
19549         * loader.c:
19550         * mono-config.c:
19551         * monosn.c:
19552         * reflection.c:
19553         * socket-io.c: warning cleanups
19554
19555 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
19556
19557         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
19558         function. works like remoting invoke, but does a check for the Proxy first.
19559
19560 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
19561
19562         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
19563
19564 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
19565
19566         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
19567         array of pointers.
19568         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
19569         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
19570
19571         * object.c (mono_store_remote_field_new): used by the new jit
19572         instead of mono_store_remote_field
19573         (mono_load_remote_field_new): used by the new jit
19574         instead of mono_load_remote_field
19575
19576 2003-02-05  Patrik Torstensson
19577
19578         * appdomain.c: changed unload to take the domain id instead
19579         of domain
19580         
19581         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
19582
19583
19584 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19585
19586         * appdomain.c: don't look for assemblies in ApplicationBase if
19587         PrivateBinPathProbe is set.
19588
19589 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19590
19591         * object.c: make the first argument in main_args contain the absolute
19592         path to the assembly. Fixes bug #37511.
19593
19594 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19595
19596         * icall.c: get correct UTC offset for countries not using daylight
19597         time saving. Fixes bug #30030.
19598
19599 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19600
19601         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
19602         and 1 are the family).
19603
19604 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
19605
19606         * icall.c (ves_icall_InternalExecute): removed wrong assertion
19607
19608         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
19609
19610 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
19611
19612         * reflection.c: added support for SignatureHelper tokens, which is
19613         needed by the Calli opcode.
19614
19615         * reflection.h: track changes to SignatureHelper class.
19616
19617         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
19618
19619 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19620
19621         * appdomain.c: fixed loading assemblies from PrivateBinPath.
19622
19623 2003-02-03  Patrik Torstensson
19624         * appdomain.[c|h], domain.c : 
19625          - Added support for getting a domain via domain id
19626          - Support for setting and getting domain from System.AppDomain 
19627            (used in cross appdomain channel)
19628          - Added support for get/set for a MonoAppContext on a thread 
19629            (Context class in System.Runtime.Remoting.Contexts),
19630          - Removed hack in Get/SetData and ExecuteAssembly.
19631         
19632         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
19633         the managed world to get control when a proxy is created.
19634
19635         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
19636         
19637 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
19638
19639         * icall.c
19640         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19641         Populate the codebase field as well.
19642
19643 2003-02-02  Martin Baulig  <martin@ximian.com>
19644
19645         * debug-mono-symfile.c
19646         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
19647         (mono_debug_symfile_add_method): Allow interncalls.
19648
19649 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19650
19651         * icall.c: throw parse exception if strtod fails or the string is empty.
19652
19653 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
19654
19655         * marshal.c: handle object type separately from defined
19656         class types.
19657
19658 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
19659
19660         * marshal.c: handle NATIVE_LPSTR for strings when it's
19661         explicitly specified.
19662
19663 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
19664
19665         * reflection.c, reflection.h, icall.c: setup the reflection
19666         handle cache for ModuleBuilders and AssemblyBuilders.
19667
19668 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
19669
19670         * reflection.c (reflection_methodbuilder_to_mono_method): set
19671         pinvoke flag
19672
19673 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19674
19675         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
19676
19677 2003-01-29  Dick Porter  <dick@ximian.com>
19678
19679         * threads.c: No need for the fake_thread kludge now that Thread
19680         doesn't run a class constructor
19681         
19682 2003-01-29  Dick Porter  <dick@ximian.com>
19683
19684         * threads.c: Use g_direct_hash instead of the rather bogus
19685         g_int_hash
19686
19687 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
19688
19689         * marshal.c (mono_marshal_get_native_wrapper): add check for null
19690         (fix pinvoke12.exe)
19691         (mono_marshal_get_struct_to_ptr): generate valid IL code
19692         (mono_marshal_get_ptr_to_struct): generate valid IL code
19693         (*): correctly set sig->pinvoke, we need to memdup the signature
19694         to do that
19695
19696 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19697
19698         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
19699         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
19700
19701 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
19702
19703         * profiler.c: provide more callers information.
19704
19705 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
19706
19707         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
19708
19709         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
19710
19711         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
19712
19713 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19714
19715         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
19716         exception instead of going into an infinite loop on dates which it 
19717         can't yet handle.
19718
19719         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
19720         out-of-range exception if needed.
19721
19722         * class.c (mono_class_setup_vtable): allow a virtual method to provide
19723         an implementation for an interface method and to override an inherited
19724         method at the same time. 
19725         Imagine a scenario when a virtual method is used to override a
19726         virtual abstract method in a parent class, and this same method 
19727         provides an implementation for an method inherited from an interface. 
19728         In this case, the interface resolution code will set im->slot, which 
19729         means that the virtual method override pass will skip this method 
19730         which means a pointer to the abstract method inherited from the parent
19731         will remain in the vtable of this non-abstract class.
19732
19733         * class.c: (mono_class_setup_vtable): continue search for a real 
19734         method if only an abstract method is found.     
19735
19736 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
19737
19738         * reflection.c: add size to encoding for ByValStr and ByValArray
19739         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
19740
19741 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19742
19743         * class.c (mono_class_setup_vtable): pass the override info as an
19744         argument.
19745
19746         * class.c (mono_class_setup_vtable): set the slot of overriding methods
19747         correctly.
19748         
19749         * reflection.c (ensure_runtime_vtable); add support for method 
19750         overrides.
19751         
19752 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19753
19754         * reflection.c (resolution_scope_from_image): Hack to work to work with
19755         dynamic assemblies.
19756
19757         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
19758         added a 'force_ref' argument to force this function to allways return 
19759         a TypeRef. This is needed by mono_image_get_memberref_token ().
19760         
19761 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19762
19763         * reflection.c (mono_image_get_type_info): interfaces really don't have
19764         a parent.
19765
19766         * reflection.c (mono_image_basic_init): fill out missing fields of
19767         image structure.
19768
19769         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
19770         dynamic assemblies. This is required so dynamic assemblies show up in
19771         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
19772         Type::GetType() etc. This is consistent with MS behaviour.
19773
19774         * image.c image.h reflection.c: add newly created classes to the name 
19775         cache so mono_class_get () will find them.      
19776
19777 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
19778
19779         First part of changes to get IKVM.NET running under mono.
19780         
19781         * appdomain.h, appdomain.c: added new function 
19782         mono_domain_try_type_resolve() which will emit TypeResolve events. 
19783         This function will call AppDomain::DoTypeResolve to do the actual work.
19784
19785         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
19786         moved existing code dealing with dynamic tokens to a new function 
19787         called mono_reflection_lookup_dynamic_token (). This function will 
19788         raise TypeResolve events when appropriate. Since reflection.c is not 
19789         part of libmetadata, a new hook function called 
19790         mono_lookup_dynamic_token() is added to class.c which will call this.
19791
19792         * assembly.h assembly.c: make the invoke_load_hook function public,
19793         so it can be called for dynamic assemblies.
19794
19795         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
19796
19797         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
19798         type isn't found.
19799
19800         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
19801         MonoGHashTable, since it contains pointers to objects which the GC 
19802         needs to track.
19803
19804         * assembly.c (search_loaded): remove unused variable.
19805         
19806 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
19807
19808         * object.c: fixed issue exposed by gcc-generated IL programs
19809         that use RVA data for pointers.
19810
19811 2003-01-25  Martin Baulig  <martin@ximian.com>
19812
19813         * threads.c (start_wrapper): Moved the initialization of
19814         `start_func' above the mono_new_thread_init() call to which we
19815         pass it as argument.
19816
19817 2003-01-24  Martin Baulig  <martin@ximian.com>
19818
19819         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
19820         the MonoThread pointer.
19821
19822 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
19823
19824         * icall.c: Rename `PowImpl' to Pow.
19825
19826 2003-01-23  Dick Porter  <dick@ximian.com>
19827
19828         * threads.c (start_wrapper): Create a Thread object if needed, so
19829         the Main() thread can do the class initialisation in a subthread
19830         that has been set up to allow managed code execution.
19831
19832         Pass the thread ID instead of the MonoThread pointer to the thread
19833         start and attach callbacks.  This change is required, because the
19834         jit thread start callback must be called _before_ the Thread
19835         object can be created.
19836         
19837         (mono_thread_init): Removed much object creation code that is no
19838         longer needed.  No managed code is called from here now.
19839
19840         * object.c (mono_runtime_exec_managed_code): Create a subthread
19841         for Main, and call back to the runtime to use it.
19842         Set the exit code when Main exits.
19843
19844         * gc.c: Make sure domain finalisation happens in a subthread.
19845         Re-enable threaded GC, fixing bug 31333 (again).
19846
19847         * environment.c: System.Environment internall calls (so far just
19848         ExitCode is here, the others are still in icall.c)
19849
19850         * appdomain.c (mono_runtime_cleanup): All threads running managed
19851         code should have finished before mono_runtime_cleanup() is
19852         reached, so no need to clean up threads.
19853
19854 2003-01-22  Martin Baulig  <martin@ximian.com>
19855
19856         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
19857         `gpointer func' arguments.      
19858         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
19859         but added `MonoThread *thread' argument.
19860         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
19861
19862         * threads.c (mono_new_thread_init): Added `gpointer func' argument
19863         and pass it to the mono_thread_start_cb callback.
19864         (mono_install_thread_callbacks): New public function to install a
19865         set of callbacks which are set by the debugger.
19866         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
19867
19868 2003-01-22  Martin Baulig  <martin@ximian.com>
19869
19870         * Makefile.am: Install debug-mono-symfile.h.
19871
19872 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
19873
19874         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
19875
19876 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
19877
19878         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
19879         * class.c (mono_ptr_class_get): correctly set access levels of pointers
19880         (mono_array_class_get): correctly set access levels of arrays
19881
19882 2003-01-20      Patrik Torstensson
19883         * image.h (MonoAssemblyName): changed major, minor, build, revision
19884         from signed to unsigned.
19885
19886 2003-01-20  sean kasun <skasun@azstarnet.com>
19887
19888         * reflection.c (load_cattr_value): Now this handles
19889         MONO_TYPE_SZARRAY.  Fixes bug #35629
19890
19891 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
19892
19893         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
19894         integer value
19895
19896 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19897
19898         * decimal.c: fixed bug #26056.
19899
19900 2003-01-17  Martin Baulig  <martin@ximian.com>
19901
19902         * gc.c: Raise an ExecutionEngineException instead of using g_error().
19903
19904 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19905
19906         * exception.[ch]:
19907         (mono_get_exception_type_initialization): new function.
19908
19909         * object.c: throw a TypeInitializationException when an exception is
19910         thrown invoking the class constructor.
19911
19912 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19913
19914         * reflection.c: fixed attribute reading.
19915
19916 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19917
19918         * icall.c:
19919         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
19920         provided, look for the type in the calling assembly and then in
19921         mscorlib; if the assembly name is provided, only try that one.
19922
19923 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
19924
19925         * object.c: register the vtable before there is a chance it's
19926         queried again recursively.
19927
19928 2003-01-13  Duncan Mak  <duncan@ximian.com>
19929
19930         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
19931         gc-internal.h. 
19932         
19933 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
19934
19935         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
19936
19937 2003-01-11  Martin Baulig  <martin@ximian.com>
19938
19939         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
19940         this to 20 for the release.
19941
19942 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
19943
19944         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
19945
19946         * loader.c (mono_method_get_marshal_info): bug fix
19947
19948         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
19949         structures with explicit layout
19950
19951 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
19952
19953         * profiler.c: made the output more readable (and sorted). 
19954         Added caller information for the allocation profiler.
19955
19956 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
19957
19958         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
19959
19960 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19961
19962         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
19963         to get value types.
19964         
19965 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
19966
19967         * object.c, profiler.h, profiler.c, profiler-private.h:
19968         Added object allocation profiler.
19969
19970 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
19971
19972         * reflection.h, reflection.c: handle global methods.
19973         Compress blob entries.
19974
19975 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
19976
19977         * marshal.c: fix compilation.
19978
19979 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
19980
19981         * loader.c (mono_method_get_marshal_info): impl.
19982
19983         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
19984
19985 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19986
19987         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
19988         for reference types.
19989
19990 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
19991
19992         * loader.c: fixed off by one error in loaded parameter names.
19993
19994 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
19995
19996         * marshal.c (mono_marshal_get_icall_wrapper): like
19997         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
19998         instead of a MonoMethod.
19999
20000 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20001
20002         * decimal.c: fixed bug #36537.
20003
20004 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
20005
20006         * marshal.c: throw a missing method exception if a
20007         P/Invoke method is not found.
20008
20009 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20010
20011         * icall.c: allow a null this for constructors.
20012
20013 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20014
20015         * icall.c: raise the proper exceptions if the arguments to the
20016         internal Invoke are incorrect.
20017
20018 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
20019
20020         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
20021
20022 2003-01-03  Martin Baulig  <martin@ximian.com>
20023
20024         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20025
20026 2002-12-31  Martin Baulig  <martin@ximian.com>
20027
20028         * debug-mono-symfile.c: Completely rewrote the type section.
20029         Instead of using individual malloc()ed fields, we use one big
20030         continuous memory area and offsets into this area.
20031         See the comments in the source code for details.
20032
20033 2002-12-30  Martin Baulig  <martin@ximian.com>
20034
20035         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
20036
20037 2002-12-30  Martin Baulig  <martin@ximian.com>
20038
20039         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
20040         line number table in this data blob instead of using an external
20041         pointer.
20042
20043 2002-12-28  Martin Baulig  <martin@ximian.com>
20044
20045         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20046
20047 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
20048
20049         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
20050         as a boxed return type.
20051
20052 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
20053
20054         * appdomain.c
20055         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
20056         g_build_filename to properly get separators on the filename created.
20057
20058         * object.h: Small change, introduce MonoMarshalByRefObject to
20059         track the layout of that structure in the C# universe as we make
20060         changes there.
20061
20062 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
20063
20064         * object.c: removed assert to allow static fields on interfaces.
20065         * loader.c: a TypeSpec may be used for any type, not just arrays.
20066
20067 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20068
20069         * class.c, class.h: added mono_class_array_element_size ().
20070         Ignore static methods in interfaces.
20071
20072 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20073
20074         * threads.c: fixed the build under cygwin.
20075
20076 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20077
20078         * reflection.c: handle nullref constants. Allocate keys for
20079         reflection handles with the GC.
20080
20081 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20082
20083         * threads.c, threads.h: added mono_thread_get_abort_signal()
20084         to get a suitable signal for thread abort.
20085
20086 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20087
20088         * metadata.c: fix handling of ExportedType table.
20089
20090 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20091
20092         * icall.c: added WriteWindowsDebugString internal call.
20093
20094 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20095
20096         * reflection.h: added fields to match C# implementation.
20097
20098 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20099
20100         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
20101
20102 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
20103
20104         * gc.h, gc-internal.h: Rename header for GC internal calls to
20105         gc-internal.h from gc.h as to not clash with Boehm GC having its
20106         header installed as <gc.h> in outside include paths.
20107         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
20108         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
20109
20110 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20111
20112         * icall.c: assign minor, build and revision in FillName.
20113
20114 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
20115
20116         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
20117         Added support for running code generated by Reflection.Emit.
20118
20119 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20120
20121         * appdomain.c: check for NULL argument in LoadFrom.
20122
20123 2002-12-10  Dick Porter  <dick@ximian.com>
20124
20125         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
20126
20127 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20128
20129         * appdomain.c: fix buglet when building exe file name.  Handle full
20130         assembly name (needed after latest changes to AssemblyName).
20131         * image.c:
20132         (mono_image_close): free some hashtables.
20133
20134 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
20135
20136         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
20137         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
20138         on some systems (redhat 7.3) 
20139
20140 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
20141
20142         * threads.c: delete the critical section of a sync block,
20143         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
20144
20145 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
20146
20147         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
20148
20149 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20150
20151         * appdomain.[ch]: handle the assembly preload event to try loading the
20152         assemblies using the paths we have in the current domain.
20153
20154         * assembly.[ch]: created an assembly preload hook that is called to try
20155         loading the assembly by other means that the ones provided here.
20156
20157         * domain.c: initialize the domain search path.
20158
20159         From now on, assemblies (TODO: except corlib and System) are loaded
20160         according to these rules when using mono_assembly_load ():
20161
20162                 1. It tries to load the assembly from the ApplicationBase
20163                 of the current domain appending .dll and .exe (TODO: have to
20164                 try loading from name/name.dll and name/name.exe).
20165
20166                 2. It tries the search path specified in PrivateBinPath for the
20167                 current domain (if any).
20168
20169                 3. Previous behavior.
20170
20171 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
20172
20173         * icall.c: implemented GetInterfaceMap() related icall.
20174         * domain.c, loader.h: load MethodInfo in mono_defaults.
20175
20176 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20177
20178         * gc.c: disable the finalizer thread for now, untill all the issues
20179         with it are resolved.
20180
20181 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20182
20183         * string-icalls.c: handle embedded nulls in string ctor when the
20184         length is specified.
20185
20186 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20187
20188         * class.c: look for explicit interface implementation in parent
20189         classes, too.
20190
20191 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
20192
20193         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
20194
20195 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20196
20197         * gc.c: protect handles with a critical section.
20198
20199 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20200
20201         * icall.c:
20202         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
20203         parameters. If no assembly specified, try getting the type from all
20204         the assemblies in the current domain, else, load the assembly and get
20205         the type from it.
20206
20207 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20208
20209         * marshal.c: applied patch from Aleksey Demakov that fixes
20210         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
20211
20212 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20213
20214         * icall.c: fixed get_location.
20215
20216 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
20217
20218         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
20219         declarations to make it work with older gcc. 
20220
20221         * loader.c (mono_get_method): set signature->pinvoke for native calls
20222
20223 2002-11-20  Dick Porter  <dick@ximian.com>
20224
20225         * threads.c (mono_thread_init): Set the main thread's handle
20226
20227 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20228
20229         * gc.c: allow compilation without GC support. Changed to match the
20230         mono coding style.
20231
20232 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20233
20234         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
20235
20236 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
20237
20238         * reflection.c: set a public key token on the core assemblies.
20239
20240 2002-11-18  Dick Porter  <dick@ximian.com>
20241
20242         * threads.c: Split out some thread initialisation so that other
20243         files can set the start callback function.
20244
20245         * gc.c: Run finalisers in a separate thread, to avoid stack
20246         overflow.  Fixes bug 31333.
20247
20248         * appdomain.c: Set up GC finalisation thread.
20249
20250         * reflection.c: 
20251         * object.c: 
20252         * domain.c: Use gc.h macros for GC_malloc
20253         
20254 2002-11-15  Dick Porter  <dick@ximian.com>
20255
20256         * threadpool.c: 
20257         * threads.c:
20258         * appdomain.c: Removed mono_runtime_init_with_attach(),
20259         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
20260         merging the extra parameter with the existing function.  Removed
20261         unneeded code in mono_thread_attach().
20262
20263 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
20264
20265         * image.c (mono_image_loaded_by_guid): a method to get loaded
20266         images by guid. 
20267         (load_metadata_ptrs): we store the guid as string.
20268
20269 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
20270
20271         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
20272
20273         * metadata.c (mono_guid_to_string): imported method form Zoltan
20274         Varga (slightly modified)
20275
20276         * assembly.c (mono_assembly_open): load precompiled code
20277
20278         * loader.h (MonoMethod): we store the method token for use in the
20279         aot compiler. 
20280
20281 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20282
20283         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
20284         the hook function called when an assembly is loaded.
20285         
20286         * domain.c: Modified file.
20287         (mono_domain_assembly_load): removed hash table insertion of assemblies.
20288
20289         Fixes bug #33196.
20290
20291 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
20292
20293         * reflection.c: Map PEFileKind to the value expected by the WinNT
20294         image loader. 
20295
20296 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20297
20298         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
20299         Read until the buffer is filled completely.
20300
20301 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20302
20303         * icall.c: implemented MonoType.InternalGetEvent ().
20304
20305 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20306
20307         * appdomain.c: implemented InitAppDomainSetup. Delayed
20308         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
20309         the entry_assembly.
20310
20311         * assembly.c: base_dir is now an absolute path ending with
20312         G_DIR_SEPARATOR.
20313
20314         * icall.c: modified get_location according to the above changes.
20315
20316         * object.c: init AppDomain.SetupInformation for the default domain after
20317         we have the entry assembly.
20318
20319         * domain.c: when unloading a domain, setup = NULL.
20320
20321 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
20322
20323         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
20324
20325 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
20326
20327         * object.h, object.c: introduced mono_object_get_virtual_method ()
20328         to lookup the method invoked on an object when a callvirt is done on
20329         a method.
20330         * icall.c: make MethodInfo::Invoke() always do a virtual call.
20331
20332 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20333
20334         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
20335         current domain when loaded an assembly and failed to load it.
20336
20337         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
20338
20339 2002-10-31  Dick Porter  <dick@ximian.com>
20340
20341         * icall.c: 
20342         * file-io.h: 
20343         * file-io.c: Return the error status in a parameter, as the
20344         GetLastError() value has long since been blown away if we try and
20345         look it up in a subsequent internal call invocation.  Delete the
20346         GetLastError() internal call, because it's useless.
20347
20348 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
20349
20350         * class.[ch]: added cast_class to fix bug 29517
20351
20352 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
20353
20354         * marshal.c: create valid IL code in the filter clause:
20355         the new JIT is less forgiving:-)
20356
20357 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20358
20359         * icall.c: removed get_property internal call.
20360
20361 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
20362
20363         * appdomain.h domain.c: Added an ID to appdomains.
20364         
20365         * threads.c threads.h icall.c: Implement icall
20366         Thread:GetDomainID(), and remove unused icall 
20367         CurrentThreadDomain_internal.
20368
20369 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20370
20371         * icall.c: Don't recurse through the base types in GetConstructor.
20372         Fixes bug #32063. 
20373
20374 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
20375
20376         * mempool.h, mempool.c: added mono_mempool_empty() and
20377         mono_mempool_stats().
20378
20379 2002-10-23  Dick Porter  <dick@ximian.com>
20380
20381         * file-io.c: 
20382         * file-io.h: 
20383         * icall.c: Added MonoIO.GetFileType internal call
20384
20385 2002-10-17  Dick Porter  <dick@ximian.com>
20386
20387         * appdomain.c (mono_runtime_cleanup): Don't signal the async
20388         delegate semaphore before waiting for all threads to finish,
20389         because new threads can also call async delegates.  Fixes bug
20390         32004.
20391
20392         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
20393         of 3 seconds, in case another async job is queued.  (This part is
20394         needed because the bug fix reintroduced the 3s exit lag.)  This
20395         makes the mono_runtime_shutdown flag superfluous.
20396
20397 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
20398
20399         * reflection.c: include ehader size in method section headers.
20400         Really check for suplicated modules entries.
20401
20402 2002-10-17  Martin Baulig  <martin@gnome.org>
20403
20404         * debug-mono-symfile.c: Added back support for locals.
20405
20406 2002-10-14  Martin Baulig  <martin@gnome.org>
20407
20408         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
20409         MONO_TYPE_VOID.
20410
20411 2002-10-14  Martin Baulig  <martin@gnome.org>
20412
20413         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
20414         mono_class_get() instead of looking in the class cache. 
20415
20416 2002-10-13  Martin Baulig  <martin@gnome.org>
20417
20418         * debug-mono-symfile.c: Set version number to 28, include the
20419         signature in method names.
20420
20421 2002-10-13  Martin Baulig  <martin@gnome.org>
20422
20423         * debug-mono-symfile.h: Set version number to 27.
20424
20425 2002-10-11  Martin Baulig  <martin@gnome.org>
20426
20427         * gc.c: Don't register/unregister NULL pointers as disappearing links.
20428
20429 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20430
20431         * metadata.c, metadata.h: added helper function to allocate signatures.
20432
20433 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20434
20435         * icall.c: added internal call to get the location of machine.config.
20436
20437 2002-10-08  Martin Baulig  <martin@gnome.org>
20438
20439         * debug-mono-symfile.c: Ignore classes with a pending init for the
20440         moment.
20441
20442 2002-10-03  Dick Porter  <dick@ximian.com>
20443
20444         * threads.c: Freebsd pthread_t is a pointer
20445
20446 2002-10-03  Dick Porter  <dick@ximian.com>
20447
20448         * socket-io.c: Implemented GetHostName_internal
20449
20450 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20451
20452         * mono-config.c:
20453         (mono_config_parse_file): don't leak the text.
20454
20455 2002-10-02  Martin Baulig  <martin@gnome.org>
20456
20457         * debug-mono-symfile.c: Added support for methods.
20458
20459 2002-10-01  Martin Baulig  <martin@gnome.org>
20460
20461         * debug-mono-symfile.c: Don't emit methods and line numbers for
20462         the dynamic symbol file, just write the type table.  We can easily
20463         have an external helper program which creates a symbol file for an
20464         IL file.        
20465
20466 2002-10-01  Dick Porter  <dick@ximian.com>
20467
20468         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
20469         Only add the handle to the cleanup array when we're about to
20470         launch the thread.  Bug 31425 deadlocked when the test was run on
20471         mono under w32.
20472
20473 2002-10-01  Martin Baulig  <martin@gnome.org>
20474
20475         * debug-mono-symfile.c: Added support for properties.
20476
20477 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20478
20479         * reflection.c: unaligned store fix from Mark Crichton
20480         <crichton@gimp.org>.
20481
20482 2002-09-27  Martin Baulig  <martin@gnome.org>
20483
20484         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
20485         New interncall.
20486
20487 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
20488
20489         * assembly.h, assembly.c: use a sane API to hook into the assembly
20490         loading process instead of a useless special-purpouse hack
20491         (ngen needs a hook, too, for example).
20492
20493 2002-09-27  Dick Porter  <dick@ximian.com>
20494
20495         * threads.c (mono_thread_init): Call GetCurrentProcess() so
20496         io-layer can set up some process handle info.  Not needed on w32,
20497         but doesn't hurt either.
20498
20499         * process.c: Pass the program name in the second parameter to
20500         CreateProcess, so the path is searched.  Include the working
20501         directory. Implemented process name, process enumeration, and some
20502         process detail internal calls.
20503         
20504         * icall.c: Added internal calls for process lookup, and some
20505         process details
20506
20507 2002-09-26  Martin Baulig  <martin@gnome.org>
20508
20509         * assembly.c (mono_install_open_assembly_hook): New global
20510         function to install a function to be invoked each time a new
20511         assembly is loaded.
20512         (mono_assembly_open): Run this callback function if set.
20513
20514         * debug-mono-symfile.c: Put back line numbers for the dynamic
20515         symbol file and also record the .il file as source file.  This
20516         allows us to install the temporary symbol file as `file.dbg' just
20517         like a compiler-generated one.
20518
20519 2002-09-26  Nick Zigarovich <nick@chemlab.org>
20520
20521         * Corrected typo in gc.c (BOHEM vs BOEHM).
20522
20523 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20524
20525         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
20526         GetProperties. Also avoid calling g_slist_length in GetProperties and
20527         GetMethods.
20528
20529 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
20530
20531         * reflection.c: avoid unaligned stores (bug spotted by
20532         Mark Crichton  <crichton@gimp.org>).
20533
20534 2002-09-25  Martin Baulig  <martin@gnome.org>
20535
20536         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
20537         instead of guint64 for addresses and added prologue/epilogue info.
20538
20539 2002-09-25  Martin Baulig  <martin@gnome.org>
20540
20541         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
20542         store line number info.  For the dynamic symbol file, we only need
20543         to provide the JIT generated dynamic line number info for the dynamic
20544         symbol file.
20545
20546 2002-09-25  Martin Baulig  <martin@gnome.org>
20547
20548         * debug-mono-symfile.h: Incremented version number.
20549
20550 2002-09-24  Martin Baulig  <martin@gnome.org>
20551
20552         * class.c (mono_debugger_class_init_func): New global function
20553         pointer variable.
20554         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
20555         call it.
20556
20557         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
20558         function.  This is called via the mono_debugger_class_init_func
20559         hook to add all types to the dynamic type table.
20560         (ves_icall_MonoDebugger_GetType): New interncall to get a class
20561         from its metadata token.
20562
20563         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
20564         New interncall for the debugger.
20565
20566 2002-09-24  Nick Drochak <ndrochak@gol.com>
20567
20568         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
20569         before using it in case it is null.
20570         
20571 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20572
20573         * metadata.c: allow custom modifiers in local var signatures
20574         (bug spotted by Zoltan Varga).
20575
20576 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20577
20578         * class.c: deal with the <Module> class that may have a NULL vtable.
20579         Eliminate warnings.
20580
20581 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20582
20583         * image.c, image.h: more strong name helpers.
20584         * monosn.c: more work: convert pem keys to cryptoapi format.
20585
20586 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
20587
20588         * string-icalls.c: speedup IndexOf.
20589
20590 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20591
20592         * icall.c: updates from Zoltan.2.Varga@nokia.com.
20593
20594 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
20595
20596         * icall.c: cleanup: use mono_object_domain ().
20597
20598 2002-09-23  Martin Baulig  <martin@gnome.org>
20599
20600         * debug-mono-symfile.c: Improved type support.
20601
20602 2002-09-22  Martin Baulig  <martin@gnome.org>
20603
20604         * debug-mono-symfile.c: Added support for reference types and strings.
20605
20606 2002-09-22  Martin Baulig  <martin@gnome.org>
20607
20608         * debug-mono-symfile.c: Started to work on the type table.
20609
20610 2002-09-21  Martin Baulig  <martin@gnome.org>
20611
20612         * debug-mono-symfile.c: Largely reworked the symbol table format.
20613         The symbol table is now incrementally updated each time a new
20614         method is added.  We're now also using our own magic and version
20615         so that you don't need to recompile all your classes if the
20616         dynamic table changes.
20617         (mono_debug_update_mono_symbol_file): Removed.
20618         (mono_debug_symfile_add_method): New function to add a method.
20619
20620 2002-09-21  Martin Baulig  <martin@gnome.org>
20621
20622         * icall.c
20623         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
20624         New interncall.
20625
20626         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
20627         New interncall to get a method from its metadata token.
20628
20629 2002-09-21  Martin Baulig  <martin@gnome.org>
20630
20631         * debug-mono-symfile.c: Create type table.
20632
20633 2002-09-20  Martin Baulig  <martin@gnome.org>
20634
20635         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
20636
20637 2002-09-20  Martin Baulig  <martin@gnome.org>
20638
20639         * debug-mono-symfile.c: Provide information about params and locals.
20640
20641 2002-09-20  Martin Baulig  <martin@gnome.org>
20642
20643         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
20644         New interncall.
20645
20646         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
20647         interncall to get a method from its metadata token.
20648
20649 2002-09-20  Martin Baulig  <martin@gnome.org>
20650
20651         * debug-mono-symfile.c: Added a few checks for method->header
20652         being non-NULL.  This should never happen, but for the moment
20653         let's use a g_warning() rather than a g_assert().
20654
20655 2002-09-19  Mark Crichton  <crichton@gimp.org>
20656
20657         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
20658         even if support for it isn't present.  Added an #ifdef to fix this.
20659
20660         * socket-io.c: Added checks back for Solaris support.
20661
20662 2002-09-19  Martin Baulig  <martin@gnome.org>
20663
20664         * debug-mono-symfile.c (read_string, write_string): Reflect latest
20665         changes in the symbol file format.
20666
20667 2002-09-18  Martin Baulig  <martin@gnome.org>
20668
20669         * debug-mono-symfile.c: Set version number to 21.
20670
20671 2002-09-18  Dick Porter  <dick@ximian.com>
20672
20673         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
20674         on netbsd.  Fixes bug 30051.
20675
20676 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20677
20678         * reflection.c:
20679         (set_version_from_string): little fix.
20680
20681 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20682
20683         * monosn.c, Makefile.am: added strong name utility.
20684         * reflection.h, reflection.c: implemented delayed signing,
20685         locale, version and hash id assembly attributes.
20686
20687 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
20688
20689         * loader.c, metadata.c: load param attributes in signatures.
20690
20691 2002-09-16  Martin Baulig  <martin@gnome.org>
20692
20693         * debug-mono-symfile.c: Added string table with all method names.
20694
20695 2002-09-14  Martin Baulig  <martin@gnome.org>
20696
20697         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
20698         fast method lookup.
20699
20700 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20701
20702         * reflection.c: record the public key token of referenced assemblies.
20703
20704 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20705
20706         * image.c, image.h: added functions to get the strong name and the
20707         public key of an assembly.
20708         * pedump.c: use them.
20709
20710 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
20711
20712         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
20713
20714 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
20715
20716         * marshal.c (mono_marshal_get_managed_wrapper): Added
20717         MONO_TYPE_BOOLEAN 
20718
20719 2002-09-11  Martin Baulig  <martin@gnome.org>
20720
20721         * gc.c: Call GC_unregister_disappearing_link() on all links when
20722         finalizing them, this is necessary to aviod a crash in boehm's
20723         finalize handler.
20724
20725 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
20726
20727         * gc.c: handle GetTarget for finalized objects spotted and fixed by
20728         nick@chemlab.org.
20729
20730 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
20731
20732         * icall.c: implemented MonoType::Module.
20733         * reflection.c, reflection.h: mono_module_get_object () from
20734         Tomi Pakarinen <tomi.pakarinen@welho.com>.
20735
20736 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
20737
20738         * icall.c: ignore overridden methods in GetMethods ().
20739         Fix for FieldInfo::SetValue().
20740         * object.c: handle float/double in runtime invoke.
20741
20742 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20743
20744         * object.c: allow a constructor to be called again on an object.
20745
20746 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20747
20748         * class.h, class.c: move field layout code to it's own function and
20749         export it. Get an interface id earlier. Move fields in MonoClass
20750         so they are more cache friendly and align the bitfields.
20751         * loader.c: temporary handle get_param_names() for a runtime method.
20752         * reflection.c, reflection.h: more code to handle runtime creation of
20753         types.
20754
20755 2002-09-09  Martin Baulig  <martin@gnome.org>
20756
20757         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
20758         signature with the pinvoke field being set for the actual call.
20759
20760 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20761
20762         * icall.c: removed some unused icalls. Start of map of glib charsets
20763         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
20764
20765 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
20766
20767         * debug-helpers.c: break infinite loop (found and fixed by
20768         Holger Arnold <harnold@gmx.de>).
20769
20770 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20771
20772         * icall.c: target may be null in create_delegate.
20773
20774 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20775
20776         * marshal.c: handle a boolean return type.
20777
20778 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20779
20780         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
20781
20782 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
20783
20784         * gc.c: fix weakreferences.
20785
20786 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
20787
20788         * icall.c: added icall to get default codepage.
20789
20790 2002-09-03  Dick Porter  <dick@ximian.com>
20791
20792         * threads.h: 
20793         * threads.c: Use MonoThread instead of MonoObject where
20794         apropriate.
20795
20796         Store running thread objects in a hash table, so that we have all
20797         the info to hand when waiting for them to finish
20798         (means we don't need OpenThread() any more, so mingw builds should
20799         be fully functional again.)
20800
20801         * verify.c:
20802         * object.h: Added thread ID to MonoThread
20803
20804 2002-09-03  Martin Baulig  <martin@gnome.org>
20805
20806         * icall.c (System.Reflection.Assembly::get_location): New interncall.
20807
20808 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20809
20810         * icall.c: fixed leak in get_temp_path. Thanks lupus.
20811
20812 2002-09-03  Martin Baulig  <martin@gnome.org>
20813
20814         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
20815         argument to store the end address of the disassembled instruction.
20816
20817         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
20818         here from debug-symfile.h.
20819         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
20820         JIT into this struct.
20821         (MonoSymbolFile): Added `char *image_file' field.
20822         (MonoDebugGetMethodFunc): Removed.
20823         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
20824         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
20825         (mono_debug_find_method): New method.
20826
20827         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
20828         create a full symbol file.
20829         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
20830         and static symbol files.
20831         (mono_debug_find_method): The symbol file keeps an internal method hash,
20832         call this to get a MonoDebugMethodInfo from a MonoMethod.
20833
20834         * debug-symfile.[ch]: Removed.
20835
20836 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
20837
20838         * image.c (do_mono_image_open): Remove linker version check.
20839
20840 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
20841
20842         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
20843         wrappers for instance methods.
20844         
20845 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20846
20847         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
20848
20849 2002-08-28  Dick Porter  <dick@ximian.com>
20850
20851         * Makefile.am: Export HOST_CC for w32 builds
20852
20853 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20854
20855         * file-io.c process.c: MonoString are null terminated, no
20856         need for mono_string_to_utf16() anymore.
20857
20858 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
20859
20860         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
20861
20862 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
20863
20864         * icall.c, reflection.h: speedup System.MonoType.
20865
20866 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20867
20868         * reflection.c: allow null as the value of a string argument in
20869         custom attributes constructors.
20870
20871 2002-08-27  Martin Baulig  <martin@gnome.org>
20872
20873         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
20874         `trampoline_address' field.
20875
20876 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
20877
20878         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
20879         check (fixes bug #29486) 
20880
20881 2002-08-27  Martin Baulig  <martin@gnome.org>
20882
20883         * debug-mono-symfile.c: Changed the file format in a way that allows us
20884         open it read-only and to use a specially malloced area for all the
20885         dynamic data.  We can now also generate a symbol file on-the-fly if we're
20886         debugging IL code and there is no MCS generated symbol file for it.
20887
20888 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
20889
20890         * object.c: added a define for a good string and array
20891         creation speedup (not enabled by default because we need to deal with
20892         the synch stuff).
20893
20894 2002-08-26  Martin Baulig  <martin@gnome.org>
20895
20896         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
20897         function to create a dynamic symbol file.  This is used by the
20898         debugger to create a symbol file for IL code on-the-fly.
20899
20900 2002-08-26  Martin Baulig  <martin@gnome.org>
20901
20902         * loader.c (mono_lookup_pinvoke_call): Include the error message
20903         from g_module_error() in the error message.
20904
20905 2002-08-24  Martin Baulig  <martin@gnome.org>
20906
20907         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
20908         function to update the symbol file.  The symbol file is mmap()ed
20909         writable, but private.  This allows us to install the symbol file
20910         together with the assembly.
20911
20912 2002-08-24  Martin Baulig  <martin@gnome.org>
20913
20914         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
20915         but they can read the new symbol file format which mcs is now creating.
20916
20917         * debug-symfile.c (mono_debug_find_source_location): Moved to
20918         debug-mono-symfile.c; this is now operating on the new symbol file.
20919
20920 2002-08-23  Martin Baulig  <martin@gnome.org>
20921
20922         * debug-helpers.c (mono_method_desc_from_method): New function to get
20923         a MonoMethodDesc from a MonoMethod.
20924
20925 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
20926
20927         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
20928         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
20929
20930 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
20931
20932         * string-icalls.[ch]: make helper methods static.
20933
20934 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20935
20936         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
20937         types to it and to SetValueInternal.
20938
20939         * object.c: Moved handle_enum label to its proper place. This was the
20940         f... bug! ;-)
20941
20942         This time i compiled mcs and gtk-sharp and they both work.
20943
20944 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20945
20946         * icall.c: reverted partially my previous patch until 
20947         object.c:set_value handles enums correcly.
20948
20949 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20950
20951         * icall.c:
20952         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
20953         (ves_icall_System_Environment_get_MachineName): removed warning when
20954         compiling under cygwin.
20955
20956 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
20957
20958         * object.c: fixed field_get_value() for reference types.
20959
20960 2002-08-22  Dick Porter  <dick@ximian.com>
20961
20962         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
20963         Don't free a buffer while it's still needed.  Patch from Jonathan
20964         Liger <Jonathan.liger@wanadoo.fr>
20965
20966 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
20967
20968         * icall.c (ves_icall_System_Environment_get_Platform): Add new
20969         internal call.
20970
20971 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
20972
20973         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
20974         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
20975
20976         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
20977         we call unmanaged code which throws exceptions.
20978
20979 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
20980
20981         * appdomain.h: added per-domain entry_assembly.
20982         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
20983         arguments.
20984         * icall.c: Assembly::GetEntryAssembly icall.
20985         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
20986         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
20987
20988 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
20989
20990         * appdomain.h, gc.c: added mono_domain_finalize ().
20991
20992 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20993
20994         * object.c:
20995         (mono_print_unhandled_exception): changed g_warning by g_printerr
20996         because g_log has a 1024 characters limit (yeah, i got a big stack
20997         trace). Don't print exception name, that should be in ToString 
20998         returned string.
20999
21000 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21001
21002         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
21003         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
21004
21005 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21006
21007         * object.c:
21008         (mono_print_unhandled_exception): after previous commit, i realized
21009         that MS calls ToString on the exception. I changed this function to
21010         do that. This way we get stack_trace for free.
21011
21012 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21013
21014         * object.c:
21015         (mono_print_unhandled_exception): invoke Message property instead of
21016         getting 'message' field from Exception. Don't allocate memory for
21017         'trace' and 'message' if not needed.
21018
21019 2002-08-18  Dick Porter  <dick@ximian.com>
21020
21021         * unicode.c: Fix asserts to match Encoder.cs checks
21022
21023 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21024
21025         * marshal.c: fix unaligned store issue and a few wrong
21026         opcode argument types.
21027
21028 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21029
21030         * icall.c: added GetUninitializedObjectInternal internal call.
21031
21032 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
21033
21034         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
21035         to the right domain.
21036
21037 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
21038
21039         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
21040
21041         * class.c (class_compute_field_layout): set blittable to false for Strings
21042
21043         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
21044
21045 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21046
21047         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
21048         first chunk of code to create types at runtime. Code to
21049         handle ReflectedType/DeclaringType. Make reflection handles
21050         domain specific.
21051
21052 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
21053
21054         * class.c: set correct name in arrays.
21055
21056 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
21057
21058         * appdomain.c (mono_domain_transfer_object): make it work with
21059         valuetypes. bug fixes.
21060
21061 2002-08-12  Dick Porter  <dick@ximian.com>
21062
21063         * object.h: Rename some parameters to avoid c++ keywords (Patch
21064         from Joseph Wenninger <kde@jowenn.at>)
21065
21066 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
21067
21068         * icall.c: added icall to implement Assembly.GetFile*.
21069
21070 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21071
21072         * reflection.h, reflection.c: code to embed managed resources.
21073
21074 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21075
21076         * class.c: move all the type size stuff into
21077         class_compute_field_layout().
21078
21079 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21080
21081         * class.c: ensure enums have always the correct instance size.
21082         * unicode.c: remove wrong assert.
21083
21084 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21085
21086         * assembly.c: fix mem corruption issue.
21087         * image.h, image.c: added mono_image_get_resource () to access
21088         managed resources.
21089         * icall.c: implemented Assembly.EntryPoint property and some
21090         Managed Resources related internalcalls.
21091
21092
21093 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21094
21095         * image.c, image.h: impemented mono_image_get_entry_point ().
21096         * appdomain.c: use mono_image_get_entry_point.
21097
21098 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21099
21100         * reflection.c: support the object type argument when loading
21101         custom attributes.
21102
21103 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
21104
21105         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
21106         String as return type.
21107
21108 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
21109
21110         * reflection.c: fix encoding of named args for custom attrs to match
21111         the ms implementation. Read them back when instantiating custom
21112         attributes.
21113
21114 2002-08-02  Radek Doulik  <rodo@ximian.com>
21115
21116         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
21117         by Dietmar as quick fix
21118         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
21119         16 as stack size, used on more places as quick fix before Dietmar
21120         will fix it properly
21121
21122 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21123
21124         * object.h, object.c: added accessors for fields and properties.
21125
21126 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21127
21128         * class.c, class.h: made mono_class_get_field_from_name ()
21129         loop on parent types.
21130         Added mono_class_get_property_from_name ().
21131
21132 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21133
21134         * class.c, class.h: move the code to setup the type vtable in its own
21135         function so that it can be reused also for types created at runtime.
21136         Eliminate the "class" identifier from the header file.
21137         * reflection.c: setup the vtable for enums so that we can create
21138         objects for use in SetConstant ().
21139
21140 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
21141
21142         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
21143         instead of the delegate itself as this pointer (bug #28383)
21144
21145 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
21146
21147         * marshal.c (mono_marshal_get_managed_wrapper): added return type
21148         conversions.
21149
21150 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21151
21152         * loader.c: don't set the pinvoke bit on icalls.
21153
21154 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
21155
21156         * debug-helpers.c (mono_method_full_name): only print a number to
21157         indicate wrapper type (so that the output is more readable in traces).
21158
21159 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
21160
21161         * class.c (mono_class_init): include method override patch from Paolo
21162
21163 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
21164
21165         * icall.c: fixed GetTypeCode().
21166
21167 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
21168
21169         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
21170         use real delegate invoke function to make it work with multicast
21171         delegates (fix bug# 28291).
21172
21173 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21174
21175         * object.c: load constant strings.
21176
21177 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21178
21179         * reflection.c: no magic numbers.
21180         * tabledefs.h: security action enum.
21181
21182 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21183
21184         * assembly.c: fix possible memory corruption.
21185
21186 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21187
21188         * reflection.h, reflection.c: added support for linking resources.
21189         * verify.c: check we have an updated corlib.
21190
21191 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
21192
21193         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
21194         string arrays.
21195         (mono_marshal_string_array): null terminate unmanaged string arrays.
21196         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
21197
21198 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21199
21200         * icall.c: Type.GetType () can now return also types from the
21201         calling assembly.
21202
21203 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21204
21205         * loader.h, loader.c: stack walking support.
21206         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
21207         GetCallingAssembly.
21208
21209 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
21210
21211         * marshal.c: added optimisations for blittable types 
21212
21213         * class.c (mono_array_class_get): do not set blittable attribute on arrays
21214         (mono_class_setup_mono_type): set blittable attribute for single
21215         and double.
21216
21217         * marshal.c (mono_string_utf8_to_builder): impl.
21218         (mono_string_builder_to_utf8): impl.
21219         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
21220
21221 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
21222
21223         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
21224         (mono_marshal_get_managed_wrapper): impl. byref types
21225
21226 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21227
21228         * icall.c:
21229         (search_method): don't display debug message. 
21230
21231 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
21232
21233         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
21234
21235 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21236
21237         * appdomain.c: set the missing filename when throwing exception.
21238
21239 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
21240
21241         * metadata.c (mono_type_size): code cleanup
21242         (mono_type_stack_size): removed some test code
21243
21244 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
21245
21246         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
21247         mono_get_exception_file_not_found now.
21248
21249         * exception.c (mono_exception_from_name_two_strings): New version
21250         that will call a constructor with two string arguments. 
21251         (mono_get_exception_file_not_found): New helper routine, used to
21252         report file-not-found errors.
21253
21254 2002-07-20  Dick Porter  <dick@ximian.com>
21255
21256         * process.h:
21257         * process.c: Pass file handles to CreateProcess
21258         
21259         * icall.c:
21260         * file-io.h:
21261         * file-io.c: Implemented CreatePipe
21262
21263 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
21264
21265         * metadata.c (mono_get_param_info): set alignment for value types
21266
21267 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21268
21269         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
21270         Constify mono_domain_assembly_open().
21271         * loader.c: handle null namespace in icalls.
21272
21273 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
21274
21275         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
21276         (emit_str_to_ptr_conv): marshal object as structs
21277
21278         * metadata.c (mono_type_to_unmanaged): marshal object as structs
21279
21280         * marshal.c (mono_marshal_get_runtime_invoke): support value types
21281
21282 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
21283
21284         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
21285         (mono_marshal_get_native_wrapper): we an now return value types
21286
21287 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21288
21289         * verify.c: more checks implemented.
21290
21291 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
21292
21293         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
21294         (fix bug #27695)
21295         (mono_marshal_get_native_wrapper): allow byref arguments
21296         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
21297         impl. PtrToStringXXX methods
21298         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
21299         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
21300         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
21301         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
21302         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
21303
21304 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21305
21306         * reflection.c: fix buglet in parsing an assembly name.
21307
21308 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
21309
21310         * marshal.c (emit_ptr_to_str_conv): first impl.
21311
21312 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21313
21314         * object.c, class.h: cache the vtable in the class as suggested by
21315         vargaz@freemail.hu (Zoltan Varga).
21316
21317 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21318
21319         * class.h, loader.c: added mono_field_from_token().
21320         * verify.c: first cut of type checking code.
21321
21322 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
21323
21324         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
21325
21326 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
21327
21328         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
21329         (fix bug #27782)
21330         (mono_marshal_get_remoting_invoke): impl.
21331         (mono_delegate_begin_invoke): impl.
21332         (mono_mb_emit_save_args): impl.
21333         (mono_delegate_end_invoke): impl.
21334         (mono_marshal_get_delegate_begin_invoke):
21335         (mono_marshal_get_delegate_end_invoke):
21336         (mono_marshal_get_delegate_invoke): generate a special name for
21337         those methods (including the signature) and associate them whith
21338         the delegate class. 
21339
21340 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
21341
21342         * reflection.[ch]: 
21343         (mono_reflection_type_from_name): now it has a MonoImage parameter
21344         which is used as the default image to search the type in. If the image
21345         is NULL or getting the type from it fails, it defaults to corlib.
21346
21347         * icall.c: changed 1 call to mono_reflection_type_from_name to match
21348         new parameter.
21349
21350 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21351
21352         * reflection.c: update the parameter table index.
21353
21354 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21355
21356         * domain.c: don't include the mark byte in the string hash.
21357
21358 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21359
21360         * icall.cs: icall for Type.GetTypeCode ().
21361         * verify: a couple of fixes and disabled local initialization checks.
21362
21363 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
21364
21365         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
21366
21367         * debug-helpers.c (mono_method_full_name): print the type of the
21368         runtime wrapper
21369
21370         * metadata.c (mono_signature_hash): a hash function for signatures
21371         (mono_signature_hash): better hash algorithm
21372
21373         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
21374
21375         * debug-helpers.c (mono_method_full_name): this can now generate
21376         method names with signatures
21377
21378         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
21379         method dont have this pointers.
21380
21381 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
21382
21383         * reflection.c: fixup typebuilder tokens.
21384         * image.c: fix buglet.
21385         * marshal.h: remove whitespace.
21386         * metadata.h, metadata.c: reinstate code that was removed.
21387         * verify.c: handle catch directives and fix another couple of bugs.
21388
21389 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
21390
21391         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
21392         (mono_marshal_get_native_wrapper): make it comp. with the old code
21393         (mono_marshal_get_native_wrapper): support boolean
21394         (mono_marshal_get_managed_wrapper): support more types
21395
21396 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
21397
21398         * class.c (class_compute_field_layout): compute class->blittable attribute.
21399
21400 2002-07-09  Dick Porter  <dick@ximian.com>
21401
21402         * threads.c: Make the thread cleaning up cope with threads that
21403         call ExitThread()
21404
21405 2002-07-08  Radek Doulik  <rodo@ximian.com>
21406
21407         * reflection.c (method_encode_code): use non-translated values to
21408         compute finally_start, this fixes exception handling on ppc, yay!
21409
21410         * decimal.h (struct signscale): fix endianess
21411
21412 2002-07-07  Radek Doulik  <rodo@ximian.com>
21413
21414         * reflection.c: swap box_val and not val
21415
21416 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
21417
21418         * reflection.c, reflection.h: handle full assembly info in type name.
21419         Handle Type arguments when loading custom attributes.
21420         * icall.c: updated to use new mono_reflection_type_from_name () method.
21421
21422 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21423
21424         * loader.c:
21425         (method_from_memberref): also print assembly name when method not found.
21426
21427 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21428
21429         * icall.c:
21430         (ves_icall_TypeGetProperties): fixed bug #27473. 
21431
21432 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21433
21434         * reflection.c: display image name and token when cannot find the
21435         .ctor for an attribute.
21436
21437 2002-07-05  Martin Baulig  <martin@gnome.org>
21438
21439         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21440
21441 2002-07-04  Dick Porter  <dick@ximian.com>
21442
21443         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
21444         compile on mingw.  This will cause mingw builds to not wait for
21445         subthreads to terminate after the main thread does.  I've lodged a
21446         bug with the mingw developers for them to wrap OpenThread().
21447
21448 2002-07-03  Dick Porter  <dick@ximian.com>
21449
21450         * threads.c: Store thread IDs instead of handles, because
21451         GetCurrentThread() returns a pseudohandle and therefore stores
21452         useless values.  mono_thread_cleanup() continues checking the
21453         array of threads until it is empty, to cope with subthreads
21454         spawning new threads after the main thread has finished.
21455
21456         * profiler.h:
21457         * profiler.c:
21458         * profiler-private.h: Pass the thread ID to thread profiler
21459         functions, instead of a handle
21460
21461 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21462
21463         * verify.c: fixes to make it more usable.
21464         * pedump.c: added --verify code to verify IL code in an assembly.
21465
21466 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21467
21468         * reflection.c: turn errors into warnings to allow compiling corlib.
21469
21470 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
21471
21472         * reflection.c: add special cases to compile corlib.
21473
21474 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21475
21476         * reflection.c: handle properties with only a set method.
21477
21478 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21479
21480         * opcodes.h: add enum with opcodes in opval order.
21481
21482 2002-07-01  Dick Porter  <dick@ximian.com>
21483         
21484         * object.h:
21485         * object.c (mono_runtime_run_main): Removed unneeded argument
21486
21487 2002-06-28  Martin Baulig  <martin@gnome.org>
21488
21489         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21490
21491 2002-06-27  Dick Porter  <dick@ximian.com>
21492
21493         * threads.c: Store the handle in both the parent thread and in the
21494         subthread, to minimise the time between starting a new thread and
21495         storing its ID.
21496
21497 2002-06-26  Dick Porter  <dick@ximian.com>
21498
21499         * appdomain.c (mono_runtime_cleanup): Close the socket library
21500         after all the threads have finished, not before
21501
21502 2002-06-26  Martin Baulig  <martin@gnome.org>
21503
21504         * debug-symfile.c (mono_debug_find_source_location): Added
21505         `guint32 *line_number' argument.  If it's not NULL, store the line number
21506         there and return the file name without the line number.
21507
21508 2002-06-25  Dick Porter  <dick@ximian.com>
21509
21510         * icall.c:
21511         * process.h:
21512         * process.c: Process forking and other support functions
21513
21514 2002-06-25  Dick Porter  <dick@ximian.com>
21515
21516         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
21517         things dont happen when the image is closed.
21518         (mono_image_lookup_resource): Walk the resource section looking
21519         for a particular entry
21520
21521         * cil-coff.h: PE resource section decoding
21522
21523 2002-06-25  Dick Porter  <dick@ximian.com>
21524         
21525         * assembly.h:
21526         * assembly.c: 
21527         (mono_assembly_foreach): Accessor functions to walk the list of
21528         loaded assemblies
21529         (mono_assembly_set_main):
21530         (mono_assembly_get_main): Process methods need to know which
21531         assembly is the "main" one
21532
21533         * object.c (mono_runtime_run_main): Record the main assembly
21534
21535         * debug-helpers.c: Fix typo
21536
21537 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
21538
21539         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
21540         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
21541
21542 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21543
21544         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
21545
21546 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
21547
21548         * image.c (do_mono_image_open): Initialize reference count,
21549         otherwise we leak the MonoImage.
21550
21551 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21552
21553         * reflection.c: small tweak to handle self-hosting.
21554
21555 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21556
21557         * reflection.c: fix type name parse code.
21558
21559 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21560
21561         * reflection.c: break out of the loop.
21562         * image.c: special case corlib.
21563
21564 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21565
21566         * reflection.c: add all the custom attrs at the end to ensure the
21567         ctors have been properly initialized when the attributes are defined
21568         in the current assembly.
21569
21570 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21571
21572         * reflection.c: handle correctly multiple-nested types.
21573
21574 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
21575
21576         * row-indexes.h: fix typos.
21577         * reflection.c: adjust for typos and fix method_def_or_ref
21578         encoding in MethodImpl table.
21579
21580 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21581
21582         * reflection.c: fix entry point patching (thanks Serge!).
21583
21584 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
21585
21586         * verify.c: add check for System.Exception
21587
21588 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21589
21590         * image.c, class.c: minifix for code just c&p'ed.
21591         * reflection.c: warning fix.
21592         * object.h, loader.h, domain.c: load also StringBuilder.
21593
21594 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21595
21596         * marshal.h, marshal.c: some support code to handle complex marshaling.
21597
21598 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21599
21600         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
21601         Better signatures with vtable error dump.
21602
21603 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
21604
21605         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
21606
21607 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
21608
21609         * icall.c (ves_icall_Type_GetField): impl.
21610
21611 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21612
21613         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
21614         to retrieve a marshal description blob for a field or param.
21615
21616 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21617
21618         * reflection.h, reflection.c: change order of nested type emission
21619         to avoid table corruption. The NestedTypes table is sorted.
21620         * icall.c: change order of GetConstructor results to workaround mcs bug.
21621
21622 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21623
21624         * reflection.h, reflection.c: handle field and param marshal
21625         information.
21626
21627 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21628
21629         * icall.c, marshal.c marshal.h: more Marshal class implementation.
21630
21631 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21632
21633         * reflection.c: fix call convention.
21634
21635 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21636
21637         * reflection.h, reflection.c: mono_image_get_memberref_token()
21638         takes a type instead of a class, now. Added
21639         mono_image_get_array_token() to create tokens for the special
21640         multi-dim array methods.
21641
21642 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21643
21644         * assembly.c: handle modules (no assembly table). Split
21645         loading references in its own function.
21646         * class.c: handle moduleref resolution scope.
21647         * image.c, image.h: cache module name in image.
21648
21649 2002-06-07  Martin Baulig  <martin@gnome.org>
21650
21651         * reflection.c (mono_image_get_type_info): Only add a class layout entry
21652         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
21653
21654 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21655
21656         * icall.c: more signature fixes that used uint instead of int.
21657
21658 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21659
21660         * reflection.c: fixed signature of field refs.
21661
21662 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21663
21664         * class.c, reflection.c: handle typerefs of nested types
21665         (both on read and when writing files).
21666
21667 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
21668
21669         * icall.c: fix method signatures that tried to workaround the previous
21670         typo, d'oh!
21671
21672 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21673
21674         * debug-helpers.c: fix typo.
21675
21676 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21677
21678         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
21679         rewrote the PE/COFF writing code (our programs are understood by the
21680         ms runtime, now).
21681
21682 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21683
21684         * gc.c, gc.h, icall.c: weakreference support.
21685
21686 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21687
21688         * Makefile.am, mono-config.c: use $(sysconfdir).
21689
21690 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21691
21692         * icall.c: changed default precision of Double.ToString() to 15.
21693         Fixed memory leak. Unified with Single.ToString.
21694
21695 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
21696
21697         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
21698
21699 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
21700
21701         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
21702         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
21703         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
21704         and myself.
21705
21706 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21707
21708         * debug-symfile.c, sysmath.c: yet more compilation fixes.
21709
21710 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21711
21712         * reflection.c, socket-io.c: more compilation fixes.
21713
21714 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21715
21716         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
21717         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
21718         unicode.c: warning and compiler compatibility fixes.
21719
21720 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
21721
21722         * class.h, metadata.c: fixed warnings/compilation errors.
21723
21724 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21725
21726         * Makefile.am, mono-config.c, mono-config.h: configuration file
21727         support routines.
21728         * loader.c, loader.h: make Dll mapping configurable at runtime in the
21729         config file. Export methods to insert and lookup mappings.
21730
21731 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21732
21733         * reflection.c: handle types and boxed objects in custom attr
21734         constructors.
21735
21736 2002-05-30  Martin Baulig  <martin@gnome.org>
21737
21738         * debug-symfile.c
21739         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
21740
21741 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
21742
21743         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
21744         to lookup the implmap row for a P/Invoke method.
21745         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
21746         P/Invoke method from the runtime on an as needed basis.
21747
21748 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
21749
21750         * metadata.c (mono_metadata_parse_signature): impl.
21751
21752 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21753
21754         * class.c: handle .pack directive.
21755
21756 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
21757
21758         * object.c: initialize static fields with RVA data.
21759
21760 2002-05-25  Martin Baulig  <martin@gnome.org>
21761
21762         * debug-symfile.c
21763         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
21764
21765 2002-05-24  Martin Baulig  <martin@gnome.org>
21766
21767         * debug-symfile.c
21768         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
21769         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
21770         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
21771
21772 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
21773
21774         * object.c: special case string ctros in invoke.
21775         * gc.c: silly whitespace changes.
21776
21777 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
21778
21779         * threadpool.[ch]: impl. a threadpool that can
21780         be used by mint and mono.
21781
21782 2002-05-22  Martin Baulig  <martin@gnome.org>
21783
21784         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
21785         The first argument is now a `MonoReflectionModuleBuilder *', the return
21786         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
21787         `methods' field to get the method builder.  The `token' argument is the
21788         unfixed token.
21789
21790         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
21791         invalid characters instead of g_assert_not_reached()ing.  This seems
21792         to be the behaviour of mscorlib.
21793
21794 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
21795
21796         * object.c (mono_runtime_invoke_array): applied patch from Rachel
21797         Hestilow to fix bug #25104
21798
21799 2002-05-21  Martin Baulig  <martin@gnome.org>
21800
21801         * debug-symfile.c (mono_debug_find_source_location): New function.
21802         Looks up an IL offset in the line number table and returns the source
21803         location as a string.
21804
21805 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21806
21807         * icall.c:
21808         (mono_double_ToStringImpl): changed %f by %g until we have something
21809         better.
21810
21811 2002-05-21  Nick Drochak  <ndrochak@gol.com>
21812
21813         * icall.c : Use different name for Math.Pow's icall.  Needed to check
21814         parameters first in C#.
21815
21816 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21817
21818         * icall.c, reflection.h: added icall to get info about an event.
21819
21820 2002-05-20  Radek Doulik  <rodo@ximian.com>
21821
21822         * object.c (mono_value_box): don't use memcpy for boxing on BIG
21823         endian
21824         (mono_value_box): don't use memcpy for small sizes on
21825         architectures with unaligned access
21826
21827 2002-05-20  Martin Baulig  <martin@gnome.org>
21828
21829         * reflection.c (mono_reflection_setup_internal_class): Don't crash
21830         if `tb->parent == NULL'.
21831         (mono_reflection_create_internal_class): New function.  This is
21832         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
21833         for enum types.
21834
21835         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
21836         New interncall.
21837
21838 2002-05-19  Martin Baulig  <martin@gnome.org>
21839
21840         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
21841         argument to get the length, don't default to the array length.
21842
21843 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
21844
21845         * assembly.c (mono_assembly_setrootdir): New function used to
21846         override the MONO_ASSEMBLIES directory.
21847
21848 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
21849
21850         * icall.c: ValueType_GetHashCode() initialize local var.
21851
21852 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21853
21854         * reflection.c: sort custom attributes table.
21855
21856 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
21857
21858         * reflection.c: support named args in custom attributes (write support).
21859
21860 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
21861
21862         * reflection.c: fix finally position calculation.
21863
21864 2002-05-15  Radek Doulik  <rodo@ximian.com>
21865
21866         * reflection.c: fixed endianess at many places
21867
21868         * icall.c (ves_icall_InitializeArray): comment out debug msg
21869
21870 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
21871
21872         * object.c (mono_unhandled_exception): new function to handle
21873         unhandled exceptions.
21874         (mono_unhandled_exception): call the UnhandledException event.
21875         (mono_runtime_delegate_invoke): impl.
21876
21877 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
21878
21879         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
21880         returns the RVA, not the direct pointer to the data. Handle the case
21881         when the class size is fixed.
21882
21883 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21884
21885         * reflection.c: fix some endianess issues.
21886
21887 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
21888
21889         * object.c (mono_runtime_invoke): is now able to catch exceptions.
21890
21891         * threads.c (mono_thread_init): added a callback which is invoked
21892         at thread start.
21893
21894 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
21895         
21896         * icall.c: make GetHashCode return non-negative values.
21897
21898 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
21899
21900         * object.c, icall.c, gc.c: revert to address-based hashcode.
21901
21902 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
21903
21904         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
21905
21906 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21907
21908         * icall.c, class.c: special case <Module>.
21909
21910 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
21911
21912         * icall.c: fix bug in GetNow().
21913
21914 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
21915
21916         * object.c (mono_runtime_class_init): make sure that we call all
21917         static class constructors.
21918
21919 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21920
21921         * reflection.c: sort methodsemantics table.
21922
21923 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21924
21925         * reflection.h, reflection.c: honour init locals setting.
21926
21927 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
21928
21929         * icall.c: copied Double ToStringImpl for Single ToStringImpl
21930
21931 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
21932
21933         * reflection.c: support ContructorBuilders in attribute blob creation.
21934
21935 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21936
21937         * reflection.c: some changes to build a binary that can be run
21938         directly in windows.
21939
21940 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
21941
21942         * loader.c: print a big message when an icall can't be found.
21943
21944 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21945
21946         * string-icalls.c: fix bug 24248.
21947
21948 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
21949
21950         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
21951         icall.c, reflection.h: separate assembly loading by pathname and by
21952         assembly name. Use the MONO_PATH env var to search for assemblies.
21953
21954 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21955
21956         * assembly.c, image.h: add some support for assemblies
21957         with multiple modules.
21958         * class.c, class.h: export mono_class_from_typeref().
21959         * loader.c: remove duplicated code and use mono_class_from_typeref(),
21960         instead.
21961
21962 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21963
21964         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
21965         documentation says (the ECMA one is correct).
21966
21967 2002-05-02  Dick Porter  <dick@ximian.com>
21968
21969         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
21970         Don't name the synchronisation mutex.
21971
21972 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
21973
21974         * rand.c
21975         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
21976         Make the prototypes match.
21977         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
21978         Same.
21979
21980         * icall.c
21981         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
21982         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
21983         all systems have tm.tm_zone, so use strftime() with %Z to print
21984         the timezone abreviation into a temp string.
21985
21986         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
21987         rather than mono_array_addr() on a MonoString on Big Endian
21988         machines.
21989
21990 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
21991
21992         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
21993         fix bug 24041
21994
21995 2002-04-30  Dick Porter  <dick@ximian.com>
21996
21997         * socket-io.c: Cope with SOCKET being an integer rather than a
21998         pointer now.
21999
22000         * threads.c: Added Thread_free_internal, to deal with thread
22001         handle cleanup.  Moved calls to handle_store() and handle_remove()
22002         to start_wrapper(), so each can only be called once.  Allocate
22003         synchronisation blocks with GC_malloc(), and use GC finalisation
22004         to close the handles.
22005
22006         * icall.c: added System.Threading.Thread::Thread_free_internal
22007
22008 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22009
22010         * icall.c: support Environment.Exit, CommandLineArgs().
22011
22012 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
22013
22014         * object.c, object.h: added mono_runtime_run_main () and
22015         mono_runtime_get_main_args () for use in System.Environment.
22016
22017 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22018
22019         * gc.c: fix thinko, enable actual finalization since the jit is now
22020         fixed.
22021
22022 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22023
22024         * gc.c, object.c: take into account that an object may be offset wrt the address
22025         returned by GC_malloc().
22026
22027 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
22028
22029         * image.c: handle files without entries in the assembly table (modules).
22030
22031 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
22032
22033         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
22034         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
22035         allowed to be null when it's System.Object class setup.
22036
22037 2002-04-27  Martin Baulig  <martin@gnome.org>
22038
22039         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
22040         if `tb->parent == NULL' rather than crashing.
22041
22042 2002-04-28  Nick Drochak  <ndrochak@gol.com>
22043
22044         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
22045         calling acos() where asin() should have been called.
22046
22047 2002-04-26  Martin Baulig  <martin@gnome.org>
22048
22049         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
22050         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
22051         there's a subdirectory called `System', but we don't want to read that
22052         subdirectory as an assembly.
22053
22054 2002-04-25  Martin Baulig  <martin@gnome.org>
22055
22056         * debug-symfile.c: Reflect latest MonoString changes.
22057
22058 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22059
22060         * rand.c, rand.h: instance method icalls need to have an explicit
22061         this pointer as first argument in the C implementation.
22062
22063 2002-04-25  Nick Drochak <ndrochak@gol.com>
22064
22065         * icall.c: Fix typo in map for GetNonZeroBytes
22066
22067 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
22068
22069         * string-icalls.c : String does now passes unit tests without any 
22070         errors, the following changes has been made:
22071         
22072         Implemented replace methods.
22073         Renaming of methods to (try) follow the standard.
22074         Fixed compare ordinal
22075         Made all memory allocated directly to function instead of via icall function.
22076         Small performance fix in is_in_array function
22077                         
22078  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
22079
22080         c (mono_string_Internal_ctor_charp_int_int):
22081         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
22082         sindex < 0, throw ArgumentOutOfRangeException instead of
22083         ArgumentNullException.
22084
22085         Added new check for length == 0, however
22086         I need to make it return String.Empty from the C code.
22087         
22088         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
22089         that calculate the length for us here.
22090         
22091         (mono_string_Internal_ctor_sbytep_int_int): Replaced
22092         mono_string_new_utf16 with mono_string_new, since value is utf8.
22093
22094 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22095
22096         * object.c: register the object for finalization if needed.
22097         Allocate one more char in the string for the terminating 0 char.
22098
22099 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22100
22101         * class.c, class.h, image.c: check if a type implemenst a destructor.
22102         Use the proper key for array class lookups.
22103         * icall.c: register the icalls in the System.GC class.
22104         * gc.c, gc.h: GC-related functions and icalls.
22105
22106 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22107
22108         * icall.c:
22109         * socket-io.c:
22110         * unicode.c: free some strings gotten from mono_string_to_utf8 and
22111         changed a couple of free () by g_free ().
22112
22113         * decimal.c: one-liner in the comments for decimal2string ().
22114
22115 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
22116
22117         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
22118
22119 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
22120
22121         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
22122         * object.c (mono_runtime_invoke_array) : handle null in params
22123
22124 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
22125
22126         * string-icalls.c: fixed bug in split (one off bug)
22127
22128 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
22129
22130         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
22131         * icalls.c: added String::Equals as internal method
22132
22133 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
22134
22135         * threads.c: fixed bug in the double interlocked functions
22136
22137 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
22138
22139         * threads.c: implemented all of the new interlocked icalls.
22140         * string-icalls.c: fix a bug in insert.
22141         * icalls.c: added the icalls for interlocked, removed old string functions.
22142         
22143 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22144
22145         * loader.c: fix off-by-one error when reading argument names.
22146
22147 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22148
22149         * profiler.c: win32 counter implementation (untested).
22150         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
22151         (the latter needs testing and more complete impl. from win32 folks).
22152
22153 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
22154
22155         * object.c: mono_array_new_full workaround mono_array_class_get
22156         problem.
22157
22158 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22159
22160         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
22161         * object.h (mono_string_chars): Changed casting type.
22162
22163 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22164
22165         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
22166                            method signatures to use gunichar2 instead of gint16.
22167
22168 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
22169
22170         * object.h, object.c: domain-specific versions of mono_object_new and
22171         mono_array_new.
22172
22173 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
22174
22175         * object.c: changed String layout
22176
22177         * string-icalls.c (mono_string_Internal_ctor_chara): added
22178         internal string constructors.
22179
22180 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
22181
22182         * threads.c: pass 'this' to the thread start routine.
22183
22184 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22185
22186         * string-icalls.c: fix IndexOf and LastIndexOf. Now
22187         InternalCompareStr don't call twice mono_string_cmp_char for the last
22188         character. Improved performance in mono_string_cmp_char.
22189
22190 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22191
22192         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
22193         code into its own library: libmonoruntime.
22194
22195 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
22196
22197         * object.h, object.c: changed array format so that szarrays do not
22198         require a bounds structure.
22199         * icall.c, appdomain.c: support for new szarray format.
22200
22201 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22202
22203         * metadata.c: compare also the retuns type when comparing signatures:
22204         we didn't do this as an optimization since really overloaded methods
22205         must differ also in the arguments, but this doesn't work with
22206         low-level IL code (or when using explicit conversion operators: see
22207         bug#23498 for an example).
22208
22209 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22210
22211         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
22212
22213 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
22214
22215         * icall.c: make MonoType::GetElementType its own icall.
22216
22217 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22218
22219         * icall.c: remove MonoMethod_get_Name().
22220         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
22221         object.
22222
22223 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22224
22225         * string-icalls.c: optimized a few methods.
22226
22227 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
22228
22229         * icall.c: added all new string internal calls
22230         * string-icalls.c: added, new string internal call implementation.
22231         * object.c: added mono_string_new_size for allocating a string a size
22232
22233 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
22234
22235         * object.c (mono_object_isinst): use the same code as in the
22236         optimized x86 version.
22237
22238 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22239
22240         * profiler.c: TSC-based timer code (faster and more accurate).
22241         Not hooked up in configure, yet (set USE_X86TSC to 1).
22242
22243 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
22244
22245         * profiler.c, profiler.h: track time spent compiling methods.
22246         * threads.c: track thread creation/destruction.
22247
22248 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
22249
22250         * profiler.c, profiler.h, profiler-private.h: profiling interface
22251         and sample implementation. Moved here so that it can be used also by
22252         the jit.
22253
22254 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
22255
22256         * reflection.c, reflection.h: keep types and other handles separate in
22257         the hash tables for referred tokens. Add guid for modules.
22258
22259 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
22260
22261         * assembly.c: fix bugs found with valgrind.
22262         * metadata.h, metadata.c: added mono_metadata_guid_heap().
22263
22264 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
22265
22266         * threads: added icall support for getting current domain for
22267                    the thread.
22268  
22269 2002-04-13  Martin Baulig  <martin@gnome.org>
22270
22271         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
22272         (MonoDebugVarInfo): Added `index' field for register based addresses.
22273         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
22274         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
22275         `MonoDebugVarInfo *params' and `guint32 this_offset' with
22276         `MonoDebugVarInfo *this_var'.
22277
22278         * debug-symfile.c (relocate_variable): New static function to write
22279         a location description for a local variable or method parameter.
22280
22281 2002-04-12  Martin Baulig  <martin@gnome.org>
22282
22283         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
22284         stack offset and begin/end scope address of a local variable.
22285         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
22286         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
22287         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
22288
22289         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
22290         Added new relocation types for start/end scope of a local variable.
22291
22292 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22293
22294         * object.h: add mono_object_domain() macro.
22295         * reflection.c: handle typespecs.
22296         * icall.c: MonoMethod::get_Name() implementation.
22297
22298 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22299
22300         * icall.c: String::GetHashCode() icall implementation.
22301
22302 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22303
22304         * icall.c: String::IndexOfAny icall.
22305         * object.c, object.h: make array->max_length more useful.
22306         Intrduced mono_object_class() and mono_string_length() macros.
22307
22308 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22309
22310         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
22311         instead of g_unichar_isdigit.
22312
22313 2002-04-11  Nick Drochak  <ndrochak@gol.com>
22314
22315         * icall.c: Implement a simple Double.ToString().
22316
22317 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22318
22319         * appdomain.h: only io-layer.h is supposed to be included.
22320         * icall.c: explicitly import environ. Fix warning.
22321
22322 2002-04-10  Nick Drochak  <ndrochak@gol.com>
22323
22324         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
22325                 return true even if it's not Daylight Savings time.
22326                 Only return false for the case where the function isn't
22327                 implemented for a plaform (read Windows).
22328
22329 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22330
22331         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
22332         data with a mutex.
22333
22334 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
22335
22336         * mempool.c (mono_mempool_alloc): only use g_malloc when
22337         absolutely necessary.
22338
22339 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
22340
22341         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
22342
22343         * class.c (mono_class_vtable): use domain mempool to allocate vtable
22344         (mono_class_proxy_vtable): use domain mempool
22345
22346 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
22347
22348         * appdomain.h, appdomain.c: split initialization that requires the
22349         execution engine support into mono_runtime_init().
22350
22351 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
22352
22353         * class.c (mono_class_init): don't include vtable inside MonoClass
22354         to save some memory, gather some statistics.
22355         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
22356
22357 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22358
22359         * icall.c: internalcall implementation for ValueType.Equals().
22360
22361 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
22362
22363         * object.c (mono_message_init): moved 
22364         (mono_runtime_exec_main): new arch. independent impl.
22365         (mono_runtime_invoke_array): new method - like
22366         mono_runtime_invoke, but you can pass an array of objects.
22367         (mono_remoting_invoke): new arch. independent impl.
22368         (mono_message_invoke): new arch. independent impl.
22369         (mono_runtime_class_init): new arch. independent impl.
22370         (mono_runtime_object_init): new arch. independent impl.
22371
22372 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22373
22374         * metadata.c, object.c, reflection.c: documented the exported
22375         functions.
22376
22377 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
22378
22379         * icall.c: simpler code to pass the assembly builder data to corlib.
22380         Implement GetNestedTypes() internalcall.
22381
22382 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22383
22384         * class.c: warn if a type can't be loaded.
22385
22386 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
22387
22388         * image.h: typedef MonoImageOpenStatus
22389         * types.h: removed unused file
22390         
22391 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
22392
22393         * icall.c: Enum_ToObject accepts enum value arguments.
22394
22395 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
22396
22397         * class.c: move initialization of properties, events and nested
22398         classes, so that they happen for interfaces, too.
22399
22400 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
22401
22402         * icall.c: cleanup some ugly casts in Array_SetValue*.
22403
22404 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22405
22406         * icall.c: the values array fro enums is of the correct type, now.
22407         Implement (correctly) getFullName instead of assQualifiedName for
22408         MonoType.
22409         * reflection.h, reflection.c: added mono_type_get_name ().
22410
22411 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22412
22413         * assembly.c, image.h: for each MonoImage, record from wich assembly
22414         it was loaded.
22415         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
22416         Make Type.Assembly work.
22417
22418 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
22419
22420         * debug-symfile.h: use char* instead of gpointer to avoid
22421         unnecessary casts.
22422
22423         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
22424
22425         * icall.c (ves_icall_InternalExecute): impl. FielSetter
22426         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
22427
22428 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
22429
22430         * icall.c (mono_message_init): impl. (code cleanup)
22431         (ves_icall_InternalExecute): impl. FieldGetter
22432
22433         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
22434         defined we call all (non-static)methods through the vtable. 
22435
22436 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
22437
22438         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
22439         finalizer even though the memory is still referenced (and the chunk of
22440         memory is not freed).
22441
22442 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
22443
22444         * assembly.c: fix brokeness.
22445
22446 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
22447
22448         * class.c: kill some warnings. Check explicit interface method
22449         implementation also without considering the namespace.
22450         Load also literal strings in static class data.
22451
22452 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
22453
22454         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
22455         (default_assembly_name_resolver): Make the resolver take the
22456         "base" directory where the assembly was originally defined, so we
22457         can load DLLs that are in the same directory as the assembly that
22458         is being referenced.
22459
22460 2002-03-28  Dick Porter  <dick@ximian.com>
22461
22462         * file-io.h: 
22463         * file-io.c:
22464         * socket-io.c: 
22465         * unicode.h: 
22466         * unicode.c: Warning cleanups
22467
22468 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
22469
22470         * object.h, reflection.h: use the correct type instead of MonoObject.
22471
22472 2002-03-28  Martin Baulig  <martin@gnome.org>
22473
22474         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
22475         (mono_debug_update_symbol_file): Initialize classes if necessary.
22476
22477 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22478
22479         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
22480         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
22481
22482 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
22483
22484         * assembly.h: fix function prototype.
22485         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
22486         * mono-endian.h: use const cast.
22487
22488 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
22489
22490         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
22491
22492 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
22493
22494         * loader.c: don't assert when a typeref can't be loaded, give
22495         a chance to the runtime to trow an exception instead.
22496         * loader.h: fix warning.
22497
22498 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
22499
22500         * class.c (mono_class_proxy_vtable): added proxy support
22501
22502 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
22503
22504         * icall.c: removed last of PAL calls, added System.Environment
22505         * file-io.h, file-io.c: MonoIO implementation
22506         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
22507
22508 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
22509
22510         * appdomain.c: do not use the byte marker in ldstr table lookup.
22511         * debug-helpers.c: allow two ':' to separate class and method name.
22512         * object.c: allocate arrays bounds with the GC, too.
22513         * verify: add a few more checks.
22514
22515 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
22516
22517         * reflection.c: output also literal strings. Allocate parameter data
22518         with GC_malloc() (thanks, Martin, for catching this!).
22519
22520 2002-03-26  Martin Baulig  <martin@gnome.org>
22521
22522         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
22523         include the `this' offset in the `param_offsets'.
22524
22525 2002-03-25  Martin Baulig  <martin@gnome.org>
22526
22527         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
22528         mono_debug_get_class() function to get the classes. Added new
22529         relocation types for arrays and strings.
22530         (mono_debug_get_class): New static function to search in all
22531         referenced assemblies for a metadata token.
22532
22533         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
22534
22535 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22536
22537         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
22538         hold gc-allocated objects. Make the string heap a stream like the
22539         others. Removed duplicated code when writing stream info.
22540         Added asserts to catch possible buffer overflows. Set the sorted map
22541         for tables that need sorting. Added some documentation.
22542
22543 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
22544
22545         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
22546         for interned strings and vtables.
22547
22548 2002-03-24  Martin Baulig  <martin@gnome.org>
22549
22550         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
22551         it in the array since it was created with g_slist_prepend().
22552
22553 2002-03-24  Martin Baulig  <martin@gnome.org>
22554
22555         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
22556         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
22557         (mono_debug_method_from_token): Renamed to
22558         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
22559         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
22560
22561         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
22562         relocation types.
22563
22564         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
22565
22566 2002-03-24  Martin Baulig  <martin@gnome.org>
22567
22568         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
22569         (mono_debug_method_from_token): New func.
22570
22571         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
22572         New interncall, calls mono_debug_local_type_from_signature().
22573         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
22574         calls mono_debug_method_from_token().
22575
22576 2002-03-23  Martin Baulig  <martin@gnome.org>
22577
22578         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
22579         specifies the number of bytes to be converted, not the array size.
22580         Return the number of chars, not the number of bytes.
22581         (ves_icall_iconv_get_chars): The `byteCount' argument
22582         specifies the number of bytes to be converted, not the array size.
22583
22584 2002-03-23  Martin Baulig  <martin@gnome.org>
22585
22586         * reflection.h (MonoReflectionSigHelper): New type.
22587
22588         * reflection.c (mono_reflection_sighelper_get_signature_local),
22589         (mono_reflection_sighelper_get_signature_local): New functions.
22590
22591         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
22592         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
22593         interncalls.
22594
22595 2002-03-23  Martin Baulig  <martin@gnome.org>
22596
22597         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
22598         is_writeable is set.
22599         (mono_raw_buffer_update): New function to write the modified map
22600         back to disk.
22601
22602         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
22603
22604         * debug-symfile.c (mono_debug_update_symbol_file): Call
22605         mono_raw_buffer_update() when done writing.
22606
22607 2002-03-23  Martin Baulig  <martin@gnome.org>
22608
22609         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
22610
22611         * debug-symfile.c: Added support for arguments and local variables.
22612
22613 2002-03-23  Dick Porter  <dick@ximian.com>
22614
22615         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
22616         protected by ifdefs, hence breaking the w32 build.
22617
22618 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22619
22620         * object.c: implement is_interned() the right way.
22621
22622 2002-03-21  Martin Baulig  <martin@gnome.org>
22623
22624         * debug-symfile.[ch]: New files to handle debugging information
22625         files. There's also support to dynamically update these symbol
22626         files to include machine dependent information.
22627
22628 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
22629
22630         * threads.c (mono_thread_create): new function to create thread
22631         from C
22632
22633 2002-03-20  Martin Baulig  <martin@gnome.org>
22634
22635         * icall.c (ves_icall_InternalInvoke): Create a new object if the
22636         method is a constructor.
22637         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
22638         points to ves_icall_InternalInvoke().
22639
22640 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
22641
22642         * file-io.c: Flush shouldn't throw exceptions.
22643
22644 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
22645
22646         * file-io.c: FileStream flush support; FileSetLength now
22647         restores file pointer.
22648
22649 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
22650
22651         * class.c: set image for pointer classes.
22652
22653 2002/03/19  Nick Drochak <ndrochak@gol.com>
22654
22655         * sysmath.c: Forgot one.
22656
22657 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
22658
22659         * sysmath.c: Avoid redefining existing names.
22660
22661 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
22662
22663         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
22664         handled by runtime as icall rather than dllimport from libm.so
22665         * file-io.c, file-io.h: fixed handle argument type.
22666
22667 2002-03-18  Dick Porter  <dick@ximian.com>
22668
22669         * reflection.c (mono_image_get_type_info): rename interface to
22670         iface, because of "#define interface struct" on windows.
22671
22672 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
22673
22674         * class.c, class.h: rename and export mono_ptr_class_get().
22675         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
22676         * reflection.c, reflection.h, icall.c: better/saner type name
22677         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
22678         method signatures.
22679
22680 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
22681
22682         * class.c (mono_class_init): removed hardcoded GHC_SLOT
22683
22684         * icall.c (ves_icall_InternalInvoke): impl.
22685
22686 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
22687
22688         * reflection.c: output the interface map table, too.
22689
22690 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
22691
22692         * class.c (class_compute_field_layout): separate computation of 
22693         static field layout
22694
22695 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
22696
22697         * icall.c: added System.Buffer support.
22698         * file-io.c: moved file icalls from PAL to FileStream.
22699
22700 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
22701
22702         * icall.c (ves_icall_System_Object_GetHashCode): impl.
22703
22704 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
22705
22706         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
22707
22708 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
22709
22710         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
22711
22712 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
22713
22714         * debug-helpers.{c,h}: moved here from monograph some useful functions
22715         to locate a method by name/signature in a class or image. Included
22716         also a small and flexible IL disassembler.
22717
22718 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
22719
22720         * reflection.c: fixup tokens in methods with small header size, too.
22721
22722 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
22723
22724         * object.c (mono_string_to_utf8): remove assert(!error), instead
22725         print a warning. 
22726
22727 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
22728
22729         * icall.c: update to the new mono_Array_class_get interface.
22730
22731 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
22732
22733         * appdomain.c, object.c: Boehm-GC enable.
22734         * icall.c: make get_data_chunk() support split data requests.
22735         Ensure a class is initialized in more cases. Return only the first
22736         property found in GetProperties() or the compiler gets confused. 
22737         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
22738         * reflection.h, reflection.c: add fixup mechanism for field and method
22739         tokens. Initialize assembly->typeref in a single place. Output
22740         properties after events. Support custom attributes for events, too.
22741         Typo fix for paramter custom attrs.
22742
22743 2002-03-07  Martin Baulig  <martin@gnome.org>
22744
22745         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
22746
22747 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
22748
22749         * class.c (mono_array_class_get): fix. for multi. dim. arrays
22750
22751 2002-03-06  Martin Baulig  <martin@gnome.org>
22752
22753         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
22754         non-zero lower bounds. See testcases #F10-#F13.
22755
22756 2002-03-05  Martin Baulig  <martin@gnome.org>
22757
22758         * exception.c (mono_get_exception_argument_out_of_range): New exception.
22759
22760         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
22761         ves_icall_System_Array_GetValue(), only calculate the absolute array position
22762         here.
22763         (ves_icall_System_Array_SetValue): Likewise.
22764         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
22765         as argument and does the actual work. This function is used when copying a
22766         multi-dimensional array.
22767         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
22768         now do all the widening conversions of value types.
22769         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
22770
22771 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22772
22773         * class.c: remove some magic numbers and use the smbolic names,
22774         instead. Added init_events() to load event info at class init time.
22775         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
22776         and mono_metadata_methods_from_event().
22777         * reflection.h, reflection.c: added support for writing out the evnets
22778         related information.
22779
22780 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22781
22782         * reflection.h, icall.c: use a different method (GetInterfaces)
22783         to gather interface info and add isbyref, isprimitive and
22784         ispointer to the ves_icall_get_type_info() return value.
22785
22786 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
22787
22788         * class.h: stared adding support for events.
22789         * icall.c: split find_members implementation. Added debug icall to get
22790         the address of an object.
22791         * reflection.c: handle TypeBuilders in mono_type_get_object().
22792
22793 2002-03-01  Martin Baulig  <martin@gnome.org>
22794
22795         * icall.c (ves_icall_System_Array_GetLength): This must throw an
22796         ArgumentOutOfRangeException(), not an ArgumentException().
22797         (ves_icall_System_Array_GetLowerBound): Likewise.
22798         (ves_icall_System_Array_GetValue): Improved argument checking.
22799         (ves_icall_System_Array_SetValue): Improved argument checking.
22800
22801 2002-03-01  Martin Baulig  <martin@gnome.org>
22802
22803         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
22804         called with invalid arguments rather than just dying with g_assert().
22805         (ves_icall_System_Array_SetValue): Likewise.
22806         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
22807         raise a NotImplementedException instead.
22808         (ves_icall_System_Array_GetLength): Added argument checking.
22809         (ves_icall_System_Array_GetLowerBound): Added argument checking.
22810
22811 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
22812
22813         * object.h (mono_assert): new macros mono_assert and
22814         mono_assert_not_reached
22815
22816 2002-02-28  Martin Baulig  <martin@gnome.org>
22817
22818         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
22819         and "System::String::IsInterned" to "System::String::_IsInterned".
22820
22821 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
22822
22823         * icall.c: remove hacks for typebuilder. Added icall to create a
22824         modified type from a tybebuilder.
22825         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
22826         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
22827         to create a backing MonoClass for a TypeBuilder.
22828
22829 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
22830
22831         * class.c, class.h: more refactoring of class init.
22832         Export mono_class_setup_mono_type() and mono_class_setup_parent().
22833
22834 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
22835
22836         * marshal.c, marshal.h: start of marshaling interface.
22837
22838 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
22839
22840         * icall.c: fix order in assembly qualified name icall.
22841
22842 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
22843
22844         * class.c: do not free str, since we store it in the hash table.
22845         * reflection.h: add label field to MonoILExceptionInfo.
22846         * reflection.c: handle references to more than one assembly. Handle
22847         case when there isn't a module created in the assembly.
22848
22849 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
22850
22851         * class.c: Fix typo. Start refactoring of class init code.
22852
22853 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
22854
22855         * appdomain.c: exit with 1 on error.
22856         * class.c: we already have the name in MonoClassField.
22857         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
22858         MonoStreamHeader instead of an offset of image->raw_metadata.
22859
22860 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
22861
22862         * appdomain.c (mono_init): Be even more descriptive about the error.
22863
22864 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
22865
22866         * appdomain.c: give the user an informative message when corlib can't
22867         be loaded.
22868
22869 2002-02-26  Martin Baulig  <martin@gnome.org>
22870
22871         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
22872         New icall to get the time zone data.
22873
22874 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
22875
22876         * reflection.c: set virtual and raw size of section correctly.
22877         * threads.c: transfer domain information to newly created threads.
22878
22879 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
22880
22881         * class.c: when instancing a class in a domain, load the default
22882         vaules for static fields from the constant table. Fix System.Enum to
22883         not be an enum.
22884         * icall.c: implement Object::GetType() internalcall. Implemented
22885         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
22886         Fixed checking of binding flags in find_members().
22887         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
22888         * reflection.c: handle enumerations when writing to the constant
22889         table. Use a different object cache for types.
22890
22891
22892 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
22893
22894         * object.c (mono_object_isinst): fix for arrays
22895
22896         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
22897
22898 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
22899
22900         * object.c: don't use mprotect ()  and fix intern pool hash table
22901         lookup for big endian systems.
22902
22903 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
22904
22905         * icall.c: change type_is_subtype_of () signature.
22906
22907 2002-02-21  Mark Crichton  <crichton@gimp.org>
22908
22909         * rand.c, rand.h: Added random number generator for
22910         System.Security.Cryptography classes.
22911
22912         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
22913
22914         * icall.c: Added System.Security.Cryptography calls.
22915
22916 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
22917
22918         * class.c, icall.c, metadata.c: better support for pointer types.
22919         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
22920         * reflection.c: Add support for getting custom attrs for properties
22921         and simplify some code.
22922
22923 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
22924
22925         * icall.c: change getToken () and add custom attribute GetBlob()helper
22926         method.
22927         * reflection.h: add custom attrs array to the reflection builder structures.
22928         * reflection.c: encode and emit custom attributes for all the relevant
22929         reflection objects. Cache fieldref and methodref tokens. Change
22930         mono_image_create_token() interface to take a MonoDynamicAssembly.
22931         More complete custom attributes decoder. Load custom attributes for
22932         Assembly, Field, Method and Constructor objects, too. Make the
22933         returned array an Attribute[] one, not object[]. Added
22934         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
22935         custom attribute constructor.
22936
22937 2002-02-20  Dick Porter  <dick@ximian.com>
22938
22939         * icall.c:
22940         * rawbuffer.c:
22941         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
22942         problem code out for now).
22943
22944 2002-02-19  Radek Doulik  <rodo@ximian.com>
22945
22946         * object.c (mono_ldstr): use hash table to avoid multiple swapping
22947
22948 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
22949
22950         * icall.c: register the GetCustomAttributes method.
22951         * object.c, object.h: add mono_string_new_len ().
22952         * reflection.h, reflection.c: added mono_runtime_invoke(),
22953         mono_install_runtime_invoke(). Added
22954         mono_reflection_get_custom_attrs () to load custom attributes and
22955         create the attribute objects.
22956
22957 2002-02-19  Dick Porter  <dick@ximian.com>
22958         * threads-dummy-types.c:
22959         * threads-dummy-types.h:
22960         * threads-dummy.c:
22961         * threads-dummy.h:
22962         * threads-pthread-types.c:
22963         * threads-pthread-types.h:
22964         * threads-pthread.c:
22965         * threads-pthread.h:  Deleted obsolete files
22966
22967 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
22968
22969         * class.c (mono_class_vtable): runtime init the class when we
22970         allocate static class data.
22971
22972         * icall.c (ves_icall_System_Array_SetValue): check for null values.
22973
22974         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
22975         and String - but we will need generic marshalling support in the
22976         future. 
22977         (mono_init): set the domain name in a ms compatible way
22978
22979         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
22980         String[].
22981
22982 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
22983
22984         * object.c (mono_array_clone): use alloca() instead of g_malloc  
22985         for sizes
22986
22987         * appdomain.c (mono_domain_unload): impl.
22988
22989 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
22990
22991         * appdomain.c, object.c: fix intern pool implementation.
22992         * class.c: fix alignment code.
22993
22994 2002-02-16  Radek Doulik  <rodo@ximian.com>
22995
22996         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
22997         and s2 > s1, just copy lower bytes to be compatible with little
22998         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
22999         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
23000
23001         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
23002         force big_endian to be 1 for big endian machines 
23003         (ves_icall_iconv_new_decoder): ditto
23004
23005 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
23006
23007         * socket-io.c (convert_sockopt_level_and_name): If the system
23008         doesn't define SOL_IP or SOL_TCP, get them by hand using
23009         getprotobyname() and caching the values (because this could be a
23010         slow operation).
23011         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
23012         Use the appropriate struct when the system does support it. Ie,
23013         not all systems have struct ip_mreqn so use struct ip_mreq when
23014         appropriate.
23015
23016 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
23017
23018         * reflection.c: handle finally clauses.
23019
23020 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
23021
23022         * socket-io.c: use g_snprintf() instead of snprintf.
23023
23024 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
23025
23026         * reflection.c (mono_param_get_objects): Cast second argument to
23027         mono_method_get_param_names to a const char** to silence the
23028         compiler warning.
23029
23030         * appdomain.c (mono_domain_assembly_open): Put parens around the
23031         truth statement in the for-loop.
23032
23033         * unicode.c (iconv_convert): Got rid of a compiler warning about
23034         int i being unused when the system has a new iconv.
23035         (iconv_get_length): Same.
23036
23037         * image.c (load_class_names): Cast the second argument to
23038         g_hash_table_insert() to char* to hush compiler warnings about the
23039         arg being a const.
23040         (mono_image_open): Same here.
23041
23042         * socket-io.c: Don't conditionally include sys/filio.h or
23043         sys/sockio.h here anymore since we now get them from
23044         io-layer/io-layer.h
23045         (inet_pton): If the system doesn't support inet_aton, implement
23046         using inet_addr and also #define INADDR_NONE if it isn't defined
23047         by the system.
23048
23049 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
23050
23051         * metadata.c, metadata.h: added function to get packing and size info
23052         of a typedef.
23053         * reflection.h, reflection.c: handle field RVA data. Save info about
23054         the table layout if needed. Assign typedef indexes to all the types
23055         before dumping the info about them to avoid forward reference problems.
23056
23057 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
23058
23059         * socket-io.c (convert_sockopt_level_and_name): ifdef
23060         SO_ACCEPTCONN because it is not defined on my system (old debian)
23061
23062 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
23063
23064         * opcode.c: use stddef.h to get NULL.
23065
23066 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
23067
23068         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
23069         for FIONBIO, FIONREAD and SIOCATMARK.
23070         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
23071         define INADDR_NONE and besides, inet_addr() is deprecated and
23072         should not be used. Use inet_pton() instead - it also has the
23073         added bonus that it can easily handle IPv6 addresses as well.
23074         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
23075
23076 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
23077
23078         * decimal.c: remove _MSC_VER conditional.
23079
23080 2002-02-13  Dick Porter  <dick@ximian.com>
23081
23082         * socket-io.c: 
23083         * icall.c: Internal calls for Blocking, Select, Shutdown,
23084         GetSocketOption and SetSocketOption
23085
23086 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23087
23088         * assembly.cs: better resolver: use it instead of some kludgy
23089         code.
23090
23091 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
23092
23093         * reflection.c: the best way to speed-up the compiler is to avoid
23094         infinite loops.
23095
23096 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
23097
23098         * class.c (mono_class_vtable): changed the object layout
23099         (obj->vtable->class). 
23100         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
23101
23102 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23103
23104         * assembly.c: look for assemblies in the assembly dir, too.
23105
23106 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23107
23108         * class.c: fix thinko in mono_class_from_type().
23109
23110 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23111
23112         * exception.h, exception.c: added TypeLoadException.
23113         * object.h, object.c: added mono_array_clone ().
23114         * icall.c: handle throwOnError in AssemblyGetType().
23115         Added Array.Clone().
23116         * opcode.h, opcode.c: use a single value for the opcode val.
23117         Compile fix for non-gcc compilers.
23118
23119 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
23120
23121         * opcodes.c, opcodes.h: export interesting info about opcodes.
23122
23123 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
23124
23125         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
23126         icalls. 
23127
23128         * class.c (class_compute_field_layout): set element_class for enums
23129         (mono_class_create_from_typedef): set element_class for normal classes
23130
23131         * icall.c (ves_icall_System_Enum_get_value): impl.
23132
23133         * class.c (mono_class_create_from_typedef): do not set valuetype
23134         flag for System.ValueType and System.Enum
23135
23136 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
23137
23138         * unicode.c (iconv_convert): fix big endian problem.
23139
23140 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23141
23142         * class.c: add asserts if we are ever going to scribble over memory.
23143         * socket-io.c: not all systems have AF_IRDA defined.
23144
23145 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
23146
23147         * class.c (class_compute_field_layout): do not consider static
23148         fields to compute alignment
23149
23150 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
23151
23152         * appdomain.c (mono_appdomain_get): impl.
23153         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
23154
23155 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
23156
23157         * icall.c: ignore "file://" prefix when loading an assembly.
23158
23159 2002-01-23  Dick Porter  <dick@ximian.com>
23160
23161         * socket-io.c:
23162         * icall.c:
23163         * Makefile.am: Added socket support
23164
23165 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
23166
23167         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
23168         code back.  This should return the assemblies that are loaded by
23169         the runtime on behalf of an application domain. 
23170
23171         The current implementation is still broken, it just returns every
23172         assembly loaded, but until we get real applications domain this
23173         will do.
23174
23175 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
23176
23177         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
23178         AppDomain object.
23179
23180 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
23181
23182         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
23183         the mono_class_from_name lookup.
23184         (ves_icall_get_parameter_info): ditto.
23185         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
23186         method.
23187         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
23188
23189 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
23190
23191         * class.c: load also nested classes on class init.
23192         System.ValueType instance methods gets passed boxed
23193         values, unless methods in derived classed that get a pointer to the
23194         data.
23195         * icall.c: use better name parsing code in GetType().
23196         * image.c, image.h: add mono_image_loaded ().
23197         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
23198         * reflection.c, reflection.h: added mono_reflection_parse_type().
23199
23200 2002-01-22  Veronica De Santis <veron78@interfree.it>
23201
23202         * icall.c : Added mapping of internal calls for Manual and Auto reset events
23203         * threads.c : Added the implementation of internal calls for events
23204         * threads.h : Added prototypes of internal calls for events
23205         
23206 2002-01-21  Radek Doulik  <rodo@ximian.com>
23207
23208         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
23209
23210 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
23211
23212         * class.c (mono_class_init): set min_align to 1 (instead of 0)
23213         (mono_class_value_size): use min_align
23214
23215 2002-01-20  Dick Porter  <dick@ximian.com>
23216
23217         * threads.h:
23218         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
23219         so it compiles on w32.
23220
23221 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
23222
23223         * metadata.c (mono_type_stack_size): impl.
23224
23225         * class.c (mono_class_get_field): impl. memberref token
23226
23227 2002-01-16 Veronica De Santis <veron78@@interfree.it>
23228
23229         * icall.h : Added the internal calls mapping for CreateMutex_internal
23230                     and ReleaseMutex_internal.
23231         * threads.h : Added the prototype of mutexes internal calls.
23232         * threads.c : Added the implementations of mutexes internal calls.
23233
23234 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23235
23236         * metaparse.h: removed unused file.
23237         * reflection.c, reflection.h: added stream_data_align () function 
23238         to align data in streams and keep stream aligned. Add support for
23239         exception support in method headers.
23240
23241 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
23242
23243         * unicode.c: make iconv_convert () return the number of bytess written
23244         in the output buffer.
23245
23246 2002-01-15  Dick Porter  <dick@ximian.com>
23247         * threads.c: Make the runtime's idea of infinite timeouts coincide
23248         with the class library's
23249
23250         Fix a particularly egregious bug in mono_thread_cleanup(). That
23251         code was so utterly bogus it must have been written on a Monday.
23252
23253 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23254
23255         * reflection.h: add subtypes field to TypeBuilder.
23256         * reflection.c: encode constants for literal fields.
23257         Handle subtypes. Fix user string token (and add a zero byte)
23258         at the end.
23259         
23260 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
23261
23262         * class.c (mono_class_init): bug fix: assign slot numbers for
23263         abstract methods.
23264
23265 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23266
23267         * reflection.c: don't try to output a code RVA for abstract methods.
23268         Small fixes for method header format. Output parameter info to the
23269         ParamDef table. Save method overriding info to MethodImpl table.
23270         Fix property support. Allow typedef.extends to be a type in the
23271         building assembly.
23272         * verify.c: fix off-by-one error.
23273
23274 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
23275
23276         * class.c: fix mono_class_from_mono_type () for szarray types.
23277         Remove unused cache check in mono_class_from_type_spec().
23278         * icall.c: *type_from_name () functions handle simple arrays and byref.
23279         * reflection.c: handle byref and szarray types. Handle methods without
23280         body (gets P/Invoke compilation working). Handle types and fields in
23281         get_token ().
23282         * reflection.h: add rank to MonoTypeInfo.
23283
23284 2002-01-10  Dick Porter  <dick@ximian.com>
23285
23286         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
23287         internal calls
23288
23289 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23290
23291         * icall.c: initialize class in type_from_handle ().
23292         Loop also in parent classes for get_method ().
23293         * reflection.c: properly encode class and valuetype types.
23294         Start on encoding TypeBuilder types. Handle fieldrefs.
23295         Use correct length when registering a user string.
23296         Handle ConstructorBuilder and MonoMethod in get_token ().
23297         Make mono_type_get_object () aware of cached types.
23298         * object.c: back out change to mono_string_new ().
23299
23300 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
23301         * object.c: mono_string_new should return a NULL when the string 
23302         passed in is NULL -- not try to deference it.
23303         
23304 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23305
23306         * icall.c: hack to make IsSubType work for TypeBuilders.
23307         * reflection.c: emit constructors before methods.
23308         Retrieve param names in mono_param_get_objects().
23309
23310 2002/01/05  Nick Drochak  <ndrochak@gol.com>
23311
23312         * Makefile.am: fix list of headers and sources so automake 1.5
23313         doesn't complain. Removed \# at end of list.
23314
23315 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23316
23317         * reflection.c: get token for a method ref. Set return type of
23318         constructor to void.
23319         * loader.c: debug message.
23320         * class.c: typo fix.
23321
23322 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
23323
23324         * icall.c: fix array init with rank > 1. FindMembers
23325         loops in parent class as well.
23326         * image.c: do not insert nested types in name cache.
23327         * reflection.c: warning fix.
23328         * reflection.h: add override method (for interface impl).
23329
23330 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
23331
23332         * metadata.c: fix customattr decoding.
23333
23334 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
23335
23336         * rawbuffer.cs: Added native Win32 implementation, avoids using
23337         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
23338
23339 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
23340
23341         * class.c: make the low-level routines handle the cache.
23342
23343 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
23344
23345         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
23346
23347 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
23348
23349         * class.c: fix mono_array_element_size() for objects.
23350         * class.h, class.c: add properties to MonoClass and load them
23351         at init time.
23352         * icall.c: check with isinst() when assigning a value to an array
23353         instead of requiring the classes to match exactly.
23354         Implemented icall for System.Type::GetType().
23355         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
23356         enums. Handle bindingflags when looking for methods and fields.
23357         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
23358         and mono_metadata_methods_from_property().
23359         * reflection.h, reflection.c: added structures for propreties,
23360         parameters and enums. Implemented mono_property_get_object() and
23361         mono_param_get_objects().
23362
23363 2001-12-18  Dick Porter  <dick@ximian.com>
23364
23365         * file-io.c: Use mono_string_to_utf16() instead of
23366         mono_string_chars()
23367
23368         * object.c: Added mono_string_to_utf16(), which copies the non
23369         NULL-terminated MonoString into a new double-null-terminated
23370         buffer.
23371
23372 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
23373
23374         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
23375
23376 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
23377
23378         * file-io.c: raise exceptions if handle is invalid.
23379
23380 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
23381
23382         * assembly.c: yet another check for mscorlib.
23383         * class.c, class.h: load nesting info for classes.
23384         * icall.c: many new functions to support the Reflection classes.
23385         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
23386         * reflection.h, reflection.c: mono_image_create_token(),
23387         mono_assembly_get_object(), mono_type_get_object(),
23388         mono_method_get_object(), mono_field_get_object(): methods to return
23389         objects that parallel the C representation of assemblies, types,
23390         methods, fields.
23391
23392 2001-12-11  Dick Porter  <dick@ximian.com>
23393
23394         * icall.c:
23395         * file-io.c: Internal calls for file IO.
23396
23397 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
23398
23399         * tabledefs.h: missing FileAttributes.
23400         * verify.h, verify.c: use is_valid_string () to simplify and check for
23401         valid strings more correctly. Fix warnings and speeling.
23402         Check more tables: Filed, File, ModuleRef, StandAloneSig.
23403         Check code: branches, maxstack, method calls.
23404
23405 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
23406
23407         * object.c (mono_object_allocate): removed static, so that the jit
23408         can allocate value types.
23409
23410         * icall.c (ves_icall_System_DateTime_GetNow): impl.
23411
23412 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23413
23414         * class.c: init enum types right away and register the
23415         token->MonoClass map in mono_class_create_from_typedef ().
23416         * verify.h, verify.c: first cut of the verifier.
23417         * pedump.c: add --verify switch to verify metadata tables.
23418         * tabledefs.h: add some missing enums.
23419
23420 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
23421
23422         * class.c (mono_install_runtime_class_init): impl.
23423         (mono_class_init): renamed mono_class_metadata_init to
23424         mono_class_init, also removed the metadata_inited flag
23425
23426         * object.c (mono_object_isinst): use faster algorithm
23427
23428 2001-11-30  Radek Doulik  <rodo@ximian.com>
23429
23430         * mono-endian.h: reverted last change
23431         added function prototypes
23432
23433         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
23434         add mono-endian.c back
23435
23436         * mono-endian.c: returned back, as Paolo pointed out, it's needed
23437         for unaligned access, I've mistaked it with endianess. I am
23438         sorry.
23439         (mono_read16): fix reverted endianess
23440         (mono_read64): ditto
23441         (mono_read32): ditto
23442
23443 2001-11-30  Dick Porter  <dick@ximian.com>
23444
23445         * exception.c: Implement mono_exception_from_name()
23446
23447 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23448
23449         * metadata.h, metadata.c: remove params_size and locals_size and their
23450         calculation from the metadata code: they are only usefult to the
23451         interp.
23452
23453 2001-11-29  Radek Doulik  <rodo@ximian.com>
23454
23455         * object.c (mono_ldstr): swap bytes here, it's probably not the
23456         best place, but works for me now, I'll redo it once I know mono
23457         better, also note that I add PROT_WRITE and don't reset back, also
23458         note that it's only affects big endians, so x86 should be OK
23459
23460         * mono-endian.h (read16): use just glib macros for both endians
23461
23462         * mono-endian.c: removed as glib macros are used in in
23463         mono-endian.h so we don't need to care about endianess for read
23464         macros as glib does that for us already
23465
23466 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
23467
23468         * class.h, class.h: take minimum alignment into consideration so
23469         that the fields of a class remain aligned also when in an array.
23470
23471 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23472
23473         * loader.h, loader.c: add mono_method_get_param_names().
23474         * class.c: 0-init class fields.
23475
23476 2001-11-26  Dick Porter  <dick@ximian.com>
23477
23478         * icall.c:
23479         * threads-types.h:
23480         * threads.c: New file that handles System.Threading on all platforms
23481
23482         * object.c: 
23483         * object.h: Remove the synchronisation struct from MonoObject,
23484         replace it with a pointer that gets initialised on demand
23485
23486         * Makefile.am: Replace all the system-specific threading code with
23487         a single file that uses the new wrapper library
23488
23489 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
23490
23491         * class.c, class.h: add mono_install_trampoline() so that the runtime
23492         can register a function to create a trampoline: removes the ugly
23493         requirement that a runtime needed to export arch_create_jit_trampoline.
23494         * object.h, object.c: added mono_install_handler() so that the runtime
23495         can install an handler for exceptions generated in C code (with
23496         mono_raise_exception()). Added C struct for System.Delegate.
23497         * pedump.c: removed arch_create_jit_trampoline.
23498         * reflection.c: some cleanups to allow registering user strings and
23499         later getting a token for methodrefs and fieldrefs before the assembly
23500         is built.
23501         * row-indexes.h: updates and fixes from the new ECMA specs.
23502
23503 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
23504
23505         * class.h, class.c: add enum_basetype field to MonoClass.
23506         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
23507         to get index in the constant table reated to a field, param or
23508         property.
23509         * reflection.h, reflection.c: handle constructors. Set public-key and
23510         version number of the built assembly to 0.
23511         * row-indexes.h: update from new ECMA spec.
23512
23513 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23514
23515         * class.h, class.c: add a max_interface_id to MonoClass.
23516         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
23517         since it's used to do that. Added mono_type_type_from_obj().
23518         Make GetType() return NULL instead of segfaulting if the type was not
23519         found. Handle simple arrays in assQualifiedName.
23520         * object.h: add a struct to represent an Exception.
23521         * reflection.c: output call convention in method signature.
23522         Add code to support P/Invoke methods and fixed offsets for fields.
23523
23524 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
23525
23526         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
23527         the value.
23528         * icall.c: use mono_array_addr instead of array->vector: fixes the
23529         reflection image writing.
23530         * reflection.c: init call convention byte to 0 in method signature.
23531         Encode the property signature. Don't output property-related methods
23532         twice. Really process the properties for a type (don't cast a field to
23533         a property, my mom always told me that).
23534         Fix 64 bit issues in pointer alignment in a different and more
23535         readable way.
23536
23537 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
23538
23539         * loader.h: Removed type class from MonoDefaults, added monotype
23540
23541         * loader.c: Loaded MonoType, removed loading of Type
23542
23543         * icall.c (my_mono_new_object): Now returns a System.MonoType,
23544         and fills in System.Type._impl with a RuntimeTypeHandle rather
23545         than the actual MonoClass *
23546
23547         (ves_icall_type_from_handle): change from type_class to
23548         monotype_class
23549
23550         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
23551         implemented
23552
23553         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
23554         implemented
23555
23556         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
23557
23558         (ves_icall_System_Reflection_Assembly_GetType): implemented
23559
23560         (ves_icall_System_MonoType_assQualifiedName): implemented
23561
23562         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
23563
23564 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
23565
23566         * assembly.c (mono_assembly_open): Implement a cache for the
23567         assemblies. 
23568
23569         (mono_assembly_close): only destroy the assembly when the last
23570         reference is gone.
23571         
23572 2001-11-09  Dick Porter  <dick@ximian.com>
23573
23574         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
23575
23576 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
23577
23578         * class.c (mono_class_metadata_init): bug fix: compute the right slot
23579
23580 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23581
23582         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
23583         from Martin Weindel.
23584         * object.h: add mono_string_chars ().
23585
23586 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
23587
23588         * reflection.c (build_compressed_metadata): Eliminates warnings
23589         and uses 64-bit clean code.
23590
23591         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
23592         (mono_type_equal): Change signature to eliminate warnings.
23593
23594 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23595
23596         * icall.c, loader.c: remove the internalcall array constructors.
23597         Changes to match the new MonoArray structure.
23598         * object.h, object.c: an array object doesn't allocate an extra
23599         vector. Add mono_array_new_full () to create jagged arrays easily.
23600
23601 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23602
23603         * metadata.h, metadata.c: add mono_metadata_field_info () to
23604         retreive all the info about a field from vairous tables.
23605         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
23606         * class.h, class.c: augment MonoClassField with more info.
23607         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
23608         policy and load a field's RVA if needed.
23609
23610 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
23611
23612         * class.c (mono_class_metadata_init): create a trampoline for all
23613         virtual functions instead of actually compiling them.
23614
23615 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
23616
23617         * class.h, class.c: include name in MonoClassField.
23618         * class.c: fix fundamental type of System.Object and System.String.
23619         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
23620         tokens in ldtoken.
23621         * icall.c: remove internalcalls for the Reflection stuff that is now
23622         done in C# code.
23623         * loader.c: mono_field_from_memberref () implementation.
23624         * mono-endian.c: thinko (s/struct/union/g).
23625         * object.c, object.h: make the mono_string_* prototypes actually use
23626         MonoString instead of MonoObject.
23627         * reflection.c, reflection.h: updates for changes in the reflection
23628         code in corlib: we use C structures that map to the actual C# classes.
23629         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
23630         fat method header if needed and use the info from the ILGenerator for
23631         methods. Handle fields in types. Misc fixes.
23632
23633 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
23634
23635         * class.c (mono_class_metadata_init): bug fix: always allocate
23636         space for static class data
23637
23638 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
23639
23640         * class.c (mono_compute_relative_numbering): use relative
23641         numbering to support fast runtime type checks.
23642
23643 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
23644
23645         * class.c (mono_class_create_from_typeref): added debugging output
23646         to print class name when MonoDummy is returned instead of real class
23647
23648 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
23649
23650         * class.c (mono_class_metadata_init): interface offset table now
23651         contains pointers into the vtable - this is more efficient for the jit
23652
23653 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
23654
23655         * class.c (mono_class_metadata_init): use a temporary vtable (the
23656         old algorithm only worked for the interpreter, but not for the jit)
23657
23658 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
23659
23660         * loader.c (method_from_memberref): use mono_class_get to get the
23661         class of an array instead of using System.Array directly.
23662         (mono_get_method): also add MEMBERREF methods to the method cache
23663         which usefull for arrays.
23664
23665 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
23666
23667         * pedump.c (arch_compile_method): added to compute vtable entry
23668
23669         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
23670         number of interfaces.
23671         
23672         * class.h: merged MonoArrayClass into MonoClass
23673
23674         * class.c (mono_class_create_from_typedef): compute the vtable size and
23675         allocate space to include the vtable inside MonoClass
23676         (mono_class_metadata_init): initialize the vtable
23677
23678 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
23679
23680         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
23681         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
23682         * image.c: endian fixes by Laurent Rioux.
23683         * object.h, object.c: rename MonoStringObject to MonoString and
23684         MonoArrayObject to MonoArray. Change some function names to conform to
23685         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
23686         guint16* as first argument, so don't use char*.
23687         Provide macros to do the interesting things on arrays in a portable way.
23688         * threads-pthread.c: updates for the API changes and #include <sched.h>
23689         (required for sched_yield()).
23690         * icall.c: updates for the API changes above.
23691         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
23692         platforms that need them.
23693
23694 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
23695
23696         * class.c: set the correct type for all the fundamental
23697         type when loading the class.
23698
23699 2001-10-05  Dick Porter  <dick@ximian.com>
23700
23701         * threads-pthread.c (pthread_mutex_timedlock): Simple
23702         compatibility version for C libraries that lack this call.
23703
23704 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23705
23706         * class.c: MonoTypes stored in MonoClass are stored as
23707         fundamental MonoTypes when the class represents a
23708         fundamental type (System.Int32, ...).
23709         The TypeHandle return by ldtoken is a MonoType*.
23710         * icall.c: ves_icall_get_data_chunk () write out all the
23711         PE/COFF stuff. Implement ves_icall_define_method (),
23712         ves_icall_set_method_body (), ves_icall_type_from_handle ().
23713         * image.c: properly skip unknown streams.
23714         * loader.h, loader.c: add type_class to mono_defaults.
23715         * metadata.c, metadata.h: export compute_size () as
23716         mono_metadata_compute_size () with a better interface.
23717         Typo and C&P fixes.
23718         * pedump.c: don't try to print the entry point RVA if there is no entry point.
23719         * reflection.c, reflection.h: many cleanups, fixes, output method
23720         signatures and headers, typedef and typeref info, compress the metadata
23721         tables, output all the heap streams, cli header etc.
23722         * row-indexes.h: typo fixes.
23723
23724 2001-10-04  Dick Porter  <dick@ximian.com>
23725
23726         * object.h: Add a synchronisation mutex struct to MonoObject
23727
23728         * object.c (mono_new_object): Initialise the object
23729         synchronisation mutexes
23730
23731         * icall.c: System.Threading.Monitor internal calls
23732         
23733         * threads-pthread.h:
23734         * threads-pthread.c: System.Threading.Monitor internal calls
23735
23736         * threads-types.h: New file, includes the system-specific thread
23737         structures
23738         
23739         * threads-pthread-types.h:
23740         * threads-pthread-types.c: New files, handle pthread-specific
23741         synchronisation types
23742
23743         * threads-dummy-types.h: 
23744         * threads-dummy-types.c: New files of dummy support for
23745         thread-specific types
23746
23747         * metadata.c:
23748         * image.c:
23749         * pedump.c: include mono-endian.h not endian.h
23750         
23751         * Makefile.am: More threads files.
23752         Name mono-endian.h not endian.h
23753
23754 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
23755
23756         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
23757         stuff and implement a few more bits.
23758         * icall.c: a field needs to be dereferenced twice. Do not use the same
23759         name for two variables in the same scope.
23760         * image.c, image.h: cleanups.
23761
23762 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
23763
23764         * class.c (mono_class_metadata_init): bug fix: compute the right size
23765
23766 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
23767
23768         * icall.c: implemented some of the Reflection internalcalls.
23769         * image.c, image.h: start writing out the PE/COFF image.
23770         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
23771         that does the reverse than decode_blob_size ().
23772         * object.c: use mono_metadata_encode_value (). Move here
23773         temporary implementation of mono_string_to_utf8 ().
23774         * rawbuffer.c: make malloc_map static.
23775
23776 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23777
23778         * metadata.c: fix type comparison for arrays.
23779         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
23780         Added a couple of new classes to monodefaults.
23781         * icall.c: added a couple of Reflection-related internalcalls.
23782         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
23783         Added a byval_arg MonoType to MonoClass.
23784
23785 2001-09-28  Dick Porter  <dick@ximian.com>
23786
23787         * icall.c:
23788         * threads-pthread.h: 
23789         * threads-pthread.c: Implemented internal calls for
23790         LocalDataStoreSlot operations.  Applied mutexes around all shared
23791         data.  Reworked the thread creation and Start() operations to
23792         avoid a race condition.
23793         
23794         * threads-dummy.h:
23795         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
23796
23797 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
23798
23799         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
23800
23801 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
23802
23803         * class.c, loader.c: warn and return NULL instead of erroring out.
23804         * icall.c: added System.AppDomain::getCurDomain().
23805         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
23806
23807 2001-09-25  Dick Porter  <dick@ximian.com>
23808
23809         * threads-pthread.h:
23810         * threads-pthread.c: Implemented timed thread joining and added
23811         System.Threading.Thread::Join_internal internal call
23812
23813         * icall.c: Added System.Threading.Thread::Join_internal internal call
23814
23815         * threads-dummy.h:
23816         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
23817
23818 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
23819
23820         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
23821         mono_string_intern () to implement the semantics of the ldstr opcode
23822         and the interning of System.Strings.
23823         * icall.c: provide hooks to make String::IsIntern and String::Intern
23824         internalcalls.
23825
23826 2001-09-23  Dick Porter  <dick@ximian.com>
23827
23828         * threads-dummy.c: 
23829         * threads-dummy.h: New files of dummy threading routines
23830
23831         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
23832         support code based on system specifics
23833
23834         Rename PTHREAD_LIBS to THREAD_LIBS
23835         
23836 2001-09-23  Dick Porter  <dick@ximian.com>
23837
23838         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
23839         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
23840         internal calls.
23841         (mono_thread_init): Set up a Thread object instance to return when
23842         the main thread calls Thread.CurrentThread
23843         (mono_thread_cleanup): Wait for all subthreads to exit
23844
23845         * icall.c: New internal calls for System.Threading.Thread::Sleep
23846         (including Schedule) and CurrentThread
23847
23848         * threads.h: New file, to insulate thread-specific stuff from the
23849         rest of the code
23850
23851 2001-09-21  Dick Porter  <dick@ximian.com>
23852
23853         * threads-pthread.h: 
23854         * threads-pthread.c: New file, for handling pthreads-style
23855         threading support.  Start() now starts a new thread and executes
23856         the ThreadStart delegate instance.
23857
23858         * icall.c: Added the internalcall for
23859         System.Threading.Thread::Start_internal
23860
23861         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
23862
23863 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
23864
23865         * loader.c: work around the different signatures for delegates
23866         constructors csc generates in compiled code vs the ones compiled in mscorlib.
23867
23868 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
23869
23870         * class.h, class.c: add mono_class_get_field_from_name ().
23871         * *: Fix C comments and other ANSI C issues.
23872
23873 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
23874
23875         * endian.h, assembly.c: fix some endianness issues.
23876
23877 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
23878
23879         * loader.h, load.c: add delegate_class to mono_defaults.
23880         Handle runtime provided methods in mono_get_method ().
23881
23882 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
23883
23884         * loader.c (mono_get_method): use pinvoke for internal call
23885
23886         * icall.c: use pinvoke for internal call
23887
23888         * loader.c (method_from_memberref): set the method name
23889
23890 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
23891
23892         * metadata.c: help the compiler generate better code for
23893         mono_class_from_mono_type ().
23894
23895 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
23896
23897         * class.c (mono_class_metadata_init): delayed computing of the
23898         class size to mono_class_metadata_init ()
23899
23900 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
23901
23902         * class.c, class.h: add an interfaces member to MonoClass.
23903         * image.c, image.h: add assembly_name field to MonoImage
23904         from the assembly table.
23905         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
23906
23907 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
23908
23909         * class.c: Handle Array in mono_class_from_mono_type ().
23910         * metadata.c, pedump.c: some endian fixes.
23911
23912 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
23913
23914         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
23915         * metadata.c: fix small problem introduced with the latest commit.
23916
23917 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
23918
23919         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
23920         We don't need a MonoMetadata pointer anymore to compare signatures in
23921         mono_metadata_signature_equal (), update callers.
23922         Reduced memory usage an number of allocations for MonoMethodHeader and
23923         MonoMethodSignature.
23924
23925 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
23926
23927         * metadata.c: added compare for szarray.
23928
23929 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
23930
23931         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
23932         and add a couple more types to it and mono_defaults. Give an hint on
23933         classes that need implementing in our corlib and are referenced
23934         in mscorlib.
23935
23936 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
23937
23938         * class.h, class.c: keep track if a class is also an Enum.
23939         * loader.c: Implement a couple more types for use in libffi
23940         marshalling. Gives better diagnostics when failing to dlopen
23941         a library. Set method->klass for P/Invoke methods, too.
23942
23943 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
23944
23945         * class.c, class.h: add a MonoType this_arg to MonoClass that
23946         represents a pointer to an object of the class' type that
23947         can be used by the interpreter and later the type cache.
23948         Add best guess alignment info for valuetype objects.
23949
23950 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
23951
23952         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
23953         into MonoType: one less level of indirection and allocation and
23954         simplifies quite a bit of code. Added cache for MonoTypes that are
23955         used frequently, so that we don't need to allocate them all the time.
23956
23957 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
23958
23959         * class.c (mono_class_create_from_typedef): System.Enum is also a
23960         value type, although it does not derive from System.ValueType
23961         (maybe a bug in the ms compiler?)
23962
23963         * metadata.c (mono_type_size): return the right size for value types
23964
23965         * loader.c (mono_get_method): only initialize method header if not abstract
23966
23967         * class.c (mono_class_from_mono_type): use mono_default values. 
23968
23969 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
23970
23971         * *: use MonoClass pointers instead of <type_tokens>
23972         
23973         * class.h: new flag: metadata_inited.
23974
23975         * class.c (mono_class_metadata_init): impl.
23976         (mono_class_instance_size): impl.
23977         (mono_class_data_size): impl.
23978
23979 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23980
23981         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
23982         MonoClass now has the name and name_space fields. 
23983         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
23984         mono_get_method () takes and optional MonoClass as argument.
23985         Removed mono_typedef_from_name() and added mono_class_token_from_name()
23986         instead that takes advantage of a map from class names to typedef
23987         tokens in MonoImage.
23988
23989 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
23990
23991         * metadata.c: zero is not a valid alignment boundary.
23992         Merge MONO_TYPE_VOID in default decoding code.
23993
23994 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
23995
23996         * image.h: merged MonoMetadata into MonoImage
23997
23998         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
23999         identify the type of elements.
24000
24001 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
24002
24003         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
24004         * cil-coff.h: split MonoMSDOSHeader and add size info.
24005         * image.c: add some consistency checks.
24006         * metadata.c: fix row size computation: one programmer
24007         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
24008         add explanation for the locator routine.
24009         Fix decoding of size in method header.
24010         
24011 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
24012
24013         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
24014         (g_concat_dir_and_file): Bring g_concat_dir_and_file
24015         function from gnome-libs.  This uses the right path separator
24016         based on the OS, and also works around a bug in some systems where
24017         a double slash is not allowed. 
24018         (default_assembly_name_resolver): Use g_concat_dir_and_file
24019         (mono_assembly_open): ditto.
24020
24021 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
24022
24023         * metadata.c (mono_metadata_signature_equal): impl.
24024
24025         * *: void is now a realy MonoType (instead of using NULL)
24026         
24027         * metadata.c (do_mono_metadata_parse_type): use
24028         mono_metadata_parse_type to parse void value.
24029
24030 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
24031
24032         * metadata.c, metadata.h: in the signature and method header store
24033         only the space required for holding the loca vars and incoming arguments.
24034
24035 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
24036
24037         * metadata.c (do_mono_metadata_parse_type): treat void like any
24038         other type (instead of assigning NULL);
24039
24040 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
24041
24042         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
24043
24044 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
24045
24046         * image.c (do_mono_image_open): added a cache for arrays.
24047
24048 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24049
24050         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
24051         decode a single column from a row in a metadata table and changes
24052         to take advantage of it in the typedef locator (gives a nice speed up).
24053         Store offset info for function params.
24054
24055 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
24056
24057         * image.h (MONO_IMAGE_IS_CORLIB): removed 
24058
24059 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
24060
24061         * assembly.c: how could mono_assembly_close () had ever worked?
24062         * metadata.c, metadata.h: provide offset info for local vars.
24063         Implement mono_type_size () to take care of alignment as well
24064         as size (it was mono_field_type_size in cli/class.c before).
24065
24066 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
24067
24068         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
24069
24070         * assembly.h (CORLIB_NAME): set to corlib.dll
24071
24072         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
24073
24074 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24075
24076         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
24077         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
24078         tokentype.h: massive namespace cleanup.
24079
24080 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24081
24082         * metadata.h, metadata.c: decode exception clauses when parsing method header.
24083
24084 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
24085
24086         * metadata.c (mono_metadata_free_type): added check for type !=
24087         NULL (void) before calling mono_metadata_free_type()
24088
24089 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
24090
24091         * metadata.h, row_indexes.h: added header with enumerations to use
24092         to index in the columns from tables in metadata and to decode coded
24093         tokens: we should start using this instead of embedding magic numbers
24094         all over the code.
24095
24096 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
24097
24098         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
24099         Move metadata_t info from cli_image_info_t to MonoImage, where
24100         it's easily accessible. Changed all the uses accordingly.
24101         Added the method and class caches to MonoImage.
24102         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
24103         and mono_metadata_decode_value () signature to be more consistent
24104         with the other parse functions (and simplify code). Taken advantage
24105         of zero-length array allocation with GCC. Removed reduntant (and
24106         wrong) MonoFieldType struct and use MonoParam instead. Changed
24107         mono_metadata_parse_field_type () to use common code for parsing.
24108         Added mono_metadata_typedef_from_field () and
24109         mono_metadata_typedef_from_method () to lookup a typedef index from a
24110         field or method token.
24111         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
24112
24113 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
24114
24115         * metadata.c (mono_metadata_parse_field_type): Implement. 
24116         (do_mono_metadata_parse_type): Split engine from
24117         mono_metadata_parse_type, so that we can create smaller structures
24118         for things that just have one pointer to the MonoType (look at
24119         the MonoFieldType)
24120
24121 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
24122
24123         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
24124         as Jan Gray found out, it is incorrect. 
24125
24126 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
24127
24128         * assembly.c: Implement asssembly loading.  This loads an image
24129         and loads all the referenced assemblies.  Come to think of it, we
24130         could always do lazy loading of the assemblies. 
24131
24132         * image.c (mono_image_open): Keep loaded images in a hashtable.
24133
24134         * image.h (MonoImage): Add reference count.
24135
24136 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
24137
24138         * assembly.c (mono_assembly_open): Keep track of the file name in
24139         case the assembly has no ASSEMBLY table.
24140
24141         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
24142         from get.c here.
24143
24144 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
24145
24146         * metadata.c, metadata.h: decode local vars in method header
24147         parse function. Change callers accordingly.
24148
24149 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
24150
24151         * metadata.h, cil-coff.h: protect against multiple inclusion.
24152         Added some new structures to hold information decoded from metadata:
24153         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
24154         and relevant decoding/free functions.
24155         * metadata.c: implement decoding functions. Add warning for out of bounds
24156         index in mono_metadata_locate(). Implement mono_get_method () to retreive
24157         all the info about a method signature and invocation. Remove check on
24158         uninitialized local var in parse_mh() and fix memory leak.
24159
24160 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
24161
24162         * metadata.h: More macros.
24163
24164         * tokentype.h: New file.
24165
24166 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
24167
24168         * assembly.c: added a consistency check and initialize
24169         some structures with g_new0().
24170         * metadata.c: fixed a couple more bugs in table size computation
24171         and add other checks for out-of bound access to metadata.
24172
24173 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
24174
24175         * metatada.c: fix bugs computing table sizes. Spew a
24176         warning when index in string heap is out of bounds.
24177
24178 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
24179
24180         * metadata.h: Add a couple of macros to manipulate tokens. 
24181
24182 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24183
24184         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
24185         cli_section_tables).
24186
24187 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
24188
24189         * metadata.c (mono_metadata_user_string): New function, provides
24190         access to the UserString heap. 
24191
24192 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
24193
24194         * metadata.c: Add inline documentation.
24195
24196 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
24197
24198         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
24199         files. 
24200
24201 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
24202
24203         * typeattr.h: New file, TypeAttribute flags. 
24204
24205 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
24206
24207         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
24208         mono_assembly_ensure_section): Section loading code.
24209         (load_section_tables): Load the sections.
24210
24211         * mono/metadata/metadata.c (mono_metadata_locate_token,
24212         mono_metadata_locate): Functions to locate the information
24213         definition given a token or a table and an index.
24214         (mono_metadata_compute_table_bases): New.
24215         (compute_size): New function to compute the sizes of the various
24216         tables.
24217
24218         * mono/metadata/metadata.h: Finish listing the different index
24219         types. 
24220
24221         * mono/metadata/pedump.c: Improve to dump new information.
24222
24223 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
24224
24225         * mono/metadata/metadata.c: Entered all the tables matching
24226         Beta2. 
24227
24228         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
24229
24230
24231