1 2008-01-13 Zoltan Varga <vargaz@gmail.com>
3 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
5 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
7 * verify.c (get_boxable_mono_type): check if the token is valid.
9 * verify.c (set_stack_value): changed to add an error if an
10 invalid type is set on stack. Changed all callers due to signature change.
12 * verify.c (do_stobj): implement stobj validation.
14 2008-01-11 Zoltan Varga <vargaz@gmail.com>
16 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
17 set container->is_method, it was set earlier.
19 * metadata.c (type_in_image): Handle MVARs which belong to not finished
22 * reflection.c (mono_reflection_initialize_generic_parameter): Set
23 is_method of the generic container to TRUE for methods.
25 2008-01-10 Zoltan Varga <vargaz@gmail.com>
27 * metadata.c (type_in_image): Handle type parameters properly.
29 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
30 memory ownership of this structure.
32 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
34 * verify.c (get_boxable_mono_type): make typedref types been just
35 unverifiable. check for void type.
37 * verify.c (do_unbox_any): added, verify opcode unbox.any.
39 * verify.c (do_load_function_ptr): accept method spec tokens.
41 2008-01-10 Zoltan Varga <vargaz@gmail.com>
43 * marshal.c (mono_class_native_size): Always set *align even if this is called
46 2008-01-09 Zoltan Varga <vargaz@gmail.com>
48 * verify.c (mono_verify_corlib): Remove this as it was not used and was
51 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
53 * verify.c: removed some old unused tables. A huge bunch of small fixes
54 to things found while testing the verifier with mono basic.
56 * verify.c (dump_stack_value): dump null literal flag to.
58 * verify.c (verify_type_compatibility_full): fix comparison
59 for types that have a generic super type.
61 * verify.c (verify_stack_type_compatibility): fix compatibility
62 between null literals and reference types. fix compatibility between
63 boxed valuetypes and object. fix corner case test for enums.
65 * verify.c (do_cmp_op): proper verification of cgt.un in case
68 * verify.c (do_invoke_method): fix error message.
70 * verify.c (do_store_indirect
72 * verify.c (check_is_valid_type_for_field_ops): proper verification
73 of managed pointers to valuetypes and boxed valuetypes. proper verification
76 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
77 allow token to be a reference type.
79 * verify.c (do_cast): proper handling of boxes valuetypes.
81 * verify.c (do_stelem): proper handling of storing a boxed valuetype
84 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
85 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
86 fixed the decoding of unbox_any
88 2008-01-08 Zoltan Varga <vargaz@gmail.com>
90 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
92 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
94 * verify.c (do_newobj): do delegate verification.
96 * verify.c (verify_delegate_compatibility): perform delegate
99 * verify.c (verify_ldftn_delegate): perform tests related to
102 * verify.c (mono_delegate_signature_equal): perform the
103 slightly diferent signature comparison required by delegates.
105 * metadata.c (mono_metadata_type_equal_full): added and exported
106 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
107 allows signature only comparison.
109 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
112 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
114 * verify.c: added a bunch of stack_slot_* functions to
115 make access to stack slot type easier. This is required to
116 allow optional flags, like null literal, boxed value and
118 All access paths to IlStackDesc::stype have been changed
119 to use these new funcions.
120 Removed a bunch of unused functions and cleared all warnings.
121 This patch introduces the usage of the this pointer and
124 2008-01-07 Zoltan Varga <vargaz@gmail.com>
126 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
128 2008-01-06 Zoltan Varga <vargaz@gmail.com>
130 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
131 match managed version.
133 * appdomain.c: Bump corlib version.
135 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
138 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
140 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
141 Set public key token to zero-length byte array if assembly is not
144 2008-01-05 Zoltan Varga <vargaz@gmail.com>
146 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
147 writing a vtype array elem.
149 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
151 * assembly.c (build_assembly_name): return FALSE if length of token is
152 not 16 (if not "null").
153 (mono_assembly_name_parse_full): return FALSE if value of version,
154 culture, token or key is 0.
155 * icall.c (fill_reflection_assembly_name): add boolean arguments to
156 specify whether public key and public key token must be set to default
157 value (zero-length byte array) if not available. Set versioncompat to
158 SameMachine. If public key is available or the default is set, then
160 (ves_icall_System_Reflection_Assembly_FillName): if no public key
161 is available, use empty byte array as default value. On the 2.0
162 profile, use default value for public key token if not set.
163 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
164 profile, use default value for public key if not set. On the 2.0
165 profile, use default value for public key token if not set.
166 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
167 default values for public key and public key token.
169 2008-01-05 Zoltan Varga <vargaz@gmail.com>
171 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
172 field to keep it in synch with the managed object.
174 * marshal.c (emit_marshal_object): Add support for byref marshalling of
175 delegates. Fixes #351520.
177 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
178 contains defined memory.
180 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
182 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
184 * sgen-gc.c (check_consistency): New helper function to do a consistency check
185 of the GC data structures.
187 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
189 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
191 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
193 (mono_array_clone_in_domain): Ditto.
194 (mono_array_clone_in_domain): Ditto.
196 * threads.c (start_wrapper): Register the thread start argument as a GC root.
197 (cache_culture): Use a write barrier.
199 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
200 (ves_icall_get_property_info): Ditto.
202 * object.h (MONO_STRUCT_SETREF): New macro.
204 * class-internals.h (MonoStats): Add some GC statistics.
206 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
208 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
210 * exception.c (mono_exception_from_name_two_strings):
211 Break from loop after method is found.
213 2008-01-04 Dick Porter <dick@ximian.com>
215 * process.c (process_module_string_read): Rename variable to
216 reflect correct usage, after fixing bug 345972.
218 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
220 * verify.c (mono_type_create_fnptr_from_mono_method):
221 created a MonoType function pointer instance to be used during
222 verification. The verifier releases this memory at end.
224 * verify.c (mono_method_is_constructor): extracted repeated
225 checks for constructor into a single class.
227 * verify.c (do_push_field): use new extracted method
228 for constructor check.
230 * verify.c (do_newobj): same.
232 * verify.c (do_ldftn): renamed to do_load_function_ptr
233 and make it verify ldvirtftn too.
235 * verify.c (mono_method_verify: proper verification
236 of ldvirtftn. release created MonoMethod instances.
238 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
240 * verify.c (token_bounds_check): added.
242 * verify.c (do_ldftn): added.
244 * verify.c (mono_method_verify): proper verificartion of ldftn.
246 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
248 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
249 than the table row count. It's the resposibility of the caller to
250 make the bounds check and raise the correct error.
252 * metadata.c (mono_metadata_decode_row_col): Same.
254 * loader.c (mono_get_method_from_token): perform bounds check
255 on token for methoddef table.
257 2007-12-29 Miguel de Icaza <miguel@novell.com>
260 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
261 assert into a negative result, the managed code already coped with
264 Some folks on Windows reported this error.
266 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
268 * appdomain.c: Bump corlib version.
270 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
271 CultureInfo.CreateCulture to create CultureInfo for name.
272 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
273 create CultureInfo for name. Fixes bug #347174.
275 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
277 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
280 * verify.c (is_valid_branch_instruction): allow branching to the
281 first instruction of the protected block.
283 * verify.c (is_valid_cmp_branch_instruction): same.
285 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
286 avoid double initialization.
288 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
289 detect which cases the eval stack should just be copied.
291 * verify.c (mono_method_verify): check if the eval stack
292 is empty when entering a protected block.
294 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
296 * verify.c: added is_clause_in_range, is_clause_inside_range,
297 is_clause_nested and verify_clause_relationship. They perform
298 the verifications stated in P1 12.4.2.7.
300 * verify.c (mono_method_verify): remove some unused variables,
301 add the new exception clause checks, add instruction border
302 checks for protected block start/end, improved some error
303 messages and fixed a bug in the way invalid instruction access
306 2007-12-26 Zoltan Varga <vargaz@gmail.com>
308 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
309 from GC 7.0 if available.
311 * object.c: Remove an unused define.
313 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
315 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
317 * null-gc.c (mono_gc_make_descr_for_array): Implement.
319 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
321 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
322 to take the same arguments as the other make_descr functions.
324 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
326 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
329 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
332 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
335 * boehm-gc.c (mono_gc_register_root): Fix a warning.
337 * null-gc.c (mono_gc_register_root): Fix a warning.
339 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
341 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
342 (mono_gc_base_init): Call GC_init ().
344 * null-gc.c: Define mono_gc_register_root () as a no-op.
346 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
348 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
350 * verify.c: add prototype for merge_stacks at top
352 * verify.c (do_switch): added.
354 * verify.c (merge_stacks): on some cases the stack merging
355 was not happening properly. Unequal stack sizes at merge
356 points should be invalid.
358 * verify.c (mono_method_verify): added more debug info on stack state.
359 verify switch properly.
361 2007-12-24 Zoltan Varga <vargaz@gmail.com>
363 * method-builder.h: New file, moved the mono_mb_ declarations here from
366 * boehm-gc.c marshal.c: Include method-builder.h.
368 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
370 * marshal.c: Remove some code which is now in method-builder.c.
372 2007-12-23 Zoltan Varga <vargaz@gmail.com>
374 * method-builder.c: New file, extraction of the method builder functionality
377 * marshal.c: Move the mb functions into method-builder.c.
379 * marshal.h marshal.c: Export some mono_mb_... functions.
381 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
383 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
386 * class.c (mono_class_get_full): Check the token type in the dynamic case.
388 * loader.c (mono_field_from_token): Ditto.
390 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
393 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
396 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
397 a helper function for setting it.
399 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
402 * assembly.c: Significally simplify code now that referenced assemblies are
403 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
405 * threads.h: Don't include the internal threads-types.h header file. Fixes
408 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
410 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
411 instructions that were target of branches or are at protected block boundaries.
413 * verify.c (in_same_block): handle filter clauses.
415 * verify.c (is_valid_branch_instruction): added. checks the target of
416 instructions br or brtrue/false.
418 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
419 binary branch instructions such as beq and bge.
421 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
422 and made it pin the instruction as been part of the exception block.
424 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
427 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
430 * verify.c (do_ret): ret from a protected block is unverifiable and
433 * verify.c (do_static_branch): verify br and br.s instructions.
435 * verify.c (merge_stacks): add extra param to support detection
436 of branches in the middle of instructions.
438 * verify.c (mono_method_verify): verify branches and exception blocks
439 that target the middle of instructions. Proper verification of br and br.s.
441 2007-12-21 Zoltan Varga <vargaz@gmail.com>
443 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
444 skip_visibility field.
445 (reflection_methodbuilder_from_dynamic_method): Ditto.
447 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
448 registrations. Fixes #348193.
450 * threads.h: Move the internal mono_thread_get_pending_exception () to
451 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
453 2007-12-20 Zoltan Varga <vargaz@gmail.com>
455 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
456 icall registration. Fixes #348193.
458 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
459 for corlib classes into object. Fixes #349621.
461 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
463 * icall.c (property_accessor_nonpublic): new function to determine
464 whether an accessor allows a property to be considered non-public.
465 Returns false for private accessor(s) from parent class, and internal
466 accessor(s) from parent on 2.0 profile (and higher).
467 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
468 to determine whether property should be included if NonPublic flag
469 is set. Fixes bug #349078.
471 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
473 * verify.c (init_stack_with_value): added.
475 * verify.c (mono_method_verify): extracted common
476 code for exception initialization into init_stack_with_value.
478 * verify.c (mono_method_verify): initialize the exception
479 for handler clauses as well.
481 * verify.c (mono_method_verify): fix the exception clause
482 ordering rules, it should use handler end offset and not
485 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
487 * rawbuffer.c: remove useless warning.
489 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
491 * threads.h, threads-types.h: move functions to the correct header
494 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
496 * verify.c (mono_method_verify): proper verification
497 of exception handling clauses ranges and fallthru in
498 and out of protected blocks.
500 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
502 * verify.c (mono_method_verify): fixed compilation issue.
504 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
506 * verify.c (mono_method_verify): a printf slipped in, changed
507 to use verifier debug macro.
509 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
511 * verify.c (is_correct_leave): check for filter clauses.
513 * verify.c (do_filter): added.
515 * verify.c (mono_method_verify): property verification of leave.
518 2007-12-18 Mark Probst <mark.probst@gmail.com>
520 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
521 Win32 build, until we figure out how to do the proper thing on
524 2007-12-17 Zoltan Varga <vargaz@gmail.com>
526 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
527 by the previous patch.
529 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
530 the assembly resolve handler for refonly assemblies.
532 2007-12-17 Mark Probst <mark.probst@gmail.com>
534 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
535 Make sure only one thread is allowed to commence shutdown, and
536 don't allow new threads to be started once shutdown is in
539 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
541 * verify.c (is_correct_endfilter): added.
543 * verify.c (is_unverifiable_endfilter): added.
545 * verify.c (do_endfilter): added.
547 * verify.c (mono_method_verify): property verification of endfilter
548 and fixed a corner case or endfinally.
550 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
552 * verify.h: new flags to support fail fast of unverifiable code and
553 do non-strict verification. Non-strict verification is required to
554 have MS runtime compatibility. There are a huge amount of unverifiable
555 code that it accepts as verifiable. The strict mode verifies the code
557 Non-strict mode will be required in cases where code needs to be
558 accepted as verifiable but fails under strict mode.
560 * pedump.c: added support to fail fast and non-strict verification.
562 * verify.c: added support for both fail fast and non-strict verification.
564 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
566 * verify.c (is_correct_endfinally): added.
568 * verify.c (mono_method_verify): property verification of endfinally.
570 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
572 * verify.c (in_any_block): check for filter clauses.
574 * verify.c (is_correct_rethrow): added.
576 * verify.c (mono_method_verify): property verification of rethrow.
578 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
580 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
582 * verify.c (do_throw): added.
584 * verify.c (mono_method_verify): property verification of throw
586 2007-12-11 Zoltan Varga <vargaz@gmail.com>
588 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
589 assemblies. Fixes #346425.
591 2007-12-10 Zoltan Varga <vargaz@gmail.com>
593 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
596 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
598 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
599 prevent asserts when this is called with a token which might not be valid.
601 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
602 lookup_dynamic_token_class with valid_token == FALSE.
604 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
606 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
608 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
610 2007-12-10 Mark Probst <mark.probst@gmail.com>
612 * gc.c: Don't delay threadpool thread finalization unless Mono is
615 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
617 * threads.c: turn an assert into a non-fatal warning.
619 2007-12-09 Robert Jordan <robertj@gmx.net>
621 * icall.c (GetVirtualMethod): Add missing argument validation.
623 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
625 * verify.c (do_cast): added.
627 * verify.c (mono_method_verify): property verification of castclass and isinst.
630 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
632 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
634 * verify.c (do_stelem): added.
636 * verify.c (mono_method_verify): property verification of stelem.X.
638 2007-12-07 Mark Probst <mark.probst@gmail.com>
640 * class.c, class-internals.h: Introduce an environment variable
641 (MONO_GENERIC_SHARING) through which the extent of generic code
642 sharing can be controlled (share all classes, share only corlib
643 classes, or share nothing).
645 * object.c: Only create runtime generic context for classes for
646 which sharing is enabled.
648 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
650 * verify.c (do_ldelem): refactor it to work with ldelem.any.
652 * verify.c (mono_method_verify): property verification of ldelem.any.
654 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
656 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
657 added ldelem.X opcodes.
659 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
661 * verify.c: proper verification of ldelem.X
663 2007-12-06 Zoltan Varga <vargaz@gmail.com>
665 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
667 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
669 * verify.c (mono_method_verify): null literal requires special handling,
670 the value pushed on stack need to be flagged as so.
672 * verify.c (do_ldelema): Verify ldelema properly.
674 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
676 * verify.c: Verify ldlen properly.
678 2007-12-05 Zoltan Varga <vargaz@gmail.com>
680 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
681 to the target object's type. Fixes #346160.
683 2007-12-05 Dick Porter <dick@ximian.com>
685 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
686 Solaris needs the same workaround as BSD-derived systems. Fixes
687 bug 323524, patch by Burkhard Linke
688 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
690 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
692 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
693 handle to use when error dialog is shown; otherwise, update mask
694 to show no error dialog when an error occurs.
696 2007-12-03 Zoltan Varga <vargaz@gmail.com>
698 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
700 * class.c (mono_class_get_field_default_value): New helper function to initialize
701 field->def_type and field->data.
703 2007-11-30 Zoltan Varga <vargaz@gmail.com>
705 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
708 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
710 * marshal.c: Avoid depending on delegate->method_info being set.
712 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
714 * object.c (mono_delegate_ctor): Set delegate->method.
716 * object-internals.h (struct _MonoDelegate): Add 'method' field.
718 * appdomain.c: Bump corlib version.
720 2007-11-27 Raja R Harinath <harinath@gmail.com>
722 * metadata.c (mono_generic_inst_equal_full): Short-circuit
723 equality check if we're comparing canonicalized MonoGenericInsts.
725 2007-11-23 Zoltan Varga <vargaz@gmail.com>
727 * class.c (generic_array_methods): Call mono_class_setup_methods () before
728 accessing class->methods.
730 2007-11-22 Dick Porter <dick@ximian.com>
732 * threads.c: Ensure that the synch_cs is set before trying to use
735 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
737 * profiler.c: r89126 broke the statistial profiler, unbreak.
739 2007-11-22 Martin Baulig <martin@ximian.com>
741 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
744 (mono_debug_debugger_version): Bump to 3.
745 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
746 -> mono_debugger_class_initialized().
748 * mono-debug-debugger.c
749 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
752 (mono_debugger_start_class_init_func): Removed.
753 (mono_debugger_class_loaded_methods_func): Added.
754 (mono_class_setup_methods): Call it here.
756 2007-11-22 Martin Baulig <martin@ximian.com>
759 (mono_debug_add_delegate_trampoline): New public method.
760 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
763 (MonoSymbolTable): Added `global_data_table'.
764 (MonoDebuggerTypeKind): Removed.
766 2007-11-21 Zoltan Varga <vargaz@gmail.com>
768 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
771 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
773 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
775 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
777 2007-11-20 Martin Baulig <martin@ximian.com>
779 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
781 * mono-debug-debugger.c
782 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
783 (mono_debugger_remove_breakpoint): Likewise.
784 (mono_debugger_check_breakpoints): Likewise.
785 (mono_debugger_register_class_init_callback): New public method.
786 (mono_debugger_remove_class_init_callback): Likewise.
787 (mono_debugger_add_type): Likewise.
789 * mono-debug-debugger.h
790 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
792 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
794 * class.c: more interface implementations needed for the
795 array enumerator (fixes bug #341112).
797 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
799 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
800 fix ParamName of ArgumentNullExceptions.
802 2007-11-17 Miguel de Icaza <miguel@novell.com>
804 * reflection.c (mono_reflection_encode_sighelper): Generate the
805 modopts and modreqs. I have a useless test that crashes monodis,
806 but that shows the code working.
808 2007-11-17 Zoltan Varga <vargaz@gmail.com>
810 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
811 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
813 2007-11-15 Dick Porter <dick@ximian.com>
815 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
816 When joining a thread, it's the thread that's calling Join that
817 gets WaitSleepJoin state not the target. Fixes the standalone
818 test case in bug 334740, and hopefully the whole bug too.
820 2007-11-15 Dick Porter <dick@ximian.com>
822 * process.c: Read file version info from the files pointed at by
823 process modules, not the current process. Fixes bug 315969.
825 Use windows typedef names in some places to fix warnings on the
828 2007-11-15 Mark Probst <mark.probst@gmail.com>
830 * image.c, metadata-internals.h: Added a generic_class_cache hash
831 to MonoImage for looking up generic classes when sharing generics.
833 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
835 * sgen-gc.c: warning cleanups.
837 2007-11-15 Zoltan Varga <vargaz@gmail.com>
839 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
840 inherited properties.
842 2007-11-14 Mark Probst <mark.probst@gmail.com>
844 * object.c, class-internals.h: Added more information to the
845 runtime generic context.
847 2007-11-13 Zoltan Varga <vargaz@gmail.com>
849 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
850 instead of just the target method. Generalize the abstract method handling to
851 handle any non-static method.
853 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
854 mono_marshal_get_delegate_invoke () signature change.
856 2007-11-13 Mark Probst <mark.probst@gmail.com>
858 * class.c, class-internals.h: Made
859 mono_type_get_basic_type_from_generic () public. Fixed member
860 access check for shared generics.
862 * loader.c: Don't insert field into field cache if it's part of a
863 non-inflated generic class.
865 * domain.c, domain-internals.h: The generic sharing context is now
866 part of the jit info data structure. Added two accessor
869 2007-11-12 Zoltan Varga <vargaz@gmail.com>
871 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
872 the array Get/Set/Address methods, since the JIT inlines them.
874 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
876 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
877 (mono_image_init): Initialize runtime_invoke_direct_cache.
879 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
880 mono_marshal_get_delegate_invoke signature change.
882 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
883 an additional argument. Add support for invoking abstract methods.
885 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
887 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
889 2007-11-09 Mark Probst <mark.probst@gmail.com>
891 * class.c: Do field layout for open generic classes as well.
893 2007-11-09 Mark Probst <mark.probst@gmail.com>
895 * gc.c, gc-internal.h: Don't finalize threadpool threads with
896 other objects, because the threadpool is still around. Put them
897 in a list instead and after finalizing all other objects in the
898 root domain shut down the thread pool and then finalize the
899 threads. Fixes bug #337383.
901 * threads.c, thread-types.h: New mono_thread_create_internal()
902 function for marking a thread with the threadpool flag before it
903 started. Set synch_cs to NULL after freeing it.
905 * threadpool.c: Mark threadpool threads before they start.
907 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
909 * reflection.h, reflection.c: don't export random functions
910 and lazy load dbnull and missing objects.
912 2007-11-07 Jonathan Chambers <joncham@gmail.com>
914 * class.c: Initialize COM types if COM interfaces
915 are present (not just COM classes).
917 Code is contributed under MIT/X11 license.
919 2007-11-07 Massimiliano Mantione <massi@ximian.com>
921 create_dynamic_mono_image: hook module profiler events (dynamic case).
922 mono_image_basic_init: hook assembly profiler events (dynamic case).
924 2007-11-07 Massimiliano Mantione <massi@ximian.com>
926 simple_appdomain_unload: completely terminate the profiler
927 instead of only processing the statistical samples.
928 simple_shutdown: make sure this is really called exactly once,
929 even in multithreaded applications, and always listen to
931 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
932 here, the "[un]load" functions will do it.
933 Fixes bugs #333791 and #325261.
935 2007-11-07 Geoff Norton <gnorton@novell.com>
937 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
938 rather than depend on __APPLE__.
940 2007-11-07 Mark Probst <mark.probst@gmail.com>
942 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
944 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
946 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
947 UTF16 MonoString. Fix the crash from bug #335488
949 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
951 * marshal.c: Correct (for non-Win32 OS) length != size in
952 mono_string_from_bstr. Fix #339530.
954 2007-11-06 Geoff Norton <gnorton@novell.com>
956 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
959 2007-11-05 Kornél Pál <kornelpal@gmail.com>
961 * process.c: Added run-time GetProcessId API detection for Windows.
963 2007-11-04 Miguel de Icaza <miguel@novell.com>
965 * reflection.c (mono_param_get_objects): If a parameter has the
966 attribute [System.Runtime.InteropServices.Optional] we should
967 set the DefaultValue of the ParameterInfo to be
968 System.Reflection.Missing instead of DBNull.
972 (mono_get_reflection_missing_object): New method,
973 returns the System.Reflection.Missing.Value singleton instance.
975 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
977 * culture-info-table.h : regenerated.
979 2007-11-02 Jonathan Chambers <joncham@gmail.com>
981 * icall.c: Use GetEnvironmentStrings on windows
982 so we are using the same environment block as
983 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
986 Code is contributed under MIT/X11 license.
988 2007-10-31 Martin Baulig <martin@ximian.com>
990 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
992 * mono-debug-debugger.h
993 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
995 2007-10-30 Zoltan Varga <vargaz@gmail.com>
997 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
1000 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
1002 * culture-info-table.h : regenerated.
1004 2007-10-30 Robert Jordan <robertj@gmx.net>
1006 * icall-def.h, icall.c:
1007 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
1009 Code is contributed under MIT/X11 license.
1011 2007-10-29 Zoltan Varga <vargaz@gmail.com>
1013 * class.c (mono_class_setup_vtable): Find the inflated methods in the
1014 inflated class instead of inflating them again.
1016 * class.c (mono_class_setup_vtable): Inflate the override methods in the
1019 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
1020 Call setup_supertypes () after klass->parent is set.
1021 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
1023 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
1024 for inflated instances of not yet created dynamic generic classes.
1025 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
1026 times from inflated_method.
1027 (methodbuilder_to_mono_method): Ditto.
1029 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
1031 * gc.c: code cleanup and removed old untested option of not creating the
1034 2007-10-29 Zoltan Varga <vargaz@gmail.com>
1036 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
1037 creating a jump trampoline for dynamic methods.
1039 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
1041 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
1042 generic TypeBuilders when called from another method of the same type (bug #335131).
1045 2007-10-27 Zoltan Varga <vargaz@gmail.com>
1047 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
1048 doesn't seem to work perfectly.
1050 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
1051 called multiple times.
1052 (methodbuilder_to_mono_method): Ditto.
1053 (resolve_object): Inflate FieldBuilder's.
1055 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1057 * string-icalls.c, string-icalls.h, appdomain.c: patch from
1058 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
1059 RemoveEmptyEntries in the string.Split implementation (bug #322375).
1061 2007-10-26 Dick Porter <dick@ximian.com>
1063 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
1064 Thread initialisation changes
1066 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
1068 * verify.c: fix compatibility check between arrays and System.Array
1070 2007-10-26 Zoltan Varga <vargaz@gmail.com>
1072 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
1075 2007-10-25 Zoltan Varga <vargaz@gmail.com>
1077 * object.c (mono_value_box): Use typed allocation here.
1079 2007-10-23 Zoltan Varga <vargaz@gmail.com>
1081 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
1082 trampoline instead of compiling the method right away.
1084 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
1086 2007-10-21 Zoltan Varga <vargaz@gmail.com>
1088 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
1089 related fields for dynamic classes. Fixes #334493.
1091 2007-10-20 Zoltan Varga <vargaz@gmail.com>
1093 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
1095 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
1097 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
1098 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
1100 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
1102 * reflection.c (create_generic_typespec): Initialize klass->generic_container
1104 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
1106 2007-10-18 Jonathan Chambers <joncham@gmail.com>
1108 * marshal.c: Use correct key when removing item
1111 Code is contributed under MIT/X11 license.
1113 2007-10-17 William Holmes <billholmes54@gmail.com>
1115 *marshal.c: Adding a case to marshal booleans to U1
1117 Code is contributed under MIT/X11 license.
1119 2007-10-18 Zoltan Varga <vargaz@gmail.com>
1121 * class.c (mono_class_from_name): Search the modules compromising dynamic
1122 assemblies. Fixes #331601.
1124 2007-10-16 Zoltan Varga <vargaz@gmail.com>
1126 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
1127 exception if the type name contains an assembly component. Fixes #334203.
1129 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
1130 modules inside dynamic assemblies. Fixes #334200.
1132 * reflection.c: Set image->public_key and image->public_key_length;
1134 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
1137 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
1139 2007-10-16 Mark Probst <mark.probst@gmail.com>
1141 * metadata.c: Implemented correct comparing of generic classes.
1142 An inflated generic class can be equal to a non-inflated one if it
1143 is inflated with generic type variables as type arguments. Fixes
1146 2007-10-15 Dick Porter <dick@ximian.com>
1148 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
1149 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
1152 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
1153 instead of a monitor lock. This means that monitor_try_enter and
1154 co can set the thread state safely.
1155 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
1156 thread_interrupt_requested, so interrupt actually works.
1158 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
1159 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
1160 state accessor function
1162 2007-10-15 Martin Baulig <martin@ximian.com>
1165 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
1166 the debugger with the current runtime.
1168 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
1170 * object.c, object-internals.h: added the ability to set a single
1171 trampoline for all the slots in a vtable.
1173 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1175 * marshal.c: deal with a possible race condition during multicast
1176 delegate invocation.
1178 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1180 * class.c: ensure value type methods don't have the synchronized
1183 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
1185 * string-icalls.c, string-icalls.h: reverted unapproved patch that
1188 2007-10-11 Joel Reed <joelwreed@comcast.com>
1190 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
1191 to take an options parameter so that empty entries can be removed during
1192 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
1194 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1196 * marshal.c: make sure we don't store the signature from a dynamic
1197 method into the runtime invoke cache (bug #327189).
1199 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1201 * marshal.c: make sure the wrapper methods are properly initialized.
1203 2007-10-11 Mark Probst <mark.probst@gmail.com>
1205 * metadata.c, metadata-internals.h: Generalized
1206 mono_type_stack_size() to mono_type_stack_size_internal() which
1207 takes an additional argument specifying whether it allows open
1210 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1212 * verify.c (do_invoke_method): handle typedbyref params
1213 correctly and check for unverifiable return values.
1215 * verify.c (do_newobj): fix a warning.
1217 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1219 * verify.c: don't tread typedbyref as allways unverifable,
1220 so uses, like (ld/st)loc.0 are valid. verify for the cases
1221 that it matters, like boxing related operations.
1223 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1225 * verify.c: add verification of the newobj opcode. verification
1226 of delegate instantation still missing due ldftn and virldftn not
1227 pushing the function type on stack
1229 2007-10-08 Mark Probst <mark.probst@gmail.com>
1231 * class-internals.h: Runtime generic context data structure
1234 * object.c: Initialization of runtime generic context at runtime
1235 vtable creation time.
1237 2007-10-08 Massimiliano Mantione <massi@ximian.com>
1238 * class.c (mono_class_create_from_typedef,
1239 mono_class_from_generic_parameter, mono_ptr_class_get,
1240 mono_fnptr_class_get, mono_bounded_array_class_get)
1241 * domain.c (mono_domain_create, mono_domain_free)
1242 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
1243 * image.c (do_mono_image_load, mono_image_close):
1244 Hooked up load-unload profiler events.
1246 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1248 * domain.c: track statistics about the actual amount of native code
1251 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1253 * class.c: the valuetype enumerators don't have the additional
1254 supertypes interfaces.
1256 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1258 * class.c: need more interfaces setup for the IEnumerator<T>
1259 object created for arrays (tests/ienumerator-interfaces.2.cs).
1261 2007-10-05 Zoltan Varga <vargaz@gmail.com>
1263 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
1265 2007-10-05 Alp Toker <alp@atoker.com>
1267 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
1268 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
1271 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
1273 * verify.c (verify_type_compatibility_full): verification of
1274 compatibility improved, validates correctly non-strict checks between
1275 native int and I4 types different than (unsigned)int32.
1277 * verify.c (do_store_indirect): added, do all verification of
1280 * verify.c (get_load_indirect_mono_type): renamed to
1281 get_indirect_op_mono_type, as it now returns the MonoType for
1282 ldind.X and stind.X opcodes.
1284 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
1286 * reflection.c: Fix the encoding of generic type definition for
1289 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
1290 mono_image_typedef_or_ref but allows to specify if typespec lookups should
1291 be made. Typespec check is done prior to typeref cache lookup.
1293 * reflection.c (mono_image_typedef_or_ref): now just delegate to
1294 mono_image_typedef_or_ref_full.
1296 * reflection.c (encode_generic_class): encode the generic class
1297 directly instead of calling encode_type.
1299 * reflection.c (encode_type): encode the generic type definition
1300 MonoClass as a generic instantiation.
1302 * reflection.c (create_typespec): cache typespec tokens in
1303 the assembly->typespec cache. Don't create typespec for a generic
1304 instance MonoClass. Create typespec for the generic type defintion.
1306 * reflection.c (create_generic_typespec): encode the generic
1307 class directly instead of calling encode_type.
1309 * reflection.c (mono_image_create_token): encode the generic
1310 type definition not using a typespec for MonoType instances.
1313 2007-10-04 Raja R Harinath <rharinath@novell.com>
1316 * class.c (mono_image_init_name_cache): Don't return nested
1317 'protected internal' classes.
1318 (mono_class_from_name_case): Likewise.
1320 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
1322 * icall-def.h, icall.c : get_bundled_machine_config() is now the
1323 common function used by both DefaultConfig in System.dll and
1324 InternalConfigurationHost in System.Configuration.dll.
1326 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1328 * class.c: automatically add to vectors only a few essential explicit
1329 generic interfaces. The rest of the interfaces that arrays should
1330 provide are currently implicitly added (but still not lazily, see the
1331 design in the discussion of bug#325495 for the details of what is
1332 needed for that). Additionally, implicit interfaces are assigned the
1333 same vtable slot as the explicit interfaces (as they are compatible):
1334 this enables huge memory savings since we don't need to instantiate
1335 as many memthods and as large vtables anymore. Also, Since
1336 GetEnumerator<T> returns an instance of a type that is required to
1337 support a similarly large set of interfaces as arrays, we add
1338 implicit interfaces and interface offset sharing support to those
1339 types, too. This change adds all the required interfaces so that
1340 the anonarray.cs test case in the bug report works (we don't add
1341 all the interfaces to arrays of arrays 3-level deep and more because
1342 of the memory requirements explained in the bug and since they are much
1343 less common: the lazy-loading support will enabled them to work, too).
1345 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
1347 * verify.c (merge_stacks): major clean up, all type compatibility
1348 checks are done by verify_type_compatibility. This fix my earlier lack
1349 of understanding of the CLR type system and merge_stacks no longer looks
1352 * verify.c: fixed some bad spelling.
1354 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
1356 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
1357 a given stack slock.
1359 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
1360 verify_type_compatibility_full. This removed a near indentical function and fixed
1361 handling of Int32 and IntPtr across all opcodes.
1363 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1365 * class.c: only vectors have the additional generic interfaces.
1367 2007-10-01 Jonathan Chambers <joncham@gmail.com>
1369 * mono-config.c: Use g_strcasecmp instead of
1370 strcasecmp like everywhere else to fix
1371 compilation with MSVC.
1373 Code is contributed under MIT/X11 license.
1375 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1377 * object.c, object-internals.h: refactored the IMT code to enable
1378 building a single slot at a time and lazily creating the IMT trampolines
1381 2007-09-29 Zoltan Varga <vargaz@gmail.com>
1383 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
1385 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
1388 2007-09-29 Raja R Harinath <harinath@gmail.com>
1390 * loader.c (method_from_methodspec): Rearrange to avoid
1391 un-necessary exposition. Don't assert out if the method's
1392 declaring type is a generic type definition.
1394 2007-09-28 Martin Baulig <martin@ximian.com>
1396 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
1398 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
1400 * class-internals.h: optimize field layout of MonoClass to
1401 requires less cachelines at runtime and save a few bytes on 64 bit
1404 2007-09-28 Jb Evain <jbevain@novell.com>
1406 * reflection.c: when encoding type names in custom attributes,
1407 if the type is a closed generic type, its generic arguments
1408 have to be serialized as AssemblyQualifiedName, so that when
1409 they are deserialized, it's possible to re-create them properly.
1413 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1415 * object.c, class-internals.h: added delegate-creation counter.
1417 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1419 * class.c: cleanup of the code that synthetizes interfaces for
1420 arrays in 2.0: saves quit a bit of corlib mempool memory.
1421 Code to fix bug #325495 ifdeffed out for now until the issues
1422 with memory usage and O(n^2) behaviour are fixed.
1424 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1426 * marshal.c: when possible, do not duplicate the name of the methods
1427 in the method builder and in the generated MonoMethod.
1429 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
1430 * verify.c: added support for type checking ldind_* opcodes.
1432 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
1434 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
1435 which is used to distinguish the fully open instantiation of a TypeBuilder
1436 with the rest. This temporary hack is required to restore the property that
1437 the fully open instantiation is the same type of the generic type definition.
1439 * class-internals.h (mono_generic_class_is_generic_type_definition):
1440 new function as part of the internal API.
1442 * class.c (inflate_generic_type): return NULL when the generic inst is
1443 fully open. The fully open generic type is now the same as the generic type
1444 definition for non TypeBuilder types.
1446 * class.c (mono_generic_class_get_class): removed assert since it is
1447 no longer valid, gklass->cached_class can point to the generic type definition.
1449 * class.c (mono_generic_class_is_generic_type_definition): new.
1451 * metadata.c (mono_generic_class_hash): added is_tb_open field
1452 to the hash calculation.
1454 * metadata.c (free_generic_class): if the generic class is associated
1455 with the generic type definition, its field will come from the mempool and
1458 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
1459 new, this function identifies the corner case of a TypeBuilder fully open
1462 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
1463 for lookup. Set gclass->cached_class to be the container class in case of
1464 the fully open instantiation of non TypeBuilder types.
1466 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
1467 to compare generic classes.
1469 * reflection.c (method_encode_methodspec): remove assert that
1472 * reflection.c (mono_reflection_generic_class_initialize): add
1473 an aditional assert to ensure the proper type is used.
1475 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
1477 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
1480 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
1482 * verify.c (push_arg): Fixed support for ldarga
1483 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
1484 MonoType used as first arg in case of instance calls.
1486 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
1488 * verify.c: Support for verifying VAR and MVAR types,
1490 2007-09-25 Zoltan Varga <vargaz@gmail.com>
1492 * icall.c (ves_icall_get_property_info): Set the reflected type of the
1493 accessors correctly.
1495 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
1497 * threads.c: support OSX and other systems in
1498 mono_thread_get_stack_bounds (bug #328026).
1500 2007-09-25 Martin Baulig <martin@ximian.com>
1503 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
1505 2007-09-24 Martin Baulig <martin@ximian.com>
1508 (MonoDebugClassEntry): Moved the definition of this struct into
1509 mono-debug.c to make it private.
1512 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
1513 type table per symbol file, we don't need to store the symfile id
1516 2007-09-24 Martin Baulig <martin@ximian.com>
1518 Create one type table per symbol file, since a `MonoClass *' gets
1519 invalid when its image is unloaded.
1521 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
1522 (MonoDebugHandle): Added `type_table'.
1524 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
1526 * mempool.c, mempool.h: added mono_mempool_new_size () API
1527 to be able to specify a smaller initial size for the pool.
1528 Adjusted the code to slowly increase pool size before using
1529 the previous default size.
1530 * image.c: use a small initial size for image mempools.
1532 2007-09-23 Zoltan Varga <vargaz@gmail.com>
1534 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
1537 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
1538 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
1540 2007-09-22 Zoltan Varga <vargaz@gmail.com>
1542 * metadata.c (mono_type_create_from_typespec): Remove an invalid
1543 free. Fixes #327438.
1545 2007-09-21 Raja R Harinath <harinath@gmail.com>
1547 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
1548 generic instantiations, etc.
1549 <MONO_TYPE_ARRAY>: Likewise.
1551 2007-09-21 Martin Baulig <martin@ximian.com>
1553 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
1554 these structs were never defined.
1555 (MonoDebugHandle): Removed the `_priv' field, it was never used.
1557 2007-09-21 Martin Baulig <martin@ximian.com>
1559 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
1561 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
1563 * image.c: removed the guid hash tables: we can get the same info
1564 without the additional memory usage hit (partially fixes also bug #327052).
1566 2007-09-10 Massimiliano Mantione <massi@ximian.com>
1568 * profiler.h, profiler-private.h, profiler.c: add a new profiler
1569 event to handle unloading methods. After the event is called, the
1570 corresponding MonoMethod* must be considered invalid.
1571 * loader.c (mono_free_method): call the new mono_profiler_method_free
1574 2007-09-20 Mark Probst <mark.probst@gmail.com>
1576 * domain-internals.h: New flag in MonoJitInfo which marks shared
1577 generic methods. New hash table (shared_generics_hash) in
1578 MonoDomain to keep track of shared generic methods. Prototypes
1579 for functions to register and lookup shared generic methods.
1581 * domain.c: Support for registering and looking up shared generic
1582 methods via a hash table (shared_generics_hash) in MonoDomain.
1584 * class-internals.h: New exception to signal failure of shared
1585 compilation of a generic method. New counters for generics
1586 sharing in MonoStats.
1588 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
1590 * image.c, metadata-internals.h: don't keep a file descriptor open
1591 for loaded assemblies (bug#325988).
1593 2007-09-19 Raja R Harinath <rharinath@novell.com>
1595 * metadata.c (signature_in_image): New. Carve out of type_in_image.
1596 (ginst_in_image, gclass_in_image): Simplify. Change signature to
1597 use the corresponding datatypes.
1598 (type_in_image): Update to changes.
1599 (CleanForImageUserData): Simplify.
1600 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
1601 Avoid quadratic behaviour in handling the "stolen" list by
1602 separating the filter predicate out, and by prepending the stolen
1603 items rather than appending them.
1604 (steal_ginst_in_image): Likewise.
1605 (mono_metadata_clean_for_image): Update to changes.
1607 2007-09-19 Martin Baulig <martin@ximian.com>
1609 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
1611 2007-09-19 Martin Baulig <martin@ximian.com>
1613 * mono-debug.c (mono_debug_cleanup): Don't call
1614 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
1616 2007-09-19 Raja R Harinath <harinath@gmail.com>
1618 Fix crash on 'make run-test' in mcs/errors
1619 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
1620 Avoid more potential allocations in mono_class_from_mono_type.
1621 (ginst_in_image): Update to changes.
1622 (gclass_in_image): Rearrange slightly.
1624 2007-09-18 Zoltan Varga <vargaz@gmail.com>
1626 * class.c (mono_class_init): Move the code that sets up class->methods to
1627 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
1629 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
1630 canonical instance of an inflated generic signature.
1631 (mono_type_create_from_typespec): Remove an invalid free.
1633 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
1635 2007-09-18 Marek Habersack <mhabersack@novell.com>
1637 * domain-internals.h: added a declaration of the
1638 mono_assembly_load_full_nosearch internal function.
1640 * assembly.c (mono_assembly_load_with_partial_name): use
1641 mono_try_assembly_resolve return value properly.
1642 (mono_assembly_load_full_nosearch): copied the function body from
1643 mono_assembly_load_full, without the code to invoke assembly
1645 (mono_assembly_load_full): calls the above new function and if the
1646 assembly is not resolved, invokes the search hooks.
1648 * appdomain.c (mono_runtime_init): restore the global postload
1649 assembly search handlers.
1651 2007-09-18 Zoltan Varga <vargaz@gmail.com>
1653 * class.c (mono_class_init): Make sure class->methods and class->properties
1654 are never NULL in the generics case.
1656 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
1658 2007-09-17 Zoltan Varga <vargaz@gmail.com>
1660 * metadata.c (free_generic_class): Disable some code to fix the build.
1662 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
1664 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
1665 from the image mempool.
1667 * metadata.c (free_generic_class): Free more data from the inflated class.
1669 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
1671 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
1673 (mono_type_create_from_typespec): Ditto.
1675 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
1676 MonoImage to the caller.
1677 (mono_init_internal): Save the opened image in a global variable.
1678 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
1680 * reflection.c (resolve_object): Fix a leak.
1682 * metadata.c: Fix the freeing of data in the generics caches.
1684 * metadata.c (free_generic_inst): Comment this out to fix the build.
1685 (free_generic_class): Ditto.
1687 * metadata.c: Free cached generic methods, instantinations and classes when
1688 they are removed from the caches.
1689 (mono_metadata_free_type): Free the type itself.
1691 * class.c: Free the result of mono_class_inflate_generic_type () in a few
1694 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1696 * boehm-gc.c: restrict managed allocs to __thread supporting
1699 2007-09-16 Zoltan Varga <vargaz@gmail.com>
1701 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
1702 (mono_generic_class_get_class): Fix a leak.
1704 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
1705 mono_metadata_free_type ().
1706 (mono_metadata_inflate_generic_inst): Fix a leak.
1708 2007-09-14 Zoltan Varga <vargaz@gmail.com>
1710 * mono-debug.c (free_header_data): Fix a leak missed earlier.
1712 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
1715 * mono-debug.c (mono_debug_close_image): Fix call to
1716 g_hash_table_remove ().
1718 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1720 * icall-def.h: redirect all the string ctor to the managed
1721 CreateString () methods.
1722 * string-icalls.c, string-icalls.h: removed dead code for string
1725 2007-09-14 Zoltan Varga <vargaz@gmail.com>
1727 * mono-debug.c: Fix memory leaks.
1729 2007-09-14 Jonathan Chambers <joncham@gmail.com>
1731 * threads-types.h: Implement mono_hazard_pointer_set and
1732 mono_hazard_pointer_clear macros using do/while(0) to fix
1733 compilation with MSVC.
1735 Code is contributed under MIT/X11 license.
1737 2007-09-14 Zoltan Varga <vargaz@gmail.com>
1739 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
1740 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
1742 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1744 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
1747 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1749 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
1750 managed-code allocated as well.
1752 2007-09-13 Zoltan Varga <vargaz@gmail.com>
1754 * class.c (mono_class_is_assignable_from): Add support for generic variance.
1756 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
1758 * boehm-gc.c: fixed the build after the AOT changes.
1760 2007-09-13 Zoltan Varga <vargaz@gmail.com>
1762 * wrapper-types.h: Add an ALLOC wrapper type.
1764 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
1765 reference managed allocator methods.
1767 2007-09-12 Marek Safar <marek.safar@gmail.com>
1769 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
1770 of Type array and not MonoType, a fix suggested by Hari.
1772 2007-09-12 Jonathan Chambers <joncham@gmail.com>
1774 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
1775 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
1777 Code is contributed under MIT/X11 license.
1779 2007-09-10 Massimiliano Mantione <massi@ximian.com>
1781 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
1783 2007-09-12 Marek Habersack <mhabersack@novell.com>
1785 * image.c (do_mono_image_open): if assembly file fails to open and
1786 MONO_IOMAP is in effect, try to find the path in a
1787 case-insensitive way.
1789 * appdomain.c (mono_runtime_init): do not install postload hooks -
1790 tests show that MS.NET doesn't use anything of that sort to
1791 trigger the AppDomain.AssemblyResolve event.
1792 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
1794 (mono_runtime_init): init portability helpers here.
1796 * assembly.c (mono_assembly_load_with_partial_name): if other
1797 attempts fail, trigger the AppDomain.AssemblyResolve event handler
1798 to resolve the assembly.
1800 * domain-internals.h: added mono_try_assembly_resolve and marked
1803 2007-09-11 Jb Evain <jbevain@novell.com>
1805 * object-internals.h (MonoReflectionDynamicMethod): add
1806 a `MonoReflectionType *owner` field. The owner is used
1808 (mono_reflection_create_dynamic_method): use the owner of the dynamic
1809 method as the class declaring the dynamic method.
1810 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
1811 dynamic method to the declaring type of the methodbuilder.
1813 2007-09-11 Mark Probst <mark.probst@gmail.com>
1815 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
1816 rules for calling methods via reflection.
1818 2007-09-11 Zoltan Varga <vargaz@gmail.com>
1820 * reflection.c (resolve_object): Add support for MonoGenericClass.
1823 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
1825 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
1826 provide a managed method that does fast allocations without needing
1827 a managed->unmanaged transition. Boehm GC implementation currently
1828 enabled for ptrfree objects on sane architectures.
1830 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1832 * marshal.c, marshal.h: exported a couple of useful functions and
1833 added mono_mb_get_label () to easily handle backward branches.
1835 2007-09-10 Zoltan Varga <vargaz@gmail.com>
1837 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
1839 2007-09-10 Massimiliano Mantione <massi@ximian.com>
1841 * loader.c (find_method): Fixed the regression introduced while
1844 2007-09-09 Zoltan Varga <vargaz@gmail.com>
1846 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
1849 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
1850 icall.c reflection.c: Pass a MonoGenericContext argument to
1851 mono_lookup_dynamic_token ().
1853 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
1856 2007-09-09 Robert Jordan <robertj@gmx.net>
1858 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
1859 for generic methods.
1861 * object.c (mono_object_get_virtual_method): Handle generic methods.
1864 Code is contributed under MIT/X11 license.
1866 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
1868 * image.c: fix locking in mono_image_load_file_for_image ().
1870 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
1872 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
1873 used only as a cache: added an icall to fill it.
1875 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
1877 * reflection.h: exposed mono_reflection_free_type_info
1878 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
1879 since mono_reflection_bind_generic_parameters makes a copy of it.
1880 * reflection.c (free_type_info): subinfos should be freed.
1881 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
1883 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
1884 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
1885 this fixes #82695 and #81726.
1888 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
1890 * process.h, process.c: added support for user profile/info in
1891 ProcessStartInfo. For now only Windows works.
1893 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1895 * metadata.c: consider the generic arguments when comparing
1896 signatures (bug #82614).
1898 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1900 * cil-coff.h, image.c: updated assembly loader to cope with the
1901 PE32+ 64 bit file format.
1903 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1905 * assembly.c, class.c, domain.c, loader.c: remove useless
1906 inclusion of cil-coff.h.
1908 2007-08-29 Jonathan Chambers <joncham@gmail.com>
1910 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
1911 if interface is marked with CoClassAttribute.
1913 Code is contributed under MIT/X11 license.
1915 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1917 * sgen-gc.c: ensure no object from the to space is copied again or finalized
1918 if it's seen twice in major collections.
1920 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1922 * sgen-gc.c: big objects are not copied to the gray area, but they
1923 need to be considered for scanning, too, if they are brought alive
1924 by an object ready for finalizations or a survived one.
1926 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1928 * sgen-gc.c: properly account the number of disappearing links when
1931 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1933 * sgen-gc.c: share the code to scan the registered roots between the
1934 different types of collections.
1936 2007-08-28 Zoltan Varga <vargaz@gmail.com>
1938 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
1940 2007-08-28 Zoltan Varga <vargaz@gmail.com>
1942 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
1943 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
1945 2007-08-28 Mark Probst <mark.probst@gmail.com>
1947 * security-manager.c (mono_security_manager_get_methods):
1948 LinkDemandSecurityException now has 2 arguments instead of 3.
1950 2007-08-27 Zoltan Varga <vargaz@gmail.com>
1952 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
1953 platforms which need it.
1955 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
1957 * sgen-gc.c: unregister thread data structures with a pthread_key_t
1960 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1962 * threads.c: free the thread static data on thread exit.
1964 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
1966 * class.c: walk the hierarchy to find the generic definition for
1967 a class (fixes runtime part of bug #82498).
1969 2007-08-24 Zoltan Varga <vargaz@gmail.com>
1971 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
1974 * image.c (mono_image_close): Here. Hopefully fixes #82510.
1976 2007-08-24 Mark Probst <mark.probst@gmail.com>
1978 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
1980 2007-08-24 Robert Jordan <robertj@gmx.net>
1982 * appdomain.c: don't perform the ':'->';' substitution on Win32.
1984 2007-08-24 Jb Evain <jbevain@novell.com>
1986 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
1989 2007-08-24 Mark Probst <mark.probst@gmail.com>
1991 * threads.c: Make sure a thread gets cleaned up only once. Fixes
1994 2007-08-24 Zoltan Varga <vargaz@gmail.com>
1996 * assembly.c: Fix a warning.
1998 2007-08-23 Marek Habersack <mhabersack@novell.com>
2000 * appdomain.c: parse the <runtime> section looking for the probing
2001 element with the 'privatePath' attribute, which sets additional
2002 directories in which the runtime should look for assemblies.
2004 2007-08-23 Robert Jordan <robertj@gmx.net>
2006 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
2009 2007-08-23 Martin Baulig <martin@ximian.com>
2011 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
2012 _mono_debug_init_corlib() and remove it from the header file.
2014 2007-08-23 Martin Baulig <martin@ximian.com>
2016 * mono-debug-debugger.c
2017 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
2018 don't notify the debugger about it.
2020 * mono-debug-debugger.h
2021 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
2023 2007-08-23 Robert Jordan <robertj@gmx.net>
2025 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
2026 Code is contributed under MIT/X11 license.
2028 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2030 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
2032 2007-08-22 Martin Baulig <martin@ximian.com>
2034 * mono-debug.c: Store debugging info on a per-domain basis and
2035 free it on domain unload. Add support for unloading symbol files.
2038 (MonoDebugList): New typedef.
2040 - add `data_tables and `type_table'.
2041 - replace 'symbol_files' and `num_symbol_files' with a
2043 (mono_debug_data_table): Removed.
2044 (mono_debug_list_add): New public function.
2045 (mono_debug_list_remove): New public function.
2046 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
2047 (mono_debug_init_2_memory): Renamed into
2048 mono_debug_open_image_from_memory().
2049 (mono_debug_close_image): New public function.
2050 (mono_debug_domain_create): Likewise.
2051 (mono_debug_domain_unload): Likewise.
2052 (MONO_DEBUGGER_VERSION): Bump to 60.
2054 * mono-debug-debugger.h
2055 (MonoDebuggerEvent):
2056 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
2057 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
2058 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
2059 - rename `THREAD_CREATED' and `THREAD_EXITED' into
2060 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
2061 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
2063 (mono_debugger_add_symbol_file): Removed.
2064 (mono_debugger_add_type): Removed.
2065 (mono_debugger_lookup_type): Removed.
2066 (mono_debugger_lookup_assembly): Removed.
2069 (mono_domain_create): Call mono_debug_domain_create().
2070 (mono_init_internal): Call mono_debug_init_corlib().
2073 (mono_assembly_close): Call mono_debug_close_image().
2075 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2077 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
2080 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
2082 * sgen-gc.c: ensure section->pin_queue_end is initialized
2083 correctly when non pinning objects in the section have been found.
2085 2007-08-22 Marek Habersack <mhabersack@novell.com>
2087 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
2088 containing a list of directories separated by ':'. MSDN docs say
2089 the directories should be separated with ';'. Part of a bugfix for
2092 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
2094 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
2095 it should MonoType and not MonoClass.
2097 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
2099 * culture-info-table.h : regenerated.
2101 2007-08-20 William Holmes <billholmes54@gmail.com>
2103 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
2104 to call ReplaceFile Kernel32 on windows or in io-layer.
2105 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
2106 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
2107 as an internal call.
2109 Code is contributed under MIT/X11 license.
2111 2007-08-20 Jb Evain <jbevain@novell.com>
2113 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
2114 and MONO_EXCEPTION_FIELD_ACCESS.
2116 * debug-helpers.[c|h]: new mono_field_full_name function.
2118 2007-08-20 Mark Probst <mark.probst@gmail.com>
2120 * class.c: Removed class_security_level() and moved it to
2121 security-core-clr.c.
2123 * security-core-clr.c, security-core-clr.h: class_security_level()
2124 is now public and renamed to mono_security_core_clr_class_level().
2125 It also looks for security attributes in the classes a class is
2128 2007-08-20 Mark Probst <mark.probst@gmail.com>
2130 * security-core-clr.c, security-core-clr.h: CoreCLR security
2133 * Makefile.am: Added security-core-clr.[ch].
2135 * security-manager.c, security-manager.h: Functions and enum for
2136 setting and getting the security mode.
2138 * class.c: CoreCLR security checks.
2140 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2142 * icall-def.h, process.c, process.h: implemented icall to get
2143 user/system processor times.
2145 2007-08-17 Mark Probst <mark.probst@gmail.com>
2147 * domain.c, threads.c, class-internals.h, domain-internals.h: New
2148 reader-lock-free jit_info_table.
2150 2007-08-17 Zoltan Varga <vargaz@gmail.com>
2152 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
2154 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
2156 * object-internals.h (MonoException): Add missing _data member.
2158 2007-08-08 Massimiliano Mantione <massi@ximian.com>
2160 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
2161 checking that only methods with matching qname or fqname are picked
2162 from implemented interfaces.
2164 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
2166 * verify.c (do_newarr):added, do type verification of
2167 newarr ops, push the right value on the eval stack.
2168 * verify.c (mono_method_verify): use do_newarr
2171 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
2173 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
2174 factored the common code into get_boxable_mono_type, which
2175 is now using mono_type_get_full, this fixed byref related tests.
2177 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
2179 * class.c: added mono_type_get_full, this function has the same
2180 behavior of mono_class_get_full but the returned MonoType has
2181 all metadata of the associated token in case of a typespec token.
2182 * class.c: added mono_type_retrieve_from_typespec, used by
2183 mono_type_get_full to retrieve the token type.
2184 * class.c (mono_class_create_from_typespec): changed to use
2185 mono_type_retrieve_from_typespec.
2186 * class.c (mono_ldtoken): changed to use mono_type_get_full
2187 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
2188 * class-internals.h: exported mono_type_get_full for internal use.
2190 2007-08-16 Jb Evain <jbevain@novell.com>
2192 * domain.c (supported_runtimes): add entry for
2193 the 'moonlight' runtime version.
2195 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2197 * verify.c (mono_method_verify): small typo sliped in.
2199 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2201 * verify.c (do_unbox_value): added, do type verification of
2203 * verify.c (mono_method_verify): use do_unbox_value
2206 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2208 * verify.c (dump_stack_value): fixed typo, was printing string
2209 instead of object on stack.
2210 * verify.c (do_box_value): moved the byref check up as it leads
2211 to invalid code and should be done earlier.
2212 * verify.c: improved error messages for and ldobj
2214 2007-08-15 William Holmes <billholmes54@gmail.com>
2216 * marshal.c (emit_marshal_custom): Omit the call to
2217 marshal_native_to_managed when calling native to managed
2218 and the argument is specified as an out argument.
2220 Code is contributed under MIT/X11 license.
2222 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2224 * verify.c: fixed the type checks for generics, function pointers and vectors.
2225 Added type verification for ldobj and ldtoken. The verifier
2226 would segfault if header or signature of a method contained references
2227 to non-existant types.
2229 2007-08-15 Jonathan Chambers <joncham@gmail.com>
2231 * marshal.c (cominterop_get_ccw): Patch from
2232 Bill Holmes to no walk up interface hierarchy.
2233 All parent methods should be present in the interface for COM.
2235 Code is contributed under MIT/X11 license.
2237 2007-08-15 Jonathan Chambers <joncham@gmail.com>
2239 * marshal.c (emit_marshal_com_interface): Patch from
2240 Bill Holmes to handle COM Interfaces as return values
2241 for native->managed calls.
2243 Code is contributed under MIT/X11 license.
2245 2007-08-14 Jonathan Chambers <joncham@gmail.com>
2247 * marshal.c (cominterop_get_idispatch_for_object): Implement
2248 for runtime callable wrappers.
2250 Code is contributed under MIT/X11 license.
2252 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
2254 * pedump.c (main): changed from mono_init to mono_init_from_assembly
2255 so 2.0 types are accessible
2258 2007-08-13 Miguel de Icaza <miguel@novell.com>
2260 * domain.c (mono_init_internal): Call mono_assembly_load_friends
2261 once we load mscorlib. Due to the order in which we initialize,
2262 the mono_assembly_load_full routine that loads mscorlib did not
2263 load friends. We now load it once we load the
2264 mono_defaults.internals_visible_class class.
2266 * assembly.c: Expose the mono_load_friend_assemblies method.
2268 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
2270 * verify.c: improved the handling of boxing, better
2271 type checking for unary ops and conversion. Fix bug
2272 regarding managed pointer compatibility checking
2274 2007-08-11 Zoltan Varga <vargaz@gmail.com>
2276 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
2278 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
2280 2007-08-09 Raja R Harinath <rharinath@novell.com>
2282 * reflection.c (dup_type): Remove.
2283 * class.c (dup_type): Remove.
2284 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
2285 instead of the dodgy 'dup_type'.
2286 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
2287 handle the case where 'dup_type' needed the second argument.
2289 2007-08-08 Zoltan Varga <vargaz@gmail.com>
2291 * domain.c: Fix a warning.
2293 2007-08-08 Massimiliano Mantione <massi@ximian.com>
2295 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
2296 checking that methods with the same fqname are not overridden
2297 with a method from an ancestor.
2299 2007-08-07 Zoltan Varga <vargaz@gmail.com>
2301 * threads.c (free_thread_static_data_helper): Avoid a crash if
2302 thread->static_data is not yet set.
2304 2007-08-07 Jonathan Chambers <joncham@gmail.com>
2306 * marshal.c: Use correct image when emitting
2307 native wrapper for COM calls.
2309 Code is contributed under MIT/X11 license.
2311 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
2313 * icall-def.h, security.c, security.h :
2314 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
2316 2007-08-07 Martin Baulig <martin@ximian.com>
2318 * mono-debug-debugger.h
2319 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
2321 * domain.c (mono_domain_free): Call
2322 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
2324 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
2326 * verify.c (check_underflow, check_overflow): error message now returns IL offset
2327 * verify.c (in_same_block): code should test if either offset is inside the clauses
2328 * verify.c (mono_method_verify): push the exception into the eval stack of exception
2331 2007-08-03 Zoltan Varga <vargaz@gmail.com>
2333 * image.c (mono_image_close): Fix a leak.
2335 * object.c (mono_runtime_invoke_array): Avoid using alloca.
2337 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
2339 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2341 * domain.c, threads.c, threads-types.h: fix memory retention issue
2342 with thread static variables not being cleared on domain unload.
2343 Reuse thread static slots after domain unload.
2345 2007-08-03 Zoltan Varga <vargaz@gmail.com>
2347 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
2350 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
2351 now done in mono_runtime_invoke_array.
2353 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
2354 receiver is a nullable type.
2356 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
2359 2007-08-03 Jonathan Chambers <joncham@gmail.com>
2361 * marshal.c: Implement COM Objects as return type for
2362 managed->unmanaged calls. Added Release calls for COM Object
2363 out/return values in managed->unmanaged calls.
2365 Code is contributed under MIT/X11 license.
2367 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2369 * threads.h, threads-type.h: move the hazard pointer declarations
2370 to the private header.
2372 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2374 * file-io.c, appdomain.c: memory leak fixes.
2376 2007-08-02 Dick Porter <dick@ximian.com>
2379 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
2380 SO_REUSEADDR setting into io-layer/sockets.c.
2382 2007-08-01 Zoltan Varga <vargaz@gmail.com>
2384 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
2385 from Object when called on a generic parameter. Fixes #82211.
2387 2007-08-01 Dick Porter <dick@ximian.com>
2389 * file-io.c (convert_share): Test FileShare values bit-by-bit.
2390 Fixes bug 79250 yet again.
2392 2007-07-30 Martin Baulig <martin@ximian.com>
2394 Merged the `debugger-dublin' branch.
2397 (MonoDebugDataTable): New typedef.
2398 (MonoDebugMethodAddressList): New typedef.
2399 (MonoDebugWrapperData): Removed.
2400 (MonoDebugSymbolTable): Removed `current_data_table',
2401 `current_data_table_size', `current_data_table_offset'.
2402 (MonoDebugDataItemType): Moved into mono-debug.c.
2403 (MonoDebugMethodJitInfo): Remove `address'.
2404 (mono_debug_data_table): New global variable.
2405 (mono_debug_lookup_method_addresses): New public function.
2406 (mono_debug_find_method): Take a `MonoMethod *', not a
2407 `MonoDebugMethodInfo *'.
2409 * mono-debug.c: Drop support for the old symbol tables.
2411 2007-06-28 Martin Baulig <martin@ximian.com>
2413 * mono-debug.c (mono_debug_debugger_version): New public variable.
2415 2007-07-31 William Holmes <billholmes54@gmail.com>
2417 * metadata.c Changed mono_type_create_from_typespec to not insert
2418 the type into the hash map until after
2419 do_mono_metadata_parse_type has completed.
2421 Code is contributed under MIT/X11 license.
2423 2007-07-31 Zoltan Varga <vargaz@gmail.com>
2425 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
2426 generic parameter. Fixes #82211.
2428 2007-07-27 Jb Evain <jbevain@novell.com>
2430 * pedump.c (dump_metadata, dump_metadata_header): dump
2431 versions contained in the metadata header.
2433 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2435 * threads.c: register small_id_table with the GC.
2437 2007-07-27 Mark Probst <mark.probst@gmail.com>
2439 * threads.c, threads.h, class-internals.h, object-internals.h:
2440 Hazard pointers, to be used by lock-free parallel algorithms.
2442 2007-07-26 Dick Porter <dick@ximian.com>
2444 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
2445 routine on non-windows platforms, as I've not managed to think of
2446 a non-kludgy way of doing this. Finishes off bug 78739.
2448 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2450 * object.c: properly setup interface_bitmap in proxy vtables.
2452 2007-07-25 Marek Habersack <mhabersack@novell.com>
2454 * appdomain.c (get_shadow_assembly_location): do not use TickCount
2455 to create unique shadow copy target directories, use the domain's
2456 serial number instead. Each domain gets a unique target directory
2459 * domain.c (mono_domain_create): added code to increment domain
2460 shadow copy serial number and cache the value in the current
2463 * domain-internals.h (struct _MonoDomain): added a new field -
2464 shadow_serial to hold the serial number used in generation of
2465 shadow-copy directories. This is to make sure that the directory
2466 name is unique for each and every domain created. We avoid a race
2467 condition with overriding assemblies already in use by other app
2470 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
2472 * class.c (mono_bounded_array_class_get): fixed memory leak when
2473 binding generic parameters.
2475 2007-07-24 Raja R Harinath <rharinath@novell.com>
2477 * metadata.c (do_mono_metadata_parse_generic_class): Use
2478 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
2481 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2483 * loader.c, class-internals.h, reflection.c: removed the per-method
2484 generics hashtable: we use the global one through the call of
2485 mono_class_inflate_generic_method ().
2487 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2489 * class.c, metadata.c, class-internals.h: introduce yet another
2490 generics global cache for inflated methods (fixes 98% of the perf
2491 issue in bug #81806).
2493 2007-07-23 Raja R Harinath <rharinath@novell.com>
2495 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
2496 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
2497 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
2498 return a MonoGenericInst containing (a copy) of those types.
2499 (mono_metadata_inflate_generic_inst): Update to changes.
2500 (mono_metadata_parse_generic_inst): Likewise.
2501 (mono_get_shared_generic_inst): Likewise.
2502 * reflection.c (mono_class_bind_generic_parameters): Likewise.
2503 (mono_reflection_bind_generic_method_parameters): Likewise.
2504 * metadata-internals.h: Likewise.
2505 * icall.c (free_generic_context): Kill.
2506 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
2508 * reflection.c (reflection_methodbuilder_to_mono_method): Use
2509 mono_metadata_type_dup.
2510 * marshal.c (mono_mb_create_method): Likewise.
2512 * metadata.c (mono_metadata_type_dup): Rename from
2513 mono_metadata_type_dup_mp. Take an optional mempool instead of a
2514 MonoImage. Handle a few more cases, esp. when no mempool is given.
2515 * marshal.c, metadata-internals.h: Update to changes.
2517 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
2519 * class.c: fixed a small leak for array classes and removed warning.
2521 2007-07-22 Zoltan Varga <vargaz@gmail.com>
2523 * loader.c (mono_method_get_param_token): Make this work on generic methods.
2524 Return 0x8000000 for return parameters. Fixes #82161.
2526 2007-07-21 Marek Habersack <grendello@gmail.com>
2528 * appdomain.c (get_shadow_assembly_location): append the current
2529 ticks value to the path. Avoids overwriting the same assemblies by
2530 several threads at the same time.
2532 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
2533 and Raja R Harinath <rharinath@novell.com>
2535 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2537 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
2538 property for testing if a method is a generic method definition.
2540 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
2542 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
2544 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2546 * verify.c: used function from private branch, reverted to the one in class.h
2548 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2550 * verify.c: a typo slipped in and the code wont compile
2552 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2554 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
2555 disabled box instruction as it is doing the wrong thing
2556 improved stack dump messages, now it is easier to debug type related issues
2559 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
2561 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
2563 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2565 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
2566 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
2567 grouped with class and valuetype. This change will simply
2568 the code as it should be handled just like unmanaged pointers.
2570 2007-07-19 Mark Probst <mark.probst@gmail.com>
2572 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
2574 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2576 * verify.c: several stack merge issues fixed, reference comparisons now
2577 check the type size. strict type check now works correctly.
2578 added more uses of IS_MANAGED_POINTER macro.
2579 fixed issues pointed by running the test suite against .net.
2582 2007-07-19 Mark Probst <mark.probst@gmail.com>
2584 * class.c, loader.c, class-internals.h: Removed the
2585 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
2588 * icall.c: Better error checking in some internal reflection
2591 2007-07-18 William Holmes <billholmes54@gmail.com>
2593 * filewatcher.c : removed unused variable 'filename' in
2594 ves_icall_System_IO_FSW_SupportsFSW
2596 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2598 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
2601 2007-07-15 Zoltan Varga <vargaz@gmail.com>
2603 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
2605 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
2607 2007-07-14 Zoltan Varga <vargaz@gmail.com>
2609 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
2610 Implement generics support.
2611 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2613 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
2614 type_args and method_args arguments.
2615 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
2616 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2617 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
2619 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
2621 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
2622 It adds a rootimage parameter to mono_reflection_get_type_internal,
2623 adds new function mono_reflection_get_type_with_rootimage and use
2624 the rootimage to resolve the types instead of the current image
2626 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
2628 * culture-info-table.h: Forgot to update after r78304.
2630 2007-07-13 Raja R Harinath <rharinath@novell.com>
2632 * class.c (mono_class_is_open_constructed_type)
2633 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
2635 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
2637 * class.c (mono_bounded_array_class_get): method fails if used with
2638 an incomplete TypeBuilder enum (no basetype field), fixed it by
2639 avoiding calculating the size for such array as it cannot be instantiated.
2642 2007-07-12 Raja R Harinath <rharinath@novell.com>
2644 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
2646 * metadata.c, reflection.c: Update to changes.
2648 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2650 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
2651 mono_class_is_valid_enum, they are used to valide a enum when loading.
2652 * reflection.c: used new functions to throw TypeLoadException when and
2653 invalid enum is build with TypeBuilder. Fixes #82018
2655 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
2657 * object.c: forgot commit of mono_class_setup_methods () to access
2659 * object-internals.h: added a few more handy fields to
2662 2007-07-11 Zoltan Varga <vargaz@gmail.com>
2664 * object.c (build_imt): Call mono_class_setup_methods () before accessing
2667 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
2669 * class-internals.h, object-internals.h, object.c: IMT-based
2670 interface invocation core from Massimiliano Mantione
2671 (massi@ximian.com) with a reworked arch-specific interface,
2672 bsearch implementation and a few bugfixes and memory savings by me.
2674 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
2676 * class.c (mono_class_create_from_typedef): mono would segfault if
2677 an enum did not have a __value field. It now throws a TypeLoadException
2678 for such cases. Fix bug #82022
2680 2007-07-10 Zoltan Varga <vargaz@gmail.com>
2682 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
2684 2007-07-09 Mark Probst <mark.probst@gmail.com>
2686 * class.c (mono_class_init): If a class is already inited but has
2687 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
2689 2007-07-09 Mark Probst <mark.probst@gmail.com>
2691 * class.c: Properly handle the case of an unimplemented interface
2692 method. Fixes: 81673.
2694 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
2696 * class-internals.h, object.c: cleanup patch from massi: use
2697 MonoVTable->interface_bitmap since the vtable interfaces offset array
2700 2007-07-10 Zoltan Varga <vargaz@gmail.com>
2702 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
2703 GetMDStreamVersion icall instead.
2705 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2707 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
2708 not use mono_dl_build_path() with a full library name: makes
2709 fallbacks to libgaim and libfam work.
2711 2007-07-06 William Holmes <billholmes54@gmail.com>
2713 * assembly.c: Added a continue statement in probe_for_partial_name when
2714 parse_assembly_directory_name fails. Fixes : 82002
2716 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
2718 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
2719 and added a verification for TYPEDBYREF.
2720 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
2721 make native int interchangeable with int32 and some small cleanup and formating.
2722 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
2723 handle byref of byref.
2724 * verify.c (push_local): handle byref of byref.
2725 * verify.c (do_binop): invalid mix of values is unverifiable
2726 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
2727 added visibility checks
2728 * verify.c (field related method): added visibility checks
2729 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
2731 2007-07-06 Zoltan Varga <vargaz@gmail.com>
2733 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
2736 2007-07-05 Zoltan Varga <vargaz@gmail.com>
2738 * profiler.c (mono_profiler_load): Fix an off-by-one error.
2740 * marshal.c (emit_marshal_string): When returning a string from managed code,
2741 allways make a copy even for unicode strings. Fixes #81990.
2743 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
2745 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
2746 of byref generic inst types (bug #81997).
2748 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
2750 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
2751 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
2753 2007-07-02 Zoltan Varga <vargaz@gmail.com>
2755 * marshal.c (emit_marshal_string): Add support for unicode strings in
2756 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
2758 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
2760 * verify.c: field load/store are now verified, missing only access checks now
2762 2007-06-28 Martin Baulig <martin@ximian.com>
2764 * mono-debug.c (mono_debug_debugger_version): New public variable.
2766 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
2768 * locales.c: When constructing DateTimeFormat or NumberFormat for
2769 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
2770 MonoCultureInfo contructed from the current locale is always
2771 read-only and has UseUserOverride set to true. All MonoCultureInfo
2772 instances returned for GetCultures have both IsReadOnly and
2773 UseUserOverride set to true. Fixes part of bug #81930.
2775 2007-06-22 Jonathan Chambers <joncham@gmail.com>
2777 * icall-def.h: Update System.__ComObject icalls
2778 * marshal.c: Avoid managed transition (and object creation)
2779 when looking up COM interface in RCW.
2782 Code is contributed under MIT/X11 license.
2784 2007-06-22 Zoltan Varga <vargaz@gmail.com>
2786 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
2787 to avoid crashes during assembly unloading.
2789 2007-06-22 Raja R Harinath <rharinath@novell.com>
2791 Fix MethodInfo.IsGenericMethodDefinition
2792 * reflection.c (mono_reflection_bind_generic_method_parameters):
2793 Rearrange code to ensure we always uses a generic method definition.
2794 * class.c (mono_class_inflate_generic_method_full): Set
2795 'generic_container' field only for generic method definitions.
2796 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2797 Use presense of 'generic_container' field as indication of being a
2798 generic method definition.
2800 2007-06-21 Zoltan Varga <vargaz@gmail.com>
2802 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2804 * object-internals.h: Reflect changes in the layout of the managed Delegate
2807 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
2808 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
2809 runtime memory used by the dynamic method. Fixes #77146.
2811 2007-06-21 Dick Porter <dick@ximian.com>
2814 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
2815 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
2818 2007-06-21 Raja R Harinath <rharinath@novell.com>
2820 * reflection.c (method_encode_methodspec): Add a tripwire.
2821 * class.c (inflate_generic_type): The fully open generic type is
2822 not the same as the generic type definition.
2824 2007-06-21 Martin Baulig <martin@ximian.com>
2826 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
2828 * mono-debug-debugger.h
2829 (MonoDebuggerBreakpointInfo): Removed.
2830 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
2831 (mono_debugger_remove_breakpoint): Likewise.
2832 (mono_debugger_breakpoint_callback): Likewise.
2833 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
2835 2007-06-21 Raja R Harinath <rharinath@novell.com>
2837 * metadata.c (mono_metadata_lookup_generic_class): The fully open
2838 generic type is not the same as the generic type definition.
2839 * class.c (mono_generic_class_get_class): Likewise.
2841 2007-06-20 Geoff Norton <gnorton@customerdna.com>
2843 * icall.c: The second argument to
2844 System.Reflection.MethodBase.GetMethodFromHandleInternalType
2845 is a MonoType not a MonoClass.
2847 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
2849 * verify.c: support for function pointers in the verifier
2851 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
2853 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
2855 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2857 * assembly.c: removed Mono.Data.SqliteClient from the list of
2858 forward-compatible assemblies as it breaks the ABI (bug #81899).
2860 2007-06-19 Raja R Harinath <rharinath@novell.com>
2862 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
2863 lookup/update with the loader lock.
2864 * reflection.c (mono_class_bind_generic_parameters): No need to
2865 protect mono_metadata_lookup_* with the loader lock.
2866 * class.c (inflate_generic_type): Likewise.
2868 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
2869 on a generic instantiated type.
2871 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
2873 *verify.c: produce meanfull error messages on verification error
2874 *verify.c: fixed some cases of verification errors reported as validation errors
2875 *pedump.c: fixed the error name array, now it shows validation errors properly
2876 *verify.h: fixed the contant that should be used for verification errors
2878 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2880 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
2881 for bug #77596, 81858 and 80743 (generics data structures on domain
2884 2007-06-15 Raja R Harinath <rharinath@novell.com>
2886 Avoid allocating 'MonoGenericContext' on the heap.
2887 * class-internals (_MonoMethodInflated::context): Make field
2888 inline, not a pointer.
2889 * loader.c (method_from_methodspec): Allocate 'new_context' on the
2890 stack. Use the context embedded within the inflated method as the
2891 hash key, rather than 'new_context'.
2892 * class.c (inflate_generic_context): Simplify. Return a struct
2893 rather than allocating on the heap.
2894 (mono_class_inflate_generic_method_full): Update to changes. Now,
2895 doesn't salt away a copy of the context -- simplifying the
2896 lifetime rules of a 'MonoGenericContext *'.
2897 (mono_method_get_context): Return pointer to embedded context.
2898 (setup_generic_array_ifaces): Allocate temporary context on stack.
2899 * reflection.c (inflate_mono_method): Likewise.
2900 (mono_reflection_bind_generic_method_parameters): Likewise.
2901 Use the context embedded within the inflated method as the hash key.
2903 Avoid a source of allocation of 'MonoGenericContext'.
2904 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
2905 and 'cached_context' fields into embedded 'MonoGenericContext' field.
2906 * class.c: Update to changes.
2907 (mono_generic_class_get_context): Simplify drastically. Now just
2908 returns a pointer to the field.
2909 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
2910 argument as a const pointer.
2911 (mono_metadata_generic_context_equal): Likewise.
2912 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
2915 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
2917 * verify.c improved the handling of brtrue/brfalse, factored out common code
2919 2007-06-14 Raja R Harinath <rharinath@novell.com>
2921 Kill MonoGenericMethod.
2922 * class-internals.h (MonoGenericContext::method_inst): Rename from
2923 'gmethod' and convert to a MonoGenericInst.
2924 (MonoGenericMethod): Remove.
2925 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
2926 * loader.c (method_from_methodspec): Update to changes. Use a
2927 MonoGenericContext as the key to the hashtable.
2928 * metadata.c (mono_metadata_generic_context_equal): Rename from
2929 'mono_metadata_generic_method_equal' and take MonoGenericContext.
2930 (mono_metadata_generic_context_hash): Likewise from
2931 'mono_metadata_generic_method_hash'. Change hash function.
2932 (mono_metadata_load_generic_params): Update to changes.
2933 (mono_get_shared_generic_method): Remove.
2934 * metadata-internals.h (mono_get_shared_generic_method): Remove.
2935 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
2936 (inflate_generic_context): Likewise.
2937 (mono_class_inflate_generic_method_full): Likewise.
2938 (setup_generic_array_ifaces): Likewise.
2939 (mono_class_create_from_typespec): Likewise.
2940 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
2941 (method_encode_methodspec): Update callsite.
2942 (reflection_methodbuilder_to_mono_method): Update to changes.
2943 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
2944 MonoGenericContext as the key to the hashtable.
2945 (inflate_mono_method): Update to changes.
2947 * class-internals.h (MonoGenericMethod::container): Remove.
2948 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
2950 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2952 * profiler-private.h, profiler.c, profiler.h: added API to profile
2955 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
2957 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
2959 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
2961 * verify.c: method invocation is now validated, now we verify parameter types on stack.
2962 Fixed overflow and underflow not aborting the verification process.
2964 2007-06-13 Mark Probst <mark.probst@gmail.com>
2966 * class-internals.h (MonoStats): Added stats entries for dynamic
2969 2007-06-12 Zoltan Varga <vargaz@gmail.com>
2971 * loader.c (mono_free_method): Free header->locals and header->clauses.
2973 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
2976 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
2978 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
2980 2007-06-12 Raja R Harinath <rharinath@novell.com>
2982 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
2985 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
2987 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
2989 2007-06-11 Raja R Harinath <harinath@gmail.com>
2991 MonoGenericMethod on a diet
2992 * class-internals.h (_MonoMethodInflated::reflection_info): Move
2994 (_MonoGenericMethod::reflection_info): ... from here.
2995 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
2997 * reflection.c (inflate_mono_method): Likewise.
2998 (mono_reflection_bind_generic_method_parameters): Likewise.
3000 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
3002 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
3003 *verify.c: factored long ldarg forms to share code with short forms
3005 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
3007 *verify.c: fixed code formating factored some duplicate code
3010 *verify.h: fixed binary incompatibility introduced earlier
3012 *pedump.c: fixed formating
3014 2007-06-11 Raja R Harinath <harinath@gmail.com>
3016 Fix assertion when disassembling Mono.C5.dll
3017 * loader.c (method_from_methodspec): Avoid inflating a method
3018 twice with the same context. If the methodref is inflated, use
3019 the declaring method instead.
3021 * class.c (mono_class_from_generic_parameter): Fix case similar to
3022 bug #81830 handled below, but for method containers.
3024 2007-06-10 Raja R Harinath <harinath@gmail.com>
3026 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
3027 get_shared_generic_class. Directly inflate the instance.
3028 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
3029 (inflate_generic_class): Delete.
3030 (get_shared_generic_class): Delete. Move setting of
3031 'cached_class' and 'cached_context' ...
3032 * metadata.c (mono_metadata_lookup_generic_class): ... here.
3034 * metadata.c (mono_metadata_lookup_generic_class): Change
3035 signature to take the components of a MonoGenericClass rather than
3036 an allocated MonoGenericClass. Change semantics to be intern-like.
3037 * reflection.c (mono_class_bind_generic_parameters): Update to
3038 changes. Make locking region tighter.
3039 * class.c (inflate_generic_class): Update to changes.
3040 (get_shared_generic_class): Likewise.
3041 * metadata-internals.h: Likewise.
3043 * reflection.c (mono_class_bind_generic_parameters): Take and
3044 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
3045 (mono_reflection_bind_generic_parameters): Use
3046 'mono_class_bind_generic_parameters' rather than duplicate the code.
3047 * class.c (mono_bounded_array_class_get): Update to changes.
3048 * object-internals.h: Likewise.
3050 * reflection.c (mono_class_bind_generic_parameters): Only support
3051 parameterizing generic type definitions. Remove support for other
3054 2007-06-08 Zoltan Varga <vargaz@gmail.com>
3056 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
3058 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
3059 in the dynamic case.
3061 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
3063 * threads.c: When cleaning up thread, reset the Background bit.
3066 2007-06-08 Jonathan Chambers <joncham@gmail.com>
3068 * metadata.c: Move variable declarations to top of scope.
3069 * verify.c: Move variable declarations to top of scope.
3071 Code is contributed under MIT/X11 license.
3073 2007-06-08 Raja R Harinath <rharinath@novell.com>
3075 * reflection.c (mono_class_bind_generic_parameters): Replace
3076 open-coded loop with mono_metadata_inflate_generic_inst.
3078 * class.c (get_shared_generic_class): Don't call
3079 mono_get_shared_generic_inst. Use the container's own
3082 * metadata.c (mono_metadata_load_generic_params): Move
3083 initialization of 'context' field here from ...
3084 * class.c (mono_class_create_from_typedef): ... here, and ...
3085 * loader.c (mono_get_method_from_token): ... here.
3087 * class.c (get_shared_generic_class): Rename from
3088 mono_get_shared_generic_class and make static.
3089 (mono_get_shared_generic_inst): Move to metadata.c.
3090 * loader.c (mono_get_shared_generic_method): Likewise.
3091 * class-internals.h, metadata-internals.h: Update to changes.
3094 * class.c (mono_class_from_generic_parameter): Don't assume a
3095 generic container owner exists. Generic containers from monodis
3098 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
3100 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
3101 * verify.h: new typedefs to returns the non-verifiable status
3102 * verify.c: initial implementation of generics, stack merging and object compatibility check
3104 2007-06-06 Mark Probst <mark.probst@gmail.com>
3106 * class.c, image.c, class-internals.h (MonoImage): class_cache is
3107 a MonoInternalHashTable again (fixed bug in internal hash table
3110 2007-06-06 Mark Probst <mark.probst@gmail.com>
3112 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
3113 MonoInternalHashTable again (fixed bug in internal hash table
3116 2007-06-06 Mark Probst <mark.probst@gmail.com>
3118 * class.c, image.c, class-internals.h, domain.c,
3119 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
3120 changes. Have to figure out what makes them break the SWF
3123 2007-06-04 Mark Probst <mark.probst@gmail.com>
3125 * class.c, image.c, class-internals.h (MonoImage): class_cache is
3126 a MonoInternalHashTable now.
3128 2007-06-04 Mark Probst <mark.probst@gmail.com>
3130 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
3131 MonoInternalHashTable now.
3133 2007-05-31 Zoltan Varga <vargaz@gmail.com>
3135 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
3138 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
3140 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
3141 dependent trampoline.
3143 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3145 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
3147 2007-05-29 Robert Jordan <robertj@gmx.net>
3149 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
3151 2007-05-28 Zoltan Varga <vargaz@gmail.com>
3153 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
3155 2007-05-25 Jonathan Chambers <joncham@gmail.com>
3157 * marshal.c: Fix interface lookup loops for
3158 cominterop_get_com_slot_for_method and
3159 cominterop_get_method_interface. Only need to lookup
3160 if type is a class, else use interface type method is on.
3162 Code is contributed under MIT/X11 license.
3164 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
3166 * reflection.c: HasSecurity can be present even if no specially
3167 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
3168 SecurityAttribute). Fix CAS regression tests on buildbot.
3170 2007-05-24 Jonathan Chambers <joncham@gmail.com>
3172 * appdomain.c: Add configure checks for header files.
3173 * image.c: Add configure checks for header files.
3174 * file-io.c: Add configure checks for header files.
3175 * debug-mono-symfile.c: Add configure checks for header files.
3176 * threadpool.c: Add configure checks for header files.
3177 * console-io.c: Add configure checks for header files.
3178 * profiler.c: Add configure checks for header files.
3179 * rawbuffer.c: Add configure checks for header files.
3180 * icall.c: Add configure checks for header files.
3181 * rand.c: Add configure checks for header files.
3182 * socket-io.c: Add configure checks for header files.
3184 Code is contributed under MIT/X11 license.
3186 2007-05-24 Zoltan Varga <vargaz@gmail.com>
3188 * reflection.c (mono_custom_attrs_from_builders): Remove the
3189 assertion as it breaks the build.
3191 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
3193 * reflection.c (lookup_custom_attr): Make a copy here too.
3195 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
3198 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
3201 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
3204 2007-05-22 Zoltan Varga <vargaz@gmail.com>
3206 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
3207 (load_cattr_value): Ditto.
3209 2007-05-20 Zoltan Varga <vargaz@gmail.com>
3211 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
3213 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
3215 * threads.c: In "start_wrapper", set apartment_state to MTA if
3216 apartment_state is Unknown and we're running on 2.0 profile or
3218 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
3219 to main method, then set apartment_state to Unknown on 1.0 profile,
3220 and MTA on 2.0 profile.
3222 2007-05-16 Jb Evain <jb@nurv.fr>
3224 * class-internals.h (MonoDefaults): Add an attribute_class and
3225 customattribute_data_class.
3226 * domain.c (mono_init_internal): Populate them.
3227 * reflection.c: Use them to remove duplicates. Make a vew
3228 MonoClass variables `static'.
3230 2007-05-15 Massimiliano Mantione <massi@ximian.com>
3232 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
3233 step in implementing IMT, so that all isinst checks now can go
3235 This was needed because vtables for TransparentProxy need to look
3236 like the vtable of the "target" class, so they need to point to
3237 its interface bitmap directly.
3239 * object.c: inside "mono_class_create_runtime_vtable" and
3240 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
3242 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
3244 * object-internals.h
3245 culture-info.h : added territory field in MonoCulture and
3246 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
3247 * locales.c : fill territory field above too.
3248 * culture-info-table.h : regenerated.
3250 2007-05-12 Zoltan Varga <vargaz@gmail.com>
3252 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
3255 2007-05-11 Jonathan Chambers <joncham@gmail.com>
3257 * object.c: Always initialize apartment, even if
3258 there is no custom attributes on entry point.
3260 Code is contributed under MIT/X11 license.
3262 2007-05-10 Jonathan Chambers <joncham@gmail.com>
3264 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
3265 * metadata.c: If no encoding is set, check for unicode
3268 Code is contributed under MIT/X11 license.
3270 2007-05-09 Jonathan Chambers <joncham@gmail.com>
3272 * threads.c: Handle if mono_thread_current returns NULL
3274 Code is contributed under MIT/X11 license.
3276 2007-05-09 Jonathan Chambers <joncham@gmail.com>
3278 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
3279 in start_wrapper. Added mono_thread_init_apartment_state and
3280 mono_thread_cleanup_apartment_state.
3281 * object.c: Initialize thread apartment state on main thread
3282 by checking for STAThreadAttribute on entry point.
3283 * object-internals.h: Add apartment_state field to MonoThread.
3284 * threads-types.h: Add unmanaged definition of
3285 System.Threading.ApartmentState, MonoThreadApartmentState.
3287 Code is contributed under MIT/X11 license.
3289 2007-05-08 Jonathan Chambers <joncham@gmail.com>
3291 * class.c: Fix windows build.
3292 * class-internals.h: Fix windows build.
3294 Code is contributed under MIT/X11 license.
3296 2007-05-08 Robert Jordan <robertj@gmx.net>
3298 * process.c (CreateProcess_internal):
3299 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
3300 .CreateNoWindow was specified. Fixes #81496.
3302 2007-05-08 Massimiliano Mantione <massi@ximian.com>
3304 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
3305 step in implementing IMT, replaced it with two compact arrays
3306 (interfaces_packed and interface_offsets_packed) and a bitmap that
3307 is used for isinst checks (interface_bitmap).
3309 * class.c: (compare_interface_ids): compare function to pass to
3310 bsearch when looking for an interface with a given id.
3311 (mono_class_interface_offset): reimplemented using bsearch on
3312 interfaces_packed, getting the offset from interface_offsets_packed.
3313 (print_implemented_interfaces): utility debugging function.
3314 (setup_interface_offsets): reworked to initialize interfaces_packed,
3315 interface_offsets_packed and interface_bitmap.
3317 * object.c: replaced all accesses to "MonoClass.interface_offsets"
3318 with uses of interfaces_packed and interface_offsets_packed.
3320 2007-05-08 Massimiliano Mantione <massi@ximian.com>
3322 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
3323 mono_class_interface_offset prototype to wrap all accesses to
3324 "MonoClass.interface_offsets".
3326 * class.c: Implemented mono_class_interface_offset, and wrapped all
3327 accesses to "MonoClass.interface_offsets".
3329 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
3330 "MonoClass.interface_offsets".
3332 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
3334 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
3335 GetMethodFromHandle overloads (bug #78637).
3337 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3339 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
3340 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
3342 2007-05-01 Zoltan Varga <vargaz@gmail.com>
3344 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
3347 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
3349 (mono_custom_attrs_from_index): Ditto.
3351 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
3354 2007-04-30 Zoltan Varga <vargaz@gmail.com>
3356 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
3357 is now allocated from a mempool.
3359 2007-04-28 Zoltan Varga <vargaz@gmail.com>
3361 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
3362 caller holds threads_lock, leading to deadlocks. Fixes #81476.
3364 2007-04-26 Zoltan Varga <vargaz@gmail.com>
3366 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
3367 mono_loader_clear_error () too late. Fixes #81463.
3369 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
3371 * culture-info-table.h : regenerated.
3373 2007-04-25 Zoltan Varga <vargaz@gmail.com>
3375 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
3378 2007-04-25 Dick Porter <dick@ximian.com>
3380 * Makefile.am: Put the mingw enforced-optimisation back into the
3381 PLATFORM_WIN32 section.
3383 2007-04-24 Zoltan Varga <vargaz@gmail.com>
3385 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
3388 * image.c (mono_image_load_module): New API function to load a module reference.
3390 * image.c (load_modules): Load modules lazily. Fixes #80812.
3392 * class.c (mono_class_from_typeref): Use mono_image_load_module.
3394 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
3396 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
3397 to mono_image_load_module_dynamic.
3399 2007-04-23 Jonathan Chambers <joncham@gmail.com>
3401 * marshal.c: Fix calling convention for CCW on non-windows
3402 platforms. STDCALL on windows, CDECL everywhere else to work
3403 with XPCOM and MainWin COM.
3405 Code is contributed under MIT/X11 license.
3407 2007-04-23 Martin Baulig <martin@ximian.com>
3412 (method_from_memberref): Added `gboolean *used_context' argument.
3413 (mono_get_method_from_token): Likewise.
3414 (mono_get_method_full): Don't insert the method in the cache when
3415 `used_context' is true.
3417 2007-04-23 Raja R Harinath <rharinath@novell.com>
3419 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
3421 * reflection.c (mono_reflection_bind_generic_parameters): Don't
3422 create new MonoTypes for returned types.
3423 * class.c (mono_generic_class_get_class): Export mono-internal.
3424 * class-internals.h: Update to changes.
3426 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
3428 * threadpool.c, threadpool.h, icall-def.h: patch from
3429 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
3431 2007-04-18 Zoltan Varga <vargaz@gmail.com>
3433 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
3435 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
3437 * threads.c (mono_thread_get_stack_bounds): New helper function.
3439 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
3440 Correctly compute stack bounds when attaching. Fixes #81394.
3442 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
3444 * reflection.c: fix handling of doubles in custom attributes
3445 for the arm-fpa format (bug #81368).
3447 2007-04-18 Raja R Harinath <rharinath@novell.com>
3449 * reflection.c (assembly_add_win32_resources): Mildly relax an
3450 bounds check to let the end pointer point just past the end of the
3451 allocated buffer. (may fix #81384)
3453 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
3455 * culture-info-table.h : regenerated.
3457 2007-04-07 Zoltan Varga <vargaz@gmail.com>
3459 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
3460 the thread is aborted early.
3462 2007-04-05 Dick Porter <dick@ximian.com>
3464 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
3465 FindFirstFile()/FindNextFile() to find entries. This lets the
3466 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
3469 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
3471 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
3473 2007-04-04 Martin Baulig <martin@ximian.com>
3476 (mono_method_desc_full_match): Add support for nested classes.
3478 2007-04-02 Zoltan Varga <vargaz@gmail.com>
3480 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
3482 2007-04-01 Zoltan Varga <vargaz@gmail.com>
3484 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
3485 waiting for too many threads.
3487 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
3489 * environment.c: Fix return value check on uname so we can get the
3490 executing version on Solaris operating systems.
3492 2007-03-28 Jb Evain <jbevain@gmail.com>
3494 * class.c (mono_type_get_name_recurse): Complete the
3495 fix for the creation of assembly qualified names for
3496 pointer types. Fixes #81208.
3498 2007-03-27 Dick Porter <dick@ximian.com>
3500 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
3501 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
3505 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
3506 the value of ReleaseMutex().
3508 2007-03-27 Dick Porter <dick@ximian.com>
3510 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
3511 in little-endian order, not network endian, so must be converted
3512 to host endian here. Fixes bug 80593.
3514 2007-03-22 Jb Evain <jbevain@gmail.com>
3516 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
3517 qualified names for pointer types. Fixes #81208.
3519 2007-03-21 Jonathan Chambers <joncham@gmail.com>
3521 * marshal.c: Add support for PreserveSigAttribute.
3523 Code is contributed under MIT/X11 license.
3525 2007-03-14 Zoltan Varga <vargaz@gmail.com>
3527 * process.c: Fix endianness issues. Fixes #81126.
3529 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
3530 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
3532 * image.c (mono_image_lookup_resource): Make this work on big-endian
3533 machines.Change API contract so the caller needs to free the return value.
3535 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
3538 2007-03-14 Martin Baulig <martin@ximian.com>
3540 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
3541 mono_type_get_desc() as well.
3543 2007-03-13 Jonathan Chambers <joncham@gmail.com>
3545 * icall.c: Fix environ access in VS.
3547 2007-03-13 Alp Toker <alp@atoker.com>
3549 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
3550 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
3553 2007-03-12 Zoltan Varga <vargaz@gmail.com>
3555 * reflection.c (mono_reflection_create_dynamic_method): Add support for
3556 circular references among dynamic methods. Fixes #81091.
3558 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
3560 2007-03-09 Martin Baulig <martin@ximian.com>
3562 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
3564 2007-03-09 Jonathan Chambers <joncham@gmail.com>
3566 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
3567 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
3569 Code is contributed under MIT/X11 license.
3571 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
3573 * loader.c: Reapply patch for bug #79424.
3575 2007-03-06 Zoltan Varga <vargaz@gmail.com>
3577 * metadata.c (mono_type_to_unmanaged): Only convert object to
3578 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
3580 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
3582 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
3583 (and incorrectly set) is_reference field from MonoGenericInst.
3585 2007-03-06 Zoltan Varga <vargaz@gmail.com>
3587 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
3590 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
3592 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
3594 2007-03-05 Miguel de Icaza <miguel@novell.com>
3596 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
3597 FileOptions.1 value to mean "temporary", map that to
3598 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
3602 2007-03-03 Marek Habersack <mhabersack@novell.com>
3604 * appdomain.c: implement MS .Net style shadow copying. Copies of
3605 the assemblies are made in a subdirectory of the dynamic base
3606 directory, the assembly names are preserved.
3607 Copy .mdb and .config files along with the assemblies being shadowed.
3609 2007-02-28 Zoltan Varga <vargaz@gmail.com>
3611 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
3612 (emit_marshal_handleref): Ditto.
3614 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
3615 on Visual C++. Fixes #80671.
3617 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3619 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
3620 for clone operations.
3622 2007-02-28 Zoltan Varga <vargaz@gmail.com>
3624 * marshal.c: Fix warnings.
3626 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
3628 * loader.c: allow case-insensitive matching of the dll name
3629 in dllmap handling when prefixed with "i:".
3631 2007-02-20 Jonathan Chambers <joncham@gmail.com>
3633 * threads.c: Fix #ifdef for dummy_apc function for VS.
3635 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3637 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
3639 2007-02-19 Massimiliano Mantione <massi@ximian.com>
3640 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
3641 giving precedence to the methods with a fully qualified name
3642 (InterfaceName.MethodName) when building the interface sections
3645 2007-02-16 Dick Porter <dick@ximian.com>
3647 * threadpool.c (append_job): Fix fast-path array handling, so it's
3648 less likely the array will grow exponentially when the load is
3651 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3653 * metadata-internals.h, loader.c: fix dllmap lookup order
3654 for non-function maps, too, and prepare for fallback code.
3656 2007-02-12 Robert Jordan <robertj@gmx.net>
3658 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
3659 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
3660 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
3661 GlobalFree. Fixes a part of bug #77075.
3663 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
3665 * loader.c: implemented typedef parent in field memberref.
3667 2007-02-11 Jonathan Chambers <joncham@gmail.com>
3669 * marshal.c: Fix warnings and remember to call Release on
3672 Code is contributed under MIT/X11 license.
3674 2007-02-10 Miguel de Icaza <miguel@novell.com>
3676 * class-internals.h: Add MonoHandleRef definition, and
3677 handleref_class to mono_defaults.
3679 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
3680 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
3682 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
3683 (do nothing on this stage)
3684 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
3685 (emit_marshal_handleref): New method, used for argument handling
3688 2007-02-08 Jonathan Chambers <joncham@gmail.com>
3690 * class.c (mono_class_setup_parent): Lazily init com types.
3691 * domain.c (mono_init_internal, mono_init_com_types): Lazily
3693 * object.c (mono_remote_class_vtable): Lazily init com types.
3694 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
3695 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
3696 * domain-internals.h: Expose mono_init_com_types.
3697 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
3698 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
3699 Add support for COM Callable Wrapper marshalling.
3700 * marshal.h: Add icall definitions.
3701 * gc.c: Handle freeing of CCWs in finalizer code.
3703 Code is contributed under MIT/X11 license.
3705 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
3707 * reflection.c: changed all the signature encoding code to use
3708 a variable-sized buffer.
3710 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3712 * marshal.c: locking fixes: never take the loader lock
3713 or other runtime locks when holding the marshal lock
3716 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
3718 * marshal.c: make the delegate function pointer mapping
3719 work for the moving GC.
3721 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
3723 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
3726 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3728 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
3731 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3733 * threadpool.c: made the code moving-GC safe.
3735 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
3737 * assembly.c, boehm-gc.c, class-internals.h, class.c,
3738 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
3739 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
3741 * reflection.c: warning cleanup, some threading and moving GC fixes.
3743 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
3745 * class.c, loader.c: create the needed Set/Get/Address array methods
3746 as well as the .ctors in mono_class_init (), fixes bug #80567.
3748 2007-01-24 Zoltan Varga <vargaz@gmail.com>
3750 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
3751 we doesn't decrease its alignment. Should fix the sparc build.
3753 2007-01-24 Dick Porter <dick@ximian.com>
3756 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3757 Create the returned object if we need to ignore an unsupported
3758 socket option. Fixes a segfault reported by Atsushi.
3760 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3762 * class.c, object.c: restrict GC-tracked fields to
3763 UIntPtr fields used inside corlib, so we provide better
3764 type info to the GC and also allow broken packing as in
3767 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
3769 * sgen-gc.c: removed duplicated function.
3771 2007-01-19 Miguel de Icaza <miguel@novell.com>
3773 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
3774 value that means that the value is not supported, but that we
3775 should not return a failure, but instead report this as a
3776 successful operation.
3778 2007-01-19 Raja R Harinath <rharinath@novell.com>
3780 Fix tests/bug79956.2.il
3781 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
3782 (mono_generic_class_get_class): If the generic definition in an
3783 enum, copy over other fields related to it.
3785 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3787 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
3788 genericinst enums (bug #79215).
3790 2007-01-17 Massimiliano Mantione <massi@ximian.com>
3791 * class.c: Fix bug 80307.
3793 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
3795 * image.c: if the file table is not present, try to load
3796 all the modules, since we don't have info about them
3797 having or not metadata (bug #80517).
3798 * assembly.c: allow mono_assembly_load_references () to
3799 work for netmodules.
3801 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3803 * image.c, metadata-internals.h, object.c: execute module
3804 cctors when running on the 2 runtime if present (bug #80487).
3806 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
3808 * icall.c: optimized InitializeArray() on bigendian.
3810 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
3812 * icall.c: fix for the broken ARM FPA double format.
3814 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3816 * icall.c: handle endian issues for r4 and r8 types, too, in
3817 the InitializeArray() icall.
3819 2007-01-15 Miguel de Icaza <miguel@novell.com>
3821 * loader.c (mono_loader_error_prepare_exception): Clear the error
3822 once we have extracted the information from it, do this before we
3823 call into the JIT's class loading mechanisms.
3825 * object.c (mono_class_create_runtime_vtable): Do not clear the
3826 loader error before calling mono_class_get_exception_for_failure
3827 as the loader error is needed inside
3828 mono_class_get_exception_for_failure to throw the error (thinko).
3832 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3834 * reflection.c: align fields rva data so it's faster to load at
3837 2007-01-12 Raja R Harinath <rharinath@novell.com>
3839 Prepare to simplify GenericMethod handling.
3840 * class-internals.h (mono_method_get_context): New accessor function.
3841 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
3842 rather than directly accessing '->context' field.
3844 * class-internals.h (_MonoGenericParam.method): Move ...
3845 (_MonoGenericContainer): ... here. Add into union with klass field.
3846 * class.c, icall.c, loader.c, metadata.c, reflection.c:
3849 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
3851 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
3852 the wrapper type enum and reduce relocations.
3854 2007-01-12 Raja R Harinath <rharinath@novell.com>
3856 * reflection.c (inflate_mono_method): Reuse method instantiation
3857 from the generic method, if available.
3859 2007-01-11 Jonathan Chambers <joncham@gmail.com>
3861 * marshal.c (emit_marshal_variant): Fix conv_arg
3862 type in last commit, based on whether parameter is byref.
3864 2007-01-11 Jonathan Chambers <joncham@gmail.com>
3866 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
3868 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
3869 MONO_TYPE_OBJECT back for VARIANT support.
3871 2007-01-11 Jonathan Chambers <joncham@gmail.com>
3873 * marshal.c, marshal.h, icall-def.h: Implement
3874 Marshal.ReAllocCoTaskMem.
3876 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
3878 * marshal.c: memory retention fixes: use the proper
3879 image cache for runtime_invoke method lookups.
3881 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3883 * mempool.c: added code to help debug mempool allocations.
3885 2007-01-11 Dick Porter <dick@ximian.com>
3887 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
3888 support (experimenting with faking it with IP_MTU_DISCOVER for
3889 systems that don't have IP_DONTFRAGMENT.)
3890 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
3893 * icall-def.h: new System.Net.Sockets.Disconnect icall.
3895 * socket-io.h: Add new fields to MonoSocketAsyncResult
3896 corresponding to the new ones in Socket.cs.
3898 2007-01-11 Raja R Harinath <rharinath@novell.com>
3900 Fix IronPython regression mentioned in #80249
3901 * metadata.c (do_mono_metadata_parse_generic_class): Clear
3902 'cached_context' field, since it may have been initialized as a
3903 side-effect of metadata parsing.
3905 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
3906 (_MonoGenericClass.cached_class): Move here and rename from lone
3907 remaining field of ...
3908 (_MonoInflatedGenericClass): ... this. Remove.
3909 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
3912 Fix mcs/tests/test-128.cs regression.
3913 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
3914 2007-01-10 change below.
3915 [MONO_TYPE_OBJECT]: Recurse into array case.
3917 2007-01-11 Raja R Harinath <harinath@gmail.com>
3919 * class-internals.h (mono_get_inflated_generic_class): Remove.
3920 * class.c (mono_get_inflated_generic_class): Remove.
3921 (mono_generic_class_get_class): Rename from
3922 mono_class_create_generic.
3923 (mono_class_from_mono_type) [GENERICINST]: Use it.
3924 * reflection.c, metadata.c: Update to changes. Use
3925 'mono_class_from_mono_type'.
3927 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3929 * reflection.c: use passed type when encoding an array element
3930 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
3932 2007-01-09 Robert Jordan <robertj@gmx.net>
3934 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
3935 result arguments (someDelegate.EndInvoke (unrelatedAres)).
3938 2007-01-09 Raja R Harinath <rharinath@novell.com>
3940 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
3942 * object.c (set_value): Avoid aliasing between type->data.klass
3943 and type->data.generic_class.
3945 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
3947 2007-01-08 Raja R Harinath <rharinath@novell.com>
3949 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
3950 between type->data.klass and type->data.generic_class.
3952 2007-01-08 Lluis Sanchez <lluis@ximian.com>
3954 * marshal.c: In MS.NET, StringBuilder objects are not copied by
3955 value in out parameters.
3957 2007-01-08 Raja R Harinath <rharinath@novell.com>
3959 Simplify invariant for MonoGenericClass::klass field.
3960 * class.c (mono_class_create_generic): Verify 'klass' is null.
3961 * metadata.c (do_mono_metadata_parse_generic_class): Don't
3962 initialize 'klass' field.
3964 2007-01-05 Raja R Harinath <rharinath@novell.com>
3966 Ongoing work to avoid redundant data and simplify invariants.
3967 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
3968 'generic_class', and change type to a GenericInst.
3969 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
3970 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
3972 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
3974 * class.c : skip io-layer under PLATFORM_WIN32.
3976 2007-01-03 Tor Lillqvist <tml@novell.com>
3978 Fix #80305: In a bundled executable, look in the bundled exe
3979 assembly to determine the runtime version. Add the possibility to
3980 bundle also the machine.config file.
3982 * assembly.c (mono_assembly_open_from_bundle): Make
3983 non-static. Allow being called even if we have no bundled
3984 assemblies, and return NULL right away in that case.
3986 * domain-internals.h: Declare mono_assembly_open_from_bundle()
3989 * domain.c (app_config_parse): Take an assembly exe file name as
3990 parameter instead of a config file name. Check for a bundled
3991 config file for that assembly by calling
3992 mono_config_string_for_assembly_file() (see below) before looking
3993 for one in the file system.
3994 (get_runtimes_from_exe): Corrsponding change to call of
3996 (get_runtimes_from_exe): Check for bundled assembly exe file first
3997 by calling mono_assembly_open_from_bundle(). If no bundled
3998 assembly exe file is found, call mono_image_open() as before to
3999 look it up in the file system.
4001 * mono-config.c: Add variable bundled_machinec_onfig.
4002 (mono_config_string_for_assembly_file): New function.
4003 (mono_config_for_assembly): Move code snippet that looks for a
4004 bundled assembly .config file into the above new function. Call
4006 (mono_register_machine_config, mono_get_machine_config): New
4007 functions to set and retrieve
4009 * assembly.h: Declare mono_register_machine_config().
4011 * mono-config.h: Declare mono_get_machine_config() and
4012 mono_config_string_for_assembly_file().
4014 * icall.c: No declaration of environ necessary on Win32. It is
4015 declared (as a macro expanding to a function call) in stdlib.h.
4016 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
4017 New internal mono function. Returns the value of
4018 mono_get_machine_config() as a Mono string.
4020 * icall-def.h: Add get_bundled_machine_config().
4022 2007-01-04 Raja R Harinath <rharinath@novell.com>
4024 Remove redundant field
4025 * class-internals.h (_MonoGenericContext.container): Remove field.
4026 * loader.c (mono_method_get_signature_full): Don't parse a
4027 "container" for a signature parse when the signature is inflated
4029 (method_from_methodspec): Likewise, for a generic_inst.
4030 * class.c, metadata.c, reflection.c: Update to changes.
4032 2006-01-04 Raja R Harinath <rharinath@novell.com>
4034 * class-internals.h (_MonoGenericClass): Rename 'context' field to
4035 'cached_context', and change semantics -- it starts off NULL, and
4036 is initialized on demand.
4037 * class.c (mono_generic_class_get_context): New accessor to
4038 replace 'context' field accesses.
4039 (mono_class_get_context): New helper.
4040 (*): Update to changes.
4041 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
4043 2007-01-03 Miguel de Icaza <miguel@novell.com>
4045 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
4046 before the memcpy. Fixes Marshal2 regression.
4048 2007-01-02 Jb Evain <jbevain@gmail.com>
4050 * blob.h: add a MONO_TYPE_ENUM definition
4051 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
4052 fix the encoding of arrays of enums in custom attributes.
4056 2007-01-01 Miguel de Icaza <miguel@novell.com>
4058 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
4059 string is null terminated, but only cut the string short if it
4060 overflows the buffer.
4062 (mono_string_to_byvalstr): Also fix this routine. The code here
4063 was not properly terminating a string (it was only terminated
4064 because of the previous catch-all memset).
4066 I left the memset, because I do not know if applications expect
4067 the runtime to clear this region.
4071 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4072 Clear the error before returning to unmanaged code to prevent the
4073 runtime from being confused later on (fixes 80420).
4074 (ves_icall_type_from_name): Always call mono_loader_clear_error
4075 after parsing a type that could have failed.
4076 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
4078 * loader.c (mono_loader_clear_error): Fix indentation.
4080 2006-12-28 Martin Baulig <martin@ximian.com>
4082 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
4084 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
4086 * reflection.c: patch from Rolf Bjarne Kvinge to fix
4087 getting a token for an EnumBuilder.
4089 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
4091 * reflection.c: be more careful in case resource generation
4092 fails to create the data array.
4094 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
4096 * sgen-gc.c: write barrier for clone and fix unregister handles.
4098 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4100 * reflection.c: some fixes needed in the generics code for the moving GC.
4102 2006-12-22 Robert Jordan <robertj@gmx.net>
4104 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
4105 account. Fixes bug #80299.
4107 2006-12-21 Raja R Harinath <rharinath@novell.com>
4109 Fix WaitHandle usage in delegates.
4110 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
4111 * object.c (mono_wait_handle_new): Use the property set method to
4112 initialize the handle.
4113 (mono_wait_handle_get_handle): New.
4114 * threadpool.c (mono_async_invoke): Use it.
4115 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
4117 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
4119 2006-12-21 Jonathan Chambers <joncham@gmail.com>
4121 * marshal.c (emit_marshal): Call emit_marshal_variant and
4122 emit_marshal_com_interface when applicable.
4123 (emit_marshal_variant, emit_marshal_com_interface): Add
4124 methods for this case and remove if's from emit_marshal_object.
4126 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
4128 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
4130 2006-12-19 Jonathan Chambers <joncham@gmail.com>
4132 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
4133 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
4134 and GlobalFree on Windows. Remove FIXME.
4136 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4138 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
4139 implementation for managed objects.
4141 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4143 * object.c: implemented code to be used for checking
4144 that no reference field overlaps with non-references.
4146 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4148 * threadpool.c: fix queue code to be compatible with the
4151 2006-12-18 Miguel de Icaza <miguel@novell.com>
4153 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
4154 in structures by throwing ArgumentNullException.
4156 (emit_marshal_safehandle): Also when they are null parameters.
4158 (emit_marshal_safehandle): Add support for ref
4159 SafeHandles parameters
4161 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4163 * profiler.c: updated to use the mono-dl API instead of
4166 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4168 * profiler.c: updated to use the mono-dl dynamic loading
4169 API instead of gmodule.
4171 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
4173 * profiler.c: use readlink, older versions of glib don't have
4174 g_file_read_link ().
4176 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4178 * profiler.c: try to detect the path to mono if libc fails to provide
4179 a useful name (bug #80286).
4181 2006-12-16 Raja R Harinath <rharinath@novell.com>
4184 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
4185 instance, use the generic type definition instead.
4186 (ves_icall_Type_GetNestedTypes): Likewise.
4187 * class.c (mono_class_create_generic): Always set the
4188 nested_classes of a generic instance to NULL, even if the generic
4189 type definition has nested types.
4191 2006-12-15 Jonathan Chambers <joncham@gmail.com>
4193 * marshal.c (mono_string_from_bstr): Revert previous Windows change
4196 2006-12-15 Miguel de Icaza <miguel@novell.com>
4198 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
4199 my arguments were in the wrong order. I also fixed the Windows
4200 version which seems to have had the same issue.
4202 (mono_free_bstr): On Unix, this is g_free.
4203 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
4204 conversions (for the tests in corlib to pass).
4206 2006-12-14 Miguel de Icaza <miguel@novell.com>
4208 * marshal.c (emit_ptr_to_object_conv): For now, ignore
4209 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
4210 exception if a ref SafeHandle in a struct has changed).
4212 (emit_struct_conv): Do not perform layout checks for classes
4213 derived from SafeHandle, as those are specially handled.
4215 (emit_object_to_ptr_conv): Add support for
4216 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
4218 (emit_marshal_safehandle): Implement conversion of return values
4219 of safehandles (MARSHAL_ACTION_CONV_RESULT).
4221 * threads.c: WaitHandle now is compiled with two different handles
4222 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
4225 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
4226 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
4227 these routines to cope with both kinds of fields.
4229 2006-12-12 Miguel de Icaza <miguel@novell.com>
4231 * metadata.c (mono_type_to_unmanaged): Handle the case where
4232 type->data.klass is a SafeHandle, and in that case, return the
4233 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
4234 MONO_MARSHAL_CONV_SAFEHANDLE.
4236 2006-12-11 Miguel de Icaza <miguel@novell.com>
4238 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
4239 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
4240 calling emit_marshal_object.
4242 (emit_marshal_safehandle): Implement marshalling of
4243 SafeHandle parameters (no ref support yet).
4245 (MarshalAction): Document the defines as I implement
4246 them for SafeHandle.
4248 (emit_marshal_object): indentation police.
4250 * class-internals.h: Define MonoSafeHandle.
4251 Add safehandle_class to MonoDefaults type.
4253 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
4254 list of classes to check for fields.
4256 * domain.c (mono_init_internal): Add SafeHandle to the list of
4257 mono_defaults loaded.
4259 2006-12-15 Raja R Harinath <rharinath@novell.com>
4262 * reflection.c (mono_reflection_bind_generic_parameters): If the
4263 generic type definition is a type builder, ensure that it is fully
4264 initialized before instantiating it. Kill some dead code.
4266 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
4268 * object.c: clear the loader_error () before loading
4269 more metadata stuff (bug #80258).
4271 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
4273 * icall.c, icall-defs.h: type modifiers icalls for
4274 parameters and properties.
4276 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4278 * object.c, icall.c: fixed warnings.
4280 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4282 * marshal.c: fixed a couple of leaks and coding style in a few places.
4284 2006-12-08 Dick Porter <dick@ximian.com>
4286 * process.c: Cope with NULL ProcessStartInfo arguments on windows
4287 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
4290 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4292 * process.c: ProcessStartInfo may have only filename set and
4293 arguments can be NULL.
4295 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4297 * icall.c: fix leak found by Robert Jordan.
4299 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4301 * marshal.c, marshal.h: generate managed method to access an element
4302 of a multi-dimensional array.
4304 2006-11-30 Paolo Molaro (lupus@ximian.com)
4306 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
4308 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4310 * icall.c: back out GetFields () fix until the serialization code is
4311 fixed to not depend on the incorrect behaviour.
4313 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
4315 * profiler.c: provide defaults if none are set.
4317 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4319 * Makefile.am, attrdefs.h: new public header file with
4320 constants for attributes for use by embedders.
4322 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4324 * icall.c: GetFields () fix for bug #80064.
4326 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
4328 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
4329 removed long unused icalls.
4331 2006-11-27 Jonathan Chambers <joncham@gmail.com>
4334 (mono_marshal_emit_managed_wrapper): Level of indirection for
4335 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
4336 can be generated without a delegate class.
4337 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
4339 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4341 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4343 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
4346 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4348 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
4349 icall-def.h: added icalls needed by System.GC.
4351 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
4353 * loader.c: ensure the class in catch clauses is handled
4354 correctly for generics methods (fixes bug#79980).
4356 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4358 * monitor.h, monitor.c: added mono_locks_dump () function
4359 to help debug deadlocks involving managed locks.
4361 2006-11-13 Dick Porter <dick@ximian.com>
4363 * file-io.c (get_file_attributes): If the file is a symlink try
4364 and get the stat data for the target, but also add the
4365 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
4366 the specs for the windows symlink support, but will probably have
4367 to be reworked when I have test data from a vista machine. Fixes
4370 2006-11-13 Dick Porter <dick@ximian.com>
4372 * gc.c (mono_domain_finalize):
4373 * marshal.c (mono_delegate_begin_invoke):
4374 * threadpool.c (socket_io_init, mono_thread_pool_init)
4375 (mono_thread_pool_finish):
4376 * monitor.c (mono_monitor_try_enter_internal):
4377 * threads.c (mono_thread_resume, mono_thread_init)
4378 (mono_thread_suspend_all_other_threads)
4379 (mono_thread_execute_interruption):
4380 * appdomain.c (mono_domain_unload): Check for NULL error returns
4381 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
4384 2006-11-11 Miguel de Icaza <miguel@novell.com>
4387 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
4388 Only close the handle if the value of the handle is not
4389 INVALID_HANDLE_VALUE. This just makes the process a bit more
4392 Improvement for #75733, so that we do not run into this problem.
4395 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
4396 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
4397 internal variables. Fixes #79462
4400 2006-11-09 Dick Porter <dick@ximian.com>
4402 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4403 Use poll() not select(). Fixes bug 79397.
4405 2006-11-09 Raja R Harinath <rharinath@novell.com>
4408 * assembly.c (mono_assembly_load_from_full): Check that the given
4409 image has an assembly manifest.
4411 2006-11-09 Ankit Jain <jankit@novell.com>
4413 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
4414 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
4415 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
4417 2006-11-07 Dick Porter <dick@ximian.com>
4419 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4420 Put the old resolver behaviour back for pre-2.0 profiles.
4422 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
4424 * threadpool.c: precise GC and locking fixes.
4426 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
4428 * class.c: don't load types that have an explicit unaligned
4429 managed reference. Provide better info in the TypeLoad exception.
4430 Part of the fix for bug #79744.
4431 * object.c: use the correct check for class type load issues.
4433 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4435 * class.c: enforce alignment of fields with managed references
4436 even when Pack=1 is forced by the user (bug #77788).
4438 2006-11-03 Dick Porter <dick@ximian.com>
4440 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4441 If the address reverse lookup fails, return it as the hostname
4442 anyway. Fixes bug 79721.
4444 2006-11-03 Dick Porter <dick@ximian.com>
4446 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
4447 Fix build on Windows.
4449 2006-11-02 Dick Porter <dick@ximian.com>
4452 * object-internals.h:
4453 * exception.c (mono_get_exception_thread_interrupted):
4454 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
4457 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
4458 Check for pending Thread.Interrupt.
4460 2006-10-27 Massimiliano Mantione <massi@ximian.com>
4461 * loader.c: Fixed bug 79684.
4463 2006-10-27 Dick Porter <dick@ximian.com>
4465 * file-io.c (get_file_attributes): Force symlinks to directories
4466 to be returned as a regular file. Fixes bug 79733.
4467 2006-10-26 Dick Porter <dick@ximian.com>
4469 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
4470 CreateFile to open a directory then we need to set the
4471 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
4473 2006-10-23 Zoltan Varga <vargaz@gmail.com>
4475 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
4478 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4480 * sgengc.c: small cleanup of timer code.
4482 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4484 * sgen-gc.c: fix some warnings and start adding support for
4485 complete object removal on domain unload.
4487 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
4489 * assembly.c: build_assembly_name should not consider a version
4490 number without build or revision number invalid. Fixes bug #79715.
4492 2006-10-18 Jonathan Chambers <joncham@gmail.com>
4494 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
4495 call kernel32 function OutputDebugString directly.
4497 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4499 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
4501 * reflection.c: small cleanup, using a function to insert a MonoString
4504 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
4506 * reflection.c: moving GC fixes.
4508 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4510 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
4511 all the objects with finalizers belonging to an unloading appdomain.
4513 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4515 * sgen-gc.c: added ability to allocate even when the nursery is fully
4516 pinned and fixed a couple of bugs.
4518 2006-10-15 Zoltan Varga <vargaz@gmail.com>
4520 * threads.h: Revert the last change for now.
4522 * threads.h (mono_thread_get_pending_exception): Rename this to
4523 mono_thread_get_undeniable_exception ().
4525 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
4527 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
4528 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
4529 when fname does not refer to valid assembly. This result in a more
4530 meaningful error message.
4531 * exception.c: added mono_get_exception_bad_image_format2 which
4532 constructs a BadImageFormatException using the ctor taking a custom
4533 message and the file name. Passing in a NULL msg results in a default
4535 * exception.h: define mono_get_exception_bad_image_format2 function.
4536 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
4537 when file name pointed to an invalid IL image. Use
4538 mono_get_exception_file_not_found2 to construct FileNotFoundException,
4539 as this results in a more meaningful error message.
4541 2006-10-15 Zoltan Varga <vargaz@gmail.com>
4543 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
4546 2006-10-12 Zoltan Varga <vargaz@gmail.com>
4548 * metadata.c (mono_type_size): Change the align parameter to guint32 for
4549 consistency with the other _size functions.
4550 (mono_type_stack_size): Ditto.
4552 * class.c object.c icall.c: Fix warnings caused by the above change.
4554 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
4556 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
4558 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
4560 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
4562 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
4563 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
4564 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
4565 threadpool.h, threads-types.h: mark more internal functions.
4567 2006-10-11 Dick Porter <dick@ximian.com>
4569 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4570 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
4571 reproduce the bug even before applying the fix.)
4573 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
4575 * reflection.c: allow retrieving attributes for arguments in generic
4576 methods (bug #79241).
4578 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
4580 * debug-mono-symfile.c: properly check fopen () result (found by
4583 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
4585 * reflection.c: make error message clearer and fixed two
4586 issuelets found by Coverity.
4588 2006-10-10 Zoltan Varga <vargaz@gmail.com>
4590 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
4592 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
4594 * object-internals.h, gc-internal.h, profiler-private.h:
4595 mark internal functions.
4597 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4599 * reflection.c: put data in the text section.
4600 * icall.c: recognize more types in type_from_typename ().
4601 * process.c, marshal.c: added some GC FIXMEs.
4603 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4605 * loader.c: check for NULL before initializing.
4607 2006-10-09 Zoltan Varga <vargaz@gmail.com>
4609 * gc.c (finalizer_thread): Use a non-alertable wait here.
4611 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
4612 until the correct solution is found.
4614 2006-10-06 Zoltan Varga <vargaz@gmail.com>
4616 * reflection.c (mono_module_get_object): Avoid an assert when operating on
4617 modules with no metadata. Fixes #79596.
4619 * image.c (load_metadata_ptrs): Put back the error message when
4620 the #- heap is encountered since the support is not complete yet.
4622 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4624 * gc.c: do not allow the user to SuppressFinalize () a
4625 delegate because it would leak the trampoline if present.
4627 2006-10-06 Zoltan Varga <vargaz@gmail.com>
4629 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
4632 2006-10-05 Zoltan Varga <vargaz@gmail.com>
4634 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
4636 * metadata.c (mono_metadata_get_param_attrs): Ditto.
4638 * row-indexes.h: Add definitions for *Ptr tables.
4640 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
4642 * metadata.c (mono_metadata_translate_token_index): New helper function to
4643 translate table indexes used in uncompressed metadata.
4644 (mono_metadata_decode_table_row): Ditto.
4645 (mono_metadata_decode_table_row_col): Ditto.
4647 * metadata.c: Add table schema for *Ptr tables.
4649 * class.c loader.c: Use the new helper function to access the affected metadata
4652 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
4655 2006-10-04 Zoltan Varga <vargaz@gmail.com>
4657 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
4658 sequences which can be unbounded in size. Fixes #79583.
4660 2006-10-02 Zoltan Varga <vargaz@gmail.com>
4662 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
4663 static initialization.
4665 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
4667 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
4669 * domain.c (mono_domain_free): Free up type_init_exception_hash.
4671 * object.c (mono_runtime_class_init): Implement correct semantics when a static
4672 ctor fails, i.e. throw the same exception on subsequent accesses.
4674 2006-09-0 Jonathan Chambers <joncham@gmail.com>
4676 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
4677 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
4678 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
4679 Handle marshalling of interfaces and VARIANTs contained in structs.
4681 Code is contributed under MIT/X11 license.
4683 2006-09-30 Zoltan Varga <vargaz@gmail.com>
4685 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
4687 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
4690 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4692 * console-io.c: ignore previous SIGINT handler.
4694 2006-09-27 Zoltan Varga <vargaz@gmail.com>
4696 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
4697 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
4698 #79460, #79461, #79485.
4700 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
4702 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
4705 2006-09-26 Zoltan Varga <vargaz@gmail.com>
4707 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
4708 could be generated from it.
4710 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
4712 * rand.c: fix read loop to correctly handle EINTR.
4714 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4716 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
4717 internal calls are defined to keep methods closer to the declaring
4718 type and allow a significant reduction in runtime relocations and
4721 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
4723 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
4724 exception message to have FileNotFoundException use the default
4725 assembly load error message. Fixes bug #79426.
4726 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
4728 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4730 * threadpool.c: (start_thread_or_queue) use the root domain when
4731 creating the thread instead of the async object one.
4733 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
4735 * class.c, object.c, class-internals.h, reflection.c:
4736 for arrays, store element_size inside MonoClass (speedup
4737 for array object creation).
4739 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
4741 * icall.c: fixed CodeBase to use the file name and not the module
4744 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
4746 * mono-debug.c, mono-debug.h: export find_method as
4747 mono_debug_find_method ().
4749 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4751 * debug-helpers.c, class-internals.h: added a few functions useful
4752 when debugging under gdb.
4754 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4756 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
4757 characters that need special handling.
4759 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4761 * mono-config.c: make the os/cpu specification more flexible,
4762 allowing lists and negation.
4764 2006-09-18 Jonathan Chambers <joncham@gmail.com>
4766 * marshal.c: COM Interop fixes. Handle case where method->klass.
4767 is interface. Handle BSTR/MonoString when null. Use CDECL as
4768 calling convention on non-windows platforms. This is for
4769 compatibility with XPCOM and MainWin COM.
4771 Code is contributed under MIT/X11 license.
4774 2006-09-18 Zoltan Varga <vargaz@gmail.com>
4776 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
4777 correctly. Fixes #79217.
4779 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
4781 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
4783 * mono-config.c: allow both an os and cpu attribute for dllmap
4784 and dllentry elemnets to enable a single config file to be used
4785 for multiple architectures.
4787 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
4789 * loader.c: MonoLoaderError was cleared too soon on load failure.
4792 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
4794 * icall.c: use the defining class vtable when accessing a
4795 static field, not a pobblibly derived class.
4797 2006-09-17 Zoltan Varga <vargaz@gmail.com>
4799 * icall.c string-icalls.c: Remove references to unicode.h.
4801 * unicode.h unicode.c Makefile.am: Remove these unused source files.
4803 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
4805 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
4806 indicating the image where custom marshaller types should be looked up.
4807 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
4808 custom marshallers, instead of corlib. Fixes #79425.
4810 2006-09-14 Zoltan Varga <vargaz@gmail.com>
4812 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
4814 2006-09-14 Jonathan Chambers <joncham@gmail.com>
4816 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
4817 Implement Environment.ProcessorCount.
4819 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
4820 Implement Environment.ProcessorCount.
4823 Add Environment.ProcessorCount icall.
4825 Patch by Jason McFall.
4827 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4829 * assembly.c: don't append .exe/.dll when the filename already contains
4830 one of those extensions.
4832 2006-09-12 Martin Baulig <martin@ximian.com>
4834 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
4835 to array interfaces.
4837 2006-09-11 Martin Baulig <martin@ximian.com>
4839 * reflection.c (mono_image_build_metadata): Create the
4840 MethodImpl's after emitting all types and methods, so we don't
4841 need another fixup pass for them.
4843 2006-09-11 Zoltan Varga <vargaz@gmail.com>
4845 * class.c (mono_class_from_name_case): Fix regression introduced by the last
4848 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
4850 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
4853 2006-09-10 Zoltan Varga <vargaz@gmail.com>
4855 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
4856 args is not set. Fixes #78926.
4858 2006-09-08 Zoltan Varga <vargaz@gmail.com>
4860 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
4862 * image.c (load_class_names): Move this to class.c, and rename it to
4863 'mono_image_init_name_cache'.
4864 (load_modules): Fix a warning.
4866 * class.c icall.c image.c: Initialize image->name_cache lazily.
4868 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
4869 on its name using information in the AOT file.
4871 * class.c (mono_class_from_name): Use the new hook function.
4873 2006-09-06 Zoltan Varga <vargaz@gmail.com>
4875 * reflection.c (mono_param_get_objects): Handle enum default parameter values
4878 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
4881 2006-09-06 Martin Baulig <martin@ximian.com>
4883 * icall.c (mono_lookup_internal_call): Small fix.
4885 2006-09-05 Raja R Harinath <rharinath@novell.com>
4887 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
4890 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
4892 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
4893 when --debug is specified.
4895 2006-09-04 Zoltan Varga <vargaz@gmail.com>
4897 * class.c (setup_generic_array_ifaces): Fix a warning.
4899 2006-09-04 Miguel de Icaza <miguel@novell.com>
4901 * Temporarily remove the patch to assemly.c that checks the
4902 assembly versions as it breaks our gacutil.
4904 2006-09-03 Zoltan Varga <vargaz@gmail.com>
4906 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
4908 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
4911 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
4912 created using the default ctor. Fixes #79152.
4913 (mono_string_builder_to_utf16): Ditto.
4915 2006-09-01 Martin Baulig <martin@ximian.com>
4917 Fix handling of the generic array interfaces.
4920 (MonoDefaults): Removed `generic_array_class' and added
4921 `generic_ilist' class.
4924 (mono_bounded_array_class_get): Add the new generic array interfaces.
4925 (setup_generic_array_ifaces): New static method; create vtable
4926 entries for each method in the generic array interfaces.
4929 (select_container): Allow "parent-less" generic methods.
4932 (mono_marshal_get_generic_array_helper): New public method.
4935 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
4936 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
4937 moved the interncall into System.Array.
4939 2006-09-01 Raja R Harinath <rharinath@novell.com>
4941 A few more cases of avoiding work on types with ->byref set.
4942 Has the real fix for #79238
4943 * icall.c (is_generic_parameter): New helper.
4944 (ves_icall_Type_GetGenericParameterPosition): Use it.
4945 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
4946 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
4947 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
4948 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
4950 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
4952 (ves_icall_Type_get_IsGenericInstance): Likewise.
4953 (ves_icall_Type_get_IsGenericType): Likewise.
4955 2006-09-01 Zoltan Varga <vargaz@gmail.com>
4957 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
4960 * mempool.h (mono_mempool_get_allocated): New helper function.
4962 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
4965 * mempool.c: Fix warnings and the calculation of stats.
4967 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
4969 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
4971 * loader.c (mono_get_method_from_token): Update method_count stat.
4973 * class-internals.h (MonoStats): Add some stats.
4975 2006-08-31 Robert Jordan <robertj@gmx.net>
4977 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
4978 with managed variants.
4979 All code is contributed under the MIT/X11 license.
4981 2006-08-31 Zoltan Varga <vargaz@gmail.com>
4983 * reflection.c (reflection_methodbuilder_to_mono_method): Set
4984 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
4986 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
4988 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
4989 with cycles in classes.
4991 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
4993 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
4994 missing a [MarshalAs] directive. Fixes #79203.
4996 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
4997 klass->marshal_info. Fixes #79217.
4999 2006-08-30 Martin Baulig <martin@ximian.com>
5001 Committing a patch from Joachim Ante <joe@otee.dk>:
5002 Add support for binary data symbol stores.
5004 * debug-mono-symfile.c
5005 (mono_debug_open_mono_symbol_file): Renamed into
5006 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
5010 (mono_debug_open_image): Added `raw_contents' and `size' args.
5011 (mono_debug_init_2_memory): New public function.
5013 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
5015 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
5017 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5019 * appdomain.c: implement support for ShadowCopyFiles.
5021 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
5023 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
5024 when value is NULL (and should remove CID #51).
5026 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5028 * image.c: moved 2 functions to ../utils.
5030 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5032 * gc.c: cope with the target object of a GC handle being NULL
5035 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5037 * class.c: recursively check parent's explicit implementations
5038 of interface methods (fixes bug #79125).
5040 2006-08-19 Miguel de Icaza <miguel@novell.com>
5042 * filewatcher.c: Avoid warnings when building, do not redefine
5043 constants that are defined.
5047 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5049 * image.c: don't fail when the link points to an absolute path.
5051 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
5053 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
5056 2006-08-17 Miguel de Icaza <miguel@novell.com>
5058 * image.c (full_path): A new method used to obtain the actual path
5059 of an assembly even in the presence of symbolic links.
5061 This is necessary for the case where we are running a binary that
5062 has been GACed, but we are using the "published" path name
5063 ($prefix/mono/1.0/blah.exe) which happens to point to the real
5066 This was the source of the failure for the `xsp' command with the
5067 recent AppDomain changes, as far as the runtime was concerned,
5068 there were two different assemblies: $prefix/mono/1.0/blah.exe and
5069 $prefix/mono/gac/blah/version/blah.exe.
5071 (do_mono_image_open): use full path
5073 2006-08-17 Zoltan Varga <vargaz@gmail.com>
5075 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
5077 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
5079 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
5080 domain_id is supplied. Fix CID #241 and corlib's unit tests.
5082 2006-08-17 Zoltan Varga <vargaz@gmail.com>
5084 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
5085 small structures. Fixes #78990.
5087 2006-08-17 Zoltan Varga <vargaz@gmail.com>
5089 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
5091 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
5093 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5096 * marshal.c: don't load all the assemblies from a domain into newly
5097 created ones. The new domains might have different rules and load
5098 assemblies from different locations. Fixes bug #76757.
5100 Patch by Lluis. Conflicts resolved by Brian Crowell.
5102 2006-08-16 Alp Toker <alp@atoker.com>
5104 * socket-io.c: First half of the fix for #79084.
5105 Set sa_size to the length of the content, not that of the struct.
5106 Don't add NULL suffix to the content, this should be done in
5107 managed code if needed.
5109 2006-08-14 Raja R Harinath <rharinath@novell.com>
5112 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
5113 mono_metadata_parse_type returns NULL.
5115 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
5117 * normalization-tables.h : new file for string normalization data.
5118 * locales.c, locales.h, icall.c :
5119 added load_normalization_resource() for string normalization,
5121 * Makefile.am : added normalization-tables.h to the sources.
5123 2006-08-13 Zoltan Varga <vargaz@gmail.com>
5125 * marshal.c: Add more helper functions to reduce code duplication and use them
5128 2006-08-12 Zoltan Varga <vargaz@gmail.com>
5130 * marshal.c: Fix non-x86 stdcall warnings.
5132 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
5135 2006-08-11 Jonathan Chambers <joncham@gmail.com>
5137 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
5138 type check on multi-dimensional arrays. Fixes #79000.
5140 2006-08-10 Jonathan Chambers <joncham@gmail.com>
5142 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
5143 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
5144 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
5145 * class-internals.h: add is_com_object to class structure.
5146 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
5147 null checks to COM object marshalling. Fix .ctor call on RCW.
5148 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
5150 All code is contributed under the MIT/X11 license.
5152 2006-08-09 Dick Porter <dick@ximian.com>
5154 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
5155 racing mono_monitor_allocator_lock() somewhere, so don't delete
5156 the critical section for now. Found by running and exiting
5159 2006-08-10 Zoltan Varga <vargaz@gmail.com>
5161 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
5162 (ves_icall_System_ComObject_FindInterface): Ditto.
5163 (ves_icall_System_ComObject_CacheInterface): Ditto.
5165 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
5166 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
5168 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5170 * threadpool.c: treat pipes from process asynchronous reads as sockets
5171 when reading from them, so we get select/poll or epoll to wait for
5174 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
5176 * loader.c: Fix a typo (CID #233) in the null check.
5178 2006-08-07 Zoltan Varga <vargaz@gmail.com>
5180 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
5181 Hopefully fixes #78949.
5183 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
5184 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
5185 bytes. Fixes #78972.
5187 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5189 * filewatcher.c: we need to set errno here.
5191 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5193 * filewatcher.c: let Win32Exception get the error value.
5195 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5197 * filewatcher.c: translate errno into win32 errors for Win32Exception
5198 to know what happened.
5200 2006-08-01 Zoltan Varga <vargaz@gmail.com>
5202 * threadpool.c: Fix more warnings.
5204 * assembly.c (search_loaded): Fix warnings.
5206 * threadpool.c (mono_thread_pool_finish): Fix warnings.
5207 (mono_async_invoke): Ditto.
5209 2006-07-28 Jonathan Chambers <joncham@gmail.com>
5211 * object.c (mono_remote_class_vtable): Need to create proxy vtable
5212 entries for __ComObject type in addition to ComImport types.
5213 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
5216 All code is contributed under the MIT/X11 license.
5218 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
5220 * image.c: avoid tentative loading of modulerefs that contain
5221 no metadata (P/Invoke library names).
5223 2006-07-28 Dick Porter <dick@ximian.com>
5225 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
5226 mono_loader_lock() somewhere, so don't delete the critical section
5227 for now. Found by running and exiting monodevelop.
5229 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5231 * filewatcher.c: define the inotify syscalls when we're building on
5232 linux and have sys/syscall.h. The build system might not have support
5233 for inotify but the target system might have it.
5235 2006-07-26 Miguel de Icaza <miguel@novell.com>
5237 * domain.c: Documentation updates.
5239 * loader.c (mono_free_method): Do not release the method
5240 information if we are being profiled, as profilers will use this
5241 information at shut down to present some data to the user.
5243 This is needed so that the profiler does not crash, as the
5244 profiler tends to keep MonoMethods around, and they might become
5245 invalid if we free these.
5247 (mono_get_method_constrained): Return the original CIL stream
5248 method as well, so verification can be performed against it.
5250 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5252 * filewatcher.[ch]: support for inotify file system watcher.
5253 * icall.c: add new internal calls for the inotify file system watcher.
5255 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5257 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
5260 2006-07-20 Dick Porter <dick@ximian.com>
5262 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
5265 2006-07-20 Dick Porter <dick@ximian.com>
5267 * threads.c (start_wrapper): Do the thread cleanup while we still
5268 hold a reference to its object. Fixes bug 78123.
5270 2006-07-18 Kornél Pál <kornelpal@gmail.com>
5272 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
5273 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
5274 "managed-to-managed".
5275 * icall.c: Redirect string constructors that take sbyte* to
5276 ves_icall_System_String_ctor_RedirectToCreateString.
5277 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
5278 to CreateString () methods with matching signature.
5279 * reflection.c: Use original security informations for
5280 MONO_WRAPPER_MANAGED_TO_MANAGED.
5281 * security-manager.c: Use original security informations for
5282 MONO_WRAPPER_MANAGED_TO_MANAGED.
5283 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
5284 that is a placeholder and only its address should be used.
5285 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
5286 that is a placeholder and only its address should be used.
5288 2006-07-15 Jonathan Chambers <joncham@gmail.com>
5290 Begin implementing COM Interop.
5291 * appdomain.c: Increment corlib version.
5292 * class.c: Set ComImport classes' parent to __ComObject.
5293 * loader.c: Mark cominterop methods as such.
5294 * domain.c: Add __ComObject class to MonoDefaults structure.
5295 * image.c: Add 2 hashtables to the image for COM Interop related methods
5296 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
5297 using the mempool allocator
5299 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
5300 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
5301 declaration for mono_metadata_type_dup_mp.
5303 * debug-helpers.c: Added strings for two additional wrapper types
5304 * object.c: Create proxy objects for ComImport classes
5305 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
5306 and added __ComObject class to MonoDefaults structure.
5308 * object-internals.h: Finish MonoRealProxy definition, and add definition of
5309 MonoComInteropProxy and MonoComObject.
5311 * marshal.c: Added support for COM Interop
5312 (signature_cominterop): Converts managed signature to corresponding
5313 unmanaged COM signature.
5314 (cominterop_get_function_pointer): gets unmanaged function pointer via
5316 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
5317 (cominterop_get_method_interface): returns interface type that method is defined on
5318 (mono_mb_emit_cominterop_call): emits native call to function pointer
5320 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
5321 that matches signature of unmanaged function.
5322 (cominterop_get_native_wrapper): wrapper around adjusted method call.
5323 (cominterop_get_invoke): forwards call from proxy to __ComObject
5324 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
5325 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
5326 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
5328 * marshal.h: Added Marshal icall declarations.
5329 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
5330 so we can access them in finalizer
5332 2006-07-14 Dick Porter <dick@ximian.com>
5334 * object.c (mono_type_initialization_cleanup): Fix a race
5335 condition by temporarily commenting out the critical section
5338 2006-07-14 Zoltan Varga <vargaz@gmail.com>
5340 * reflection.c (create_custom_attr): Fix some warnings.
5341 (create_custom_attr_data): Ditto.
5342 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
5343 types. Fixes #78855.
5345 2006-07-11 Zoltan Varga <vargaz@gmail.com>
5347 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
5349 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
5351 2006-07-08 Zoltan Varga <vargaz@gmail.com>
5353 * reflection.c (resolve_object): Add support for DynamicMethod.
5355 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
5356 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
5358 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
5360 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
5361 don't leak GPtrArray's pdata has we have no use (nor free) for it.
5363 2006-07-01 Zoltan Varga <vargaz@gmail.com>
5365 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
5368 2006-06-30 Raja R Harinath <rharinath@novell.com>
5370 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
5371 slightly: remove a shadow local variable.
5373 2006-06-29 Raja R Harinath <rharinath@novell.com>
5375 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
5376 definition that introduces the virtual function slot.
5377 Also fix Coverity #105.
5379 2006-06-29 Zoltan Varga <vargaz@gmail.com>
5381 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
5382 for dynamic assemblies. Fixes #78724.
5384 2006-06-28 Zoltan Varga <vargaz@gmail.com>
5386 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
5389 2006-06-21 Martin Baulig <martin@ximian.com>
5392 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
5395 2006-06-21 Zoltan Varga <vargaz@gmail.com>
5397 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
5399 2006-06-20 Raja R Harinath <rharinath@novell.com>
5401 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
5403 * class.c (mono_class_create_from_typespec): Add 'context' argument.
5404 Inflate result if necessary.
5405 (mono_class_get_full): Remove old version. Rename from
5406 'mono_class_get' and add 'context' argument. Pass it to
5407 ..._create_from_typespec.
5408 (mono_class_get): New. Simple wrapper to mono_class_get_full.
5409 (mono_ldtoken): Revert change below.
5411 2006-06-20 Martin Baulig <martin@ximian.com>
5413 * class.c (mono_ldtoken): Don't pass the generic context to
5414 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
5416 2006-06-15 Zoltan Varga <vargaz@gmail.com>
5418 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
5419 and later freeing it. Fixes #78638.
5421 2006-06-15 Miguel de Icaza <miguel@novell.com>
5423 * icall.c (mono_class_get_throw): Revert over-zealous error
5424 throwing, the caller for mono_class_get_throw will cope with
5425 errors when classes are not properly initialized already.
5427 The code still copes with loader exceptions though.
5429 Fixes the regression in reftype1 and reftype3 from the CAS tests.
5431 2006-06-14 Miguel de Icaza <miguel@novell.com>
5433 Fixes the `make run1' version of RuntimeAbort (to be commited,
5434 source is in Bugzilla).
5436 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
5437 FALSE on class loading failure instead of returning true.
5439 * class.c (mono_class_create_from_typedef): It is possible for
5440 mono_metadata_interfaces_from_typedef_full to fail if a class is
5441 not found, cope with this.
5444 2006-06-14 Dick Porter <dick@ximian.com>
5447 * process.c: Fix a bunch of signed/unsigned warnings from gcc
5450 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
5452 * culture-info-table.h : oops, forgot to make it nsync with r61548.
5454 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
5456 * icall.c: Another fix for building mono in Visual Studio.
5458 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
5460 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
5462 2006-06-09 Martin Baulig <martin@ximian.com>
5464 * debug-mono-symfile.c: Put this back and really fix it this
5465 time. Sorry for all the trouble.
5467 2006-06-08 Zoltan Varga <vargaz@gmail.com>
5469 * icall.c (mono_class_get_throw): Fix a warning.
5470 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
5471 ReflectionTypeLoadException if needed. Fixes #78606.
5473 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
5474 (mono_class_init): Ditto.
5476 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
5477 ref_only exceptions.
5478 (mono_loader_clear_error): Make this work even if there is no error.
5480 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
5482 * object-internals.h marshal.c marshal.h icall.c: Implement method
5483 Marshal.GetComSlotForMethodInfo using internal call.
5485 2006-06-07 Zoltan Varga <vargaz@gmail.com>
5487 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
5488 a function for signalling it.
5490 * class.c (mono_class_from_typeref): Use the new kind of loader error when
5491 a referenced assembly is not found.
5493 * loader.c (mono_loader_error_prepare_exception): Add support for
5494 LOADER_ERROR_ASSEMBLY. Fix formatting.
5496 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
5498 * domain.c appdomain.c class-internals.h marshal.c: Add support
5499 for VARIANT marshalling on windows and increment corlib version
5500 since Variant struct was added.
5502 2006-06-03 Miguel de Icaza <miguel@novell.com>
5504 * debug-mono-symfile.c: Revert Martin's previous patch which broke
5505 stack trace line information:
5507 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
5508 (Martin) when looking up B which is between A and C, return A not C.
5512 Thanks to Alexander Olk for tracking this down.
5514 2006-06-02 Zoltan Varga <vargaz@gmail.com>
5516 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
5518 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
5519 avoid clobbering its value.
5520 (mono_string_to_lpstr): Fix a warning on windows.
5522 2006-05-31 Zoltan Varga <vargaz@gmail.com>
5524 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
5526 * reflection.c loader.c: Removed references to 'dummy' flag.
5528 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
5530 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
5531 it gets GC tracking.
5533 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
5536 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
5538 * marshal.c threadpool.c: Update callers of mono_async_result_new.
5540 * appdomain.c: Bump corlib version.
5542 2006-05-30 Zoltan Varga <vargaz@gmail.com>
5544 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5545 CEE_STIND_REF when working with object references.
5547 2006-05-31 Zoltan Varga <vargaz@gmail.com>
5549 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
5552 2006-05-30 Miguel de Icaza <miguel@novell.com>
5554 * loader.c (method_from_memberref): Fix argument value for
5555 mono_loader_set_error_method_load (I was passing the MonoClass
5556 instead of the class name char *).
5558 2006-05-30 Zoltan Varga <vargaz@gmail.com>
5560 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5561 CEE_STIND_REF when working with object references.
5563 2006-05-30 Martin Baulig <martin@ximian.com>
5565 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
5566 mono_method_full_name() change and replace the ':' with a '.'
5569 2006-05-30 Martin Baulig <martin@ximian.com>
5571 * debug-mono-symfile.c
5572 (mono_debug_symfile_lookup_location): Fix the algorithm:
5573 when looking up B which is between A and C, return A not C.
5575 2006-05-29 Martin Baulig <martin@ximian.com>
5578 (MonoDebugMethodInfo): Make the typedef public.
5579 (MonoDebugSourceLocation): New public struct.
5582 (mono_debug_source_location_from_address): Removed.
5583 (mono_debug_source_location_from_il_offset): Removed.
5584 (mono_debug_il_offset_from_address): Removed.
5585 (mono_debug_address_from_il_offset): Removed.
5586 (mono_debug_lookup_method): New public function.
5587 (mono_debug_lookup_source_location): New public function; replaces
5588 the old mono_debug_source_location_from_*() functions; see the
5589 inline documentation.
5590 (mono_debug_free_source_location): New public function.
5591 (mono_debug_print_stack_frame): New public function; see the
5592 inline documentation.
5594 * debug-mono-symfile.c
5595 (mono_debug_find_source_location): Renamed into
5596 mono_debug_symfile_lookup_location(); only take a
5597 `MonoDebugMethodInfo *' and an `offset' argument; added inline
5599 (mono_debug_find_method): Renamed into
5600 mono_debug_symfile_lookup_method().
5602 2006-05-27 Zoltan Varga <vargaz@gmail.com>
5604 * assembly.c (mono_assembly_open_full): Dont overwrite the status
5605 returned by mono_image_open_full ().
5607 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
5608 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
5611 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
5614 2006-05-27 Miguel de Icaza <miguel@novell.com>
5616 * class.c (mono_class_from_typeref): handle missing images
5617 earlier, deals with bug #78418. Refactor code;
5619 Fix a warning introduced in my previous commit (some stale code
5620 from before I revisited my patch).
5622 * class.c (mono_class_create_from_typedef): On failure, remove the
5623 class from the MonoImage->class_cache as the class is not
5624 initialized; Fixes the leak pointed out by Paolo.
5626 2006-05-25 Dick Porter <dick@ximian.com>
5628 * threads.c (mono_thread_cleanup): Build fix. Comment out the
5629 DeleteCriticalSections until I figure out which one may still be
5630 sometimes locked when mono_thread_cleanup is called.
5632 2006-05-24 Dick Porter <dick@ximian.com>
5634 * threads.c (mono_thread_cleanup): Move the threading cleanup out
5635 of mono_thread_manage and back into its own function, so it can be
5636 called after the finalizer thread has finished.
5638 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
5640 2006-05-24 Zoltan Varga <vargaz@gmail.com>
5642 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
5645 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
5646 with non-blittable elements.
5647 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
5649 2006-05-24 Martin Baulig <martin@ximian.com>
5651 * mono-debug-debugger.h (MonoDebuggerEvent): Added
5652 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
5654 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
5655 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
5656 `mono_debugger_event_handler' to NULL.
5658 2006-05-24 Martin Baulig <martin@ximian.com>
5660 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
5662 2006-05-24 Martin Baulig <martin@ximian.com>
5664 * mono-debug-debugger.h
5665 (mono_debugger_create_notification_function): Added
5666 `MonoCodeManager *' argument.
5668 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
5670 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
5672 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
5674 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
5675 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
5678 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
5680 * icall.c: precise GC support: objects can't be stored in unmanaged
5681 memory anymore, even if they are kept alive by other references: since
5682 they can move the GC needs to be able to always find them.
5684 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5686 * object.c: precise GC support for static fields. Support
5687 for moving GCs: write barriers and pinned allocation for interned
5690 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
5692 * domain.c, domain-internals.h: precise GC support for the MonoDomain
5695 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5697 * class.c, gc.c: sgen and precise GC updates.
5699 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5701 * marshal.h, marshal.c: added write barrier wrapper and precise type
5704 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
5706 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
5709 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5711 * reflection.c: precise and sgen GC updates.
5713 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5715 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
5717 2006-05-22 Zoltan Varga <vargaz@gmail.com>
5719 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
5721 2006-05-20 Zoltan Varga <vargaz@gmail.com>
5723 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
5724 MONO_TYPE_OBJECT. Fixes #78462.
5726 2006-05-18 Zoltan Varga <vargaz@gmail.com>
5728 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
5729 and blittable types.
5731 2006-05-17 Miguel de Icaza <miguel@novell.com>
5733 * class.c (mono_class_get_exception_for_failure): Implement parts
5734 of a TODO: if the loader error is set (instead of the class
5735 error), we return a Loader exception that can be properly thrown
5738 This was exposed by some Winforms 2.0 code that I tried to run
5739 (Atsushi pointed me to it).
5741 2006-05-17 Zoltan Varga <vargaz@gmail.com>
5743 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
5744 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
5746 * marshal.c (emit_marshal_vtype): Add limited support for
5747 UnmanagedType.LPStruct. Fixes #78427.
5749 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
5750 Applied a patch from kangaroo to fix #77523.
5752 2006-05-17 Martin Baulig <martin@ximian.com>
5755 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
5756 (debugger_thread_created): Removed.
5757 (debugger_thread_exited): Removed.
5759 2006-05-15 Zoltan Varga <vargaz@gmail.com>
5761 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5763 * object-internals.h (MonoReflectionResource): Sync with managed version.
5765 2006-05-12 Wade Berrier <wberrier@novell.com>
5767 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
5769 2006-05-12 Zoltan Varga <vargaz@gmail.com>
5771 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
5772 functions try to allocate from the image mempool.
5774 2006-05-12 Dick Porter <dick@ximian.com>
5776 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
5778 2006-05-12 Lluis Sanchez <lluis@ximian.com>
5780 * object.c: The FieldGetter and FieldSetter methods require the full
5781 name of the class, not only the name. Fixes bug #78277.
5783 2006-05-11 Miguel de Icaza <miguel@novell.com>
5785 * loader.c (method_from_memberref): Do not pass the NULL klass to
5786 mono_loader_set_error_() methods. Pass the non-NULL value
5789 2006-05-11 Zoltan Varga <vargaz@gmail.com>
5791 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
5792 (mono_assembly_close): Null out assembly->image->references after freeing it.
5794 * image.c (mono_image_close): Free image->references.
5796 * reflection.c (mono_image_basic_init): Fix a small memory leak.
5798 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
5800 * marshal.c: In function mono_mb_add_local don't use the mb pointer
5801 before checking if it's NULL (g_assert).
5803 2006-05-10 Martin Baulig <martin@ximian.com>
5805 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
5806 I thought I already killed that two months ago, but now it somehow reappeared.
5808 2006-05-10 Martin Baulig <martin@ximian.com>
5810 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
5812 2006-05-10 Zoltan Varga <vargaz@gmail.com>
5814 * reflection.c: Allocate memory for dynamically created methods in the image
5817 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
5819 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
5820 don't use the ad pointer before checking if it's NULL (g_assert).
5822 2006-05-09 Zoltan Varga <vargaz@gmail.com>
5824 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
5825 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
5827 * marshal.c: Allocate all signatures from mempools.
5829 * marshal.c: Allocate some more signatures from mempools.
5831 2006-05-09 Miguel de Icaza <miguel@novell.com>
5833 * object.c (mono_load_remote_field): The code used to provide a
5834 temporary variable for returning results if the user did not
5835 provide a result pointer. But our temporary variable was allocted
5838 Fix calling code to always pass a result area. Coverity ID 103.
5840 2006-05-06 Zoltan Varga <vargaz@gmail.com>
5842 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
5843 value, not the old. Fixes #78312.
5844 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
5846 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
5847 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
5850 * assembly.c (mono_assembly_close): Free image->references.
5852 * assembly.c (mono_assembly_names_equal): Fix a warning.
5853 (mono_assemblies_cleanup): Cleanup more global data.
5855 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
5857 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
5858 ptr_cache and image->modules.
5860 * image.c (mono_image_init): Allocate array_cache lazily.
5862 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5864 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
5865 behavior was changed recently and has bad side effects.
5867 2006-05-05 Zoltan Varga <vargaz@gmail.com>
5869 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
5871 * assembly.c (mono_assembly_close): Remove a debug printf.
5873 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
5875 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
5876 to also allow for temporary references between mono_image_open ()/close ().
5878 * domain.c (get_runtimes_from_exe): Add a FIXME.
5880 2006-05-04 Zoltan Varga <vargaz@gmail.com>
5882 * marshal.c: Fix support for dynamic methods.
5884 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
5886 * marshal.c (mono_marshal_cleanup): New cleanup function.
5888 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
5891 * class.c (mono_class_init): Fix leaking class->nested_classes.
5893 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
5895 * image.c (mono_image_init): Initialize the new cashes.
5897 * image.c (mono_image_close): Destroy the new cashes.
5899 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
5901 * mempool.c (mono_mempool_strdup): New helper function.
5903 * class-internals.h: Add prototype for mono_loader_unlock ().
5905 * domain.c (mono_jit_info_table_find): Fix a warning.
5906 (mono_debugger_check_runtime_version): Ditto.
5908 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
5909 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
5910 functions to these modules.
5912 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
5915 * marshal.c (mono_free_bstr): Fix a warning.
5917 * assembly.c (mono_assembly_open_full): Fix another small leak.
5919 * object.c: Fix some unload leaks in the remoting code.
5921 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
5924 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
5926 * reflection.c: Fix some unload leaks in dynamic assemblies.
5928 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
5930 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
5931 * marshal.h: Add BSTR support on Win32
5932 * icall.c: Add BSTR icalls
5933 * metadata.h: Add BSTR enums
5935 2006-04-28 Miguel de Icaza <miguel@novell.com>
5937 Work to catch the crash from #76795 and turn it into an
5938 exception. As I stubbed out pieces of the VisualBasic support,
5939 I found a number of places where the code was failing and I added
5940 checks to those places.
5942 * metadata.c (do_mono_metadata_parse_generic_class): Make this
5943 function return a status code. If we fail to parse the signature
5944 from mono_metadata_parse_generic_inst, return FALSE.
5946 * loader.c (mono_get_method_from_token): If we fail to load the
5947 method (mono_class_get) return NULL.
5949 * (method_from_memberref): Return NULL if we are unable to parse
5950 the method signature
5952 (mono_loader_error_prepare_exception): Since we now use the
5953 loader_error flag internally to stop processing, and obtaining
5954 exceptions that might be thrown will walk this code path the
5955 proper way of going from a MonoLoaderError into a
5956 MonoException was convoluted. This new routine encapsulates the
5957 process of turning the error into an exception and *clearing* the
5960 2006-04-27 Miguel de Icaza <miguel@novell.com>
5962 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
5963 with missing assemblies), and to cope with:
5965 * Missing fieldref from a non-existing assembly.
5966 * Missing methodref from a non-existing assembly.
5968 The first batch of work to address *some* of the issues from 76661.
5970 * object.c (mono_class_create_runtime_vtable): If we fail to
5971 initialize the class raise the exception here.
5973 * metadata.c (mono_class_get_overrides_full): If any methods fail
5974 to load return the failure to the caller.
5976 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
5977 flagging assemblies that failed to load.
5979 Do not crash if we are unable to load the assembly.
5981 (mono_assembly_close): Do nothing with REFERENCE_MISSING
5984 * loader.c (mono_loader_set_error_type_load): Change the
5985 convention to always pass unallocated strings, so we make our own
5986 copies (I know our own code had duplicated strings before, but
5987 this keeps the normal conventions).
5988 (method_from_memberref): Call mono_loader_set_error_method_load
5989 for all possible failures of loading the class.
5990 Remove assert, turn into a loader error.
5992 (mono_loader_error_to_exception): Move this routine from mini
5993 (mini_loader_error_to_exception) there was no need to have that in
5996 * class.c (mono_class_from_typeref): If we were not able to load
5997 the assembly with mono_assembly_load_reference, call the
5998 mono_loader_set_error_type_load to register the problem.
6000 (mono_class_setup_fields): If we fail to load the type from
6001 mono_metadata_parse_type_full, call mono_class_set_failure and
6002 break from the loop.
6004 If class->exception_type is set, we do not layout the fields as
6005 that might crash the runtime, and instead return (from breaking
6006 from the previous loop).
6008 (mono_class_setup_vtable): This now returns a boolean indicating
6009 whether the table was properly setup. The decision is driven by
6010 mono_class_get_overrides_full which might run into non-existing
6013 (mono_class_init): Returns TRUE on success or FALSE if there was a
6014 problem in loading the type (incorrect assemblies, missing
6015 assemblies, methods, etc).
6017 When we call mono_class_setup_fields we also check for a potential
6018 error inside this call (either a class exception or a general
6021 (mono_class_create_from_typedef): If the parent fails to load
6022 (calling mono_class_get_full) return NULL.
6026 calls to mono_metadata_parse_type_full should be checked
6027 everywhere and set the mono_class_set_failure
6028 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
6030 The current patch checks the places where my manually constructed
6031 tests show the errors are showing up, but we should do it
6036 mono_class_init return values should be tested everywhere, like
6037 the previous case this is something that we should audit
6038 everywhere and not only on the cases exposed by the tests I
6041 2006-04-26 Miguel de Icaza <miguel@novell.com>
6043 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
6044 boolean parameter and instead pass the information on `options'
6045 parameter (FileOptions).
6047 * icall.c: Register the new signature for MonoIO.Open.
6049 * debug-helpers.c (dis_one): Trying to understand how coverity
6050 works. Fix Run 5, item 78.
6052 2006-04-26 Dick Porter <dick@ximian.com>
6054 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
6057 2006-04-25 Martin Baulig <martin@ximian.com>
6059 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
6061 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
6062 debugger_thread_created().
6063 (debugger_gc_push_all_stacks): Don't handle the main thread in any
6065 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
6066 (mono_debugger_finalize_threads): New function; undo the effects
6067 of mono_debugger_init_threads().
6068 (mono_debugger_create_all_threads): Removed.
6070 2006-04-24 Zoltan Varga <vargaz@gmail.com>
6072 * image.c (mono_image_close): Tidy up trace messages.
6074 * assembly.c (mono_assembly_close): Ditto.
6076 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
6077 no longer references an already freed assembly. Fixes #78168.
6079 2006-04-21 Dick Porter <dick@ximian.com>
6081 * threads.c (mono_thread_detach): Fix reference counting when
6084 2006-04-21 Zoltan Varga <vargaz@gmail.com>
6086 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
6089 2006-04-19 Zoltan Varga <vargaz@gmail.com>
6091 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
6092 (mono_type_to_stind): Ditto.
6094 * marshal.c: Use the new helper functions to simplify code.
6096 * image.c (mono_image_close): Add some code for help debug assembly unloading
6099 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
6102 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
6103 assembly was already loaded in another appdomain. Fixes #78083.
6105 2006-04-13 Zoltan Varga <vargaz@gmail.com>
6107 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
6108 referenced assemblies.
6109 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
6111 * domain.c (mono_domain_free): Add a trace message.
6113 * appdomain.c (add_assemblies_to_domain): Ditto.
6115 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
6118 2006-04-12 Zoltan Varga <vargaz@gmail.com>
6120 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
6122 2006-04-12 Martin Baulig <martin@ximian.com>
6124 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
6125 `USE_INCLUDED_LIBGC'.
6127 2006-04-12 Zoltan Varga <vargaz@gmail.com>
6129 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
6130 the patch contains ../ and a small directory name later. Hopefully fixes
6133 2006-04-10 Martin Baulig <martin@ximian.com>
6135 Clean up the debugger's thread-handling code.
6137 The debugger's thread-handling code has been moved from
6138 ../mini/debug-debugger.c to threads.c. We now iterate directly
6139 over the `threads' hash, keep track of exiting threads and also
6142 We can now debug XSP and XSP based applications with the debugger.
6144 * object-internals.h (MonoThread): Added `gpointer end_stack'.
6147 (MonoThreadCallbacks): Removed; this was only used by the debugger.
6148 (mono_install_thread_callbacks): Likewise.
6150 * threads.c (mono_thread_callbacks): Removed.
6151 (debugger_thread_created, debugger_thread_exited): New static functions.
6152 (start_wrapper): Call debugger_thread_created().
6153 (thread_cleanup): Call debugger_thread_exited().
6154 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
6155 (mono_debugger_init_threads): New public function.
6156 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
6157 iterate directly over the `threads' hash and also use proper locking.
6159 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
6161 * mono-debug-debugger.h
6162 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
6164 2006-04-10 Zoltan Varga <vargaz@gmail.com>
6166 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
6167 argument type=array. Fixes #78057.
6169 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
6171 * culture-info-table.h : regenerated. Fixed bug #69652.
6173 2006-04-07 Zoltan Varga <vargaz@gmail.com>
6175 * loader.c metadata.c: Reapply a variant r59116.
6177 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
6179 * class.c (mono_class_setup_interface_offsets): New internal function.
6181 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
6182 interfaces too. Fixes #77398.
6184 * reflection.c (encode_cattr_value): Add support for
6185 parameter type=object, argument type=array.
6186 (load_cattr_value): Ditto. Fixes #77916.
6188 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
6189 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
6191 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
6192 a byval char array and CharSet is Ansi.
6194 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
6196 2006-04-06 Zoltan Varga <vargaz@gmail.com>
6198 * metadata.c: Add some locking comments.
6200 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
6202 (mono_metadata_free_method_signature): Don't free the signature itself.
6204 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
6206 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
6207 reference the same MonoImage.
6208 (mono_assembly_load_from_full): Add an assert.
6210 2006-04-05 Zoltan Varga <vargaz@gmail.com>
6212 * image.c (mono_image_close): Don't put the image we are about to free into the
6213 loaded_images_guid_hash.
6215 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
6216 to reduce code duplication.
6218 * marshal.c: Register the native functions called by this module as icalls, to
6219 somewhat centralize the creation of MonoMethodSignature's.
6221 * loader.c (mono_method_signature): Add a cache for method signatures.
6223 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
6224 the parameter attributes of a method.
6225 (mono_metadata_parse_method_signature_full): Refactored the computation of
6226 parameter attributes into a separate function. Also avoid one allocation in
6229 * assembly.c (mono_assembly_close): Ditto.
6231 * image.c (mono_image_close): Log trace messages with INFO level.
6233 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
6235 * image.c reflection.c: Correct reference counting of image modules.
6237 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
6238 of this function from the image mempool.
6240 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
6241 to allow more cached types to be used.
6243 * mono-debug.c (mono_debug_add_method): Appled patch from
6244 David S. Miller <davem@sunset.davemloft.net>: Access
6245 minfo->lexical_blocks[] entry elements using read32().
6247 2006-04-04 Zoltan Varga <vargaz@gmail.com>
6249 * loader.c (mono_free_method): No longer free the method header for non-dynamic
6250 methods as it is allocated from the mempool.
6252 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
6255 * metadata-internals.h: Add comments describing the reference counting scheme
6256 used for MonoImage and MonoAssembly.
6258 * image.c assembly.c reflection.c: Rework reference counting of images and
6259 assemblies so they are freed when the runtime is shut down. Free some
6260 additional memory structures when an image is unloaded.
6262 2006-04-03 Zoltan Varga <vargaz@gmail.com>
6264 * class.c loader.c reflection.c: Allocate more data structures in
6267 2006-03-31 Miguel de Icaza <miguel@novell.com>
6270 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
6271 build on pre glib 2.4 systems.
6273 2006-03-31 Zoltan Varga <vargaz@gmail.com>
6275 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
6277 * icall.c: Fix some warnings.
6279 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
6281 * culture-info-table.h : regenerated.
6283 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
6285 * threads.c, object-internals.h, verify.c: changed the culture caching
6286 code to use a normal MonoArray for storage so the GC can keep track of
6287 them easily. Fixed bits of the cache logic, too and simplified the
6290 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
6292 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
6293 thread for non-Boehm GCs.
6295 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
6297 * domain.c, object.c, domain-internals.h: reduce the amount of memory
6298 needed to keep track of the data for static fields.
6300 2006-03-29 Raja R Harinath <rharinath@novell.com>
6303 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
6304 for interface classes. Use 'num_methods' instead.
6305 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
6306 before using '->vtable_size' field.
6308 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6310 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
6311 doesn't contain managed pointers, so use a normal hashtable.
6313 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6315 * reflection.c, class-internals.h, domain.c: fixed handling of types
6316 used as values for objects in custom attributes (bug #77915):
6318 2006-03-24 Martin Baulig <martin@ximian.com>
6320 * class.c (mono_class_setup_fields): Added support for generic
6321 instances; fixes #77580.
6323 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6325 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
6327 2006-03-24 Dick Porter <dick@ximian.com>
6329 * file-io.c (get_file_attributes): More stat macro breakage.
6332 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
6334 * profiler.c: added the file=filename option in the default profiler
6335 to output the profile data to filename.
6337 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6339 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
6342 2006-03-22 Martin Baulig <martin@ximian.com>
6344 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
6345 allocated `MonoClassField *' in `fb->handle'.
6347 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6349 * class.c, image.c, metadata-internals.h: implemented new mechanism to
6350 allocate interface ID to save memory and allow better ID reuse on
6351 appdomain unload. setup_generic_vtable () removal from Martin.
6353 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6355 * object.h, appdomain.c, domain.c, exception.c, icall.c,
6356 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
6357 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
6358 write barriers for reference stores with managed objects accessed with
6359 C structures in the runtime and in embedding programs.
6361 2006-03-20 Raja R Harinath <rharinath@novell.com>
6363 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
6364 'interface_id' and 'max_interface_id' fields of MonoClasses
6365 representing open generic types.
6367 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
6369 * object.h, object.c, icall.c: added functions to deal with
6370 storing valuetypes that contain references in managed objects.
6371 * reflection.c, string-icalls.c, threads.c, marshal.c: small
6372 fixes and comments around uses of mono_array_addr ().
6374 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
6376 * object.h, icall.c, monitor.c: object.GetHashCode ()
6377 implementation that supports the moving garbage collector.
6379 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6381 * icall.c, threads-types.h, threads.c: implemented finalizer for
6384 2006-03-15 Zoltan Varga <vargaz@gmail.com>
6386 * metadata.c (mono_type_size): Add a fixme.
6387 (mono_type_stack_size): Ditto.
6389 * object-internals.h (MonoReflectionAssemblyBuilder): Added
6390 'type_forwarders' field.
6392 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
6393 attribute from net 2.0.
6395 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
6398 * class.c (mono_class_setup_fields): Fix a warning.
6400 * class.c (mono_class_from_name): Add support for assemblyref entries
6401 in the EXPORTEDTYPE table.
6403 * reflection.c: Add support for handling type forwarders under net 2.0.
6405 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6407 2006-03-14 Zoltan Varga <vargaz@gmail.com>
6409 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
6410 overwriting entries in ModuleBuild->types, also clean up the code
6411 a little. Fixes #77774.
6413 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6415 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
6416 load friend assembly info when present.
6418 2006-03-14 Raja R Harinath <rharinath@novell.com>
6420 Fix crasher on gtest-158.cs.
6421 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
6422 the return value if the MonoClass we want is yet in an
6424 * class.c (mono_class_create_from_typedef): Add an comment
6425 explaining an order dependency between mono_class_setup_parent and
6426 mono_class_setup_mono_type.
6428 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6430 * class.c: documentation updates and events bug fix.
6432 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
6434 * class.c: some cleanup, locking fixes.
6436 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6438 * class.c: fix the generics code to setup nested
6439 type info to the instantiated type (bug #77770).
6441 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6443 * marshal.c: fixed a few type correctness issues.
6445 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6447 * loader.c: the Set/Get/Addrtess array methods should be public.
6449 2006-03-11 Zoltan Varga <vargaz@gmail.com>
6451 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
6453 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
6456 2006-03-10 Zoltan Varga <vargaz@gmail.com>
6458 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
6460 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
6462 * mempool.c (mono_mempool_alloc): Speed this up a bit.
6463 (mono_mempool_alloc0): Ditto.
6465 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6468 (create_object_from_sockaddr): it was allocating 4 extra bytes
6469 for the AF_UNIX data. Fixes bug #77747.
6471 2006-03-09 Zoltan Varga <vargaz@gmail.com>
6473 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
6475 2006-03-09 Dick Porter <dick@ximian.com>
6477 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
6478 Fixes bug 76966 again.
6480 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
6482 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
6484 * appdomain.c: Bumped corlib version to 48 (due to r57532)
6486 2006-03-07 Martin Baulig <martin@ximian.com>
6489 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
6491 2006-03-07 Martin Baulig <martin@ximian.com>
6494 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
6495 regression introduced in r56970; see gtest-252.cs.
6497 * loader.c (mono_get_method_constrained): Correctly handle generic
6498 methods; see gtest-253.cs.
6500 2006-03-04 Zoltan Varga <vargaz@gmail.com>
6502 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
6504 2006-03-04 Martin Baulig <martin@ximian.com>
6506 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
6507 compute the parent type at runtime, just like we're already doing
6511 (mono_reflection_bind_generic_parameters): Don't compute the
6512 parent type anymore.
6514 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
6516 2006-03-04 Martin Baulig <martin@ximian.com>
6518 * mono-debug-debugger.h
6519 (mono_debugger_create_notification_function): Allocate memory at
6520 runtime and return a pointer to it.
6522 2006-03-03 Zoltan Varga <vargaz@gmail.com>
6524 * assembly.c: Fix windows build.
6526 * assembly.c: Fix build.
6528 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
6530 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
6532 2006-03-03 Dick Porter <dick@ximian.com>
6535 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
6536 Check parameters before dereferencing them. Fixes Aaron's part of
6539 2006-03-03 Raja R Harinath <rharinath@novell.com>
6541 Fix performance regression.
6542 * loader.c (find_method_in_class): Add 'from_class' argument.
6543 Rename 'klass' argument to 'in_class'. The signature is compared
6544 against the method in 'in_class', and the corresponding method is
6545 returned from 'from_class'.
6546 (find_method): Walk both 'in_class' and 'from_class' in parallel.
6547 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
6548 type definition and generic instantiation in parallel.
6549 (mono_get_method_constrained): Update to changes.
6551 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6553 * threads.c: make sure the domain is correct, too when doing
6554 mono_thread_attach ().
6556 2006-03-01 Zoltan Varga <vargaz@gmail.com>
6558 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
6559 windows. Fixes #77683.
6561 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6563 * object.h, *: introduced specific way to set elements of an array
6564 of references to be used as write barrier. Still need to audit the
6565 uses of mono_array_addr.
6567 2006-03-01 Miguel de Icaza <miguel@novell.com>
6569 * object-internals.h: New field to cache the assmebly name, patch
6570 from Tambet Ingo (tambet@ximian.com)
6572 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6574 * decimal.h, class-internals.h, metadata-internals.h,
6575 file-io.h: mark a few function declarations as internal, to
6576 reduce the number of PLT entries.
6578 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6580 * file-io.c: fix typo in warning message.
6582 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
6584 * loader.c: on unix, lookup the "*A" version of a function
6585 if charset is auto as a second option before failing.
6587 2006-02-28 Raja R Harinath <rharinath@novell.com>
6589 * class.h (mono_class_inflate_generic_method): Revert to two
6591 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
6592 (mono_class_inflate_generic_method_full): Add.
6593 * class.c (mono_class_inflate_generic_method_full): Rename from
6594 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
6595 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
6596 * loader.c, reflection.c: Update to changes.
6598 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6600 * icall.c: const fixes and small improvements.
6602 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6604 * threadpool.c: for asynchronous connect(), enable the same workaround
6605 for BSD 6 as for the Mac. Fixes bug #77637.
6607 2006-02-24 Zoltan Varga <vargaz@gmail.com>
6609 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
6610 formatted classes. Fixes #77524.
6612 2006-02-24 Raja R Harinath <rharinath@novell.com>
6614 * class.c (inflate_generic_type): Add a couple more
6615 micro-optimizations.
6616 (inflate_generic_context): Don't use the 'gmethod' from
6618 (mono_class_inflate_generic_method): If the method has generic
6619 parameters, but the passed-in context doesn't have a 'gmethod',
6620 create one. Use the possibly simplified generic instantiation
6621 from the declaring class instead of the one passed in.
6623 2006-02-24 Raja R Harinath <harinath@gmail.com>
6625 Make generic method signature and method header handling lazy.
6626 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
6627 (inflate_generic_header): Likewise.
6628 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
6629 parameter to avoid inflating types.
6630 (mono_get_inflated_method): Empty out.
6631 * class.h (mono_class_inflate_generic_method): Update to changes.
6632 * loader.c (mono_get_method_from_token): Don't parse signature for
6633 generic methods, nor methods of generic classes.
6634 (mono_method_signature): Rename from 'mono_method_signature'.
6635 Inflate signature on demand.
6636 (mono_method_get_header): Inflate method header on demand.
6637 * reflection.c: Update to changes.
6639 2006-02-23 Raja R Harinath <rharinath@novell.com>
6641 * metadata.c (mono_metadata_inflate_generic_inst): If the
6642 instantiation is closed, don't bother expanding it in the new
6644 * class.c (inflate_generic_class): If the generic instantiation
6645 doesn't change after inflation, return the argument itself.
6646 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
6648 (inflate_generic_context): If neither the generic class nor the
6649 generic method instantiations change, return the original context.
6650 * reflection.c (mono_method_get_object): Do
6651 'mono_get_inflated_method' before accessing the ->klass field.
6652 (inflate_mono_method): Don't create a MonoGenericMethod unless
6654 (inflate_method): Don't pass a constructed type as the declaring
6655 type of a methodbuilder.
6657 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
6659 * object.c: fix memory overwrite.
6661 2006-02-22 Dick Porter <dick@ximian.com>
6663 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
6664 it doesn't work any more.
6665 (mono_threads_request_thread_dump): Fix unused variable warnings.
6667 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6669 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
6670 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
6671 the public header file.
6673 2006-02-21 Zoltan Varga <vargaz@gmail.com>
6675 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
6677 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6679 * class-internals.h, object.c: reduce the size of MonoVTable
6680 and store the interface_offsets array at negative offsets.
6682 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6684 * metadata.c: tweak table descriptors data structures to reduce
6685 size and runtime relocations.
6687 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6689 * marshal.c: fix some types and opcodes to be type-safe
6690 in marshaling wrappers.
6692 2006-02-21 Ankit Jain <jankit@novell.com>
6694 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
6696 2006-02-21 Raja R Harinath <rharinath@novell.com>
6698 * metadata.c (get_constraints): Relax debugging checks for monodis.
6700 2006-02-21 Ankit Jain <jankit@novell.com>
6702 * metadata.c (mono_metadata_load_generic_params): Move the code
6703 checking for ambiguous generic params from here to mono/dis/get.c
6704 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
6706 2006-02-21 Raja R Harinath <harinath@gmail.com>
6708 Fix assertion triggered when compiling nemerle.
6709 * class.c (mono_get_shared_generic_inst): Rename from
6710 get_shared_inst and make non-static.
6711 * loader.c (mono_get_shared_generic_method): New. Used to create
6712 the MonoGenericContext-equivalent of a MonoGenericContainer.
6713 (mono_get_method_from_token): Initialize the 'context' field of
6714 the created MonoGenericContainer.
6715 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
6716 * metadata.c (get_constraints): Add sanity check.
6717 * class-internals.h: Add new internal methods.
6719 * reflection.c (verify_safe_for_managed_space): New sanity check.
6720 Currently checks that owner-less generic parameters aren't allowed
6722 (mono_type_get_object): Use it.
6723 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
6724 that are now in mono_type_get_object.
6725 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
6727 2006-02-19 Raja R Harinath <harinath@gmail.com>
6729 * metadata.c (mono_type_create_from_typespec): Rename from
6730 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
6731 argument and caching of types in the generic container.
6732 (unwrap_arrays, find_generic_param): Remove.
6733 * metadata-internals.h: Update.
6734 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
6736 2006-02-18 Zoltan Varga <vargaz@gmail.com>
6738 * class.c (mono_class_get_exception_for_failure): Fix a warning.
6740 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
6741 return values. Fixes #77581.
6743 * class.c (mono_fnptr_class_get): Switch name and name_space.
6745 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
6746 classes and add support for [In, Out] attributes.
6747 (mono_marshal_free_asany): Ditto. Fixes #77524.
6749 2006-02-18 Raja R Harinath <harinath@gmail.com>
6751 * class.c (mono_class_from_generic_parameter): Make more robust to
6752 incomplete MonoGenericContainers from monodis.
6754 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6756 * class-internals.h: added some more exception types.
6757 * class.c, metadata.c: added a few checks to handle missing
6760 2006-02-17 Raja R Harinath <rharinath@novell.com>
6762 Use owner-less generic-params some more.
6763 * class.c (my_mono_class_from_generic_parameter): Remove.
6764 (mono_class_from_generic_parameter): Handle null image,
6765 param->name and param->owner.
6766 (mono_class_from_mono_type): Update.
6767 (mono_class_create_from_typespec): Remove 'container' parameter.
6768 If that parameter is non-null, the result is always inflated by
6769 'mono_class_get_full' anyway.
6770 (mono_class_get): Rename from _mono_class_get. Remove 'container'
6772 (mono_class_get_full): Update.
6774 * class.c (inflate_generic_type) [GENERICINST]: If the generic
6775 instance is not open, don't bother inflating.
6776 (mono_class_setup_fields): Hoist some loop-invariants. Don't
6777 parse metadata for inflated classes.
6778 (_mono_class_get): Change GenericContext* parameter to
6780 (mono_class_create_from_typespec): Likewise. Simplify, and
6781 implement trivially. All the cases are handled in
6782 mono_class_from_mono_type. Don't inflate returned class.
6783 (mono_class_get_full): Delegate GENERICINST optimization to
6784 inflate_generic_type.
6785 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
6787 2006-02-16 Dick Porter <dick@ximian.com>
6789 * socket-io.c (create_object_from_sockaddr): Fix typo.
6790 (create_sockaddr_from_object): Check array lengths before
6791 potentially accessing items off the end.
6792 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
6793 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
6794 (ves_icall_System_Net_Sockets_Socket_Send_internal)
6795 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
6796 length checks to avoid wraparound overflows.
6797 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
6798 contents of the array of sockets
6799 (hostent_to_IPHostEntry2)
6800 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
6801 Check return value of inet_ntop ().
6802 (addrinfo_to_IPHostEntry): Fix typo
6804 2006-02-16 Raja R Harinath <rharinath@novell.com>
6806 Type metadata parsing doesn't use generic-instantiation information.
6807 * metadata.c (mono_metadata_parse_array_full): Change
6808 MonoGenericContext* parameter to MonoGenericContainer*.
6809 (mono_metadata_parse_type_full): Likewise.
6810 (mono_type_create_from_typespec_full): Likewise.
6811 (mono_metadata_parse_mh_full): Likewise.
6812 (mono_metadata_parse_generic_inst): Likewise.
6813 (do_mono_metadata_parse_generic_class): Likewise.
6814 (do_mono_metadata_parse_type): Likewise.
6815 * metadata-internals.h: Update to changes.
6816 * class.c (mono_class_find_enum_basetype): Likewise.
6817 (mono_class_setup_fields): Likewise.
6818 (mono_class_create_from_typespec): Likewise.
6819 * loader.c (method_from_methodspec): Likewise.
6820 (mono_get_method_from_token): Likewise.
6821 (mono_method_get_header): Likewise.
6823 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6825 * marshal.c: handle additional GENERICINST case (patch from
6826 Thong Nguyen <tum@veridicus.com>).
6827 Fix a few cases where LDIND_I/STIND_I was used for references.
6829 2006-02-16 Raja R Harinath <rharinath@novell.com>
6831 * reflection.c (mono_reflection_get_token): Remove unused variable.
6833 2006-02-16 Martin Baulig <martin@ximian.com>
6835 * reflection.c (mono_reflection_get_token): Add support for fields
6836 in instantiated generic types.
6839 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
6841 2006-02-15 Martin Baulig <martin@ximian.com>
6844 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
6845 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
6846 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
6847 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
6849 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
6851 * class.c, metadata.c, metadata.h, object.c, icall.c,
6852 marshal.c: changed mono_type_get_underlying_type () to do
6853 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
6854 Fixed handling of instantiated generic valuetypes (bug #75479).
6856 2006-02-15 Raja R Harinath <rharinath@novell.com>
6858 * metadata.c (mono_metadata_decode_signed_value): Simplify.
6859 Delegate to mono_metadata_decode_value, and work on the returned value.
6861 * icall.c (ves_icall_MonoType_GetGenericArguments):
6862 Add consistency check here too.
6864 2006-02-15 Ankit Jain <jankit@novell.com>
6866 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
6869 2006-02-15 Ankit Jain <jankit@novell.com>
6871 * metadata.c (mono_metadata_decode_signed_value): New function to decode
6872 signed values, used only for representing lower bounds of arrays.
6873 (mono_metadata_parse_array_full): Use new
6874 mono_metadata_decode_signed_value to decode lower bounds.
6876 2006-02-14 Martin Baulig <martin@ximian.com>
6879 (mono_reflection_get_token): Support "MonoGenericMethod" and
6880 "MonoGenericCMethod" and allow generic instances / methods.
6882 2006-02-11 Zoltan Varga <vargaz@gmail.com>
6884 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
6885 to obtain the terminal size using an ioctl.
6887 * object.c (mono_nullable_init): Revert this as nullable reference
6888 types are not valid.
6889 (mono_nullable_box): Ditto.
6891 2006-02-09 Dick Porter <dick@ximian.com>
6893 * threads.c (mono_thread_detach): Drop a reference to the thread
6896 2006-02-09 Zoltan Varga <vargaz@gmail.com>
6898 * object.c (mono_nullable_init): Handle nullable reference types.
6899 (mono_nullable_box): Ditto. Fixes #77446.
6901 2006-02-07 Martin Baulig <martin@ximian.com>
6903 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
6905 2006-02-07 Ankit Jain <jankit@novell.com>
6907 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
6908 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
6909 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
6910 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
6911 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
6912 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
6914 2006-02-02 Zoltan Varga <vargaz@gmail.com>
6916 * class.c (mono_class_create_generic): Set type_token as well.
6918 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
6921 2006-02-02 Martin Baulig <martin@ximian.com>
6923 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
6924 has never been used so far.
6926 2006-02-02 Martin Baulig <martin@ximian.com>
6928 * mono-debug-debugger.h: Changed comment at the top of this file;
6929 the header is not installed, but it's safe to #include it from
6932 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
6933 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
6935 2006-02-02 Martin Baulig <martin@ximian.com>
6938 (MonoSymbolTable): Removed the `metadata_info' field.
6941 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
6943 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
6944 (mono_debugger_add_builtin_types): Removed.
6945 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
6946 (mono_debugger_create_notification_function): We now operate on a
6947 pre-allocated area; take a `gpointer' and return `void'.
6949 * mono-debug-debugger.c
6950 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
6951 (mono_debugger_add_builtin_types): Removed.
6953 2006-02-02 Martin Baulig <martin@ximian.com>
6955 * threads.c (mono_debugger_create_all_threads): New public method.
6957 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6959 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
6960 breaks on several platforms.
6962 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
6964 * assembly.c: the VS.NET build doesn't supply default values for
6965 MONO_ASSEMBLIES and MONO_CFG_DIR.
6967 2006-02-01 Zoltan Varga <vargaz@gmail.com>
6969 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
6972 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
6974 * loader.c (method_from_memberref): Fix a warning.
6976 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
6978 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
6979 with explicit layout. Fixes #77433.
6981 2006-01-31 Zoltan Varga <vargaz@gmail.com>
6983 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
6984 max_interface_id is initialized before using it. Fixes #77398.
6985 (ves_icall_Type_GetInterfaces): Ditto.
6987 2006-01-30 Raja R Harinath <rharinath@novell.com>
6989 * metadata.c (mono_metadata_parse_method_signature_full): Don't
6990 allocate memory for parameter attributes when parsing memberref
6992 * loader.c (mono_loader_set_error_method_load): Don't warn.
6993 (method_from_memberref): Ensure MissingMethodException gets thrown
6994 if method is not found. Make warning more informative.
6996 2006-01-29 Raja R Harinath <harinath@gmail.com>
6999 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
7000 return true if is byref.
7001 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
7002 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
7003 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7005 2006-01-27 Raja R Harinath <rharinath@novell.com>
7007 Fix tests/find-method.2.il
7008 * loader.c (find_method, find_method_in_class): Remove is_inflated
7009 argument. Revert 2006-01-18 change.
7010 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
7011 is generic, search for method in its generic definition.
7012 * class.c (mono_class_setup_vtable_general): Print generic
7013 arguments of generic types in debugging printf.
7015 2006-01-26 Zoltan Varga <vargaz@gmail.com>
7017 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
7019 * threads.c (mono_threads_request_thread_dump): New helper function.
7021 2006-01-25 Raja R Harinath <rharinath@novell.com>
7023 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
7025 2006-01-25 Ankit Jain <jankit@novell.com>
7027 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
7028 move definition to ..
7029 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
7031 2006-01-25 Ankit Jain <jankit@novell.com>
7032 Raja R Harinath <rharinath@novell.com>
7034 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
7035 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
7038 2006-01-25 Martin Baulig <martin@ximian.com>
7040 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
7041 `MonoDebuggerThread' into debug-debugger.c.
7043 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7045 * profiler.c: fix printing of data.
7047 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
7049 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
7050 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
7052 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7054 * object.c: fix deadlock related to string interning.
7056 2006-01-23 Martin Baulig <martin@ximian.com>
7058 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
7060 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
7062 2006-01-23 Martin Baulig <martin@ximian.com>
7064 * mono-debug.h: Moved the prototypes of some functions which are
7065 used by the JIT here from mono-debug-debugger.h.
7067 2006-01-21 Martin Baulig <martin@ximian.com>
7069 * Makefile.am: Don't install mono-debug-debugger.h.
7071 2006-01-21 Martin Baulig <martin@ximian.com>
7073 * mono-debug-debugger.h: Enforce the private status of this header
7074 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
7075 Moved some stuff from mono-debugger-jit-wrapper.h here.
7077 2006-01-20 Raja R Harinath <rharinath@novell.com>
7079 * class.c (mono_class_from_typeref): Add a sanity test to help
7080 catch lack of assembly load/search hooks.
7082 2006-01-19 Zoltan Varga <vargaz@gmail.com>
7084 * marshal.c (emit_struct_conv): Relax the fields with same offset
7085 check even more. Fixes #77230.
7087 2006-01-18 Martin Baulig <martin@ximian.com>
7089 * loader.c (find_method_in_class): Added `gboolean is_inflated'
7090 argument; if false, we compare the uninstantiated signatures.
7091 (method_from_memberref): Compare the uninstantiated signatures;
7094 2006-01-18 Robert Jordan <robertj@gmx.net>
7096 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
7097 Clear the weak link. Fixes bug #77170.
7099 * gc.c (mono_gchandle_free):
7100 Reflect *-gc.c changes (tiny optimization).
7102 2006-01-18 Zoltan Varga <vargaz@gmail.com>
7104 * metadata.c (mono_metadata_signature_dup): Applied patch from
7105 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
7108 2006-01-17 Zoltan Varga <vargaz@gmail.com>
7110 * marshal.c (emit_struct_conv): Allow fields with the same offset when
7111 marshalling from native to managed code. Fixes #77230.
7113 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7115 * threadpool.c: fix problem (Mac only) when more than one asynchronous
7116 connect. Fixes bug #77020.
7118 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7120 * class.c: fixed id assignement for nested interfaces (bug #77275).
7121 Added also better info for --print-vtable debugging.
7123 2006-01-12 Martin Baulig <martin@ximian.com>
7125 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
7126 interfaces on-the-fly; fixes #76625.
7129 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
7130 don't need that anymore.
7132 2006-01-12 Miguel de Icaza <miguel@novell.com>
7135 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
7136 To avoid initing the nested_classes when not needed I turned the
7137 PeerCredData as a toplevel internal class, as it has to be shared
7140 Fixes the CASA issue.
7142 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
7144 * domain.c: Accessors for MonoJitInfo
7146 * profiler-private.h: Add jitinfo to the end jit hook
7148 * profiler.[ch]: Define new hooks, called after jitting which give
7149 the MonoJitInfo that was compiled
7151 2006-01-10 Martin Baulig <martin@ximian.com>
7153 * class.c (mono_class_setup_events): Add support for generic
7154 classes; fixes #76440.
7156 2006-01-06 Raja R Harinath <rharinath@novell.com>
7159 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
7160 on passed-in method.
7162 2006-01-03 Zoltan Varga <vargaz@gmail.com>
7164 * object.c (mono_runtime_invoke_array): Add Nullable support.
7166 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
7168 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
7170 * file-io.c: Don't consider sockets as directory and avoid an endless
7171 loop. Fix bug #76966.
7173 2006-01-03 Zoltan Varga <vargaz@gmail.com>
7175 * object.c (mono_nullable_init): New helper function.
7176 (mono_nullable_box): Ditto.
7178 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
7180 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
7182 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
7184 2006-01-02 Zoltan Varga <vargaz@gmail.com>
7186 * class.c (mono_class_is_assignable_from): Make T assignable to
7189 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
7191 * appdomain.c: Bump corlib version to 46.
7192 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
7193 serialization purpose) and changed ves_icall_System_Reflection_
7194 Assembly_get_code_base signature to accept a boolean (to escape, or
7195 not, the assembly code base).
7197 2005-12-23 Dick Porter <dick@ximian.com>
7201 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
7202 CreateEvent icall now returns "created" boolean parameter.
7204 2005-12-22 Zoltan Varga <vargaz@gmail.com>
7206 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
7209 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
7210 when attr_klass is an interface. Fixes #77045.
7212 2005-12-20 Zoltan Varga <vargaz@gmail.com>
7214 * marshal.c (emit_struct_conv): Fix previous patch.
7216 * marshal.c (emit_struct_conv): Add a check for fields with the same
7219 2005-12-20 Raja R Harinath <rharinath@novell.com>
7221 Fix regression in Mono.C5.
7222 * class.c (mono_class_create_generic): If 'klass' is an interface
7223 set up the interface offsets.
7224 (mono_class_is_assignable_from): Don't throw away generic arguments.
7226 2005-12-19 Raja R Harinath <rharinath@novell.com>
7228 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
7231 2005-12-15 Raja R Harinath <rharinath@novell.com>
7233 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
7235 (do_mono_metadata_parse_generic_class): Don't pass the current
7236 generic context when parsing the type being instantiated: it
7237 cannot use it, anyway.
7239 * loader.c (method_from_memberref): Don't inflate a signature if
7240 it doesn't contain any type parameters.
7242 2005-12-15 Zoltan Varga <vargaz@gmail.com>
7244 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
7246 2005-12-14 Martin Baulig <martin@ximian.com>
7249 (mono_type_get_name_recurse): Don't return null for type
7250 parameters and open generic classes.
7251 (mono_class_setup_methods): Don't exclude generic instances.
7252 (mono_get_unique_iid): Use different IDs for different
7253 instantiations of the same generic type.
7254 (mono_class_setup_vtable): Only use setup_generic_vtable() for
7255 open generic instances; create a normal vtable for closed generic
7257 (mono_class_setup_vtable_general): We're now also called for
7258 closed generic instances.
7261 (mono_reflection_bind_generic_parameters): Correctly use
7262 mono_metadata_lookup_generic_inst() everywhere.
7264 2005-12-14 Zoltan Varga <vargaz@gmail.com>
7266 * object.c (mono_class_create_runtime_vtable): Call
7267 mono_class_setup_vtable ().
7269 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
7271 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
7274 * loader.c (mono_loader_set_error_type_load): Print the type load
7275 warnings to the console so they are more visible to the user.
7276 (mono_loader_set_error_method_load): Ditto.
7278 * reflection.c (ensure_runtime_vtable): Revert the last change as it
7281 * reflection.c (ensure_runtime_vtable): Fix build.
7283 * reflection.c (ensure_runtime_vtable): Disable an optimization which
7284 doesn't work in all cases.
7286 2005-12-13 Zoltan Varga <vargaz@gmail.com>
7288 * object.c (mono_array_new_full): Treat a single dimensional array
7289 with 0 lower bounds as an szarray. Fixes #76973.
7291 * reflection.c (custom_attr_visible): Really fix this.
7293 2005-12-12 Zoltan Varga <vargaz@gmail.com>
7295 * reflection.c (custom_attr_visible): Allow nested public attributes
7298 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
7301 2005-12-12 Raja R Harinath <harinath@gmail.com>
7303 * class.c (set_generic_param_owner): Delete.
7304 (mono_class_create_from_typedef): Don't set ->owner field of
7305 generic parameters to "param containers" of enclosing classes.
7306 * reflection.c (mono_reflection_initialize_generic_parameter):
7309 2005-12-11 Zoltan Varga <vargaz@gmail.com>
7311 * reflection.c (custom_attr_visible): Fix build.
7313 2005-12-10 Zoltan Varga <vargaz@gmail.com>
7315 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
7318 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
7319 handling of null parameter defaults.
7321 2005-12-09 Raja R Harinath <rharinath@novell.com>
7323 * class.c (mono_class_from_generic_parameter): Don't set
7324 klass->generic_container.
7325 (my_mono_class_from_generic_parameter): Likewise.
7327 2005-12-07 Zoltan Varga <vargaz@gmail.com>
7329 * reflection.c (load_public_key): Fix a warning.
7330 (method_encode_code): Fix unaligned accesses.
7332 2005-12-07 Martin Baulig <martin@ximian.com>
7334 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
7337 (write_generic_param_entry): Encode our custom attrs.
7339 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
7341 2005-12-07 Martin Baulig <martin@ximian.com>
7343 * reflection.c (encode_new_constraint): Removed; we don't use the
7344 `NewConstraintAttribute' anymore.
7346 2005-12-06 Zoltan Varga <vargaz@gmail.com>
7348 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
7349 not fire a TypeResolve event when Assembly.GetType () is called.
7351 2005-12-05 Ben Maurer <bmaurer@ximian.com>
7353 Beginning of support for nullable types in the runtime. Parts of
7354 this patch are from Martin.
7356 * appdomain.c (MONO_CORLIB_VERSION): Bump
7358 * domain.c (mono_init_internal): get the nullable type
7360 * class.c (mono_class_is_nullable): New method
7361 (mono_class_get_nullable_param): New mehod
7362 (mono_class_create_generic): In types T? set cast_class to T
7364 * class-internals.h (MonoDefaults): new nullable default class
7365 (mono_class_get_nullable_param, mono_class_get_nullable_param):
7368 2005-12-05 Raja R Harinath <rharinath@novell.com>
7370 * metadata.c (select_container): New. Refactor code to select the
7371 appropriate GenericContainer given the type of generic parameter
7373 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
7374 not a MonoGenericContext. Use select_container. Update parameters.
7375 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
7377 (unwrap_arrays): Remove duplicate tests.
7378 (find_generic_param): Rename from 'has_same_context'. Now walks a
7379 generic instantiated class to find any arguments that are generic
7381 (mono_type_create_from_typespec_full): Use find_generic_param to
7382 avoid evicting some generic instantiations from the typespec
7385 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
7387 * reflection.c: fixed writing of doubles on ARM FPA.
7389 2005-12-02 Robert Jordan <robertj@gmx.net>
7391 * icall.c: Fixed EventInfo.ReflectedType (#76829).
7393 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7395 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
7396 least on SUSE 10 they are not the same (on debian, they are just the
7399 2005-12-01 Raja R Harinath <rharinath@novell.com>
7401 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
7402 DeclaringType for VARs and MVARs.
7403 * class.c (set_generic_param_owner): Fix initialization of owner
7406 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7408 * icall.c: fixed Enum.ToObject() to correctly convert the values.
7410 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7412 * threadpool.c: workaround for a bug that shows up on the Mac:
7413 select()+connect() on a blocking socket is not like it should
7414 be, so we proceed to connect() in that case, wasting the I/O
7415 threadpool thread until connect succeedes. Fixes bug #75436.
7417 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7419 * threadpool.c: fix typo when setting file descriptor states.
7421 2005-11-28 Raja R Harinath <rharinath@novell.com>
7423 * class-internals.h (MonoGenericContainer.is_signature): Remove.
7424 * metadata.c (mono_metadata_parse_method_signature_full): Don't
7425 create a temporary signature container.
7426 (mono_metadata_parse_generic_param): Update to changes.
7427 (mono_type_create_from_typespec_full): Update to changes.
7428 * loader.c (method_from_memberref): Don't use a
7429 MonoGenericContainer while parsing a memberref signature.
7430 (method_from_methodspec): Remove dead-store of the 'container'
7431 variable. It's overwritten before use.
7433 * metadata.c (mono_type_create_from_typespec_full): Make debugging
7435 (mono_metadata_parse_generic_param): Likewise.
7436 * loader.c (find_method_in_class): Does not need a
7437 MonoGenericContainer. Use 'mono_method_signature' rather than
7438 'mono_method_signature_full'.
7439 (find_method, mono_get_method_constrained, method_from_memberref):
7442 * metadata.c (mono_type_create_from_typespec_full): Ensure that
7443 owner-less generic-parameters are never evicted from the typespec
7446 * loader.c (method_from_memberref): Don't use the current context
7447 when parsing signatures.
7448 (method_from_methodspec, mono_get_method_from_token): Update to changes.
7450 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
7451 side-effects in g_assert.
7452 * loader.c (mono_get_method_from_token): Resolve klass earlier so
7453 that we don't potentially lose information.
7455 2005-11-26 Dick Porter <dick@ximian.com>
7458 * threads.c: icalls to implement basic (ie, not named)
7459 System.Threading.Semaphore.
7461 2005-11-24 Dick Porter <dick@ximian.com>
7464 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
7465 Use GetProcessId() if it's available.
7467 2005-11-23 Zoltan Varga <vargaz@gmail.com>
7469 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
7471 2005-11-23 Raja R Harinath <rharinath@novell.com>
7472 Ankit Jain <jankit@novell.com>
7474 * loader.c (mono_get_method_from_token): Initialize 'method' field
7475 of all generic parameters before parsing the signature. Remove
7476 code that "fixed"-up MVAR references.
7478 2005-11-23 Ankit Jain <jankit@novell.com>
7480 * metadata.c (mono_metadata_has_generic_params):
7481 (mono_metadata_load_generic_param_constraints):
7482 (mono_metadata_load_generic_params): Move duplicate code ...
7483 (mono_metadata_get_generic_param_row): ... here. Returns the
7484 first row-id in GenericParam table for a given owner (token).
7485 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
7488 2005-11-23 Raja R Harinath <rharinath@novell.com>
7489 Ankit Jain <jankit@novell.com>
7491 * metadata.c (mono_metadata_class_equal): Pass signature_only when
7493 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
7494 type->data.generic_param only if the type is an MVAR.
7495 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
7496 leak owner-less VARs and MVARs into managed space.
7498 2005-11-21 Martin Baulig <martin@ximian.com>
7501 (MonoMethod): Moved the `generic_container' here from
7502 `MonoMethodNormal' since we now also need it for
7503 `MonoMethodPInvoke';
7504 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
7505 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
7506 an union containing both `MonoMethodNormal' and
7507 `MonoMethodPInvoke'.
7510 (mono_get_method_from_token): Allow implementing generic methods
7514 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
7517 2005-11-17 Dick Porter <dick@ximian.com>
7521 * process.c: Split the Process Start_internal icall into
7522 ShellExecuteEx_internal and CreateProcess_internal, which are
7523 called depending on whether UseShellExecute is true. Fixes bug
7526 * appdomain.c (MONO_CORLIB_VERSION): Incremented
7528 2005-11-17 Zoltan Varga <vargaz@gmail.com>
7530 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
7531 'msize' parameters, use the information in 'mspec' instead.
7532 (emit_object_to_ptr_conv): Ditto.
7534 * marshal.c (emit_struct_conv): Handle explicit layout structs with
7535 fields out of order. Fixes #76733.
7537 2005-11-17 Ankit Jain <jankit@novell.com>
7539 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
7541 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
7543 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
7546 2005-11-16 Zoltan Varga <vargaz@gmail.com>
7548 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
7549 for types with non-auto layout. Fixes #76717.
7551 2005-11-16 Ankit Jain <jankit@novell.com>
7553 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
7554 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
7555 if generic_context is null.
7556 (mono_metadata_generic_param_equal): param->owner can be null.
7557 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
7560 2005-11-16 Zoltan Varga <vargaz@gmail.com>
7562 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
7565 2005-11-15 Martin Baulig <martin@ximian.com>
7567 * object.c (set_value): Use mono_class_from_mono_type() instead of
7568 the hack for generic instances; fixes #76136.
7570 2005-11-15 Zoltan Varga <vargaz@gmail.com>
7572 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
7575 * image.c (load_metadata_ptrs): Initialize the new fields.
7577 * reflection.c (create_dynamic_mono_image): Ditto.
7579 * reflection.c (build_compressed_metadata): Use the new fields.
7581 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
7584 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
7587 2005-11-15 Ankit Jain <jankit@novell.com>
7588 Raja R Harinath <harinath@gmail.com>
7590 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
7591 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
7592 new per-generic_container cache if the cached MonoType's context matches
7593 the current context.
7594 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
7595 to the expected context.
7596 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
7598 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7600 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
7601 we changed the signature of an icall.
7602 * icall.c: Modify to mono_double_ParseImpl return true/false
7603 depending on the success, instead of throwing the exception. This will
7604 help us in Double.TryParse methods.
7606 2005-11-14 Zoltan Varga <vargaz@gmail.com>
7608 * marshal.c (emit_marshal_object): Throw an exception when
7609 marshalling 'object' instead of crashing. Fixes #76696.
7611 2005-11-11 Zoltan Varga <vargaz@gmail.com>
7613 * class-internals.h: Add prototype for mono_type_get_full_name ().
7615 2005-11-11 Dick Porter <dick@ximian.com>
7617 * threads.c (mono_thread_manage): Make sure the main thread has
7618 abandoned all its mutexes when cleaning up. Fixes bug 74680.
7620 2005-11-11 Zoltan Varga <vargaz@gmail.com>
7622 * loader.c (mono_loader_set_error_type_load): Log a warning to the
7623 console about the missing type.
7624 (mono_loader_set_error_method_load): Ditto.
7626 2005-11-09 Miguel de Icaza <miguel@novell.com>
7628 * mono-config.c (mono_get_config_dir): Set the system defaults if
7631 * assembly.c (mono_set_dirs): New API entry point to set the
7632 assembly and the config directory in one call
7634 2005-11-09 Zoltan Varga <vargaz@gmail.com>
7636 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
7637 the ftnptr was created from a delegate in a domain other than the
7638 current domain. Fixes #75377.
7640 * exception.h exception.c: Add mono_get_exception_not_supported ().
7642 2005-11-08 Martin Baulig <martin@ximian.com>
7644 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
7646 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
7648 * security-manager.h: Added definitions to deal with strongname key
7649 pairs bigger (and smaller) than 1024 bits.
7650 * reflection.c: Remove hardcoded strongname size (128 bytes) and
7651 adjust wrt the public key length being used.
7653 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
7655 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
7656 Windows build (r51396-51397).
7658 2005-11-03 Martin Baulig <martin@ximian.com>
7660 * class.c (mono_class_setup_vtable_general): Also add generic
7661 methods to the vtable; fixes #76581.
7663 2005-11-01 Miguel de Icaza <miguel@novell.com>
7665 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
7666 sure that we lookup GetString method from the System.Text.Encoding
7667 class, not the derived class or we get an empty method.
7671 2005-10-25 Miguel de Icaza <miguel@novell.com>
7673 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
7674 if it has been previously set (embedders).
7676 Make mono_set_rootdir available also on Unix.
7678 005-10-24 Robert Jordan <robertj@gmx.net>
7680 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
7682 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
7684 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
7685 only calls which are made to native code use this flag.
7687 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
7689 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
7691 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7692 Add support for FieldBuilders.
7694 2005-10-29 Martin Baulig <martin@ximian.com>
7697 (mono_debug_using_mono_debugger): New public method; returns
7698 whether we're running inside the debugger.
7700 2005-10-27 Zoltan Varga <vargaz@gmail.com>
7702 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
7703 for Method/Constructor/FieldBuilders.
7705 2005-10-26 Zoltan Varga <vargaz@gmail.com>
7707 * reflection.c (module_add_cattrs): Save custom attributes for global methods
7710 2005-10-26 Martin Baulig <martin@ximian.com>
7712 * mono-debug-debugger.c
7713 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
7715 2005-10-24 Raja R Harinath <harinath@gmail.com>
7717 * icall.c (base64_to_byte_array): Don't pass an out-of-range
7720 2005-10-21 Zoltan Varga <vargaz@gmail.com>
7722 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
7723 when passing valuetypes byref. Fixes #76502.
7725 2005-10-19 Jackson Harper <jackson@ximian.com>
7727 * profiler.c: Don't put a . in front of types that are not in a
7730 2005-10-18 Zoltan Varga <vargaz@gmail.com>
7732 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
7734 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
7736 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
7738 (mono_marshal_get_ldflda_wrapper): Fix a warning.
7740 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7742 * assembly.c metadata-internals.h icall.c: Define an additional
7743 parameter for mono_assembly_name_parse_full, so we can avoid creating
7744 S.R.AssemblyName.Version when no version info wasn't passed.
7746 2005-10-09 Miguel de Icaza <miguel@novell.com>
7748 * class.c (mono_type_get_full_name): Reimplement method that was
7751 * image.c: Some docs
7753 2005-10-10 Zoltan Varga <vargaz@gmail.com>
7755 * profiler.c (output_newobj_profile): Fix printing of Total memory
7758 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
7760 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
7762 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
7764 * threads.c: remove debug output.
7766 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
7768 * threads.c (mono_thread_manage): Fix crashes if more than 64
7769 threads need to be aborted. Hopefully fixes #75899.
7771 * assembly.c (mono_stringify_assembly_name): New helper function.
7773 * class.c: Use mono_stringify_assembly_name instead of the similar
7776 * assembly.h assembly.c: Add support for calling a postload search
7777 hook if an assembly cannot be loaded.
7779 * appdomain.c: Register new search hooks which call the AssemblyResolve
7780 events in AppDomain. Fixes #75231
7782 2005-10-07 Martin Baulig <martin@ximian.com>
7784 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
7785 methods without debug info.
7787 2005-10-07 Zoltan Varga <vargaz@gmail.com>
7789 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
7792 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7794 * file-io.c: now that we return symlinks, use lstat and, when the file
7795 is a symbolic link, stat, to get the file attributes. Also avoid the
7796 conversion to/from utf16/external.
7798 2005-10-06 Zoltan Varga <vargaz@gmail.com>
7800 * class.c (mono_class_layout_fields): Compute klass->has_references
7801 correctly if an embedded valuetype is not yet initialized. Fixes
7804 2005-10-04 Martin Baulig <martin@ximian.com>
7807 (mono_metadata_load_generic_param_constraints): New public
7808 function; splitted the constraints loading out from
7809 mono_metadata_load_generic_params().
7811 * class.c (mono_class_create_from_typedef): Call
7812 mono_metadata_load_generic_param_constraints() after setting up
7813 the type and creating our parent; fixes #75329.
7815 2005-10-04 Martin Baulig <martin@ximian.com>
7817 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
7818 non-dynamic parent classes.
7820 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
7822 * file-io.c : win32 build fix (ETXTBSY seems not found).
7824 2005-10-04 Martin Baulig <martin@ximian.com>
7827 (mono_image_get_methodspec_token): Make the cache actually work;
7830 2005-10-04 Martin Baulig <martin@ximian.com>
7832 * class.c (mono_class_name_from_token): Removed the unneccessary
7833 `MonoGenericContext *' argument.
7835 2005-10-04 Martin Baulig <martin@ximian.com>
7838 (method_from_methodspec): Make the caching work again; fixes the
7839 performance regression from #76262.
7841 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7845 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
7846 GetFileSystemEntries that performs the same work but without going
7847 into io-layer, locking, etc.
7849 2005-09-30 Zoltan Varga <vargaz@gmail.com>
7851 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
7852 ThreadState_Stopped as well. Fixes #76047.
7854 2005-09-29 Martin Baulig <martin@ximian.com>
7857 (inflate_generic_context): If the new context has a `gmethod', set
7858 its `container' that that gmethod's `container'.
7861 (mono_metadata_parse_generic_param): Simplify things;
7862 `generic_container = generic_context->container;' is just fine.
7864 * loader.c (method_from_methodspec): Code cleanups.
7866 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7868 * decimal.c: fix warning (and let gcc generate correct
7869 code on ARM with optimizations).
7871 2005-09-28 Martin Baulig <martin@ximian.com>
7874 (method_from_memberref): Added `MonoGenericContext *class_context'
7875 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
7876 (method_from_methodspec): If we're a memberref, use the enclosing
7877 context when parsing its parent. Fixes #76262; see gtest-206.cs.
7879 2005-09-28 Martin Baulig <martin@ximian.com>
7881 * object.c (mono_runtime_invoke_array): Added support for
7882 MONO_TYPE_GENERICINST; fixes #75917.
7884 2005-09-27 Martin Baulig <martin@ximian.com>
7886 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
7887 `k->byval_arg.type' to determine the actual type.
7889 * loader.c (method_from_methodspec): Removed some hacks.
7891 2005-09-27 Ben Maurer <bmaurer@ximian.com>
7893 * class-internals.h (mono_field_is_deleted): Do the test for
7894 rtspecialname before we check the actual name of the field. This
7895 prevents us from dereferencing a pointer into the string table,
7896 saving us from accessing a few pages
7898 * *.c: Replace the use of {Enter,Leave}CriticalSection with
7899 macros. This will allow a deadlock debugger to easily be plugged
7902 2005-09-27 Martin Baulig <martin@ximian.com>
7904 * loader.c (method_from_methodspec): Create a "signature"
7905 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
7907 2005-09-27 Martin Baulig <martin@ximian.com>
7910 (inflate_generic_class): Correctly set the new context's
7914 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
7915 instead of a `MonoGenericContext *'.
7916 (mono_method_signature_full): Take a `MonoGenericContainer *'
7917 instead of a `MonoGenericContext *'.
7920 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
7921 instead of a `MonoGenericContext *'.
7922 (mono_metadata_parse_method_signature_full): Likewise.
7924 2005-09-26 Martin Baulig <martin@ximian.com>
7927 (mono_class_from_generic_parameter): Set `klass->generic_container'
7928 (mono_class_from_generic_parameter): Likewise.
7929 (mono_bounded_array_class_get): We inherit the generic container
7930 from the element class.
7933 (find_method, find_method_in_class): Take a `MonoGenericContext *'
7934 argument rather than computing it here.
7935 (method_from_memberref): Correctly set the generic context before
7936 parsing the signature. Fixes #75681.
7938 2005-09-26 Zoltan Varga <vargaz@gmail.com>
7940 * object.c (mono_class_has_special_static_fields): Fix warnings.
7942 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7944 * assembly.c: Add parse_public_key function, to
7945 par the public keys. Also added mono_assembly_name_parse_full,
7946 to define it the parsed key should be freed or not.
7947 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
7948 to parse a long format assembly name.
7949 * metadata-internals.h: Keep mono_assembly_name_parse_full as
7950 private, since calling it to preserve the key requires
7951 freeing it manually.
7953 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
7955 * locales.c : removed HAVE_ICU part.
7957 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
7959 * object.c (mono_class_create_runtime_vtable): Avoid calling
7960 field_is_special_static if the klass has no special static fields.
7962 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
7963 (MonoCachedClassInfo): Likewise.
7965 * object.c (mono_class_has_special_static_fields): New helper function.
7967 2005-09-23 Zoltan Varga <vargaz@gmail.com>
7969 * class.c (mono_class_create_from_typedef): Don't call
7970 interfaces_from_typedef_full for enums.
7971 (mono_class_create_from_typedef): Compute the base types of enums directly
7972 without calling mono_class_setup_fields ().
7973 (mono_class_find_enum_basetype): New helper function.
7975 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
7976 one place inside the string heap.
7978 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
7980 * class.c: locking fixes, code cleanups, some docs added.
7981 Allocate some data structures in the image mempool.
7983 2005-09-23 Zoltan Varga <vargaz@gmail.com>
7985 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
7988 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
7990 * class-internals.h, class.c, reflection.c: reduce memory taken by
7993 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
7995 * metadata.c, metadata.h, loader.h: documentation updates, code and
7998 2005-09-23 Zoltan Varga <vargaz@gmail.com>
8000 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
8003 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
8004 page faults caused by the runtime while reading metadata.
8006 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8008 * socket-io.c: the field names were changed 3 months ago and no one
8009 realized until bug #76077 got filed!
8011 2005-09-20 Martin Baulig <martin@ximian.com>
8013 * icall.c (assembly_icalls): Removed some unused debugger icalls.
8015 2005-09-20 Martin Baulig <martin@ximian.com>
8017 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
8018 write the rank into the class entry.
8020 2005-09-20 Martin Baulig <martin@ximian.com>
8022 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
8024 2005-09-19 Zoltan Varga <vargaz@gmail.com>
8026 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8028 * icall.c (custom_attrs_defined_internal): New icall.
8030 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
8032 (mono_custom_attrs_construct_by_type): New helper function.
8034 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
8036 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
8037 terminate the resulting string. Fixes #76123.
8039 2005-09-16 Martin Baulig <martin@ximian.com>
8042 (mono_debug_add_method): Ignore inflated methods for the moment.
8044 2005-09-14 Martin Baulig <martin@ximian.com>
8046 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
8048 2005-09-13 Zoltan Varga <vargaz@gmail.com>
8050 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
8051 return a success/failure indication.
8052 (mono_metadata_interfaces_from_typedef_full): Ditto.
8053 (get_constraints): Ditto.
8055 2005-09-12 Zoltan Varga <vargaz@gmail.com>
8057 * marshal.c (emit_marshal_array): Fix handling of null arrays.
8059 * marshal.c (emit_marshal_array): Add support for returning string
8060 arrays from delegates. Fixes #76063.
8062 * marshal.c: Use the emit_ldloc/stloc macros where possible.
8064 2005-09-11 Zoltan Varga <vargaz@gmail.com>
8066 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
8069 2005-09-09 Zoltan Varga <vargaz@gmail.com>
8071 * reflection.c icall.c: Fix after mono_get_exception_type_load
8074 * assembly.c (mono_assembly_get_assemblyref): New helper function.
8075 (mono_assembly_load_reference): Use the new helper.
8077 * class-internals.h (MonoLoaderError): New structure containing
8078 information about type loading errors.
8080 * class-internals.h loader.c: Add APIs to store per-thread loader
8083 * loader.c class.c: Set the loader error if needed.
8085 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
8087 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
8089 * decimal.c: fixed to handle the broken ARM fp format.
8091 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
8093 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
8096 2005-09-06 Martin Baulig <martin@ximian.com>
8098 * domain.c (supported_runtimes): Added v2.0.50727.
8100 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
8102 * culture-info.h: reduce the size of some structures.
8104 2005-09-05 Martin Baulig <martin@ximian.com>
8106 Reflect latest API changes in the August CTP.
8109 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
8110 ("MonoType.HasGenericArguments"): Removed.
8111 ("MonoMethod.BindGenericParameters"): Renamed to
8112 "MakeGenericMethod".
8113 ("MethodBuilder.BindGenericParameters"): Renamed to
8114 "MakeGenericMethod".
8116 2005-09-05 Martin Baulig <martin@ximian.com>
8118 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
8120 2005-09-05 Martin Baulig <martin@ximian.com>
8122 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8124 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
8125 generic_container is non-NULL.
8127 2005-09-05 Martin Baulig <martin@ximian.com>
8129 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8131 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
8133 2005-08-29 Michal Moskal <malekith@nemerle.org>
8135 * reflection.c (encode_locals,
8136 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
8137 for large generic types.
8139 2005-09-05 Martin Baulig <martin@ximian.com>
8141 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8143 * class.c (mono_dup_array_type): New public method.
8144 (mono_metadata_signature_deep_dup): New public method.
8145 (dup_type): Correctly duplicate array and function types.
8147 2005-09-05 Martin Baulig <martin@ximian.com>
8149 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8151 * reflection.c (get_default_param_value_blobs): Handle generic types
8152 and generic methods.
8154 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
8156 * class.c: Fixed error reporting (method/class were inversed) for
8157 inheritance demands.
8158 * security-manager.c|h: Added the AppDomain when calling the managed
8159 System.Security.SecurityManager.InheritanceDemand method.
8161 2005-09-01 Raja R Harinath <rharinath@novell.com>
8163 * reflection.c (encode_marshal_blob): 'marshaltype' and
8164 'marshaltyperef' are alternate sources for the custom marshaler
8167 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
8169 * class.c: fix creation of array classes with rank == 1
8170 (patch by Ankit Jain <jankit@novell.com>).
8172 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
8174 * object.c: fix check for creating the bound data for arrays vs
8177 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8179 * object.c: configuration file name is now based on the executable name,
8180 not the image name. Fixes bug #75931.
8182 2005-08-29 Zoltan Varga <vargaz@gmail.com>
8184 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
8185 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
8187 2005-08-25 Zoltan Varga <vargaz@gmail.com>
8189 * rand.c: Use wincrypt.h instead of WinCrypt.h.
8191 2005-08-24 Ankit Jain <jankit@novell.com>
8192 Raja R Harinath <rharinath@novell.com>
8194 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
8195 called by it recursively.
8196 (mono_class_init): Remove special case in pending_init handling, since it's
8197 superseded by the fix to mono_class_from_typeref.
8199 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
8201 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
8202 BROKEN_THREAD_START stuff.
8204 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
8206 * class-internals.h object.c: Add a new kind of trampoline called a delegate
8209 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
8211 * object.c (mono_delegate_ctor): Replace the original function address with
8212 a delegate trampoline.
8214 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
8216 * icall.c: add boolean argument to base64_to_byte_array and
8217 InternalFromBase64String to control whether a whitespace-only string
8218 is allowed (or should casue a FormatException to be thrown). We need
8219 this as the behavior has changed between MS.NET 1.x and 2.0, and we
8220 to match the MS behaviour in both profiles.
8221 * appdomain.c: Bump corlib version.
8223 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8225 This patch implements a big portion of publisher policy
8226 support, used to bind assembly versions and redirect
8227 one assembly from version A to version B.
8230 New GSList loaded_assembly_bindings, for storing the cached
8232 (assembly_binding_maps_name): New static function for checking if a
8233 assembly binding information maps an assembly name.
8234 (mono_assembly_binding_info_free): New function for freeing
8235 assembly binding information resources.
8236 (get_publisher_policy_info): New static function for retrieving
8237 assembly binding information from a MonoImage.
8238 (compare_versions): New static function for comparing an assembly
8239 binding information data and the version of an assembly name.
8240 (check_policy_versions): New static function for checking if an
8241 assembly binding info mapping an assembly name is valid for it.
8242 (mono_assembly_load_publisher_policy): New static function for
8243 loading the 'policy.major.minor.MyAssembly' image for an assembly
8244 with an assembly name 'aname'.
8245 (mono_assembly_bind_version): New static function for updating
8246 assembly redirection.
8247 (mono_assembly_apply_binding): New static function for applying
8249 (search_binding_loaded): New static function for searching
8250 loaded assembly binding infos in the cache domain.
8251 (mono_assembly_load_full): Don't apply assembly binding for
8252 reflection only assemblies.
8254 * metadata-internals.h: Add MonoAssemblyBindingInfo,
8255 which contains information about assembly binding. Also
8256 declare signature for mono_config_parse_publisher_policy ()
8257 function, used to retrieve pub policy info.
8260 (publisher_policy_start): New static function used to parse publisher
8261 policy config files.
8262 (publisher_policy_parser): New static MonoParseHandler containing
8263 the functions used when parsing config files.
8264 (mono_config_parse_publisher_policy): New function for parsing
8265 publisher policy files.
8267 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
8269 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
8271 * marshal.c (mono_delegate_free_ftnptr): Ditto.
8273 * object.c (mono_get_addr_from_ftnptr): New helper function.
8275 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
8277 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8279 2005-08-19 Dick Porter <dick@ximian.com>
8281 * threads.c, threads.h, appdomain.c, appdomain.h,
8282 profiler-private.h, monitor.c, object.c, object-internals.h,
8283 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
8284 store the thread ID, so it can hold a 64 bit value if needed.
8286 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
8288 * reflection.c (mono_reflection_create_dynamic_method): Store the
8289 handle class into the method references as well so ldtoken works in
8292 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
8295 2005-08-19 Ankit Jain <jankit@novell.com>
8298 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
8299 here rather than using the method signature of a arbitrary function
8300 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
8302 Hack done with Harinath.
8304 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8306 * threadpool.c: disable printing stack traces when we get a exception
8307 in a threadpool thread. I need to do more testing to figure out which
8308 cases actually print this. Fixes bug #75828.
8310 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8312 * icall.c: there might be ignored whitespace after the last '='. This
8313 fixes length computation and bug #75840.
8315 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
8317 * assembly.c (mono_assembly_load_full): Consider .exe extension as
8320 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
8323 * reflection.c (create_custom_attr_data): Ditto.
8325 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
8327 * locales.c, culture-info.h : removed RegionLCIDMap.
8328 * culture-info-tables.h : regenerated.
8330 2005-08-16 Martin Baulig <martin@ximian.com>
8332 * class.c (mono_type_get_name_recurse): Small fix.
8334 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
8336 * locales.c : indentation fixie.
8338 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
8340 * object-internals.h,
8344 icall.c : added RegionInfo table support.
8345 * culture-info-table.h : regenerated for region support.
8347 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
8349 * reflection.c (resolve_object): handle all kinds of MonoMethod
8350 including generic ones
8352 2005-08-12 Ankit Jain <jankit@novell.com>
8354 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
8355 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
8357 2005-09-12 Lluis Sanchez <lluis@ximian.com>
8359 * process.c: Don't close a thread handle when it's NULL. This is a
8360 workaround for bug #75733.
8362 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
8364 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
8366 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
8368 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
8370 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8372 * threadpool.c: if a work item in the thread pool has a callback that
8373 catches a exception, don't propagate it after invoking the callback.
8376 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
8378 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
8380 * class-internals.h (MonoCachedClassInfo): Add some new fields.
8382 * class.c (mono_class_init): Load field info lazily in the AOT case.
8384 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
8386 2005-08-03 Ankit Jain <jankit@novell.com>
8389 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
8390 PInvoke calling convention is 0.
8392 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
8394 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
8395 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
8397 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
8399 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
8400 to handle threads not started by the GC (patch by Michael Meeks
8401 <michael.meeks@novell.com>).
8403 2005-07-31 Kamil Skalski <nazgul@omega.pl>
8405 * reflection.c: Make buffer used in emitting types larger for some
8406 big generic types (patch by Michal Moskal).
8408 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
8410 * mono-debug.c: Fix some (not all) alignment problems.
8412 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8414 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
8415 Invoke mono_image_load_from_data_full passing the refonly
8419 (mono_assembly_open_from_bundle): Add the refonly argument,
8420 in order to pass it to other methods it calls to.
8421 (do_mono_assembly_open): Add the refonly argument, in order
8422 to pass it to other methods it calls to.
8423 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
8424 the refonly parameter to it.
8426 * image.c: Add loaded_images_refonly_hash and
8427 loaded_images_refonly_guid_hash to cache the reflection
8429 (mono_images_init): Initialize the hash tables used for
8430 caching the reflection only images.
8431 (load_modules): Invoke mono_image_open_full passing the refonly
8432 parameter to load the modules the correct way.
8433 (build_guid_table): Add the refonly argument, to re-build the
8435 (do_mono_image_open): Added the refonly argument, in order to
8436 define it for the loaded image.
8437 (mono_image_loaded_full): New function, which receives an
8438 additional parameter to look for the image in the refonly or
8439 non-refonly section.
8440 (mono_image_loaded): Updated, using mono_image_loaded_full.
8441 (mono_image_loaded_by_guid_full): The same case that happens
8442 with mono_image_loaded_full.
8443 (mono_image_loaded_by_guid): Likewise.
8444 (register_image): Use the ref_only variable inside MonoImage
8445 to decide in which hash table store the current image.
8446 (mono_image_open_from_data_full): Rename
8447 mono_image_open_from_data to mono_image_open_from_data_full,
8448 adding the refonly argument, to define the ref_only variable
8450 (mono_image_open_from_data): Return
8451 mono_image_open_from_data_full.
8452 (mono_image_open_full): Rename mono_image_open to
8453 mono_image_open_full, receiving the new refonly argument,
8454 to pass it to inner methods.
8455 (mono_pe_file_open): Update this function, to open
8456 a MonoImage as a non-refonly image.
8457 (mono_image_close): Use the refonly variable inside
8458 MonoImage to remove the image from the correct caches.
8460 * image.h: Add the signatures of mono_image_open_full,
8461 mono_image_open_from_data_full, mono_image_loaded_full,
8462 mono_image_loaded_by_guid_full.
8464 * metadata-internals.h: Add the ref_only field to
8467 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8469 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
8470 Fix the last behavior, which used to load the assemblies and
8471 extract MonoReflectionAssemblyName information, instead of
8472 extract it from the metadata tables. Needed for Reflection
8475 2005-07-29 Martin Baulig <martin@ximian.com>
8477 * mono-debug-debugger.c
8478 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
8482 (mono_debug_address_from_il_offset): Check whether we have
8483 debugging support before attempting to take the lock.
8484 (mono_debug_source_location_from_address): Likewise.
8485 (mono_debug_source_location_from_il_offset): Likewise.
8486 (mono_debug_il_offset_from_address): Likewise.
8487 (mono_debug_address_from_il_offset): Likewise.
8489 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
8491 * class.c (mono_class_from_name_case): Add support for dynamic images.
8494 * object.c (mono_class_compute_gc_descriptor): Add a workaround
8497 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
8499 * reflection.c (mono_method_get_object): Fix warning.
8501 2005-07-28 Martin Baulig <martin@ximian.com>
8504 (mono_debug_add_wrapper): Also write the wrapper type.
8506 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
8508 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
8510 * class.c (mono_class_init): Avoid reading nested classes if the AOT
8511 data indicates the class has none.
8513 2005-07-26 Ben Maurer <bmaurer@ximian.com>
8515 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
8516 loader lock with the debugger lock. Prevents deadlocks for beagle.
8518 Beagle can now run on an smp box for a weekend without any
8521 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
8523 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
8524 in a module. Fixes #75629.
8526 2005-07-26 Martin Baulig <martin@ximian.com>
8528 * mono-debug.c (mono_debug_add_wrapper): New static method.
8529 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
8530 interncall or a wrapper.
8532 * mono-debug.h (MonoDebugWrapperData): New public typedef.
8533 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
8534 (MONO_DEBUGGER_VERSION): Bump to 51.
8536 * mono-debug-debugger.c
8537 (mono_debugger_add_type): Removed this empty function.
8538 (mono_debugger_add_method): Likewise.
8540 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
8542 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
8543 before accessing method->slot.
8545 2005-07-21 Jb Evain <jbevain@gmail.com>
8547 * reflection.c (method_encode_clauses/class): Handle filters clauses.
8550 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
8552 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
8555 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
8557 * image.h image.c: Add mono_image_get_guid () API function.
8559 2005-07-19 Ben Maurer <bmaurer@ximian.com>
8561 There were issues when multiple threads tried to load
8562 assemblies. A deadlock was created between assemblies_mutex and
8563 mono_domain_assemblies_lock. This fixes the issue by making the
8564 assembly ref counting be lock free. See bug 75586.
8566 * image.c (mono_image_close): The add ref function here was using
8567 Interlocked operations while the unref was using a mutex and a
8568 --. I don't think this was ever a bug that would be exposed in a
8569 non-pendantic way (ie, by an embedder doing a ref on one thread
8570 and an unref on another), but for the sake of correctness, this is
8573 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
8574 (mono_assembly_load_reference): Call mono_assembly_addref rather
8575 than touching the refcount ourselves.
8576 (mono_assembly_close): Use InterlockedDecrement to unref the
8577 assembly. Don't acquire the lock unless it is actually needed.
8579 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
8581 * class.c (mono_class_layout_fields): Fix calculation of has_references
8584 2005-07-12 Martin Baulig <martin@ximian.com>
8586 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8589 (mono_type_hash): Provide better hashing for generic instances.
8590 (mono_generic_inst_hash): Improve hashing.
8591 (mono_generic_class_hash): Likewise.
8593 * reflection.c (mymono_metadata_type_hash): Improve hashing for
8596 2005-07-12 Martin Baulig <martin@ximian.com>
8598 * reflection.c (mono_reflection_create_runtime_class): Remove the
8599 hack for generic type definitions and non-`Run' assemblies.
8600 (mono_reflection_bind_generic_parameters): Also use
8601 `klass->wastypebuilder' to check for TypeBuilders.
8603 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
8605 * class.c (mono_class_layout_fields): Fix calculation of has_references
8608 * class.c (inflate_generic_class): Fix a leak.
8609 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
8612 2005-07-11 Martin Baulig <martin@ximian.com>
8614 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
8617 2005-07-11 Martin Baulig <martin@ximian.com>
8619 * loader.c (find_method): Also lookup in
8620 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
8622 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8624 * appdomain.c (mono_domain_unload): Don't free the error message
8625 before passing it to mono_get_exception_...
8627 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
8629 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
8631 * threads.c: try to better guess an available RT signal (bug #75387).
8633 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8635 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
8638 2005-07-07 Martin Baulig <martin@ximian.com>
8640 * class.c (mono_type_get_name_full): Return NULL for
8641 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
8644 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8646 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
8647 exit the appdomain as well being aborted.
8649 * threadpool.c: Create all threadpool threads inside the root appdomain, and
8650 change back to the root domain after calling managed code. This enables
8651 appdomains using threadpools to be unloaded.
8653 2005-07-07 Martin Baulig <martin@ximian.com>
8656 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
8657 into `MonoDynamicGenericClass' since we only need it for dynamic
8660 * reflection.c (mono_class_bind_generic_parameters): We don't need
8661 to compute the `parent' here.
8663 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
8665 * culture-info-table.h : regenerated.
8667 2005-07-06 Martin Baulig <martin@ximian.com>
8670 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
8672 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
8674 2005-07-06 Martin Baulig <martin@ximian.com>
8676 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
8677 we're doing a signature-only comparision; fixes #74945.
8679 2005-07-06 Martin Baulig <martin@ximian.com>
8681 * class-internals.h (MonoGenericClass): Moved some things out into
8682 a new `MonoInflatedGenericClass' type.
8683 (MonoInflatedGenericClass): New type; the `klass' of a
8684 `MonoGenericClass' is now computed lazyly in
8685 mono_get_inflated_generic_class().
8687 * class.c (mono_get_inflated_generic_class): New public function.
8688 (mono_class_inflate_generic_method): Removed the unused
8689 `MonoClass *' argument.
8690 (setup_generic_vtable): Don't call mono_get_inflated_method() on
8692 (mono_class_create_generic): Make this static and merge it with
8693 mono_class_create_generic_2(); we're now called automatically from
8694 mono_get_inflated_generic_class().
8696 * loader.c (mono_method_signature): Call
8697 mono_get_inflated_method() here.
8699 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
8701 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
8702 type of fields with RVA.
8704 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
8705 for this pseudo class.
8706 (my_mono_class_from_generic_parameter): Likewise.
8707 (mono_class_init): Allow interfaces to have cctors.
8709 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
8711 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
8712 lazily for AOT methods.
8714 2005-07-05 Martin Baulig <martin@ximian.com>
8716 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
8717 returns FALSE for a successful match, not TRUE.
8719 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
8721 * loader.c (mono_method_get_index): Optimize this a bit.
8723 2005-07-04 Martin Baulig <martin@ximian.com>
8726 (class_compute_field_layout): Move the check for generic type
8727 definitions into mono_class_layout_fields(). Fixes #74684.
8728 (mono_class_from_generic_parameter): Correctly compute
8729 `klass->parent'; fixes #75457.
8731 * reflection.c (register_assembly, register_module): Make sure
8732 `domain->rejobject_hash' is already created.
8734 2005-07-02 Martin Baulig <martin@ximian.com>
8737 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
8738 `MonoDynamicGenericClass'.
8740 2005-07-01 Lluis Sanchez <lluis@ximian.com>
8742 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
8743 returned by a field getter is null, since null is a valid value.
8745 2005-07-01 Martin Baulig <martin@ximian.com>
8747 * reflection.c (mono_reflection_generic_class_initialize): Update
8748 the `dgclass->fields [i].parent' to the correct class.
8749 (mono_image_get_fieldref_token): Use the declaring type, not the
8752 2005-07-01 Martin Baulig <martin@ximian.com>
8754 * loader.c (find_method): Also look in the interfaces; fixes #75429.
8756 2005-06-30 Ben Maurer <bmaurer@ximian.com>
8758 * threads.c (thread_cleanup): assert that thread != NULL
8759 (wait_for_tids_or_state_change): We were using the wrong variable
8760 when accessing wait->threads. `i' was always out of the bounds of
8763 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8765 * loader.c: map user32 and kernel32 to libMonoSupportW
8767 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
8769 * appdomain.c (unload_thread_main): Mark this as WINAPI.
8771 2005-06-28 Martin Baulig <martin@ximian.com>
8773 * loader.c (method_from_methodspec): Fix #75334.
8775 2005-06-28 Martin Baulig <martin@ximian.com>
8777 Fix #74953 - Arrays now implement the generic IList<T> interface
8778 on the 2.0 platform.
8780 * class-internals.h (MonoDefaults): Added `generic_array_class'.
8782 * reflection.c (mono_class_bind_generic_parameters): New public
8783 function; similar to mono_reflection_bind_generic_parameters(),
8784 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
8786 * domain.c (mono_init_internal): Try to initialize.
8787 `mono_defaults.generic_array_class' here; this'll only succeed if
8788 we're using the 2.0 corlib.
8791 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
8792 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
8793 (mono_lookup_internal_call): Added support for nested classes.
8796 (mono_get_method_from_token): Set `result->signature->pinvoke' if
8797 we're an interncall and have generic arguments.
8800 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
8801 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
8802 instance of System.Array.InternalArray<T> for arrays, so they
8803 implement the generic IList<T> interface.
8805 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
8807 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
8808 (chastamar@yahoo.com). Fixes #75374.
8810 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
8812 * culture-info-table.h: regenerated.
8814 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8816 * icall.c: handle spaces correctly for base64 strings.
8818 2005-06-26 Ben Maurer <bmaurer@ximian.com>
8820 * *.c: Kill some warnings.
8822 2005-06-23 Duncan Mak <duncan@novell.com>
8824 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
8825 that this builds on Solaris 10 (x86).
8827 2005-06-23 Martin Baulig <martin@ximian.com>
8830 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
8831 generic type definitions.
8833 2005-06-23 Martin Baulig <martin@ximian.com>
8837 * metadata.c (mono_class_get_overrides): Renamed to
8838 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
8839 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
8840 pass it to mono_get_method_full().
8842 2005-06-22 Ben Maurer <bmaurer@ximian.com>
8844 * reflection.c (mono_reflection_create_runtime_class): take the
8845 mono_domain_lock in this method. Prevents deadlocks
8847 2005-06-22 Martin Baulig <martin@ximian.com>
8849 * loader.c (method_from_methodspec): Fix #75330.
8851 2005-06-22 Martin Baulig <martin@ximian.com>
8853 * reflection.c (type_get_qualified_name): Use
8854 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
8855 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
8856 argument; use it if we don't have an assembly name.
8858 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
8860 * object.c: In mono_message_init, set "copy out" flag for in
8861 parameters with the [Out] flag.
8863 2005-06-21 Martin Baulig <martin@ximian.com>
8866 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
8869 2005-06-21 Martin Baulig <martin@ximian.com>
8871 * class.c (mono_class_init): Don't initialize `class->fields' for
8872 generic instances since they're initialized again in
8873 compute_field_layout().
8874 (compute_field_layout): Set the field's `generic_info' here; fix
8877 2005-06-21 Martin Baulig <martin@ximian.com>
8880 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
8882 * metadata.c (mono_metadata_generic_method_equal): Also
8883 distinguish the `generic_class'; fixes #75334.
8885 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8889 * domain-internals.h:
8890 * reflection.c: 'domain_assemblies' field is now protected by its own
8891 lock. Don't call into managed code to run the AssemblyLoad event if we
8892 now there are no registered delegates for it.
8894 2005-06-20 Martin Baulig <martin@ximian.com>
8896 * class.c (mono_class_is_assignable_from): Use a custom version of
8897 mono_class_has_parent() to make things work for generic instances;
8900 2005-06-20 Martin Baulig <martin@ximian.com>
8902 * loader.c (method_from_methodspec): Apply a patch from
8903 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
8905 2005-06-20 Martin Baulig <martin@ximian.com>
8907 * class.c (mono_class_init): Reverted Zoltan's last change; it
8910 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
8912 * threads.c (wait_for_tids_or_state_change): Add missing locking.
8914 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8916 * socket-io.c: fix the index in the socket array for writable/error
8917 sockets. Fixes bug #75306.
8919 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
8921 * class.c (mono_class_init): Allow interfaces to have static ctors.
8923 2005-06-17 Martin Baulig <martin@ximian.com>
8925 * loader.c (method_from_methodspec): Use `context->container' when
8926 parsing the `gmethod->inst'.
8928 2005-06-17 Martin Baulig <martin@ximian.com>
8930 * class.c (mono_type_get_name_recurse): Don't add the assembly
8931 name for type arguments.
8933 2005-06-15 Martin Baulig <martin@ximian.com>
8935 * reflection.c (mono_image_get_inflated_method_token): Encode
8936 correct klass; fixes #75260.
8938 2005-06-13 Michal Moskal <malekith@nemerle.org>
8940 * icall.c: Make GetCorrespondingMethod/Constructor take
8941 MonoReflectionMethod method not MonoMethod. Removed
8942 MonoType.GetCorrespondingField, and make
8943 MonoGenericType.GetCorrespondingField take name not
8946 2005-06-13 Michal Moskal <malekith@nemerle.org>
8948 * reflection.c (field_encode_signature, encode_locals):
8949 Make sizes of buffers for types larger (for big generic types).
8950 (create_generic_typespec,
8951 mono_reflection_sighelper_get_signature_local,
8952 mono_reflection_sighelper_get_signature_field):
8953 Add asserts for too small buffers.
8955 2005-06-15 Martin Baulig <martin@ximian.com>
8957 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
8958 if our parent is not a dynamic type.
8960 2005-06-15 Martin Baulig <martin@ximian.com>
8962 * class-internals.h (MonoTypeNameFormat): New enum.
8965 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
8966 (mono_type_get_full_name): Removed.
8967 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
8968 argument instead of the boolean's.
8970 * icall.c (ves_icall_System_MonoType_getFullName):
8971 Added `gboolean assembly_qualified'.
8974 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
8976 * reflection.c (mono_reflection_parse_type): Parse the new type
8979 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8981 * icall.c: no need to convert from utf16 to utf8 and then back again
8982 after the call to GetLogicalDrives.
8984 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8986 * icall.c: frombase64. Fix problems exposed by new tests.
8988 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8990 * icall.c: added internal calls for converting char [] and strings in
8991 base64 into byte [].
8993 2005-06-10 Martin Baulig <martin@ximian.com>
8995 * class.c (mono_class_create_generic_2): Read the nested classes
8996 from the metadata rather than from `gklass->nested_classes' since
8997 `gklass' might not be initialized yet.
8999 2005-06-09 Duncan Mak <duncan@novell.com>
9001 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
9002 all public headers. Fixes #74919.
9004 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
9006 * domain.c: The key for proxy_vtable_hash is now a pointer
9007 array. Added new GHashFunc and GCompareFunc functions for this.
9009 * class.h: The list of interfaces in MonoRemoteClass is known in
9010 advance and can't grow (we create a new MonoRemoteClass if needed),
9011 so now the interface array can be allocated together with
9014 * object.c: Added a new method create_remote_class_key.
9015 Fixed mono_remote_class so it does not depend on
9016 mono_upgrade_remote_class.
9017 Removed extend_interface_array.
9018 Added new method clone_remote_class(), which makes a copy of a remote
9019 class and adds a new interface or class to it.
9020 mono_upgrade_remote_class() now creates a new remote class (or gets
9021 it from the cache) if an vtable upgrade is needed. In this way
9022 we make sure that other objects sharing the same remote class
9023 don't get the new vtable with unwanted interfaces.
9025 * object-internals.h:
9026 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
9028 * marshal.c: Track changes in mono_upgrade_remote_class().
9030 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
9031 * icall.c: Add runtime methods for obtaining members of inflated
9032 class, which were created from supplied non-inflated members. It
9033 is used in internal Get{Method,Constructor,Field} methods in
9036 2005-06-09 Martin Baulig <martin@ximian.com>
9039 (mono_reflection_bind_generic_method_parameters): Fix #75169.
9041 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
9042 * reflection.c (mono_image_basic_init): Define
9043 Version in MonoDynamicAssembly.
9045 2005-06-08 Martin Baulig <martin@ximian.com>
9050 (mono_method_signature_full): New public method; takes a
9051 `MonoGenericContext *'.
9052 (find_method): Use mono_method_signature_full() and pass the
9053 klass'es context to it.
9055 * class.c (mono_class_is_inflated_method): Use
9056 mono_method_signature_full() and pass the context to it.
9058 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
9060 * object.c: add proper locking in mono_remote_class_vtable(),
9061 fixes possible memory corruption.
9063 2005-06-08 Michael Meeks <michael.meeks@novell.com>
9065 * marshal.c (mono_remoting_marshal_init): set
9066 initialized after initialization.
9068 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
9072 2005-06-06 Michael Meeks <michael.meeks@novell.com>
9074 * object.c (extend_interface_array): fix really silly
9075 memory corrupting / comparison bug.
9077 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
9079 * reflection.c: Functions added to support the creation
9080 of CustomAttributeData, which includes Attribute data
9081 used by ReflectionOnly methods.
9083 * reflection.h: mono_reflection_get_custom_attrs_data and
9084 mono_custom_attrs_data_construct added (functions exposed).
9086 * icall.c: Added mono_reflection_get_custom_attrs_data
9089 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
9091 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
9094 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
9096 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
9098 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
9099 dynamic DllImportAttribute.
9101 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
9102 dynamic DllImportAttribute.
9104 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
9107 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9109 * threads.c: avoid segfault when an unstarted thread is aborted.
9111 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
9113 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
9114 Returns the name and version of the runtime for reporting.
9116 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9118 * appdomain.c: bump corlib version.
9119 * object-internals.h: new field in MonoReflectionAssembly.
9121 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9123 * object-internals.h: Carlos forgot to add this field.
9125 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
9127 * icall.c: Added create_version to create instances
9128 of Version of MonoReflectionAssemblyName. This change helps
9129 the AssemblyName tests to keep running fine.
9131 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
9133 * object.c (mono_method_return_message_restore): A somehow less
9134 intrusive fix for #75138.
9136 2005-06-03 Raja R Harinath <rharinath@novell.com>
9138 * object.c (mono_method_return_message_restore): Fix computation
9139 of expected number of out args.
9141 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
9143 * reflection.c (mono_image_get_method_info): Fix the case when the
9146 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
9148 * object.c: Added missing null check in
9149 mono_method_return_message_restore.
9151 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
9153 * reflection.c (mono_image_get_method_info): Handle the case when
9156 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
9158 * object.c: When creating the vtable for a proxy, take into account
9159 all inherited interfaces, not only the ones registered in
9160 iclass->interfaces. This fixs bug #74996.
9161 Also, in mono_method_return_message_restore, verify that the array
9162 of out args has the expected lengh.
9164 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9166 * socket-io.c: update the timeout in Poll when the call is interrupte.
9168 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9170 * socket-io.c: support abort/suspend in Select_internal after last
9173 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9175 * threadpool.c: remove warning.
9177 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9180 * socket-io.[ch]: Select_internal uses poll() now when available, thus
9181 removing the 1024 limit from select(). Runtime part of the fix for
9184 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9186 * socket-io.c: when resolving the addresses for the same
9187 host returned by gethostname(), get the local IPs from the interface
9188 list. Loopback addresses are discarded if the are interfaces up with
9189 non-loopback ones. Fixes bug #63265.
9191 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
9193 * appdomain.c, verify.c, object-internals.h, reflection.c:
9194 bumped corlib number to 36, and added new extra_flags field
9195 to ReflectionMethodBuilder and friends. Fixes #75060.
9197 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
9199 * gc.c: register a new weak link only if the object is non-null
9202 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
9204 * culture-info.h : short time pattern too.
9206 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
9208 * culture-info.h : expand long time pattern string length.
9210 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
9212 * culture-info-table.h : update (more French date format; #72788).
9214 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
9216 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
9217 the method is static. Fixes #75029.
9219 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
9221 * reflection.c: Update the table_idx field of method builders after
9222 saving the module, since it can change. This is a workaround for
9225 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
9227 * culture-info-table.h : update (additional French date format).
9229 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
9231 * icall.c (ves_icall_type_Equals): Revert last change.
9233 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
9235 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
9237 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
9239 * class-internals.h: Added executioncontext_class field to
9240 MonoDefaults structure.
9241 * domain.c: Cache System.Threading.ExecutionContext class in
9243 * object.c: Capture the ExecutionContext for asynchroneous calls in
9244 mono_async_result_new.
9245 * object-internals.h: Added execution_context and original_context
9246 fields to MonoAsyncResult. Added execution_context to MonoThread.
9247 * security-manager.c|.h: Added mono_get_context_capture_method to
9248 return the capture method (if required by the security manager or by
9249 the framework version used).
9250 * threadpool.c: Apply capture (if present) ExecutionContext in
9251 mono_async_invoke and revert to original context after it completes.
9253 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
9255 * culture-info-table.h : updated (real hacky solution for zh-CHT).
9257 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
9259 * culture-info-table.h : zh-CHT related workaround.
9261 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
9263 * marshal.c (emit_marshal_custom): Add some error checking and call the
9264 methods in the ICustomMarshaler interface. Fixes #74875.
9266 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
9267 native->managed wrappers.
9269 2005-05-12 Martin Baulig <martin@ximian.com>
9271 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
9272 here and use the loader lock.
9274 * mono-debug.c: Properly lock when the debugger is not attached.
9275 (mono_debug_init): Release the initial lock if we're not running
9278 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
9280 * marshal.c (emit_marshal_custom): Pass through NULL values without
9281 calling the custom marshalling routines.
9283 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
9284 conversion in structures. Fixes #74882.
9286 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
9288 * culture-info-table.h : zh-* cultures were missing.
9290 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
9292 * threads.c: Added a new event background_change_event which is signaled
9293 when a thread changes its background mode.
9294 Moved here several checks previously done in managed code. The checks
9295 require the thread lock, and using the thread lock in managed code
9296 can result in deadlocks.
9297 Merged Start_internal and Thread_internal into a single method. Now
9298 Thread_internal does all work of creating and starting a thread.
9299 Added icalls for setting and getting the state of the object. Moved from
9300 managed code to avoid locking there.
9301 Added wait_for_tids_or_state_change() which is called instad of
9302 wait_for_tids when waiting for non-backround threads to end. This method
9303 will return if one of the threads ends or the background_change_event
9305 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
9306 the background mode. This method signals the background_change_event
9309 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
9310 removed Start_internal.
9312 2005-05-11 Martin Baulig <martin@ximian.com>
9314 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
9315 to order of some fields to get proper alignment on 64-bit machines.
9317 2005-05-11 Martin Baulig <martin@ximian.com>
9319 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
9320 changes as they're broken and completely fuck up the debugger.
9322 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
9324 2005-05-10 Martin Baulig <martin@ximian.com>
9326 * reflection.c (mono_reflection_generic_class_initialize): Don't
9327 call mono_class_setup_parent() here.
9329 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9331 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
9332 send/receive timeout use an integer in milliseconds. We were using a
9335 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9338 (internal_get_cultures): reserve the first slot of the array for the
9339 InvariantCulture, which will be filled in managed code.
9341 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
9343 * reflection.c (mono_image_fill_module_table): Initialize the
9344 GENERATION field as well.
9346 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9348 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
9349 Monitor.Enter on the object.
9351 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
9353 * threads.c: Enable the wait for running threads when exiting.
9354 * icall.c: Suspend all threads before exiting.
9356 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
9358 * assembly.c (mono_assembly_load_reference): Fix warning.
9360 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9362 * threadpool.c: changed the default number of threads per cpu. From now
9363 on, the default will be 20 + (5 * number of cpus) instead of 50.
9365 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
9367 * loader.c (mono_method_get_signature_full): Add locking here.
9369 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
9371 * appdomain.c: Moved methods for parsing and freeing assembly
9372 names to assembly.c.
9373 * assembly.c, domain-internals.h: Created public methods for parsing
9374 assembly names. Fixed mono_assembly_load_with_partial_name:
9375 it now finds the best match, taking into account the version,
9376 token and culture specified in the partial name. Also return
9377 the latest version if no version information is specified.
9379 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
9381 * threadpool.c: replace check for SocketAsyncCall class.
9383 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9385 * threadpool-internals.h:
9386 * Makefile.am: added threadpool-internals.h
9388 * threadpool.c: call mono_unhandled_exception on exceptions not handled
9389 that happen in threadpool threads (tested on MS).
9390 (mono_thread_pool_remove_socket): new function that dispatch any pending
9391 AIO call on a socket that is closing. By now only epoll really needs it,
9392 as select/poll wake up when the socket closes.
9395 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
9397 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
9399 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
9401 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
9403 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
9405 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
9407 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
9408 has an abort request, convert it into a suspend request.
9410 2005-04-30 Ben Maurer <bmaurer@ximian.com>
9412 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
9413 warning for the usage of `UnmanagedFunctionPointerAttribute' which
9414 is not supported yet.
9416 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9418 * image.c: register assemblies loaded from data (bundles) in the loaded
9419 assemblies hash. Fixes bug #74772.
9421 2005-04-29 Martin Baulig <martin@ximian.com>
9423 * class.c (mono_type_get_name_recurse): Update to the new naming
9424 schema from the latest .NET 2.x beta2.
9425 (mono_class_setup_vtable_general): If we're a generic instance,
9426 copy the vtable from our generic type definition and inflate all
9429 * loader.c (find_method): Update to the new naming schema from the
9430 latest .NET 2.x beta2.
9432 2005-04-29 Raja R Harinath <harinath@gmail.com>
9434 * class.c (mono_class_init): Add a mono_loader_unlock to the
9437 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
9439 * icall.c (ves_icall_System_Environment_Exit): Remove the
9440 suspend_all_other_threads () call for the time being, since it can hang.
9442 * threads.c (mono_thread_manage): Similarly, disable the waiting for
9443 the background threads to exit, since it can also hang.
9445 * class.c (mono_class_init): Applied patch from Ankit Jain
9446 (radical@gmail.com). Avoid pending init errors when a field refers
9447 to a nested class using a typeref. Fixes #74734.
9449 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
9450 this for dynamic modules.
9452 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9454 * threads.c: don't wait for threads that are in the process of aborting
9455 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
9456 and waiting for background threads to finish. This makes xsp and
9457 mod-mono-server exit without random length delays and/or hangs.
9459 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9461 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
9463 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
9465 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
9466 dynamic types to prevent infinite loops. Fixes #74727.
9468 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
9469 ..._is_assignable_to.
9471 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
9473 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
9475 2005-04-25 Martin Baulig <martin@ximian.com>
9477 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
9480 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
9482 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
9484 * reflection.c (build_compressed_metadata): Set metadata header
9487 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
9489 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
9490 number into an integral and a decimal part. Fixes #70473.
9492 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
9494 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
9496 * culture-info-table.h : reflected the latest locale-builder output.
9498 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9500 * threadpool.c: check for SuspendRequested too when deciding if
9501 mono_thread_interruption_checkpoint should be called.
9503 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9505 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
9506 * threads.c: remove interruption_mutex and use Interlocked instead. When
9507 suspending all the threads, wait for all the suspended events at once.
9508 If we're shutting down and get an APC that is going to be queued,
9509 call mono_thread_execute_interruption immediately, as the thread might
9510 be sleeping on a pthread condition or mutex.
9512 * icall.c: call mono_runtime_set_shutting_down before suspending the
9515 Fixes bug #74693. And now xsp is happier when exiting.
9517 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
9519 * loader.c (mono_stack_walk): Fix #74690.
9521 2005-04-22 Martin Baulig <martin@ximian.com>
9523 * mono-debug.h (MonoDebugMethodJitInfo): Added
9524 `MonoDebugMethodJitInfo *jit'.
9526 * mono-debug.c (mono_debug_read_method): Cache the
9527 MonoDebugMethodJitInfo in `address->jit'.
9528 (mono_debug_free_method_jit_info): New public method.
9530 2005-04-22 Martin Baulig <martin@ximian.com>
9532 * class.c (mono_class_is_assignable_from): Disallow
9533 type parameter -> interface.
9535 2005-04-21 Dick Porter <dick@ximian.com>
9537 * threads.c (mono_thread_create): Turn an assertion into an error.
9539 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
9541 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
9543 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
9544 Fix some gcc 4.0 warnings.
9546 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
9548 * file-io.c: fix alt dir separator char on unix systems
9549 and cleanup (fixes bug #71214).
9551 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
9553 * marshal.c: Use CALLVIRT instead of CALL when dispatching
9554 a call to a remote domain, since the method may be an
9555 interface method in the client domain. This fixes bug #74192.
9557 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9559 * threadpool.c: recv/send are now performed before going back to managed
9560 code to save one transition.
9562 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9564 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
9566 * metadata/threadpool.c: removed hack to workaround the bug above.
9570 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
9572 * reflection.c reflection.h: Fix handling of parameter defaults in
9573 dynamic methods. Also fixes handling of parameter attributes.
9576 * mono-debug.c (mono_debug_close_image): Fix warning.
9578 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9580 * socket-io.h: replaced old unused field with new 'blocking'.
9581 * threadpool.c: restore socket blocking state on windows(tm).
9583 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
9585 * icall.c: don't return the codebase in the AssemblyName[] returned by
9586 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
9587 * object-internals.h: Removed FIXME (fields were presents) and fixed
9588 versioncompat declaration.
9590 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9592 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
9593 not closed, so don't cleanup when it happens.
9595 2005-04-13 Chris Toshok <toshok@ximian.com>
9597 * mono-debug-debugger.h: change prototype for
9598 mono_debugger_lookup_type.
9600 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
9601 this function, although it should probably be named
9602 mono_debugger_init_type.
9604 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9606 * threadpool.c: fix non-AIO case.
9608 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
9610 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
9611 the built-in profiler to measure just JIT compilation times.
9613 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9615 * threadpool.c: the epollfd might be closed by another thread at
9616 any time, so ignore EBADF at treat it as a "we're closing" sign.
9618 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9620 * threadpool.c: release the semaphores with a count equals to the number
9621 of working threads in both IO and regular pools. Fixed typo that messed
9622 up the count of IO pool threads. Don't initialize the pipe handles if
9625 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9627 * threadpool.c: some systems don't like a NULL when deleting the socket
9630 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9632 * threadpool.c: fix semaphore allocation.
9634 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9636 * threadpool.c: added epoll() based implementation for asynchronous IO
9637 that is used instead of the default poll() when available.
9638 It can be disabled by setting MONO_DISABLE_AIO.
9640 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9642 * threadpool.c: windows needs 'closesocket' and instead of returning
9643 0 when the stream is closed while in select, it returns -1. Fixes bug
9646 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
9648 * class.c (class_compute_field_layout): Fix the regression caused by
9651 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9653 * threadpool.c: separate pool for socket async. IO.
9654 * threadpool.h: mono_max_worker_threads is not a global any more.
9656 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
9658 * class.c (class_compute_field_layout): Fix #74549.
9660 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9662 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
9663 use 2 connected sockets instead.
9665 2005-04-08 Miguel de Icaza <miguel@novell.com>
9667 * mono-config.c: Add new entry point for mkbundle
9668 mono_config_parse_memory.
9670 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9672 * threadpool.c: removed another unused function.
9674 2005-04-08 Ankit Jain <radical@corewars.org>
9676 * reflection.c (get_default_param_value_blobs): Add 'types'
9677 parameter to get the types encoded in the constant table.
9678 (mono_param_get_objects): Use the type from the constant table,
9679 not the type of the parameter, when creating default values.
9680 Handle null default values correctly.
9682 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9689 * socket-io.c: removed dead code for async IO.
9691 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9693 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
9695 * threadpool.c: intercept socket async. calls and pass them to a thread
9696 that is polling and dispatching the job items to the threadpool as
9697 socket become ready. Fixes bugs #71217, #71933.
9699 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
9700 between char and short/ushort arrays.
9702 * socket-io.c: remove dead code.
9704 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
9707 icall.c : removed InternalToUpper_Comp() and
9708 InternalToLower_Comp().
9710 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
9712 * char-conversions.h : The tables were incorrectly generated. Should
9713 be generated against invariant culture.
9715 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
9717 * object.c (mono_runtime_invoke_array): Fix return value when
9718 passing pre-created valuetype objects to ctors.
9720 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
9721 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
9724 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
9726 * domain.c: removed g_assert for runtimesecurityframe_class. This is
9727 only used with --security and hides the wrong corlib version error.
9729 2005-03-30 Joshua Tauberer <tauberer@for.net>
9731 * class.c: Changed mono_class_name_from_token so that types
9732 outside of a namespace don't have an initial period. Improved
9733 the g_warning message used in _mono_class_get when loading
9735 * assembly.c: In mono_assembly_load_reference, when an assembly
9736 can't be found, "No such file or directory" is misleading and
9737 unhelpful because a few paths were checked for the presence of
9738 the assembly. When that happens (ENOENT), display a nicer
9739 message indicating the directories that were searched. In all
9740 cases, the warning is made easier to read for non-hackers.
9742 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
9744 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
9746 * appdomain.h|domain.c: Removed inline from functions.
9747 * appdomain.c: Reduced warnings when compiling on windows.
9748 * icall.c: Fixed output_debug declaration to gunichar2*.
9749 * mono-config.c: Reduced warnings when compiling on windows.
9750 * rand.c: Added missing "windows.h". Added missing return value.
9751 * rawbuffer.c: Added missing winsock2.h for windows.
9752 * sysmath.h: Added mono-compiler.h header to allow/ease
9753 compilation with non-GCC compilers.
9754 * threads.c: Fixed declarations to compile with VS.NET C compiler.
9755 Removed cast warnings.
9757 Adapted from the work of J Lothian (for VC6).
9759 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
9761 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
9764 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
9766 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
9769 2005-03-27 Raja R Harinath <harinath@gmail.com>
9771 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
9772 has to be in $(exec_prefix). $(prefix) is for arch-independent
9773 stuff, and it would probably use $(prefix)/share rather than
9776 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9778 * console-io.c: added 2 includes that might be missing.
9780 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
9782 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
9785 * reflection.c (create_custom_attr): Allocate the params array using
9786 alloca so it gets GC tracking.
9788 2005-03-23 Chris Toshok <toshok@ximian.com>
9790 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
9793 2005-03-24 Raja R Harinath <rharinath@novell.com>
9795 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
9796 changes to pick up any changes in prefix, etc.
9798 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
9800 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
9802 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
9803 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
9805 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
9807 * class-internals.h object-internals.h class.c reflection.c: Extend the
9808 mono_lookup_dynamic_token () function to return the class of the
9811 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
9814 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
9816 * security-manager.c: Skip inheritance checks for intra-corlib
9817 class inheritance and method overrides. This skips a lot of checks
9818 and (anyway) permissions cannot work until corlib is loaded.
9820 2005-03-23 Martin Baulig <martin@ximian.com>
9822 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
9823 MONO_TYPE_GENERICINST.
9825 2005-03-23 Martin Baulig <martin@ximian.com>
9827 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
9829 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9831 * class.c: added locking comments to some functions.
9832 Cache the interface offsets arrays (saves about 20 KB
9833 of runtime memory in a typical app).
9834 Reduce the time overhead in mono_class_setup_supertypes ().
9836 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
9838 * icall.c: speedup and fix leaks in GetMethodsByName and
9839 GetPropertiesByName.
9841 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9843 * reflection.c: some locking fixes.
9845 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9847 * metadata.c: added missing break in case statement.
9849 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
9851 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
9852 typedbyref return values. Fixes #73941.
9854 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
9856 * security-manager.c|h: Added demandunmanaged method and
9857 suppressunmanagedcodesecurity class to MonoSecurityManager.
9858 Renamed aptc class to allowpartiallytrustedcallers.
9860 2005-03-17 Martin Baulig <martin@ximian.com>
9862 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
9864 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9866 * file-io.c: disabled file async. IO using aio_*. It uses the
9867 threadpool now. Workaround for bug #73718.
9869 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
9871 * assembly.h, mono-config.c: added code to deal with bundled configs
9872 for bundled assemblies.
9874 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
9876 * *.c, private.h: cleanup, removing old private.h header file.
9878 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
9880 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
9881 and throw_on_unmappable_char attributes.
9883 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
9885 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
9886 _ProcessName_internal.
9888 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
9890 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
9893 * icall.c threads.c threads-types.h: Remove slothash icalls as they
9896 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
9898 * object.c (compute_class_bitmap): Add support for generics. Fixes
9901 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
9903 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
9905 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9907 * filewatcher.c: commented out the code for windows watcher, as we don't
9908 use it (we use the managed implementation instead).
9910 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
9912 * object-internals.h (MonoThread): Remove 'unused1' field.
9914 * appdomain.c: Bump corlib version.
9916 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
9918 * reflection.c (mono_reflection_create_runtime_class): Remove the
9919 AssemblyBuilder.Save optimization since it causes too many problems.
9921 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
9923 * exception.c|h: Added mono_get_exception_reflection_type_load to
9924 create a ReflectionTypeLoadException object.
9925 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
9926 to return NULL is a InheritanceDemand fails during reflection. Updated
9927 ves_icall_System_Reflection_Assembly_GetTypes to throw a
9928 ReflectionTypeLoadException if an InheritanceDemand fails during
9929 reflection. Added icall mapping for GetLinkDemandSecurity.
9930 * security-manager.c|h: Added ves_icall_System_Security_
9931 SecurityManager_GetLinkDemandSecurity internal call to return the
9932 class and methods permissions set for a LinkDemand. Removed unused
9933 fields in MonoSecurityManager.
9935 2005-03-10 Martin Baulig <martin@ximian.com>
9937 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
9938 it's a generic instance.
9940 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
9942 * reflection.c (mono_get_object_from_blob): Applied patch from
9943 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
9945 * class.c (mono_class_is_assignable_from): Another try at fixing
9946 #73469 without breaking anything.
9948 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
9950 * class.c: (mono_class_is_assignable_from): Revert the last changes
9951 since they don't work with generics.
9953 * class.c (mono_class_is_assignable_from): Fix build bustage.
9955 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
9956 the managed IsAssignableFrom method. Fixes #73469.
9958 * reflection.c (mono_reflection_call_is_assignable_from): New helper
9961 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
9963 * object.c (mono_load_remote_field_new): Fix returning uninitialized
9964 memory when the remoting callback does not sets the out arguments.
9967 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
9970 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
9972 * object-internals.h (MonoStackFrame): Sync with managed object layout.
9974 * appdomain.c: Bump corlib version.
9976 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
9978 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
9981 * threads.c (mono_thread_attach): Detect threads which are not started
9982 by the GC pthread wrappers.
9984 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
9986 * icall.c: Added new icall for RNG.
9987 * rand.c|h: Added new icall to open the RNG. This allows to share a
9988 single handle on Linux to access /dev/urandom and fix #73183.
9990 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9992 * object.c: setting the new vtable in a transparent proxy object must
9993 not change the GC descriptor.
9995 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
9997 * object.c: fixed compilation without GCJ support.
9998 * reflection.c: for runtime-created types ensure klass->has_references
9999 is correct (bug #73215).
10001 2005-03-02 Martin Baulig <martin@ximian.com>
10003 * class.c (mono_class_is_assignable_from): Make this work if
10004 `oklass' is a generic instance; fixes #72831.
10006 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
10008 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
10011 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
10013 * marshal.c: Reorganize native->managed marshalling code to also use
10014 the emit_marshal_... functions.
10016 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
10018 * object.c: typed allocs have issues with bitmap sizes > 30,
10019 so check for max_set >= 30.
10021 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
10023 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
10024 managed code. Fixes #73012.
10026 * metadata.h (MonoMarshalSpec): Add elem_mult field.
10028 * metadata.c reflection.c: Load/Emit elem_mult as well.
10030 * metadata.h (MonoMarshalSpec): Add comment.
10032 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
10034 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
10035 num_elem to -1 if not given.
10037 * object-internals.h (MonoReflectionMarshal): Add has_size field.
10039 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
10042 2005-03-01 Marek Safar <marek.safar@seznam.cz>
10044 * null-gc.c (mono_gc_free_fixed): Was not compilable.
10046 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
10048 * reflection.c (encode_marshal_blob): Encode param_num field as well.
10050 * object-internals.h (MonoReflectionMarshal): Add param_num field.
10052 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
10054 * object.c: generalized the reference bitmap creation
10055 and added hooks for the new GC.
10056 * class-internals.c: removed the gc_bitmap field from MonoClass.
10058 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10060 * domain.c: help the compiler to produce better code
10061 in mono_jit_info_table_find ().
10063 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
10065 * object.c: make all allocations look typed.
10067 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10069 * socket-io.c: load Mono.Posix if it's not loaded already
10072 2005-02-24 Martin Baulig <martin@ximian.com>
10074 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
10075 * reflection.c (dup_type): Likewise.
10077 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
10079 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
10080 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
10082 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10084 * domain.c, threads.c, object-internals.h: make the critical thread
10085 local vars use the fast access mode (even when we're compiled in
10086 a lib). Provide accessors to be used by the jit during codegen.
10088 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10090 * appdomain.c: Changed hook functios behavior to include
10091 support for the reflection only assemblies. Some icalls were changed
10092 to support the mentioned assemblies too. Signatures of static methods
10093 try_assembly_resolve and real_load now have an additional parameter:
10096 * assembly.c: General changes to mono_assembly_ methods to support
10097 reflection only api. Functions mono_assembly_open, mono_assembly_load,
10098 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
10099 suffix, to support an additional gbool parameter to specify whether
10100 the assembli is reflection only or not. Created some new hook functions
10101 to add support for reflection only assemblies. Signatures of static
10102 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
10103 have now an additional parameter: refonly.
10105 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
10106 indicating whether the assembly is reflection only or not.
10108 * exception.c: Add mono_get_exception_invalid_operation.
10110 * icall.c: Throw an InvalidOperationException when trying to invoke
10111 a property/method/event, or trying to set/get the value of a field.
10112 Also add an icall to retrieve the ref_only flag to the
10113 MonoReflectionAssembly.
10115 2005-02-23 Chris Toshok <toshok@ximian.com>
10117 Part of fix for #72827.
10118 * mono-debug.c (mono_debug_add_method): add lexical block data to
10119 the info we write. Kind of a hack at the moment - we copy the
10120 lexical block info from the MonoDebugMethodInfo to the
10121 MonoDebugMethodJitInfo here, before writing it.
10122 (mono_debug_read_method): read the lexical block info.
10124 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
10126 * debug-mono-symfile.h: add lexical block support.
10128 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
10131 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
10133 * loader.c (mono_lookup_pinvoke_call): Fix warning.
10135 * object.c (mono_runtime_free_method): Call mono_free_method () and
10136 put the TODOs there.
10138 * loader.c (mono_free_method): Free up most memory allocated for
10141 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10143 * reflection.c: properly flag a Type argument to a
10144 named custom attr value (bug #72248).
10146 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10148 * reflection.c: reduce code duplication in named custom
10149 attribute encoding.
10151 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
10153 * reflection.c: properly encode custom attrs of type object
10156 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
10158 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
10160 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
10162 * socket-io.c: load System.dll if it's not loaded already
10163 (bug #72850 and #70477).
10165 2005-02-21 Martin Baulig <martin@ximian.com>
10167 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
10170 2005-02-21 Martin Baulig <martin@ximian.com>
10172 * reflection.c (mono_image_build_metadata): We also need to
10173 "fixup" the MethodImpl table after we computed the final method
10174 indices. Call fixup_methodimpl() to do that.
10175 (fixup_methodimpl): New private method.
10177 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
10179 * assembly.c: special case mscorlib.dll (bug#72536),
10180 patch from Carlos Alberto Cortez.
10182 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
10184 * threads-types.h threads.c: Fix build bustage.
10186 * threads.c: Use a union for long<->double conversions.
10188 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
10189 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
10191 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
10192 containing the checkpoint call with NOT_TAKEN.
10194 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
10195 checkpoint before pushing the arguments, so they won't have to be
10198 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10200 * domain.c, assembly.c, domain-internals.h: make some data
10201 const and relocation-free.
10203 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10205 * object.c, appdomain.c, class-internals.h: introduce the
10206 MonoClassRuntimeInfo structure to hold the info needed to
10207 use a class at runtime. Made mono_class_vtable() lock-free
10208 for all the appdomains.
10210 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
10212 * metadata-internals.h, image.c: introduce a per-image mempool to
10213 be used for memory that has the same lifetime as the image.
10215 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
10217 * domain.c: In mono_init_internal(), instead of selecting the first
10218 runtime version supported by an executable, get a list of all
10219 supported versions and select the one for which an mscorlib exists
10220 (since even if the runtime supports a given version, it doesn't mean
10221 that the framework for that version is installed).
10222 Modified get_runtimes_from_exe to support this behavior.
10223 In supported_runtimes, added information about additional system
10226 * assembly.c: Added support for more than one system assembly version
10227 per runtime version. Updated the assembly list.
10228 In mono_assembly_remap_version, removed the initial version check,
10229 since we don't know to which version we need to compare until we
10230 get the version set on which the assembly is based.
10231 Moved the code for loading corlib into the new method
10232 mono_assembly_load_corlib(), so it can be used by the initialization
10235 * domain-internals.h: Updated data structures and added declaration
10236 for mono_assembly_load_corlib.
10238 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
10240 * reflection.c (resolve_object): Fix the creation of the signature in
10241 the SignatureHelper case.
10243 * assembly.c (mono_assembly_remap_version): Fix binary search.
10245 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
10247 * class.c: Added inheritance check when a method is overloaded (from a
10248 virtual method or when implementing an interface) and when a class is
10249 inherited. Added functions to set a failure for a class and to
10250 retreive the exception from a failure.
10251 * class-internals.h: Added fields to MonoClass to keep the exception
10252 information status for inheritance (or other exceptions) to be thrown
10253 later (i.e. not at load time).
10254 * object.c: Throw the inheritance SecurityException when a type is to
10255 be created with either class or method inheritance violations.
10256 * reflection.c|h: Fix when getting declsec from a class. Removed
10257 unrequired code for class. Improved sanity in parameter naming.
10258 * security-manager.c|h: Added functions to check for class and method
10261 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
10263 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
10264 and has_finalize in dynamic types as well.
10266 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
10268 * culture-info-table.h : fixed currency format for en-GB (and so on).
10270 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
10272 * gc.c: ensure the GC handles never have 0 as a value.
10274 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
10276 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
10277 a pointer to a struct to unmanaged code. Fixes #72625.
10279 2005-02-16 Martin Baulig <martin@ximian.com>
10281 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
10283 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
10285 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
10287 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
10289 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
10291 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
10292 UnmanagedFunctionPointerAttribute, use it for determining calling convention
10295 * reflection.c (mono_custom_attrs_get_attr): New helper function.
10297 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
10299 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
10301 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
10302 changes to make the current context a field in MonoThread.
10304 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
10306 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
10309 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
10310 extracted from mono_marshal_get_native_wrapper.
10312 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
10313 to create wrappers around native functions.
10315 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
10316 delegates for arbitrary function pointers. Fixes #71472.
10318 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10320 * threads.c: cleaned up the code a little.
10322 2005-02-15 Martin Baulig <martin@ximian.com>
10324 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
10327 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
10328 allocate larger chunks if needed.
10330 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
10332 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
10335 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
10337 * domain.c: keep the domains in an array and ensure the domain ids
10338 are kept small, so they can be used as indexes to domain-specific data
10339 with a small memory overhead.
10341 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
10343 * icall.c: Handle byref types in Type icalls. Fixes #72544.
10345 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
10347 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
10349 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
10351 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
10353 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
10356 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
10358 2005-02-12 Ben Maurer <bmaurer@ximian.com>
10360 * domain-internals.h: add the hashtable here.
10362 * class-internals.h: Remove `info' from MonoMethod
10364 * domain.c: Add a new hashtable, jit_trampoline_hash
10366 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10368 * object.c: don't set the value of static fields
10371 2005-02-11 Martin Baulig <martin@ximian.com>
10373 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
10374 (mono_debug_add_method): Silently ignore the method if it's too big.
10375 (mono_debug_add_type): Likewise.
10377 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
10379 * threads.c, appdomain.c: remove #ifdefs from the code.
10381 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
10383 * metadata-internals.h: Added flags to MonoAssembly to cache the most
10384 common security informations. This allows us to stay in unmanaged code
10385 when doing LinkDemand and it's special cases (except for the first
10386 time for initialization). The flags a very much used with --security.
10387 * reflection.c|h: Added code to get declarative security attributes
10388 for LinkDemand and InheritanceDemand. This required to refactor the
10389 existing code for Demand.
10390 * security-manager.c|h: Added new method fields for the special cases
10393 2005-02-10 Martin Baulig <martin@ximian.com>
10395 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
10396 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
10398 2005-02-10 Martin Baulig <martin@ximian.com>
10400 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
10401 debugging code; this is almost a complete rewrite.
10403 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
10405 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10407 * domain.c, object.h: expose mono_string_equal () and
10408 mono_string_hash ().
10409 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
10410 it's implemented in managed code.
10412 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10414 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
10415 lo leak objects between appdomains.
10417 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10419 * assembly.c: old compilers compilation fix from
10420 robertj@gmx.net (Robert Jordan).
10422 2005-02-09 Ben Maurer <bmaurer@ximian.com>
10424 * class-internals.h: Little reminder for the future.
10426 * debug-helpers.c: Fix up wrapper_type_names
10428 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10430 * image.c, metadata-internals.h: when loading an image from a file,
10431 mmap all of it and use the same codepaths as when using a
10432 in-memory image: the code is simpler and we use less memory
10433 (both writable and readonly).
10435 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10437 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
10438 API to alloc runtime data structures that need to be tracked by the
10439 GC and contain pointers.
10440 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
10441 make the code more readable and eventually use a different GC.
10443 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
10445 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
10448 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
10450 * object.c: In release_type_locks(), don't release the cctor lock
10451 if it has already been released. This fixes a crash in the
10454 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10456 * gc.c, marshal.c, icall.c: register a delegate for finalization
10457 only when the native function pointer has been allocated for it.
10459 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10461 * object.c: cleaned up some code, allocate objects that are
10462 pointer free with the atomic malloc variant. Allocate memory
10463 for static data from the mempool if it's pointer-free.
10464 Allocate the bounds array at the end of the array data, when needed.
10465 * object-internals.h, object.h: move a private function in a private
10467 * class.c: handle missing case in tracking references in fields.
10469 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10471 * class.c, class-internals.h: keep track if a type has
10472 reference fields in either the instance or static fields.
10474 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
10476 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
10477 and renamed to MonoRuntimeInfo. Added fields to store the expected
10478 framework assembly version. Changed mono_get_framework_version and
10479 mono_get_runtime_version for a single mono_get_runtime_info method.
10481 * assembly.c: Added method to remap system assembly versions to the
10482 current executing runtime version. Removed old mapping code.
10483 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
10485 * icall.c, reflection.c: Track api changes.
10487 2005-02-06 Miguel de Icaza <miguel@novell.com>
10489 * loader.c (method_from_memberref): Improve error reporting,
10490 produce the class name instead of the typeref/typedef index.
10492 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
10494 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
10496 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10498 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
10499 stdcall and charset name mangling. Reorganize the code and add
10500 some tracing stuff.
10502 2005-02-05 Ben Maurer <bmaurer@ximian.com>
10504 * monodiet.c: More iters!
10506 * marshal.c: Iter usage.
10508 * icall.c: Iter usage.
10510 * object.c: Use iters.
10512 * debug-helpers.c: More iters
10514 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10516 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
10519 2005-02-05 Ben Maurer <bmaurer@ximian.com>
10521 * mono-debug-debugger.c: use iters
10523 * class.c, class-internals.h: mono_class_setup_events is static
10526 * All callers: use iters
10528 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10530 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
10531 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10533 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
10535 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
10537 * marshal.h: Add prototypes for ldfld/stfld_remote.
10539 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
10540 this is called during startup.
10542 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10544 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
10545 MonoThreadsSync struct private in monitor.c. Changed the way
10546 MonoThreadsSync is allocated so it's faster and there is no
10547 need to keep track of it with a finalizer and it uses less memory.
10548 This also finally allows us to allocate mono objects as ptrfree when
10549 there are no reference fields.
10551 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
10553 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
10554 disappearing link to the GC interface and use them to simplify
10555 the gchandles code.
10557 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
10559 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
10560 stfld_remote which call mono_load/store_field_new. This allows methods
10561 calling ldfld/stfld wrappers to be AOTed.
10563 * console-io.c: Include sys/filio.h under solaris.
10565 * console-io.c: Include curses.h if needed correctly.
10567 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
10569 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
10570 method->klass as well.
10572 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
10574 * class.c (mono_class_init): Switch on lazy initialization of
10577 * class.c (mono_class_get_finalizer): Handle the case when the
10578 finalizer is inherited.
10580 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10582 * console-io.c: <curses.h> is needed by term.h on solaris.
10584 2005-02-03 Ben Maurer <bmaurer@ximian.com>
10586 * icall.c, class-internals.h, monodiet.c, class.c: Remove
10587 mono_class_setup_properties where possible. Remove this ftn from
10588 the header file, and make it static.
10590 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
10592 * loader.c: Add missing setup_... call.
10594 * class.c: Add missing setup_... calls.
10596 * class.c (mono_class_init): Switch on lazy initialization of
10597 the generic vtable.
10599 * class.c (mono_class_init): Fix generics broken by the recent changes.
10601 * monodiet.c (handle_type): Add missing setup_... calls.
10603 * class.c: Back out garbage in previous patch.
10605 * class.c: Add missing setup_... calls.
10607 * class.c (mono_class_get_method_from_name_flags): Avoid calling
10608 mono_class_setup_methods () if possible.
10610 * class-internals.h (MonoClass): Add 'has_cctor' flag.
10612 * class-internals.h (MonoCachedClassInfo): New structure.
10614 * class.c: Initialize properties and events fields of MonoClass lazily.
10616 * class.c: Add infrastructure for lazily initializing the methods and
10617 vtable fields of MonoClass. Not yet used.
10619 * class.c (mono_class_get_finalizer): New helper function.
10621 * class.c: Add infrastructure for loading some class related data from
10624 * object.c: Add infrastructure for initializing the vtable from data
10627 * gc.c (run_finalize): Use mono_class_get_finalizer ().
10629 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
10630 appropriate initialization function before accessing parts of the
10631 MonoClass structure.
10633 * marshal.c: Fix warnings.
10635 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
10637 * mono-debug-debugger.c (get_exception_message): Use
10638 mono_class_get_method_from_name_flags ().
10640 2005-02-02 Ben Maurer <bmaurer@ximian.com>
10642 * reflection.c, appdomain.c: Replace a few manual searches that
10643 Zoltan missed. (Paolo approved this part of my initial patch).
10645 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
10647 * profiler.c: disable recording statistical events at report time.
10649 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10651 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
10652 to byteswap arrays of enum values, too (bug #72080).
10654 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
10656 * appdomain.c (set_domain_search_path): Allow this to be called if
10657 domain->setup is not yet set.
10659 * loader.c (mono_method_get_index): New helper function.
10661 * loader.c reflection.c: Use mono_method_get_index ().
10663 * class.c (mono_class_get_method_from_name_flags): New helper method.
10665 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
10668 * class.c (mono_class_get_cctor): New helper method.
10670 * string-icalls.c object.c class.c marshal.c reflection.c: Use
10671 mono_class_get_method () to look up methods.
10673 2005-02-01 Miguel de Icaza <miguel@novell.com>
10675 * console-io.c: Fix the build, this should work on Windows.
10677 2005-01-31 Ben Maurer <bmaurer@ximian.com>
10679 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
10680 be set to null to keep things valid
10682 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10684 * icall.c: added Console 2.0 icalls.
10685 * Makefile.am: added console-io.[ch]
10686 * console-io.[ch]: internal calls for Console 2.0 API.
10688 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10690 * class.c: make sure we consider all the interfaces
10691 when calculating max_interface_id (bug found by
10692 Jeroen Frijters running ikvm).
10694 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
10696 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
10697 valuetype fields to null.
10699 * object.c (set_value): Ditto. Fixes #71669.
10701 2005-01-31 Martin Baulig <martin@ximian.com>
10703 * metadata.c (mono_metadata_has_generic_params): New public
10704 function; checks whether something is a generic method.
10706 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10708 * appdomain.c: fix infinite recursion when adding assemblies.
10710 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
10712 * object.c: Fix small typo to return all items for Environment.
10713 GetCommandLineArgs.
10715 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10717 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
10718 reflection.c: more domain and assembly-unload related fixes
10719 and memory leaks plugs.
10721 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
10723 * class.c loader.c security.c loader.h process.c threads.c mono-debug-debugger.c profiler.c marshal.c rand.cpedump.c: Fix 64 bit warnings.
10725 2005-01-29 Ben Maurer <bmaurer@ximian.com>
10727 * loader.c (mono_method_signature): Make this method lazy
10728 (mono_get_method_from_token): Don't computate the signature here.
10730 Doing this saves quite a bit of memory. I got 90 kb on starting up
10731 monodoc. It should also save some disk reads on startup.
10733 * *: MonoMethod->signature might be NULL now. You *MUST* use
10734 mono_method_signature.
10736 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
10738 * object.c (mono_runtime_get_main_args): Return an array from the
10739 current domain here. Fixes #71938.
10741 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10743 * monitor.c: formatting changes to comply with the
10744 mono coding style and remove #ifdefs from the code.
10746 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10748 * metadata.c, private.h: remove some unneeded data
10749 and use a more compact representation for table schemas.
10751 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10753 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
10754 to get a better distribution in hash tables.
10755 * *.c: use mono_aligned_addr_hash() where appropriate.
10756 * assembly.c: make var static.
10758 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
10760 * domain-internals.h: Put MonoJitInfo on a diet.
10762 * domain.c: Fix a warning.
10764 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10766 * gc.c: rework the gc handles code to reuse handles
10769 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10771 * domain.c: fixed long standing bug in mono_string_equal() which
10772 was brought to light with the ldstr changes.
10774 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
10776 * reflection.c: Remove warning by adding missing include for marshal.h
10778 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10780 * domain.c, object.c: change the ldstr_table to hold
10781 MonoString* as keys: makes the runtime isinterned lookup
10782 faster and simplifies memory management.
10784 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
10786 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
10787 possible to add imperative security checks before calling the icall.
10788 * reflection.c: Return security attributes on the original MonoMethod
10789 (and not the wrapped one). This fix permissions on icalls.
10791 2005-01-25 Dick Porter <dick@ximian.com>
10793 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
10794 the check for mktime() support actually test the mktime() return
10795 value. "Fixes" bug 71682, though the output is still different to
10798 2005-01-25 Martin Baulig <martin@ximian.com>
10800 * class.c (mono_class_is_assignable_from): Make this work for
10803 2005-01-24 Ben Maurer <bmaurer@ximian.com>
10805 * marshal.c (mono_string_utf8_to_builder)
10806 (mono_string_builder_to_utf16): We might not have ownership of the
10807 string. In thise case, we need to create a new buffer.
10809 * object-internals.h (mono_stringbuilder_capacity): sb->str might
10810 be null, in which case, use the default capacity.
10812 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10814 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
10815 GC events to the profiler.
10817 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10819 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
10820 if you don't want the GC to run.
10822 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
10824 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
10825 start providing a GC API and keeping different implementations in
10827 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
10829 2005-01-22 Ben Maurer <bmaurer@ximian.com>
10831 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
10832 mmap rather than allocating a huge buffer.
10833 (mono_debug_close_mono_symbol_file): Free the buffer allocated
10836 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
10838 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
10839 and CheckExecutionRights.
10840 * reflection.c|h: Keep the index of the declarative security to be
10841 used, instead of the pointer, when AOT compiler is used. Also add
10842 class initialization when requesting demands.
10843 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
10844 CheckExecutionRights. Both properties are now FALSE by default, and
10845 unmodifiable, unless the --security option is used.
10847 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10849 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
10850 reflection.c: properly refcount images and assemblies, many leaks fixed.
10852 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10854 * threadpool.c: increase the timeout for threads in the thread pool to
10855 10s. Fixes bug #67159.
10857 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
10859 * class-internals.h: Sun's compiler insists on explicit
10860 signed on bit fields to handle then correctly.
10862 2005-01-19 Miguel de Icaza <miguel@ximian.com>
10864 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
10865 Make the size of the array fit only the number of invalid path
10866 chars that we have.
10868 * class.c (_mono_class_get): Improve the error reporting when a
10869 class referenced is not found, to assist debugging.
10871 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
10873 * threads.c: fix off-by-one error.
10874 * domain.c: free data allocated in the domain.
10876 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
10878 * reflection.c (mono_method_body_get_object): Fill out exception info
10881 * object-internals.h: Add MonoReflectionExceptionHandlingClause
10884 2005-01-19 Martin Baulig <martin@ximian.com>
10886 * loader.c (mono_get_method_constrained): Make this work again.
10888 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
10890 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
10891 guint16 to match the managed side.
10893 * reflection.c (mono_reflection_body_get_object): Fill out local
10896 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
10899 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
10900 'local_var_sig_token'.
10902 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
10904 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
10907 * reflection.c (mono_method_body_get_object): Handle abstract and
10910 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
10912 * marshal.c, loader.c, class-internals.h, reflection.c:
10913 store the emthod data for a wrapper in an array instead of a list.
10915 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
10917 * marshal.c: change the code to allocate memory more
10918 conservatively for method wrappers.
10920 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10922 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
10923 fields from MonoClass to the marshal info structure where they belong.
10925 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10927 * class.c, object.c, class-internals.h, marshal.c: rearrange
10928 some fields and tweak some types to lower memory usage.
10930 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
10932 * threads.c (signal_thread_state_change): Handle the case when the
10933 target thread is the current thread.
10935 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
10937 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
10938 emit_ptr_to_object_conv.
10940 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
10941 marshalling. Fixes #71352.
10943 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10945 * metadata.h, blob.h: move table enum to blob.h so it can be included
10947 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
10948 cut the size of MonoImage/MonoDynamicImage.
10950 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
10952 * profiler.c (mono_profiler_install_simple): Fix default arguments.
10954 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
10956 * reflection.c, reflection.h, icall.c: add a function to check
10957 if an attribute type is defined for a metadata object.
10959 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
10961 * object-internals.h: Added some needed fields from StringBuilder class.
10962 * marshal.c: Set the maxCapacity when creating a StringBuilder.
10964 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
10966 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
10967 threads before shutting down the runtime.
10969 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
10971 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10973 * object-internal.h, threads.c: implement stacksize and
10974 parameterized thread start functionality (requires
10975 matching corlib). Marked broken code for later removal.
10977 2005-01-12 Martin Baulig <martin@ximian.com>
10979 * class-internals.h (MonoGenericClass): Moved the `initialized'
10980 flag to MonoDynamicGenericClass, removed `init_pending'.
10981 (MonoGenericInst): Added `is_reference' flag.
10983 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
10985 * reflection.c (mono_image_create_pefile): Only set the pe_offset
10986 inside the MSDOS header. Fixes #71201.
10988 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
10990 (mono_domain_finalize): Ditto.
10992 2005-01-12 Martin Baulig <martin@ximian.com>
10994 * class.c (mono_get_shared_generic_class): Use the cache for
10995 non-dynamic generic classes.
10997 * class-internals.h (mono_class_create_generic_2): Removed
10998 function prototype, this function is now static inside class.c.
11000 * class.c (mono_class_create_generic_2): Made this static, only
11001 call it from mono_class_init() and mono_class_setup_parent().
11002 (collect_implemented_interfaces_aux): Call mono_class_init() on
11003 the interfaces we collect.
11004 (mono_class_setup_vtable): Call mono_class_init (class->parent).
11006 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
11008 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
11009 it a real thread handle.
11011 * domain-internals.h: Move exvar_offset from MonoJitInfo to
11012 MonoJitExceptionInfo, since each catch clause needs its own variable.
11014 2005-01-11 Dick Porter <dick@ximian.com>
11016 * image.c (mono_pe_file_open): New variant on mono_image_open()
11017 that does not set up the CLI metadata; used for FileVersionInfo so
11018 it can get the data for windows binaries too.
11020 * process.c (process_read_string_block): Don't read off the end of
11021 the StringTable block.
11023 These both fix bug 70766.
11025 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
11027 * gc.c: set some fields to NULL at GC cleanup time.
11028 * threads.c: if we quit the main thread, call exit ().
11030 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
11032 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
11034 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
11036 * threads.h, threads.c, object.c: added accessor and settor for
11037 main_thread. Handle it specially when exiting from it: wait
11038 for other foreground threads to exit.
11040 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11042 * process.c, verify.c: remove some bloat.
11044 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
11046 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
11047 the calling convention to cdecl under win32.
11049 2005-01-08 Ben Maurer <bmaurer@ximian.com>
11051 * object.c (mono_object_get_size): New function to get the size of
11052 an object instance.
11054 * profiler.c (simple_allocation): Use above.
11056 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
11058 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
11059 ves_icall_System_AppDomain_getRootDomain (as it's not required to
11060 get an appdomain by it's id and we can't assume the root's id is 0).
11061 * domain-internals.h: Change the function prototype to match.
11062 * icall.c: Change the icall table for AppDomain.
11064 2005-01-08 Miguel de Icaza <miguel@ximian.com>
11066 * locales.c (string_invariant_compare_char): Only compute
11067 GUnicodeTypes in the case where we need them. Test for ordinality
11068 first and return if so.
11073 * FIXME: here we must use the information from c1type and c2type
11074 * to find out the proper collation, even on the InvariantCulture, the
11075 * sorting is not done by computing the unicode values, but their
11076 * actual sort order.
11079 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11081 * loader.c: for P/Invoke methods, allow the "Internal" shared
11082 library name to refer to the calling process symbol namespace.
11084 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
11086 * Makefile.am: Add the security manager to the build.
11087 * security-manager.c|h: New. Initialization of the security manager.
11089 2005-01-07 Dick Porter <dick@ximian.com>
11092 * monitor.c: Update thread state during Monitor and WaitHandle
11093 waits. Fixes bug 71031.
11095 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
11097 * reflection.c (property_encode_signature): Correctly handle when the
11098 property has no methods.
11100 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
11102 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
11104 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
11105 fields from mb, not rmb. Fixes #71017.
11107 * marshal.c (emit_ptr_to_str_conv): Add support for
11108 ByValTStr -> string conversion. Fixes #71015.
11110 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
11112 * mempool.c (mono_mempool_contains_addr): New helper function.
11114 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11116 * metadata.c (mono_metadata_compute_size): Fix size calculation of
11117 HasSematics encoded fields.
11119 * metadata.c (mono_type_to_unmanaged): Improve error message for
11120 invalid string marshalling.
11122 * metadata.c: Fix warnings.
11124 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11126 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
11129 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11131 * domain.c object.c domain-internals.h: Revert part of r38077 since the
11132 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
11135 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
11137 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
11138 so methods containing these can be AOTed.
11140 2005-01-03 Martin Baulig <martin@ximian.com>
11142 * loader.c (find_method): Removed the hack for generic instances.
11143 (method_from_memberref): If our parent is a generic instance, pass
11144 its generic type definition to find_method() and then inflate the
11146 (mono_get_method_constrained): Pass the generic type definition to
11147 find_method() and inflate the method later.
11149 * class-internals.h (MonoStats): Added `generic_class_count'.
11151 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
11152 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
11154 * reflection.c (mono_custom_attrs_from_params): Don't ignore
11155 generic type definitions.
11157 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
11159 * loader.c icall.c: Fix warnings.
11161 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
11163 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
11164 blittable types. Fixes #70864.
11166 2004-12-29 Martin Baulig <martin@ximian.com>
11169 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
11171 * reflection.c (mono_method_get_object): Create a
11172 "System.Reflection.MonoGenericMethod" for inflated methods; don't
11173 call mono_get_inflated_method().
11175 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
11177 2004-12-27 Martin Baulig <martin@ximian.com>
11179 * class-internals.h (MonoMethod): Added `is_inflated' flag.
11180 (MonoMethodInflated): Added `inflated' field.
11182 * class.c (mono_class_inflate_generic_method): Don't really
11183 inflate the method here; just set the `is_inflated' flag in the
11185 (mono_class_get_inflated_method): Actually inflate the method here
11186 if it's not already inflated; we use the MonoMethodInflated's new
11187 `inflated' field as a cache.
11189 2004-12-26 Martin Baulig <martin@ximian.com>
11192 (inflate_generic_class): Moved some code out of inflate_generic_type().
11193 (mono_class_inflate_generic_method): If we're already inflated,
11194 inflate the context and use the declaring method; ie. make sure
11195 the declaring method of an inflated method is always the generic
11197 (mono_class_create_from_typedef): Create
11198 `class->generic_container->context->gclass'.
11200 2004-12-24 Ben Maurer <bmaurer@ximian.com>
11202 * metadata-internals.h, marshal.c, reflection.c: More
11203 MonoGHashTable->GHashTable.
11205 * domain-internals.h, class.c: Change MonoGHashTable's into
11206 GHashTables for some cases where no gc stuff is used
11208 All users: update apis
11210 2004-12-23 Ben Maurer <bmaurer@ximian.com>
11212 * metadata.c (builtin_types): Make this `const'. Makes this get
11213 put into the shareable section.
11214 (mono_metadata_init): Casts to make gcc happy.
11216 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
11218 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
11220 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
11222 * icall.c: Added an internal call to retrieve the position and length
11223 of assembly-level declarative security attributes (RequestMinimum,
11224 RequestOptional and RequestRefuse). This is used by the Assembly class
11225 to re-create the corresponding permission sets.
11227 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11229 * marshal.c: fix the stelemref wrapper to be type correct
11232 2004-12-20 Ben Maurer <bmaurer@ximian.com>
11234 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
11235 to do key & 0x7fffffff. Hashtable already does this. It just
11236 results in longer code.
11238 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
11240 * appdomain.c: Bump corlib version.
11241 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
11242 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
11243 * reflection.c|h: Add functions to get declarative security infos
11244 (blob position and length) for assemblies, classes and methods.
11246 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
11248 * reflection.c: sort the constant table (bug #70693).
11250 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
11252 * object-internals.h, threads.c, domain.c: add accessors for
11253 the MonoThread and MonoDomain tls keys.
11255 2004-12-18 Martin Baulig <martin@ximian.com>
11257 * class.c (inflate_generic_type): If we're inflating a generic
11258 instance, set `ngclass->context->container = context->container';
11259 ie. the container we inflated into.
11261 * metadata.c (mono_metadata_parse_generic_param): Reflect above
11262 inflate_generic_type() changes.
11264 2004-12-17 Martin Baulig <martin@ximian.com>
11266 * class-internals.h
11267 (MonoGenericClass): Replaced `MonoType *generic_type' with
11268 `MonoClass *generic_class'. Removed `dynamic_info'; if
11269 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
11270 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
11272 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
11274 * exception.c (mono_exception_from_token): New helper function.
11276 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
11278 * assembly.c (mono_assembly_load_with_partial_name): Call
11279 mono_assembly_loaded before invoking the preload hooks. Fixes
11282 * object-internals.h (MonoThread): Change culture_info and
11283 ui_culture_info into an array.
11285 * threads.c: Cache culture info objects from more than one appdomain.
11287 * threads.c threads-types.h icall.c: Add icalls for manipulating the
11288 current UI culture.
11290 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
11292 * threads.h threads.c appdomain.c: Clear the culture_info field of
11293 all threads during unloading if they point to an object in the dying
11296 2004-12-13 Ben Maurer <bmaurer@ximian.com>
11298 * culture-info.h (TextInfoEntry): New struct
11299 * object-internals.h: sync with managed
11300 * locales.c: fill the `text_info_data' field
11301 * culture-info-tables.h: update
11303 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11305 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
11308 2004-12-12 Ben Maurer <bmaurer@ximian.com>
11310 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
11311 (ves_icall_ModuleBuilder_getMethodToken): Ditto
11313 2004-12-12 Martin Baulig <martin@ximian.com>
11315 * mono-debug-debugger.c (write_type): If we're an enum and the
11316 builtin types have already been initialized, call mono_class_init().
11318 2004-12-11 Martin Baulig <martin@ximian.com>
11320 * metadata.c (mono_metadata_load_generic_params): Added
11321 `MonoGenericContainer *parent_container' argument; automatically
11322 compute `container->is_method'; pass the correct owner to
11325 * reflection.c (compare_genericparam): Sort the GenericParam table
11326 according to increasing owners.
11328 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11330 * profiler.c: allow disabling the default profiler.
11332 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
11334 * decimal.c, icall.c: allow disabling System.Decimal support.
11336 2004-12-09 Marek Safar <marek.safar@seznam.cz>
11338 * reflection.c: Add support for null attribute arguments.
11340 2004-12-09 Martin Baulig <martin@ximian.com>
11342 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
11343 names to get rid of compiler warnings.
11345 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11347 * marshal.c (mono_marshal_get_struct_to_ptr): Call
11348 mono_marshal_load_type_info (). Fixes #69625.
11349 (mono_marshal_get_ptr_to_struct): Likewise.
11351 2004-12-08 Martin Baulig <martin@ximian.com>
11353 * mono-debug.h: Bumped version number to 47.
11355 * mono-debug-debugger.c
11356 (mono_debugger_event_handler, mono_debugger_event): Take two
11357 guint64 arguments insteed of a gpointer and a guint32.
11359 2004-12-08 Martin Baulig <martin@ximian.com>
11361 * debug-mono-symfile.h
11362 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
11363 `address' to `native_offset'.
11365 2004-12-08 Martin Baulig <martin@ximian.com>
11367 * class.c (mono_class_create_from_typespec): Only inflate if we
11368 either have `context->gclass' or `context->gmethod'.
11370 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11372 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
11374 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
11376 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
11378 * reflection.c (mono_assembly_get_object): Remove the workaround put
11379 in for the release.
11381 * appdomain.c: Use the corlib_internal field from MonoAssembly.
11383 * appdomain.c: Bump corlib version.
11385 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
11386 be visible in other appdomains.
11388 2004-12-07 Ben Maurer <bmaurer@ximian.com>
11390 * threads.c: Interlocked inc and dec for longs were messed up,
11391 use a KISS based impl for this. Fixes 70234
11393 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
11395 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
11397 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11399 * icall.c: fix to follow policy not to allow struct
11400 arguments in icalls.
11402 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11404 * process.c: make the patch that handles spaces in file paths work
11405 on mono/windows too.
11407 2004-12-06 Martin Baulig <martin@ximian.com>
11409 * class.c (mono_class_create_generic): Call
11410 mono_class_setup_supertypes() if we're dynamic.
11411 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
11413 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
11415 * object-internals.h: Add new fields to MonoThread.
11417 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11419 * icall.c threads-types.h threads.c: Add new icalls.
11421 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
11423 * object-internals.h (MonoReflectionAssembly): Sync object layout with
11426 * appdomain.c: Bump corlib version.
11428 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
11429 internal assemblies. Fixes #69181.
11431 2004-12-05 Martin Baulig <martin@ximian.com>
11433 * class.c (mono_class_inflate_generic_signature): Make this a
11434 no-op if `context' is NULL or we don't have any type parameters;
11435 also copy `sentinelpos'.
11437 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
11439 * image.c: Add unbox_wrapper_cache.
11441 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
11443 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
11444 function generator.
11446 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
11449 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
11451 2004-12-04 Martin Baulig <martin@ximian.com>
11453 * loader.c (mono_method_get_signature_full): New public function;
11454 like mono_method_get_signature(), but with an additional
11455 `MonoGenericContext *' argument.
11457 * class.c (mono_class_inflate_generic_signature): Formerly known
11458 as inflate_generic_signature(); make this public.
11460 2004-12-04 Martin Baulig <martin@ximian.com>
11463 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
11464 instead of a `MonoGenericContainer *'.
11465 (mono_metadata_parse_array_full): Likewise.
11466 (mono_metadata_parse_signature_full): Likewise.
11467 (mono_metadata_parse_method_signature_full): Likewise.
11468 (mono_metadata_parse_generic_inst): Likewise.
11469 (mono_metadata_parse_generic_param): Likewise.
11470 (mono_metadata_parse_mh_full): Likewise.
11471 (mono_type_create_from_typespec_full): Likewise.
11473 2004-12-03 Martin Baulig <martin@ximian.com>
11475 * class-internals.h (MonoGenericContainer): Replaced the
11476 `MonoGenericContext * pointer with a `MonoGenericContext'
11477 structure and made it the first element.
11479 2004-12-03 Martin Baulig <martin@ximian.com>
11482 (inflate_generic_type): Set the `context->container' when creating
11483 a new MonoGenericContext.
11484 (mono_class_inflate_generic_method): Likewise.
11485 (mono_class_create_from_typespec): Just use `context->container'
11486 to get the container.
11488 * loader.c (method_from_methodspec): Set `context->parent' from
11489 `context->container' - and if that's a method container, use its
11490 parent. Also set the `context->container' when creating a new
11491 MonoGenericContext.
11492 (mono_get_method_from_token): Use just `context->container' to get
11495 * metadata.c (do_mono_metadata_parse_generic_class): Also set
11496 `gclass->context->container'.
11498 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
11499 the `context->container' when creating a new MonoGenericContext.
11501 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
11503 * reflection.c (compare_genericparam): Sort params with identical
11504 owner by their number. Fixes gen-111 on sparc.
11506 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
11508 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
11509 around the domain changes.
11511 * appdomain.c (mono_domain_unload): Handle the case when the thread
11512 calling Unload is itself being aborted during unloading. Fixes #70022.
11514 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
11516 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
11517 checkpoint_func as an icall so it gets a wrapper.
11518 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
11519 in the cross-appdomain wrappers too.
11521 * threads.c (mono_thread_has_appdomain_ref): Make this public.
11523 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
11525 * reflection.c: Fix some memory leaks.
11527 2004-12-02 Martin Baulig <martin@ximian.com>
11529 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
11531 * metadata.c (generic_class_cache): New static hashtable.
11532 (mono_metadata_lookup_generic_class): New public method.
11534 2004-12-02 Martin Baulig <martin@ximian.com>
11536 * class.c (mono_class_create_from_typedef): Call
11537 mono_class_setup_parent() and mono_class_create_mono_type() before
11538 parsing the interfaces.
11540 2004-12-02 Martin Baulig <martin@ximian.com>
11542 * metadata.c (generic_inst_cache): New static hashtable.
11543 (mono_metadata_lookup_generic_inst): New public function.
11544 (mono_metadata_inflate_generic_inst): New public function.
11545 (mono_metadata_parse_generic_inst): New public function.
11546 (do_mono_metadata_parse_generic_class): Use the new
11547 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
11548 since this'll also use the cache.
11550 * reflection.c (mono_reflection_bind_generic_method_parameters):
11551 Use mono_metadata_lookup_generic_inst() to use the new cache.
11553 * class.c (inflate_mono_type): Use
11554 mono_metadata_inflate_generic_inst() to inflate a generic
11555 instance; this'll also use the new cache.
11557 * loader.c (method_from_methodspec): Use
11558 mono_metadata_parse_generic_inst() and
11559 mono_metadata_inflate_generic_inst() rather than parsing it
11560 manually, so we can use the new cache.
11562 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
11564 * threads.c (wait_for_tids): Do not incorrectly free threads when
11565 the wait times out.
11567 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11569 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
11570 iter->args based on whether parameters are passed in registers (i.e.
11571 MONO_ARCH_REGPARMS is defined)
11573 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
11575 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
11576 the exception message. Fixes #70070.
11577 (method_from_methodspec): Fix warnings.
11579 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11581 * process.c: (complete_path) return the path quoted
11583 2004-12-01 Martin Baulig <martin@ximian.com>
11585 * class-internals.h (MonoGenericInst): New structure.
11586 (MonoGenericClass): Replaced `type_argc', `type_argv' and
11587 `is_open' with `MonoGenericInst *inst'.
11588 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
11589 `is_open' with `MonoGenericInst *inst'.
11591 2004-11-30 Martin Baulig <martin@ximian.com>
11593 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
11595 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
11596 to `generic_class_cache'.
11599 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
11600 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
11601 (mono_generic_inst_is_valuetype): Renamed to
11602 mono_generic_class_is_valuetype().
11604 * class-internals.h
11605 (MonoGenericInst): Renamed to MonoGenericClass.
11606 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
11607 (MonoClass): Renamed `generic_inst' to `generic_class'.
11608 (MonoGenericContext): Renamed `ginst' to `gclass'.
11610 * object-internals.h
11611 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
11613 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
11614 mono_reflection_generic_class_initialize().
11616 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
11617 now known as "System.Reflection.MonoGenericClass".
11618 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
11620 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
11622 * class-internals.h: Added a flag field to MonoClass to cache the
11623 declarative security attributes actions associated with the class.
11624 * domain-internals.h: Added booleans to MonoJitInfo to cache the
11625 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
11626 applicable to the JITted method.
11627 * reflection.c|h: Added functions to extract (as flags) which security
11628 actions are available (declaratively) for a method, class or assembly.
11629 * metadata.c|h: Added functions to search the declarative security
11630 table in the metadata.
11632 2004-11-29 Ben Maurer <bmaurer@ximian.com>
11634 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
11635 EXPORTEDTYPES are already in the class name cache, so there is no
11636 need to add extra code here to look at them. Just removes a bit of
11639 (ves_icall_System_Environment_get_TickCount): No need for #if
11640 WINDOWS. We already have the code in io-layer.
11642 2004-11-28 Martin Baulig <martin@ximian.com>
11645 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
11648 2004-11-27 Miguel de Icaza <miguel@ximian.com>
11650 * assembly.c (do_mono_assembly_open): Instead of having a
11651 conditional WITH_BUNDLE, incorporate support for bundles here, by
11652 having a global `bundles' variable holding a pointer to the actual
11655 (mono_register_bundled_assemblies): New API call used by the
11658 See mkbundle.1 for details.
11660 2004-11-27 Martin Baulig <martin@ximian.com>
11662 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
11663 the vtable for generic methods.
11665 2004-11-26 Martin Baulig <martin@ximian.com>
11668 (mono_metadata_generic_method_hash): New public function.
11669 (mono_metadata_generic_method_equal): Likewise.
11671 * class-internals.h
11672 (MonoGenericContainer): Added `GHashTable *method_hash'.
11674 * reflection.c (ReflectionMethodBuilder): Added
11675 `MonoGenericContainer *generic_container'.
11676 (reflection_methodbuilder_to_mono_method): Don't create a new
11677 MonoGenericContainer each time we're called.
11678 (mono_reflection_bind_generic_method_parameters): Use
11679 `container->method_hash' to cache the results so we don't create a
11680 different method if we're called several times with the same
11683 * loader.c (method_from_methodspec): Use the new
11684 `container->method_hash' here, too.
11686 2004-11-26 Martin Baulig <martin@ximian.com>
11688 * class.c (inflate_generic_signature): Correctly compute
11689 `res->has_type_parameters'.
11690 (mono_class_vtable): Use the `has_type_parameters' flag to
11691 determine whether we're a generic method.
11693 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
11695 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
11697 * object.c (mono_runtime_run_main): Fix a small memory leak.
11699 2004-11-25 Martin Baulig <martin@ximian.com>
11701 * class.c (set_generic_param_owner): Fixed the loop.
11703 2004-11-25 Martin Baulig <martin@ximian.com>
11705 * object.c (mono_class_vtable): Don't create any JIT wrappers for
11708 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
11710 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
11711 names. Fixes #69787.
11713 2004-11-24 Martin Baulig <martin@ximian.com>
11715 * class.c (mono_class_create_generic_2): If we don't have a
11716 `ginst->parent', inflate `gklass->parent' to get our parent.
11718 2004-11-24 Martin Baulig <martin@ximian.com>
11720 * reflection.c (compare_genericparam): Correctly sort the
11721 GenericParam table; fixes #69779.
11723 2004-11-23 Ben Maurer <bmaurer@ximian.com>
11725 * reflection.c: When writing a PE file, don't create a huge
11726 buffer in memory. Just write the arrays we have to the file.
11727 This reduces memory usage.
11729 * metadata-internals.h: MonoDynamicStream pefile is no longer used
11732 2004-11-17 Martin Baulig <martin@ximian.com>
11734 * class.c (mono_class_init): Don't setup `class->parent' for
11735 dynamic instances; moved this to mono_class_generic_2().
11736 (mono_class_create_generic): Also set `klass->inited' for dynamic
11738 (mono_class_create_generic_2): Don't do anything for dynamic
11739 generic instances. Set `klass->parent' here and also call
11740 mono_class_setup_parent() here.
11742 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
11743 `MonoType *parent' argument; set `ginst->parent' before calling
11744 mono_class_create_generic_2(), so we set the correct parent.
11746 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
11748 * reflection.c: allow getting attributes from ModuleBuilder
11751 2004-11-17 Martin Baulig <martin@ximian.com>
11753 * class.c (mono_class_create_from_typedef): If a type parameter is
11754 inherited from an outer class, set its owner to that class.
11756 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
11758 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
11759 for (int*) written size. This fixes bug #69592.
11761 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
11763 * icall.c: Added IsAuthenticodePresnet internal call.
11764 * image.c|h: New function that check a MonoImage for an Authenticode
11765 signature in the certificate PE data directory.
11766 * security.c|h: New internal call to ask the runtime if an
11767 Authenticode signature seems referenced in the PE header.
11769 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
11771 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
11773 * reflection.c (mono_image_create_pefile): Free the assembly streams
11774 after writing out the assembly file.
11776 * object.c (mono_runtime_run_main): Fix small memory leak.
11778 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
11779 property access modifiers. Fixes #69389.
11781 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11783 * domain.c, object.c, object-internals.h, domain-internals.h,
11784 object.h, marshal.c: keep dynamic code info per domain.
11786 2004-11-15 Martin Baulig <martin@ximian.com>
11788 * class.c (mono_type_get_name_recurse): Put type arguments in
11789 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
11792 2004-11-15 Martin Baulig <martin@ximian.com>
11794 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
11795 (mono_class_setup_vtable): When computing `the_cname' for a
11796 generic instance, don't include the namespace since we'd otherwise
11799 2004-11-15 Martin Baulig <martin@ximian.com>
11801 * class.c (mono_class_create_generic): Changed return type to void.
11802 (mono_class_create_generic_2): New public function; setup
11803 `class->method', `class->field' and `class->interfaces' here
11804 instead of in mono_class_init().
11806 * class.h (mono_class_create_generic): Moved to class-internals.h.
11808 2004-11-14 Ben Maurer <bmaurer@ximian.com>
11810 * reflection.c (mono_image_create_pefile): take a file HANDLE.
11811 rather than writing to memory, write to this file. Right now,
11812 we are just writting into a buffer, and copying that. However
11813 we can avoid the buffer later.
11815 (mono_dynamic_stream_reset): new function
11817 * icall.c, object-internals.h: update for the above.
11819 2004-11-13 Ben Maurer <bmaurer@ximian.com>
11821 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
11822 have been using gc'd memory. First it is slower, unlikely
11823 the comment in the source code said, secondly, it increases
11824 our footprint to do it in the gc.
11826 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
11827 the method so that it does not have to copy to managed code.
11829 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
11831 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
11833 2004-11-12 Martin Baulig <martin@localhost>
11835 * reflection.c (mono_image_create_token): Allow generic method
11836 definitions here, since they may appear in an `.override'; see
11837 gen-98/gen-99 for an example.
11839 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
11841 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
11844 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
11847 2004-11-11 Martin Baulig <martin@ximian.com>
11849 * class.c (mono_class_setup_vtable): In an explicit interface
11850 implementation, the method name now includes the arity.
11852 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
11854 * object.c (mono_array_full_copy): Fix warning.
11856 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
11858 * appdomain.c: Removed look_for_method_by_name(). Use the new method
11859 mono_class_get_method_from_name() instead.
11861 * class-internals.h: Added two new types of wrappers.
11862 Added MonoRemotingTarget enum. Added new trampoline function type, which
11863 takes an additional MonoRemotingTarget value as parameter, so it is
11864 possible to request a trampoline for a specific target.
11866 * class.c: Added new mono_class_get_method_from_name() method.
11868 * class.h: In MonoRemoteClass, we can have now to vtables, one for
11869 general remoting sinks and one specific for cross domain calls.
11871 * debug-helpers.c: Added new wrapper names.
11873 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
11876 * image.c: Porperly delete value objects form the remoting invoke hashtable.
11878 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
11879 with several other methods (mono_marshal_get_xappdomain_dispatch,
11880 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
11881 and others) can generate a fast remoting wrapper for cross domain calls.
11882 More information can be found in docs/remoting.
11883 Other changes: Removed mono_find_method_by_name, and used
11884 mono_class_get_method_from_name instead.
11885 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
11886 is stored in the remoting invoke hashtable.
11888 * marshal.h: published the new method for getting the xdomain wrapper,
11889 and also added a method for getting the adequate wrapper for a given
11892 * object-internals.h, object.c: Added a couple of methods for capying and
11894 Modified mono_install_remoting_trampoline, which takes the new remoting
11895 trampoline that has a remoting target as parameter.
11896 mono_class_proxy_vtable now also takes a remoting target as parameter, and
11897 will return the most suitable vtable for the target.
11898 Added mono_remote_class_vtable, which returns the vtable of a remote class
11899 (which can be the normal remoting vtable or the xdomain vtable).
11901 * threads.c: the xdomain invoke and dispatch wrappers must also be
11902 protected against interruptions.
11904 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11906 * icall.c: use memmove in BlockCopyInternal when the source and
11907 destination arrays are the same.
11909 2004-11-09 Martin Baulig <martin@ximian.com>
11911 * class-internals.h (MonoGenericContainer): Removed `method' and
11912 `signature', replaced them with `is_method' and `is_signature'
11913 flags. Added `context'.
11915 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
11916 instead of a `MonoGenericContainer *'.
11918 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
11919 for dynamic type parameters.
11920 (mono_metadata_load_generic_params): Setup `container->context'.
11922 * reflection.c (mono_reflection_setup_generic_class): Setup
11923 `tb->generic_container->context'.
11924 (do_mono_reflection_bind_generic_parameters): Use
11925 mono_class_inflate_generic_type() to correctly inflate types,
11926 rather than using our own hack just for MONO_TYPE_VAR.
11928 2004-11-09 Martin Baulig <martin@ximian.com>
11930 * class.c (mono_class_inflate_generic_method): Small fix; don't
11934 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
11935 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
11936 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
11937 (ves_icall_Type_BindGenericParameters): Likewise.
11938 (ves_icall_Type_get_IsGenericInstance): Likewise.
11939 (ves_icall_Type_GetGenericParameterPosition): Likewise.
11940 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
11941 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
11942 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
11944 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
11946 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
11947 assembly versions and public key tokens. Fixes #69113.
11949 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
11951 * metadata.c: fix bug introduced with the type cache changes
11954 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
11956 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
11957 the MonoClass pointer instead of the token in exception clauses.
11958 * reflection.c: updates for the above and make the code not depend
11959 on the structure of MonoExceptionClause.
11961 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
11963 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
11964 Add support for dynamic assemblies. Fixes #69114.
11966 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
11968 2004-11-07 Ben Maurer <bmaurer@ximian.com>
11970 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
11971 since most only those methods use it. the code member of
11972 MonoMethodPInvoke was dead, so that can be removed too. Also,
11973 remove inline_count (again, not used), and move slot so that it
11974 can share bits with some other flags. This saves 8 bytes in the
11975 structure and gives us about 50 kb back for mcs helloworld.cs
11977 * *.[ch]: Do naming changes for the above.
11979 * loader.c (mono_method_get_header): Lazily init the header
11981 (mono_get_method_from_token): don't init the header here
11982 (mono_free_method): the header may never be allocated
11984 Overall, this saves 150 kb of unmanaged allocations
11985 for mcs helloworld.cs. That accounts for 10% of the unmanaged
11988 * loader.c, loader.h (mono_method_get_header): new accessor.
11990 * *.[ch]: use the above method. Prepares us to lazily load
11993 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
11994 three warnings, which are actual bugs (see 69206).
11996 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
11997 unused. Saves a cool 4 bytes / method.
11999 2004-11-06 Ben Maurer <bmaurer@ximian.com>
12001 * metadata.c (builtin_types): Add types for System.Object here.
12002 (mono_metadata_parse_type_full): Cache MonoType*'s that are
12003 for a class or valuetype from klass->this_arg or klass->byval_arg.
12005 On mcs for a hello world, this gets us down from 21836 MonoType's
12008 (mono_metadata_free_type): Account for the above change.
12010 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
12012 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
12013 exception instead of asserting if name is null.
12014 (ves_icall_System_AppDomain_GetData): Ditto.
12016 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
12018 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
12021 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
12022 Return NULL when the domain does not have entry_assembly set.
12024 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
12025 Add a 'resource_modules' argument.
12026 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
12028 * reflection.c (mono_reflection_create_runtime_class): Move setting
12029 of wastypebuilder here, so mono_get_type_object () returns a MonoType
12032 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
12033 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
12034 Throw an ArgumentNullException if 'ptr' is null.
12036 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
12037 assemblies here. Fixes #69020.
12039 2004-11-05 Geoff Norton <gnorton@customerdna.com>
12041 * reflection.c (build_compressed_metadata): Fix the previous patch for
12042 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
12045 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
12047 * assembly.c (mono_assembly_names_equal): Allow a match if one of
12048 the cultures is false. Fixes #69090.
12050 * reflection.c (build_compressed_metadata): Fix invalid memory read
12051 detected by valgrind.
12053 * reflection.c (mono_reflection_get_type): Avoid triggering a
12054 TypeResolve multiple times for the same type. Fixes #65577.
12056 2004-11-04 Ben Maurer <bmaurer@ximian.com>
12058 * marshal.c: Avoid using ldftn to call managed functions. It is
12059 much slower than just a call.
12061 * reflection.c (mono_module_get_object): free the basename we
12062 allocate here from glib.
12064 * reflection.c (ensure_runtime_vtable): make sure to free
12065 overrides. Also, we were allocating an array of MonoMethod not an
12066 array of MonoMethod*.
12068 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
12070 * image.c (mono_image_close): free image->guid here.
12072 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
12074 * reflection.c: Fix some spec conformance issues with the PE file
12075 structures so mcs compiled apps run on the Net 2.0 beta.
12077 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
12079 * string-icalls.c (ves_icall_System_String_ctor_encoding):
12080 Implement this. Fixes #67264.
12082 * debug-helpers.h debug-helpers.c marshal.c: Move
12083 mono_find_method_by_name to debug-helpers.c.
12085 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
12087 * object.c (mono_release_type_locks): type_initialization_hash is
12090 * reflection.c object.c object-internals.h: Fix warnings.
12092 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
12093 without accessors. Fixes #61561.
12095 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
12096 application base from the root domain if not set. Fixes #65641.
12097 (mono_runtime_init): Fix warning.
12099 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12101 * appdomain.c: call mono_thread_pool_init.
12102 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
12103 of worker threads based on the number of CPUs and the environment
12104 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
12105 for non-windows (windows) systems.
12107 2004-10-27 Chris Toshok <toshok@ximian.com>
12109 * mono-debug-debugger.c (write_class): don't call mono_class_init
12110 here, as even with the check for (!klass->init_pending), we get
12111 into a situation where we're hitting cycles in class
12112 initialization. Fixes #68816.
12114 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
12116 * image.c: Avoid overwriting values in the loaded_images_hash when an
12117 assembly is loaded multiple times. Fixes #61152.
12119 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
12120 so multiple satellite assemblies for the same name can be loaded.
12123 * mono_domain_assembly_preload: Actually return the loaded assembly,
12126 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
12127 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
12129 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
12130 pending finalizers are not invoked after the appdomain has been
12131 unloaded. Fixes #67862.
12133 2004-10-22 Martin Baulig <martin@ximian.com>
12135 * mono-debug-debugger.c
12136 (mono_debugger_runtime_invoke): Don't box valuetypes.
12138 2004-10-22 Chris Toshok <toshok@ximian.com>
12140 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
12141 don't hide private methods.
12143 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
12145 * icall.c: Allows the runtime to "share" (when known) the public key
12146 token of an assembly. This avoid the need to recalculate the token
12147 (from the public key) in managed code.
12149 2004-10-21 Chris Toshok <toshok@ximian.com>
12151 * debug-helpers.c (append_class_name): argh, revert last patch.
12153 2004-10-21 Chris Toshok <toshok@ximian.com>
12155 * debug-helpers.c (append_class_name): use '+' as the delimiter,
12156 not '/', so that it matches what the debugger uses to look up
12159 2004-10-21 Martin Baulig <martin@ximian.com>
12161 * mono-debug-debugger.c (mono_debugger_throw_exception): New
12162 public method; this is called each time an exception is thrown and
12163 allows the debugger to use exception catch points.
12165 2004-10-21 Martin Baulig <martin@ximian.com>
12167 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
12168 the stack pointer and the exception object in some struct and pass
12169 that to the debugger.
12171 2004-10-21 Chris Toshok <toshok@ximian.com>
12173 * mono-debug-debugger.c (do_write_class): add instance/static
12174 event support. We don't expose "raise" or "other" yet.
12175 (event_is_static): new method.
12177 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
12179 * mono-debug-debugger.c
12180 (mono_debugger_handle_exception): Remove
12181 bogus return value for fussy compilers.
12183 2004-10-20 Martin Baulig <martin@ximian.com>
12185 * mono-debug-debugger.c
12186 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
12187 (mono_debugger_handled_exception): Likewise.
12189 2004-10-20 Martin Baulig <martin@ximian.com>
12191 * mono-debug-debugger.h (MonoDebuggerEvent): Added
12192 MONO_DEBUGGER_EVENT_EXCEPTION.
12194 * mono-debug-debugger.c (mono_debugger_handle_exception): New
12195 public function to send the debugger a notification for an
12196 exception and inform it about a catch/finally clause.
12198 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
12200 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
12201 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
12204 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
12206 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
12208 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
12209 marshalled as [In,Out]. Fixes #58325.
12211 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
12213 * reflection.c (mono_method_body_get_object): Implement some fields.
12215 2004-10-12 Martin Baulig <martin@ximian.com>
12217 * reflection.c (mono_reflection_bind_generic_parameters): Small
12218 fix, correctly retrieve our parent from a generic instance.
12220 2004-10-12 Martin Baulig <martin@ximian.com>
12222 * metadata.c (mono_metadata_generic_param_equal): We always have
12226 (mono_class_from_generic_parameter): We need to have an owner.
12227 (my_mono_class_from_generic_parameter): Likewise.
12229 * reflection.c (mono_reflection_setup_generic_class): Renamed to
12230 mono_reflection_create_generic_class() and added a new
12231 mono_reflection_setup_generic_class().
12232 (mono_reflection_initialize_generic_param): If we're a nested
12233 generic type and inherited from the containing class, set our
12234 owner to the outer class.
12236 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
12238 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
12240 * reflection.c (mono_method_body_get_object): New function to create
12241 a MethodBody object.
12243 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
12245 2004-10-11 Martin Baulig <martin@ximian.com>
12247 * metadata.c (_mono_metadata_type_equal): Renamed to
12248 do_mono_metadata_type_equal() and made static.
12250 2004-10-11 Martin Baulig <martin@ximian.com>
12252 * appdomain.c: Bump corlib version number to 28.
12254 2004-10-10 Martin Baulig <martin@ximian.com>
12256 * class-internals.h
12257 (MonoGenericInst): Added `MonoGenericContainer *container'.
12258 (MonoGenericMethod): Likewise.
12259 (MonoGenericContext): Likewise.
12260 (MonoGenericParam): Added `MonoGenericContainer *owner'.
12263 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
12264 (do_mono_metadata_parse_generic_inst): Likewise.
12265 (mono_metadata_parse_type_full): New public method. This is the actual
12266 mono_metadata_parse_type() implementation - with an additional
12267 `MonoGenericContainer *' argument.
12268 (mono_metadata_parse_array_full): Likewise.
12269 (mono_metadata_parse_signature_full): Likewise.
12270 (mono_metadata_parse_method_signature_full): Likewise.
12271 (mono_metadata_parse_mh_full): Likewise.
12272 (mono_type_create_from_typespec): Likewise.
12273 (mono_metadata_interfaces_from_typedef_full): New public method;
12274 this is similar to the other _full() methods, but we take a
12275 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
12276 (mono_metadata_parse_generic_param): Take an additional
12277 `MonoGenericContainer *' argument and lookup the MonoGenericParam
12278 from that container.
12279 (mono_metadata_generic_param_equal): New static method to compare
12280 two type parameters.
12281 (_mono_metadata_type_equal): New static method; takes an
12282 additional `gboolean signature_only' argument - if true, we don't
12283 compare the owners of generic parameters.
12284 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
12285 with a TRUE argument - do a signature-only comparision.
12287 * loader.c: Use the new _full() methods and pass the
12288 MonoGenericContainer to them.
12290 * object-internals.h (MonoReflectionTypeBuilder): Added
12291 `MonoGenericContainer *generic_container' field.
12292 (MonoReflectionMethodBuilder): Likewise.
12294 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
12296 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
12297 case initial images of dynamic assemblies.
12299 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
12301 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
12303 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
12304 length of event->other array.
12305 (typebuilder_setup_events): Ditto.
12307 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
12308 'assembly_by_name' and add an 'assemblies' list.
12310 * assembly.h assembly.c: Add a new search hook for determining whenever
12311 an assembly is already loaded. Use this instead of searching in the
12312 loaded_assemblies list.
12314 * domain.c appdomain.c: Implement the new search hook so loaded
12315 assemblies are now scoped by appdomain. Fixes #67727.
12317 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
12319 * threads.c (mono_thread_attach): Initialize synch_lock field so
12320 mono_thread_detach works again.
12322 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
12323 'lib' too. Fixes #63130.
12325 2004-10-06 Jackson Harper <jackson@ximian.com>
12327 * culture-info-tables.h: regenerated.
12329 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
12331 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
12332 implemented by other interfaces in the result. Fixes #65764.
12334 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12335 Handle unloadable modules without crashing.
12337 * image.c (load_modules): Revert the previous patch since modules must
12338 have a fixed index inside the array.
12340 * image.c (load_modules): Don't include native modules in the modules
12343 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
12345 * reflection.h: Add param_defaults field.
12347 * reflection.c: Add support for parameter defaults in dynamic methods.
12350 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
12351 an empty string when a type has no namespace. Fixes #64230.
12353 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
12355 * tabledefs.h: Added "internal" security actions to support non-CAS
12356 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
12357 Note: they do not seems to be used anymore in 2.0 (new metadata format)
12359 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
12361 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
12362 constructor of abstract class. Fixes #61689.
12364 2004-10-04 Martin Baulig <martin@ximian.com>
12366 * class-internals.h (MonoGenericContainer): New type.
12367 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
12368 `MonoGenericContainer *generic_container'.
12369 (MonoClass): Replaced `gen_params' and `num_gen_params' with
12370 `MonoGenericContainer *generic_container'.
12372 * metadata.c (mono_metadata_load_generic_params): Return a
12373 `MonoGenericContainer *' instead of a `MonoGenericParam *';
12374 removed the `num' argument.
12376 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
12378 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
12379 for dynamic images.
12381 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
12384 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
12386 * reflection.c: Save pe_kind and machine values into the generated
12389 * appdomain.c: Bump corlib version number.
12391 * object-internals.h: Reorganize layout of LocalBuilder.
12393 * class-internals.h class.c (mono_class_get_implemented_interfaces):
12394 New helper function.
12396 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
12397 created MonoType for dynamic types. Fixes #66180.
12399 2004-10-02 Ben Maurer <bmaurer@ximian.com>
12401 * threadpool.c: the ares hashtable needs a critical section around it.
12402 this prevents some nasty segfaults
12404 2004-10-02 Massimiliano Mantione <massi@ximian.com>
12406 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
12407 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
12410 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
12412 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
12414 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
12416 * image.c: Always canonicalize image file names, to avoid loading
12417 the same assembly twice when referenced using a relative path.
12419 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
12421 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
12423 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
12425 * marshal.c: Fix warnings.
12427 2004-09-29 Geoff Norton <gnorton@customerdna.com>
12429 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
12430 attempting to marshal the delegate_trampoline as the method_addr.
12431 This patch has a static hashtable of marshalled delegates so that
12432 we can map delegate_trampoline addresses back to delegates. This
12433 allows a delegate passed to managed code to be passed back into native
12436 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
12438 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
12440 * reflection.c (method_encode_code): Align method headers properly.
12443 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
12445 * marshal.c: In the runtime invoke wrapper, reset the abort
12446 exception if it is cached. This avoids the automatic rethrowal of
12447 the exception after the catch of the wrapper. Also check for pending
12448 interruptions before calling the managed method. This is done using
12449 the new method emit_thread_force_interrupt_checkpoint, since the
12450 normal checkpoint method is ignored when running the invoke wrapper.
12451 * object.c: If the abort exception is rethrown, set the abort_exc
12452 field of the thread, so it will be rethrown aftere every catch.
12453 * threadpool.c: Only run an interruption checkpoint if what has been
12454 requested is a stop of the thread (aborts will be ignored).
12455 * threads.c: By default, a thread will now never be interrumped while
12456 running the runtime invoke wrapper (this ensures that runtime_invoke
12457 will always return to the caller if an exception pointer is provided).
12458 There is a new special method mono_thread_force_interruption_checkpoint()
12459 to force an interruption checkpoint even if running a protected
12460 wrapper, which is used by the same runtime invoke wrapper to do a check
12463 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
12465 * object.c, object-internals.h: Implemented mono_release_type_locks,
12466 which releases the cctor locks held by a thread.
12467 * threads.c, threads.h: In thread_cleanup, release cctor locks held
12468 by a thread. Added mono_thread_exit() method to be used to safely stop
12471 2004-09-28 Raja R Harinath <rharinath@novell.com>
12473 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12474 Move null check before dereference. Avoid indexing beyond the end
12475 of the 'modules' array.
12477 2004-09-28 Raja R Harinath <rharinath@novell.com>
12479 * metadata-internals.h (MonoImage): Add module_count field.
12480 * image.c (load_modules): Set image->module_count.
12481 (mono_image_load_file_for_image): Use image->module_count.
12482 * reflection.c (mono_image_load_module): Append to image->modules array
12483 of dynamic assembly.
12484 (mono_module_get_object): Fix loop to actually increment index.
12485 Use image->module_count.
12486 * assembly.c (mono_assembly_load_references): Use image->module_count.
12487 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12490 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
12492 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
12493 Avoid assert on generic types.
12495 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
12497 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
12499 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
12501 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
12502 function to convert a MarshalSpec structure to its managed counterpart.
12504 * reflection.c: Fix warnings.
12506 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
12509 * icall.c (mono_create_icall_signature): Fix build.
12511 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
12513 * icall.c: Add MakePointType icall.
12515 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
12518 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12520 * threadpool.c: reuse allocated slots in the queue.
12522 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
12524 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
12526 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
12528 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
12531 * tabledefs.h: Add constants for pinvoke attributes BestFit and
12532 ThrowOnUnmappableChar.
12534 * icall.c (ves_icall_Type_GetPacking): New icall.
12536 2004-09-24 Martin Baulig <martin@ximian.com>
12538 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
12540 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12543 (mono_domain_set): allow setting a domain that is being unloaded.
12544 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
12547 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
12549 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
12550 the GetCustomAttributes icall.
12552 2004-09-23 Martin Baulig <martin@ximian.com>
12554 * object-internals.h (MonoReflectionGenericParam): Replaced
12555 'has_ctor_constraint', `has_reference_type' and `has_value_type'
12556 with `guint32 attrs'.
12558 2004-09-23 Martin Baulig <martin@ximian.com>
12560 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
12562 2004-09-23 Martin Baulig <martin@ximian.com>
12564 * object-internals.h (GenericParameterAttributes): New enum.
12566 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
12568 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
12570 * class.c (init_events): Fill out event->other field.
12572 * class.c: Fix warnings.
12574 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
12576 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12578 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
12579 walk which doesn't supply the IL offset.
12581 2004-09-22 Martin Baulig <martin@ximian.com>
12583 * reflection.c (mono_reflection_setup_internal_class): If we're
12584 System.ValueType, System.Object or System.Enum, set
12585 `klass->instance_size' and create the vtable.
12586 (mono_reflection_create_internal_class): If we're an enum type,
12587 get the base class from our current corlib.
12589 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
12591 * reflection.h (MonoResolveTokenError): New type.
12593 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
12596 * icall.c: Add an 'error' argument to the ResolveToken icalls.
12598 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
12600 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
12601 Support also calling constructors, but only for already allocated objects.
12603 2004-09-17 Geoff Norton <gnorton@customerdna.com>
12605 * reflection.c (type_get_qualified_name): If the klass is null
12606 return the typename to avoid a NullRefEx.
12607 (encode_cattr_value): Get the qualified name of the boxed type,
12608 not the underlying enumtype. Fixes #62984.
12610 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
12612 * marshal.c: Fix problems with previous checkin.
12614 2004-09-21 <vargaz@freemail.hu>
12616 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
12617 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
12619 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
12621 2004-09-21 Geoff Norton <gnorton@customerdna.com>
12623 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
12624 should only return a type for pointers, arrays, and passbyref types.
12627 2004-09-21 Martin Baulig <martin@ximian.com>
12629 * domain.c (mono_debugger_check_runtime_version): New public
12632 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
12634 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
12636 * reflection.c: Added missing sort to the declarative security
12637 attributes table. MS implementation stops seeing the attributes if the
12638 token number regress in the table (as shown by ildasm and permview).
12640 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
12642 * object-internals.h (MonoReflectionModule): Add 'token' field.
12644 * reflection.c (mono_reflection_get_token): Add support for Module
12646 (mono_module_get_object): Set 'token' field.
12647 (mono_module_file_get_object): Set 'token' field.
12649 * icall.c: Add new Assembly and Module icalls.
12651 * appdomain.c: Bump corlib version.
12653 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
12655 * loader.h loader.c class.h class.c: Add helper functions for obtaining
12656 tokens of metadata objects.
12658 * reflection.h reflection.c (mono_reflection_get_token): New function
12659 to obtain the token of a metadata object.
12661 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
12663 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
12665 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
12667 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
12669 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
12671 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
12672 * object-internals.h: Added 3 MonoArray* members to MonoReflection
12673 AssemblyBuilder to access the permissions set in the class lib.
12674 * reflection.c: Added security attributes encoding step in
12675 mono_image_build_metadata.
12676 * tabledefs.h: Added new security actions defined in 2.0:
12677 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
12679 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
12681 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
12684 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
12686 * locales.c: nullify the ICU_collator member of CompareInfo when it is
12687 finalized. There where random SIGSEVs at program termination, when
12688 an object being finalized was trying to do a string comparison and
12689 the current culture was already finalized.
12691 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12693 * threads.c: call thread_cleanup before finishing the thread if we get
12696 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
12698 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
12699 assemblies from the parent. Fixes #65665.
12701 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
12703 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
12706 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
12708 * reflection.h: add prototype for mono_get_dbnull_object
12709 * reflection.c: add prototypes for get_default_param_value_blobs
12710 and mono_get_object_from_blob for fussier compilers
12712 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
12714 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
12715 false deadlock checks in class initialization.
12717 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
12719 * image.c (mono_image_addref): Fix comment.
12721 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
12724 2004-09-12 Jambunathan K <kjambunathan@novell.com>
12726 * reflection.c (mono_param_get_objects): Modified to return
12727 ParameterInfo.DefaultValue object.
12729 (get_default_param_value_blobs):
12730 (mono_get_object_from_blob):
12731 (mono_get_dbnull_object): New helper routines.
12733 * object.c (mono_get_constant_value_from_blob): New helper routine
12734 carved out from get_default_field_value ()
12736 * object-internals.h (mono_get_constant_value_from_blob): Added
12737 function declaration.
12739 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
12741 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
12742 referenced assemblies. Fixes #62135.
12744 * exception.h exception.c (mono_get_exception_file_not_found2): New
12747 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
12749 * class.h class.c: Add mono_type_get_underlying_type ().
12751 2004-09-09 Geoff Norton <gnorton@customerndna.com>
12753 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
12754 Fix GetTypes() to support dynamically created assemblies.
12756 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
12758 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
12760 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
12763 * reflection.h reflection.c loader.c: Allow dynamic construction of
12764 pinvoke methods. Fixes #65571.
12766 * reflection.c (mono_reflection_get_type): Revert previous change since
12767 it causes regressions.
12769 2004-09-08 Martin Baulig <martin@ximian.com>
12771 * class.c (class_compute_field_layout): Don't call
12772 mono_class_layout_fields() for open generic instances.
12774 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
12775 * threads.c appdomain.c: fix typo in GC macro
12777 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12779 * threads.c: don't call mono_thread_detach() in start_wrapper(),
12780 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
12782 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
12784 * image.c (mono_image_close): Applied patch from
12785 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
12786 assembly is loaded multiple times from data.
12788 * image.c (mono_image_open): Fix warning.
12790 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12792 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
12793 once. Fixes #58334.
12795 * reflection.c (mono_reflection_create_runtime_class): Initialize
12796 klass->nested_classes. Fixes #61224.
12798 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12800 * threads.c: sched_yield() on exit, to allow threads to quit.
12802 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12804 * object.c (mono_unhandled_exception): Remove leftover debug code.
12806 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
12808 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
12810 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12812 * marshal.c (emit_marshal_array): Really null terminate string arrays.
12814 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
12816 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12818 * marshal.c (emit_marshal_array): Null terminate string arrays.
12820 * marshal.c (raise_auto_layout_exception): Fix warning.
12822 * reflection.c (mono_param_get_objects): Initialize the default value
12823 with DBNull.Value, not null. Fixes #62123.
12825 2004-09-01 Miguel de Icaza <miguel@ximian.com>
12827 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
12828 throw an exception with a cute explanation.
12830 2004-09-06 Dick Porter <dick@ximian.com>
12832 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
12833 Close the new process's thread handle, as we don't use it. The
12834 handle stays around forever otherwise.
12836 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12838 * object.c (arith_overflow): Fix warning.
12840 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
12841 calling conventions in method refs. Fixes #65352.
12843 * reflection.c: Fix warnings.
12845 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
12847 * icall.c: Add a new icall for Array.Clear
12849 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
12851 * object.c: When allocating an array, we have to throw
12852 an overflow exception if any of the lengths are < 0.
12854 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12856 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
12857 properly. Also move implementation of string array marshalling to
12858 managed code. Fixes #42316.
12860 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12862 * assembly.c: provide more information when loading an assembly fails.
12864 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12866 * filewatcher.c: don't expect the development fam package to be
12869 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
12871 * marshal.c: Make a copy of the signature cookie since it will be
12872 freed by the caller.
12874 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
12876 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
12878 * metadata.c (mono_metadata_free_marshal_spec): New function to free
12881 * marshal.c: More refactoring.
12883 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
12886 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
12888 * object.c: In mono_message_invoke, fill the output parameter array after
12889 calling the managed method (it was done before the call). This fixes
12892 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12894 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
12897 2004-09-02 Martin Baulig <martin@ximian.com>
12899 * class.c (mono_class_instance_size): Don't allow generic type
12900 definitions or open generic instances.
12901 (mono_class_array_element_size): If we're a value type, call
12902 mono_class_instance_size() on the original class.
12904 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
12905 handle generic instances.
12907 * mono-debug-debugger.c (write_type): Handle generic instances
12910 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12912 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
12913 the allocation request fails. Fixes #65089.
12915 * object.c (mono_runtime_free_method): Do not call mono_free_method.
12917 * object.c (mono_runtime_free_method): New function to free a dynamic
12920 * marshal.c (mono_delegate_free_ftnptr): New function to free the
12921 delegate trampoline.
12923 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
12924 with hasthis as dynamic,
12926 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
12928 * domain.c (mono_jit_info_table_remove): New function to remove an
12929 entry from the jit info table.
12931 * class-internals.h (MonoMethod): Add 'dynamic' field.
12933 * loader.c: Fix warnings.
12935 2004-09-01 Martin Baulig <martin@ximian.com>
12937 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
12938 instead of mono_debugger_lock() because the latter one is a no-op
12939 unless running in the debugger.
12941 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
12943 * class.c (class_compute_field_layout): Classes with auto-layout or
12944 reference fields are not blittable.
12946 2004-09-01 Dick Porter <dick@ximian.com>
12948 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
12949 mono_image_get_filename() to get the assembly location.
12952 * metadata.h: Fix compile warnings
12954 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
12956 * class.c (class_compute_field_layout): System.Object is blittable.
12958 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
12959 as in/out. Fixes #59909.
12961 2004-09-01 Martin Baulig <martin@ximian.com>
12963 * metadata.h (MONO_TYPE_ISREFERENCE): Call
12964 mono_metadata_generic_inst_is_valuetype() if we're a generic
12965 instance to check whether our underlying type is a reference type.
12967 2004-09-01 Martin Baulig <martin@ximian.com>
12969 * metadata.c (mono_type_size): If we're a generic instance, call
12970 mono_class_value_size() for value types.
12972 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
12974 * marshal.c: Implement more custom marshalling functionality. Fixes
12977 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12979 * mono-debug.c, debug-mono-symfile.c: add some locking love.
12981 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
12983 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
12985 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
12987 * icall.c: Fix some warnings.
12989 * threads.c (abort_appdomain_thread): Fix unref errors.
12990 (mono_thread_current): Fix THREAD_DEBUG define.
12992 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
12994 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
12996 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
12998 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
13000 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
13003 2004-08-28 Martin Baulig <martin@ximian.com>
13006 (mono_metadata_generic_inst_is_valuetype): New public function.
13008 * metadata.h (MONO_TYPE_ISSTRUCT): Call
13009 mono_metadata_generic_inst_is_valuetype() if we're a generic
13010 instance to check whether our underlying type is a valuetype.
13012 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
13014 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
13017 2004-08-25 Martin Baulig <martin@ximian.com>
13019 * loader.c (mono_get_method_from_token): Abstract methods can also
13020 be generic and thus have type parameters.
13022 * metadata-internals.h
13023 (MonoDynamicImage): Added `GPtrArray *gen_params'.
13025 * reflection.c (mono_image_get_generic_param_info): Don't create a
13026 metadata row, just add an entry to the `gen_params' array.
13027 (build_compressed_metadata): Sort the `gen_params' array and then
13028 actually create the metadata.
13030 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13032 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
13034 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
13036 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
13038 2004-08-24 Martin Baulig <martin@ximian.com>
13040 * class.cs (mono_class_is_subclass_of): Like an interface, a
13041 generic instance also derives from System.Object.
13043 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
13045 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
13046 custom modifiers to be in any order. Fixes #61990.
13048 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
13050 * object.c: Register mono_object_new_fast icall.
13052 * object.c (mono_class_get_allocation_ftn): Return to calling
13053 mono_object_new_fast, since it seems faster to compute the object
13054 size in unmanaged code than passing it as a parameter.
13056 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
13058 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
13059 this function with Boehm as the oom handler, so we don't have to check
13060 the result of GC_malloc.
13062 * object.c: Remove checks for oom.
13064 * object.h object.c (mono_class_get_allocation_ftn): New function to
13065 return the icall which can be used to allocate an instance of a given
13068 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
13070 * class-internals.h: Add 'enabled' field.
13072 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
13074 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
13076 2004-08-18 Jambunathan K <kjambunathan@novell.com>
13077 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
13080 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
13082 * appdomain.c: use the Tls function for appdomain too,
13083 at Zoltan's request. Actually return in mono_context_get
13085 * appdomain.c, profiler.c, threads.c: use __thread
13087 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
13089 * appdomain.c threads.c: Call GC_CreateThread on windows.
13091 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
13092 multiple libraries since this don't work on windows.
13094 2004-08-18 Martin Baulig <martin@ximian.com>
13096 * class-internals.h
13097 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
13100 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
13101 MonoMethodNormal since we also need it for abstract and interface
13105 (build_compressed_metadata): Sort the GenericParam table.
13106 (mono_image_create_token): Added `gboolean create_methodspec'
13107 argument; this is false when generating a MethodImpl token.
13108 (reflection_methodbuilder_to_mono_method): Abstract and interface
13109 methods may also have generic parameters.
13111 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
13113 * appdomain.c: thread local alloc
13115 2004-08-17 Martin Baulig <martin@ximian.com>
13117 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
13120 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
13123 * class.c (mono_type_get_full_name): New public function.
13124 (mono_type_get_name): Don't include the type arguments.
13126 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
13128 * Makefile.am: Build static versions of libmetadata and libmonoruntime
13129 for inclusion into the mono executable.
13131 2004-08-16 Martin Baulig <martin@ximian.com>
13133 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
13134 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
13136 2004-08-14 Martin Baulig <martin@ximian.com>
13138 * class.c (dup_type): Also copy the `byref' field.
13140 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
13142 * reflection.c (create_dynamic_mono_image): Revert the last change
13143 since it breaks bootstrap.
13145 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13147 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
13149 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
13150 not free them with g_free.
13152 2004-08-11 Martin Baulig <martin@ximian.com>
13154 * reflection.c (mono_reflection_setup_internal_class): Also call
13155 mono_class_setup_mono_type() if we already have a `tb->type.type'.
13157 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
13159 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
13160 called during default (first) AppDomain creation. Keep track of
13161 Evidence when loading assemblies.
13163 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13165 * opcodes.c, opcodes.h: reduce runtime relocations.
13167 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13169 * culture-info.h, locales.c: fixes and chages to sue the new
13170 optimized format of the locale data.
13171 * culture-info-tables.h: regenerated.
13173 2004-08-06 Geoff Norton <gnorton@customerdna.com>
13175 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
13177 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
13179 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
13180 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
13181 * domain-internals.h: icall declaration.
13182 * icall.c: icall registration.
13183 * object-internals.h: New fields in MonoAssembly for CAS.
13185 2004-08-05 Duncan Mak <duncan@ximian.com>
13187 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13190 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13192 * reflection.c: fix to deal with object[] arrays in custom ctors
13195 2004-08-05 Martin Baulig <martin@ximian.com>
13197 * class.c (mono_class_array_element_size): Added support for
13198 generic instances and correctly handle "recursive" types.
13200 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13202 * assembly.c: Fix warnings.
13204 2004-08-04 Martin Baulig <martin@ximian.com>
13207 (mono_type_get_name_recurse): Added `gboolean include_arity'
13208 argument specifying whether or not we should include the generic
13209 arity in the type name.
13210 (_mono_type_get_name): New static function.
13211 (mono_class_setup_vtable): If we're a generic instance, don't
13212 include the generic arity in the names of explicit method
13215 2004-08-03 Martin Baulig <martin@ximian.com>
13217 * class.c (mono_type_get_name_recurse): Enclose the generic type
13218 arguments in `<', '>'.
13220 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13222 * gc.c: make GC warning messages use the trace API, they are just
13223 noise to most of the users.
13225 2004-08-03 Martin Baulig <martin@ximian.com>
13227 * debug-mono-symfile.c (read_string): Correctly read the string.
13229 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13231 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
13233 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
13235 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
13237 2004-07-30 Martin Baulig <martin@ximian.com>
13239 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
13240 Reflect latest symbol writer changes.
13242 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13244 * object.c: always create an object if null is passed
13245 to Invoke() where a valuetype is expected.
13247 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
13249 * marshal.c (mono_marshal_init): make managed
13250 signatures match native ones better for 64bits.
13252 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13254 * appdomain.c: hack to build correctly the private bin path on windows.
13257 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
13259 * assembly.c: Load mscorlib from the correct framework directory
13260 (mono/<version>/mscorlib.dll).
13261 * appdomain.h: Added prototypes for new functions.
13262 * internals.h: Added some prototypes.
13263 * domain.c: When initializing the runtime, get from the executable and
13264 the configuration files the runtime version that the app supports.
13265 Added support methods for reading app.exe.config. Added list of versions
13266 supported by the JIT. Added two new methods: mono_init_from_assembly,
13267 which initializes the runtime and determines the required version from
13268 the provided exe file, and mono_init_version, which initializes
13269 the runtime using the provided version.
13270 * icall.c: Get machine.config from version-specific directory.
13271 * reflection.c: When generating an image, embed the version number
13272 of the current runtime.
13274 2004-07-28 Dick Porter <dick@ximian.com>
13277 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
13278 returned sockaddr size before creating the remote address object.
13279 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
13282 2004-07-28 Dick Porter <dick@ximian.com>
13284 * locales.c (string_invariant_compare_char): Fix invariant char
13285 compares between upper and lower cases. Fixes bug 61458.
13287 2004-07-27 Ben Maurer <bmaurer@ximain.com>
13289 * marshal.c: actually cache stelem.ref wrappers.
13291 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13293 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
13294 sections and remove the mono_cli_rva_map () function.
13296 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13298 * debug-mono-symfile.c: fix one more endianess issue, from a patch
13299 by Geoff Norton (<gnorton@customerdna.com>).
13301 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13303 * class.c: fix class loads for pointer types (typeof(int) !=
13306 2004-07-27 Martin Baulig <martin@ximian.com>
13308 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
13309 reading the debugging information from an external ".mdb" file.
13311 2004-07-24 Martin Baulig <martin@ximian.com>
13313 * reflection.c (mono_image_get_type_info): Only write a class
13314 layout entry if we actually have a size or a packing size.
13316 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
13318 * reflection.c (type_get_fully_qualified_name):
13319 insert cast to get type checking of ?: with non-gcc compilers
13321 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
13323 * rand.c: use g_getenv for both lookups of
13326 2004-07-17 Martin Baulig <martin@ximian.com>
13328 * reflection.c (mono_reflection_bind_generic_method_parameters):
13329 Set `gmethod->reflection_info'.
13331 2004-07-17 Martin Baulig <martin@ximian.com>
13333 * class.c (mono_class_create_from_typedef): Insert the newly
13334 created class into the hash table before computing the interfaces
13335 since we could be called recursively.
13337 2004-07-16 Ben Maurer <bmaurer@ximain.com>
13339 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
13340 function to implement stelem.ref in managed code
13341 * class-internals.h, debug-helpers.c: a new wrapper type
13344 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13346 * gc.c: allow GC handles to work even when no GC is compiled in.
13347 Fix part of bug #61134 (GetAddrOfPinnedObject).
13349 2004-07-13 Peter Williams <peter@newton.cx>
13351 * process.c (complete_path): Make sure we don't attempt to execute
13354 2004-07-12 Geoff Norton <gnorton@customerdna.com>
13356 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
13357 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
13358 and will add/subtract the hour if needed
13360 2004-07-12 Martin Baulig <martin@ximian.com>
13362 * reflection.c (mono_field_get_object): If we have
13363 `field->generic_info', take the attributes from
13364 `field->generic_info->generic_type'.
13366 2004-07-12 Martin Baulig <martin@ximian.com>
13368 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
13369 This function must be called before initializing the runtime.
13370 (mono_debug_init_1): New function; call this after initializing
13371 the runtime, but before loading the assembly. It tells the
13372 debugger to load corlib and the builtin types.
13374 * mono-debug-debugger.c: Did some larger changes in the debugging
13375 code; support recursive class declarations, make sure we actually
13378 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13380 * debug-helpers.c: undo my previous patch and fixed the real issue in
13381 ../mini/exceptions-x86.c
13383 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13385 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
13386 when no HOME env. variable was set and a NullRef was thrown in a .cctor
13387 called from other .cctors.
13389 2004-07-09 Miguel de Icaza <miguel@ximian.com>
13391 * loader.c: Removed the mono_loader_wine_init hack now that we are
13392 doing a managed version of Windows.Forms.
13394 2004-07-09 Ben Maurer <bmaurer@ximian.com>
13396 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
13397 threadpool.c, threads.c: remove static data from rootset.
13399 2004-07-09 Dick Porter <dick@ximian.com>
13401 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
13402 Don't do any more processing if the matched length was 0. It was
13403 increasing the size of the string before. Fixes bug 61167.
13405 2004-07-09 Dick Porter <dick@ximian.com>
13409 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13410 Add support for SO_PEERCRED if its available.
13412 2004-07-09 Peter Bartok <pbartok@novell.com>
13413 * loader.c: winelib.exe.so error message is now only displayed if
13414 MONO_DEBUG is set. To help us avoid questions when people are trying
13415 out the new Managed.Windows.Forms.
13417 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
13419 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
13420 for isinst and castclass wrappers.
13422 * class-internals.h icall.c: Move registration and lookup of JIT icalls
13423 to libmetadata from the JIT, so they could be used by the marshalling
13424 code and the interpreter.
13426 * marshal.c: Register marshalling related JIT icalls here instead of
13427 in mini.c. Use CEE_MONO_ICALL instead of the family of
13428 CEE_MONO_PROC<x> opcodes to call marshalling functions.
13430 * metadata.h: Remove unneeded marshalling conversions.
13432 * opcodes.c: Update for new opcodes.
13434 2004-07-08 Martin Baulig <martin@ximian.com>
13436 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
13437 (mono_debug_get_domain_data): Make this function static.
13439 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13441 * gc.c, object.h: add nice GC handle API for embedders.
13443 2004-07-06 Ben Maurer <bmaurer@ximian.com>
13445 * reflection.c: more changes for the new api
13447 * object.c: When we reflect on a field w/ a constant value, it
13448 will not have a memory location, so we must access metadata. Also,
13449 allow easier reading of strings so that we can read them from
13452 * class.c (mono_class_layout_fields): no need for literal fields here.
13454 * class-internals.h: api changes for const fields
13456 * icall.c (ves_icall_get_enum_info): use new apis for const fields
13458 2004-07-06 Martin Baulig <martin@ximian.com>
13460 * mono-debug.h: Increment version number to 44.
13462 * mono-debug.c (mono_debug_add_wrapper): The second argument is
13463 now a gpointer, rewrote this whole method.
13465 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
13466 function. Add information about the wrapper in a new "misc table".
13468 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
13469 for the new misc table.
13471 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
13473 * metadata-internals.h image.c: Add a cache for helper signatures.
13475 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
13477 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
13479 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
13480 delegates from a delegate. Fixes #61033.
13482 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
13483 marshalling of stringbuilder arrays. Fixes #59900.
13485 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
13487 * icall.c: Add EnumBuilder:setup_enum_type icall.
13489 2004-06-30 Ben Maurer <bmaurer@ximian.com>
13491 * icall.c: Added a new icall for the property version of
13492 OffsetOfStringData.
13494 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
13496 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
13497 it has a constant size across platforms.
13499 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
13502 2004-06-29 Martin Baulig <martin@ximian.com>
13504 * mono-debug.c (mono_debug_add_method): Protect the whole function
13505 in mono_debugger_lock(), not just parts of it.
13507 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13509 * reflection.c: make sure padding bytes in heaps are zeroed.
13511 2004-06-24 David Waite <mass@akuma.org>
13513 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
13514 image.c, loader.c, locales.c, marshal.c, metadata.c,
13515 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
13516 string-icalls.c, threads.c: change to C90-style comments from C99 /
13519 2004-06-24 Dick Porter <dick@ximian.com>
13522 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
13523 return createdNew. Fixes bug 60412.
13526 * icall.c: Add createdNew parameter to CreateMutex icall
13528 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13530 * reflection.c, object-internals.h: save default value in params.
13532 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13534 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
13535 no need to build a new path combining that with the application base.
13538 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13540 * reflection.c: fixed minor standard compliance issues.
13542 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13544 * reflection.c: fixed issue with encoding some custom attributes
13545 (arrays in properties and fields, bug #60411).
13547 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13549 * reflection.c: fix start address when copying the public key token.
13551 2004-06-23 Martin Baulig <martin@ximian.com>
13553 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
13554 the `exc' object in a static object to put it into the GC's root set.
13556 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13558 * reflection.c: make mono_reflection_setup_internal_class ()
13559 callable a second time to setup a new parent class.
13561 2004-06-23 Dick Porter <dick@ximian.com>
13563 * threads.c: Check for WAIT_IO_COMPLETION return values.
13565 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
13567 * appdomain.c: Removed the g_free on the public key token. Now copy
13568 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
13569 * assembly.c: Added public key token string value when loading
13570 assemblies. Fix bug #60439.
13571 * icall.c: Added missing informations (like public key) in
13572 GetReferencedAssemblies. Fix #60519.
13573 * image.h: Changed definition for public key token from const char*
13574 public_tok_value to guchar public_key_token [17];
13575 * reflection.c: Updated for changes to public key token.
13577 2004-06-22 Lluis Sanchez Gual
13579 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
13580 for the field in base classes.
13582 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13584 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
13585 mark headers as not supported, they are installed only for use by the
13588 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
13590 * *.c, *.h: avoid namespace pollution in public headers.
13592 2004-06-21 Martin Baulig <martin@ximian.com>
13594 * exception.c (mono_get_exception_security): It's in
13595 "System.Security", not in "System".
13597 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
13598 the exception classes.
13600 2004-06-21 Martin Baulig <martin@ximian.com>
13602 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
13603 Protect the exception object from being finalized.
13605 2004-06-21 Martin Baulig <martin@ximian.com>
13607 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
13610 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
13612 * reflection.c: Load the assembly in mono_reflection_type_from_name,
13613 if it was not loaded before. Fix parts of #60439.
13615 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
13617 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
13618 code that was broken since Ben's change: wrappers are now
13619 dependent on the method signature only again.
13621 2004-06-21 Martin Baulig <martin@ximian.com>
13623 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
13624 added interface support.
13626 2004-06-21 Martin Baulig <martin@ximian.com>
13628 * class.c (mono_vtable_get_static_field_data): New public method.
13630 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
13632 * filewatcher.c : Windows build fix to be compliant with API changes.
13634 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13636 * class.h, class.c: more accessors.
13637 * metadata.h, metadata.c: prepare for hiding MonoType and
13638 MonoMethodSignature: people should use the accessors from now on
13639 outside of the tree.
13641 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13643 * *.c, *.h: more API cleanups.
13645 2004-06-18 Jackson Harper <jackson@ximian.com>
13647 * assembly.c: Trace loading assemblies.
13648 * loader.c: Trace loading native libraries.
13649 * mono-config.c: Trace loading config files.
13651 2004-06-18 Dick Porter <dick@ximian.com>
13653 * locales.c: Tell ICU the lengths of strings, it can cope with
13654 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
13656 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13658 * image.c: swapped name/filename;
13660 2004-06-18 Martin Baulig <martin@ximian.com>
13662 * mono-debug-debugger.c (write_class): Write the parent class at
13663 the end of the header.
13665 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13667 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
13669 2004-06-17 Raja R Harinath <rharinath@novell.com>
13671 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
13672 (bundle_obj): New conditional define.
13673 (BUILT_SOURCES): Remove.
13674 ($(bundle_srcs)): Make parallel-make safe.
13675 (libmonoruntime_la_LIBADD): Make unconditional.
13676 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
13677 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
13679 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
13681 * culture-info-tables.h: It was inconsistent with the latest
13684 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
13686 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
13689 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
13692 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13694 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
13695 cleaned up public header threads.h.
13697 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13699 * Makefile.am, *.c, *.h: more API cleanups.
13701 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13703 * Makefile.am: removed monosn from compilation.
13704 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
13705 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
13706 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
13707 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
13708 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
13709 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
13711 2004-06-15 Jackson Harper <jackson@ximian.com>
13713 * assembly.c: Make locales lower case when searching the GAC for
13714 assemblies. gacutil will always make locales lowercase when
13715 installing so this effectively makes them case insensitive.
13717 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
13719 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
13720 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
13721 parameter which allows to choose whether the wait can be interrupted or
13722 not. Also added the method mono_monitor_enter(), which locks the monitor
13723 using an infinite wait and without allowing interruption.
13724 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
13726 * object.h: Added new fields in MonoThread. suspend_event holds the event
13727 used to susped/resume the thread. synch_lock is the lock object to use for
13728 modifying the thread state.
13729 * threads.c: Use the new synch_lock object for locking, instead of "this",
13730 which can generate deadlocks.
13731 Moved thread state change in Thread.Sleep and Thread.Join from managed
13732 to unmanaged code. This avoids a deadlock when the thread was suspended
13733 just after acquiring the thread lock.
13734 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
13735 Implemented Thread.Suspend using an event instead of ThreadSuspend,
13736 which is not fully implemented in the io-layer.
13737 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
13739 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
13741 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
13742 threads-types.h: more API cleanups.
13744 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13746 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
13747 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
13748 threadpool.c, threads.c: first pass at the exported API cleanup.
13750 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13752 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
13754 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13756 * icall.c: added internalGetHome.
13758 2004-06-14 Dick Porter <dick@ximian.com>
13760 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
13761 possible to return successfully when '.' or '..' were the only
13762 entries in a directory, but were skipped. The MonoIOStat was not
13763 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
13766 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13768 * reflection.c: make binaries run on .Net 1.1 by default.
13770 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13772 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
13774 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
13776 * marshal.c: keep track of struct size with explicit layout
13779 2004-06-12 Martin Baulig <martin@ximian.com>
13781 * mono-debug-debugger.c: Comment out a debugging g_message().
13783 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13785 * reflection.c, reflection.h: do not free custom attrs that are cached.
13786 * icall.c: use braces to make code clearer.
13788 2004-06-11 Martin Baulig <martin@ximian.com>
13790 * class.h (MonoInflatedField): New type.
13791 (MonoClassField): Replaced `MonoType *generic_type' with
13792 `MonoInflatedField *generic_info'.
13795 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
13797 2004-06-11 Martin Baulig <martin@ximian.com>
13799 * reflection.c (mono_image_create_method_token): Correctly encode
13802 2004-06-11 Martin Baulig <martin@ximian.com>
13804 * metadata.c (mono_metadata_parse_method_signature): When parsing
13805 a MethodDef which has VarArgs, also set sentinelpos if we don't
13806 have any parameters.
13808 2004-06-11 Martin Baulig <martin@ximian.com>
13810 * verify.c (mono_method_verify): In CEE_CALL, use
13811 mono_method_get_signature() to get the method's signature, unless
13812 we're a PInvoke method.
13814 2004-06-10 Jackson Harper <jackson@ximian.com>
13816 * assembly.c: Use <path>/lib/mono/gac for the extra paths
13817 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
13818 logical name as the supplied path is just a prefix to the gac not
13819 the direct path to it.
13821 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
13823 * reflection.c: make the token for a created method match
13824 the token of the MethodBuilder it was created from
13825 (IKVM requires this behaviour now).
13827 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
13829 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
13830 reflection.c, socket-io.c: leak fixes.
13832 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13834 * icall.c: handle sentinel pos in vararg methods in position different
13837 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13839 * culture-info-tables.h: freshly generated.
13841 2004-06-09 Martin Baulig <martin@ximian.com>
13843 * loader.c (mono_get_method_constrained): Call `mono_class_init
13844 (constrained_class)'.
13846 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
13848 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
13849 any methods. Fixes #59629.
13851 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
13853 * culture-info-tables.h: reflecting locale-builder updates.
13855 2004-06-08 Dick Porter <dick@ximian.com>
13858 * locales.c: Fixed compile warnings, including a real bug in
13859 CompareInfo_internal_compare.
13861 2004-06-08 Dick Porter <dick@ximian.com>
13864 (ves_icall_System_Globalization_CompareInfo_internal_index):
13865 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
13866 Double-check the resuls of usearches, because ICU currently
13867 ignores most of the collator settings here. Fixes bug 59720.
13869 2004-06-08 Dick Porter <dick@ximian.com>
13872 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
13873 Fix memory leak and segfault-causing typo. No idea how this one
13874 lasted so long without being noticed.
13876 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
13878 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
13879 any methods. Fixes #59629.
13881 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13884 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
13885 own the critical section before). Removed dead code (that's done
13886 in the preload hook).
13888 (mono_assembly_load_with_partial_name): call the preload hook.
13890 2004-06-08 Martin Baulig <martin@ximian.com>
13892 * metadata.c (mono_metadata_signature_alloc): Default
13893 `sentinelpos' to -1.
13895 * reflection.c (mono_image_get_array_token): Likewise.
13897 2004-06-08 Martin Baulig <martin@ximian.com>
13899 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
13901 * metadata.c (mono_metadata_parse_method_signature): When parsing
13902 a MethodDef which has VarArgs, set sentinelpos.
13904 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
13905 `gint16' since we're using -1 for non-varargs methods.
13908 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
13909 (method_encode_signature): Added varargs support.
13910 (method_builder_encode_signature): Likewise.
13911 (mono_image_get_varargs_method_token): New static method.
13912 (mono_image_create_method_token): New public method; this is
13913 called via an icall instead of mono_image_create_token() when
13914 calling a varargs method.
13916 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
13918 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
13920 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
13922 * culture-info-tables.h : Reflecting the latest locale-builder that
13923 fixed empty array representation ({} to {0}).
13925 2004-06-07 Jackson Harper <jackson@ximian.com>
13927 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
13928 looking up extra gac paths. This allows MONO_GAC_PATH to act
13929 exactly like a prefix.
13931 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
13933 * reflection.c (mono_reflection_type_from_name): Make a copy of the
13934 type name before modifying it. Fixes #59405.
13936 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
13938 * culture-info.h: added fields for "all datetime patterns".
13939 * locales.c: ( ves_icall_System_Globalization_CultureInfo
13940 _construct_datetime_format ()): fill xxx_patterns fields.
13941 * object.h: added fields for "all datetime patterns" to
13942 MonoDateTimeFormatInfo.
13943 * culture-info-tables.h: reflecting locale-builder updates.
13945 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
13947 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
13948 the event has no add and remove methods. Fixes #59629.
13950 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
13952 * object.c: Fixed possible integer overflow when allocating large
13955 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
13957 * culture-info-tables.h: reflecting locale-builder updates.
13959 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
13961 * culture-info-tables.h: reflecting locale-builder updates.
13963 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
13965 * culture-info-tables.h: reflecting locale-builder updates.
13967 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
13969 * threads.c: Made Thread.Sleep abortable.
13971 2004-06-02 Martin Baulig <martin@ximian.com>
13973 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
13975 * debug-mono-symfile.h: Bumped symbol file version number to 37.
13977 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
13979 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
13981 2004-05-30 Jackson Harper <jackson@ximian.com>
13983 * reflection.c: Do not hardcode assembly versions or public key
13984 tokens anymore. All of this except the corlib section was dead
13987 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
13989 * object.c (mono_runtime_invoke_array): Automatically create boxed
13990 objects for byref valuetypes if needed. Fixes #59300.
13992 * object.c (mono_method_return_message_restore): Handle
13993 MONO_TYPE_OBJECT as well.
13995 2004-05-28 Jackson Harper <jackson@ximian.com>
13997 * reflection.c: The modified type encoding was causing build
13998 problems. Reverted for now.
14000 2004-05-28 Jackson Harper <jackson@ximian.com>
14002 * reflection.c/h: Take an assembly ref so that we dont create
14003 fully qualified names when encoding types in the same assembly as
14004 the custom attribute being emitted.
14005 * appdomain.c: Increment version number.
14007 2004-05-26 Duncan Mak <duncan@ximian.com>
14010 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14011 Set the full version number (major, minor, build, revision).
14013 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
14015 * marshal.c (emit_struct_conv): increment src/dst after blit
14016 (mono_marshal_get_managed_wrapper,
14017 mono_marshal_get_native_wrapper): make sure we have marshalling
14018 info before marshalling params (info computation affects
14021 * class.c (class_compute_field_layout): correctly deal with
14023 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
14024 value types (as per what windows dows by default)
14025 (mono_class_setup_mono_type): System.ValueType is blittable
14026 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
14029 * marshal.c (mono_marshal_load_type_info): flag types as
14030 non-blittable if the native layout doesn't match the managed
14033 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14035 * appdomain.c: don't add stuff in the private search path that is
14036 above the application base. If application base is not set, there's
14037 no private search path.
14039 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
14041 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
14042 byref struct arguments in native->managed marshalling.
14044 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
14046 * marshal.c (mono_marshal_get_runtime_invoke): correctly
14047 cache methods using signature (special case for methods
14048 that are value type or string class)
14050 * image.c (mono_image_close): clean up allocated GSList's
14051 in runtime_invoke_cache.
14053 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14055 * mono-config.c: set the correct path for mono_cfg_dir on windows when
14056 there's no MONO_CFG_DIR environment variable defined.
14058 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14060 * threads.c: windows version must be >= 0x0500 to include OpenThread.
14062 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
14064 * threadpool.c: Really wait for 500ms after the async call, even if the wait
14066 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
14067 before waiting for it, and call CloseHandle after the wait to unref it.
14068 This will make sure that handles are not disposed too early.
14070 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14075 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
14078 * object.c: se the application_base only for the domain that runs
14079 Main. Fixes bug #59216,
14081 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14084 * object.c: only the domain in which Main is run have
14085 SetupInformation.ConfigurationFile set, so moved a few lines from
14086 appdomain.c to object.c.
14088 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14090 * appdomain.c: we tried to load [name].(dll|exe), but according
14091 to bug #57710, we must also try [culture]/[name].(dll|exe) and
14092 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
14093 There's a test case attached to bug #58922.
14095 2004-05-27 Dick Porter <dick@ximian.com>
14098 * file-io.c: Implemented icalls for locking and unlocking regions
14100 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
14101 FALSE on error (fixes both compiler warning and real bug.)
14103 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
14105 * culture-info-tables.h: reflecting locale-builder updates.
14107 (Added missing ChangeLog entry for 05/26)
14109 2004-05-27 Jackson Harper <jackson@ximian.com>
14111 * locales.c: Fix some cut and paste errors.
14113 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14115 * mono-config.c: set the correct path for config. directory on windows.
14117 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
14119 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
14122 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14124 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
14125 from pinvoke functions.
14127 * marshal.c (mono_ftnptr_to_delegate): Implement this.
14129 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
14131 * culture-info-tables.h: reflecting locale-builder updates.
14133 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14135 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
14138 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
14140 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
14141 * icall.c: Modified icalls for RNG.
14142 * rand.c|h: Changed RNG interface to allow thread-safe usage under
14143 Windows (CryptoAPI).
14145 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
14147 * locales.c: Fix build.
14149 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
14151 * culture-info-tables.h: reflecting locale-builder updates.
14153 2004-05-25 Jackson Harper <jackson@ximian.com>
14155 * locales.c: When creating the current culture use the $LANGs
14156 specific culture. So DateTimeFormat and NumberFormat entries are created.
14158 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
14160 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
14161 a char array as parameter.
14163 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
14165 * image.c: In mono_image_open(), always use an absolute path name to
14166 look for already loaded images.
14168 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
14170 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
14171 missing in the windows build (like older cygwin include files).
14173 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
14175 * icall.c: Fixed check for possible integer overflow in Buffer_
14176 BlockCopy icall. Replaced comments style // by /* */.
14178 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
14180 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
14182 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
14183 check after MONO_VTADDR. Fixes pinvoke2.exe.
14185 * marshal.h marshal.c metadata.h: Add beginnings of support for
14186 ftnptr -> delegate marshalling.
14188 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
14190 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
14191 * threads.c: Fix warnings.
14193 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
14195 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
14196 * icall.c: Registered icalls for Suspend and Resume.
14197 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
14199 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
14200 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
14201 * process.c: Use WaitForSingleObjectEx.
14202 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
14204 * threads.c, threads.h: Make use of new Ex wait methods. Improved
14205 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
14206 for Suspend and Resume. Added new mono_thread_stop, used for stoping
14207 background threads. Added basic support for Abort in Windows.
14208 Start new threads using a managed delegate invoke wrapper. This wrapper
14209 has an interruption checkpoint that is needed since an interruption
14210 can be requested before the thread leaves the unmanaged code that starts
14212 * marshal.c: Added interruption checkpoint after every native call, and
14213 also before managed calls for wrappers called from unmanaged code to
14214 go into managed code.
14215 * object.h: Added new field in MonoThread to keep track of interruption
14218 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
14220 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
14223 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14230 * rand.c: getenv -> g_getenv (windows!)
14232 * process.c: complete_path is also used on non-windows platforms.
14234 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14236 * icall.c: new signature for Process_Start.
14238 * process.[ch]: new signature for Process_Start. If we're on windows
14239 and UseShellExecute is false, we have to search for the program by
14240 ourselves if we don't get a full path.
14242 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
14244 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
14245 marshalling and call CleanUpNativeData if needed. Fixes #58646.
14247 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14249 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
14252 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14254 * process.c: use double quotes to quote program name and arguments on
14255 windows. Fixes bug #58575.
14257 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14259 * file-io.c: don't return "." and ".." when using windows Find*File.
14261 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
14263 * marshal.c: Don't pass wrappers to message init because method
14264 addressed used to lookup metadata. part of remoting[2|3] fix.
14266 2004-05-15 Jackson Harper <jackson@ximian.com>
14268 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
14269 path is essentially the same as MONO_PATH except that it points to
14270 GACs instead of lib directories.
14271 * loader.h: The user gac is gone so we dont need function to
14273 * mono-config.c: user gac option is now gone.
14275 2004-05-15 Jackson Harper <jackson@ximian.com>
14277 * culture-info.h: Make defines more consistent, add calendar data
14278 to the culture info table.
14279 * culture-info-tables.h: Add basic calendar data. Basically
14280 everyone gets default gregorian until all the data is
14282 * locales.c: Use the new consistent defines. Set calendar data for
14283 culture info objects.
14284 * object.h: add a field for calendar data to CultureInfo
14286 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
14288 * image.c: image->runtime_invoke_cache is keyed on signatures now.
14289 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
14291 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
14292 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
14293 an extra param that is the pointer of the method to invoke. The IL for
14294 the invoke method is no longer specific to the method, but to the
14295 signature of the method. Thus, we can share the same code for multiple
14296 methods. This reduces the number of methods that have to be compiled.
14298 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
14300 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
14302 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14304 * icall.c: Optimize Buffer.BlockCopy.
14306 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14308 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
14309 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
14310 quote). Changed them to "MMMM yyyy".
14312 2004-05-12 Miguel de Icaza <miguel@ximian.com>
14315 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
14317 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
14319 * reflection.h: Updated after changes to managed structures.
14321 * appdomain.c: Bump corlib version.
14323 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14325 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
14328 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14330 * Makefile.am: link to ../os/libmonoos.la on windows.
14333 -If MONO_DEBUG, warn about non-existing directories in
14335 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
14336 compile time variable.
14337 -Removed init_default_path and call mono_set_rootdir from
14338 libmonoos.a instead (windows only).
14340 * assembly.h: declare mono_assembly_getrootdir().
14343 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
14345 * loader.c: s/getenv/g_getenv/
14347 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
14349 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
14351 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
14353 * metadata.h: Add new marshalling conversions.
14355 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
14358 * reflection.c (mono_reflection_get_type): Lookup the type in all
14359 modules of a multi-module assembly. Fixes #58291.
14361 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
14363 * threads.c: Before aborting a background, set the StopRequested
14364 state. This avoids throwing the Abort exception.
14365 In mono_thread_manage, don't continue with the shutdown until all
14366 aborted threads have actually stopped.
14368 2004-05-10 Jackson Harper <jackson@ximian.com>
14370 * locales.c: Remove the modifier from culture names.
14372 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14374 * Makefile.am: monosn is not installed any more. It has been deprecated
14377 2004-05-07 Jackson Harper <jackson@ximian.com>
14380 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
14381 Fix array construction, add bailout if the length is 0.
14383 2004-05-07 Dick Porter <dick@ximian.com>
14385 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
14386 machine doesn't have a DNS entry. Patch by Urs Muff
14387 (umuff@quark.com), fixes bug 57928.
14389 2004-05-06 Jackson Harper <jackson@ximian.com>
14391 * reflection.c: Handle null PublicTokens properly. alloc mem for
14392 assembly names culture so we dont crash when freeing it.
14394 2004-05-06 Jackson Harper <jackson@ximian.com>
14396 * assembly.c: Check the usergac when loading with partial names.
14398 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
14400 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
14401 does nothing for now (not required for Linux/Windows) but the class
14402 library can call it (and a newer or modified runtime could need it).
14403 * icall.c: Registred icall.
14405 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14407 * loader.c: prints a message on module loading error we set MONO_DEBUG
14408 environment variable.
14410 2004-05-05 Jackson Harper <jackson@ximian.com>
14412 * appdomain.c: Handle PublicKeyToken=null properly.
14414 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
14416 * environment.c|h: Added icall ves_icall_System_Environment_
14417 GetOSVersionString to get the current OS version as a string.
14418 * icall.c: Registred icall.
14420 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
14422 * object.c: in mono_object_get_virtual_method(), take into account that
14423 non-virtual methods don't have a slot in the vtable. Check needed when
14424 the object is a proxy.
14426 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
14428 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
14429 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
14431 * object.c (mono_class_compute_gc_descriptor): Fix warning.
14433 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
14434 passed when a valuetype is expected.
14436 * object.c (mono_unhandled_exception): Only set the exit code if the
14437 exception happens in the main thread. Fixes thread5.exe.
14439 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
14440 invalid names. Fixes #58047.
14442 2004-05-03 Jackson Harper <jackson@ximian.com>
14444 * assembly.c: This line was committed accidently and is unneeded.
14446 2004-05-03 Jackson Harper <jackson@ximian.com>
14448 * icall.c: Add new icall for Assembly::LoadWithPartialName
14449 * assembly.c/.h: new function that probes the GAC to load partial
14450 assembly names by Paolo Molaro.
14452 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14454 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
14455 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
14456 (type_get_fully_qualified_name): Added PublicKeyToken when building a
14459 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14461 * appdomain.c: fixed check for 'neutral' culture and removed warning.
14462 * reflection.c: fix bug when parsing a full type name and Version is not
14463 the last thing in the string.
14465 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
14467 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
14468 crashes when it is freed.
14470 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14472 * assembly.c: print the compat warning to stderr.
14474 2004-05-01 Miguel de Icaza <miguel@ximian.com>
14476 * assembly.c (mono_assembly_load_references): Add a compatibility
14477 hack to run old applications that might be still referencing the
14478 3300-based assemblies, only do this for System.xxx.
14480 2004-05-01 Jackson Harper <jackson@ximian.com>
14482 * appdomain.c: If the culture is neutral we set it to "".
14484 2004-04-29 Jackson Harper <jackson@ximian.com>
14486 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
14488 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
14490 * string-icalls.c: added low overhead function for copying chars
14491 * icall.c: added needed icall for the above function
14493 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14495 * icall.c: fix return value of get_global_assembly_cache. Implemented
14496 Environment.GetLogicalDrives.
14498 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
14500 * rand.c: try and talk to egd or prngd
14501 for random bytes if opening devices fail.
14503 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
14505 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
14506 alignment for the type using the native alignment of its members
14507 instead of using klass->min_align.
14509 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
14511 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14514 * socket-io.c: added check for sys/aio.h.
14516 2004-04-28 Dick Porter <dick@ximian.com>
14518 * threads.c: Don't abort a thread thats already aborting, when
14519 terminating everything.
14521 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14523 * icall.c: added 2 new async calls for Socket.
14525 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
14526 IO on *nix systems.
14528 * threadpool.c: removed unused variable.
14530 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
14532 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
14534 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
14536 * locales.c: put back string_invariant_tolower () and
14537 string_invariant_toupper ().
14539 2004-04-26 David Waite <mass@akuma.org>
14544 * unicode.h: remove comma from end of enumeration declarations
14546 2004-04-26 David Waite <mass@akuma.org>
14548 * debug-mono-symfile.h:
14551 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
14554 2004-04-26 Jackson Harper <jackson@ximian.com>
14556 * appdomain.c: Increment version number.
14558 2004-04-26 Jackson Harper <jackson@ximian.com>
14560 * appdomain.c: Set assembly references public token value when
14561 PublicKeyToken is specified, not the hash_value. Free public token
14562 values when free assembly name data. Previously the public key
14563 token was hex decoded, however we are using hex encoded public key
14564 tokens, so this is not neccasary.
14565 * assembly.c: Lookup assemblies in the gac if their public token
14566 value is set. Add function to allow enabling user gac
14567 lookups. Specify whether or not the assembly was loaded from the
14568 GAC. Compare full assembly names when checking the cache for
14569 assemblies (Temporarily disabled see comment in code). Remove
14570 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
14571 specifies trace-loader they get extra info to stdout on the
14572 loading of assemblies.
14573 * image.h: Add a field for an assembly references public token
14574 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
14575 whether an assembly has been loaded from the GAC.
14576 * image.c: Remove a corlib -> mscorlib name mapping.
14577 * loader.h: Add function to enable/disable the user gac.
14578 * mono-config.c: Check if the usergac is enabled in the config
14580 * icall.c: New icall to determine whether or not an assembly has
14581 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
14582 * tabldefs.h: Add constant for assemblyref flag that specifies a
14583 full public key is used instead of a public token.
14584 * reflection.c: Remove mscorlib -> corlib mappings. Set
14585 PublicTokenValue instead of hash value. This value is a hex
14586 string so it does not need to be expanded.
14588 2004-04-26 Martin Baulig <martin@ximian.com>
14590 * mono-debug-debugger.c (mono_debugger_initialize): Set
14591 `mono_debugger_initialized' before calling mono_debug_lock().
14593 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
14595 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
14596 InternalToUpper/InternalToLower.
14597 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
14598 removed invariant culture shortcut. This is now done in managed code.
14599 * locales.c: (string_invariant_toupper/tolower) removed.
14601 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14603 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
14604 Added Poll internal call.
14606 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
14607 call for Poll. Select was too heavy for polling a single socket.
14609 * threadpool.[ch]: added mono_threadpool_cleanup.
14610 * threads.c: use it. Don't use Thread_Abort on windows.
14612 2004-04-23 Martin Baulig <martin@ximian.com>
14614 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
14616 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
14618 * icall.c: Registred new icalls for key pair protection and added an
14619 icall for Environment.GetFolderPath on Windows.
14620 * security.c|h: Added new icalls for key pair protection.
14622 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14624 * socket-io.c: don't display the non-supported family warning for known
14625 families. Now this is not displayed on windows when checking support
14628 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14630 * class.c: don't display the layout warning for static fields.
14632 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
14634 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
14635 * locales.c, locales.h: Added new icalls for culture-specific
14636 Char.ToLower and Char.ToUpper.
14638 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14640 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
14643 2004-04-20 Martin Baulig <martin@ximian.com>
14645 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
14646 of the type name before passing it to mono_reflection_type_from_name().
14648 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
14650 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
14651 encodings here. Fixes #56965.
14653 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
14655 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14656 fix test on strstr result not that I can see anything that
14657 relies on the result.
14659 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
14661 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
14664 * marshal.c (mono_marshal_get_string_encoding): New helper function.
14666 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
14667 function to determine which marshalling to use for strings. Fixes
14670 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
14672 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
14674 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
14676 * icall.c: #include mono-config.h
14678 2004-04-15 Jackson Harper <jackson@ximian.com>
14680 * culture-info-tables.h: Fix date formats for en-US culture.
14682 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
14684 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
14685 ThreadPool.SetMinThreads.
14686 * threadpool.c: Implemented ThreadPool.GetMinThreads and
14687 ThreadPool.SetMinThreads.
14689 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14691 * mono-config.c: also load the .config file in the directory
14692 where the assembly was found.
14694 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14696 * assembly.c: load per-assembly config files.
14697 * icall.c: decrapified code to get the config dir and moved to
14699 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
14700 per-assembly config files. When doing a dll map lookup give precedence
14701 to the per-assembly data.
14703 2004-04-14 Martin Baulig <martin@ximian.com>
14705 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
14706 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
14707 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
14709 * mono-debugger-debugger.c: While the debugger is locked, remember
14710 whether the symbol tables have changes and send one single
14711 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
14713 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
14715 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
14717 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
14720 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
14721 account when marshalling string arrays. Fixes #56965.
14723 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
14725 * icall.c: Add new icalls mapping for security.
14726 * security.c|h: Add internal calls for WindowsIdentity,
14727 WindowsImpersonationContext and WindowsPrincipal.
14729 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
14731 * class.c: Added comment to ensure the System.MonoDummy class
14732 is removed when no longer necessary
14734 2004-04-13 Miguel de Icaza <miguel@ximian.com>
14736 * appdomain.c: Pass arguments to the bootstraping exceptions to
14737 minimize JITed methods at boot
14739 * metadata.c (mono_exception_from_name_two_strings): Allow for the
14740 second string to be null.
14742 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14743 Change the protocol to minimize the JIT methods at startup. Now
14744 it Returns the internal codepage, if the value of "int_code_page"
14745 is 1 at entry, and we can not compute a suitable code page
14746 number, returns the code page as a string.
14748 2004-04-13 Jackson Harper <jackson@ximian.com>
14750 * culture-info-tables.h: Fix number of decimal digits for all
14753 2004-04-13 Jackson Harper <jackson@ximian.com>
14755 * icall.c: Clairfy out of sync error message. It is not always
14756 your corlib that is out of sync.
14758 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
14760 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
14761 properties when only the set accessor is overriden. Fixes #55874.
14763 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
14765 * assembly.c (mono_assembly_load_references): Make this thread safe.
14768 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
14770 * monosn.c: Add missing initialization calls.
14772 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
14775 ves_icall_System_Globalization_CultureInfo_construct_number_format
14776 Fix g_assert so it compiles on fussier compilers re int/ptr
14779 2004-04-08 Dick Porter <dick@ximian.com>
14782 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
14783 53992. Also rearrange the code so that the internal calls return
14784 an error value and exceptions are thrown from managed code.
14786 * icall.c: Add type info to the socket icalls.
14788 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14790 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
14793 2004-04-07 Martin Baulig <martin@ximian.com>
14795 * class.c (mono_class_from_generic_parameter): Don't default
14796 `klass->parent' to `mono_defaults.object_type'.
14798 2004-04-07 Martin Baulig <martin@ximian.com>
14800 * reflection.c (mono_reflection_initialize_generic_parameter): Set
14801 `param->pklass->reflection_info'.
14803 2004-04-07 Jackson Harper <jackson@ximian.com>
14805 * culture-info-tables.h: Fix date separator symbol.
14807 2004-04-07 Martin Baulig <martin@ximian.com>
14809 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
14810 from System.Type to System.MonoType.
14812 2004-04-07 Martin Baulig <martin@ximian.com>
14815 (MonoReflectionGenericParam): Added `has_reference_type' and
14816 `has_value_type' fields.
14818 * reflection.c (mono_image_get_generic_param_info): Encode the
14819 correct flags if we have the `class' or `struct' constraint.
14821 2004-04-07 Martin Baulig <martin@ximian.com>
14824 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
14826 2004-04-07 Jackson Harper <jackson@ximian.com>
14828 * appdomain.c: Revert extra patches, just wanted to bump the
14831 2004-04-07 Jackson Harper <jackson@ximian.com>
14833 * Makefile.am: Add culture-info private headers.
14834 * icall.c: Add new icalls for contructing locales.
14835 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
14836 * locales.h: Declare new culture info construction methods.
14837 * object.h: Add new fields used to avoid the CultureMap to
14839 * culture-info.h: Definition of structs used in the culture info
14841 * culture-info-tables.h: Autogenerated tables that contain culture
14842 info data. This file was generated with the locale-builder tool.
14843 * appdomain.c: Incement corlib version number.
14845 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
14847 * appdomain.c: (mono_runtime_init) move mono_thread_init
14848 to before mono_object_new calls so critical sections
14849 are initialized before use.
14851 2004-04-07 Martin Baulig <martin@ximian.com>
14854 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
14855 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
14856 (ves_icall_MonoGenericParam_initialize): Removed.
14857 (monogenericparam_icalls): Removed.
14858 (generictypeparambuilder_icalls): Added new table for
14859 System.Reflection.Emit.GenericTypeParameterBuilder.
14862 (mono_reflection_define_generic_parameter): Removed.
14863 (mono_reflection_initialize_generic_parameter): This is now called
14864 from GenericTypeParameterBuilder's .ctor.
14866 2004-04-06 Martin Baulig <martin@ximian.com>
14868 * class.c (mono_class_init): Don't inflate nested classes in a
14870 (mono_type_get_name_recurse): Include the generic arguments for
14871 generic instances and generic type declarations.
14872 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
14873 (_mono_class_get_instantiation_name): Removed.
14874 (mono_class_create_generic): Always use `gklass->name' as our name.
14876 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
14878 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
14879 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
14880 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
14881 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
14882 closed generic methods here.
14885 (mono_reflection_generic_inst_get_nested_types): Removed.
14886 (inflate_mono_method): Copy the generic parameters from the
14887 MonoMethodHeader into out MonoGenericMethod.
14889 2004-04-06 Martin Baulig <martin@ximian.com>
14892 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
14894 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
14896 * reflection.c (build_compressed_metadata): If we have any entries
14897 in the GenericParam, MethodSpec or GenericParamConstraint tables,
14898 set the header version to 1.1.
14900 2004-04-06 Martin Baulig <martin@ximian.com>
14902 * class.c (mono_class_init): If we're a generic instance,
14903 initialize our nested classes, too.
14904 (_mono_class_get_instantiation_name): Deal with the new `!%d'
14907 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14909 * process.c: quote the argument passed to the shell on windows.
14911 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
14913 * threads.c (mono_alloc_special_static_data): Allow this to be
14914 called during startup.
14916 2004-04-02 Martin Baulig <martin@ximian.com>
14919 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
14921 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
14923 * icall.c: Fix build.
14925 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
14927 * Makefile.am: Added security.c|h.
14928 * icall.c: Added icall for get_UserName;
14929 * security.c: New file for security related icalls. Added function
14930 get_UserName for System.Environment (fix #56144).
14931 * security.h: New. Header file for security.c
14933 2004-04-02 Dick Porter <dick@ximian.com>
14935 * icall.c: Deleted the icalls that were obsoleted some time ago
14936 by the ICU string code, and which were mixed into the icall
14937 rearranging. Fixes bug 55969.
14940 * string-icalls.c: Deleted the code that those icalls reference.
14942 2004-04-01 Martin Baulig <martin@ximian.com>
14944 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
14946 * class.c (mono_class_from_generic_parameter): Don't set
14947 TYPE_ATTRIBUTE_INTERFACE.
14948 (my_mono_class_from_generic_parameter): Likewise.
14950 2004-04-01 Martin Baulig <martin@ximian.com>
14952 * loader.c (find_method): Added an optional `MonoClass *ic'
14953 argument to search in a specific interface.
14954 (mono_get_method_constrained): New public function.
14956 2004-04-01 Martin Baulig <martin@ximian.com>
14958 * reflection.c (mono_image_get_generic_field_token): Use the
14959 `handleref' cache here.
14961 2004-04-01 Martin Baulig <martin@ximian.com>
14963 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
14965 * reflection.c (create_generic_typespec): Use the `typespec' hash
14966 here, not the `typeref' one.
14968 2004-04-01 Martin Baulig <martin@ximian.com>
14970 * class.c (mono_class_inflate_generic_type): Moved the
14971 functionality into a new static inflate_generic_type() which
14972 returns NULL if it didn't do anything. Only increment the
14973 `mono_stats.inflated_type_count' if we actually inflated
14975 (mono_class_get_full): Check the classes type to see whether we
14976 need to inflate it; also inflate MONO_TYPE_(M)VAR.
14978 2004-04-01 Jackson Harper <jackson@ximian.com>
14980 * reflection.c: Set culture for assembly references.
14982 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
14984 * reflection.[ch], icall.[ch], Fix support for pinning variables.
14986 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14989 (do_mono_assembly_open): the critical section also covers
14990 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
14992 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14995 (mono_manage_threads): abort the background threads when finishing.
14998 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15000 * gc.c: only close the done_event handle if there was no timeout.
15003 2004-03-30 Martin Baulig <martin@ximian.com>
15005 * icall.c (icall_entries): It's called "System.Activator", not
15006 "System.Activation".
15008 2004-03-30 Martin Baulig <martin@ximian.com>
15010 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
15011 (mono_class_create_from_typespec): Likewise.
15013 2004-03-30 Martin Baulig <martin@ximian.com>
15015 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
15016 `has_ctor_constraint' and `initialized'.
15018 2004-03-30 Martin Baulig <martin@ximian.com>
15020 * reflection.c (encode_new_constraint): New static function to add
15021 the constructor constraint attribute to a type parameter.
15022 (encode_constraints): Call encode_new_constraint() if necessary.
15025 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
15027 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
15029 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
15031 * reflection.c, icall.c: add support for pinning variables.
15033 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
15035 * marshal.c (mono_marshal_get_managed_wrapper):
15036 init bool local with zero rather than null.
15038 2004-03-29 Martin Baulig <martin@ximian.com>
15040 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
15041 the "official" behavior here.
15042 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
15044 2004-03-29 Martin Baulig <martin@ximian.com>
15046 * icall.c: Reflect latest API changes.
15048 2004-03-29 Martin Baulig <martin@ximian.com>
15050 * loader.c (mono_get_method_from_token): Also call
15051 mono_metadata_load_generic_params () for abstract and interface
15052 methods; replace the type arguments in the method signature with
15053 the ones which are loaded from the metadata.
15055 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
15057 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
15058 of the lock is not the current thread. MS.NET don't do it, in spite of
15059 what the documentation says. See bug #56157.
15061 2004-03-28 Martin Baulig <martin@ximian.com>
15063 * class.c (mono_class_init): Don't call init_properties() and
15064 init_events() for generic instances; set `prop->parent' when
15065 inflating properties.
15067 * reflection.c (mono_generic_inst_get_object): Call
15068 `mono_class_init (ginst->klass)'.
15069 (mono_type_get_object): Only create a MonoGenericInst if your
15070 generic type is a TypeBuilder.
15071 (do_mono_reflection_bind_generic_parameters): Only set
15072 `ginst->is_dynamic' if our generic type is a TypeBuilder.
15074 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
15076 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
15079 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15081 * icall.c: added Kill_internal icall.
15082 * process.[ch]: added Kill_internal icall.
15084 2004-03-25 Martin Baulig <martin@ximian.com>
15086 * class.h (MonoStats): Added `generic_instance_count',
15087 `inflated_method_count', `inflated_type_count' and
15088 `generics_metadata_size'.
15090 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15092 * reflection.c: no warnings now.
15094 2004-03-25 Martin Baulig <martin@ximian.com>
15096 * class.c (mono_class_get_full): New public function; does a
15097 mono_class_get(), but also takes a `MonoGenericContext *'.
15099 * loader.c (mono_field_from_memberref): Renamed to
15100 `field_from_memberref', made static and added `MonoGenericContext *'
15102 (mono_field_from_token): Added `MonoGenericInst *' argument.
15103 (method_from_memberef): Likewise.
15104 (mono_get_method_from_token): Likewise.
15105 (mono_get_method_full): New public function; does a
15106 mono_get_method(), but also takes a `MonoGenericContext *'.
15108 * verify.c (mono_method_verify): Get the method's generic context
15109 and pass it to mono_field_from_token(), mono_get_method_full() and
15110 mono_class_get_full().
15112 2004-03-25 Martin Baulig <martin@ximian.com>
15114 * class.c (mono_class_inflate_generic_type): Take a
15115 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
15116 `MonoGenericMethod *'.
15118 2004-03-25 Martin Baulig <martin@ximian.com>
15120 * loader.h (MonoMethodInflated): Store the MonoGenericContext
15121 instead of the MonoGenericMethod here.
15123 2004-03-25 Martin Baulig <martin@ximian.com>
15125 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
15126 each time we create a new MonoGenericInst, we also create a new
15127 context which points back to us.
15129 * class.c (inflate_method): Use `ginst->context' instead of
15130 creating a new context.
15132 * loader.c (method_from_memberref): Use
15133 `klass->generic_inst->context' instead of creating a new context.
15135 2004-03-25 Martin Baulig <martin@ximian.com>
15137 * class.h (MonoGenericContext): New struct.
15138 (MonoGenericMethod): Removed `generic_inst'.
15140 * class.c (mono_class_inflate_generic_method): Take a
15141 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
15143 2004-03-25 Martin Baulig <martin@ximian.com>
15145 * loader.h (MonoMethodInflated): New typedef.
15147 * metadata.h (MonoMethodSignature): Removed `gen_method', make
15148 `generic_param_count' consume just 30 bits, added `is_inflated'
15149 and `has_type_parameters' flags (one bit each).
15151 * class.c (mono_class_inflate_generic_method): Create a
15152 MonoMethodInflated instead of a MonoMethodNormal and set
15153 `is_inflated' in the method signature.
15155 * class.h (MonoGenericMethod): Removed `generic_method'.
15157 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
15159 * image.c: Make sure the name of a MonoImage is always an absolute path.
15160 This fixes bug #54415.
15162 2004-03-24 Martin Baulig <martin@ximian.com>
15164 * class.c (mono_class_setup_vtable): If we're a generic instance,
15165 use our generic type's vtable size.
15167 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
15169 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
15170 MONO_NO_UNLOAD env var as a temporary workaround for unloading
15173 2004-03-23 Martin Baulig <martin@ximian.com>
15175 * class.h (MonoDynamicGenericInst): Added `int count_events' and
15176 `MonoEvent *events'.
15178 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
15179 (typebuilder_icalls): Added "get_event_info"; calls
15180 mono_reflection_event_builder_get_event_info().
15182 * reflection.c (mono_reflection_generic_inst_initialize): Added
15183 `MonoArray *events'.
15184 (mono_reflection_event_builder_get_event_info): New function.
15186 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
15188 * object.h: add mono_type_initialization_init
15190 * object.c (mono_runtime_class_init):
15191 implement class constructor synchronization rules
15192 to cope with threading issues.
15193 add mono_type_initialization_init
15195 * appdomain.c (mono_runtime_init): call
15196 mono_type_initialization_init
15198 * class.h: removing initializing field from MonoVTable
15200 2004-03-23 Martin Baulig <martin@ximian.com>
15202 * class.c (my_mono_class_from_generic_parameter): Use
15203 `param->name' if it's not NULL.
15205 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
15207 * class.c: do not insert non-virtual methods in the vtable.
15208 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
15209 that means the method is non-virtual. This never would have
15212 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
15214 * profiler.c: Added lock for accessing coverage_hash.
15216 2004-03-22 Martin Baulig <martin@ximian.com>
15218 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
15219 `method->method->signature->generic_param_count != 0' to make it
15220 work for interface methods.
15222 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15224 * process.c: quote the string passed to the shell using g_shell_quote.
15226 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15229 (mono_threads_manage): don't remove the finalizer thread and self
15230 from the threads hash table so that mono_thread_manage can be called
15233 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15235 * process.c: quote the arguments when UseShellExecute is true. Fixes
15238 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15240 * threads.c: set mono_thread_detach as a cleanup routine for every
15241 thread. This way it's always executed upon thread termination, either
15242 aborted or finished normally. No more xsp hangs!
15244 2004-03-17 Martin Baulig <martin@ximian.com>
15246 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
15247 `int count_nested' and a `MonoType **nested'.
15249 * reflection.c (mono_reflection_bind_generic_parameters): Moved
15250 most of the functionality into a new static
15251 do_mono_reflection_bind_generic_parameters() and don't take a
15252 `MonoType *nested_in' argument any more. Don't compute nested
15254 (mono_reflection_generic_inst_get_nested_types): New public method
15255 to get nested types.
15257 * class.c (mono_class_create_generic): Set `klass->nested_in' if
15258 we're a nested class.
15260 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
15261 mono_reflection_generic_inst_get_nested_types() to compute the
15264 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15266 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
15267 descriptive error message under windows.
15269 2004-03-17 Martin Baulig <martin@ximian.com>
15271 * class.c (dup_type): Added `const MonoType *original' argument;
15272 copy the attrs from the original type.
15274 2004-03-17 Martin Baulig <martin@ximian.com>
15276 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
15277 `m->generic_inst_cache' here.
15279 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15281 * exception.h exception.c: Add stack_overflow_exception.
15283 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15286 (overlapped_callback): call SetEvent *after* invoking the callback.
15287 No need to call CloseHandle.
15289 2004-03-16 Martin Baulig <martin@ximian.com>
15291 * reflection.c (mono_image_get_fieldref_token): Take a
15292 `MonoReflectionField *' instead of a `MonoClassField *' and a
15293 `MonoClass *'; store the `MonoReflectionField *' in the hash.
15295 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15297 * appdomain.c: don't add the culture to the filename we're looking for
15298 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
15300 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15302 * locales.c: don't ignore symbols when doing case insensitive compares.
15303 Thanks Dick! Fixes bug #54046.
15305 * threads.c: surround 'threads' usage with enter/leave in
15306 mono_thread_manage.
15308 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
15310 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
15311 implicitly marshalled as [Out]. Fixes #55450.
15313 (mono_marshal_get_runtime_invoke): Zero out the result if there is
15316 2004-03-16 Martin Baulig <martin@ximian.com>
15318 * class.c (mono_class_from_generic_parameter): Use the actual
15321 2004-03-16 Martin Baulig <martin@ximian.com>
15323 * reflection.c (type_get_signature_size): New static function.
15324 Compues the size of the type in a method signature.
15325 (method_get_signature_size): New static function; calls
15326 type_get_signature_size() to compute the actual size of the
15327 method's signature.
15328 (method_encode_signature): Use method_get_signature_size() to get
15329 the signature's size rather than using `nparams * 10'.
15331 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15333 * file-io.h: define here WapiOverlapped on windows. I don't want the
15334 regular OVERLAPPED one.
15337 * threadpool.c: somehow, BindIoCompletionCallback is not found.
15338 Disabling AIO on windows.
15340 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15342 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
15345 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15347 * appdomain.c: upgraded corlib version.
15349 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
15350 and BeginWrite. Allow opening files for asynchrnous operations.
15352 * file-io.h: new struct that maps FileStreamAsyncResult.
15353 * icall.c: added new icalls.
15354 * process.[ch]: support setting child process environment variables
15355 and use the SHELL or COMSPEC when UseShellExecute is true.
15357 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
15358 callback for async. IO is here and also BindHandle.
15360 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
15363 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
15365 * reflection.c (create_custom_attr): Allow len == 0.
15367 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
15368 computation on big-endian machines.
15370 2004-03-13 Martin Baulig <martin@ximian.com>
15372 * class.h (MonoGenericInst): Added `int count_ifaces'.
15374 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
15375 `ginst->count_ifaces' instead `klass->interface_count' since we
15376 may get called before the vtable is created.
15378 * loader.c (mono_method_get_param_names): If we're a generic
15379 instance, return and don't initialize the class.
15381 * reflection.c (mono_reflection_setup_generic_class): Don't call
15382 ensure_runtime_vtable().
15383 (mono_reflection_bind_generic_parameters): Set
15384 `ginst->count_ifaces'.
15386 2004-03-11 Jackson Harper <jackson@ximian.com>
15390 * unicode.h: Remove unused System.Char icalls.
15392 2004-03-11 Miguel de Icaza <miguel@ximian.com>
15394 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
15395 code when we P/Invoke the first library in Windows.Forms, instead
15396 of when we first open the assembly.
15398 * assembly.c: Drop the lookup from here.
15400 2004-03-10 Martin Baulig <martin@ximian.com>
15402 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
15403 class for properties, fields and events. Finally fixes #54945.
15405 2004-03-10 Martin Baulig <martin@ximian.com>
15407 * metadata.c (mono_metadata_class_equal): New static function;
15408 checks whether two generic instances or two generic parameters are
15410 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
15413 2004-03-10 Martin Baulig <martin@ximian.com>
15415 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
15417 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
15418 argument and write it into the `reflection_info' field.
15421 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
15422 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
15424 2004-03-09 Jackson Harper <jackson@ximian.com>
15426 * char-conversions.h: use 8 bits for numeric data its all we need
15427 * icall.c: numeric data is only 8 bits now.
15429 2004-03-09 Martin Baulig <martin@ximian.com>
15431 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
15433 * class.c (init_properties, init_events): Initialize the new
15436 * reflection.c (typebuilder_setup_properties): Likewise.
15437 (typebuilder_setup_events): Likewise.
15439 * reflection.h (MonoEventInfo): Replaced `parent with
15440 `declaring_type' and `reflected_type'.
15442 * icall.c (ves_icall_get_property_info): Distinguish between
15443 declaring and reflected type.
15444 (ves_icall_get_event_info): Likewise.
15446 2004-03-09 Martin Baulig <martin@ximian.com>
15448 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
15449 (ves_icall_Type_GetField): Correctly set field->klass.
15451 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
15453 * loader.h: Fix warning.
15455 2004-03-08 Miguel de Icaza <miguel@ximian.com>
15457 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
15458 library routine if present. Notice that it will still continue
15459 executing even if its missing, for those working on the Gtk#
15460 edition of Windows.Forms.
15462 * assembly.c (do_mono_assembly_open): If loading the
15463 System.Windows.Forms call mono_loader_wini_init.
15465 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
15467 * class.h: Added MonoRemoteClass struct.
15468 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
15469 function for MonoStrings.
15470 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
15471 Added internal call for getting the proxy type.
15472 * marshal.c: Get the type of transparent proxies from its remote_class.
15473 Added methods that generate the IL for type checks and casts:
15474 mono_marshal_get_isinst, mono_marshal_get_castclass,
15475 mono_marshal_get_proxy_cancast.
15476 * marshal.h: Declaration of the previous new methods.
15477 * object.c: Added new moethods for creating and updating MonoRemoteClass
15478 instances: mono_remote_class, mono_upgrade_remote_class,
15479 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
15480 * verify.c: FIx transparent_proxy_fields layout.
15481 * appdomain.c: Bump corlib version.
15483 2004-03-04 Jackson Harper <jackson@ximian.com>
15485 * icall.c: Add icall to access char conversion tables.
15486 * char-conversions.h: Character conversion tables.
15487 * Makefile.am: Add char-conversions.h private header file.
15489 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
15491 * appdomain.c (unload_thread_main): Increase unloading timeout to
15492 10 sec as a temporary workaround for Nant problems.
15494 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
15496 * gc.c: Add checks for GC_enable and GC_disable.
15498 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
15499 (jaak@zd.com.pl). Fix memory corruption in String.Replace
15502 2004-02-27 Martin Baulig <martin@ximian.com>
15504 * reflection.c (mono_reflection_bind_generic_parameters): Take a
15505 `MonoReflectionType *' instead of a `MonoType *'.
15507 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
15509 * gc.c (run_finalize): Avoid finalizing the object representing the
15511 (finalizer_thread): Fix warning.
15513 2004-02-25 Martin Baulig <martin@ximian.com>
15515 * class.c (_mono_class_get_instantiation_name): Added `int offset'
15516 argument for nested types.
15517 (mono_class_create_generic): Added support for nested generictypes.
15519 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
15522 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
15524 * reflection.c (method_encode_signature): Increase the minimum
15525 value of `size' from 10 to 11.
15526 (mono_reflection_bind_generic_parameters): Take `int type_argc'
15527 and `MonoType **types' arguments instead of the `MonoArray
15528 *types'; added `MonoType *nested_in'. Recursively instantiate
15531 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
15533 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
15534 stack_overflow_ex members which are used by exception handling.
15536 * appdomain.c (mono_runtime_init): Initialize the new members.
15538 * gc.c (mono_gc_enable): New helper function.
15539 * gc.c (mono_gc_disable): New helper function.
15541 2004-02-23 Martin Baulig <martin@ximian.com>
15543 * icall.c: I must have been really stupid - make it actually work
15546 2004-02-23 Martin Baulig <martin@ximian.com>
15548 * loader.c (method_from_memberref): Only inflate the method if
15549 it's in another klass.
15551 2004-02-23 Martin Baulig <martin@ximian.com>
15553 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
15554 (mono_class_init): If we're a generic instance and an interface,
15555 compute `class->interface_id'; also create `class->interfaces'
15556 here and inflate them.
15558 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
15560 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
15562 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
15564 2004-02-15 Miguel de Icaza <miguel@ximian.com>
15566 * reflection.c (method_encode_code): Improved the error message
15567 generated by the exception.
15569 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15571 * icall.c: Martin did not do what he said in the ChangeLog for
15572 2004-02-18, but put back the changes for properties and events.
15573 Commenting those changes out again and adding comment to bug #54518.
15575 * process.c: removed warning.
15577 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
15579 * marshal.c (emit_struct_conv): Print an error message instead of
15580 asserting when a type does not have the StructLayout attribute.
15582 2004-02-20 Martin Baulig <martin@ximian.com>
15584 * reflection.c (mono_type_get_object): Also use the cache for
15586 (mono_reflection_bind_generic_parameters): Always compute
15589 2004-02-20 Martin Baulig <martin@ximian.com>
15591 * class.h (MonoGenericMethod): Removed `klass'.
15593 * class.c (mono_class_inflate_generic_method): Added `MonoClass
15596 2004-02-20 Martin Baulig <martin@ximian.com>
15598 * reflection.c (method_encode_methodspec): Actually use the
15599 uninflated signature for the memberref.
15601 2004-02-20 Martin Baulig <martin@ximian.com>
15603 * class.h (MonoGenericMethod): Removed `declaring'.
15605 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
15606 is NULL, compute it here.
15608 2004-02-20 Martin Baulig <martin@ximian.com>
15610 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
15612 * metadata.c (mono_metadata_generic_inst_hash): New method.
15613 (mono_metadata_generic_inst_equal): New method.
15615 * reflection.c (mono_reflection_bind_generic_parameters): Use the
15616 `klass->image->generic_inst_cache' cache to avoid creating
15617 duplicate MonoGenericInst's.
15619 * class.c (mono_class_inflate_generic_type): Use the cache.
15621 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
15623 * object.c: fixed gc descriptor calculation for embedded valuetypes.
15625 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15627 * icall.c: added Socket.WSAIoctl icall.
15629 * socket-io.[ch]: implemented
15630 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
15632 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
15634 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
15636 2004-02-18 Urs C Muff <umuff@quark.com>
15638 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
15639 this work on PPC and other big-endian architectures.
15641 * debug-mono-symfile.h: Prepended the names of all the `guint32'
15642 fields with an underscore to make sure they're only accessed by
15643 the read32() macro.
15645 2004-02-18 Martin Baulig <martin@ximian.com>
15647 * icall.c: Put the klass->refclass changes back for methods and
15648 fields, but not for properties and events. We're currently not
15649 distinguishing between DeclaringType and ReflectedType for
15650 properties and events, that's what caused the regressions.
15652 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15655 (mono_async_result_new): the handle can be NULL.
15657 * threadpool.c: Use an event instead of a semaphore, don't initialize
15658 it until needed. This saves quite a few semaphores from being created
15659 when using the threadpool.
15661 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
15663 * object.c (mono_string_is_interned_lookup): Fix interning of long
15664 strings. Fixes #54473.
15666 * domain.c (ldstr_equal): Optimize if the two strings are equal.
15668 * icall.c: Revert the klass->refclass changes since they introduce
15669 regressions (bug #54518).
15671 2004-02-18 Martin Baulig <martin@ximian.com>
15673 * class.c (mono_class_init): If we're a generic instance and don't
15674 come from a TypeBuilder, inflate our members here.
15675 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
15676 (mono_class_create_generic): New public method.
15677 (mono_class_initialize_generic): Removed.
15678 (get_instantiation_name): Renamed to
15679 _mono_class_get_instantiation_name() and made it public.
15681 2004-02-18 Martin Baulig <martin@ximian.com>
15683 * class.c (mono_class_inflate_generic_type): Clear the new
15684 instance's `nginst->klass' when inflating a generic instance.
15685 (mono_class_is_subclass_of): Added (basic) support for generic
15688 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
15690 * appdomain.h, domain.c: use a MonoCodeManager instead of a
15691 MonoMempool to hold compiled native code.
15693 2004-02-17 Martin Baulig <martin@ximian.com>
15695 * class.h (MonoDynamicGenericInst): Added `count_properties' and
15698 * reflection.c (mono_reflection_generic_inst_initialize): Added
15699 `MonoArray *properties' argument.
15701 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
15703 2004-02-17 Martin Baulig <martin@ximian.com>
15705 * icall.c (ves_icall_Type_GetFields): Renamed to
15706 ves_icall_Type_GetFields_internal() and added a
15707 `MonoReflectionType *rtype' argument; pass it to
15708 mono_field_get_object() to set the field's "reflected" type.
15709 (ves_icall_Type_GetConstructors): Likewise.
15710 (ves_icall_Type_GetEvents): Likewise.
15711 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
15712 argument; pass it to mono_method_get_object() to set the method's
15715 2004-02-17 Martin Baulig <martin@ximian.com>
15717 * class.h (MonoDynamicGenericInst): New type.
15718 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
15720 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
15721 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
15722 (ves_icall_MonoGenericInst_GetFields): New interncall.
15724 * class.c (mono_class_from_generic): Don't call
15725 mono_class_initialize_generic() if this is a dynamic instance;
15726 ie. it's being created from a TypeBuilder.
15727 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
15728 `class->byval_arg.type'.
15730 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
15731 to `inflate_method' and made static.
15732 (mono_reflection_inflate_field): Removed.
15733 (mono_reflection_generic_inst_initialize): New public method.
15735 * reflection.h (MonoReflectionGenericInst): Removed `methods',
15736 `ctors' and `fields'; added `initialized'.
15738 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
15740 * debug-helpers.c (mono_method_full_name): Fix output for empty
15743 2004-02-12 Martin Baulig <martin@ximian.com>
15745 * class.h (MonoClassField): Added `MonoType *generic_type'.
15747 * reflection.c (mono_image_get_fieldref_token): Added support for
15748 instantiated generic types.
15749 (field_encode_inflated_field): Removed.
15750 (mono_image_get_inflated_field_token): Removed.
15751 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
15753 * reflection.h (MonoReflectionInflatedField): Removed.
15755 2004-02-12 Martin Baulig <martin@ximian.com>
15757 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
15758 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
15760 * reflection.c (mono_image_get_methodspec_token): Take a
15761 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
15762 (mono_image_create_token): Check whether we have a
15763 `method->signature->gen_method' and call
15764 mono_image_get_methodspec_token() if appropriate.
15765 (inflated_method_get_object): Removed.
15766 (mono_reflection_bind_generic_method_parameters): Return a
15767 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
15768 (mono_reflection_inflate_method_or_ctor): Likewise.
15770 * reflection.h (MonoReflectionInflatedMethod): Removed.
15772 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
15774 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
15775 for custom valuetype marshalling.
15777 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
15779 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15781 * icall.c: fixed WSAGetLastError_internal name.
15783 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
15785 * threads.c (mono_thread_attach): Allow this to be called multiple
15786 times for a thread.
15788 * threads.c (build_wait_tids): Do not wait for ourselves.
15790 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
15791 appdomain list is empty.
15793 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
15794 memory returned by mono_string_builder_to_utf16, since it points into
15795 managed memory. Thanks to Bernie Solomon for noticing this.
15797 * icall.c: Add AppDomainSetup icalls.
15799 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
15801 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
15804 * reflection.c (reflection_methodbuilder_to_mono_method): Save
15805 custom attributes to the method_aux struct. Also fix array indexes etc.
15807 * loader.c (mono_method_get_param_names): Make dynamic case work again.
15809 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
15811 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
15812 (both static and runtime) and reduce startup time.
15814 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
15816 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
15817 AsAny marshalling conversion instead of crashing.
15819 * marshal.c: Fix warnings.
15821 2004-02-09 Martin Baulig <martin@ximian.com>
15823 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
15825 * reflection.h (MonoReflectionInflatedMethod): Removed the
15826 `declaring' field, it's now in the unmanaged MonoGenericMethod.
15828 * reflection.c (method_encode_methodspec): Removed the `method'
15829 argument; we get it from `gmethod->declaring'.
15830 (inflated_method_get_object): Removed the `declaring' argument.
15832 2004-02-09 Martin Baulig <martin@ximian.com>
15834 * class.h (MonoGenericMethod): New type.
15835 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
15838 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
15839 a `MonoGenericMethod *gen_method' one.
15841 * class.c (mono_class_inflate_generic_type): Take an additional
15842 `MonoGenericMethod * argument. This is only non-NULL if we're
15843 inflating types for a generic method.
15844 (mono_class_inflate_generic_signature): Renamed to
15845 inflate_generic_signature() and made static; take a
15846 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15847 (inflate_generic_header): Take a `MonoGenericMethod *' argument
15848 instead of a `MonoGenericInst *' one.
15849 (mono_class_inflate_generic_method): Likewise.
15851 * reflection.c (encode_generic_method_sig): Take a
15852 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15853 (method_encode_methodspec): Likewise.
15854 (inflated_method_get_object): Likewise.
15856 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
15857 field with a `MonoGenericMethod *gmethod' one.
15859 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
15861 * class.h (mono_class_has_parent): add parens to expansion
15864 2004-02-08 Martin Baulig <martin@ximian.com>
15866 * image.h (MonoImage): Removed `generics_cache'.
15868 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
15869 instead of a `MonoType *' argument; removed the `inflate_methods'
15870 argument. Don't inflate methods here.
15872 * loader.c (find_method): If it's a generic instance, call
15873 mono_class_init() on the `sclass->generic_inst->generic_type'.
15875 * metadata.c (mono_type_size): Make this work on uninitialized
15876 generic instances; call it on the `ginst->generic_type's class.
15878 * reflection.c (mono_reflection_bind_generic_parameters): Call
15879 mono_class_from_generic() to create the `ginst->klass'.
15881 2004-02-08 Martin Baulig <martin@ximian.com>
15883 * class.h (MonoClass): Changed type of `generic_inst' from
15884 `MonoType *' to `MonoGenericInst *'.
15886 2004-02-08 Martin Baulig <martin@ximian.com>
15888 * icall.c (ves_icall_Type_BindGenericParameters): Just call
15889 mono_type_get_object(), this is now creating a `MonoGenericInst'
15890 for MONO_TYPE_GENERICINST.
15891 (ves_icall_MonoGenericInst_GetParentType): Likewise.
15892 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
15894 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
15895 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
15896 (inflated_method_get_object): Added `MonoClass *refclass' argument.
15897 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
15898 and reflected type.
15900 * reflection.h (MonoReflectionInflatedMethod): Removed
15901 `declaring_type' and `reflected_type'.
15903 2004-02-08 Martin Baulig <martin@ximian.com>
15905 * class.h (MonoGenericInst): Added `MonoType *parent' and
15906 `MonoType **ifaces'.
15908 * reflection.h (MonoReflectionGenericInst): Removed `klass',
15909 `parent' and `interfaces'.
15911 * reflection.c (mono_reflection_bind_generic_parameters): Take a
15912 `MonoType *' argument and return a `MonoType *'.
15915 (ves_icall_MonoGenericInst_GetParentType): New interncall.
15916 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
15918 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
15920 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
15921 valuetype marshalling.
15923 2004-02-06 Martin Baulig <martin@ximian.com>
15926 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
15927 (my_mono_class_from_generic_parameter): Likewise.
15929 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
15931 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
15932 contents of the symbol files lazily.
15934 * object.h (MonoThread): Add 'name' and 'name_len' fields.
15936 * threads.h threads.c icall.c: New icalls for getting and setting the
15939 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
15941 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
15942 Raise an exception when the domain is not found.
15944 2004-02-03 Martin Baulig <martin@ximian.com>
15946 * reflection.c (mono_image_get_methodspec_token): Use the
15947 uninflated signature; fixes gen-33.
15949 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
15951 * gc.c threads.c: Make the finalizer thread a normal managed thread so
15952 the finalizer code can use thread functionality.
15954 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
15955 the finalizer thread.
15957 * threads.c: Make some functions more robust.
15959 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
15961 * metadata.h: Add new marshalling conventions.
15963 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
15964 stringbuilder marshalling. Fixes #53700.
15966 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
15968 * reflection.c (mono_image_get_type_info): Save declarative security
15971 * reflection.c (mono_image_get_field_info): Handle uninitialized
15972 unmanaged fields as well.
15974 * appdomain.c: Bump corlib version.
15976 2004-02-01 Martin Baulig <martin@ximian.com>
15978 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
15979 method type arguments.
15981 2004-01-30 Duncan Mak <duncan@ximian.com>
15983 * marshal.h: Add prototype for
15984 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
15986 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
15989 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
15991 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
15992 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
15994 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
15996 * marshal.c (mono_marshal_get_native_wrapper): Add support for
15997 custom marshalling of valuetypes.
15999 * marshal.c: Fix some warnings.
16001 2004-01-29 Martin Baulig <martin@ximian.com>
16003 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
16004 for generic method parameters.
16006 * reflection.c (method_encode_methodspec): Write the uninflated
16007 signature into the methodspec table.
16008 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
16009 is always the uninflated method.
16010 (reflection_methodbuilder_to_mono_method): Copy the generic
16011 parameters from the MethodBuilder into `header->gen_params'.
16013 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
16015 * class.c (mono_class_from_generic_parameter): Fix warning.
16017 2004-01-27 Martin Baulig <martin@ximian.com>
16019 * class.c (mono_class_from_generic_parameter): Don't create
16020 `klass->methods' here.
16022 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
16024 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
16025 extension since it does not work with libraries named lib<FOO>.dll.so.
16027 2004-01-25 Martin Baulig <martin@ximian.com>
16029 * class.c (mono_class_inflate_generic_type): Added support for
16030 MONO_TYPE_GENERICINST.
16032 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
16033 inflate methods on open constructed types.
16035 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16037 * object.c: fire ProcessExit event in the root AppDomain after running
16038 Main. Fixes bug #53299.
16040 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16042 * socket-io.c: include the new socket-wrappers.h header.
16043 Use the wrappers instead of the unix socket functions to make the code
16046 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
16048 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
16050 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
16053 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
16055 * reflection.c (mono_image_create_pefile): Handle the case when the
16056 entry point is not a MethodBuilder.
16058 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
16059 field to ReflectionMethod since it is not allways a builder.
16061 * reflection.c (type_get_fully_qualified_name): New helper function to
16062 return the fully qualified name of a type.
16064 * reflection.c (encode_marshal_blob): Always emit the fully qualified
16065 type name for custom marshallers.
16067 * reflection.c (mono_marshal_spec_from_builder): Ditto.
16069 * class.c (mono_class_setup_vtable): If a parent class already
16070 implements an interface, use the implementing methods from that class.
16073 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16075 * threadpool.c: just return instead of ExitThread to allow for thread
16078 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
16080 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
16081 when closing resource modules.
16083 * reflection.c (mono_image_create_pefile): Handle the case when the
16084 entry point is not a MethodBuilder.
16086 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
16087 field to ReflectionMethod since it is not allways a builder.
16089 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
16091 * marshal.c (mono_marshal_get_managed_wrapper):
16092 mono_marshal_alloc takes native int so CONV_I
16093 the arg for 64bits.
16095 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
16097 * reflection.c (fixup_cattrs): New function to fixup the methoddef
16098 tokens in the cattr table. Fixes #53108.
16100 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16102 * loader.c: don't trim ".dll" before looking up in the config file.
16103 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
16105 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
16107 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
16108 Return the module which contains the resource as well.
16109 (ves_icall_System_Reflection_Module_Close): New icall.
16111 * appdomain.c: Bump corlib version number.
16113 * image.c (mono_image_addref): New public function.
16115 * assembly.c: Call mono_image_addref.
16117 * reflection.c (mono_module_get_object): Increase reference count of
16120 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
16123 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
16124 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
16125 proper exceptions on DllImport problems.
16127 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
16129 * class.c, metadata.c: eliminate CSIZE macro.
16131 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
16133 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
16134 * object.h: Added async_callback field in MonoAsyncResult.
16135 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
16136 * verify.c: Added async_callback in MonoAsyncResult layout.
16138 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
16140 * reflection.c (mono_reflection_get_custom_attrs): Add support
16143 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
16145 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
16147 (mono_marshal_method_from_wrapper): Add null pointer check.
16149 2004-01-16 Martin Baulig <martin@ximian.com>
16151 * debug-mono-symfile.h: Set version number to 36 and reflect
16152 latest symbol writer changes.
16154 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
16156 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
16157 multi-dimensional arrays.
16158 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
16159 (mono_class_from_mono_type): Use bounded_array_class_get.
16161 * class.c (mono_bounded_array_class_get): New function which takes
16162 a 'bounded' bool argument to distinguish vectors from one dimensional
16165 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
16166 bounded_array_class_get if the array has bounds.
16168 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16169 Search modules loaded using AssemblyBuilder:AddModule as well.
16171 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16173 * appdomain.c: increased corlib version.
16174 * filewatcher.c: removed g_print.
16176 (get_property_info): only allocate what is actually requested.
16177 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
16179 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16181 * Makefile.am: added filewatcher.[ch]
16182 * filewatcher.[ch]: FileSystemWatcher runtime support.
16183 * icall.c: added new FSW icalls.
16185 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
16187 * string-icalls.c: fix stringbuilder regression as suggested by
16188 Iain McCoy <iain@mccoy.id.au>.
16190 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
16192 * process.c (process_read_stringtable_block): Recognize '007f' as
16193 a language neutral stringtable block.
16195 2004-01-12 Patrik Torstensson
16197 * object.h (MonoStringBuilder) : Changed layout to support our
16198 new stringbuilder class.
16199 * marshal.c: Change marshalling to support the new layout of
16201 * appdomain.c: increased version number because new layout of
16204 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
16206 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
16207 assembly name as an string instead of an AssemblyName, since it is
16208 easier to extract info from it.
16210 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
16211 the culture subdirectories too. Fixes #52231.
16213 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16215 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
16216 It takes 2 new parameters with an optional name for the method to look
16217 for and case ignoring info.
16219 * threadpool.c: removed unused variable.
16221 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16223 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
16224 It takes 2 new parameters with an optional name for the property to look
16225 for and case ignoring info.
16228 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
16230 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
16233 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16236 * assembly.c: escape the uri before passing it to g_filename_from_uri.
16239 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
16241 * reflection.c: Add support for more than one unmanaged resource.
16243 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
16244 in field->def_value, as done in all other cases.
16246 * reflection.c (mono_reflection_get_custom_attrs): Add support for
16249 * reflection.c (mono_reflection_create_runtime_class): Remove
16250 errorneous assignment to klass->element_class, since it is already
16251 done in mono_reflection_setup_internal_class.
16253 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16255 * gc.c: added missing LeaveCriticalSection.
16256 * icall.c: indented a couple of lines.
16257 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
16258 if we call EndInvoke inside a callback. Fixes bug #52601.
16260 2004-01-07 Martin Baulig <martin@ximian.com>
16262 * mono-debug-debugger.h
16263 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
16265 2004-01-06 Miguel de Icaza <miguel@ximian.com>
16267 * appdomain.c: Use messages in NotImplementedException.
16269 * exception.c (mono_get_exception_not_implemented): Now this takes
16270 a message argument.
16272 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
16273 exception instead of g_asserting an aborting when something is not
16276 Add some inline docs.
16278 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
16280 * reflection.h: Update after changes to object layout.
16282 * reflection.c: Implement saving of unmanaged aka win32 resources.
16284 * appdomain.c: Bump version number.
16286 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
16287 Handle missing domains gracefully.
16289 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
16291 * file-io.c : On Windows, there are much more invalid_path_chars.
16293 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16295 * class.h, object.c: prepare for GetType () speedup.
16297 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
16299 * profiler.c: workaround for --profile null reference exception on
16300 cygwin. Patch by Patrik Torstensson.
16302 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
16304 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
16305 make work for unaligned access.
16307 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
16309 * class.c: small cleanup (class->fields [i] -> field).
16310 * image.c: check address of metadata is valid.
16312 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
16314 * assembly.h assembly.c (mono_assembly_loaded): New public function to
16315 search the list of loaded assemblies.
16317 * reflection.c (mono_reflection_type_from_name): Use
16318 mono_assembly_loaded instead of mono_image_loaded.
16320 * reflection.c: Fix warnings.
16322 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
16324 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
16325 is dynamic. This is needed since an assembly can contain both dynamic and
16326 non-dynamic images.
16328 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
16331 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
16333 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
16334 to store modules loaded using AddModule.
16336 * reflection.c (mono_image_fill_file_table): Generalize this so it works
16339 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
16341 * reflection.c (mono_image_fill_export_table_from_module): New function to
16342 fill out the EXPORTEDTYPES table from a module.
16344 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
16345 into a separate function. Also handle loaded non-dynamic modules.
16347 * reflection.c (mono_image_basic_init): Fix memory allocation.
16349 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16351 * assembly.c (mono_assembly_load_references): Make this public.
16353 2003-12-19 Martin Baulig <martin@ximian.com>
16355 * class.c (mono_class_initialize_generic): Made this static, take
16356 a `MonoGenericInst *' instead of a `MonoClass *'.
16357 (mono_class_from_generic): Call mono_class_initialize_generic()
16358 unless we're already initialized or being called from
16359 do_mono_metadata_parse_generic_inst().
16361 * class.h (MonoGenericInst): Added `initialized' and
16362 `init_pending' flags.
16364 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
16365 `mono_class_init (gklass)' or mono_class_initialize_generic()
16366 here; set `generic_inst->init_pending' while parsing the
16369 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
16371 * locales.c: include string.h for memxxx prototypes
16373 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
16375 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
16376 constructor when accessing literal fields.
16378 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
16380 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16382 * reflection.c (assembly_add_resource_manifest): New function to fill
16383 the MANIFESTRESOURCE table.
16385 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
16387 * reflection.h: Update to changes in class layout.
16389 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
16390 Reenable call to mono_runtime_is_shutting_down ().
16392 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
16393 determine if the runtime is shutting down.
16395 2003-12-16 Jackson Harper <jackson@ximian.com>
16397 * icall.c: comment out call to mono_runtime_is_shutting_down to
16400 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
16402 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
16403 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
16405 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
16407 * reflection.c: move definition of swap_with_size
16408 to before its first call
16410 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
16412 * appdomain.c (mono_runtime_is_shutting_down): New public function.
16414 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
16417 * object.c: Fix warnings.
16419 * icall.c (ves_icall_Type_Get...): Only consider inherited static
16420 members if FlattenHierarchy is set.
16422 * reflection.c (mono_image_add_decl_security): New function to emit
16423 declarative security.
16425 * reflection.h reflection.c: Add support for declarative security.
16427 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16429 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
16431 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16433 * appdomain.c verify.c: Moved corlib version checking into its own
16434 function in appdomain.c since it needs to create vtables etc.
16436 2003-12-13 Patrik Torstensson <p@rxc.se>
16438 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
16439 instead of unwrapped server.
16441 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
16443 * verify.c (check_corlib): Fix field index.
16445 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
16447 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
16450 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
16452 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
16453 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
16454 cope with sizeof(size_t) != sizeof(guint32).
16456 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16458 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
16459 in case of failure.
16461 2003-12-10 Mark Crichton <crichton@gimp.org>
16463 * icall.c: removed the GetNonZeroBytes. We now handle this case
16466 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
16468 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
16470 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
16473 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
16475 * verify.c (check_corlib): Handle the case when the version field is
16476 initialized by a static constructor.
16478 2003-12-08 Patrik Torstensson <p@rxc.se>
16480 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
16482 2003-12-08 Martin Baulig <martin@ximian.com>
16484 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
16485 a MonoReflectionGenericParameter, also take the parameter index
16486 and name as arguments.
16487 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
16488 (ves_icall_MonoGenericParam_initialize): New interncall.
16489 (ves_icall_Type_make_byref_type): New interncall.
16491 * reflection.h (MonoReflectionGenericParam): Derive from
16492 MonoReflectionType, not just from MonoObject. Added `refobj' and
16495 * reflection.c (mono_reflection_define_generic_parameter): Create
16496 and return a new MonoReflectionGenericParam; don't initialize the
16498 (mono_reflection_initialize_generic_parameter): New public method;
16499 initializes the constraints and creates the `param->pklass'.
16501 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
16503 * reflection.h reflection.c: Use the new fields 'num_types',
16504 'num_fields' and 'num_methods' to track the number of types etc.
16506 * verify.c (check_corlib): Check corlib version number.
16508 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
16510 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
16511 function works on all methods.
16513 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
16515 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
16516 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
16517 the custom_type_info flag of the transparent proxy.
16518 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
16519 objects that supports IRemotingTypeInfo.
16520 * object.h: Added custom_type_info field in transparent proxy.
16522 2003-12-06 Martin Baulig <martin@ximian.com>
16524 * class.c (mono_class_create_from_generic): Removed.
16525 (mono_class_from_generic): Check `ginst->klass' before doing
16526 anything else. This is important to fully support "recursive"
16529 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
16530 empty `generic_inst->klass' before doing anything else.
16532 2003-12-06 Dick Porter <dick@ximian.com>
16537 * locales.c: Use C structs to access class fields. Don't do a
16538 conversion between MonoString and UChar because both are
16539 platform-endian UTF-16. Compare now takes startindex and count
16540 parameters. Add a char overload for IndexOf. Speed up the
16541 invariant string IndexOf.
16543 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
16545 * Makefile.am (monosn_LDADD): Fix parallel build.
16547 2003-12-04 Martin Baulig <martin@ximian.com>
16550 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
16551 (ves_icall_Type_make_array_type): New interncall.
16553 2003-12-04 Martin Baulig <martin@ximian.com>
16555 * locales.c: also change it in the !HAVE_ICU case.
16557 2003-12-04 Dick Porter <dick@ximian.com>
16560 * locales.c: construct_compareinfo is now in CompareInfo, not
16563 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
16565 * image.c (mono_image_load_file_for_image): Cache loaded images in the
16566 image->files array.
16568 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
16571 * assembly.c (mono_assembly_load_references): Only load references
16574 * class.c (mono_class_from_name): Avoid linear search of the
16575 EXPORTEDTYPE table.
16577 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
16579 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
16581 * image.h (MonoImage): Add 'field_cache' field.
16583 * loader.c (mono_field_from_token): Cache field lookups.
16585 * reflection.c (mono_module_get_object): Fix name property.
16587 * icall.c (ves_icall_get_enum_info): Update after changes to
16588 mono_metadata_get_constant_index ().
16590 * icall.c: Get rid of get_type_info icall, use a separate icall for
16591 each type property to avoid needless memory allocations. Fixes #51514.
16593 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
16594 to avoid needless binary searches.
16596 * class.c (class_compute_field_layout): Move the initialization of
16597 field->def_value to mono_class_vtable ().
16599 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
16602 * object.c (mono_object_allocate): Make it inline.
16604 * object.c (mono_object_allocate_spec): Make it inline.
16606 2003-12-02 Dick Porter <dick@ximian.com>
16608 * locales.c (create_NumberFormat): NumberFormatInfo construction.
16609 Patch by Mohammad DAMT (mdamt@cdl2000.com).
16611 2003-12-01 Dick Porter <dick@ximian.com>
16613 * threads.c: Fix signature and call in CreateMutex and
16616 2003-12-01 Dick Porter <dick@ximian.com>
16619 * locales.c: Implement string compares and searching
16621 * object.h: Add extra Thread field
16623 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
16625 * reflection.c (fixup_method): Add support for MonoCMethod.
16627 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
16629 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
16631 * reflection.c (assembly_name_to_aname): Allow extra characters in
16632 assembly names. Fixes #51468.
16634 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
16636 * exception.c (mono_exception_from_name_domain): New helper function.
16638 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
16639 exception object in the correct domain.
16641 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
16642 formatting + make a copy a the input data.
16644 * loader.c (mono_get_method_from_token): Methods which contain
16645 native code do not have entries in the ImplMap.
16647 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
16648 Thanks to Gonzalo for spotting this.
16650 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
16651 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
16653 * assembly.h (mono_assembly_load_from): Split the second part of
16654 assembly loading into a new public function.
16656 * exception.h (mono_get_exception_bad_image_format): New function.
16658 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
16660 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16661 Enumerate all modules inside a dynamic assembly. Fixes #51293.
16663 * icall.c: Add new icall for creating dynamic methods.
16665 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
16667 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
16669 * reflection.c (mono_reflection_create_dynamic_method): New icall to
16670 create a dynamic method.
16672 * reflection.c (resolve_object): New helper function.
16674 * reflection.c: Generalize ReflectionMethodBuilder and the functions
16675 which manipulate it so they can also work on dynamic methods.
16677 * reflection.c (reflection_method_builder_to_mono_method): Avoid
16678 creating the MonoReflectionMethodAux structure if it is not needed.
16680 * reflection.h verify.c: Update after changes to object layout.
16682 * reflection.c (method_builder_encode_signature): Fix compilation on
16685 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
16687 * appdomain.h: Added support for context static fields. Added static_data
16688 field to MonoAppContext and renamed thread_static_fields to a more
16689 generic special_static_fields in MonoAppDomain, since it can now contain
16690 context static fields.
16691 * domain.c: Updated hashtable name.
16692 * object.c: Replaced field_is_thread_static() for a more generic
16693 field_is_special_static() which also checks for context static attribute.
16694 In mono_class_vtable(), added support for static context fields.
16695 * threads.c: Changed methods that manage thread static fields to more
16696 generic methods so they can be reused both for thread and context static
16698 * threads.h: Declared some new methods.
16700 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
16702 * reflection.h: Update after changes to the managed types.
16704 * reflection.c (encode_custom_modifiers): New helper function.
16706 * reflection.c (method_encode_signature): Emit custom modifiers.
16708 * reflection.c (field_encode_signature): Emit custom modifiers.
16710 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
16712 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
16714 * icall.c (ves_icall_System_ValueType_Equals): New optimized
16717 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
16720 * object.c (mono_field_get_value_object): New function.
16722 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
16725 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
16727 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
16728 return a preallocated out-of-memory exception instance.
16730 * object.c (out_of_memory): Use the new function.
16732 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
16733 flag is before the custom modifiers. Fixes #49802.
16735 2003-11-16 Martin Baulig <martin@ximian.com>
16737 * class.c (mono_class_is_open_constructed_type): Implemented the
16738 MONO_TYPE_GENERICINST case.
16740 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
16742 * assembly.c (mono_assembly_fill_assembly_name): New function to
16743 fill out the MonoAssemblyName structure.
16744 (mono_assembly_open): Use the new function.
16746 * icall.c (fill_reflection_assembly_name): New helper function.
16748 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
16751 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
16753 2003-11-15 Martin Baulig <martin@ximian.com>
16755 * class.c (mono_class_is_open_constructed_type): New public
16756 function; checks whether a type is an open constructed type,
16757 ie. whether it still contains type parameters.
16758 (mono_class_inflate_generic_type): If we're a type parameter and
16759 the inflated type is also a MONO_TYPE_(M)VAR, return the original
16762 * class.h (MonoGenericInst): Added `guint32 is_open'.
16764 * loader.c (method_from_methodspec): Check whether we're an open
16765 or closed constructed type and set `ginst->is_open'.
16767 * reflection.c (mono_reflection_bind_generic_parameters): Check
16768 whether we're an open or closed constructed type and set
16770 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
16771 from open constructed types.
16773 2003-11-15 Martin Baulig <martin@ximian.com>
16775 * reflection.c (mono_reflection_bind_generic_parameters): If we're
16776 a generic instance (instead of a generic type declaration) with
16777 unbound generic parameters, bind them to our actual types.
16779 2003-11-14 Martin Baulig <martin@ximian.com>
16781 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
16783 * reflection.c (mono_reflection_bind_generic_parameters): If we're
16784 an interface type, populate `res->interfaces' with instantiated
16785 versions of all the interfaces we inherit.
16787 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
16789 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
16790 when MONO_PATH is set but doesn't contain the install dir.
16792 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16795 (ves_icall_Type_GetInterfaces): don't return an interface twice when
16796 it's also implemented in base classes. Fixes bug #50927.
16798 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
16800 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
16801 if this method is called from a finalizer. Fixes #50913.
16803 2003-11-12 Miguel de Icaza <miguel@ximian.com>
16805 * threads.c: Implement VolatileRead/VolatileWrite
16807 * icall.c: Add new icalls for VolatileRead/VolatileWrite
16809 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16811 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
16812 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
16815 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
16816 from Peter Ross (pro@missioncriticalit.com).
16818 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
16820 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
16822 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16824 * assembly.c (mono_assembly_load_references): Disable check because it
16825 triggers on older corlibs which lots of people have.
16827 2003-11-12 Jackson Harper <jackson@ximian.com>
16829 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
16830 load corlib.dll if mscorlib.dll is not found.
16831 * assembly.h: Remove corlib name define.
16834 * image.c: Change corlib name to mscorlib.
16836 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16838 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
16840 2003-11-11 Miguel de Icaza <miguel@ximian.com>
16842 * appdomain.h: Added loader_optimization here to sync with the C#
16843 code, and add disallow_binding_redirects field.
16845 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
16847 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
16849 * reflection.c (mono_image_build_metadata): Fix crash on modules
16852 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
16854 * icall.c (ves_icall_get_method_info): Return callingConvention as
16857 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
16858 namespaces from the EXPORTEDTYPE table as well.
16860 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
16861 from all modules inside the assembly.
16863 2003-11-11 Martin Baulig <martin@ximian.com>
16865 * reflection.c (mono_reflection_bind_generic_parameters): Make
16866 this work for interfaces.
16868 2003-11-11 Martin Baulig <martin@ximian.com>
16870 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
16872 2003-11-11 Martin Baulig <martin@ximian.com>
16874 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
16875 "MonoInflatedMethod" and "MonoInflatedCtor".
16877 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
16879 * reflection.c (resolution_scope_from_image): Use the assembly table
16880 from the manifest module, since other modules don't have it.
16882 * debug-helpers.c (mono_type_full_name): New helper function.
16884 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
16886 * image.c (mono_image_load_file_for_image): New public function which
16887 is a replacement for the load_file_for_image in class.c.
16889 * assembly.c (mono_assembly_load_module): A wrapper for the function
16890 above which does assembly association and reference loading too.
16892 * class.c (mono_class_from_name): Call mono_assembly_load_module.
16894 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16896 * appdomain.c: not all of the attributes for the full assembly name
16897 are required and the order doesn't matter. Fixes bug #50787.
16899 2003-11-10 Dick Porter <dick@ximian.com>
16901 * locales.c: Use platform-endian UTF16
16903 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
16905 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
16907 2003-11-10 Martin Baulig <martin@ximian.com>
16910 (mono_metadata_load_generic_params): Make this actually work.
16912 * reflection.c (mono_reflection_bind_generic_parameters): If our
16913 parent is a generic instance, pass all the `types' to it, no
16914 matter whether it has the same number of type parameters or not.
16916 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
16918 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
16920 * assembly.c (mono_assembly_load_references): Move the image<->assembly
16921 assignment code to this function so it gets called recursively for all
16924 * image.c (load_modules): Remove the assembly assignment since it is
16925 now done by mono_assembly_load_references.
16927 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16928 Add 'module' argument.
16929 (mono_module_get_types): New helper function.
16930 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
16932 2003-11-08 Martin Baulig <martin@ximian.com>
16934 * class.c (mono_class_inflate_generic_method): Interface method
16935 don't have a header.
16937 * reflection.c (mono_image_get_methodspec_token): Take an
16938 additional `MonoGenericInst *' argument instead of reading it from
16939 the header; this is necessary to support interfaces.
16940 (mono_image_create_token): Pass the `MonoGenericInst *' from the
16941 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
16942 (inflated_method_get_object): Take an additional `MonoGenericInst *'
16945 * reflection.h (MonoReflectionInflatedMethod): Added
16946 `MonoGenericInst *ginst'.
16948 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
16950 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
16952 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
16954 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
16956 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
16959 (reflection_methodbuilder_from_method_builder):
16960 (reflection_methodbuilder_from_ctor_builder): New helper functions to
16961 initialize a ReflectionMethodBuilder structure.
16962 (mono_image_get_methodbuilder_token):
16963 (mono_image_get_ctorbuilder_token): New functions to emit memberref
16964 tokens which point to types in another module inside the same assembly.
16966 * reflection.c: Use the new helper functions.
16968 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
16970 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
16971 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
16973 * reflection.c (resolution_scope_from_image): Emit a moduleref if
16976 * reflection.c (mono_image_build_metadata): Emit metadata only for the
16977 current module. Emit the manifest only for the main module.
16979 * reflection.c (mono_image_create_token): Add assertion when a
16980 memberref needs to be created.
16982 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
16984 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
16985 larger buffer for the custom attribute blob. Fixes #50637.
16987 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16989 * threadpool.c: notify listener on async processing handles after
16990 invoking the async callback. Thanks to Zoltan.
16992 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
16994 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
16995 avoid code duplication.
16997 * reflection.h (MonoDynamicImage): New type which is currently unused,
16998 but will be used through the ref.emit code in place of
16999 MonoDynamicAssembly.
17001 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
17004 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
17005 a MonoDynamicImage instead of just a MonoImage.
17007 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
17008 icalls to ModuleBuilder but keep their semantics, so they will work
17009 with moduleb->assemblyb. This will change later.
17011 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
17013 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
17016 * reflection.c (mono_image_build_metadata): Avoid creation of a default
17017 main module, since it is now done by the managed code.
17019 2003-11-03 Martin Baulig <martin@ximian.com>
17021 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
17022 `ginst->klass' here.
17023 (method_encode_methodspec): Don't use the `ginst->generic_method's
17024 klass if it's a generic instance, use `ginst->klass' in this case.
17026 2003-11-03 Martin Baulig <martin@ximian.com>
17028 * reflection.c (mono_image_get_generic_method_param_info):
17029 Removed, use mono_image_get_generic_param_info() instead.
17030 (mono_image_get_type_info): Write the GenericParam table before
17031 the Method table. This is neccessary because in the GenericParam
17032 table, type parameters of the class (ie. '!0' etc.) must come
17033 before the ones from its generic methods (ie. '!!0' etc).
17035 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
17037 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
17039 2003-11-02 Martin Baulig <martin@ximian.com>
17041 * reflection.c (create_generic_typespec): Take a
17042 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
17043 the generic parameters from it.
17045 2003-11-02 Martin Baulig <martin@ximian.com>
17047 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
17048 instead of a `MonoClassField *' since we just need the type.
17049 (create_generic_typespec): New static function. Creates a
17050 TypeSpec token for a generic type declaration.
17051 (mono_image_get_generic_field_token): New static function.
17052 (mono_image_create_token): If we're a FieldBuilder in a generic
17053 type declaration, call mono_image_get_generic_field_token() to get
17056 2003-11-02 Martin Baulig <martin@ximian.com>
17059 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
17060 `MonoReflectionGenericInst *declaring_type' and
17061 `MonoReflectionGenericInst *reflected_type' fields.
17063 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
17064 `MonoReflectionGenericInst *declaring_type' and a
17065 `MonoReflectionGenericInst *reflected_type' argument instead of a
17066 single `MonoReflectionGenericInst *type' one. Set
17067 `res->declaring_type' and `res->reflected_type' from them.
17068 (mono_reflection_inflate_field): Likewise.
17070 2003-11-02 Martin Baulig <martin@ximian.com>
17072 * class.c (mono_class_setup_vtable): Don't store generic methods
17075 2003-11-02 Martin Baulig <martin@ximian.com>
17077 * reflection.h (MonoReflectionGenericInst): Added
17078 `MonoReflectionType *declaring_type'.
17080 * reflection.c (mono_reflection_bind_generic_parameters): Use
17081 `if (tb->parent)' instead of `klass->parent'.
17083 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
17085 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
17086 with an empty ASSEMBLY table.
17088 * reflection.c (mono_image_build_metadata): Avoid using the same loop
17089 variable in the inner and outer loops.
17091 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
17093 * metadata.h (mono_metadata_make_token): Put parentheses around macro
17096 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
17098 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
17099 icalls. Instead, do everything in managed code. This is needed since
17100 it is hard to restore the original domain etc. in unmanaged code in the
17101 presence of undeniable exceptions.
17103 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
17104 New icalls to push and pop appdomain refs.
17106 2003-10-31 Martin Baulig <martin@ximian.com>
17108 * class.c (inflate_generic_type): Renamed to
17109 mono_class_inflate_generic_type() and made it public.
17111 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
17114 * loader.c (mono_field_from_memberref): Also set the retklass for
17117 * fielder.c (mono_image_get_inflated_field_token): New static
17118 method; creates a metadata token for an inflated field.
17119 (mono_image_create_token, fixup_method): Added support for
17120 "MonoInflatedField".
17121 (fieldbuilder_to_mono_class_field): New static function.
17122 (mono_reflection_inflate_field): New public function.
17125 (MonoReflectionGenericInst): Added `MonoArray *fields'.
17126 (MonoReflectionInflatedField): New typedef.
17128 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
17130 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
17131 for Solaris and other platforms without s6_addr16
17133 2003-10-30 Martin Baulig <martin@ximian.com>
17135 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
17136 argument instead of two.
17137 (mono_class_inflate_generic_signature): Likewise.
17138 (inflate_generic_header): Likewise.
17139 (mono_class_inflate_generic_method): Likewise. In addition, if
17140 `ginst->klass' is set, it becomes the new `method->klass'.
17142 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
17145 * reflection.c (encode_generic_method_sig): Write a 0xa as the
17146 first byte. [FIXME]
17147 (method_encode_methodspec): If we have generic parameters, create
17148 a MethodSpec instead of a MethodRef.
17149 (fixup_method): Added support for "MonoInflatedMethod" and
17150 "MonoInflatedCtor".
17151 (mono_image_create_token): Added support for "MonoInflatedMethod"
17152 and "MonoInflatedCtor".
17153 (inflated_method_get_object): New static function; returns a
17154 managed "System.Reflection.MonoInflatedMethod" object.
17155 (mono_reflection_bind_generic_method_parameters): Return a
17156 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
17157 (mono_reflection_inflate_method_or_ctor): Likewise.
17158 (mono_image_get_generic_method_param_info): Initialize unused
17160 (mono_image_get_generic_param_info): Likewise.
17162 * reflection.h (MonoReflectionInflatedMethod): New public
17163 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
17164 "S.R.MonoInflatedCtor" classes.
17166 * loader.c (method_from_memberref): If we're a TypeSpec and it
17167 resolves to a generic instance, inflate the method.
17169 2003-10-28 Dick Porter <dick@ximian.com>
17171 * object.c (mono_runtime_run_main): Convert command-line arguments
17172 into utf8, falling back to the user's locale encoding to do so.
17174 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
17176 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
17179 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
17181 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
17182 up icalls at method definition time. Partially fixes #33569.
17184 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
17186 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
17187 marshalling of arrays. Fixes #50116.
17189 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
17191 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
17192 points to a vtable in the dying appdomain.
17194 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
17195 listeners into unmanaged code inside the lock.
17197 * object.c (mono_class_vtable): Turn off typed allocation in non-root
17198 domains and add some comments.
17200 2003-10-25 Martin Baulig <martin@ximian.com>
17202 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
17204 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
17206 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
17207 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
17208 currently parsing. Create the generic class and store it in
17209 `generic_inst->klass' before parsing the type arguments. This is
17210 required to support "recursive" definitions; see mcs/tests/gen-23.cs
17212 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
17213 to support recursive typespec entries.
17215 * class.c (mono_class_setup_parent): If our parent is a generic
17216 instance, we may get called before it has its name set.
17217 (mono_class_from_generic): Splitted into
17218 mono_class_create_from_generic() and mono_class_initialize_generic().
17220 2003-10-25 Martin Baulig <martin@ximian.com>
17222 * icall.c (ves_icall_Type_BindGenericParameters): Return a
17223 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
17224 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
17225 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
17227 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
17228 (create_typespec): Likewise.
17229 (mono_reflection_bind_generic_parameters): Return a
17230 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
17231 (mono_reflection_inflate_method_or_ctor): New public function.
17233 * reflection.h (MonoReflectionGenericInst): New typedef.
17235 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
17237 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
17238 inside the domain lock. Fixes #49993.
17240 * object.c (mono_class_vtable): When typed allocation is used,
17241 allocate vtables in the GC heap instead of in the mempool, since the
17242 vtables contain GC descriptors which are used by the collector even
17243 after the domain owning the mempool is unloaded.
17245 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
17247 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
17248 reflect what it does. Also invalidate mempools instead of freeing
17249 them if a define is set.
17251 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
17254 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
17255 hold the finalizable objects in this domain.
17257 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
17260 * appdomain.c (mono_domain_set): New function to set the current
17261 appdomain, but only if it is not being unloaded.
17263 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
17264 appdomain which is being unloaded.
17266 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
17267 unloading of the root appdomain.
17269 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
17270 icall to execute a method in another appdomain. Intended as a
17271 replacement for InternalSetDomain, which can confuse the code
17272 generation in the JIT.
17274 * appdomain.c (mono_domain_is_unloading): New function to determine
17275 whenever an appdomain is unloading.
17277 * appdomain.c (mono_domain_unload): New function to correctly unload
17280 * assembly.c (mono_assembly_load_references): Check that an assembly
17281 does not references itself.
17283 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
17284 domain manually, it asks the finalizer thread to do it, then waits for
17285 the result. Also added a timeout.
17287 * icall.c: Register the new icalls.
17289 * threads.h threads.c: Export the mono_gc_stop_world and
17290 mono_gc_start_world functions.
17292 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
17293 function to fill out the mempool with 0x2a.
17295 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
17297 * reflection.h (MonoReflectionMethodAux): New structure to store
17298 information which is rarely used, thus is not in the MonoMethod
17301 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
17302 store the aux info.
17304 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
17305 and marshalling info into the aux structure.
17307 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
17308 from the aux structure.
17310 * loader.c (mono_method_get_param_names): Retrieve the param names from
17313 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
17315 * exception.h exception.c: Add AppDomainUnloadedException && fix
17318 2003-10-21 Dick Porter <dick@ximian.com>
17321 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
17322 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
17324 2003-10-21 Martin Baulig <martin@ximian.com>
17326 * reflection.c (mono_reflection_bind_generic_parameters):
17327 `klass->parent' is NULL for interfaces.
17329 2003-10-21 Martin Baulig <martin@ximian.com>
17331 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17333 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
17335 * exception.c (mono_exception_from_name_msg): New helper function for
17336 creating exceptions and initializing their message field.
17338 * exception.c: Simplify functions using the new helper.
17340 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
17343 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
17344 mono_raise_exception, since otherwise gcc doesn't generate the function
17345 epilog for raise_exception, confusing the stack unwinding in the JIT.
17348 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
17349 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
17352 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17354 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
17357 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
17359 * icall.c: Removed GetUninitializedObject method because
17360 AllocateUninitializedClassInstance does the same.
17362 2003-10-18 Martin Baulig <martin@ximian.com>
17364 * class.c (inflate_generic_signature): Renamed to
17365 mono_class_inflate_generic_signature() and made it public.
17366 (my_mono_class_from_generic_parameter): New static function; if we
17367 don't already have the generic parameter's MonoClass, create a
17368 very simple one which is just used internally in the runtime and
17369 not passed back to managed code.
17371 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
17373 * metadata.h (MonoMethodSignature): Moved the
17374 `MonoGenericParam *gen_params' to the MonoMethodHeader.
17375 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
17377 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
17378 ves_icall_MonoMethod_GetGenericArguments(); this is now an
17379 interncall on the MonoMethod class, not on MethodInfo.
17380 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
17381 calling mono_reflection_bind_generic_method_parameters() directly.
17383 * loader.c (mono_method_get_signature): If this is a MethodSpec;
17384 return the already computed `method->signature'.
17385 (method_from_methodspec): New static function to load a method
17386 from a MethodSpec entry.
17387 (mono_get_method_from_token): Call the new method_from_methodspec()
17388 for MethodSpec tokens.
17389 (mono_get_method_from_token): If we're a generic method, load the
17392 * reflection.c (mono_image_get_memberref_token): Allow
17393 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
17395 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
17396 (mono_image_create_token): First check whether it's a generic
17397 method (so we'd need to create a MethodSpec), then do the other
17399 (mono_reflection_bind_generic_method_parameters): Return a
17400 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
17401 called directly from the interncall.
17403 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
17405 * reflection.c (load_public_key): Move loading of the public key
17408 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
17410 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
17413 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
17414 culture, hash_alg and public_key. Fixes #49555.
17416 2003-10-17 Martin Baulig <martin@ximian.com>
17418 * class.h (MonoGenericInst): Moved this declaration here and added
17419 `MonoMethod *generic_method'.
17422 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
17423 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
17425 * metadata.c (mono_metadata_type_equal): Two types of
17426 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
17427 index; ie. don't compare the address of the `MonoGenericParam'
17429 (mono_metadata_load_generic_params): Removed the `MonoMethod
17432 * metadata.h (MonoGenericInst): Moved declaration to class.h.
17433 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
17435 * reflection.c (method_encode_signature): Encode the number of
17436 generic parameters.
17437 (encode_generic_method_sig): New static function.
17438 (method_encode_methodspec): New static function; creates an entry
17439 in the MethodSpec table for a generic method.
17440 (mono_image_get_methodspec_token): New static function.
17441 (mono_image_create_token): Call mono_image_get_methodspec_token()
17442 for generic methods.
17443 (mono_reflection_bind_generic_method_parameters): New public
17444 function. Instantiates a generic method.
17446 2003-10-16 Martin Baulig <martin@ximian.com>
17448 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
17449 *gen_params' here from MonoMethodHeader.
17451 * metadata.c (mono_metadata_parse_method_signature): If we have
17452 generic parameters, initialize `method->gen_params' and then set
17453 the correct `type->data.generic_param' in all the parameters.
17455 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
17457 * threads.c (mono_threads_get_default_stacksize): New function to
17458 return the default stacksize.
17460 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
17461 termination of the finalizer thread, since the previous method had
17462 race conditions. Fixes #49628.
17464 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
17465 as for the other managed threads.
17467 2003-10-16 Martin Baulig <martin@ximian.com>
17469 * class.c (inflate_generic_signature): Copy `generic_param_count'
17472 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
17475 * metadata.c (mono_metadata_parse_method_signature): Actually set
17476 the `method->generic_param_count' here.
17477 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
17479 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
17481 * object.h: Add a new field to TypedRef to simplify the implementation
17482 of the REFANY opcodes in the JIT.
17484 * icall.c: Make use of the new field.
17486 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
17489 2003-10-15 Martin Baulig <martin@ximian.com>
17491 * class.c (mono_class_from_gen_param): Renamed to
17492 mono_class_from_generic_parameter() and moved most of the
17493 functionality from mono_reflection_define_generic_parameter()
17494 here; ie. we create a "real" class here.
17495 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
17496 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
17497 previously been called.
17499 * class.h (MonoGenericParam): Moved the declaration of this struct
17500 here from metadata.h and added `MonoMethod *method'.
17502 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
17505 * loader.c (mono_get_method_from_token): If we have any generic
17506 parameters, call mono_metadata_load_generic_params() to read them
17507 from the MONO_TABLE_GENERICPAR.
17509 * metadata.c (mono_metadata_load_generic_params): Added
17510 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
17512 * metadata.h (MonoMethodSignature): Replaced
17513 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
17514 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
17516 * reflection.c (mono_reflection_define_generic_parameter): Moved
17517 most of the functionality into the new
17518 mono_class_from_generic_parameter(); set the `method' field if
17519 we're a method parameter.
17521 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
17523 * marshal.c (emit_struct_conv): if native size is 0
17526 2003-10-14 Martin Baulig <martin@ximian.com>
17528 * icall.c: The generics API has changed in the spec since it was
17529 added to System.Type; these modifications make it match the spec
17531 (ves_icall_Type_GetGenericParameters): Renamed to
17532 `ves_icall_Type_GetGenericArguments'.
17533 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
17534 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
17535 `ves_icall_MonoType_get_HasGenericArguments'.
17536 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
17537 `ves_icall_MonoType_get_IsGenericParameter'.
17538 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
17539 this is no interncall anymore.
17540 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
17541 `ves_icall_TypeBuilder_get_IsGenericParameter'.
17543 2003-10-14 Martin Baulig <martin@ximian.com>
17545 * reflection.c (mono_reflection_bind_generic_parameters): Also
17546 inflate generic methods if we're reading the class from IL.
17548 2003-10-13 Martin Baulig <martin@ximian.com>
17550 * reflection.c (mono_reflection_define_generic_parameter): This
17551 method isn't called directly from the icall anymore; take a
17552 `MonoReflectionAssemblyBuilder *' so we can use this for type and
17553 method generic parameters.
17554 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
17555 (method_builder_encode_signature): Encode generic parameters.
17556 (mono_image_get_method_info): Write generic params to the
17557 MONO_TABLE_GENERICPARAM table.
17559 * reflection.h (MonoReflectionMethodBuilder): Added
17560 `MonoArray *generic_params'.
17562 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
17564 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
17565 wrapper for mono_reflection_define_generic_parameter().
17566 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
17568 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
17570 * marshal.h: Add missing function to fix build.
17572 * marshal.c (mono_marshal_get_native_wrapper): Add support for
17573 the SetLastError pinvoke attribute.
17575 * marshal.c (mono_marshal_set_last_error): New helper function called
17576 by the generated code.
17578 * marshal.c (mono_mb_emit_branch): New helper function.
17580 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
17582 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
17583 classes as parameters and return values of delegates. Fixes #29256.
17585 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
17587 * locales.c: use gint32 in non HAVE_ICU case
17589 2003-10-11 Martin Baulig <martin@ximian.com>
17591 * mono-debug.c (mono_debug_add_method): Added a workaround for
17594 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
17596 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
17597 delegates passed to native code must use the STDCALL calling
17598 convention. Fixes #35987.
17600 2003-10-10 Martin Baulig <martin@ximian.com>
17602 * class.c (inflate_generic_type): If we're inflating for a generic
17603 type instance (and not for a generic method), return
17604 MONO_TYPE_MVAR unchanged.
17606 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17608 * string-icalls.c: Join ignores null strings in the source array.
17609 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
17610 * threads.c: GetAvailableTheads is slightly more accurate.
17612 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
17614 * threads.h threads.c : add mono_threads_set_default_stacksize
17615 and pass default to CreateThread calls.
17617 2003-10-09 Dick Porter <dick@ximian.com>
17621 * locales.c: Internal calls for constructing CultureInfo and
17622 related objects from libicu (if its available.)
17624 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
17626 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
17628 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17630 * threadpool.c: added an argument to async_invoke_thread that is the
17631 item to process, pass the MonoAsyncResult to the thread start function
17632 when creating a new thread. This way we don't need to acquire any lock
17633 when we're creating a new thread. Readded a semaphore for faster
17634 response times (instead of that Sleep i added).
17636 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
17638 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17639 get daylight change dates better on Windows, fix handling
17640 of platforms without tm_gmtoff.
17642 2003-10-06 Martin Baulig <martin@ximian.com>
17644 * class.c (inflate_generic_method): Renamed to
17645 mono_class_inflate_generic_method() and made public.
17646 (mono_class_init): Don't inflate the generic methods here.
17647 (mono_class_from_generic): Added `gboolean inflate_methods'
17648 argument. Inflate the methods here.
17650 * loader.c (mono_method_get_param_names): Ignore instances of
17651 generic types for the moment.
17653 * reflection.c (fixup_method): Added support for inflated methods.
17654 (mono_image_create_token): Use mono_image_get_methodref_token()
17655 for inflated methods.
17656 (mono_custom_attrs_from_param): Ignore instances of generic types
17658 (mono_reflection_bind_generic_parameters): New public function.
17659 Moved all the functionality from
17660 ves_icall_Type_BindGenericParameters() here and added support for
17662 (mono_reflection_define_generic_parameter): Initialize
17663 `klass->methods' here.
17665 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
17666 functionality into mono_reflection_define_generic_parameter().
17667 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
17668 TypeBuilder, return that TypeBuilder.
17670 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17672 * appdomain.c: removed mono_delegate_semaphore.
17675 (mono_thread_pool_add): moved hash table creation inside and the thread
17676 creation outside of the critical region.
17677 (mono_thread_pool_finish): removed obsolete code.
17678 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
17679 continue or exit the thread depending on the queue.
17681 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
17683 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
17684 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
17685 handle more bool marshalling options
17687 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
17689 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
17690 arrays of structs. Also add a more descriptive error message when
17691 a structure member is marshalled as LPArray.
17693 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
17695 * marshal.c (mono_marshal_get_native_wrapper): Add support for
17696 marshalling arrays of complex types. Fixes #29098. Also remove an
17697 usused and incomplete function.
17699 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
17701 * gc.c: report heap_size - free_bytes as total memory allocated
17704 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
17706 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
17707 fix timezone handling problems on Windows.
17709 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
17710 asserts when the year is outside the range handled by ms the functions.
17712 * class.c (setup_interface_offsets): If the class is an interface,
17713 fill out its interface_offsets slot.
17715 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17717 * threadpool.c: mark threadpool threads as background.
17719 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
17721 * decimal.c - define DECINLINE to nothing if not using GCC
17723 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
17725 * assembly.c: More refcount fixes.
17727 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17729 * string-icalls.c: if we're not trimming, return the same string.
17730 When not splitting, don't create a new string.
17732 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17735 (mono_image_open): increment the ref_count inside the critical section.
17737 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
17739 * image.c (mono_image_open): Fix reference counting bug.
17741 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
17743 * marshal.c (mono_marshal_type_size) struct alignment changed for
17744 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
17745 64bits. Avoid leak in mono_marshal_get_native_wrapper when
17746 mono_lookup_pinvoke_call throws.
17748 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
17750 * reflection.c (mono_reflection_parse_type): Fix #49114.
17752 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
17753 temporary workaround for cygwin header problem.
17755 * object.c (mono_object_isinst): Synchronize this with the code
17756 generated by the JIT for casts.
17758 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
17760 * reflection.c (encode_type): Fix #38332.
17762 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
17764 * marshal.c (mono_marshal_method_from_wrapper): New function to return
17765 the original method from the wrapper method.
17767 2003-09-25 Martin Baulig <martin@ximian.com>
17769 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
17770 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
17771 (ves_icall_Type_get_IsGenericInstance): New interncall.
17773 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
17775 * object.c: fix cast warning in big endian code.
17777 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
17779 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
17781 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17783 * assembly.c: don't call check_env from mono_assembly_load. It's
17784 already done once in mono_assemblies_init and may cause headaches when
17785 multiple threads are loading assemblies.
17787 2003-09-19 Martin Baulig <martin@ximian.com>
17789 * reflection.c (mono_reflection_define_generic_parameter): Don't
17790 allocate `klass->methods', set `klass->flags' to
17791 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
17793 2003-09-18 Martin Baulig <martin@ximian.com>
17795 * class.c (mono_class_init): Don't create `class->methods' if it's
17796 already initialized.
17798 * metadata.c (mono_metadata_load_generic_params): Make this
17801 * reflection.c (mono_reflection_define_generic_parameter): Set
17802 parent class and interfaces from the constraints.
17804 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
17805 to keep this struct in sync with the declaration in TypeBuilder.cs.
17807 2003-09-17 Martin Baulig <martin@ximian.com>
17809 * metadata.h (MonoType): Replaced the data's `int type_param'
17810 field with `MonoGenericParam *generic_param'.
17811 (MonoGenericParam): Added `MonoClass *klass'.
17813 * class.c (mono_class_from_gen_param): Removed the
17814 `MonoImage *image' and `int type_num' arguments.
17816 * metadata.c (mono_metadata_parse_generic_param): New static
17817 method; creates a MonoGenericParam which just contains the index.
17818 (do_mono_metadata_parse_type): Call
17819 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
17822 * reflection.c (mono_image_typedef_or_ref): Generic type
17823 parameters may be in the same assembly, but never use a typedef
17825 (mono_reflection_define_generic_parameter): We're now creating a
17826 "real" class for the type parameter; it's now safe to call
17827 mono_class_from_mono_type() on the class'es type, it'll do the
17830 2003-09-16 Martin Baulig <martin@ximian.com>
17832 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
17833 `symfile->range_entry_size' and `symfile->class_entry_size' here;
17834 the `symfile' data structure must be fully initialized before it
17835 gets added to the table.
17837 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
17839 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
17841 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
17842 class init trampolines.
17844 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
17846 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
17847 to the built-in profiler to turn off time and allocation profiling
17850 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
17852 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
17855 * debug-helpers.c (mono_method_full_name): Print the wrapper type
17856 in human readable form.
17858 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
17860 * reflection.c icall.c: Fixed warnings.
17862 * image.c (load_class_names): Use a temporary hash table to hold the
17863 namespaces in order to avoid doing many string comparisons.
17865 * image.h: Fix typo.
17867 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
17868 Pass NULL instead of g_direct_equal to the GHashTable constructor
17869 since the NULL case is short-circuited inside g_hash_table_lookup,
17870 leading to better performance.
17872 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
17873 obtain the first custom attribute for a given index. Depends on the
17874 CustomAttribute table being sorted by the parent field.
17876 * reflection.c (mono_custom_attrs_from_index): Use the new function
17877 for better performance.
17879 2003-09-07 Martin Baulig <martin@ximian.com>
17881 * class.c (mono_class_init): If we're a generic instance, inflate
17882 all our methods instead of loading them from the image.
17883 (mono_class_from_generic): Set `class->methods = gklass->methods'.
17885 2003-09-07 Martin Baulig <martin@ximian.com>
17887 * mono-debug-debugger.c: Added support for constructors.
17889 2003-09-06 Martin Baulig <martin@ximian.com>
17891 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
17894 * reflection.c (mono_reflection_setup_generic_class): Call
17895 ensure_runtime_vtable() to create the vtable.
17897 2003-09-05 Martin Baulig <martin@ximian.com>
17899 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
17902 2003-09-04 Martin Baulig <martin@ximian.com>
17904 * reflection.c (mono_reflection_define_generic_parameter): Generic
17905 parameters start with zero.
17907 2003-09-04 Martin Baulig <martin@ximian.com>
17909 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17911 * reflection.h (MonoReflectionGenericParam): New typedef.
17912 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
17913 the generic parameters from the managed TypeBuilder.
17915 * reflection.c (mono_reflection_define_generic_parameter): New function.
17916 (mono_reflection_create_runtime_class): Encode generic parameters.
17917 (mono_reflection_setup_generic_class): New function; this is
17918 called after adding adding all generic params to the TypeBuilder.
17919 (encode_type): Added MONO_TYPE_VAR.
17921 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17923 * class.h class.c (mono_class_needs_cctor_run): Moved this method
17926 * assembly.h assembly.c: Moved the AOT loading code into an assembly
17929 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
17931 * reflection.h reflection.c class.h class.c: Delete duplicate
17932 definition of mono_type_get_name () from reflection.c and export the
17935 * class.c: Class loading fixes from Bernie Solomon
17936 (bernard@ugsolutions.com).
17938 * reflection.c: Endianness fixes from Bernie Solomon
17939 (bernard@ugsolutions.com).
17941 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
17943 * assembly.h assembly.c: Define a file format version for AOT
17946 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
17948 * appdomain.h (MonoJitInfo): New field to determine whenever the
17949 code is domain neutral.
17951 2003-08-31 Miguel de Icaza <miguel@ximian.com>
17953 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
17955 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
17957 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
17958 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
17959 Avoid caching the result since strings must be domain specific. Fixes
17962 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
17964 * marshal.c (mono_marshal_init): Make this callable multiple times
17965 since it is hard to find a correct place to call it.
17967 * object.c (mono_runtime_class_init): Execute static constructors in
17968 the correct appdomain.
17970 * image.c (build_guid_table): Handle the case when multiple images have
17973 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17975 * icall.c: added a couple of icalls for System.Web.
17977 2003-08-28 Martin Baulig <martin@ximian.com>
17979 * icall.c (ves_icall_Type_BindGenericParameters): Use
17980 `klass->generic_inst' instead of `&klass->byval_arg' in the
17981 mono_type_get_object() call. The returned type must be
17982 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
17984 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
17988 * object.c (mono_class_proxy_vtable): Make it thread safe.
17990 * pedump.c: Fix warning.
17992 * object.c appdomain.h: Get rid of metadata_section.
17993 It is no longer needed and it was causing deadlocks with domain->lock.
17995 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
17997 2003-08-26 Martin Baulig <martin@ximian.com>
17999 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
18001 2003-08-26 Martin Baulig <martin@ximian.com>
18003 * pedump.c (main): Call mono_metadata_init(),
18004 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
18005 and mono_loader_init().
18007 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
18009 * loader.h: Add missing include to fix build.
18011 * image.h: mono_image_load_references is no more.
18013 * assembly.c: Reworked assembly loading to make it really thread safe.
18014 After these changes, the assembly returned by mono_assembly_open is
18015 fully initialized, i.e. all its references assemblies are loaded.
18017 * assembly.c (mono_image_load_references): Renamed to
18018 mono_assembly_load_references, and made private, since clients no
18019 longer need to call it.
18021 * class.c: Removed calls to mono_assembly_load_references, since it was
18022 a source of deadlocks.
18024 * loader.h loader.c class.h class.c: Protect data structures using a
18025 new lock, the loader lock.
18027 * class.c (mono_class_setup_vtable): Create temporary hash tables and
18028 GPtrArrays only when needed.
18030 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
18031 into empty structures by mcs. Fixes pinvoke7.cs.
18033 * domain.c (mono_init): Call a new initialization function.
18035 * appdomain.c (mono_runtime_init): Call the new initializer function
18036 of the marshal module.
18038 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
18039 inserted into empty structures by mcs. Fixes pinvoke7.cs.
18041 * marshal.h marshal.c: Added locks around the wrapper caches to make
18042 this module thread safe.
18044 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
18045 this argument. Fixes pinvoke1.exe.
18047 2003-08-25 Lluis Sanchez <lluis@ximian.com>
18049 * object.h: Added call_type field to MonoMethodMessage and the corresponding
18050 enumeration of values. Removed fields to store remote call output values in
18051 MonoAsyncResult. Not needed any more.
18052 * object.c: Initialize call_type and async_result fields in mono_message_init.
18053 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
18054 dispatching the message.
18055 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
18056 async call to finish. To do it use a message with EndInvoke call type.
18058 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
18060 * loader.h loader.c (mono_method_hash_marhal_info): New function which
18061 determines whenever a method has marshalling info.
18063 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18065 * assembly.c: fix the build on windows.
18067 2003-08-22 Lluis Sanchez <lluis@ximian.com>
18069 * object.cs: Fixed bug #47785.
18071 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
18073 * string-icalls.c (StringReplace): If their are no occurances of
18074 the old string found return a reference to the supplied
18075 string. This saves some memory and matches MS behavoir.
18077 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18079 * socket-io.c: fixed compilation for systems that define AF_INET6
18080 and don't define SOL_IP/SOL_IPV6.
18082 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
18084 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
18085 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
18087 * rawbuffer.c rawbuffer.h: Make this module thread safe.
18089 * domain.c: Make this module thread safe.
18091 * domain.c (mono_init): Call new initialization function.
18093 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
18094 reference types too. Fixes #38812.
18096 * image.c (mono_image_init): Fixed warnings.
18098 * class.c (mono_class_from_typeref): Handle assembly load failure
18101 * appdomain.c (add_assemblies_to_domain): Handle the case when
18102 the references of an assembly are not yet loaded.
18104 * metadata.c image.c assembly.c: Moved initialization of global
18105 variables to a separate function called at startup since lazy
18106 initialization of these variables is not thread safe.
18108 * image.c assembly.c: Made this module thread safe by adding locks in
18109 the appropriate places.
18111 * domain.c (mono_init): Call the new initialization functions of the
18114 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
18116 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
18117 make a direct call. It is proxy's work to make the call asynchronous.
18118 mono_delegate_end_invoke(): If the targe is a proxy, just collect
18120 * object.cs: mono_method_call_message_new(): read AsyncResult and
18121 state object from parameters list, if this info is requested.
18122 * object.h: Added fields to store remote call output values in
18123 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
18125 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18127 * object.h: add needed fields to MonoThread.
18128 * threads.c, threads.h: allow registering a function to cleanup data
18129 allocated per thread by the JIT.
18131 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18133 * loader.h: portability fix by Bernie Solomon
18134 * <bernard@ugsolutions.com>.
18136 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
18138 * reflection.h reflection.c (mono_param_get_objects): Changed this to
18139 return a MonoArray. This simplifies the code and also ensures that
18140 the cache allways contains an object reference as a value.
18142 * icall.c (ves_icall_get_parameter_info): Simplified using the new
18145 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18147 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
18148 fixes a problem with byte ordering when getting the address family for
18151 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
18153 * .cvsignore: Added monosn.
18155 * reflection.h reflection.c loader.c: Added support for parameter
18156 marshalling to dynamically created types. Fixes #47295.
18158 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18160 * rand.c: remove useless warnings.
18162 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18164 * class.c: implemented ldtoken for methods and fieldrefs.
18166 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18168 * threadpool.c: when mono_async_invoke was called, no one took care of
18169 monitoring the queue. So if the method invoked took some time and we
18170 got new async invoke requests after 500 ms (the thread created waited
18171 that long in WaitForSingleObject), the new async invoke was not called
18172 until the previous one finished.
18174 This is fixed now. Thanks to Totte for helping with it.
18176 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18178 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
18180 2003-08-11 Martin Baulig <martin@ximian.com>
18182 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
18184 2003-08-06 Martin Baulig <martin@ximian.com>
18186 * mono-debug-debugger.c: Added support for static fields,
18187 properties and methods.
18189 2003-08-06 Martin Baulig <martin@ximian.com>
18191 * mono-debug-debugger.c: Don't store the MonoString's vtable to
18192 make this work for applications with multiple application domains.
18194 2003-08-04 Martin Baulig <martin@ximian.com>
18196 * mono-debug-debugger.c: Completely reworked the type support; the
18197 most important thing is that we're now just using one single
18198 `MonoType' instance per type.
18200 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
18202 * mono-endian.h, mono-endian.c, icall.c: Added icall
18203 ves_icall_System_Double_AssertEndianity to assert double word endianity
18204 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
18206 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18208 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
18209 support, icalls and fixes.
18211 2003-07-31 Miguel de Icaza <miguel@ximian.com>
18213 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
18214 classes that are a punctuation character in .NET is not the same a
18217 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18219 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
18221 2003-07-29 Miguel de Icaza <miguel@ximian.com>
18223 * icall.c: Add new MemCopy internalcall.
18224 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
18225 Simplified code; It is not necessary to handle all the cases here,
18226 as the C# code takes care of it. Only handle the case of the name
18227 resource embedded into the assembly.
18229 Changed signature to return the data pointer and the size of the
18232 2003-07-26 Miguel de Icaza <miguel@ximian.com>
18234 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
18235 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
18237 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
18239 * socket-io.c: ignore EINTR error in select.
18241 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18243 * class.h, class.c: removed unused subclasses field in MonoClass.
18245 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
18247 * icall.c: improve fix of get_base_definition(). If the parent class
18248 doesn't have the mehod, look at the parent of the parent.
18249 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
18250 to check if a parameter is an in or out parameter
18251 (PARAM_ATTRIBUTE_IN is not set by default).
18252 mono_method_return_message_restore(): Use mono_class_value_size to
18253 get the size of a value type. mono_type_stack_size (parameterType)
18254 does not return the correct value if parameterType is byRef.
18255 mono_load_remote_field(), mono_load_remote_field_new(),
18256 mono_store_remote_field(), mono_store_remote_field_new():
18257 raise exception if the remote call returns an exception.
18259 2003-07-28 Martin Baulig <martin@ximian.com>
18261 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
18262 method. This is a wrapper around mono_runtime_invoke() which
18263 boxes the instance object if neccessary.
18265 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18267 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
18268 metadata.h, row-indexes.h, verify.c: first cut of generics support.
18270 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18272 * icall.c: disable mcs bug workaround.
18274 2003-07-21 Miguel de Icaza <miguel@ximian.com>
18276 * object.c (mono_runtime_class_init): Take the metadata_section
18277 mutex before obtaining the domain mutex.
18279 * appdomain.h: Added definition of metadata_section mutex here.
18281 * object.c: define metadata_mutex here.
18283 2003-07-24 Ravi Pratap <ravi@ximian.com>
18285 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
18288 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
18290 * reflection.c: Fix bug #46669
18292 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18297 * object.h: fill in the type name for TypeLoadException.
18299 2003-07-23 Ravi Pratap <ravi@ximian.com>
18301 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
18302 relationship between TypeBuilders while compiling corlib) and bug
18303 45993 (Array types returned from the runtime while compiling
18304 corlib were from the loaded corlib).
18306 2003-07-22 Martin Baulig <martin@ximian.com>
18308 * mono-debug-debugger.c: Reworked the type support a bit more;
18309 distinguish between types and classes.
18311 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
18313 * icall.c: add IsArrayImpl icall.
18315 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
18317 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
18318 initializing real_size only once. Also fix bug #46602.
18320 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
18322 * object.c: Renamed mono_metadata_section to metadata_section.
18324 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
18326 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
18327 empty array if the type is an array. Fixed.
18328 ves_icall_MonoMethod_get_base_definition: if the base method
18329 is abstract, get the MethodInfo from the list of methods of
18331 * reflection.c: ParameterInfo.PositionImpl should be zero-based
18332 and it was 1-based. Fixed in mono_param_get_objects.
18334 2003-07-20 Martin Baulig <martin@ximian.com>
18336 * mono-debug.h: Set version number to 31.
18337 (mono_debug_init): Added `MonoDomain *' argument.
18339 * mono-debug-debugger.c: Reworked the type support; explicitly
18340 tell the debugger about builtin types; pass the `klass' address to
18343 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
18345 * image.c: Allow new metadata tables to be loaded without a
18346 warning. Also update the warning message to give the new constant value.
18348 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18350 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
18351 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
18352 array type representation changes.
18354 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18356 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
18357 on Environment.Exit () call.
18359 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18361 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
18362 requires a matching corlib.
18364 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
18366 * Changelog: My editor decided to add a CR to each line. Sorry about that.
18367 Committed again without the CRs.
18369 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
18371 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
18372 getting it from the "this" socket instance. Did not work
18373 if the socket is a subclass of Socket.
18374 Also fixed bug #35371.
18376 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18378 * metadata.c: fixed size for TypedByRef.
18379 * loader.c: when searching for a method, consider the vararg amrker.
18380 * unicode.c, decimal.c: constify some arrays.
18382 2003-07-15 Dick Porter <dick@ximian.com>
18384 * socket-io.c: Fixed compilation for gcc < 3.2.
18386 Fixed compilation for machines that don't have AF_INET6 (thanks to
18387 Bernie Solomon <bernard@ugsolutions.com> for that part.)
18389 Fixed compile warnings.
18391 Fixed formatting and line endings.
18393 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
18396 * socket-io.c: Added IPv6 support.
18398 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
18400 * class.c (mono_class_is_assignable_from): New function to implement
18401 the is_assignable_from logic. Used by mono_object_isinst,
18402 Type::IsAssignableFrom () and the interpreter.
18404 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
18405 Object, even interfaces.
18407 * object.c (mono_object_isinst): Implement in terms of
18408 is_assignable_from.
18410 * icall.c (ves_icall_type_is_assignable_from): New icall.
18412 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
18414 * domain.c (foreach_domain): fix compiler warning.
18416 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
18418 * image.c (load_metadata_ptrs): use g_strndup because strndup is
18419 not available on all plattforms
18421 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
18423 * image.h image.c: Store the metadata version string in MonoImage.
18424 * icall.c: New icall to retrieve the image version.
18425 * reflection.c (create_dynamic_image): Fill in the image version field
18426 * reflection.c (build_compressed_metadata): Use the image version
18427 from the image structure.
18429 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18431 * appdomain.c: modified comment.
18432 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
18433 That will be its last iteration when mono_gc_cleanup is called from
18434 mono_runtime_cleanup and before the domain is unloaded.
18438 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
18440 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
18443 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18445 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
18446 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
18447 Bernie Solomon <bernard@ugsolutions.com>.
18449 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18451 * object.c, object.h: provide mono_object_new_fast() for faster
18452 allocation in some special cases.
18454 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18456 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
18457 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
18459 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18461 * threadpool.c: fix leaks.
18463 2003-07-01 Dick Porter <dick@ximian.com>
18465 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
18466 using MonoGHashTables. Fixes threadpool bug posted to list.
18468 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
18470 * image.h, image.c: added support to load an assembly from a byte array.
18471 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
18472 assembly bundle support.
18474 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
18476 * threadpool.c (mono_thread_pool_add): keep a reference to the
18477 AsyncResult to prevent GC
18479 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18481 * class.c: leak fix.
18483 2003-06-25 Dick Porter <dick@ximian.com>
18485 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
18486 for the async object, the WaitHandle object will close the handle.
18489 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18491 * class.c: in mono_array_class_get (), lookup from the hash with the
18492 same type we insert: this works around a bug in
18493 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
18494 lluis. The real fix will have to wait for after the release.
18496 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18498 * icall.c: fix memory leak when getting type members.
18500 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18502 * reflection.c: added more pubtoken special cases.
18504 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18506 * class.c: handle field offset correctly when class size
18507 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
18509 2003-06-20 Martin Baulig <martin@ximian.com>
18511 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
18514 2003-06-20 Martin Baulig <martin@ximian.com>
18516 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
18518 2003-06-20 Martin Baulig <martin@ximian.com>
18520 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
18521 just distinguish between variables in registers and variables at
18522 an offset relative to a register.
18524 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18526 * icall.c: #ifdef out latest changes until mcs is fixed.
18528 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18530 * icall.c: return members in metadata order.
18532 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18534 * icall.c: avoid infinite loop in GetTimeZoneData.
18536 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18538 * icall.c: added Marshal.Prelink/All icalls.
18540 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18542 * object.c, object.h: fix warnings and do some overflow checking
18543 when creating arrays.
18545 2003-06-17 Dick Porter <dick@ximian.com>
18548 * file-io.c: File attributes need to be tweaked slightly when
18549 passed from the managed to the w32 world.
18551 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18552 * profiler.h profiler-private.h profiler.c: Rework last patch
18553 based on suggestion by Paolo.
18555 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18557 * profiler.h profiler-private.h profiler.c: Added infrastructure for
18558 instruction level coverage data collection.
18559 * profiler.h profiler.c (: Added new callback function which can be
18560 used by the profiler to limit which functions should have coverage
18562 * profiler.c (mono_profiler_load): Call g_module_build_path to
18563 generate the file name of the profiler library.
18565 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18567 * profiler.c, profiler.h, profiler-private.h: added basic block
18568 coverage profiling API.
18570 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
18572 * reflection.c (mono_reflection_create_runtime_class): Add support
18573 for events in dynamically generated code.
18575 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
18578 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18580 * icall.c: when getting timezone info, return reasonable values if we
18581 can't get the actual data.
18583 2003-06-14 Dick Porter <dick@ximian.com>
18585 * threads.c (start_wrapper): Remove the reference to the thread
18586 object in the TLS data, so the thread object can be finalized.
18587 This won't be reached if the thread threw an uncaught exception,
18588 so those thread handles will stay referenced :-( (This is due to
18589 missing support for scanning thread-specific data in the Boehm GC
18590 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
18592 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
18594 * reflection.c: ensure streams and tables are first allocated with
18595 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
18597 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18599 * icall.c: fixed GetElementType for byrefs (bug# 44792).
18601 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
18603 * reflection.c (mono_reflection_create_runtime_class): Add support for
18604 properties to dynamically created classes.
18605 * reflection.c: Fix a few places where non-MonoObjects were inserted
18606 into the tokens hashtable.
18608 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18610 * object.c: some support to handle out of memory exceptions.
18612 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
18614 * marshal.c (mono_marshal_get_native_wrapper): support reference
18617 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18619 * object.h, object.c: more portability stuff from Bernie Solomon.
18620 Unexport mono_object_allocate(). Added mono_object_unbox ().
18621 Set exitcode when an unhandled exception is thrown.
18623 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
18625 * marshal.c (mono_marshal_get_native_wrapper): use custom
18626 marshaler for return types.
18628 2003-06-10 Dick Porter <dick@ximian.com>
18630 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
18631 ip_mreq is available
18633 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18635 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
18636 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
18637 by Bernie Solomon <bernard@ugsolutions.com>.
18639 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
18641 * gc.c (mono_gc_init): Avoid error message on shutdown when
18642 GC_DONT_GC=1 is used.
18644 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
18645 New icall to return the GUID of a module.
18647 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18649 * class.c: ensure instance size always includes the parent's size
18650 even whem class size is set explicitly (fixes bug#44294).
18652 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18654 * profiler.h, profiler.c: made the simple profiler thread-safe,
18655 get more accurate timing info. Allow the loading of an
18656 externally-developed profiler module.
18658 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
18660 * marshal.c (mono_marshal_get_native_wrapper): improved
18661 class/byref arguments.
18662 (mono_marshal_get_native_wrapper): better string marshaling support.
18664 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18666 * class.c: ensure .pack and .size are handled correctly and
18667 simplified layout of static fields.
18669 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18672 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
18674 * loader.c (mono_lookup_pinvoke_call): look for modules in the
18675 current directory (fix bug 44008)
18677 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
18679 * marshal.c (mono_marshal_get_native_wrapper): started support for
18681 (mono_delegate_to_ftnptr): consider marshalling specifications
18683 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18685 * reflection.c, reflection.h: emit custom marshal info.
18687 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18689 * object.c: free the GError.
18690 * icall.c: added CloseEvent_internal.
18692 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
18695 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
18697 * loader.c (mono_method_get_signature): Add support for dynamic
18700 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18702 * reflection.c: fixed bug #43905.
18704 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18706 * class.c, domain.c, icall.c, metadata.h, object.h: support for
18707 handling TypedReference and ArgIterator.
18708 * loader.c, loader.h: added function to get signature at call site.
18710 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18712 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
18713 data readonly. Buglets and warning fixes. Some MethodSpec support.
18715 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18717 * class.h, class.c, object.c: remove relative numbering support.
18719 2003-05-26 Miguel de Icaza <miguel@ximian.com>
18721 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
18722 free the string, until we get a chance to fix Gtk#
18724 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18726 * marshal.c: revert last patch.
18728 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18730 * icall.c: updates for new mono_class_vtable() not calling
18731 the type constructor anymore.
18733 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18735 * object.h, object.c: separate vtable creation from type
18736 initialization. Make running the .cctor thread safe.
18738 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
18740 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
18742 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
18744 * loader.c (mono_get_method): consider calling convention
18746 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
18748 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
18749 to return the invisible global type for a module.
18751 * reflection.c (mono_image_build_metadata): Emit global fields too.
18753 2003-05-20 Peter Williams <peterw@ximian.com>
18755 * loader.c (mono_lookup_internal_call): Add a few newlines.
18757 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
18759 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
18762 * appdomain.c (set_domain_search_path): Recalculate search path when
18763 AppDomainSetup.PrivateBinPath changes.
18765 * object.c (mono_class_compute_gc_descriptor): It turns out some
18766 parts of the class libs (like System.Thread) holds pointers to
18767 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
18768 to treat native int a pointer type here.
18770 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
18772 * appdomain.h, domain.c: add hashtable for jump target resolution.
18774 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
18776 * reflection.h reflection.c icall.c: Added new icalls
18777 GetManifestResourceInfoInternal, GetModulesInternal and support
18780 2003-05-16 Dick Porter <dick@ximian.com>
18784 * file-io.c: Implement System.IO.MonoIO::GetTempPath
18786 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
18788 * object.c: mono_store_remote_field: little fix to previous patch.
18790 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18792 * class.c: add constructors to array classes.
18793 * icall.c: special case array construction for InternalInvoke (),
18795 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
18797 * class.h class.c reflection.c object.c: Added support for field
18798 defaults in dynamically generated classes.
18800 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18802 * reflection.c: properly encode charset for ddlimport.
18804 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18806 * threads.c: allow compiling without GC.
18808 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18810 * appdomain.h, object.c, object.h, threads.c, threads.h: added
18811 handling of thread static data.
18813 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18815 * reflection.h, reflection.c: added mono_custom_attrs_free ().
18817 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
18819 * class.c (mono_array_class_get): always set the serializable flags
18820 (mono_array_class_get): always set the SEALED attribute for array types
18822 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
18824 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
18825 attributes (fix for bug 42021).
18827 2003-05-12 Dick Porter <dick@ximian.com>
18829 * gc.c: Don't run finalizers when the finalizer thread is
18830 finishing up, because the default domain has already been
18833 2003-05-11 Miguel de Icaza <miguel@ximian.com>
18835 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
18836 value is null, we should throw an exception. This is slightly
18837 different than the other conventions used for the constructor.
18839 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18841 * socket-io.c: fixed windows build.
18843 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18845 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
18847 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
18849 * object.c (mono_string_new_wrapper): Compatibility fix for MS
18852 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
18854 * class.c (mono_class_layout_fields): Add experimental GC aware
18855 auto layout facility. Requires class library changes to work correctly.
18857 (mono_class_setup_vtable): Avoid overriding explicit interface
18858 method implementations. Fixes iface3.exe test.
18860 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
18862 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
18863 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
18865 * metadata.h: Add new type classification macro which determines
18866 whenever the type holds an object reference.
18868 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
18870 * marshal.c (mono_marshal_get_native_wrapper): cleanups
18872 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
18874 * gc.c (finalizer_thread): Work around a GC bug.
18876 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
18878 * marshal.c (emit_struct_conv): allow unions
18880 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
18882 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
18884 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
18886 2003-05-06 Martin Baulig <martin@ximian.com>
18888 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
18890 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18893 (Select_internal): allow NULLs, don't create arrays if not needed.
18894 Coupled with Socket.cs changes.
18897 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
18898 register a finalizer for it that will close the semaphore handle. This
18899 fixes the leak and make Lupus' test run with > 4080 loops.
18901 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
18903 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
18904 Jerome Laban (bug #42287)
18906 2003-05-02 Martin Baulig <martin@ximian.com>
18908 * debug-mono-symfile.h
18909 (MonoSymbolFile): Moved declaration into mono-debug.h.
18910 (MonoDebugMethodJitInfo): Likewise.
18911 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
18913 (_mono_debug_address_from_il_offset): Take a
18914 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
18917 (MonoDebugDomainData): New struct.
18918 (mono_debug_get_domain_data): New function.
18919 (mono_debug_add_method): Take an additional `MonoDomain *'
18921 (mono_debug_source_location_from_address): Likewise.
18922 (mono_debug_il_offset_from_address): Likewise.
18923 (mono_debug_address_from_il_offset): Likewise.
18925 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
18927 * reflection.c: one more check for null type in custom attrs.
18929 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18931 * reflection.c: avoid warning (comparison is always false due to limited
18932 range of data type).
18934 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18936 * icall.c: throw an exception in Type.GetField if the argument 'name'
18939 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
18941 * reflection.c: fixed handling of enums in named arguments to custom
18942 attributes (bug #42123).
18944 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18946 * reflection.c: use the right array element type and handle
18947 a null for a Type argument, too.
18949 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
18951 * reflection.c: handle arrays as arguments to custom attributes.
18953 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18955 * reflection.c: handle a string value in a custom attr
18956 ctor that takes an object.
18958 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
18960 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
18963 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
18965 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
18967 2003-04-27 Martin Baulig <martin@ximian.com>
18969 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
18970 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
18971 MONO_DEBUGGER_EVENT_BREAKPOINT.
18972 (mono_breakpoint_trampoline_code): Removed.
18973 (mono_debugger_event_handler): The last argument is now a
18975 (mono_debugger_insert_breakpoint_full): Removed the
18976 `use_trampoline' argument.
18977 (mono_debugger_method_has_breakpoint): Likewise.
18978 (mono_debugger_trampoline_breakpoint_callback): Renamed to
18979 mono_debugger_breakpoint_callback(); take the method and
18980 breakpoint number as arguments.
18982 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18984 * metadata.c: fix off by one when loading parameters attributes.
18986 2003-04-24 Martin Baulig <martin@ximian.com>
18988 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
18990 2003-04-24 Martin Baulig <martin@ximian.com>
18992 * mono-debug-debugger.c: Moved all code which interacts with the
18993 Mono Debugger here.
18995 * debug-mono-symfile.c: This code now just deals with the symbol
18996 file itself, the debugger code is now in mono-debug-debugger.c.
18998 2003-04-23 Martin Baulig <martin@ximian.com>
19000 * mono-debug.c (mono_debug_source_location_from_il_offset):
19001 New method; like mono_debug_source_location_from_address(), but
19002 takes an IL offset instead of a machine address.
19004 2003-04-23 Martin Baulig <martin@ximian.com>
19006 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
19007 `line' field; this is now computed by the debugger.
19009 2003-04-23 Martin Baulig <martin@ximian.com>
19011 * mono-debug.[ch]: New files. This is the new debugging interface.
19013 * mono-debug-debugger.[ch]: New files. Moved all code which
19014 interacts with the Mono Debugger here.
19016 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
19018 * domain.c (mono_init): initialize mono_defaults.monitor_class
19020 2003-04-21 Miguel de Icaza <miguel@ximian.com>
19022 * reflection.c (method_encode_code): Add a spicy exception to help
19023 future compiler authors.
19025 2003-04-21 Martin Baulig <martin@ximian.com>
19028 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19029 Make this work with relative pathnames; g_filename_to_uri() needs
19030 an absolute filename.
19032 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
19034 * icall.c: Track name changes in Object and ValueType.
19036 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
19038 * metadata.c (mono_type_stack_size): size should be a multiple of
19041 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19044 (internal_domain_finalize): moved into mono_domain_finalize. No need
19045 to create another thread because the finalizers will be run in the
19048 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
19049 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
19050 to be run (MS does this too).
19052 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
19054 * object.c (mono_class_compute_gc_descriptor): Update comment.
19056 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
19058 * image.h: Add synchronized wrapper cache.
19060 * image.c (do_mono_image_open): Initialize cache.
19062 * reflection.c (create_dynamic_mono_image): Initialize cache.
19064 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19066 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
19067 ves_icall_System_Buffer_ByteLengthInternal.
19069 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
19071 * reflection.c: setup klass->nested_in earlier. Allow
19072 a dash in the assembly name.
19074 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
19076 * metadata.c (mono_type_to_unmanaged): dont access
19077 type->data.klass for MONO_TYPE_OBJECT
19078 (mono_type_to_unmanaged): consider System.Delegate class
19080 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
19082 * class.c: just setup supertypes in the proper place instead of
19083 initializing the full element class for arrays.
19085 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
19087 * class.c: ensure the element class of arrays is initialized.
19088 Setup the supertype info for array classes, too.
19090 2003-04-14 Miguel de Icaza <miguel@ximian.com>
19092 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
19094 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19096 * Makefile.am: re-added -m option when running cygpath. This way,
19097 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
19099 * mono-config.c: same codepath for locating mono config file for WIN32
19101 * assembly.c: if mono_assembly_setrootdir is called, don't override
19104 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19106 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
19107 MONO_ASSEMBLIES variable.
19109 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
19111 * icall.c: added Assembly::GetNamespaces() icall.
19113 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19115 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
19117 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
19119 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
19120 * object.c: fixed bug in the construction of vtable for proxies
19122 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
19124 * object.c (mono_array_new): Mark mono_array_new as an icall.
19126 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19128 * class.c: fixed test for public method when overriding interfaces.
19131 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19133 * appdomain.h, domain.c: added mono_domain_foreach() to
19134 be able to access the currently loaded appdomains.
19135 * object.c: make string interning work across sppdomains.
19136 Mark some functions for use as icalls.
19138 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
19140 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
19142 * reflection.h reflection.c: Allocate long living data using
19143 GC_MALLOC_ATOMIC so the collector does not need to scan it.
19145 * reflection.c: Double the allocation size in streams instead of
19146 increasing it, to prevent unneccesary copying on large assemblies.
19148 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
19149 creation if the assembly does not have the Run flag set.
19151 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19153 * class.h: avoid the C++ keywords in header files (Jerome Laban
19154 spotted and fixed this).
19156 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19159 (mono_unhandled_exception): fill in the arguments for the
19160 UnhandledException event. Only trigger that event for the default
19161 domain (as MS does).
19163 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
19165 * object.c: Improve typed allocation stuff based on suggestions from
19166 Paolo. Also turn it on if the GC library supports it.
19168 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
19170 * object.c object.h class.h: Added experimental typed allocation
19171 facility using the interfaces in gc_gcj.h.
19173 * os/gc_wrapper.h: Added new include files.
19175 2003-04-03 Martin Baulig <martin@ximian.com>
19177 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
19178 which is not yet enabled by default.
19180 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
19182 (mono_gc_lock, mono_gc_unlock): New static functions.
19184 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
19185 functions; stop/start the world for the garbage collector. This
19186 is using the windows API; we need to complete the SuspendThread()/
19187 ResumeThread() implementation in the io-layer to make this work on Unix.
19188 (mono_gc_push_all_stacks): New public function; tells the garbage
19189 collector about the stack pointers from all managed threads.
19191 2003-04-03 Martin Baulig <martin@ximian.com>
19193 * object.h (MonoThread): Added `gpointer stack_ptr'.
19195 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
19197 2003-04-03 Martin Baulig <martin@ximian.com>
19199 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
19201 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
19203 * reflection.c (typebuilder_setup_fields): Initialize field.first and
19206 2003-04-02 Miguel de Icaza <miguel@ximian.com>
19208 * loader.c (mono_lookup_internal_call): Report the corlib that is
19211 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
19213 * icall.c (ves_icall_type_GetTypeCode): fixed check for
19214 System.DBNull (it's class not valuetype).
19216 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19218 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
19219 if the array method was already assigned a token (fixes bug#40646).
19221 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
19223 * reflection.c (mono_reflection_get_type): Attempt type resolve even
19224 if no assembly is given.
19226 2003-04-01 Miguel de Icaza <miguel@ximian.com>
19228 * metadata.h: Added the new tables.
19230 * row-indexes.h: Added definitions for new tables.
19232 * metadata.c: Add schemas for new tables, and add support for
19233 computing the sizes of them.
19235 * class.c: Update for handling the new type cases.
19237 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
19239 * metadata.h (MONO_TYPE_IS_VOID): new macro
19241 2003-03-31 Martin Baulig <martin@ximian.com>
19243 * threads.h (MonoThreadCallbacks): Added `thread_created'.
19245 * threads.c (mono_thread_new_init): Call `thread_created' in the
19246 mono_thread_callbacks.
19248 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
19250 * loader.h: added marshalbyrefobject_class to mono_defaults
19251 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
19252 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
19253 generation of output parameters.
19254 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
19255 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
19256 contextbound and the target object belongs to the context of the caller.
19257 * object.h: added context and unwrapped_server variables in MonoRealProxy.
19258 * object.c: Implemented support for interfaces and abstract classes
19259 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
19260 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
19262 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
19264 * class.h class.c (mono_class_is_subclass_of): New function.
19266 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
19267 routines for most common case (calls from ArrayList::ToArray).
19269 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
19270 routine so programs which call Environment::Exit() can be profiled.
19272 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
19273 Added MONO_ARCH_SAVE_REGS.
19275 * icall.c (ves_icall_type_is_subtype_of): Use new function.
19277 2003-03-29 Miguel de Icaza <miguel@ximian.com>
19279 * blob.h: Add a couple of new MonoType types definitions.
19281 * tabledefs.h: Add a couple of new call convs.
19283 2003-03-27 Zoltan Varga <vargaz@freemail.h>
19285 * reflection.h (MonoReflectionDynamicAssembly): track changes in
19286 the layout of the class.
19288 * reflection.c (alloc_table): double the size on overflow to avoid
19289 unnecessary copying.
19291 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
19292 avoid filling out metadata tables and blobs. Also set mb->ilgen to
19293 null so it can be garbage collected.
19295 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
19297 * reflection.c (mono_reflection_get_type): Return the resolved type
19298 only if it is in the assembly we searched.
19300 * reflection.c (ensure_runtime_vtable): Initialize method slots.
19302 * class.c (mono_class_setup_vtable): Set the slot of the overriding
19305 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19308 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
19309 the right one is 'file:///blah', but MS allows it.
19311 (mono_assembly_open): allow 'file://blah'
19313 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
19315 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
19317 * socket-io.c: fixes bug #40310.
19319 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
19321 * reflection.c (mono_reflection_parse_type): handle deeply nested
19324 * reflection.c (mono_image_create_token): Use unique token values
19325 since they will be put into a hash table.
19327 * class.c (mono_class_setup_vtable): If a method occurs in more than
19328 one place in the vtable, and it gets overriden, then change the
19329 other occurances too.
19331 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
19332 object as return type.
19334 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
19336 * icall.c: Deleted "ToString" implementation for double and float
19337 because they are full implemented in managed code.
19339 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19341 * reflection.c, reflection.h: implemented and exported functions
19342 to retrieve info about custom attributes.
19344 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19346 * appdomain.c: moved Uri handling to assembly.c
19347 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
19348 work when using a file Uri in *nix and windows.
19350 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
19351 GetReferencedAssemblies.
19353 2003-03-18 Dick Porter <dick@ximian.com>
19355 * icall.c: Rename a couple of internal calls
19357 * threads.c: Set the thread state to Stopped when a thread exits.
19360 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
19362 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
19365 * object.c (mono_class_vtable): fix warning.
19367 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
19369 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
19371 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
19373 (method_encode_clauses): Create exception info structures in the right
19375 (mono_reflection_setup_internal_class): Initialize supertypes field.
19377 * class.c object.c: Handle interfaces which implement other interfaces
19380 * class.h class.c: Move the supertypes array initialization code into
19381 a separate function so it can be used for dynamic types too. Also call
19382 it earlier, in mono_class_init(), since it can be used before the
19383 type is initialized.
19385 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19389 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
19394 * object.c: remove warnings.
19396 2003-03-13 Martin Baulig <martin@ximian.com>
19398 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
19399 (MonoDebugLexicalBlockEntry): New types.
19401 * debug-mono-symfile.c
19402 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
19404 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19406 * process.c: ret can be any non-zero value accroding to MS doc.
19408 2003-03-07 Miguel de Icaza <miguel@ximian.com>
19410 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
19411 fixing a warning for a miss-used prototype, would have cause
19412 random memory corruption.
19414 2003-03-07 Martin Baulig <martin@ximian.com>
19416 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
19417 getting really annoying ....
19419 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
19421 * reflection.c (fixup_method): added support for array methods.
19423 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19425 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
19426 (pointed out by Michael Adams).
19428 2003-03-04 Dick Porter <dick@ximian.com>
19430 * icall.c: Temporarily reverted the Double and Single ToString()
19431 change, because it broke nunit.
19433 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
19435 * object.h, threads.h: make include files compatible with C++
19436 (patch by Jerome Laban <jlaban@wanadoo.fr>).
19438 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
19440 * icall.c: Erased ToString helper functions for Double and Single.
19441 Now, that implementations ar all in managed code (Double and Single
19444 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
19446 * appdomain.c: Added method for initializing the default context of
19447 a domain. Added internal call for getting the default context.
19448 * appdomain.h: Added context variable in MonoDomain struct.
19449 * domain.c: mono_domain_set also sets the default context of the domain
19450 * icall.c: Mapped internal method InternalGetDefaultContext.
19451 * object.c: mono_object_get_virtual_method returns always a remoting
19452 wrapper if the object is a transparent proxy.
19453 mono_runtime_invoke_array: when creating an object by calling the
19454 constructor, if the created object is a proxy, then the constructor should
19455 be called using the a remoting wrapper.
19457 2003-03-03 Dick Porter <dick@ximian.com>
19459 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
19460 variable so it compiles on solaris. Problem spotted by
19461 Christopher Taylor <ct@cs.clemson.edu>
19463 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19466 (get_info_from_assembly_name): don't leak value.
19469 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
19472 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
19474 * assembly.c: export mono_image_load_references ().
19475 * class.c: handle function pointers. mono_class_from_name() now
19476 supports nested type names directly.
19478 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
19480 * reflection.h reflection.c: Encode already created dynamic methods
19481 and fields correctly as a DEF instead of a REF.
19483 * reflection.c: Get rid of the force_ref argument to
19484 mono_image_typedef_or_ref since it was wrong in the first place.
19486 * string-icalls.c: add error checking to string constructors according
19489 * reflection.c: Emit types in the order their TypeBuilders were
19490 created. Previously, a new table index was assigned to each type before
19491 the tables were emitted. This was wrong because the signature blob
19492 might already refer to a type by its original table index.
19494 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
19496 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
19499 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19501 * Makefile.am: make assemblies dir have \ instead of / on windows.
19503 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
19505 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
19506 iterate over the NESTEDCLASS table using a linear search since the
19507 table is not guaranteed to be sorted by the secondary key.
19509 * class.c (mono_class_create_from_typedef): fixed up call to
19510 mono_metadata_nesting_typedef.
19512 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
19514 * marshal.c (mono_string_to_byvalstr): clear the memory as
19515 suggested by Jerome Laban <jlaban@wanadoo.fr>
19517 2003-02-26 Dick Porter <dick@ximian.com>
19519 * process.c: Cope with padding in .rsrc blocks
19521 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
19523 * metadata.h: reverted the filter_len change, it breaks reflection
19525 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
19527 * metadata.h: added a new field to store the filter_len
19530 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19532 * reflection.c: handle custom attributes for types and members
19533 created with Reflection.Emit (bug#38422).
19535 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
19537 * reflection.c: define RTSpecialName automatically for constructors for
19538 compatibility with MS.NET.
19540 * reflection.c (mono_reflection_create_runtime_class): initialize
19541 nested_in field of dynamically created classes.
19543 2003-02-22 Martin Baulig <martin@ximian.com>
19545 * debug-mono-symfile.h: Incremented version number.
19547 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
19549 * object.h icall.c process.c: fix warnings.
19551 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
19553 * appdomain.h appdomain.c:
19554 (mono_domain_try_type_resolve): split the
19555 name_or_tb argument into a name and a tb argument.
19556 (mono_domain_has_type_resolve): new function to check whenever the
19557 application has registered a TypeResolve event handler.
19559 * icall.c reflection.h reflection.c: move the type resolve logic into
19560 mono_reflection_get_type () so it will be invoked when
19561 Assembly::GetType () is called.
19564 (mono_reflection_get_type): renamed to get_type_internal.
19565 (mono_reflection_get_type): fixed type name generation so it works
19566 for nested types too.
19567 (mono_reflection_get_type): call has_type_resolve () to avoid the
19568 costly type name generation if there is no resolve event handler.
19570 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19572 * class.c, image.c: load exported types from file references.
19574 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
19576 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
19577 used to cache the managed methods used to create proxies and make
19578 remote invocation of methods.
19579 * class.h: Added in MonoVTable a flag to indicate that a class needs
19580 to be remotely created.
19581 * object.c: Modified the method mono_class_vtable(). It now initializes
19582 the remote flag of the vtable. Modified mono_object_new_specific(),
19583 so now it checks the remote flag.
19584 * icall.c: Added a couple of internal methods, one for enabling instance
19585 creation interception for a type, and one for creating objects bypassing
19588 2003-02-18 Martin Baulig <martin@ximian.com>
19590 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
19591 New interncall to get a method's metadata token.
19593 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
19594 New interncall for the debugger.
19596 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
19598 * class.c (mono_class_setup_vtable): allocate supertype array
19600 2003-02-18 Martin Baulig <martin@ximian.com>
19602 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
19604 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19607 (assembly_name_to_aname): jump over unknown properties (i've found
19608 something like: 'type, assembly, version=xxx, custom=null, public...',
19609 so now will ignore custom=null and still get the rest of the values).
19611 2003-02-17 Dick Porter <dick@ximian.com>
19613 * threads.c: Have Thread.Start() wait for a semaphore to signal
19614 that the thread has set up all its local data. This fixes bug
19615 34323, where Abort() raced the new thread's TLS data.
19617 Also removes the handle_store() call from start_wrapper, because
19618 threads are now always created suspended and there is no longer a
19619 race between the parent and child threads to store the info.
19621 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
19623 * image.c: explain the #- heap issue in a message, hopefully
19624 avoiding FAQs on mono-list.
19626 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19629 (GetEntryAssembly): if the domain has not invoked
19630 AppDomain.ExecuteAssembly yet, return the assembly of the default
19633 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
19635 * class.c (mono_ldtoken): make it work in dynamic assemblies.
19637 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
19639 * metadata.c, reflection.c: simple speedup to type hash
19642 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
19644 * image.c, image.h, class.c, assembly.c: move module loading
19645 to MonoImage. When loading metadata, consider alignemnet from
19646 the start of metadata, not from the metadata address in memory.
19648 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
19650 * reflection.c (mono_reflection_get_custom_attrs): Added support for
19651 AssemblyBuilder objects. Factored out custom attribute creation into
19652 a separate function.
19653 (create_custom_attr): new function to create custom attributes.
19655 2003-02-12 Miguel de Icaza <miguel@ximian.com>
19657 * Makefile.am: Got tired of typing the full pathname to pedump.
19658 Until there is another option, am installing this.
19660 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
19662 * class.c (class_compute_field_layout): always set field->parent
19663 (mono_ldtoken): use mono_defaults.fieldhandle_class;
19665 2003-02-11 Dick Porter <dick@ximian.com>
19668 * monitor.c: Rewrote Monitor, making lock much faster and
19669 Pulse/Wait work as specified. Also uses much fewer handles, and only
19670 creates them as needed.
19672 * exception.c: Added SynchronizationLockException
19674 * threads.c: Deleted old Monitor implementation. The new one is
19677 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19679 * class.c: handled TypedReference type code. Set the correct size for
19680 class data. Setup interface_offsets for interface classes, too.
19682 2003-02-09 Martin Baulig <martin@ximian.com>
19684 * debug-mono-symfile.h: Reflect latest symbol writer changes.
19686 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
19688 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
19689 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
19690 * object.c: fixed mono_object_get_virtual_method () for interfaces.
19691 * verify.c: check for code that runs after the end of the method.
19693 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
19695 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
19696 "System.Math::Round2".
19697 * sysmath.h: Added Floor, Round and Round2 definitions.
19698 * sysmath.c: Modified certain functions that were not 100% compliant
19699 with MS.NET (math precision) and added the implementation of Floor,
19702 2003-02-07 Martin Baulig <martin@ximian.com>
19704 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
19706 2003-02-07 Martin Baulig <martin@ximian.com>
19708 * debug-mono-symfile.c: Reflected latest symwriter changes.
19709 (mono_debug_create_mono_symbol_file): Removed.
19710 (mono_debug_open_mono_symbol_file): Take an argument which
19711 specifies whether to create a dynamic symbol file.
19713 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
19715 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
19717 2003-02-05 Martin Baulig <martin@ximian.com>
19719 * reflection.c (mono_image_build_metadata): Make this public,
19720 protect it against being called multiple times, don't create
19721 resources and don't build the compressed metadata here.
19722 (mono_image_create_pefile): Do this here.
19725 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
19727 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19729 * socket-io.c: fixed bug #36322.
19731 2003-02-06 Piers Haken <piersh@friskit.com>
19735 * debug-mono-symfile.c:
19741 * socket-io.c: warning cleanups
19743 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
19745 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
19746 function. works like remoting invoke, but does a check for the Proxy first.
19748 2003-02-05 Miguel de Icaza <miguel@ximian.com>
19750 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
19752 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
19754 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
19756 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
19757 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
19759 * object.c (mono_store_remote_field_new): used by the new jit
19760 instead of mono_store_remote_field
19761 (mono_load_remote_field_new): used by the new jit
19762 instead of mono_load_remote_field
19764 2003-02-05 Patrik Torstensson
19766 * appdomain.c: changed unload to take the domain id instead
19769 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
19772 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19774 * appdomain.c: don't look for assemblies in ApplicationBase if
19775 PrivateBinPathProbe is set.
19777 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19779 * object.c: make the first argument in main_args contain the absolute
19780 path to the assembly. Fixes bug #37511.
19782 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19784 * icall.c: get correct UTC offset for countries not using daylight
19785 time saving. Fixes bug #30030.
19787 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19789 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
19790 and 1 are the family).
19792 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
19794 * icall.c (ves_icall_InternalExecute): removed wrong assertion
19796 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
19798 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
19800 * reflection.c: added support for SignatureHelper tokens, which is
19801 needed by the Calli opcode.
19803 * reflection.h: track changes to SignatureHelper class.
19805 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
19807 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19809 * appdomain.c: fixed loading assemblies from PrivateBinPath.
19811 2003-02-03 Patrik Torstensson
19812 * appdomain.[c|h], domain.c :
19813 - Added support for getting a domain via domain id
19814 - Support for setting and getting domain from System.AppDomain
19815 (used in cross appdomain channel)
19816 - Added support for get/set for a MonoAppContext on a thread
19817 (Context class in System.Runtime.Remoting.Contexts),
19818 - Removed hack in Get/SetData and ExecuteAssembly.
19820 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
19821 the managed world to get control when a proxy is created.
19823 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
19825 2003-02-03 Miguel de Icaza <miguel@ximian.com>
19828 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19829 Populate the codebase field as well.
19831 2003-02-02 Martin Baulig <martin@ximian.com>
19833 * debug-mono-symfile.c
19834 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
19835 (mono_debug_symfile_add_method): Allow interncalls.
19837 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19839 * icall.c: throw parse exception if strtod fails or the string is empty.
19841 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
19843 * marshal.c: handle object type separately from defined
19846 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
19848 * marshal.c: handle NATIVE_LPSTR for strings when it's
19849 explicitly specified.
19851 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
19853 * reflection.c, reflection.h, icall.c: setup the reflection
19854 handle cache for ModuleBuilders and AssemblyBuilders.
19856 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
19858 * reflection.c (reflection_methodbuilder_to_mono_method): set
19861 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19863 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
19865 2003-01-29 Dick Porter <dick@ximian.com>
19867 * threads.c: No need for the fake_thread kludge now that Thread
19868 doesn't run a class constructor
19870 2003-01-29 Dick Porter <dick@ximian.com>
19872 * threads.c: Use g_direct_hash instead of the rather bogus
19875 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
19877 * marshal.c (mono_marshal_get_native_wrapper): add check for null
19878 (fix pinvoke12.exe)
19879 (mono_marshal_get_struct_to_ptr): generate valid IL code
19880 (mono_marshal_get_ptr_to_struct): generate valid IL code
19881 (*): correctly set sig->pinvoke, we need to memdup the signature
19884 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19886 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
19887 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
19889 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
19891 * profiler.c: provide more callers information.
19893 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
19895 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
19897 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
19899 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
19901 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19903 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
19904 exception instead of going into an infinite loop on dates which it
19907 * string-icalls.c (ves_icall_System_String_get_Chars): raise
19908 out-of-range exception if needed.
19910 * class.c (mono_class_setup_vtable): allow a virtual method to provide
19911 an implementation for an interface method and to override an inherited
19912 method at the same time.
19913 Imagine a scenario when a virtual method is used to override a
19914 virtual abstract method in a parent class, and this same method
19915 provides an implementation for an method inherited from an interface.
19916 In this case, the interface resolution code will set im->slot, which
19917 means that the virtual method override pass will skip this method
19918 which means a pointer to the abstract method inherited from the parent
19919 will remain in the vtable of this non-abstract class.
19921 * class.c: (mono_class_setup_vtable): continue search for a real
19922 method if only an abstract method is found.
19924 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
19926 * reflection.c: add size to encoding for ByValStr and ByValArray
19927 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
19929 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19931 * class.c (mono_class_setup_vtable): pass the override info as an
19934 * class.c (mono_class_setup_vtable): set the slot of overriding methods
19937 * reflection.c (ensure_runtime_vtable); add support for method
19940 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19942 * reflection.c (resolution_scope_from_image): Hack to work to work with
19943 dynamic assemblies.
19945 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
19946 added a 'force_ref' argument to force this function to allways return
19947 a TypeRef. This is needed by mono_image_get_memberref_token ().
19949 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19951 * reflection.c (mono_image_get_type_info): interfaces really don't have
19954 * reflection.c (mono_image_basic_init): fill out missing fields of
19957 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
19958 dynamic assemblies. This is required so dynamic assemblies show up in
19959 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
19960 Type::GetType() etc. This is consistent with MS behaviour.
19962 * image.c image.h reflection.c: add newly created classes to the name
19963 cache so mono_class_get () will find them.
19965 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19967 First part of changes to get IKVM.NET running under mono.
19969 * appdomain.h, appdomain.c: added new function
19970 mono_domain_try_type_resolve() which will emit TypeResolve events.
19971 This function will call AppDomain::DoTypeResolve to do the actual work.
19973 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
19974 moved existing code dealing with dynamic tokens to a new function
19975 called mono_reflection_lookup_dynamic_token (). This function will
19976 raise TypeResolve events when appropriate. Since reflection.c is not
19977 part of libmetadata, a new hook function called
19978 mono_lookup_dynamic_token() is added to class.c which will call this.
19980 * assembly.h assembly.c: make the invoke_load_hook function public,
19981 so it can be called for dynamic assemblies.
19983 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
19985 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
19988 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
19989 MonoGHashTable, since it contains pointers to objects which the GC
19992 * assembly.c (search_loaded): remove unused variable.
19994 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
19996 * object.c: fixed issue exposed by gcc-generated IL programs
19997 that use RVA data for pointers.
19999 2003-01-25 Martin Baulig <martin@ximian.com>
20001 * threads.c (start_wrapper): Moved the initialization of
20002 `start_func' above the mono_new_thread_init() call to which we
20003 pass it as argument.
20005 2003-01-24 Martin Baulig <martin@ximian.com>
20007 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
20008 the MonoThread pointer.
20010 2003-01-21 Miguel de Icaza <miguel@ximian.com>
20012 * icall.c: Rename `PowImpl' to Pow.
20014 2003-01-23 Dick Porter <dick@ximian.com>
20016 * threads.c (start_wrapper): Create a Thread object if needed, so
20017 the Main() thread can do the class initialisation in a subthread
20018 that has been set up to allow managed code execution.
20020 Pass the thread ID instead of the MonoThread pointer to the thread
20021 start and attach callbacks. This change is required, because the
20022 jit thread start callback must be called _before_ the Thread
20023 object can be created.
20025 (mono_thread_init): Removed much object creation code that is no
20026 longer needed. No managed code is called from here now.
20028 * object.c (mono_runtime_exec_managed_code): Create a subthread
20029 for Main, and call back to the runtime to use it.
20030 Set the exit code when Main exits.
20032 * gc.c: Make sure domain finalisation happens in a subthread.
20033 Re-enable threaded GC, fixing bug 31333 (again).
20035 * environment.c: System.Environment internall calls (so far just
20036 ExitCode is here, the others are still in icall.c)
20038 * appdomain.c (mono_runtime_cleanup): All threads running managed
20039 code should have finished before mono_runtime_cleanup() is
20040 reached, so no need to clean up threads.
20042 2003-01-22 Martin Baulig <martin@ximian.com>
20044 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
20045 `gpointer func' arguments.
20046 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
20047 but added `MonoThread *thread' argument.
20048 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
20050 * threads.c (mono_new_thread_init): Added `gpointer func' argument
20051 and pass it to the mono_thread_start_cb callback.
20052 (mono_install_thread_callbacks): New public function to install a
20053 set of callbacks which are set by the debugger.
20054 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
20056 2003-01-22 Martin Baulig <martin@ximian.com>
20058 * Makefile.am: Install debug-mono-symfile.h.
20060 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
20062 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
20064 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
20066 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
20067 * class.c (mono_ptr_class_get): correctly set access levels of pointers
20068 (mono_array_class_get): correctly set access levels of arrays
20070 2003-01-20 Patrik Torstensson
20071 * image.h (MonoAssemblyName): changed major, minor, build, revision
20072 from signed to unsigned.
20074 2003-01-20 sean kasun <skasun@azstarnet.com>
20076 * reflection.c (load_cattr_value): Now this handles
20077 MONO_TYPE_SZARRAY. Fixes bug #35629
20079 2003-01-20 Miguel de Icaza <miguel@ximian.com>
20081 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
20084 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20086 * decimal.c: fixed bug #26056.
20088 2003-01-17 Martin Baulig <martin@ximian.com>
20090 * gc.c: Raise an ExecutionEngineException instead of using g_error().
20092 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20095 (mono_get_exception_type_initialization): new function.
20097 * object.c: throw a TypeInitializationException when an exception is
20098 thrown invoking the class constructor.
20100 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20102 * reflection.c: fixed attribute reading.
20104 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20107 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
20108 provided, look for the type in the calling assembly and then in
20109 mscorlib; if the assembly name is provided, only try that one.
20111 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
20113 * object.c: register the vtable before there is a chance it's
20114 queried again recursively.
20116 2003-01-13 Duncan Mak <duncan@ximian.com>
20118 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
20121 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
20123 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
20125 2003-01-11 Martin Baulig <martin@ximian.com>
20127 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
20128 this to 20 for the release.
20130 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
20132 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
20134 * loader.c (mono_method_get_marshal_info): bug fix
20136 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
20137 structures with explicit layout
20139 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20141 * profiler.c: made the output more readable (and sorted).
20142 Added caller information for the allocation profiler.
20144 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
20146 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
20148 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20150 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
20151 to get value types.
20153 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
20155 * object.c, profiler.h, profiler.c, profiler-private.h:
20156 Added object allocation profiler.
20158 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
20160 * reflection.h, reflection.c: handle global methods.
20161 Compress blob entries.
20163 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
20165 * marshal.c: fix compilation.
20167 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
20169 * loader.c (mono_method_get_marshal_info): impl.
20171 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
20173 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20175 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
20176 for reference types.
20178 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
20180 * loader.c: fixed off by one error in loaded parameter names.
20182 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
20184 * marshal.c (mono_marshal_get_icall_wrapper): like
20185 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
20186 instead of a MonoMethod.
20188 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20190 * decimal.c: fixed bug #36537.
20192 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
20194 * marshal.c: throw a missing method exception if a
20195 P/Invoke method is not found.
20197 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20199 * icall.c: allow a null this for constructors.
20201 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20203 * icall.c: raise the proper exceptions if the arguments to the
20204 internal Invoke are incorrect.
20206 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
20208 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
20210 2003-01-03 Martin Baulig <martin@ximian.com>
20212 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20214 2002-12-31 Martin Baulig <martin@ximian.com>
20216 * debug-mono-symfile.c: Completely rewrote the type section.
20217 Instead of using individual malloc()ed fields, we use one big
20218 continuous memory area and offsets into this area.
20219 See the comments in the source code for details.
20221 2002-12-30 Martin Baulig <martin@ximian.com>
20223 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
20225 2002-12-30 Martin Baulig <martin@ximian.com>
20227 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
20228 line number table in this data blob instead of using an external
20231 2002-12-28 Martin Baulig <martin@ximian.com>
20233 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20235 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
20237 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
20238 as a boxed return type.
20240 2002-12-21 Miguel de Icaza <miguel@ximian.com>
20243 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
20244 g_build_filename to properly get separators on the filename created.
20246 * object.h: Small change, introduce MonoMarshalByRefObject to
20247 track the layout of that structure in the C# universe as we make
20250 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
20252 * object.c: removed assert to allow static fields on interfaces.
20253 * loader.c: a TypeSpec may be used for any type, not just arrays.
20255 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20257 * class.c, class.h: added mono_class_array_element_size ().
20258 Ignore static methods in interfaces.
20260 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20262 * threads.c: fixed the build under cygwin.
20264 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20266 * reflection.c: handle nullref constants. Allocate keys for
20267 reflection handles with the GC.
20269 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20271 * threads.c, threads.h: added mono_thread_get_abort_signal()
20272 to get a suitable signal for thread abort.
20274 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20276 * metadata.c: fix handling of ExportedType table.
20278 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20280 * icall.c: added WriteWindowsDebugString internal call.
20282 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20284 * reflection.h: added fields to match C# implementation.
20286 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20288 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
20290 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
20292 * gc.h, gc-internal.h: Rename header for GC internal calls to
20293 gc-internal.h from gc.h as to not clash with Boehm GC having its
20294 header installed as <gc.h> in outside include paths.
20295 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
20296 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
20298 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20300 * icall.c: assign minor, build and revision in FillName.
20302 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
20304 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
20305 Added support for running code generated by Reflection.Emit.
20307 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20309 * appdomain.c: check for NULL argument in LoadFrom.
20311 2002-12-10 Dick Porter <dick@ximian.com>
20313 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
20315 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20317 * appdomain.c: fix buglet when building exe file name. Handle full
20318 assembly name (needed after latest changes to AssemblyName).
20320 (mono_image_close): free some hashtables.
20322 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
20324 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
20325 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
20326 on some systems (redhat 7.3)
20328 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
20330 * threads.c: delete the critical section of a sync block,
20331 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
20333 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
20335 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
20337 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20339 * appdomain.[ch]: handle the assembly preload event to try loading the
20340 assemblies using the paths we have in the current domain.
20342 * assembly.[ch]: created an assembly preload hook that is called to try
20343 loading the assembly by other means that the ones provided here.
20345 * domain.c: initialize the domain search path.
20347 From now on, assemblies (TODO: except corlib and System) are loaded
20348 according to these rules when using mono_assembly_load ():
20350 1. It tries to load the assembly from the ApplicationBase
20351 of the current domain appending .dll and .exe (TODO: have to
20352 try loading from name/name.dll and name/name.exe).
20354 2. It tries the search path specified in PrivateBinPath for the
20355 current domain (if any).
20357 3. Previous behavior.
20359 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
20361 * icall.c: implemented GetInterfaceMap() related icall.
20362 * domain.c, loader.h: load MethodInfo in mono_defaults.
20364 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20366 * gc.c: disable the finalizer thread for now, untill all the issues
20367 with it are resolved.
20369 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20371 * string-icalls.c: handle embedded nulls in string ctor when the
20372 length is specified.
20374 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20376 * class.c: look for explicit interface implementation in parent
20379 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
20381 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
20383 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20385 * gc.c: protect handles with a critical section.
20387 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20390 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
20391 parameters. If no assembly specified, try getting the type from all
20392 the assemblies in the current domain, else, load the assembly and get
20395 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20397 * marshal.c: applied patch from Aleksey Demakov that fixes
20398 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
20400 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20402 * icall.c: fixed get_location.
20404 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
20406 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
20407 declarations to make it work with older gcc.
20409 * loader.c (mono_get_method): set signature->pinvoke for native calls
20411 2002-11-20 Dick Porter <dick@ximian.com>
20413 * threads.c (mono_thread_init): Set the main thread's handle
20415 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20417 * gc.c: allow compilation without GC support. Changed to match the
20420 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20422 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
20424 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
20426 * reflection.c: set a public key token on the core assemblies.
20428 2002-11-18 Dick Porter <dick@ximian.com>
20430 * threads.c: Split out some thread initialisation so that other
20431 files can set the start callback function.
20433 * gc.c: Run finalisers in a separate thread, to avoid stack
20434 overflow. Fixes bug 31333.
20436 * appdomain.c: Set up GC finalisation thread.
20440 * domain.c: Use gc.h macros for GC_malloc
20442 2002-11-15 Dick Porter <dick@ximian.com>
20446 * appdomain.c: Removed mono_runtime_init_with_attach(),
20447 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
20448 merging the extra parameter with the existing function. Removed
20449 unneeded code in mono_thread_attach().
20451 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
20453 * image.c (mono_image_loaded_by_guid): a method to get loaded
20455 (load_metadata_ptrs): we store the guid as string.
20457 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
20459 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
20461 * metadata.c (mono_guid_to_string): imported method form Zoltan
20462 Varga (slightly modified)
20464 * assembly.c (mono_assembly_open): load precompiled code
20466 * loader.h (MonoMethod): we store the method token for use in the
20469 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20471 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
20472 the hook function called when an assembly is loaded.
20474 * domain.c: Modified file.
20475 (mono_domain_assembly_load): removed hash table insertion of assemblies.
20479 2002-11-07 Miguel de Icaza <miguel@ximian.com>
20481 * reflection.c: Map PEFileKind to the value expected by the WinNT
20484 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20486 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
20487 Read until the buffer is filled completely.
20489 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20491 * icall.c: implemented MonoType.InternalGetEvent ().
20493 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20495 * appdomain.c: implemented InitAppDomainSetup. Delayed
20496 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
20497 the entry_assembly.
20499 * assembly.c: base_dir is now an absolute path ending with
20502 * icall.c: modified get_location according to the above changes.
20504 * object.c: init AppDomain.SetupInformation for the default domain after
20505 we have the entry assembly.
20507 * domain.c: when unloading a domain, setup = NULL.
20509 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
20511 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
20513 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
20515 * object.h, object.c: introduced mono_object_get_virtual_method ()
20516 to lookup the method invoked on an object when a callvirt is done on
20518 * icall.c: make MethodInfo::Invoke() always do a virtual call.
20520 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20522 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
20523 current domain when loaded an assembly and failed to load it.
20525 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
20527 2002-10-31 Dick Porter <dick@ximian.com>
20531 * file-io.c: Return the error status in a parameter, as the
20532 GetLastError() value has long since been blown away if we try and
20533 look it up in a subsequent internal call invocation. Delete the
20534 GetLastError() internal call, because it's useless.
20536 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
20538 * class.[ch]: added cast_class to fix bug 29517
20540 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
20542 * marshal.c: create valid IL code in the filter clause:
20543 the new JIT is less forgiving:-)
20545 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20547 * icall.c: removed get_property internal call.
20549 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
20551 * appdomain.h domain.c: Added an ID to appdomains.
20553 * threads.c threads.h icall.c: Implement icall
20554 Thread:GetDomainID(), and remove unused icall
20555 CurrentThreadDomain_internal.
20557 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20559 * icall.c: Don't recurse through the base types in GetConstructor.
20562 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
20564 * mempool.h, mempool.c: added mono_mempool_empty() and
20565 mono_mempool_stats().
20567 2002-10-23 Dick Porter <dick@ximian.com>
20571 * icall.c: Added MonoIO.GetFileType internal call
20573 2002-10-17 Dick Porter <dick@ximian.com>
20575 * appdomain.c (mono_runtime_cleanup): Don't signal the async
20576 delegate semaphore before waiting for all threads to finish,
20577 because new threads can also call async delegates. Fixes bug
20580 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
20581 of 3 seconds, in case another async job is queued. (This part is
20582 needed because the bug fix reintroduced the 3s exit lag.) This
20583 makes the mono_runtime_shutdown flag superfluous.
20585 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
20587 * reflection.c: include ehader size in method section headers.
20588 Really check for suplicated modules entries.
20590 2002-10-17 Martin Baulig <martin@gnome.org>
20592 * debug-mono-symfile.c: Added back support for locals.
20594 2002-10-14 Martin Baulig <martin@gnome.org>
20596 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
20599 2002-10-14 Martin Baulig <martin@gnome.org>
20601 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
20602 mono_class_get() instead of looking in the class cache.
20604 2002-10-13 Martin Baulig <martin@gnome.org>
20606 * debug-mono-symfile.c: Set version number to 28, include the
20607 signature in method names.
20609 2002-10-13 Martin Baulig <martin@gnome.org>
20611 * debug-mono-symfile.h: Set version number to 27.
20613 2002-10-11 Martin Baulig <martin@gnome.org>
20615 * gc.c: Don't register/unregister NULL pointers as disappearing links.
20617 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20619 * metadata.c, metadata.h: added helper function to allocate signatures.
20621 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20623 * icall.c: added internal call to get the location of machine.config.
20625 2002-10-08 Martin Baulig <martin@gnome.org>
20627 * debug-mono-symfile.c: Ignore classes with a pending init for the
20630 2002-10-03 Dick Porter <dick@ximian.com>
20632 * threads.c: Freebsd pthread_t is a pointer
20634 2002-10-03 Dick Porter <dick@ximian.com>
20636 * socket-io.c: Implemented GetHostName_internal
20638 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20641 (mono_config_parse_file): don't leak the text.
20643 2002-10-02 Martin Baulig <martin@gnome.org>
20645 * debug-mono-symfile.c: Added support for methods.
20647 2002-10-01 Martin Baulig <martin@gnome.org>
20649 * debug-mono-symfile.c: Don't emit methods and line numbers for
20650 the dynamic symbol file, just write the type table. We can easily
20651 have an external helper program which creates a symbol file for an
20654 2002-10-01 Dick Porter <dick@ximian.com>
20656 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
20657 Only add the handle to the cleanup array when we're about to
20658 launch the thread. Bug 31425 deadlocked when the test was run on
20661 2002-10-01 Martin Baulig <martin@gnome.org>
20663 * debug-mono-symfile.c: Added support for properties.
20665 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20667 * reflection.c: unaligned store fix from Mark Crichton
20668 <crichton@gimp.org>.
20670 2002-09-27 Martin Baulig <martin@gnome.org>
20672 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
20675 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
20677 * assembly.h, assembly.c: use a sane API to hook into the assembly
20678 loading process instead of a useless special-purpouse hack
20679 (ngen needs a hook, too, for example).
20681 2002-09-27 Dick Porter <dick@ximian.com>
20683 * threads.c (mono_thread_init): Call GetCurrentProcess() so
20684 io-layer can set up some process handle info. Not needed on w32,
20685 but doesn't hurt either.
20687 * process.c: Pass the program name in the second parameter to
20688 CreateProcess, so the path is searched. Include the working
20689 directory. Implemented process name, process enumeration, and some
20690 process detail internal calls.
20692 * icall.c: Added internal calls for process lookup, and some
20695 2002-09-26 Martin Baulig <martin@gnome.org>
20697 * assembly.c (mono_install_open_assembly_hook): New global
20698 function to install a function to be invoked each time a new
20699 assembly is loaded.
20700 (mono_assembly_open): Run this callback function if set.
20702 * debug-mono-symfile.c: Put back line numbers for the dynamic
20703 symbol file and also record the .il file as source file. This
20704 allows us to install the temporary symbol file as `file.dbg' just
20705 like a compiler-generated one.
20707 2002-09-26 Nick Zigarovich <nick@chemlab.org>
20709 * Corrected typo in gc.c (BOHEM vs BOEHM).
20711 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20713 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
20714 GetProperties. Also avoid calling g_slist_length in GetProperties and
20717 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
20719 * reflection.c: avoid unaligned stores (bug spotted by
20720 Mark Crichton <crichton@gimp.org>).
20722 2002-09-25 Martin Baulig <martin@gnome.org>
20724 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
20725 instead of guint64 for addresses and added prologue/epilogue info.
20727 2002-09-25 Martin Baulig <martin@gnome.org>
20729 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
20730 store line number info. For the dynamic symbol file, we only need
20731 to provide the JIT generated dynamic line number info for the dynamic
20734 2002-09-25 Martin Baulig <martin@gnome.org>
20736 * debug-mono-symfile.h: Incremented version number.
20738 2002-09-24 Martin Baulig <martin@gnome.org>
20740 * class.c (mono_debugger_class_init_func): New global function
20742 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
20745 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
20746 function. This is called via the mono_debugger_class_init_func
20747 hook to add all types to the dynamic type table.
20748 (ves_icall_MonoDebugger_GetType): New interncall to get a class
20749 from its metadata token.
20751 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
20752 New interncall for the debugger.
20754 2002-09-24 Nick Drochak <ndrochak@gol.com>
20756 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
20757 before using it in case it is null.
20759 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20761 * metadata.c: allow custom modifiers in local var signatures
20762 (bug spotted by Zoltan Varga).
20764 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20766 * class.c: deal with the <Module> class that may have a NULL vtable.
20767 Eliminate warnings.
20769 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20771 * image.c, image.h: more strong name helpers.
20772 * monosn.c: more work: convert pem keys to cryptoapi format.
20774 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
20776 * string-icalls.c: speedup IndexOf.
20778 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20780 * icall.c: updates from Zoltan.2.Varga@nokia.com.
20782 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
20784 * icall.c: cleanup: use mono_object_domain ().
20786 2002-09-23 Martin Baulig <martin@gnome.org>
20788 * debug-mono-symfile.c: Improved type support.
20790 2002-09-22 Martin Baulig <martin@gnome.org>
20792 * debug-mono-symfile.c: Added support for reference types and strings.
20794 2002-09-22 Martin Baulig <martin@gnome.org>
20796 * debug-mono-symfile.c: Started to work on the type table.
20798 2002-09-21 Martin Baulig <martin@gnome.org>
20800 * debug-mono-symfile.c: Largely reworked the symbol table format.
20801 The symbol table is now incrementally updated each time a new
20802 method is added. We're now also using our own magic and version
20803 so that you don't need to recompile all your classes if the
20804 dynamic table changes.
20805 (mono_debug_update_mono_symbol_file): Removed.
20806 (mono_debug_symfile_add_method): New function to add a method.
20808 2002-09-21 Martin Baulig <martin@gnome.org>
20811 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
20814 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
20815 New interncall to get a method from its metadata token.
20817 2002-09-21 Martin Baulig <martin@gnome.org>
20819 * debug-mono-symfile.c: Create type table.
20821 2002-09-20 Martin Baulig <martin@gnome.org>
20823 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
20825 2002-09-20 Martin Baulig <martin@gnome.org>
20827 * debug-mono-symfile.c: Provide information about params and locals.
20829 2002-09-20 Martin Baulig <martin@gnome.org>
20831 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
20834 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
20835 interncall to get a method from its metadata token.
20837 2002-09-20 Martin Baulig <martin@gnome.org>
20839 * debug-mono-symfile.c: Added a few checks for method->header
20840 being non-NULL. This should never happen, but for the moment
20841 let's use a g_warning() rather than a g_assert().
20843 2002-09-19 Mark Crichton <crichton@gimp.org>
20845 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
20846 even if support for it isn't present. Added an #ifdef to fix this.
20848 * socket-io.c: Added checks back for Solaris support.
20850 2002-09-19 Martin Baulig <martin@gnome.org>
20852 * debug-mono-symfile.c (read_string, write_string): Reflect latest
20853 changes in the symbol file format.
20855 2002-09-18 Martin Baulig <martin@gnome.org>
20857 * debug-mono-symfile.c: Set version number to 21.
20859 2002-09-18 Dick Porter <dick@ximian.com>
20861 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
20862 on netbsd. Fixes bug 30051.
20864 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20867 (set_version_from_string): little fix.
20869 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20871 * monosn.c, Makefile.am: added strong name utility.
20872 * reflection.h, reflection.c: implemented delayed signing,
20873 locale, version and hash id assembly attributes.
20875 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
20877 * loader.c, metadata.c: load param attributes in signatures.
20879 2002-09-16 Martin Baulig <martin@gnome.org>
20881 * debug-mono-symfile.c: Added string table with all method names.
20883 2002-09-14 Martin Baulig <martin@gnome.org>
20885 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
20886 fast method lookup.
20888 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20890 * reflection.c: record the public key token of referenced assemblies.
20892 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20894 * image.c, image.h: added functions to get the strong name and the
20895 public key of an assembly.
20896 * pedump.c: use them.
20898 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
20900 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
20902 2002-09-12 Miguel de Icaza <miguel@ximian.com>
20904 * marshal.c (mono_marshal_get_managed_wrapper): Added
20907 2002-09-11 Martin Baulig <martin@gnome.org>
20909 * gc.c: Call GC_unregister_disappearing_link() on all links when
20910 finalizing them, this is necessary to aviod a crash in boehm's
20913 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
20915 * gc.c: handle GetTarget for finalized objects spotted and fixed by
20918 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
20920 * icall.c: implemented MonoType::Module.
20921 * reflection.c, reflection.h: mono_module_get_object () from
20922 Tomi Pakarinen <tomi.pakarinen@welho.com>.
20924 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
20926 * icall.c: ignore overridden methods in GetMethods ().
20927 Fix for FieldInfo::SetValue().
20928 * object.c: handle float/double in runtime invoke.
20930 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20932 * object.c: allow a constructor to be called again on an object.
20934 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20936 * class.h, class.c: move field layout code to it's own function and
20937 export it. Get an interface id earlier. Move fields in MonoClass
20938 so they are more cache friendly and align the bitfields.
20939 * loader.c: temporary handle get_param_names() for a runtime method.
20940 * reflection.c, reflection.h: more code to handle runtime creation of
20943 2002-09-09 Martin Baulig <martin@gnome.org>
20945 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
20946 signature with the pinvoke field being set for the actual call.
20948 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20950 * icall.c: removed some unused icalls. Start of map of glib charsets
20951 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
20953 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
20955 * debug-helpers.c: break infinite loop (found and fixed by
20956 Holger Arnold <harnold@gmx.de>).
20958 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20960 * icall.c: target may be null in create_delegate.
20962 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20964 * marshal.c: handle a boolean return type.
20966 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20968 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
20970 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
20972 * gc.c: fix weakreferences.
20974 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
20976 * icall.c: added icall to get default codepage.
20978 2002-09-03 Dick Porter <dick@ximian.com>
20981 * threads.c: Use MonoThread instead of MonoObject where
20984 Store running thread objects in a hash table, so that we have all
20985 the info to hand when waiting for them to finish
20986 (means we don't need OpenThread() any more, so mingw builds should
20987 be fully functional again.)
20990 * object.h: Added thread ID to MonoThread
20992 2002-09-03 Martin Baulig <martin@gnome.org>
20994 * icall.c (System.Reflection.Assembly::get_location): New interncall.
20996 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20998 * icall.c: fixed leak in get_temp_path. Thanks lupus.
21000 2002-09-03 Martin Baulig <martin@gnome.org>
21002 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
21003 argument to store the end address of the disassembled instruction.
21005 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
21006 here from debug-symfile.h.
21007 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
21008 JIT into this struct.
21009 (MonoSymbolFile): Added `char *image_file' field.
21010 (MonoDebugGetMethodFunc): Removed.
21011 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
21012 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
21013 (mono_debug_find_method): New method.
21015 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
21016 create a full symbol file.
21017 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
21018 and static symbol files.
21019 (mono_debug_find_method): The symbol file keeps an internal method hash,
21020 call this to get a MonoDebugMethodInfo from a MonoMethod.
21022 * debug-symfile.[ch]: Removed.
21024 2002-08-29 Miguel de Icaza <miguel@ximian.com>
21026 * image.c (do_mono_image_open): Remove linker version check.
21028 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
21030 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
21031 wrappers for instance methods.
21033 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21035 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
21037 2002-08-28 Dick Porter <dick@ximian.com>
21039 * Makefile.am: Export HOST_CC for w32 builds
21041 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21043 * file-io.c process.c: MonoString are null terminated, no
21044 need for mono_string_to_utf16() anymore.
21046 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21048 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
21050 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
21052 * icall.c, reflection.h: speedup System.MonoType.
21054 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
21056 * reflection.c: allow null as the value of a string argument in
21057 custom attributes constructors.
21059 2002-08-27 Martin Baulig <martin@gnome.org>
21061 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
21062 `trampoline_address' field.
21064 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
21066 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
21067 check (fixes bug #29486)
21069 2002-08-27 Martin Baulig <martin@gnome.org>
21071 * debug-mono-symfile.c: Changed the file format in a way that allows us
21072 open it read-only and to use a specially malloced area for all the
21073 dynamic data. We can now also generate a symbol file on-the-fly if we're
21074 debugging IL code and there is no MCS generated symbol file for it.
21076 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
21078 * object.c: added a define for a good string and array
21079 creation speedup (not enabled by default because we need to deal with
21082 2002-08-26 Martin Baulig <martin@gnome.org>
21084 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
21085 function to create a dynamic symbol file. This is used by the
21086 debugger to create a symbol file for IL code on-the-fly.
21088 2002-08-26 Martin Baulig <martin@gnome.org>
21090 * loader.c (mono_lookup_pinvoke_call): Include the error message
21091 from g_module_error() in the error message.
21093 2002-08-24 Martin Baulig <martin@gnome.org>
21095 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
21096 function to update the symbol file. The symbol file is mmap()ed
21097 writable, but private. This allows us to install the symbol file
21098 together with the assembly.
21100 2002-08-24 Martin Baulig <martin@gnome.org>
21102 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
21103 but they can read the new symbol file format which mcs is now creating.
21105 * debug-symfile.c (mono_debug_find_source_location): Moved to
21106 debug-mono-symfile.c; this is now operating on the new symbol file.
21108 2002-08-23 Martin Baulig <martin@gnome.org>
21110 * debug-helpers.c (mono_method_desc_from_method): New function to get
21111 a MonoMethodDesc from a MonoMethod.
21113 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
21115 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
21116 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
21118 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
21120 * string-icalls.[ch]: make helper methods static.
21122 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21124 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
21125 types to it and to SetValueInternal.
21127 * object.c: Moved handle_enum label to its proper place. This was the
21130 This time i compiled mcs and gtk-sharp and they both work.
21132 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21134 * icall.c: reverted partially my previous patch until
21135 object.c:set_value handles enums correcly.
21137 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21140 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
21141 (ves_icall_System_Environment_get_MachineName): removed warning when
21142 compiling under cygwin.
21144 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21146 * object.c: fixed field_get_value() for reference types.
21148 2002-08-22 Dick Porter <dick@ximian.com>
21150 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
21151 Don't free a buffer while it's still needed. Patch from Jonathan
21152 Liger <Jonathan.liger@wanadoo.fr>
21154 2002-08-21 Miguel de Icaza <miguel@ximian.com>
21156 * icall.c (ves_icall_System_Environment_get_Platform): Add new
21159 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
21161 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
21162 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
21164 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
21165 we call unmanaged code which throws exceptions.
21167 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21169 * appdomain.h: added per-domain entry_assembly.
21170 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
21172 * icall.c: Assembly::GetEntryAssembly icall.
21173 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
21174 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
21176 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21178 * appdomain.h, gc.c: added mono_domain_finalize ().
21180 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21183 (mono_print_unhandled_exception): changed g_warning by g_printerr
21184 because g_log has a 1024 characters limit (yeah, i got a big stack
21185 trace). Don't print exception name, that should be in ToString
21188 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21190 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
21191 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
21193 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21196 (mono_print_unhandled_exception): after previous commit, i realized
21197 that MS calls ToString on the exception. I changed this function to
21198 do that. This way we get stack_trace for free.
21200 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21203 (mono_print_unhandled_exception): invoke Message property instead of
21204 getting 'message' field from Exception. Don't allocate memory for
21205 'trace' and 'message' if not needed.
21207 2002-08-18 Dick Porter <dick@ximian.com>
21209 * unicode.c: Fix asserts to match Encoder.cs checks
21211 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21213 * marshal.c: fix unaligned store issue and a few wrong
21214 opcode argument types.
21216 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21218 * icall.c: added GetUninitializedObjectInternal internal call.
21220 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
21222 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
21223 to the right domain.
21225 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
21227 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
21229 * class.c (class_compute_field_layout): set blittable to false for Strings
21231 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
21233 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21235 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
21236 first chunk of code to create types at runtime. Code to
21237 handle ReflectedType/DeclaringType. Make reflection handles
21240 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
21242 * class.c: set correct name in arrays.
21244 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
21246 * appdomain.c (mono_domain_transfer_object): make it work with
21247 valuetypes. bug fixes.
21249 2002-08-12 Dick Porter <dick@ximian.com>
21251 * object.h: Rename some parameters to avoid c++ keywords (Patch
21252 from Joseph Wenninger <kde@jowenn.at>)
21254 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
21256 * icall.c: added icall to implement Assembly.GetFile*.
21258 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21260 * reflection.h, reflection.c: code to embed managed resources.
21262 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21264 * class.c: move all the type size stuff into
21265 class_compute_field_layout().
21267 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21269 * class.c: ensure enums have always the correct instance size.
21270 * unicode.c: remove wrong assert.
21272 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21274 * assembly.c: fix mem corruption issue.
21275 * image.h, image.c: added mono_image_get_resource () to access
21277 * icall.c: implemented Assembly.EntryPoint property and some
21278 Managed Resources related internalcalls.
21281 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21283 * image.c, image.h: impemented mono_image_get_entry_point ().
21284 * appdomain.c: use mono_image_get_entry_point.
21286 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21288 * reflection.c: support the object type argument when loading
21291 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
21293 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
21294 String as return type.
21296 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
21298 * reflection.c: fix encoding of named args for custom attrs to match
21299 the ms implementation. Read them back when instantiating custom
21302 2002-08-02 Radek Doulik <rodo@ximian.com>
21304 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
21305 by Dietmar as quick fix
21306 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
21307 16 as stack size, used on more places as quick fix before Dietmar
21308 will fix it properly
21310 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21312 * object.h, object.c: added accessors for fields and properties.
21314 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21316 * class.c, class.h: made mono_class_get_field_from_name ()
21317 loop on parent types.
21318 Added mono_class_get_property_from_name ().
21320 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21322 * class.c, class.h: move the code to setup the type vtable in its own
21323 function so that it can be reused also for types created at runtime.
21324 Eliminate the "class" identifier from the header file.
21325 * reflection.c: setup the vtable for enums so that we can create
21326 objects for use in SetConstant ().
21328 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
21330 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
21331 instead of the delegate itself as this pointer (bug #28383)
21333 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
21335 * marshal.c (mono_marshal_get_managed_wrapper): added return type
21338 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21340 * loader.c: don't set the pinvoke bit on icalls.
21342 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
21344 * debug-helpers.c (mono_method_full_name): only print a number to
21345 indicate wrapper type (so that the output is more readable in traces).
21347 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
21349 * class.c (mono_class_init): include method override patch from Paolo
21351 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
21353 * icall.c: fixed GetTypeCode().
21355 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
21357 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
21358 use real delegate invoke function to make it work with multicast
21359 delegates (fix bug# 28291).
21361 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21363 * object.c: load constant strings.
21365 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21367 * reflection.c: no magic numbers.
21368 * tabledefs.h: security action enum.
21370 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21372 * assembly.c: fix possible memory corruption.
21374 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21376 * reflection.h, reflection.c: added support for linking resources.
21377 * verify.c: check we have an updated corlib.
21379 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
21381 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
21383 (mono_marshal_string_array): null terminate unmanaged string arrays.
21384 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
21386 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21388 * icall.c: Type.GetType () can now return also types from the
21391 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21393 * loader.h, loader.c: stack walking support.
21394 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
21395 GetCallingAssembly.
21397 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
21399 * marshal.c: added optimisations for blittable types
21401 * class.c (mono_array_class_get): do not set blittable attribute on arrays
21402 (mono_class_setup_mono_type): set blittable attribute for single
21405 * marshal.c (mono_string_utf8_to_builder): impl.
21406 (mono_string_builder_to_utf8): impl.
21407 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
21409 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
21411 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
21412 (mono_marshal_get_managed_wrapper): impl. byref types
21414 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21417 (search_method): don't display debug message.
21419 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
21421 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
21423 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21425 * appdomain.c: set the missing filename when throwing exception.
21427 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
21429 * metadata.c (mono_type_size): code cleanup
21430 (mono_type_stack_size): removed some test code
21432 2002-07-21 Miguel de Icaza <miguel@ximian.com>
21434 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
21435 mono_get_exception_file_not_found now.
21437 * exception.c (mono_exception_from_name_two_strings): New version
21438 that will call a constructor with two string arguments.
21439 (mono_get_exception_file_not_found): New helper routine, used to
21440 report file-not-found errors.
21442 2002-07-20 Dick Porter <dick@ximian.com>
21445 * process.c: Pass file handles to CreateProcess
21449 * file-io.c: Implemented CreatePipe
21451 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
21453 * metadata.c (mono_get_param_info): set alignment for value types
21455 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21457 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
21458 Constify mono_domain_assembly_open().
21459 * loader.c: handle null namespace in icalls.
21461 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
21463 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
21464 (emit_str_to_ptr_conv): marshal object as structs
21466 * metadata.c (mono_type_to_unmanaged): marshal object as structs
21468 * marshal.c (mono_marshal_get_runtime_invoke): support value types
21470 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
21472 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
21473 (mono_marshal_get_native_wrapper): we an now return value types
21475 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21477 * verify.c: more checks implemented.
21479 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
21481 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
21483 (mono_marshal_get_native_wrapper): allow byref arguments
21484 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
21485 impl. PtrToStringXXX methods
21486 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
21487 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
21488 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
21489 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
21490 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
21492 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21494 * reflection.c: fix buglet in parsing an assembly name.
21496 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
21498 * marshal.c (emit_ptr_to_str_conv): first impl.
21500 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21502 * object.c, class.h: cache the vtable in the class as suggested by
21503 vargaz@freemail.hu (Zoltan Varga).
21505 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21507 * class.h, loader.c: added mono_field_from_token().
21508 * verify.c: first cut of type checking code.
21510 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
21512 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
21514 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
21516 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
21518 (mono_marshal_get_remoting_invoke): impl.
21519 (mono_delegate_begin_invoke): impl.
21520 (mono_mb_emit_save_args): impl.
21521 (mono_delegate_end_invoke): impl.
21522 (mono_marshal_get_delegate_begin_invoke):
21523 (mono_marshal_get_delegate_end_invoke):
21524 (mono_marshal_get_delegate_invoke): generate a special name for
21525 those methods (including the signature) and associate them whith
21526 the delegate class.
21528 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
21531 (mono_reflection_type_from_name): now it has a MonoImage parameter
21532 which is used as the default image to search the type in. If the image
21533 is NULL or getting the type from it fails, it defaults to corlib.
21535 * icall.c: changed 1 call to mono_reflection_type_from_name to match
21538 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21540 * reflection.c: update the parameter table index.
21542 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21544 * domain.c: don't include the mark byte in the string hash.
21546 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21548 * icall.cs: icall for Type.GetTypeCode ().
21549 * verify: a couple of fixes and disabled local initialization checks.
21551 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
21553 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
21555 * debug-helpers.c (mono_method_full_name): print the type of the
21558 * metadata.c (mono_signature_hash): a hash function for signatures
21559 (mono_signature_hash): better hash algorithm
21561 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
21563 * debug-helpers.c (mono_method_full_name): this can now generate
21564 method names with signatures
21566 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
21567 method dont have this pointers.
21569 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
21571 * reflection.c: fixup typebuilder tokens.
21572 * image.c: fix buglet.
21573 * marshal.h: remove whitespace.
21574 * metadata.h, metadata.c: reinstate code that was removed.
21575 * verify.c: handle catch directives and fix another couple of bugs.
21577 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
21579 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
21580 (mono_marshal_get_native_wrapper): make it comp. with the old code
21581 (mono_marshal_get_native_wrapper): support boolean
21582 (mono_marshal_get_managed_wrapper): support more types
21584 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
21586 * class.c (class_compute_field_layout): compute class->blittable attribute.
21588 2002-07-09 Dick Porter <dick@ximian.com>
21590 * threads.c: Make the thread cleaning up cope with threads that
21593 2002-07-08 Radek Doulik <rodo@ximian.com>
21595 * reflection.c (method_encode_code): use non-translated values to
21596 compute finally_start, this fixes exception handling on ppc, yay!
21598 * decimal.h (struct signscale): fix endianess
21600 2002-07-07 Radek Doulik <rodo@ximian.com>
21602 * reflection.c: swap box_val and not val
21604 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
21606 * reflection.c, reflection.h: handle full assembly info in type name.
21607 Handle Type arguments when loading custom attributes.
21608 * icall.c: updated to use new mono_reflection_type_from_name () method.
21610 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21613 (method_from_memberref): also print assembly name when method not found.
21615 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21618 (ves_icall_TypeGetProperties): fixed bug #27473.
21620 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21622 * reflection.c: display image name and token when cannot find the
21623 .ctor for an attribute.
21625 2002-07-05 Martin Baulig <martin@gnome.org>
21627 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21629 2002-07-04 Dick Porter <dick@ximian.com>
21631 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
21632 compile on mingw. This will cause mingw builds to not wait for
21633 subthreads to terminate after the main thread does. I've lodged a
21634 bug with the mingw developers for them to wrap OpenThread().
21636 2002-07-03 Dick Porter <dick@ximian.com>
21638 * threads.c: Store thread IDs instead of handles, because
21639 GetCurrentThread() returns a pseudohandle and therefore stores
21640 useless values. mono_thread_cleanup() continues checking the
21641 array of threads until it is empty, to cope with subthreads
21642 spawning new threads after the main thread has finished.
21646 * profiler-private.h: Pass the thread ID to thread profiler
21647 functions, instead of a handle
21649 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21651 * verify.c: fixes to make it more usable.
21652 * pedump.c: added --verify code to verify IL code in an assembly.
21654 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21656 * reflection.c: turn errors into warnings to allow compiling corlib.
21658 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
21660 * reflection.c: add special cases to compile corlib.
21662 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21664 * reflection.c: handle properties with only a set method.
21666 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21668 * opcodes.h: add enum with opcodes in opval order.
21670 2002-07-01 Dick Porter <dick@ximian.com>
21673 * object.c (mono_runtime_run_main): Removed unneeded argument
21675 2002-06-28 Martin Baulig <martin@gnome.org>
21677 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21679 2002-06-27 Dick Porter <dick@ximian.com>
21681 * threads.c: Store the handle in both the parent thread and in the
21682 subthread, to minimise the time between starting a new thread and
21685 2002-06-26 Dick Porter <dick@ximian.com>
21687 * appdomain.c (mono_runtime_cleanup): Close the socket library
21688 after all the threads have finished, not before
21690 2002-06-26 Martin Baulig <martin@gnome.org>
21692 * debug-symfile.c (mono_debug_find_source_location): Added
21693 `guint32 *line_number' argument. If it's not NULL, store the line number
21694 there and return the file name without the line number.
21696 2002-06-25 Dick Porter <dick@ximian.com>
21700 * process.c: Process forking and other support functions
21702 2002-06-25 Dick Porter <dick@ximian.com>
21704 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
21705 things dont happen when the image is closed.
21706 (mono_image_lookup_resource): Walk the resource section looking
21707 for a particular entry
21709 * cil-coff.h: PE resource section decoding
21711 2002-06-25 Dick Porter <dick@ximian.com>
21715 (mono_assembly_foreach): Accessor functions to walk the list of
21717 (mono_assembly_set_main):
21718 (mono_assembly_get_main): Process methods need to know which
21719 assembly is the "main" one
21721 * object.c (mono_runtime_run_main): Record the main assembly
21723 * debug-helpers.c: Fix typo
21725 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
21727 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
21728 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
21730 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21732 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
21734 2002-06-21 Miguel de Icaza <miguel@ximian.com>
21736 * image.c (do_mono_image_open): Initialize reference count,
21737 otherwise we leak the MonoImage.
21739 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21741 * reflection.c: small tweak to handle self-hosting.
21743 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21745 * reflection.c: fix type name parse code.
21747 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21749 * reflection.c: break out of the loop.
21750 * image.c: special case corlib.
21752 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21754 * reflection.c: add all the custom attrs at the end to ensure the
21755 ctors have been properly initialized when the attributes are defined
21756 in the current assembly.
21758 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21760 * reflection.c: handle correctly multiple-nested types.
21762 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
21764 * row-indexes.h: fix typos.
21765 * reflection.c: adjust for typos and fix method_def_or_ref
21766 encoding in MethodImpl table.
21768 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21770 * reflection.c: fix entry point patching (thanks Serge!).
21772 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
21774 * verify.c: add check for System.Exception
21776 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21778 * image.c, class.c: minifix for code just c&p'ed.
21779 * reflection.c: warning fix.
21780 * object.h, loader.h, domain.c: load also StringBuilder.
21782 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21784 * marshal.h, marshal.c: some support code to handle complex marshaling.
21786 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21788 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
21789 Better signatures with vtable error dump.
21791 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
21793 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
21795 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
21797 * icall.c (ves_icall_Type_GetField): impl.
21799 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21801 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
21802 to retrieve a marshal description blob for a field or param.
21804 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21806 * reflection.h, reflection.c: change order of nested type emission
21807 to avoid table corruption. The NestedTypes table is sorted.
21808 * icall.c: change order of GetConstructor results to workaround mcs bug.
21810 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21812 * reflection.h, reflection.c: handle field and param marshal
21815 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21817 * icall.c, marshal.c marshal.h: more Marshal class implementation.
21819 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21821 * reflection.c: fix call convention.
21823 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21825 * reflection.h, reflection.c: mono_image_get_memberref_token()
21826 takes a type instead of a class, now. Added
21827 mono_image_get_array_token() to create tokens for the special
21828 multi-dim array methods.
21830 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21832 * assembly.c: handle modules (no assembly table). Split
21833 loading references in its own function.
21834 * class.c: handle moduleref resolution scope.
21835 * image.c, image.h: cache module name in image.
21837 2002-06-07 Martin Baulig <martin@gnome.org>
21839 * reflection.c (mono_image_get_type_info): Only add a class layout entry
21840 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
21842 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21844 * icall.c: more signature fixes that used uint instead of int.
21846 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21848 * reflection.c: fixed signature of field refs.
21850 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21852 * class.c, reflection.c: handle typerefs of nested types
21853 (both on read and when writing files).
21855 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
21857 * icall.c: fix method signatures that tried to workaround the previous
21860 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21862 * debug-helpers.c: fix typo.
21864 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21866 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
21867 rewrote the PE/COFF writing code (our programs are understood by the
21870 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21872 * gc.c, gc.h, icall.c: weakreference support.
21874 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21876 * Makefile.am, mono-config.c: use $(sysconfdir).
21878 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21880 * icall.c: changed default precision of Double.ToString() to 15.
21881 Fixed memory leak. Unified with Single.ToString.
21883 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
21885 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
21887 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
21889 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
21890 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
21891 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
21894 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21896 * debug-symfile.c, sysmath.c: yet more compilation fixes.
21898 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21900 * reflection.c, socket-io.c: more compilation fixes.
21902 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21904 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
21905 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
21906 unicode.c: warning and compiler compatibility fixes.
21908 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
21910 * class.h, metadata.c: fixed warnings/compilation errors.
21912 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21914 * Makefile.am, mono-config.c, mono-config.h: configuration file
21916 * loader.c, loader.h: make Dll mapping configurable at runtime in the
21917 config file. Export methods to insert and lookup mappings.
21919 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21921 * reflection.c: handle types and boxed objects in custom attr
21924 2002-05-30 Martin Baulig <martin@gnome.org>
21927 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
21929 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
21931 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
21932 to lookup the implmap row for a P/Invoke method.
21933 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
21934 P/Invoke method from the runtime on an as needed basis.
21936 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
21938 * metadata.c (mono_metadata_parse_signature): impl.
21940 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21942 * class.c: handle .pack directive.
21944 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
21946 * object.c: initialize static fields with RVA data.
21948 2002-05-25 Martin Baulig <martin@gnome.org>
21951 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
21953 2002-05-24 Martin Baulig <martin@gnome.org>
21956 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
21957 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
21958 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
21960 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
21962 * object.c: special case string ctros in invoke.
21963 * gc.c: silly whitespace changes.
21965 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
21967 * threadpool.[ch]: impl. a threadpool that can
21968 be used by mint and mono.
21970 2002-05-22 Martin Baulig <martin@gnome.org>
21972 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
21973 The first argument is now a `MonoReflectionModuleBuilder *', the return
21974 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
21975 `methods' field to get the method builder. The `token' argument is the
21978 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
21979 invalid characters instead of g_assert_not_reached()ing. This seems
21980 to be the behaviour of mscorlib.
21982 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
21984 * object.c (mono_runtime_invoke_array): applied patch from Rachel
21985 Hestilow to fix bug #25104
21987 2002-05-21 Martin Baulig <martin@gnome.org>
21989 * debug-symfile.c (mono_debug_find_source_location): New function.
21990 Looks up an IL offset in the line number table and returns the source
21991 location as a string.
21993 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21996 (mono_double_ToStringImpl): changed %f by %g until we have something
21999 2002-05-21 Nick Drochak <ndrochak@gol.com>
22001 * icall.c : Use different name for Math.Pow's icall. Needed to check
22002 parameters first in C#.
22004 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22006 * icall.c, reflection.h: added icall to get info about an event.
22008 2002-05-20 Radek Doulik <rodo@ximian.com>
22010 * object.c (mono_value_box): don't use memcpy for boxing on BIG
22012 (mono_value_box): don't use memcpy for small sizes on
22013 architectures with unaligned access
22015 2002-05-20 Martin Baulig <martin@gnome.org>
22017 * reflection.c (mono_reflection_setup_internal_class): Don't crash
22018 if `tb->parent == NULL'.
22019 (mono_reflection_create_internal_class): New function. This is
22020 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
22023 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
22026 2002-05-19 Martin Baulig <martin@gnome.org>
22028 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
22029 argument to get the length, don't default to the array length.
22031 2002-05-18 Miguel de Icaza <miguel@ximian.com>
22033 * assembly.c (mono_assembly_setrootdir): New function used to
22034 override the MONO_ASSEMBLIES directory.
22036 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22038 * icall.c: ValueType_GetHashCode() initialize local var.
22040 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22042 * reflection.c: sort custom attributes table.
22044 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22046 * reflection.c: support named args in custom attributes (write support).
22048 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
22050 * reflection.c: fix finally position calculation.
22052 2002-05-15 Radek Doulik <rodo@ximian.com>
22054 * reflection.c: fixed endianess at many places
22056 * icall.c (ves_icall_InitializeArray): comment out debug msg
22058 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
22060 * object.c (mono_unhandled_exception): new function to handle
22061 unhandled exceptions.
22062 (mono_unhandled_exception): call the UnhandledException event.
22063 (mono_runtime_delegate_invoke): impl.
22065 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
22067 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
22068 returns the RVA, not the direct pointer to the data. Handle the case
22069 when the class size is fixed.
22071 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
22073 * reflection.c: fix some endianess issues.
22075 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
22077 * object.c (mono_runtime_invoke): is now able to catch exceptions.
22079 * threads.c (mono_thread_init): added a callback which is invoked
22082 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
22084 * icall.c: make GetHashCode return non-negative values.
22086 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
22088 * object.c, icall.c, gc.c: revert to address-based hashcode.
22090 2002-05-13 Miguel de Icaza <miguel@ximian.com>
22092 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
22094 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22096 * icall.c, class.c: special case <Module>.
22098 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
22100 * icall.c: fix bug in GetNow().
22102 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
22104 * object.c (mono_runtime_class_init): make sure that we call all
22105 static class constructors.
22107 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
22109 * reflection.c: sort methodsemantics table.
22111 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
22113 * reflection.h, reflection.c: honour init locals setting.
22115 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
22117 * icall.c: copied Double ToStringImpl for Single ToStringImpl
22119 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22121 * reflection.c: support ContructorBuilders in attribute blob creation.
22123 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22125 * reflection.c: some changes to build a binary that can be run
22126 directly in windows.
22128 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22130 * loader.c: print a big message when an icall can't be found.
22132 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22134 * string-icalls.c: fix bug 24248.
22136 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
22138 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
22139 icall.c, reflection.h: separate assembly loading by pathname and by
22140 assembly name. Use the MONO_PATH env var to search for assemblies.
22142 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22144 * assembly.c, image.h: add some support for assemblies
22145 with multiple modules.
22146 * class.c, class.h: export mono_class_from_typeref().
22147 * loader.c: remove duplicated code and use mono_class_from_typeref(),
22150 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22152 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
22153 documentation says (the ECMA one is correct).
22155 2002-05-02 Dick Porter <dick@ximian.com>
22157 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
22158 Don't name the synchronisation mutex.
22160 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
22163 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
22164 Make the prototypes match.
22165 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
22169 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
22170 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
22171 all systems have tm.tm_zone, so use strftime() with %Z to print
22172 the timezone abreviation into a temp string.
22174 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
22175 rather than mono_array_addr() on a MonoString on Big Endian
22178 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
22180 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
22183 2002-04-30 Dick Porter <dick@ximian.com>
22185 * socket-io.c: Cope with SOCKET being an integer rather than a
22188 * threads.c: Added Thread_free_internal, to deal with thread
22189 handle cleanup. Moved calls to handle_store() and handle_remove()
22190 to start_wrapper(), so each can only be called once. Allocate
22191 synchronisation blocks with GC_malloc(), and use GC finalisation
22192 to close the handles.
22194 * icall.c: added System.Threading.Thread::Thread_free_internal
22196 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22198 * icall.c: support Environment.Exit, CommandLineArgs().
22200 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
22202 * object.c, object.h: added mono_runtime_run_main () and
22203 mono_runtime_get_main_args () for use in System.Environment.
22205 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22207 * gc.c: fix thinko, enable actual finalization since the jit is now
22210 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22212 * gc.c, object.c: take into account that an object may be offset wrt the address
22213 returned by GC_malloc().
22215 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
22217 * image.c: handle files without entries in the assembly table (modules).
22219 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
22221 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
22222 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
22223 allowed to be null when it's System.Object class setup.
22225 2002-04-27 Martin Baulig <martin@gnome.org>
22227 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
22228 if `tb->parent == NULL' rather than crashing.
22230 2002-04-28 Nick Drochak <ndrochak@gol.com>
22232 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
22233 calling acos() where asin() should have been called.
22235 2002-04-26 Martin Baulig <martin@gnome.org>
22237 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
22238 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
22239 there's a subdirectory called `System', but we don't want to read that
22240 subdirectory as an assembly.
22242 2002-04-25 Martin Baulig <martin@gnome.org>
22244 * debug-symfile.c: Reflect latest MonoString changes.
22246 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22248 * rand.c, rand.h: instance method icalls need to have an explicit
22249 this pointer as first argument in the C implementation.
22251 2002-04-25 Nick Drochak <ndrochak@gol.com>
22253 * icall.c: Fix typo in map for GetNonZeroBytes
22255 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
22257 * string-icalls.c : String does now passes unit tests without any
22258 errors, the following changes has been made:
22260 Implemented replace methods.
22261 Renaming of methods to (try) follow the standard.
22262 Fixed compare ordinal
22263 Made all memory allocated directly to function instead of via icall function.
22264 Small performance fix in is_in_array function
22266 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
22268 c (mono_string_Internal_ctor_charp_int_int):
22269 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
22270 sindex < 0, throw ArgumentOutOfRangeException instead of
22271 ArgumentNullException.
22273 Added new check for length == 0, however
22274 I need to make it return String.Empty from the C code.
22276 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
22277 that calculate the length for us here.
22279 (mono_string_Internal_ctor_sbytep_int_int): Replaced
22280 mono_string_new_utf16 with mono_string_new, since value is utf8.
22282 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22284 * object.c: register the object for finalization if needed.
22285 Allocate one more char in the string for the terminating 0 char.
22287 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22289 * class.c, class.h, image.c: check if a type implemenst a destructor.
22290 Use the proper key for array class lookups.
22291 * icall.c: register the icalls in the System.GC class.
22292 * gc.c, gc.h: GC-related functions and icalls.
22294 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22298 * unicode.c: free some strings gotten from mono_string_to_utf8 and
22299 changed a couple of free () by g_free ().
22301 * decimal.c: one-liner in the comments for decimal2string ().
22303 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
22305 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
22307 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
22309 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
22310 * object.c (mono_runtime_invoke_array) : handle null in params
22312 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
22314 * string-icalls.c: fixed bug in split (one off bug)
22316 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
22318 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
22319 * icalls.c: added String::Equals as internal method
22321 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
22323 * threads.c: fixed bug in the double interlocked functions
22325 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
22327 * threads.c: implemented all of the new interlocked icalls.
22328 * string-icalls.c: fix a bug in insert.
22329 * icalls.c: added the icalls for interlocked, removed old string functions.
22331 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22333 * loader.c: fix off-by-one error when reading argument names.
22335 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22337 * profiler.c: win32 counter implementation (untested).
22338 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
22339 (the latter needs testing and more complete impl. from win32 folks).
22341 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
22343 * object.c: mono_array_new_full workaround mono_array_class_get
22346 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22348 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
22349 * object.h (mono_string_chars): Changed casting type.
22351 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22353 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
22354 method signatures to use gunichar2 instead of gint16.
22356 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
22358 * object.h, object.c: domain-specific versions of mono_object_new and
22361 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
22363 * object.c: changed String layout
22365 * string-icalls.c (mono_string_Internal_ctor_chara): added
22366 internal string constructors.
22368 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
22370 * threads.c: pass 'this' to the thread start routine.
22372 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22374 * string-icalls.c: fix IndexOf and LastIndexOf. Now
22375 InternalCompareStr don't call twice mono_string_cmp_char for the last
22376 character. Improved performance in mono_string_cmp_char.
22378 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22380 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
22381 code into its own library: libmonoruntime.
22383 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
22385 * object.h, object.c: changed array format so that szarrays do not
22386 require a bounds structure.
22387 * icall.c, appdomain.c: support for new szarray format.
22389 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22391 * metadata.c: compare also the retuns type when comparing signatures:
22392 we didn't do this as an optimization since really overloaded methods
22393 must differ also in the arguments, but this doesn't work with
22394 low-level IL code (or when using explicit conversion operators: see
22395 bug#23498 for an example).
22397 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22399 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
22401 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
22403 * icall.c: make MonoType::GetElementType its own icall.
22405 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22407 * icall.c: remove MonoMethod_get_Name().
22408 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
22411 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22413 * string-icalls.c: optimized a few methods.
22415 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22417 * icall.c: added all new string internal calls
22418 * string-icalls.c: added, new string internal call implementation.
22419 * object.c: added mono_string_new_size for allocating a string a size
22421 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
22423 * object.c (mono_object_isinst): use the same code as in the
22424 optimized x86 version.
22426 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22428 * profiler.c: TSC-based timer code (faster and more accurate).
22429 Not hooked up in configure, yet (set USE_X86TSC to 1).
22431 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
22433 * profiler.c, profiler.h: track time spent compiling methods.
22434 * threads.c: track thread creation/destruction.
22436 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
22438 * profiler.c, profiler.h, profiler-private.h: profiling interface
22439 and sample implementation. Moved here so that it can be used also by
22442 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
22444 * reflection.c, reflection.h: keep types and other handles separate in
22445 the hash tables for referred tokens. Add guid for modules.
22447 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
22449 * assembly.c: fix bugs found with valgrind.
22450 * metadata.h, metadata.c: added mono_metadata_guid_heap().
22452 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
22454 * threads: added icall support for getting current domain for
22457 2002-04-13 Martin Baulig <martin@gnome.org>
22459 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
22460 (MonoDebugVarInfo): Added `index' field for register based addresses.
22461 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
22462 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
22463 `MonoDebugVarInfo *params' and `guint32 this_offset' with
22464 `MonoDebugVarInfo *this_var'.
22466 * debug-symfile.c (relocate_variable): New static function to write
22467 a location description for a local variable or method parameter.
22469 2002-04-12 Martin Baulig <martin@gnome.org>
22471 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
22472 stack offset and begin/end scope address of a local variable.
22473 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
22474 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
22475 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
22477 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
22478 Added new relocation types for start/end scope of a local variable.
22480 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22482 * object.h: add mono_object_domain() macro.
22483 * reflection.c: handle typespecs.
22484 * icall.c: MonoMethod::get_Name() implementation.
22486 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22488 * icall.c: String::GetHashCode() icall implementation.
22490 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22492 * icall.c: String::IndexOfAny icall.
22493 * object.c, object.h: make array->max_length more useful.
22494 Intrduced mono_object_class() and mono_string_length() macros.
22496 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22498 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
22499 instead of g_unichar_isdigit.
22501 2002-04-11 Nick Drochak <ndrochak@gol.com>
22503 * icall.c: Implement a simple Double.ToString().
22505 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22507 * appdomain.h: only io-layer.h is supposed to be included.
22508 * icall.c: explicitly import environ. Fix warning.
22510 2002-04-10 Nick Drochak <ndrochak@gol.com>
22512 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
22513 return true even if it's not Daylight Savings time.
22514 Only return false for the case where the function isn't
22515 implemented for a plaform (read Windows).
22517 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22519 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
22522 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
22524 * mempool.c (mono_mempool_alloc): only use g_malloc when
22525 absolutely necessary.
22527 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
22529 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
22531 * class.c (mono_class_vtable): use domain mempool to allocate vtable
22532 (mono_class_proxy_vtable): use domain mempool
22534 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
22536 * appdomain.h, appdomain.c: split initialization that requires the
22537 execution engine support into mono_runtime_init().
22539 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
22541 * class.c (mono_class_init): don't include vtable inside MonoClass
22542 to save some memory, gather some statistics.
22543 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
22545 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22547 * icall.c: internalcall implementation for ValueType.Equals().
22549 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
22551 * object.c (mono_message_init): moved
22552 (mono_runtime_exec_main): new arch. independent impl.
22553 (mono_runtime_invoke_array): new method - like
22554 mono_runtime_invoke, but you can pass an array of objects.
22555 (mono_remoting_invoke): new arch. independent impl.
22556 (mono_message_invoke): new arch. independent impl.
22557 (mono_runtime_class_init): new arch. independent impl.
22558 (mono_runtime_object_init): new arch. independent impl.
22560 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22562 * metadata.c, object.c, reflection.c: documented the exported
22565 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
22567 * icall.c: simpler code to pass the assembly builder data to corlib.
22568 Implement GetNestedTypes() internalcall.
22570 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22572 * class.c: warn if a type can't be loaded.
22574 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
22576 * image.h: typedef MonoImageOpenStatus
22577 * types.h: removed unused file
22579 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
22581 * icall.c: Enum_ToObject accepts enum value arguments.
22583 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
22585 * class.c: move initialization of properties, events and nested
22586 classes, so that they happen for interfaces, too.
22588 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
22590 * icall.c: cleanup some ugly casts in Array_SetValue*.
22592 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22594 * icall.c: the values array fro enums is of the correct type, now.
22595 Implement (correctly) getFullName instead of assQualifiedName for
22597 * reflection.h, reflection.c: added mono_type_get_name ().
22599 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22601 * assembly.c, image.h: for each MonoImage, record from wich assembly
22603 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
22604 Make Type.Assembly work.
22606 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
22608 * debug-symfile.h: use char* instead of gpointer to avoid
22611 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
22613 * icall.c (ves_icall_InternalExecute): impl. FielSetter
22614 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
22616 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
22618 * icall.c (mono_message_init): impl. (code cleanup)
22619 (ves_icall_InternalExecute): impl. FieldGetter
22621 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
22622 defined we call all (non-static)methods through the vtable.
22624 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
22626 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
22627 finalizer even though the memory is still referenced (and the chunk of
22628 memory is not freed).
22630 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
22632 * assembly.c: fix brokeness.
22634 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
22636 * class.c: kill some warnings. Check explicit interface method
22637 implementation also without considering the namespace.
22638 Load also literal strings in static class data.
22640 2002-03-29 Miguel de Icaza <miguel@ximian.com>
22642 * assembly.c (default_assembly_name_resolver): Kill memory leak.
22643 (default_assembly_name_resolver): Make the resolver take the
22644 "base" directory where the assembly was originally defined, so we
22645 can load DLLs that are in the same directory as the assembly that
22646 is being referenced.
22648 2002-03-28 Dick Porter <dick@ximian.com>
22654 * unicode.c: Warning cleanups
22656 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
22658 * object.h, reflection.h: use the correct type instead of MonoObject.
22660 2002-03-28 Martin Baulig <martin@gnome.org>
22662 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
22663 (mono_debug_update_symbol_file): Initialize classes if necessary.
22665 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22667 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
22668 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
22670 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
22672 * assembly.h: fix function prototype.
22673 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
22674 * mono-endian.h: use const cast.
22676 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
22678 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
22680 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
22682 * loader.c: don't assert when a typeref can't be loaded, give
22683 a chance to the runtime to trow an exception instead.
22684 * loader.h: fix warning.
22686 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
22688 * class.c (mono_class_proxy_vtable): added proxy support
22690 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
22692 * icall.c: removed last of PAL calls, added System.Environment
22693 * file-io.h, file-io.c: MonoIO implementation
22694 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
22696 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
22698 * appdomain.c: do not use the byte marker in ldstr table lookup.
22699 * debug-helpers.c: allow two ':' to separate class and method name.
22700 * object.c: allocate arrays bounds with the GC, too.
22701 * verify: add a few more checks.
22703 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
22705 * reflection.c: output also literal strings. Allocate parameter data
22706 with GC_malloc() (thanks, Martin, for catching this!).
22708 2002-03-26 Martin Baulig <martin@gnome.org>
22710 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
22711 include the `this' offset in the `param_offsets'.
22713 2002-03-25 Martin Baulig <martin@gnome.org>
22715 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
22716 mono_debug_get_class() function to get the classes. Added new
22717 relocation types for arrays and strings.
22718 (mono_debug_get_class): New static function to search in all
22719 referenced assemblies for a metadata token.
22721 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
22723 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22725 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
22726 hold gc-allocated objects. Make the string heap a stream like the
22727 others. Removed duplicated code when writing stream info.
22728 Added asserts to catch possible buffer overflows. Set the sorted map
22729 for tables that need sorting. Added some documentation.
22731 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
22733 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
22734 for interned strings and vtables.
22736 2002-03-24 Martin Baulig <martin@gnome.org>
22738 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
22739 it in the array since it was created with g_slist_prepend().
22741 2002-03-24 Martin Baulig <martin@gnome.org>
22743 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
22744 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
22745 (mono_debug_method_from_token): Renamed to
22746 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
22747 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
22749 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
22752 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
22754 2002-03-24 Martin Baulig <martin@gnome.org>
22756 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
22757 (mono_debug_method_from_token): New func.
22759 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
22760 New interncall, calls mono_debug_local_type_from_signature().
22761 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
22762 calls mono_debug_method_from_token().
22764 2002-03-23 Martin Baulig <martin@gnome.org>
22766 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
22767 specifies the number of bytes to be converted, not the array size.
22768 Return the number of chars, not the number of bytes.
22769 (ves_icall_iconv_get_chars): The `byteCount' argument
22770 specifies the number of bytes to be converted, not the array size.
22772 2002-03-23 Martin Baulig <martin@gnome.org>
22774 * reflection.h (MonoReflectionSigHelper): New type.
22776 * reflection.c (mono_reflection_sighelper_get_signature_local),
22777 (mono_reflection_sighelper_get_signature_local): New functions.
22779 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
22780 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
22783 2002-03-23 Martin Baulig <martin@gnome.org>
22785 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
22786 is_writeable is set.
22787 (mono_raw_buffer_update): New function to write the modified map
22790 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
22792 * debug-symfile.c (mono_debug_update_symbol_file): Call
22793 mono_raw_buffer_update() when done writing.
22795 2002-03-23 Martin Baulig <martin@gnome.org>
22797 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
22799 * debug-symfile.c: Added support for arguments and local variables.
22801 2002-03-23 Dick Porter <dick@ximian.com>
22803 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
22804 protected by ifdefs, hence breaking the w32 build.
22806 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22808 * object.c: implement is_interned() the right way.
22810 2002-03-21 Martin Baulig <martin@gnome.org>
22812 * debug-symfile.[ch]: New files to handle debugging information
22813 files. There's also support to dynamically update these symbol
22814 files to include machine dependent information.
22816 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
22818 * threads.c (mono_thread_create): new function to create thread
22821 2002-03-20 Martin Baulig <martin@gnome.org>
22823 * icall.c (ves_icall_InternalInvoke): Create a new object if the
22824 method is a constructor.
22825 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
22826 points to ves_icall_InternalInvoke().
22828 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
22830 * file-io.c: Flush shouldn't throw exceptions.
22832 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
22834 * file-io.c: FileStream flush support; FileSetLength now
22835 restores file pointer.
22837 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
22839 * class.c: set image for pointer classes.
22841 2002/03/19 Nick Drochak <ndrochak@gol.com>
22843 * sysmath.c: Forgot one.
22845 2002-03-18 Miguel de Icaza <miguel@ximian.com>
22847 * sysmath.c: Avoid redefining existing names.
22849 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
22851 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
22852 handled by runtime as icall rather than dllimport from libm.so
22853 * file-io.c, file-io.h: fixed handle argument type.
22855 2002-03-18 Dick Porter <dick@ximian.com>
22857 * reflection.c (mono_image_get_type_info): rename interface to
22858 iface, because of "#define interface struct" on windows.
22860 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
22862 * class.c, class.h: rename and export mono_ptr_class_get().
22863 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
22864 * reflection.c, reflection.h, icall.c: better/saner type name
22865 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
22868 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
22870 * class.c (mono_class_init): removed hardcoded GHC_SLOT
22872 * icall.c (ves_icall_InternalInvoke): impl.
22874 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
22876 * reflection.c: output the interface map table, too.
22878 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
22880 * class.c (class_compute_field_layout): separate computation of
22881 static field layout
22883 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
22885 * icall.c: added System.Buffer support.
22886 * file-io.c: moved file icalls from PAL to FileStream.
22888 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
22890 * icall.c (ves_icall_System_Object_GetHashCode): impl.
22892 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
22894 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
22896 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
22898 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
22900 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
22902 * debug-helpers.{c,h}: moved here from monograph some useful functions
22903 to locate a method by name/signature in a class or image. Included
22904 also a small and flexible IL disassembler.
22906 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
22908 * reflection.c: fixup tokens in methods with small header size, too.
22910 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
22912 * object.c (mono_string_to_utf8): remove assert(!error), instead
22915 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
22917 * icall.c: update to the new mono_Array_class_get interface.
22919 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
22921 * appdomain.c, object.c: Boehm-GC enable.
22922 * icall.c: make get_data_chunk() support split data requests.
22923 Ensure a class is initialized in more cases. Return only the first
22924 property found in GetProperties() or the compiler gets confused.
22925 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
22926 * reflection.h, reflection.c: add fixup mechanism for field and method
22927 tokens. Initialize assembly->typeref in a single place. Output
22928 properties after events. Support custom attributes for events, too.
22929 Typo fix for paramter custom attrs.
22931 2002-03-07 Martin Baulig <martin@gnome.org>
22933 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
22935 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
22937 * class.c (mono_array_class_get): fix. for multi. dim. arrays
22939 2002-03-06 Martin Baulig <martin@gnome.org>
22941 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
22942 non-zero lower bounds. See testcases #F10-#F13.
22944 2002-03-05 Martin Baulig <martin@gnome.org>
22946 * exception.c (mono_get_exception_argument_out_of_range): New exception.
22948 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
22949 ves_icall_System_Array_GetValue(), only calculate the absolute array position
22951 (ves_icall_System_Array_SetValue): Likewise.
22952 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
22953 as argument and does the actual work. This function is used when copying a
22954 multi-dimensional array.
22955 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
22956 now do all the widening conversions of value types.
22957 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
22959 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22961 * class.c: remove some magic numbers and use the smbolic names,
22962 instead. Added init_events() to load event info at class init time.
22963 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
22964 and mono_metadata_methods_from_event().
22965 * reflection.h, reflection.c: added support for writing out the evnets
22966 related information.
22968 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22970 * reflection.h, icall.c: use a different method (GetInterfaces)
22971 to gather interface info and add isbyref, isprimitive and
22972 ispointer to the ves_icall_get_type_info() return value.
22974 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
22976 * class.h: stared adding support for events.
22977 * icall.c: split find_members implementation. Added debug icall to get
22978 the address of an object.
22979 * reflection.c: handle TypeBuilders in mono_type_get_object().
22981 2002-03-01 Martin Baulig <martin@gnome.org>
22983 * icall.c (ves_icall_System_Array_GetLength): This must throw an
22984 ArgumentOutOfRangeException(), not an ArgumentException().
22985 (ves_icall_System_Array_GetLowerBound): Likewise.
22986 (ves_icall_System_Array_GetValue): Improved argument checking.
22987 (ves_icall_System_Array_SetValue): Improved argument checking.
22989 2002-03-01 Martin Baulig <martin@gnome.org>
22991 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
22992 called with invalid arguments rather than just dying with g_assert().
22993 (ves_icall_System_Array_SetValue): Likewise.
22994 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
22995 raise a NotImplementedException instead.
22996 (ves_icall_System_Array_GetLength): Added argument checking.
22997 (ves_icall_System_Array_GetLowerBound): Added argument checking.
22999 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
23001 * object.h (mono_assert): new macros mono_assert and
23002 mono_assert_not_reached
23004 2002-02-28 Martin Baulig <martin@gnome.org>
23006 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
23007 and "System::String::IsInterned" to "System::String::_IsInterned".
23009 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
23011 * icall.c: remove hacks for typebuilder. Added icall to create a
23012 modified type from a tybebuilder.
23013 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
23014 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
23015 to create a backing MonoClass for a TypeBuilder.
23017 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23019 * class.c, class.h: more refactoring of class init.
23020 Export mono_class_setup_mono_type() and mono_class_setup_parent().
23022 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
23024 * marshal.c, marshal.h: start of marshaling interface.
23026 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23028 * icall.c: fix order in assembly qualified name icall.
23030 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23032 * class.c: do not free str, since we store it in the hash table.
23033 * reflection.h: add label field to MonoILExceptionInfo.
23034 * reflection.c: handle references to more than one assembly. Handle
23035 case when there isn't a module created in the assembly.
23037 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
23039 * class.c: Fix typo. Start refactoring of class init code.
23041 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
23043 * appdomain.c: exit with 1 on error.
23044 * class.c: we already have the name in MonoClassField.
23045 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
23046 MonoStreamHeader instead of an offset of image->raw_metadata.
23048 2002-02-26 Miguel de Icaza <miguel@ximian.com>
23050 * appdomain.c (mono_init): Be even more descriptive about the error.
23052 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
23054 * appdomain.c: give the user an informative message when corlib can't
23057 2002-02-26 Martin Baulig <martin@gnome.org>
23059 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
23060 New icall to get the time zone data.
23062 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23064 * reflection.c: set virtual and raw size of section correctly.
23065 * threads.c: transfer domain information to newly created threads.
23067 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23069 * class.c: when instancing a class in a domain, load the default
23070 vaules for static fields from the constant table. Fix System.Enum to
23072 * icall.c: implement Object::GetType() internalcall. Implemented
23073 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
23074 Fixed checking of binding flags in find_members().
23075 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
23076 * reflection.c: handle enumerations when writing to the constant
23077 table. Use a different object cache for types.
23080 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
23082 * object.c (mono_object_isinst): fix for arrays
23084 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
23086 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23088 * object.c: don't use mprotect () and fix intern pool hash table
23089 lookup for big endian systems.
23091 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23093 * icall.c: change type_is_subtype_of () signature.
23095 2002-02-21 Mark Crichton <crichton@gimp.org>
23097 * rand.c, rand.h: Added random number generator for
23098 System.Security.Cryptography classes.
23100 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
23102 * icall.c: Added System.Security.Cryptography calls.
23104 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
23106 * class.c, icall.c, metadata.c: better support for pointer types.
23107 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
23108 * reflection.c: Add support for getting custom attrs for properties
23109 and simplify some code.
23111 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23113 * icall.c: change getToken () and add custom attribute GetBlob()helper
23115 * reflection.h: add custom attrs array to the reflection builder structures.
23116 * reflection.c: encode and emit custom attributes for all the relevant
23117 reflection objects. Cache fieldref and methodref tokens. Change
23118 mono_image_create_token() interface to take a MonoDynamicAssembly.
23119 More complete custom attributes decoder. Load custom attributes for
23120 Assembly, Field, Method and Constructor objects, too. Make the
23121 returned array an Attribute[] one, not object[]. Added
23122 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
23123 custom attribute constructor.
23125 2002-02-20 Dick Porter <dick@ximian.com>
23129 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
23130 problem code out for now).
23132 2002-02-19 Radek Doulik <rodo@ximian.com>
23134 * object.c (mono_ldstr): use hash table to avoid multiple swapping
23136 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
23138 * icall.c: register the GetCustomAttributes method.
23139 * object.c, object.h: add mono_string_new_len ().
23140 * reflection.h, reflection.c: added mono_runtime_invoke(),
23141 mono_install_runtime_invoke(). Added
23142 mono_reflection_get_custom_attrs () to load custom attributes and
23143 create the attribute objects.
23145 2002-02-19 Dick Porter <dick@ximian.com>
23146 * threads-dummy-types.c:
23147 * threads-dummy-types.h:
23150 * threads-pthread-types.c:
23151 * threads-pthread-types.h:
23152 * threads-pthread.c:
23153 * threads-pthread.h: Deleted obsolete files
23155 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
23157 * class.c (mono_class_vtable): runtime init the class when we
23158 allocate static class data.
23160 * icall.c (ves_icall_System_Array_SetValue): check for null values.
23162 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
23163 and String - but we will need generic marshalling support in the
23165 (mono_init): set the domain name in a ms compatible way
23167 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
23170 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
23172 * object.c (mono_array_clone): use alloca() instead of g_malloc
23175 * appdomain.c (mono_domain_unload): impl.
23177 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23179 * appdomain.c, object.c: fix intern pool implementation.
23180 * class.c: fix alignment code.
23182 2002-02-16 Radek Doulik <rodo@ximian.com>
23184 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
23185 and s2 > s1, just copy lower bytes to be compatible with little
23186 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
23187 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
23189 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
23190 force big_endian to be 1 for big endian machines
23191 (ves_icall_iconv_new_decoder): ditto
23193 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
23195 * socket-io.c (convert_sockopt_level_and_name): If the system
23196 doesn't define SOL_IP or SOL_TCP, get them by hand using
23197 getprotobyname() and caching the values (because this could be a
23199 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
23200 Use the appropriate struct when the system does support it. Ie,
23201 not all systems have struct ip_mreqn so use struct ip_mreq when
23204 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
23206 * reflection.c: handle finally clauses.
23208 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
23210 * socket-io.c: use g_snprintf() instead of snprintf.
23212 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
23214 * reflection.c (mono_param_get_objects): Cast second argument to
23215 mono_method_get_param_names to a const char** to silence the
23218 * appdomain.c (mono_domain_assembly_open): Put parens around the
23219 truth statement in the for-loop.
23221 * unicode.c (iconv_convert): Got rid of a compiler warning about
23222 int i being unused when the system has a new iconv.
23223 (iconv_get_length): Same.
23225 * image.c (load_class_names): Cast the second argument to
23226 g_hash_table_insert() to char* to hush compiler warnings about the
23228 (mono_image_open): Same here.
23230 * socket-io.c: Don't conditionally include sys/filio.h or
23231 sys/sockio.h here anymore since we now get them from
23232 io-layer/io-layer.h
23233 (inet_pton): If the system doesn't support inet_aton, implement
23234 using inet_addr and also #define INADDR_NONE if it isn't defined
23237 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
23239 * metadata.c, metadata.h: added function to get packing and size info
23241 * reflection.h, reflection.c: handle field RVA data. Save info about
23242 the table layout if needed. Assign typedef indexes to all the types
23243 before dumping the info about them to avoid forward reference problems.
23245 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
23247 * socket-io.c (convert_sockopt_level_and_name): ifdef
23248 SO_ACCEPTCONN because it is not defined on my system (old debian)
23250 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
23252 * opcode.c: use stddef.h to get NULL.
23254 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
23256 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
23257 for FIONBIO, FIONREAD and SIOCATMARK.
23258 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
23259 define INADDR_NONE and besides, inet_addr() is deprecated and
23260 should not be used. Use inet_pton() instead - it also has the
23261 added bonus that it can easily handle IPv6 addresses as well.
23262 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
23264 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
23266 * decimal.c: remove _MSC_VER conditional.
23268 2002-02-13 Dick Porter <dick@ximian.com>
23271 * icall.c: Internal calls for Blocking, Select, Shutdown,
23272 GetSocketOption and SetSocketOption
23274 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23276 * assembly.cs: better resolver: use it instead of some kludgy
23279 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
23281 * reflection.c: the best way to speed-up the compiler is to avoid
23284 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
23286 * class.c (mono_class_vtable): changed the object layout
23287 (obj->vtable->class).
23288 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
23290 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23292 * assembly.c: look for assemblies in the assembly dir, too.
23294 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23296 * class.c: fix thinko in mono_class_from_type().
23298 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23300 * exception.h, exception.c: added TypeLoadException.
23301 * object.h, object.c: added mono_array_clone ().
23302 * icall.c: handle throwOnError in AssemblyGetType().
23303 Added Array.Clone().
23304 * opcode.h, opcode.c: use a single value for the opcode val.
23305 Compile fix for non-gcc compilers.
23307 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
23309 * opcodes.c, opcodes.h: export interesting info about opcodes.
23311 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
23313 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
23316 * class.c (class_compute_field_layout): set element_class for enums
23317 (mono_class_create_from_typedef): set element_class for normal classes
23319 * icall.c (ves_icall_System_Enum_get_value): impl.
23321 * class.c (mono_class_create_from_typedef): do not set valuetype
23322 flag for System.ValueType and System.Enum
23324 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
23326 * unicode.c (iconv_convert): fix big endian problem.
23328 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23330 * class.c: add asserts if we are ever going to scribble over memory.
23331 * socket-io.c: not all systems have AF_IRDA defined.
23333 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
23335 * class.c (class_compute_field_layout): do not consider static
23336 fields to compute alignment
23338 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
23340 * appdomain.c (mono_appdomain_get): impl.
23341 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
23343 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
23345 * icall.c: ignore "file://" prefix when loading an assembly.
23347 2002-01-23 Dick Porter <dick@ximian.com>
23351 * Makefile.am: Added socket support
23353 2002-01-23 Miguel de Icaza <miguel@ximian.com>
23355 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
23356 code back. This should return the assemblies that are loaded by
23357 the runtime on behalf of an application domain.
23359 The current implementation is still broken, it just returns every
23360 assembly loaded, but until we get real applications domain this
23363 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
23365 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
23368 2002-01-23 Miguel de Icaza <miguel@ximian.com>
23370 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
23371 the mono_class_from_name lookup.
23372 (ves_icall_get_parameter_info): ditto.
23373 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
23375 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
23377 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
23379 * class.c: load also nested classes on class init.
23380 System.ValueType instance methods gets passed boxed
23381 values, unless methods in derived classed that get a pointer to the
23383 * icall.c: use better name parsing code in GetType().
23384 * image.c, image.h: add mono_image_loaded ().
23385 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
23386 * reflection.c, reflection.h: added mono_reflection_parse_type().
23388 2002-01-22 Veronica De Santis <veron78@interfree.it>
23390 * icall.c : Added mapping of internal calls for Manual and Auto reset events
23391 * threads.c : Added the implementation of internal calls for events
23392 * threads.h : Added prototypes of internal calls for events
23394 2002-01-21 Radek Doulik <rodo@ximian.com>
23396 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
23398 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
23400 * class.c (mono_class_init): set min_align to 1 (instead of 0)
23401 (mono_class_value_size): use min_align
23403 2002-01-20 Dick Porter <dick@ximian.com>
23406 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
23407 so it compiles on w32.
23409 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
23411 * metadata.c (mono_type_stack_size): impl.
23413 * class.c (mono_class_get_field): impl. memberref token
23415 2002-01-16 Veronica De Santis <veron78@@interfree.it>
23417 * icall.h : Added the internal calls mapping for CreateMutex_internal
23418 and ReleaseMutex_internal.
23419 * threads.h : Added the prototype of mutexes internal calls.
23420 * threads.c : Added the implementations of mutexes internal calls.
23422 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23424 * metaparse.h: removed unused file.
23425 * reflection.c, reflection.h: added stream_data_align () function
23426 to align data in streams and keep stream aligned. Add support for
23427 exception support in method headers.
23429 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
23431 * unicode.c: make iconv_convert () return the number of bytess written
23432 in the output buffer.
23434 2002-01-15 Dick Porter <dick@ximian.com>
23435 * threads.c: Make the runtime's idea of infinite timeouts coincide
23436 with the class library's
23438 Fix a particularly egregious bug in mono_thread_cleanup(). That
23439 code was so utterly bogus it must have been written on a Monday.
23441 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23443 * reflection.h: add subtypes field to TypeBuilder.
23444 * reflection.c: encode constants for literal fields.
23445 Handle subtypes. Fix user string token (and add a zero byte)
23448 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
23450 * class.c (mono_class_init): bug fix: assign slot numbers for
23453 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23455 * reflection.c: don't try to output a code RVA for abstract methods.
23456 Small fixes for method header format. Output parameter info to the
23457 ParamDef table. Save method overriding info to MethodImpl table.
23458 Fix property support. Allow typedef.extends to be a type in the
23460 * verify.c: fix off-by-one error.
23462 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
23464 * class.c: fix mono_class_from_mono_type () for szarray types.
23465 Remove unused cache check in mono_class_from_type_spec().
23466 * icall.c: *type_from_name () functions handle simple arrays and byref.
23467 * reflection.c: handle byref and szarray types. Handle methods without
23468 body (gets P/Invoke compilation working). Handle types and fields in
23470 * reflection.h: add rank to MonoTypeInfo.
23472 2002-01-10 Dick Porter <dick@ximian.com>
23474 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
23477 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23479 * icall.c: initialize class in type_from_handle ().
23480 Loop also in parent classes for get_method ().
23481 * reflection.c: properly encode class and valuetype types.
23482 Start on encoding TypeBuilder types. Handle fieldrefs.
23483 Use correct length when registering a user string.
23484 Handle ConstructorBuilder and MonoMethod in get_token ().
23485 Make mono_type_get_object () aware of cached types.
23486 * object.c: back out change to mono_string_new ().
23488 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
23489 * object.c: mono_string_new should return a NULL when the string
23490 passed in is NULL -- not try to deference it.
23492 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23494 * icall.c: hack to make IsSubType work for TypeBuilders.
23495 * reflection.c: emit constructors before methods.
23496 Retrieve param names in mono_param_get_objects().
23498 2002/01/05 Nick Drochak <ndrochak@gol.com>
23500 * Makefile.am: fix list of headers and sources so automake 1.5
23501 doesn't complain. Removed \# at end of list.
23503 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23505 * reflection.c: get token for a method ref. Set return type of
23506 constructor to void.
23507 * loader.c: debug message.
23508 * class.c: typo fix.
23510 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
23512 * icall.c: fix array init with rank > 1. FindMembers
23513 loops in parent class as well.
23514 * image.c: do not insert nested types in name cache.
23515 * reflection.c: warning fix.
23516 * reflection.h: add override method (for interface impl).
23518 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
23520 * metadata.c: fix customattr decoding.
23522 2001-12-21 Miguel de Icaza <miguel@ximian.com>
23524 * rawbuffer.cs: Added native Win32 implementation, avoids using
23525 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
23527 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
23529 * class.c: make the low-level routines handle the cache.
23531 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
23533 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
23535 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
23537 * class.c: fix mono_array_element_size() for objects.
23538 * class.h, class.c: add properties to MonoClass and load them
23540 * icall.c: check with isinst() when assigning a value to an array
23541 instead of requiring the classes to match exactly.
23542 Implemented icall for System.Type::GetType().
23543 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
23544 enums. Handle bindingflags when looking for methods and fields.
23545 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
23546 and mono_metadata_methods_from_property().
23547 * reflection.h, reflection.c: added structures for propreties,
23548 parameters and enums. Implemented mono_property_get_object() and
23549 mono_param_get_objects().
23551 2001-12-18 Dick Porter <dick@ximian.com>
23553 * file-io.c: Use mono_string_to_utf16() instead of
23554 mono_string_chars()
23556 * object.c: Added mono_string_to_utf16(), which copies the non
23557 NULL-terminated MonoString into a new double-null-terminated
23560 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
23562 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
23564 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
23566 * file-io.c: raise exceptions if handle is invalid.
23568 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
23570 * assembly.c: yet another check for mscorlib.
23571 * class.c, class.h: load nesting info for classes.
23572 * icall.c: many new functions to support the Reflection classes.
23573 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
23574 * reflection.h, reflection.c: mono_image_create_token(),
23575 mono_assembly_get_object(), mono_type_get_object(),
23576 mono_method_get_object(), mono_field_get_object(): methods to return
23577 objects that parallel the C representation of assemblies, types,
23580 2001-12-11 Dick Porter <dick@ximian.com>
23583 * file-io.c: Internal calls for file IO.
23585 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
23587 * tabledefs.h: missing FileAttributes.
23588 * verify.h, verify.c: use is_valid_string () to simplify and check for
23589 valid strings more correctly. Fix warnings and speeling.
23590 Check more tables: Filed, File, ModuleRef, StandAloneSig.
23591 Check code: branches, maxstack, method calls.
23593 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
23595 * object.c (mono_object_allocate): removed static, so that the jit
23596 can allocate value types.
23598 * icall.c (ves_icall_System_DateTime_GetNow): impl.
23600 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23602 * class.c: init enum types right away and register the
23603 token->MonoClass map in mono_class_create_from_typedef ().
23604 * verify.h, verify.c: first cut of the verifier.
23605 * pedump.c: add --verify switch to verify metadata tables.
23606 * tabledefs.h: add some missing enums.
23608 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
23610 * class.c (mono_install_runtime_class_init): impl.
23611 (mono_class_init): renamed mono_class_metadata_init to
23612 mono_class_init, also removed the metadata_inited flag
23614 * object.c (mono_object_isinst): use faster algorithm
23616 2001-11-30 Radek Doulik <rodo@ximian.com>
23618 * mono-endian.h: reverted last change
23619 added function prototypes
23621 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
23622 add mono-endian.c back
23624 * mono-endian.c: returned back, as Paolo pointed out, it's needed
23625 for unaligned access, I've mistaked it with endianess. I am
23627 (mono_read16): fix reverted endianess
23628 (mono_read64): ditto
23629 (mono_read32): ditto
23631 2001-11-30 Dick Porter <dick@ximian.com>
23633 * exception.c: Implement mono_exception_from_name()
23635 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23637 * metadata.h, metadata.c: remove params_size and locals_size and their
23638 calculation from the metadata code: they are only usefult to the
23641 2001-11-29 Radek Doulik <rodo@ximian.com>
23643 * object.c (mono_ldstr): swap bytes here, it's probably not the
23644 best place, but works for me now, I'll redo it once I know mono
23645 better, also note that I add PROT_WRITE and don't reset back, also
23646 note that it's only affects big endians, so x86 should be OK
23648 * mono-endian.h (read16): use just glib macros for both endians
23650 * mono-endian.c: removed as glib macros are used in in
23651 mono-endian.h so we don't need to care about endianess for read
23652 macros as glib does that for us already
23654 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
23656 * class.h, class.h: take minimum alignment into consideration so
23657 that the fields of a class remain aligned also when in an array.
23659 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23661 * loader.h, loader.c: add mono_method_get_param_names().
23662 * class.c: 0-init class fields.
23664 2001-11-26 Dick Porter <dick@ximian.com>
23668 * threads.c: New file that handles System.Threading on all platforms
23671 * object.h: Remove the synchronisation struct from MonoObject,
23672 replace it with a pointer that gets initialised on demand
23674 * Makefile.am: Replace all the system-specific threading code with
23675 a single file that uses the new wrapper library
23677 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
23679 * class.c, class.h: add mono_install_trampoline() so that the runtime
23680 can register a function to create a trampoline: removes the ugly
23681 requirement that a runtime needed to export arch_create_jit_trampoline.
23682 * object.h, object.c: added mono_install_handler() so that the runtime
23683 can install an handler for exceptions generated in C code (with
23684 mono_raise_exception()). Added C struct for System.Delegate.
23685 * pedump.c: removed arch_create_jit_trampoline.
23686 * reflection.c: some cleanups to allow registering user strings and
23687 later getting a token for methodrefs and fieldrefs before the assembly
23689 * row-indexes.h: updates and fixes from the new ECMA specs.
23691 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
23693 * class.h, class.c: add enum_basetype field to MonoClass.
23694 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
23695 to get index in the constant table reated to a field, param or
23697 * reflection.h, reflection.c: handle constructors. Set public-key and
23698 version number of the built assembly to 0.
23699 * row-indexes.h: update from new ECMA spec.
23701 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23703 * class.h, class.c: add a max_interface_id to MonoClass.
23704 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
23705 since it's used to do that. Added mono_type_type_from_obj().
23706 Make GetType() return NULL instead of segfaulting if the type was not
23707 found. Handle simple arrays in assQualifiedName.
23708 * object.h: add a struct to represent an Exception.
23709 * reflection.c: output call convention in method signature.
23710 Add code to support P/Invoke methods and fixed offsets for fields.
23712 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
23714 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
23716 * icall.c: use mono_array_addr instead of array->vector: fixes the
23717 reflection image writing.
23718 * reflection.c: init call convention byte to 0 in method signature.
23719 Encode the property signature. Don't output property-related methods
23720 twice. Really process the properties for a type (don't cast a field to
23721 a property, my mom always told me that).
23722 Fix 64 bit issues in pointer alignment in a different and more
23725 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
23727 * loader.h: Removed type class from MonoDefaults, added monotype
23729 * loader.c: Loaded MonoType, removed loading of Type
23731 * icall.c (my_mono_new_object): Now returns a System.MonoType,
23732 and fills in System.Type._impl with a RuntimeTypeHandle rather
23733 than the actual MonoClass *
23735 (ves_icall_type_from_handle): change from type_class to
23738 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
23741 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
23744 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
23746 (ves_icall_System_Reflection_Assembly_GetType): implemented
23748 (ves_icall_System_MonoType_assQualifiedName): implemented
23750 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
23752 2001-11-09 Miguel de Icaza <miguel@ximian.com>
23754 * assembly.c (mono_assembly_open): Implement a cache for the
23757 (mono_assembly_close): only destroy the assembly when the last
23760 2001-11-09 Dick Porter <dick@ximian.com>
23762 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
23764 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
23766 * class.c (mono_class_metadata_init): bug fix: compute the right slot
23768 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23770 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
23771 from Martin Weindel.
23772 * object.h: add mono_string_chars ().
23774 2001-11-07 Miguel de Icaza <miguel@ximian.com>
23776 * reflection.c (build_compressed_metadata): Eliminates warnings
23777 and uses 64-bit clean code.
23779 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
23780 (mono_type_equal): Change signature to eliminate warnings.
23782 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23784 * icall.c, loader.c: remove the internalcall array constructors.
23785 Changes to match the new MonoArray structure.
23786 * object.h, object.c: an array object doesn't allocate an extra
23787 vector. Add mono_array_new_full () to create jagged arrays easily.
23789 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23791 * metadata.h, metadata.c: add mono_metadata_field_info () to
23792 retreive all the info about a field from vairous tables.
23793 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
23794 * class.h, class.c: augment MonoClassField with more info.
23795 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
23796 policy and load a field's RVA if needed.
23798 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
23800 * class.c (mono_class_metadata_init): create a trampoline for all
23801 virtual functions instead of actually compiling them.
23803 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
23805 * class.h, class.c: include name in MonoClassField.
23806 * class.c: fix fundamental type of System.Object and System.String.
23807 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
23809 * icall.c: remove internalcalls for the Reflection stuff that is now
23811 * loader.c: mono_field_from_memberref () implementation.
23812 * mono-endian.c: thinko (s/struct/union/g).
23813 * object.c, object.h: make the mono_string_* prototypes actually use
23814 MonoString instead of MonoObject.
23815 * reflection.c, reflection.h: updates for changes in the reflection
23816 code in corlib: we use C structures that map to the actual C# classes.
23817 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
23818 fat method header if needed and use the info from the ILGenerator for
23819 methods. Handle fields in types. Misc fixes.
23821 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
23823 * class.c (mono_class_metadata_init): bug fix: always allocate
23824 space for static class data
23826 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
23828 * class.c (mono_compute_relative_numbering): use relative
23829 numbering to support fast runtime type checks.
23831 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
23833 * class.c (mono_class_create_from_typeref): added debugging output
23834 to print class name when MonoDummy is returned instead of real class
23836 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
23838 * class.c (mono_class_metadata_init): interface offset table now
23839 contains pointers into the vtable - this is more efficient for the jit
23841 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
23843 * class.c (mono_class_metadata_init): use a temporary vtable (the
23844 old algorithm only worked for the interpreter, but not for the jit)
23846 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
23848 * loader.c (method_from_memberref): use mono_class_get to get the
23849 class of an array instead of using System.Array directly.
23850 (mono_get_method): also add MEMBERREF methods to the method cache
23851 which usefull for arrays.
23853 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
23855 * pedump.c (arch_compile_method): added to compute vtable entry
23857 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
23858 number of interfaces.
23860 * class.h: merged MonoArrayClass into MonoClass
23862 * class.c (mono_class_create_from_typedef): compute the vtable size and
23863 allocate space to include the vtable inside MonoClass
23864 (mono_class_metadata_init): initialize the vtable
23866 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
23868 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
23869 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
23870 * image.c: endian fixes by Laurent Rioux.
23871 * object.h, object.c: rename MonoStringObject to MonoString and
23872 MonoArrayObject to MonoArray. Change some function names to conform to
23873 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
23874 guint16* as first argument, so don't use char*.
23875 Provide macros to do the interesting things on arrays in a portable way.
23876 * threads-pthread.c: updates for the API changes and #include <sched.h>
23877 (required for sched_yield()).
23878 * icall.c: updates for the API changes above.
23879 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
23880 platforms that need them.
23882 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
23884 * class.c: set the correct type for all the fundamental
23885 type when loading the class.
23887 2001-10-05 Dick Porter <dick@ximian.com>
23889 * threads-pthread.c (pthread_mutex_timedlock): Simple
23890 compatibility version for C libraries that lack this call.
23892 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23894 * class.c: MonoTypes stored in MonoClass are stored as
23895 fundamental MonoTypes when the class represents a
23896 fundamental type (System.Int32, ...).
23897 The TypeHandle return by ldtoken is a MonoType*.
23898 * icall.c: ves_icall_get_data_chunk () write out all the
23899 PE/COFF stuff. Implement ves_icall_define_method (),
23900 ves_icall_set_method_body (), ves_icall_type_from_handle ().
23901 * image.c: properly skip unknown streams.
23902 * loader.h, loader.c: add type_class to mono_defaults.
23903 * metadata.c, metadata.h: export compute_size () as
23904 mono_metadata_compute_size () with a better interface.
23905 Typo and C&P fixes.
23906 * pedump.c: don't try to print the entry point RVA if there is no entry point.
23907 * reflection.c, reflection.h: many cleanups, fixes, output method
23908 signatures and headers, typedef and typeref info, compress the metadata
23909 tables, output all the heap streams, cli header etc.
23910 * row-indexes.h: typo fixes.
23912 2001-10-04 Dick Porter <dick@ximian.com>
23914 * object.h: Add a synchronisation mutex struct to MonoObject
23916 * object.c (mono_new_object): Initialise the object
23917 synchronisation mutexes
23919 * icall.c: System.Threading.Monitor internal calls
23921 * threads-pthread.h:
23922 * threads-pthread.c: System.Threading.Monitor internal calls
23924 * threads-types.h: New file, includes the system-specific thread
23927 * threads-pthread-types.h:
23928 * threads-pthread-types.c: New files, handle pthread-specific
23929 synchronisation types
23931 * threads-dummy-types.h:
23932 * threads-dummy-types.c: New files of dummy support for
23933 thread-specific types
23937 * pedump.c: include mono-endian.h not endian.h
23939 * Makefile.am: More threads files.
23940 Name mono-endian.h not endian.h
23942 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
23944 * Makefile.am, reflection.h, reflection.c: move here the reflection related
23945 stuff and implement a few more bits.
23946 * icall.c: a field needs to be dereferenced twice. Do not use the same
23947 name for two variables in the same scope.
23948 * image.c, image.h: cleanups.
23950 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
23952 * class.c (mono_class_metadata_init): bug fix: compute the right size
23954 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
23956 * icall.c: implemented some of the Reflection internalcalls.
23957 * image.c, image.h: start writing out the PE/COFF image.
23958 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
23959 that does the reverse than decode_blob_size ().
23960 * object.c: use mono_metadata_encode_value (). Move here
23961 temporary implementation of mono_string_to_utf8 ().
23962 * rawbuffer.c: make malloc_map static.
23964 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23966 * metadata.c: fix type comparison for arrays.
23967 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
23968 Added a couple of new classes to monodefaults.
23969 * icall.c: added a couple of Reflection-related internalcalls.
23970 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
23971 Added a byval_arg MonoType to MonoClass.
23973 2001-09-28 Dick Porter <dick@ximian.com>
23976 * threads-pthread.h:
23977 * threads-pthread.c: Implemented internal calls for
23978 LocalDataStoreSlot operations. Applied mutexes around all shared
23979 data. Reworked the thread creation and Start() operations to
23980 avoid a race condition.
23983 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
23985 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
23987 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
23989 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
23991 * class.c, loader.c: warn and return NULL instead of erroring out.
23992 * icall.c: added System.AppDomain::getCurDomain().
23993 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
23995 2001-09-25 Dick Porter <dick@ximian.com>
23997 * threads-pthread.h:
23998 * threads-pthread.c: Implemented timed thread joining and added
23999 System.Threading.Thread::Join_internal internal call
24001 * icall.c: Added System.Threading.Thread::Join_internal internal call
24004 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
24006 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
24008 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
24009 mono_string_intern () to implement the semantics of the ldstr opcode
24010 and the interning of System.Strings.
24011 * icall.c: provide hooks to make String::IsIntern and String::Intern
24014 2001-09-23 Dick Porter <dick@ximian.com>
24017 * threads-dummy.h: New files of dummy threading routines
24019 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
24020 support code based on system specifics
24022 Rename PTHREAD_LIBS to THREAD_LIBS
24024 2001-09-23 Dick Porter <dick@ximian.com>
24026 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
24027 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
24029 (mono_thread_init): Set up a Thread object instance to return when
24030 the main thread calls Thread.CurrentThread
24031 (mono_thread_cleanup): Wait for all subthreads to exit
24033 * icall.c: New internal calls for System.Threading.Thread::Sleep
24034 (including Schedule) and CurrentThread
24036 * threads.h: New file, to insulate thread-specific stuff from the
24039 2001-09-21 Dick Porter <dick@ximian.com>
24041 * threads-pthread.h:
24042 * threads-pthread.c: New file, for handling pthreads-style
24043 threading support. Start() now starts a new thread and executes
24044 the ThreadStart delegate instance.
24046 * icall.c: Added the internalcall for
24047 System.Threading.Thread::Start_internal
24049 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
24051 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
24053 * loader.c: work around the different signatures for delegates
24054 constructors csc generates in compiled code vs the ones compiled in mscorlib.
24056 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24058 * class.h, class.c: add mono_class_get_field_from_name ().
24059 * *: Fix C comments and other ANSI C issues.
24061 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
24063 * endian.h, assembly.c: fix some endianness issues.
24065 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
24067 * loader.h, load.c: add delegate_class to mono_defaults.
24068 Handle runtime provided methods in mono_get_method ().
24070 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
24072 * loader.c (mono_get_method): use pinvoke for internal call
24074 * icall.c: use pinvoke for internal call
24076 * loader.c (method_from_memberref): set the method name
24078 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
24080 * metadata.c: help the compiler generate better code for
24081 mono_class_from_mono_type ().
24083 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
24085 * class.c (mono_class_metadata_init): delayed computing of the
24086 class size to mono_class_metadata_init ()
24088 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
24090 * class.c, class.h: add an interfaces member to MonoClass.
24091 * image.c, image.h: add assembly_name field to MonoImage
24092 from the assembly table.
24093 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
24095 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24097 * class.c: Handle Array in mono_class_from_mono_type ().
24098 * metadata.c, pedump.c: some endian fixes.
24100 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
24102 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
24103 * metadata.c: fix small problem introduced with the latest commit.
24105 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
24107 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
24108 We don't need a MonoMetadata pointer anymore to compare signatures in
24109 mono_metadata_signature_equal (), update callers.
24110 Reduced memory usage an number of allocations for MonoMethodHeader and
24111 MonoMethodSignature.
24113 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
24115 * metadata.c: added compare for szarray.
24117 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
24119 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
24120 and add a couple more types to it and mono_defaults. Give an hint on
24121 classes that need implementing in our corlib and are referenced
24124 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
24126 * class.h, class.c: keep track if a class is also an Enum.
24127 * loader.c: Implement a couple more types for use in libffi
24128 marshalling. Gives better diagnostics when failing to dlopen
24129 a library. Set method->klass for P/Invoke methods, too.
24131 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
24133 * class.c, class.h: add a MonoType this_arg to MonoClass that
24134 represents a pointer to an object of the class' type that
24135 can be used by the interpreter and later the type cache.
24136 Add best guess alignment info for valuetype objects.
24138 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
24140 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
24141 into MonoType: one less level of indirection and allocation and
24142 simplifies quite a bit of code. Added cache for MonoTypes that are
24143 used frequently, so that we don't need to allocate them all the time.
24145 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
24147 * class.c (mono_class_create_from_typedef): System.Enum is also a
24148 value type, although it does not derive from System.ValueType
24149 (maybe a bug in the ms compiler?)
24151 * metadata.c (mono_type_size): return the right size for value types
24153 * loader.c (mono_get_method): only initialize method header if not abstract
24155 * class.c (mono_class_from_mono_type): use mono_default values.
24157 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
24159 * *: use MonoClass pointers instead of <type_tokens>
24161 * class.h: new flag: metadata_inited.
24163 * class.c (mono_class_metadata_init): impl.
24164 (mono_class_instance_size): impl.
24165 (mono_class_data_size): impl.
24167 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
24169 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
24170 MonoClass now has the name and name_space fields.
24171 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
24172 mono_get_method () takes and optional MonoClass as argument.
24173 Removed mono_typedef_from_name() and added mono_class_token_from_name()
24174 instead that takes advantage of a map from class names to typedef
24175 tokens in MonoImage.
24177 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
24179 * metadata.c: zero is not a valid alignment boundary.
24180 Merge MONO_TYPE_VOID in default decoding code.
24182 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
24184 * image.h: merged MonoMetadata into MonoImage
24186 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
24187 identify the type of elements.
24189 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
24191 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
24192 * cil-coff.h: split MonoMSDOSHeader and add size info.
24193 * image.c: add some consistency checks.
24194 * metadata.c: fix row size computation: one programmer
24195 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
24196 add explanation for the locator routine.
24197 Fix decoding of size in method header.
24199 2001-08-20 Miguel de Icaza <miguel@ximian.com>
24201 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
24202 (g_concat_dir_and_file): Bring g_concat_dir_and_file
24203 function from gnome-libs. This uses the right path separator
24204 based on the OS, and also works around a bug in some systems where
24205 a double slash is not allowed.
24206 (default_assembly_name_resolver): Use g_concat_dir_and_file
24207 (mono_assembly_open): ditto.
24209 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
24211 * metadata.c (mono_metadata_signature_equal): impl.
24213 * *: void is now a realy MonoType (instead of using NULL)
24215 * metadata.c (do_mono_metadata_parse_type): use
24216 mono_metadata_parse_type to parse void value.
24218 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
24220 * metadata.c, metadata.h: in the signature and method header store
24221 only the space required for holding the loca vars and incoming arguments.
24223 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
24225 * metadata.c (do_mono_metadata_parse_type): treat void like any
24226 other type (instead of assigning NULL);
24228 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
24230 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
24232 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
24234 * image.c (do_mono_image_open): added a cache for arrays.
24236 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24238 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
24239 decode a single column from a row in a metadata table and changes
24240 to take advantage of it in the typedef locator (gives a nice speed up).
24241 Store offset info for function params.
24243 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
24245 * image.h (MONO_IMAGE_IS_CORLIB): removed
24247 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
24249 * assembly.c: how could mono_assembly_close () had ever worked?
24250 * metadata.c, metadata.h: provide offset info for local vars.
24251 Implement mono_type_size () to take care of alignment as well
24252 as size (it was mono_field_type_size in cli/class.c before).
24254 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
24256 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
24258 * assembly.h (CORLIB_NAME): set to corlib.dll
24260 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
24262 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24264 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
24265 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
24266 tokentype.h: massive namespace cleanup.
24268 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24270 * metadata.h, metadata.c: decode exception clauses when parsing method header.
24272 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
24274 * metadata.c (mono_metadata_free_type): added check for type !=
24275 NULL (void) before calling mono_metadata_free_type()
24277 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
24279 * metadata.h, row_indexes.h: added header with enumerations to use
24280 to index in the columns from tables in metadata and to decode coded
24281 tokens: we should start using this instead of embedding magic numbers
24284 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
24286 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
24287 Move metadata_t info from cli_image_info_t to MonoImage, where
24288 it's easily accessible. Changed all the uses accordingly.
24289 Added the method and class caches to MonoImage.
24290 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
24291 and mono_metadata_decode_value () signature to be more consistent
24292 with the other parse functions (and simplify code). Taken advantage
24293 of zero-length array allocation with GCC. Removed reduntant (and
24294 wrong) MonoFieldType struct and use MonoParam instead. Changed
24295 mono_metadata_parse_field_type () to use common code for parsing.
24296 Added mono_metadata_typedef_from_field () and
24297 mono_metadata_typedef_from_method () to lookup a typedef index from a
24298 field or method token.
24299 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
24301 2001-07-23 Miguel de Icaza <miguel@ximian.com>
24303 * metadata.c (mono_metadata_parse_field_type): Implement.
24304 (do_mono_metadata_parse_type): Split engine from
24305 mono_metadata_parse_type, so that we can create smaller structures
24306 for things that just have one pointer to the MonoType (look at
24309 2001-07-20 Miguel de Icaza <miguel@ximian.com>
24311 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
24312 as Jan Gray found out, it is incorrect.
24314 2001-07-18 Miguel de Icaza <miguel@ximian.com>
24316 * assembly.c: Implement asssembly loading. This loads an image
24317 and loads all the referenced assemblies. Come to think of it, we
24318 could always do lazy loading of the assemblies.
24320 * image.c (mono_image_open): Keep loaded images in a hashtable.
24322 * image.h (MonoImage): Add reference count.
24324 2001-07-17 Miguel de Icaza <miguel@ximian.com>
24326 * assembly.c (mono_assembly_open): Keep track of the file name in
24327 case the assembly has no ASSEMBLY table.
24329 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
24332 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
24334 * metadata.c, metadata.h: decode local vars in method header
24335 parse function. Change callers accordingly.
24337 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
24339 * metadata.h, cil-coff.h: protect against multiple inclusion.
24340 Added some new structures to hold information decoded from metadata:
24341 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
24342 and relevant decoding/free functions.
24343 * metadata.c: implement decoding functions. Add warning for out of bounds
24344 index in mono_metadata_locate(). Implement mono_get_method () to retreive
24345 all the info about a method signature and invocation. Remove check on
24346 uninitialized local var in parse_mh() and fix memory leak.
24348 2001-07-12 Miguel de Icaza <miguel@ximian.com>
24350 * metadata.h: More macros.
24352 * tokentype.h: New file.
24354 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
24356 * assembly.c: added a consistency check and initialize
24357 some structures with g_new0().
24358 * metadata.c: fixed a couple more bugs in table size computation
24359 and add other checks for out-of bound access to metadata.
24361 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
24363 * metatada.c: fix bugs computing table sizes. Spew a
24364 warning when index in string heap is out of bounds.
24366 2001-07-04 Miguel de Icaza <miguel@ximian.com>
24368 * metadata.h: Add a couple of macros to manipulate tokens.
24370 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24372 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
24373 cli_section_tables).
24375 2001-07-01 Miguel de Icaza <miguel@ximian.com>
24377 * metadata.c (mono_metadata_user_string): New function, provides
24378 access to the UserString heap.
24380 2001-06-27 Miguel de Icaza <miguel@ximian.com>
24382 * metadata.c: Add inline documentation.
24384 2001-06-26 Miguel de Icaza <miguel@ximian.com>
24386 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
24389 2001-06-22 Miguel de Icaza <miguel@ximian.com>
24391 * typeattr.h: New file, TypeAttribute flags.
24393 2001-06-21 Miguel de Icaza <miguel@ximian.com>
24395 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
24396 mono_assembly_ensure_section): Section loading code.
24397 (load_section_tables): Load the sections.
24399 * mono/metadata/metadata.c (mono_metadata_locate_token,
24400 mono_metadata_locate): Functions to locate the information
24401 definition given a token or a table and an index.
24402 (mono_metadata_compute_table_bases): New.
24403 (compute_size): New function to compute the sizes of the various
24406 * mono/metadata/metadata.h: Finish listing the different index
24409 * mono/metadata/pedump.c: Improve to dump new information.
24411 2001-06-19 Miguel de Icaza <miguel@ximian.com>
24413 * mono/metadata/metadata.c: Entered all the tables matching
24416 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2