1 2007-11-07 Massimiliano Mantione <massi@ximian.com>
3 mono_generic_class_get_class: hook profiler events.
4 mono_field_get_offset: added to support heap-shot in the new profiler.
5 *class.h: exported mono_field_get_offset.
7 mono_reflection_setup_internal_class: hook profiler events.
9 2008-01-20 Zoltan Varga <vargaz@gmail.com>
11 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
12 argument here too and use it to avoid checking for pending exceptions if
15 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
17 * assembly.c (build_assembly_name): add arg for passing the assembly
18 flags. Do not consider a PublicKey with value "null" valid.
19 (mono_assembly_name_parse_full): added boolean argument that will be
20 set if the assembly name contains a PublicKeyToken spec. Added support
21 for the Retargetable spec for which only Yes or No are allowed as valid
22 value. Consider assembly name invalid if Retargetable spec is set, but
23 either version, culture or public key (token) are not specified.
24 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
25 with implementation in assembly.c.
26 * icall.c (fill_reflection_assembly_name): also copy assembly flags
27 from MonoAssemblyName.
28 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
29 introduced argument for mono_assembly_name_parse_full to know if the
30 assembly name has a PublicKeyToken spec, and if it has instruct
31 fill_reflection_assembly_name to use default value for keyToken (if
32 PublicKeyToken is null).
34 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
36 * verify.c (mono_method_verify): fixed ovf ops with
37 float values. They are unverifiable now.
39 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
41 * class.c (set_failure_from_loader_error): add BadImageException to the
42 list of exceptions that can cause a type to fail to load.
44 * class.c (mono_class_get_exception_for_failure): same.
46 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
48 * verify.c (in_any_exception_block): added, check if offset
49 is part of any exception handling clause.
51 * verify.c (get_stack_type): added VAR and MVAR types.
53 * verify.c (do_stobj): better error messages.
55 * verify.c (do_cpobj): added, check cpobj.
57 * verify.c (do_initobj): added, check initobj.
59 * verify.c (do_sizeof): added, check sizeof.
61 * verify.c (do_localloc): added, check localloc.
63 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
65 2008-01-17 Zoltan Varga <vargaz@gmail.com>
67 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
68 save_lmf/restore_lmf opcodes.
70 * threads.c (mono_threads_install_notify_pending_exc): New function to
71 install a callback notifying the JIT there is a pending exception on a thread.
72 (mono_thread_request_interruption): Call the new callback.
73 (mono_thread_get_and_clear_pending_exception): New function to return the
74 exception pending on a thread.
76 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
77 to turn off checking for pending exceptions.
78 (mono_marshal_get_native_wrapper): Ditto.
80 2008-01-16 Zoltan Varga <vargaz@gmail.com>
82 * threads-types.h: Get rid of the unnecessary extern declarations.
84 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
86 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
87 return field from parent class if not private.
88 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
89 returns fields from parent class if they are not private.
90 (method_nonpublic): added function to determine if a given method
91 should be considered non-public. Returns false for private methods
92 on parent class, and internal methods from parent on the 1.0 profile.
93 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
94 use method_nonpublic function to determine whether method should be
96 (property_accessor_public): use newly introduced method_nonpublic
97 function to determine whether accessor is non-public.
98 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
99 event from parent class if not private. Only return static event if
100 Static flag is set, and only return static event from parent class if
101 FlattenHierarchy flag is set.
102 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
103 include non-private events from parent class.
105 2008-01-16 Zoltan Varga <vargaz@gmail.com>
107 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
110 2008-01-16 Wade Berrier <wberrier@novell.com>
112 * security.c: Add assembly.h header to appease some warnings
114 2008-01-16 Dick Porter <dick@ximian.com>
116 * process.c (process_module_string_read): Remove trailing null
119 2008-01-16 Mark Probst <mark.probst@gmail.com>
121 * class-internals.h: A new data structure describing the layout of
122 a runtime generic context (MonoRuntimeGenericContextTemplate).
124 * metadata-internals.h: Added a hash table to MonoDomain that maps
125 from open generic classes to their runtime generic context
128 * object.c: Building of the runtime generic context, including
129 proper handling of generic type arguments of superclasses.
130 Building of the runtime generic context according to the template.
132 2008-01-15 Zoltan Varga <vargaz@gmail.com>
134 * class.c (mono_class_setup_fields): Set field.count for generic instances.
137 * image.c (do_mono_image_open): Pass TRUE as last_exists to
138 mono_portability_find_file (). Fixes #325466.
139 (mono_image_get_public_key): Fix a warning.
141 2008-01-14 Zoltan Varga <vargaz@gmail.com>
143 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
145 (mono_class_from_name_case): Ditto.
147 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
149 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
150 common storage for the tables used in the System/NumberFormatter class.
152 2008-01-13 Zoltan Varga <vargaz@gmail.com>
154 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
156 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
158 * verify.c (get_boxable_mono_type): check if the token is valid.
160 * verify.c (set_stack_value): changed to add an error if an
161 invalid type is set on stack. Changed all callers due to signature change.
163 * verify.c (do_stobj): implement stobj validation.
165 2008-01-11 Zoltan Varga <vargaz@gmail.com>
167 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
168 set container->is_method, it was set earlier.
170 * metadata.c (type_in_image): Handle MVARs which belong to not finished
173 * reflection.c (mono_reflection_initialize_generic_parameter): Set
174 is_method of the generic container to TRUE for methods.
176 2008-01-10 Zoltan Varga <vargaz@gmail.com>
178 * metadata.c (type_in_image): Handle type parameters properly.
180 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
181 memory ownership of this structure.
183 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
185 * verify.c (get_boxable_mono_type): make typedref types been just
186 unverifiable. check for void type.
188 * verify.c (do_unbox_any): added, verify opcode unbox.any.
190 * verify.c (do_load_function_ptr): accept method spec tokens.
192 2008-01-10 Zoltan Varga <vargaz@gmail.com>
194 * marshal.c (mono_class_native_size): Always set *align even if this is called
197 2008-01-09 Zoltan Varga <vargaz@gmail.com>
199 * verify.c (mono_verify_corlib): Remove this as it was not used and was
202 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
204 * verify.c: removed some old unused tables. A huge bunch of small fixes
205 to things found while testing the verifier with mono basic.
207 * verify.c (dump_stack_value): dump null literal flag to.
209 * verify.c (verify_type_compatibility_full): fix comparison
210 for types that have a generic super type.
212 * verify.c (verify_stack_type_compatibility): fix compatibility
213 between null literals and reference types. fix compatibility between
214 boxed valuetypes and object. fix corner case test for enums.
216 * verify.c (do_cmp_op): proper verification of cgt.un in case
219 * verify.c (do_invoke_method): fix error message.
221 * verify.c (do_store_indirect
223 * verify.c (check_is_valid_type_for_field_ops): proper verification
224 of managed pointers to valuetypes and boxed valuetypes. proper verification
227 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
228 allow token to be a reference type.
230 * verify.c (do_cast): proper handling of boxes valuetypes.
232 * verify.c (do_stelem): proper handling of storing a boxed valuetype
235 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
236 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
237 fixed the decoding of unbox_any
239 2008-01-08 Zoltan Varga <vargaz@gmail.com>
241 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
243 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
245 * verify.c (do_newobj): do delegate verification.
247 * verify.c (verify_delegate_compatibility): perform delegate
250 * verify.c (verify_ldftn_delegate): perform tests related to
253 * verify.c (mono_delegate_signature_equal): perform the
254 slightly diferent signature comparison required by delegates.
256 * metadata.c (mono_metadata_type_equal_full): added and exported
257 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
258 allows signature only comparison.
260 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
263 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
265 * verify.c: added a bunch of stack_slot_* functions to
266 make access to stack slot type easier. This is required to
267 allow optional flags, like null literal, boxed value and
269 All access paths to IlStackDesc::stype have been changed
270 to use these new funcions.
271 Removed a bunch of unused functions and cleared all warnings.
272 This patch introduces the usage of the this pointer and
275 2008-01-07 Zoltan Varga <vargaz@gmail.com>
277 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
279 2008-01-06 Zoltan Varga <vargaz@gmail.com>
281 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
282 match managed version.
284 * appdomain.c: Bump corlib version.
286 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
289 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
291 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
292 Set public key token to zero-length byte array if assembly is not
295 2008-01-05 Zoltan Varga <vargaz@gmail.com>
297 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
298 writing a vtype array elem.
300 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
302 * assembly.c (build_assembly_name): return FALSE if length of token is
303 not 16 (if not "null").
304 (mono_assembly_name_parse_full): return FALSE if value of version,
305 culture, token or key is 0.
306 * icall.c (fill_reflection_assembly_name): add boolean arguments to
307 specify whether public key and public key token must be set to default
308 value (zero-length byte array) if not available. Set versioncompat to
309 SameMachine. If public key is available or the default is set, then
311 (ves_icall_System_Reflection_Assembly_FillName): if no public key
312 is available, use empty byte array as default value. On the 2.0
313 profile, use default value for public key token if not set.
314 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
315 profile, use default value for public key if not set. On the 2.0
316 profile, use default value for public key token if not set.
317 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
318 default values for public key and public key token.
320 2008-01-05 Zoltan Varga <vargaz@gmail.com>
322 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
323 field to keep it in synch with the managed object.
325 * marshal.c (emit_marshal_object): Add support for byref marshalling of
326 delegates. Fixes #351520.
328 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
329 contains defined memory.
331 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
333 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
335 * sgen-gc.c (check_consistency): New helper function to do a consistency check
336 of the GC data structures.
338 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
340 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
342 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
344 (mono_array_clone_in_domain): Ditto.
345 (mono_array_clone_in_domain): Ditto.
347 * threads.c (start_wrapper): Register the thread start argument as a GC root.
348 (cache_culture): Use a write barrier.
350 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
351 (ves_icall_get_property_info): Ditto.
353 * object.h (MONO_STRUCT_SETREF): New macro.
355 * class-internals.h (MonoStats): Add some GC statistics.
357 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
359 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
361 * exception.c (mono_exception_from_name_two_strings):
362 Break from loop after method is found.
364 2008-01-04 Dick Porter <dick@ximian.com>
366 * process.c (process_module_string_read): Rename variable to
367 reflect correct usage, after fixing bug 345972.
369 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
371 * verify.c (mono_type_create_fnptr_from_mono_method):
372 created a MonoType function pointer instance to be used during
373 verification. The verifier releases this memory at end.
375 * verify.c (mono_method_is_constructor): extracted repeated
376 checks for constructor into a single class.
378 * verify.c (do_push_field): use new extracted method
379 for constructor check.
381 * verify.c (do_newobj): same.
383 * verify.c (do_ldftn): renamed to do_load_function_ptr
384 and make it verify ldvirtftn too.
386 * verify.c (mono_method_verify: proper verification
387 of ldvirtftn. release created MonoMethod instances.
389 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
391 * verify.c (token_bounds_check): added.
393 * verify.c (do_ldftn): added.
395 * verify.c (mono_method_verify): proper verificartion of ldftn.
397 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
399 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
400 than the table row count. It's the resposibility of the caller to
401 make the bounds check and raise the correct error.
403 * metadata.c (mono_metadata_decode_row_col): Same.
405 * loader.c (mono_get_method_from_token): perform bounds check
406 on token for methoddef table.
408 2007-12-29 Miguel de Icaza <miguel@novell.com>
411 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
412 assert into a negative result, the managed code already coped with
415 Some folks on Windows reported this error.
417 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
419 * appdomain.c: Bump corlib version.
421 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
422 CultureInfo.CreateCulture to create CultureInfo for name.
423 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
424 create CultureInfo for name. Fixes bug #347174.
426 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
428 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
431 * verify.c (is_valid_branch_instruction): allow branching to the
432 first instruction of the protected block.
434 * verify.c (is_valid_cmp_branch_instruction): same.
436 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
437 avoid double initialization.
439 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
440 detect which cases the eval stack should just be copied.
442 * verify.c (mono_method_verify): check if the eval stack
443 is empty when entering a protected block.
445 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
447 * verify.c: added is_clause_in_range, is_clause_inside_range,
448 is_clause_nested and verify_clause_relationship. They perform
449 the verifications stated in P1 12.4.2.7.
451 * verify.c (mono_method_verify): remove some unused variables,
452 add the new exception clause checks, add instruction border
453 checks for protected block start/end, improved some error
454 messages and fixed a bug in the way invalid instruction access
457 2007-12-26 Zoltan Varga <vargaz@gmail.com>
459 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
460 from GC 7.0 if available.
462 * object.c: Remove an unused define.
464 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
466 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
468 * null-gc.c (mono_gc_make_descr_for_array): Implement.
470 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
472 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
473 to take the same arguments as the other make_descr functions.
475 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
477 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
480 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
483 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
486 * boehm-gc.c (mono_gc_register_root): Fix a warning.
488 * null-gc.c (mono_gc_register_root): Fix a warning.
490 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
492 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
493 (mono_gc_base_init): Call GC_init ().
495 * null-gc.c: Define mono_gc_register_root () as a no-op.
497 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
499 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
501 * verify.c: add prototype for merge_stacks at top
503 * verify.c (do_switch): added.
505 * verify.c (merge_stacks): on some cases the stack merging
506 was not happening properly. Unequal stack sizes at merge
507 points should be invalid.
509 * verify.c (mono_method_verify): added more debug info on stack state.
510 verify switch properly.
512 2007-12-24 Zoltan Varga <vargaz@gmail.com>
514 * method-builder.h: New file, moved the mono_mb_ declarations here from
517 * boehm-gc.c marshal.c: Include method-builder.h.
519 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
521 * marshal.c: Remove some code which is now in method-builder.c.
523 2007-12-23 Zoltan Varga <vargaz@gmail.com>
525 * method-builder.c: New file, extraction of the method builder functionality
528 * marshal.c: Move the mb functions into method-builder.c.
530 * marshal.h marshal.c: Export some mono_mb_... functions.
532 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
534 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
537 * class.c (mono_class_get_full): Check the token type in the dynamic case.
539 * loader.c (mono_field_from_token): Ditto.
541 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
544 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
547 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
548 a helper function for setting it.
550 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
553 * assembly.c: Significally simplify code now that referenced assemblies are
554 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
556 * threads.h: Don't include the internal threads-types.h header file. Fixes
559 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
561 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
562 instructions that were target of branches or are at protected block boundaries.
564 * verify.c (in_same_block): handle filter clauses.
566 * verify.c (is_valid_branch_instruction): added. checks the target of
567 instructions br or brtrue/false.
569 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
570 binary branch instructions such as beq and bge.
572 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
573 and made it pin the instruction as been part of the exception block.
575 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
578 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
581 * verify.c (do_ret): ret from a protected block is unverifiable and
584 * verify.c (do_static_branch): verify br and br.s instructions.
586 * verify.c (merge_stacks): add extra param to support detection
587 of branches in the middle of instructions.
589 * verify.c (mono_method_verify): verify branches and exception blocks
590 that target the middle of instructions. Proper verification of br and br.s.
592 2007-12-21 Zoltan Varga <vargaz@gmail.com>
594 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
595 skip_visibility field.
596 (reflection_methodbuilder_from_dynamic_method): Ditto.
598 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
599 registrations. Fixes #348193.
601 * threads.h: Move the internal mono_thread_get_pending_exception () to
602 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
604 2007-12-20 Zoltan Varga <vargaz@gmail.com>
606 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
607 icall registration. Fixes #348193.
609 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
610 for corlib classes into object. Fixes #349621.
612 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
614 * icall.c (property_accessor_nonpublic): new function to determine
615 whether an accessor allows a property to be considered non-public.
616 Returns false for private accessor(s) from parent class, and internal
617 accessor(s) from parent on 2.0 profile (and higher).
618 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
619 to determine whether property should be included if NonPublic flag
620 is set. Fixes bug #349078.
622 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
624 * verify.c (init_stack_with_value): added.
626 * verify.c (mono_method_verify): extracted common
627 code for exception initialization into init_stack_with_value.
629 * verify.c (mono_method_verify): initialize the exception
630 for handler clauses as well.
632 * verify.c (mono_method_verify): fix the exception clause
633 ordering rules, it should use handler end offset and not
636 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
638 * rawbuffer.c: remove useless warning.
640 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
642 * threads.h, threads-types.h: move functions to the correct header
645 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
647 * verify.c (mono_method_verify): proper verification
648 of exception handling clauses ranges and fallthru in
649 and out of protected blocks.
651 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
653 * verify.c (mono_method_verify): fixed compilation issue.
655 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
657 * verify.c (mono_method_verify): a printf slipped in, changed
658 to use verifier debug macro.
660 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
662 * verify.c (is_correct_leave): check for filter clauses.
664 * verify.c (do_filter): added.
666 * verify.c (mono_method_verify): property verification of leave.
669 2007-12-18 Mark Probst <mark.probst@gmail.com>
671 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
672 Win32 build, until we figure out how to do the proper thing on
675 2007-12-17 Zoltan Varga <vargaz@gmail.com>
677 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
678 by the previous patch.
680 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
681 the assembly resolve handler for refonly assemblies.
683 2007-12-17 Mark Probst <mark.probst@gmail.com>
685 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
686 Make sure only one thread is allowed to commence shutdown, and
687 don't allow new threads to be started once shutdown is in
690 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
692 * verify.c (is_correct_endfilter): added.
694 * verify.c (is_unverifiable_endfilter): added.
696 * verify.c (do_endfilter): added.
698 * verify.c (mono_method_verify): property verification of endfilter
699 and fixed a corner case or endfinally.
701 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
703 * verify.h: new flags to support fail fast of unverifiable code and
704 do non-strict verification. Non-strict verification is required to
705 have MS runtime compatibility. There are a huge amount of unverifiable
706 code that it accepts as verifiable. The strict mode verifies the code
708 Non-strict mode will be required in cases where code needs to be
709 accepted as verifiable but fails under strict mode.
711 * pedump.c: added support to fail fast and non-strict verification.
713 * verify.c: added support for both fail fast and non-strict verification.
715 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
717 * verify.c (is_correct_endfinally): added.
719 * verify.c (mono_method_verify): property verification of endfinally.
721 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
723 * verify.c (in_any_block): check for filter clauses.
725 * verify.c (is_correct_rethrow): added.
727 * verify.c (mono_method_verify): property verification of rethrow.
729 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
731 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
733 * verify.c (do_throw): added.
735 * verify.c (mono_method_verify): property verification of throw
737 2007-12-11 Zoltan Varga <vargaz@gmail.com>
739 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
740 assemblies. Fixes #346425.
742 2007-12-10 Zoltan Varga <vargaz@gmail.com>
744 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
747 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
749 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
750 prevent asserts when this is called with a token which might not be valid.
752 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
753 lookup_dynamic_token_class with valid_token == FALSE.
755 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
757 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
759 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
761 2007-12-10 Mark Probst <mark.probst@gmail.com>
763 * gc.c: Don't delay threadpool thread finalization unless Mono is
766 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
768 * threads.c: turn an assert into a non-fatal warning.
770 2007-12-09 Robert Jordan <robertj@gmx.net>
772 * icall.c (GetVirtualMethod): Add missing argument validation.
774 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
776 * verify.c (do_cast): added.
778 * verify.c (mono_method_verify): property verification of castclass and isinst.
781 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
783 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
785 * verify.c (do_stelem): added.
787 * verify.c (mono_method_verify): property verification of stelem.X.
789 2007-12-07 Mark Probst <mark.probst@gmail.com>
791 * class.c, class-internals.h: Introduce an environment variable
792 (MONO_GENERIC_SHARING) through which the extent of generic code
793 sharing can be controlled (share all classes, share only corlib
794 classes, or share nothing).
796 * object.c: Only create runtime generic context for classes for
797 which sharing is enabled.
799 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
801 * verify.c (do_ldelem): refactor it to work with ldelem.any.
803 * verify.c (mono_method_verify): property verification of ldelem.any.
805 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
807 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
808 added ldelem.X opcodes.
810 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
812 * verify.c: proper verification of ldelem.X
814 2007-12-06 Zoltan Varga <vargaz@gmail.com>
816 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
818 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
820 * verify.c (mono_method_verify): null literal requires special handling,
821 the value pushed on stack need to be flagged as so.
823 * verify.c (do_ldelema): Verify ldelema properly.
825 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
827 * verify.c: Verify ldlen properly.
829 2007-12-05 Zoltan Varga <vargaz@gmail.com>
831 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
832 to the target object's type. Fixes #346160.
834 2007-12-05 Dick Porter <dick@ximian.com>
836 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
837 Solaris needs the same workaround as BSD-derived systems. Fixes
838 bug 323524, patch by Burkhard Linke
839 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
841 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
843 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
844 handle to use when error dialog is shown; otherwise, update mask
845 to show no error dialog when an error occurs.
847 2007-12-03 Zoltan Varga <vargaz@gmail.com>
849 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
851 * class.c (mono_class_get_field_default_value): New helper function to initialize
852 field->def_type and field->data.
854 2007-11-30 Zoltan Varga <vargaz@gmail.com>
856 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
859 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
861 * marshal.c: Avoid depending on delegate->method_info being set.
863 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
865 * object.c (mono_delegate_ctor): Set delegate->method.
867 * object-internals.h (struct _MonoDelegate): Add 'method' field.
869 * appdomain.c: Bump corlib version.
871 2007-11-27 Raja R Harinath <harinath@gmail.com>
873 * metadata.c (mono_generic_inst_equal_full): Short-circuit
874 equality check if we're comparing canonicalized MonoGenericInsts.
876 2007-11-23 Zoltan Varga <vargaz@gmail.com>
878 * class.c (generic_array_methods): Call mono_class_setup_methods () before
879 accessing class->methods.
881 2007-11-22 Dick Porter <dick@ximian.com>
883 * threads.c: Ensure that the synch_cs is set before trying to use
886 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
888 * profiler.c: r89126 broke the statistial profiler, unbreak.
890 2007-11-22 Martin Baulig <martin@ximian.com>
892 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
895 (mono_debug_debugger_version): Bump to 3.
896 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
897 -> mono_debugger_class_initialized().
899 * mono-debug-debugger.c
900 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
903 (mono_debugger_start_class_init_func): Removed.
904 (mono_debugger_class_loaded_methods_func): Added.
905 (mono_class_setup_methods): Call it here.
907 2007-11-22 Martin Baulig <martin@ximian.com>
910 (mono_debug_add_delegate_trampoline): New public method.
911 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
914 (MonoSymbolTable): Added `global_data_table'.
915 (MonoDebuggerTypeKind): Removed.
917 2007-11-21 Zoltan Varga <vargaz@gmail.com>
919 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
922 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
924 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
926 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
928 2007-11-20 Martin Baulig <martin@ximian.com>
930 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
932 * mono-debug-debugger.c
933 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
934 (mono_debugger_remove_breakpoint): Likewise.
935 (mono_debugger_check_breakpoints): Likewise.
936 (mono_debugger_register_class_init_callback): New public method.
937 (mono_debugger_remove_class_init_callback): Likewise.
938 (mono_debugger_add_type): Likewise.
940 * mono-debug-debugger.h
941 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
943 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
945 * class.c: more interface implementations needed for the
946 array enumerator (fixes bug #341112).
948 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
950 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
951 fix ParamName of ArgumentNullExceptions.
953 2007-11-17 Miguel de Icaza <miguel@novell.com>
955 * reflection.c (mono_reflection_encode_sighelper): Generate the
956 modopts and modreqs. I have a useless test that crashes monodis,
957 but that shows the code working.
959 2007-11-17 Zoltan Varga <vargaz@gmail.com>
961 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
962 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
964 2007-11-15 Dick Porter <dick@ximian.com>
966 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
967 When joining a thread, it's the thread that's calling Join that
968 gets WaitSleepJoin state not the target. Fixes the standalone
969 test case in bug 334740, and hopefully the whole bug too.
971 2007-11-15 Dick Porter <dick@ximian.com>
973 * process.c: Read file version info from the files pointed at by
974 process modules, not the current process. Fixes bug 315969.
976 Use windows typedef names in some places to fix warnings on the
979 2007-11-15 Mark Probst <mark.probst@gmail.com>
981 * image.c, metadata-internals.h: Added a generic_class_cache hash
982 to MonoImage for looking up generic classes when sharing generics.
984 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
986 * sgen-gc.c: warning cleanups.
988 2007-11-15 Zoltan Varga <vargaz@gmail.com>
990 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
991 inherited properties.
993 2007-11-14 Mark Probst <mark.probst@gmail.com>
995 * object.c, class-internals.h: Added more information to the
996 runtime generic context.
998 2007-11-13 Zoltan Varga <vargaz@gmail.com>
1000 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
1001 instead of just the target method. Generalize the abstract method handling to
1002 handle any non-static method.
1004 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
1005 mono_marshal_get_delegate_invoke () signature change.
1007 2007-11-13 Mark Probst <mark.probst@gmail.com>
1009 * class.c, class-internals.h: Made
1010 mono_type_get_basic_type_from_generic () public. Fixed member
1011 access check for shared generics.
1013 * loader.c: Don't insert field into field cache if it's part of a
1014 non-inflated generic class.
1016 * domain.c, domain-internals.h: The generic sharing context is now
1017 part of the jit info data structure. Added two accessor
1020 2007-11-12 Zoltan Varga <vargaz@gmail.com>
1022 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
1023 the array Get/Set/Address methods, since the JIT inlines them.
1025 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
1027 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
1028 (mono_image_init): Initialize runtime_invoke_direct_cache.
1030 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
1031 mono_marshal_get_delegate_invoke signature change.
1033 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
1034 an additional argument. Add support for invoking abstract methods.
1036 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
1038 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
1040 2007-11-09 Mark Probst <mark.probst@gmail.com>
1042 * class.c: Do field layout for open generic classes as well.
1044 2007-11-09 Mark Probst <mark.probst@gmail.com>
1046 * gc.c, gc-internal.h: Don't finalize threadpool threads with
1047 other objects, because the threadpool is still around. Put them
1048 in a list instead and after finalizing all other objects in the
1049 root domain shut down the thread pool and then finalize the
1050 threads. Fixes bug #337383.
1052 * threads.c, thread-types.h: New mono_thread_create_internal()
1053 function for marking a thread with the threadpool flag before it
1054 started. Set synch_cs to NULL after freeing it.
1056 * threadpool.c: Mark threadpool threads before they start.
1058 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
1060 * reflection.h, reflection.c: don't export random functions
1061 and lazy load dbnull and missing objects.
1063 2007-11-07 Jonathan Chambers <joncham@gmail.com>
1065 * class.c: Initialize COM types if COM interfaces
1066 are present (not just COM classes).
1068 Code is contributed under MIT/X11 license.
1070 2007-11-07 Massimiliano Mantione <massi@ximian.com>
1072 create_dynamic_mono_image: hook module profiler events (dynamic case).
1073 mono_image_basic_init: hook assembly profiler events (dynamic case).
1075 2007-11-07 Massimiliano Mantione <massi@ximian.com>
1077 simple_appdomain_unload: completely terminate the profiler
1078 instead of only processing the statistical samples.
1079 simple_shutdown: make sure this is really called exactly once,
1080 even in multithreaded applications, and always listen to
1082 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
1083 here, the "[un]load" functions will do it.
1084 Fixes bugs #333791 and #325261.
1086 2007-11-07 Geoff Norton <gnorton@novell.com>
1088 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
1089 rather than depend on __APPLE__.
1091 2007-11-07 Mark Probst <mark.probst@gmail.com>
1093 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
1095 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
1097 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
1098 UTF16 MonoString. Fix the crash from bug #335488
1100 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
1102 * marshal.c: Correct (for non-Win32 OS) length != size in
1103 mono_string_from_bstr. Fix #339530.
1105 2007-11-06 Geoff Norton <gnorton@novell.com>
1107 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
1110 2007-11-05 Kornél Pál <kornelpal@gmail.com>
1112 * process.c: Added run-time GetProcessId API detection for Windows.
1114 2007-11-04 Miguel de Icaza <miguel@novell.com>
1116 * reflection.c (mono_param_get_objects): If a parameter has the
1117 attribute [System.Runtime.InteropServices.Optional] we should
1118 set the DefaultValue of the ParameterInfo to be
1119 System.Reflection.Missing instead of DBNull.
1123 (mono_get_reflection_missing_object): New method,
1124 returns the System.Reflection.Missing.Value singleton instance.
1126 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
1128 * culture-info-table.h : regenerated.
1130 2007-11-02 Jonathan Chambers <joncham@gmail.com>
1132 * icall.c: Use GetEnvironmentStrings on windows
1133 so we are using the same environment block as
1134 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
1137 Code is contributed under MIT/X11 license.
1139 2007-10-31 Martin Baulig <martin@ximian.com>
1141 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
1143 * mono-debug-debugger.h
1144 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
1146 2007-10-30 Zoltan Varga <vargaz@gmail.com>
1148 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
1151 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
1153 * culture-info-table.h : regenerated.
1155 2007-10-30 Robert Jordan <robertj@gmx.net>
1157 * icall-def.h, icall.c:
1158 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
1160 Code is contributed under MIT/X11 license.
1162 2007-10-29 Zoltan Varga <vargaz@gmail.com>
1164 * class.c (mono_class_setup_vtable): Find the inflated methods in the
1165 inflated class instead of inflating them again.
1167 * class.c (mono_class_setup_vtable): Inflate the override methods in the
1170 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
1171 Call setup_supertypes () after klass->parent is set.
1172 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
1174 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
1175 for inflated instances of not yet created dynamic generic classes.
1176 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
1177 times from inflated_method.
1178 (methodbuilder_to_mono_method): Ditto.
1180 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
1182 * gc.c: code cleanup and removed old untested option of not creating the
1185 2007-10-29 Zoltan Varga <vargaz@gmail.com>
1187 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
1188 creating a jump trampoline for dynamic methods.
1190 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
1192 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
1193 generic TypeBuilders when called from another method of the same type (bug #335131).
1196 2007-10-27 Zoltan Varga <vargaz@gmail.com>
1198 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
1199 doesn't seem to work perfectly.
1201 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
1202 called multiple times.
1203 (methodbuilder_to_mono_method): Ditto.
1204 (resolve_object): Inflate FieldBuilder's.
1206 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1208 * string-icalls.c, string-icalls.h, appdomain.c: patch from
1209 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
1210 RemoveEmptyEntries in the string.Split implementation (bug #322375).
1212 2007-10-26 Dick Porter <dick@ximian.com>
1214 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
1215 Thread initialisation changes
1217 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
1219 * verify.c: fix compatibility check between arrays and System.Array
1221 2007-10-26 Zoltan Varga <vargaz@gmail.com>
1223 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
1226 2007-10-25 Zoltan Varga <vargaz@gmail.com>
1228 * object.c (mono_value_box): Use typed allocation here.
1230 2007-10-23 Zoltan Varga <vargaz@gmail.com>
1232 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
1233 trampoline instead of compiling the method right away.
1235 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
1237 2007-10-21 Zoltan Varga <vargaz@gmail.com>
1239 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
1240 related fields for dynamic classes. Fixes #334493.
1242 2007-10-20 Zoltan Varga <vargaz@gmail.com>
1244 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
1246 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
1248 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
1249 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
1251 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
1253 * reflection.c (create_generic_typespec): Initialize klass->generic_container
1255 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
1257 2007-10-18 Jonathan Chambers <joncham@gmail.com>
1259 * marshal.c: Use correct key when removing item
1262 Code is contributed under MIT/X11 license.
1264 2007-10-17 William Holmes <billholmes54@gmail.com>
1266 *marshal.c: Adding a case to marshal booleans to U1
1268 Code is contributed under MIT/X11 license.
1270 2007-10-18 Zoltan Varga <vargaz@gmail.com>
1272 * class.c (mono_class_from_name): Search the modules compromising dynamic
1273 assemblies. Fixes #331601.
1275 2007-10-16 Zoltan Varga <vargaz@gmail.com>
1277 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
1278 exception if the type name contains an assembly component. Fixes #334203.
1280 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
1281 modules inside dynamic assemblies. Fixes #334200.
1283 * reflection.c: Set image->public_key and image->public_key_length;
1285 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
1288 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
1290 2007-10-16 Mark Probst <mark.probst@gmail.com>
1292 * metadata.c: Implemented correct comparing of generic classes.
1293 An inflated generic class can be equal to a non-inflated one if it
1294 is inflated with generic type variables as type arguments. Fixes
1297 2007-10-15 Dick Porter <dick@ximian.com>
1299 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
1300 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
1303 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
1304 instead of a monitor lock. This means that monitor_try_enter and
1305 co can set the thread state safely.
1306 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
1307 thread_interrupt_requested, so interrupt actually works.
1309 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
1310 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
1311 state accessor function
1313 2007-10-15 Martin Baulig <martin@ximian.com>
1316 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
1317 the debugger with the current runtime.
1319 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
1321 * object.c, object-internals.h: added the ability to set a single
1322 trampoline for all the slots in a vtable.
1324 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1326 * marshal.c: deal with a possible race condition during multicast
1327 delegate invocation.
1329 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1331 * class.c: ensure value type methods don't have the synchronized
1334 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
1336 * string-icalls.c, string-icalls.h: reverted unapproved patch that
1339 2007-10-11 Joel Reed <joelwreed@comcast.com>
1341 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
1342 to take an options parameter so that empty entries can be removed during
1343 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
1345 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1347 * marshal.c: make sure we don't store the signature from a dynamic
1348 method into the runtime invoke cache (bug #327189).
1350 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1352 * marshal.c: make sure the wrapper methods are properly initialized.
1354 2007-10-11 Mark Probst <mark.probst@gmail.com>
1356 * metadata.c, metadata-internals.h: Generalized
1357 mono_type_stack_size() to mono_type_stack_size_internal() which
1358 takes an additional argument specifying whether it allows open
1361 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1363 * verify.c (do_invoke_method): handle typedbyref params
1364 correctly and check for unverifiable return values.
1366 * verify.c (do_newobj): fix a warning.
1368 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1370 * verify.c: don't tread typedbyref as allways unverifable,
1371 so uses, like (ld/st)loc.0 are valid. verify for the cases
1372 that it matters, like boxing related operations.
1374 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1376 * verify.c: add verification of the newobj opcode. verification
1377 of delegate instantation still missing due ldftn and virldftn not
1378 pushing the function type on stack
1380 2007-10-08 Mark Probst <mark.probst@gmail.com>
1382 * class-internals.h: Runtime generic context data structure
1385 * object.c: Initialization of runtime generic context at runtime
1386 vtable creation time.
1388 2007-10-08 Massimiliano Mantione <massi@ximian.com>
1389 * class.c (mono_class_create_from_typedef,
1390 mono_class_from_generic_parameter, mono_ptr_class_get,
1391 mono_fnptr_class_get, mono_bounded_array_class_get)
1392 * domain.c (mono_domain_create, mono_domain_free)
1393 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
1394 * image.c (do_mono_image_load, mono_image_close):
1395 Hooked up load-unload profiler events.
1397 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1399 * domain.c: track statistics about the actual amount of native code
1402 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1404 * class.c: the valuetype enumerators don't have the additional
1405 supertypes interfaces.
1407 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1409 * class.c: need more interfaces setup for the IEnumerator<T>
1410 object created for arrays (tests/ienumerator-interfaces.2.cs).
1412 2007-10-05 Zoltan Varga <vargaz@gmail.com>
1414 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
1416 2007-10-05 Alp Toker <alp@atoker.com>
1418 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
1419 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
1422 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
1424 * verify.c (verify_type_compatibility_full): verification of
1425 compatibility improved, validates correctly non-strict checks between
1426 native int and I4 types different than (unsigned)int32.
1428 * verify.c (do_store_indirect): added, do all verification of
1431 * verify.c (get_load_indirect_mono_type): renamed to
1432 get_indirect_op_mono_type, as it now returns the MonoType for
1433 ldind.X and stind.X opcodes.
1435 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
1437 * reflection.c: Fix the encoding of generic type definition for
1440 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
1441 mono_image_typedef_or_ref but allows to specify if typespec lookups should
1442 be made. Typespec check is done prior to typeref cache lookup.
1444 * reflection.c (mono_image_typedef_or_ref): now just delegate to
1445 mono_image_typedef_or_ref_full.
1447 * reflection.c (encode_generic_class): encode the generic class
1448 directly instead of calling encode_type.
1450 * reflection.c (encode_type): encode the generic type definition
1451 MonoClass as a generic instantiation.
1453 * reflection.c (create_typespec): cache typespec tokens in
1454 the assembly->typespec cache. Don't create typespec for a generic
1455 instance MonoClass. Create typespec for the generic type defintion.
1457 * reflection.c (create_generic_typespec): encode the generic
1458 class directly instead of calling encode_type.
1460 * reflection.c (mono_image_create_token): encode the generic
1461 type definition not using a typespec for MonoType instances.
1464 2007-10-04 Raja R Harinath <rharinath@novell.com>
1467 * class.c (mono_image_init_name_cache): Don't return nested
1468 'protected internal' classes.
1469 (mono_class_from_name_case): Likewise.
1471 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
1473 * icall-def.h, icall.c : get_bundled_machine_config() is now the
1474 common function used by both DefaultConfig in System.dll and
1475 InternalConfigurationHost in System.Configuration.dll.
1477 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1479 * class.c: automatically add to vectors only a few essential explicit
1480 generic interfaces. The rest of the interfaces that arrays should
1481 provide are currently implicitly added (but still not lazily, see the
1482 design in the discussion of bug#325495 for the details of what is
1483 needed for that). Additionally, implicit interfaces are assigned the
1484 same vtable slot as the explicit interfaces (as they are compatible):
1485 this enables huge memory savings since we don't need to instantiate
1486 as many memthods and as large vtables anymore. Also, Since
1487 GetEnumerator<T> returns an instance of a type that is required to
1488 support a similarly large set of interfaces as arrays, we add
1489 implicit interfaces and interface offset sharing support to those
1490 types, too. This change adds all the required interfaces so that
1491 the anonarray.cs test case in the bug report works (we don't add
1492 all the interfaces to arrays of arrays 3-level deep and more because
1493 of the memory requirements explained in the bug and since they are much
1494 less common: the lazy-loading support will enabled them to work, too).
1496 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
1498 * verify.c (merge_stacks): major clean up, all type compatibility
1499 checks are done by verify_type_compatibility. This fix my earlier lack
1500 of understanding of the CLR type system and merge_stacks no longer looks
1503 * verify.c: fixed some bad spelling.
1505 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
1507 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
1508 a given stack slock.
1510 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
1511 verify_type_compatibility_full. This removed a near indentical function and fixed
1512 handling of Int32 and IntPtr across all opcodes.
1514 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1516 * class.c: only vectors have the additional generic interfaces.
1518 2007-10-01 Jonathan Chambers <joncham@gmail.com>
1520 * mono-config.c: Use g_strcasecmp instead of
1521 strcasecmp like everywhere else to fix
1522 compilation with MSVC.
1524 Code is contributed under MIT/X11 license.
1526 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1528 * object.c, object-internals.h: refactored the IMT code to enable
1529 building a single slot at a time and lazily creating the IMT trampolines
1532 2007-09-29 Zoltan Varga <vargaz@gmail.com>
1534 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
1536 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
1539 2007-09-29 Raja R Harinath <harinath@gmail.com>
1541 * loader.c (method_from_methodspec): Rearrange to avoid
1542 un-necessary exposition. Don't assert out if the method's
1543 declaring type is a generic type definition.
1545 2007-09-28 Martin Baulig <martin@ximian.com>
1547 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
1549 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
1551 * class-internals.h: optimize field layout of MonoClass to
1552 requires less cachelines at runtime and save a few bytes on 64 bit
1555 2007-09-28 Jb Evain <jbevain@novell.com>
1557 * reflection.c: when encoding type names in custom attributes,
1558 if the type is a closed generic type, its generic arguments
1559 have to be serialized as AssemblyQualifiedName, so that when
1560 they are deserialized, it's possible to re-create them properly.
1564 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1566 * object.c, class-internals.h: added delegate-creation counter.
1568 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1570 * class.c: cleanup of the code that synthetizes interfaces for
1571 arrays in 2.0: saves quit a bit of corlib mempool memory.
1572 Code to fix bug #325495 ifdeffed out for now until the issues
1573 with memory usage and O(n^2) behaviour are fixed.
1575 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1577 * marshal.c: when possible, do not duplicate the name of the methods
1578 in the method builder and in the generated MonoMethod.
1580 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
1581 * verify.c: added support for type checking ldind_* opcodes.
1583 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
1585 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
1586 which is used to distinguish the fully open instantiation of a TypeBuilder
1587 with the rest. This temporary hack is required to restore the property that
1588 the fully open instantiation is the same type of the generic type definition.
1590 * class-internals.h (mono_generic_class_is_generic_type_definition):
1591 new function as part of the internal API.
1593 * class.c (inflate_generic_type): return NULL when the generic inst is
1594 fully open. The fully open generic type is now the same as the generic type
1595 definition for non TypeBuilder types.
1597 * class.c (mono_generic_class_get_class): removed assert since it is
1598 no longer valid, gklass->cached_class can point to the generic type definition.
1600 * class.c (mono_generic_class_is_generic_type_definition): new.
1602 * metadata.c (mono_generic_class_hash): added is_tb_open field
1603 to the hash calculation.
1605 * metadata.c (free_generic_class): if the generic class is associated
1606 with the generic type definition, its field will come from the mempool and
1609 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
1610 new, this function identifies the corner case of a TypeBuilder fully open
1613 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
1614 for lookup. Set gclass->cached_class to be the container class in case of
1615 the fully open instantiation of non TypeBuilder types.
1617 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
1618 to compare generic classes.
1620 * reflection.c (method_encode_methodspec): remove assert that
1623 * reflection.c (mono_reflection_generic_class_initialize): add
1624 an aditional assert to ensure the proper type is used.
1626 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
1628 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
1631 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
1633 * verify.c (push_arg): Fixed support for ldarga
1634 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
1635 MonoType used as first arg in case of instance calls.
1637 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
1639 * verify.c: Support for verifying VAR and MVAR types,
1641 2007-09-25 Zoltan Varga <vargaz@gmail.com>
1643 * icall.c (ves_icall_get_property_info): Set the reflected type of the
1644 accessors correctly.
1646 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
1648 * threads.c: support OSX and other systems in
1649 mono_thread_get_stack_bounds (bug #328026).
1651 2007-09-25 Martin Baulig <martin@ximian.com>
1654 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
1656 2007-09-24 Martin Baulig <martin@ximian.com>
1659 (MonoDebugClassEntry): Moved the definition of this struct into
1660 mono-debug.c to make it private.
1663 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
1664 type table per symbol file, we don't need to store the symfile id
1667 2007-09-24 Martin Baulig <martin@ximian.com>
1669 Create one type table per symbol file, since a `MonoClass *' gets
1670 invalid when its image is unloaded.
1672 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
1673 (MonoDebugHandle): Added `type_table'.
1675 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
1677 * mempool.c, mempool.h: added mono_mempool_new_size () API
1678 to be able to specify a smaller initial size for the pool.
1679 Adjusted the code to slowly increase pool size before using
1680 the previous default size.
1681 * image.c: use a small initial size for image mempools.
1683 2007-09-23 Zoltan Varga <vargaz@gmail.com>
1685 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
1688 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
1689 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
1691 2007-09-22 Zoltan Varga <vargaz@gmail.com>
1693 * metadata.c (mono_type_create_from_typespec): Remove an invalid
1694 free. Fixes #327438.
1696 2007-09-21 Raja R Harinath <harinath@gmail.com>
1698 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
1699 generic instantiations, etc.
1700 <MONO_TYPE_ARRAY>: Likewise.
1702 2007-09-21 Martin Baulig <martin@ximian.com>
1704 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
1705 these structs were never defined.
1706 (MonoDebugHandle): Removed the `_priv' field, it was never used.
1708 2007-09-21 Martin Baulig <martin@ximian.com>
1710 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
1712 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
1714 * image.c: removed the guid hash tables: we can get the same info
1715 without the additional memory usage hit (partially fixes also bug #327052).
1717 2007-09-10 Massimiliano Mantione <massi@ximian.com>
1719 * profiler.h, profiler-private.h, profiler.c: add a new profiler
1720 event to handle unloading methods. After the event is called, the
1721 corresponding MonoMethod* must be considered invalid.
1722 * loader.c (mono_free_method): call the new mono_profiler_method_free
1725 2007-09-20 Mark Probst <mark.probst@gmail.com>
1727 * domain-internals.h: New flag in MonoJitInfo which marks shared
1728 generic methods. New hash table (shared_generics_hash) in
1729 MonoDomain to keep track of shared generic methods. Prototypes
1730 for functions to register and lookup shared generic methods.
1732 * domain.c: Support for registering and looking up shared generic
1733 methods via a hash table (shared_generics_hash) in MonoDomain.
1735 * class-internals.h: New exception to signal failure of shared
1736 compilation of a generic method. New counters for generics
1737 sharing in MonoStats.
1739 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
1741 * image.c, metadata-internals.h: don't keep a file descriptor open
1742 for loaded assemblies (bug#325988).
1744 2007-09-19 Raja R Harinath <rharinath@novell.com>
1746 * metadata.c (signature_in_image): New. Carve out of type_in_image.
1747 (ginst_in_image, gclass_in_image): Simplify. Change signature to
1748 use the corresponding datatypes.
1749 (type_in_image): Update to changes.
1750 (CleanForImageUserData): Simplify.
1751 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
1752 Avoid quadratic behaviour in handling the "stolen" list by
1753 separating the filter predicate out, and by prepending the stolen
1754 items rather than appending them.
1755 (steal_ginst_in_image): Likewise.
1756 (mono_metadata_clean_for_image): Update to changes.
1758 2007-09-19 Martin Baulig <martin@ximian.com>
1760 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
1762 2007-09-19 Martin Baulig <martin@ximian.com>
1764 * mono-debug.c (mono_debug_cleanup): Don't call
1765 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
1767 2007-09-19 Raja R Harinath <harinath@gmail.com>
1769 Fix crash on 'make run-test' in mcs/errors
1770 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
1771 Avoid more potential allocations in mono_class_from_mono_type.
1772 (ginst_in_image): Update to changes.
1773 (gclass_in_image): Rearrange slightly.
1775 2007-09-18 Zoltan Varga <vargaz@gmail.com>
1777 * class.c (mono_class_init): Move the code that sets up class->methods to
1778 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
1780 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
1781 canonical instance of an inflated generic signature.
1782 (mono_type_create_from_typespec): Remove an invalid free.
1784 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
1786 2007-09-18 Marek Habersack <mhabersack@novell.com>
1788 * domain-internals.h: added a declaration of the
1789 mono_assembly_load_full_nosearch internal function.
1791 * assembly.c (mono_assembly_load_with_partial_name): use
1792 mono_try_assembly_resolve return value properly.
1793 (mono_assembly_load_full_nosearch): copied the function body from
1794 mono_assembly_load_full, without the code to invoke assembly
1796 (mono_assembly_load_full): calls the above new function and if the
1797 assembly is not resolved, invokes the search hooks.
1799 * appdomain.c (mono_runtime_init): restore the global postload
1800 assembly search handlers.
1802 2007-09-18 Zoltan Varga <vargaz@gmail.com>
1804 * class.c (mono_class_init): Make sure class->methods and class->properties
1805 are never NULL in the generics case.
1807 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
1809 2007-09-17 Zoltan Varga <vargaz@gmail.com>
1811 * metadata.c (free_generic_class): Disable some code to fix the build.
1813 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
1815 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
1816 from the image mempool.
1818 * metadata.c (free_generic_class): Free more data from the inflated class.
1820 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
1822 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
1824 (mono_type_create_from_typespec): Ditto.
1826 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
1827 MonoImage to the caller.
1828 (mono_init_internal): Save the opened image in a global variable.
1829 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
1831 * reflection.c (resolve_object): Fix a leak.
1833 * metadata.c: Fix the freeing of data in the generics caches.
1835 * metadata.c (free_generic_inst): Comment this out to fix the build.
1836 (free_generic_class): Ditto.
1838 * metadata.c: Free cached generic methods, instantinations and classes when
1839 they are removed from the caches.
1840 (mono_metadata_free_type): Free the type itself.
1842 * class.c: Free the result of mono_class_inflate_generic_type () in a few
1845 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1847 * boehm-gc.c: restrict managed allocs to __thread supporting
1850 2007-09-16 Zoltan Varga <vargaz@gmail.com>
1852 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
1853 (mono_generic_class_get_class): Fix a leak.
1855 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
1856 mono_metadata_free_type ().
1857 (mono_metadata_inflate_generic_inst): Fix a leak.
1859 2007-09-14 Zoltan Varga <vargaz@gmail.com>
1861 * mono-debug.c (free_header_data): Fix a leak missed earlier.
1863 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
1866 * mono-debug.c (mono_debug_close_image): Fix call to
1867 g_hash_table_remove ().
1869 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1871 * icall-def.h: redirect all the string ctor to the managed
1872 CreateString () methods.
1873 * string-icalls.c, string-icalls.h: removed dead code for string
1876 2007-09-14 Zoltan Varga <vargaz@gmail.com>
1878 * mono-debug.c: Fix memory leaks.
1880 2007-09-14 Jonathan Chambers <joncham@gmail.com>
1882 * threads-types.h: Implement mono_hazard_pointer_set and
1883 mono_hazard_pointer_clear macros using do/while(0) to fix
1884 compilation with MSVC.
1886 Code is contributed under MIT/X11 license.
1888 2007-09-14 Zoltan Varga <vargaz@gmail.com>
1890 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
1891 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
1893 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1895 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
1898 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1900 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
1901 managed-code allocated as well.
1903 2007-09-13 Zoltan Varga <vargaz@gmail.com>
1905 * class.c (mono_class_is_assignable_from): Add support for generic variance.
1907 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
1909 * boehm-gc.c: fixed the build after the AOT changes.
1911 2007-09-13 Zoltan Varga <vargaz@gmail.com>
1913 * wrapper-types.h: Add an ALLOC wrapper type.
1915 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
1916 reference managed allocator methods.
1918 2007-09-12 Marek Safar <marek.safar@gmail.com>
1920 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
1921 of Type array and not MonoType, a fix suggested by Hari.
1923 2007-09-12 Jonathan Chambers <joncham@gmail.com>
1925 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
1926 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
1928 Code is contributed under MIT/X11 license.
1930 2007-09-10 Massimiliano Mantione <massi@ximian.com>
1932 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
1934 2007-09-12 Marek Habersack <mhabersack@novell.com>
1936 * image.c (do_mono_image_open): if assembly file fails to open and
1937 MONO_IOMAP is in effect, try to find the path in a
1938 case-insensitive way.
1940 * appdomain.c (mono_runtime_init): do not install postload hooks -
1941 tests show that MS.NET doesn't use anything of that sort to
1942 trigger the AppDomain.AssemblyResolve event.
1943 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
1945 (mono_runtime_init): init portability helpers here.
1947 * assembly.c (mono_assembly_load_with_partial_name): if other
1948 attempts fail, trigger the AppDomain.AssemblyResolve event handler
1949 to resolve the assembly.
1951 * domain-internals.h: added mono_try_assembly_resolve and marked
1954 2007-09-11 Jb Evain <jbevain@novell.com>
1956 * object-internals.h (MonoReflectionDynamicMethod): add
1957 a `MonoReflectionType *owner` field. The owner is used
1959 (mono_reflection_create_dynamic_method): use the owner of the dynamic
1960 method as the class declaring the dynamic method.
1961 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
1962 dynamic method to the declaring type of the methodbuilder.
1964 2007-09-11 Mark Probst <mark.probst@gmail.com>
1966 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
1967 rules for calling methods via reflection.
1969 2007-09-11 Zoltan Varga <vargaz@gmail.com>
1971 * reflection.c (resolve_object): Add support for MonoGenericClass.
1974 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
1976 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
1977 provide a managed method that does fast allocations without needing
1978 a managed->unmanaged transition. Boehm GC implementation currently
1979 enabled for ptrfree objects on sane architectures.
1981 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1983 * marshal.c, marshal.h: exported a couple of useful functions and
1984 added mono_mb_get_label () to easily handle backward branches.
1986 2007-09-10 Zoltan Varga <vargaz@gmail.com>
1988 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
1990 2007-09-10 Massimiliano Mantione <massi@ximian.com>
1992 * loader.c (find_method): Fixed the regression introduced while
1995 2007-09-09 Zoltan Varga <vargaz@gmail.com>
1997 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
2000 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
2001 icall.c reflection.c: Pass a MonoGenericContext argument to
2002 mono_lookup_dynamic_token ().
2004 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
2007 2007-09-09 Robert Jordan <robertj@gmx.net>
2009 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
2010 for generic methods.
2012 * object.c (mono_object_get_virtual_method): Handle generic methods.
2015 Code is contributed under MIT/X11 license.
2017 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
2019 * image.c: fix locking in mono_image_load_file_for_image ().
2021 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
2023 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
2024 used only as a cache: added an icall to fill it.
2026 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
2028 * reflection.h: exposed mono_reflection_free_type_info
2029 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
2030 since mono_reflection_bind_generic_parameters makes a copy of it.
2031 * reflection.c (free_type_info): subinfos should be freed.
2032 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
2034 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
2035 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
2036 this fixes #82695 and #81726.
2039 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
2041 * process.h, process.c: added support for user profile/info in
2042 ProcessStartInfo. For now only Windows works.
2044 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2046 * metadata.c: consider the generic arguments when comparing
2047 signatures (bug #82614).
2049 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2051 * cil-coff.h, image.c: updated assembly loader to cope with the
2052 PE32+ 64 bit file format.
2054 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
2056 * assembly.c, class.c, domain.c, loader.c: remove useless
2057 inclusion of cil-coff.h.
2059 2007-08-29 Jonathan Chambers <joncham@gmail.com>
2061 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
2062 if interface is marked with CoClassAttribute.
2064 Code is contributed under MIT/X11 license.
2066 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
2068 * sgen-gc.c: ensure no object from the to space is copied again or finalized
2069 if it's seen twice in major collections.
2071 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
2073 * sgen-gc.c: big objects are not copied to the gray area, but they
2074 need to be considered for scanning, too, if they are brought alive
2075 by an object ready for finalizations or a survived one.
2077 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
2079 * sgen-gc.c: properly account the number of disappearing links when
2082 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
2084 * sgen-gc.c: share the code to scan the registered roots between the
2085 different types of collections.
2087 2007-08-28 Zoltan Varga <vargaz@gmail.com>
2089 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
2091 2007-08-28 Zoltan Varga <vargaz@gmail.com>
2093 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
2094 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
2096 2007-08-28 Mark Probst <mark.probst@gmail.com>
2098 * security-manager.c (mono_security_manager_get_methods):
2099 LinkDemandSecurityException now has 2 arguments instead of 3.
2101 2007-08-27 Zoltan Varga <vargaz@gmail.com>
2103 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
2104 platforms which need it.
2106 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2108 * sgen-gc.c: unregister thread data structures with a pthread_key_t
2111 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
2113 * threads.c: free the thread static data on thread exit.
2115 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
2117 * class.c: walk the hierarchy to find the generic definition for
2118 a class (fixes runtime part of bug #82498).
2120 2007-08-24 Zoltan Varga <vargaz@gmail.com>
2122 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
2125 * image.c (mono_image_close): Here. Hopefully fixes #82510.
2127 2007-08-24 Mark Probst <mark.probst@gmail.com>
2129 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
2131 2007-08-24 Robert Jordan <robertj@gmx.net>
2133 * appdomain.c: don't perform the ':'->';' substitution on Win32.
2135 2007-08-24 Jb Evain <jbevain@novell.com>
2137 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
2140 2007-08-24 Mark Probst <mark.probst@gmail.com>
2142 * threads.c: Make sure a thread gets cleaned up only once. Fixes
2145 2007-08-24 Zoltan Varga <vargaz@gmail.com>
2147 * assembly.c: Fix a warning.
2149 2007-08-23 Marek Habersack <mhabersack@novell.com>
2151 * appdomain.c: parse the <runtime> section looking for the probing
2152 element with the 'privatePath' attribute, which sets additional
2153 directories in which the runtime should look for assemblies.
2155 2007-08-23 Robert Jordan <robertj@gmx.net>
2157 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
2160 2007-08-23 Martin Baulig <martin@ximian.com>
2162 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
2163 _mono_debug_init_corlib() and remove it from the header file.
2165 2007-08-23 Martin Baulig <martin@ximian.com>
2167 * mono-debug-debugger.c
2168 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
2169 don't notify the debugger about it.
2171 * mono-debug-debugger.h
2172 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
2174 2007-08-23 Robert Jordan <robertj@gmx.net>
2176 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
2177 Code is contributed under MIT/X11 license.
2179 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
2181 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
2183 2007-08-22 Martin Baulig <martin@ximian.com>
2185 * mono-debug.c: Store debugging info on a per-domain basis and
2186 free it on domain unload. Add support for unloading symbol files.
2189 (MonoDebugList): New typedef.
2191 - add `data_tables and `type_table'.
2192 - replace 'symbol_files' and `num_symbol_files' with a
2194 (mono_debug_data_table): Removed.
2195 (mono_debug_list_add): New public function.
2196 (mono_debug_list_remove): New public function.
2197 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
2198 (mono_debug_init_2_memory): Renamed into
2199 mono_debug_open_image_from_memory().
2200 (mono_debug_close_image): New public function.
2201 (mono_debug_domain_create): Likewise.
2202 (mono_debug_domain_unload): Likewise.
2203 (MONO_DEBUGGER_VERSION): Bump to 60.
2205 * mono-debug-debugger.h
2206 (MonoDebuggerEvent):
2207 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
2208 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
2209 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
2210 - rename `THREAD_CREATED' and `THREAD_EXITED' into
2211 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
2212 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
2214 (mono_debugger_add_symbol_file): Removed.
2215 (mono_debugger_add_type): Removed.
2216 (mono_debugger_lookup_type): Removed.
2217 (mono_debugger_lookup_assembly): Removed.
2220 (mono_domain_create): Call mono_debug_domain_create().
2221 (mono_init_internal): Call mono_debug_init_corlib().
2224 (mono_assembly_close): Call mono_debug_close_image().
2226 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
2228 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
2231 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
2233 * sgen-gc.c: ensure section->pin_queue_end is initialized
2234 correctly when non pinning objects in the section have been found.
2236 2007-08-22 Marek Habersack <mhabersack@novell.com>
2238 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
2239 containing a list of directories separated by ':'. MSDN docs say
2240 the directories should be separated with ';'. Part of a bugfix for
2243 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
2245 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
2246 it should MonoType and not MonoClass.
2248 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
2250 * culture-info-table.h : regenerated.
2252 2007-08-20 William Holmes <billholmes54@gmail.com>
2254 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
2255 to call ReplaceFile Kernel32 on windows or in io-layer.
2256 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
2257 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
2258 as an internal call.
2260 Code is contributed under MIT/X11 license.
2262 2007-08-20 Jb Evain <jbevain@novell.com>
2264 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
2265 and MONO_EXCEPTION_FIELD_ACCESS.
2267 * debug-helpers.[c|h]: new mono_field_full_name function.
2269 2007-08-20 Mark Probst <mark.probst@gmail.com>
2271 * class.c: Removed class_security_level() and moved it to
2272 security-core-clr.c.
2274 * security-core-clr.c, security-core-clr.h: class_security_level()
2275 is now public and renamed to mono_security_core_clr_class_level().
2276 It also looks for security attributes in the classes a class is
2279 2007-08-20 Mark Probst <mark.probst@gmail.com>
2281 * security-core-clr.c, security-core-clr.h: CoreCLR security
2284 * Makefile.am: Added security-core-clr.[ch].
2286 * security-manager.c, security-manager.h: Functions and enum for
2287 setting and getting the security mode.
2289 * class.c: CoreCLR security checks.
2291 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
2293 * icall-def.h, process.c, process.h: implemented icall to get
2294 user/system processor times.
2296 2007-08-17 Mark Probst <mark.probst@gmail.com>
2298 * domain.c, threads.c, class-internals.h, domain-internals.h: New
2299 reader-lock-free jit_info_table.
2301 2007-08-17 Zoltan Varga <vargaz@gmail.com>
2303 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
2305 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
2307 * object-internals.h (MonoException): Add missing _data member.
2309 2007-08-08 Massimiliano Mantione <massi@ximian.com>
2311 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
2312 checking that only methods with matching qname or fqname are picked
2313 from implemented interfaces.
2315 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
2317 * verify.c (do_newarr):added, do type verification of
2318 newarr ops, push the right value on the eval stack.
2319 * verify.c (mono_method_verify): use do_newarr
2322 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
2324 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
2325 factored the common code into get_boxable_mono_type, which
2326 is now using mono_type_get_full, this fixed byref related tests.
2328 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
2330 * class.c: added mono_type_get_full, this function has the same
2331 behavior of mono_class_get_full but the returned MonoType has
2332 all metadata of the associated token in case of a typespec token.
2333 * class.c: added mono_type_retrieve_from_typespec, used by
2334 mono_type_get_full to retrieve the token type.
2335 * class.c (mono_class_create_from_typespec): changed to use
2336 mono_type_retrieve_from_typespec.
2337 * class.c (mono_ldtoken): changed to use mono_type_get_full
2338 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
2339 * class-internals.h: exported mono_type_get_full for internal use.
2341 2007-08-16 Jb Evain <jbevain@novell.com>
2343 * domain.c (supported_runtimes): add entry for
2344 the 'moonlight' runtime version.
2346 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2348 * verify.c (mono_method_verify): small typo sliped in.
2350 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2352 * verify.c (do_unbox_value): added, do type verification of
2354 * verify.c (mono_method_verify): use do_unbox_value
2357 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2359 * verify.c (dump_stack_value): fixed typo, was printing string
2360 instead of object on stack.
2361 * verify.c (do_box_value): moved the byref check up as it leads
2362 to invalid code and should be done earlier.
2363 * verify.c: improved error messages for and ldobj
2365 2007-08-15 William Holmes <billholmes54@gmail.com>
2367 * marshal.c (emit_marshal_custom): Omit the call to
2368 marshal_native_to_managed when calling native to managed
2369 and the argument is specified as an out argument.
2371 Code is contributed under MIT/X11 license.
2373 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2375 * verify.c: fixed the type checks for generics, function pointers and vectors.
2376 Added type verification for ldobj and ldtoken. The verifier
2377 would segfault if header or signature of a method contained references
2378 to non-existant types.
2380 2007-08-15 Jonathan Chambers <joncham@gmail.com>
2382 * marshal.c (cominterop_get_ccw): Patch from
2383 Bill Holmes to no walk up interface hierarchy.
2384 All parent methods should be present in the interface for COM.
2386 Code is contributed under MIT/X11 license.
2388 2007-08-15 Jonathan Chambers <joncham@gmail.com>
2390 * marshal.c (emit_marshal_com_interface): Patch from
2391 Bill Holmes to handle COM Interfaces as return values
2392 for native->managed calls.
2394 Code is contributed under MIT/X11 license.
2396 2007-08-14 Jonathan Chambers <joncham@gmail.com>
2398 * marshal.c (cominterop_get_idispatch_for_object): Implement
2399 for runtime callable wrappers.
2401 Code is contributed under MIT/X11 license.
2403 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
2405 * pedump.c (main): changed from mono_init to mono_init_from_assembly
2406 so 2.0 types are accessible
2409 2007-08-13 Miguel de Icaza <miguel@novell.com>
2411 * domain.c (mono_init_internal): Call mono_assembly_load_friends
2412 once we load mscorlib. Due to the order in which we initialize,
2413 the mono_assembly_load_full routine that loads mscorlib did not
2414 load friends. We now load it once we load the
2415 mono_defaults.internals_visible_class class.
2417 * assembly.c: Expose the mono_load_friend_assemblies method.
2419 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
2421 * verify.c: improved the handling of boxing, better
2422 type checking for unary ops and conversion. Fix bug
2423 regarding managed pointer compatibility checking
2425 2007-08-11 Zoltan Varga <vargaz@gmail.com>
2427 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
2429 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
2431 2007-08-09 Raja R Harinath <rharinath@novell.com>
2433 * reflection.c (dup_type): Remove.
2434 * class.c (dup_type): Remove.
2435 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
2436 instead of the dodgy 'dup_type'.
2437 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
2438 handle the case where 'dup_type' needed the second argument.
2440 2007-08-08 Zoltan Varga <vargaz@gmail.com>
2442 * domain.c: Fix a warning.
2444 2007-08-08 Massimiliano Mantione <massi@ximian.com>
2446 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
2447 checking that methods with the same fqname are not overridden
2448 with a method from an ancestor.
2450 2007-08-07 Zoltan Varga <vargaz@gmail.com>
2452 * threads.c (free_thread_static_data_helper): Avoid a crash if
2453 thread->static_data is not yet set.
2455 2007-08-07 Jonathan Chambers <joncham@gmail.com>
2457 * marshal.c: Use correct image when emitting
2458 native wrapper for COM calls.
2460 Code is contributed under MIT/X11 license.
2462 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
2464 * icall-def.h, security.c, security.h :
2465 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
2467 2007-08-07 Martin Baulig <martin@ximian.com>
2469 * mono-debug-debugger.h
2470 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
2472 * domain.c (mono_domain_free): Call
2473 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
2475 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
2477 * verify.c (check_underflow, check_overflow): error message now returns IL offset
2478 * verify.c (in_same_block): code should test if either offset is inside the clauses
2479 * verify.c (mono_method_verify): push the exception into the eval stack of exception
2482 2007-08-03 Zoltan Varga <vargaz@gmail.com>
2484 * image.c (mono_image_close): Fix a leak.
2486 * object.c (mono_runtime_invoke_array): Avoid using alloca.
2488 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
2490 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2492 * domain.c, threads.c, threads-types.h: fix memory retention issue
2493 with thread static variables not being cleared on domain unload.
2494 Reuse thread static slots after domain unload.
2496 2007-08-03 Zoltan Varga <vargaz@gmail.com>
2498 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
2501 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
2502 now done in mono_runtime_invoke_array.
2504 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
2505 receiver is a nullable type.
2507 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
2510 2007-08-03 Jonathan Chambers <joncham@gmail.com>
2512 * marshal.c: Implement COM Objects as return type for
2513 managed->unmanaged calls. Added Release calls for COM Object
2514 out/return values in managed->unmanaged calls.
2516 Code is contributed under MIT/X11 license.
2518 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2520 * threads.h, threads-type.h: move the hazard pointer declarations
2521 to the private header.
2523 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2525 * file-io.c, appdomain.c: memory leak fixes.
2527 2007-08-02 Dick Porter <dick@ximian.com>
2530 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
2531 SO_REUSEADDR setting into io-layer/sockets.c.
2533 2007-08-01 Zoltan Varga <vargaz@gmail.com>
2535 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
2536 from Object when called on a generic parameter. Fixes #82211.
2538 2007-08-01 Dick Porter <dick@ximian.com>
2540 * file-io.c (convert_share): Test FileShare values bit-by-bit.
2541 Fixes bug 79250 yet again.
2543 2007-07-30 Martin Baulig <martin@ximian.com>
2545 Merged the `debugger-dublin' branch.
2548 (MonoDebugDataTable): New typedef.
2549 (MonoDebugMethodAddressList): New typedef.
2550 (MonoDebugWrapperData): Removed.
2551 (MonoDebugSymbolTable): Removed `current_data_table',
2552 `current_data_table_size', `current_data_table_offset'.
2553 (MonoDebugDataItemType): Moved into mono-debug.c.
2554 (MonoDebugMethodJitInfo): Remove `address'.
2555 (mono_debug_data_table): New global variable.
2556 (mono_debug_lookup_method_addresses): New public function.
2557 (mono_debug_find_method): Take a `MonoMethod *', not a
2558 `MonoDebugMethodInfo *'.
2560 * mono-debug.c: Drop support for the old symbol tables.
2562 2007-06-28 Martin Baulig <martin@ximian.com>
2564 * mono-debug.c (mono_debug_debugger_version): New public variable.
2566 2007-07-31 William Holmes <billholmes54@gmail.com>
2568 * metadata.c Changed mono_type_create_from_typespec to not insert
2569 the type into the hash map until after
2570 do_mono_metadata_parse_type has completed.
2572 Code is contributed under MIT/X11 license.
2574 2007-07-31 Zoltan Varga <vargaz@gmail.com>
2576 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
2577 generic parameter. Fixes #82211.
2579 2007-07-27 Jb Evain <jbevain@novell.com>
2581 * pedump.c (dump_metadata, dump_metadata_header): dump
2582 versions contained in the metadata header.
2584 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2586 * threads.c: register small_id_table with the GC.
2588 2007-07-27 Mark Probst <mark.probst@gmail.com>
2590 * threads.c, threads.h, class-internals.h, object-internals.h:
2591 Hazard pointers, to be used by lock-free parallel algorithms.
2593 2007-07-26 Dick Porter <dick@ximian.com>
2595 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
2596 routine on non-windows platforms, as I've not managed to think of
2597 a non-kludgy way of doing this. Finishes off bug 78739.
2599 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2601 * object.c: properly setup interface_bitmap in proxy vtables.
2603 2007-07-25 Marek Habersack <mhabersack@novell.com>
2605 * appdomain.c (get_shadow_assembly_location): do not use TickCount
2606 to create unique shadow copy target directories, use the domain's
2607 serial number instead. Each domain gets a unique target directory
2610 * domain.c (mono_domain_create): added code to increment domain
2611 shadow copy serial number and cache the value in the current
2614 * domain-internals.h (struct _MonoDomain): added a new field -
2615 shadow_serial to hold the serial number used in generation of
2616 shadow-copy directories. This is to make sure that the directory
2617 name is unique for each and every domain created. We avoid a race
2618 condition with overriding assemblies already in use by other app
2621 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
2623 * class.c (mono_bounded_array_class_get): fixed memory leak when
2624 binding generic parameters.
2626 2007-07-24 Raja R Harinath <rharinath@novell.com>
2628 * metadata.c (do_mono_metadata_parse_generic_class): Use
2629 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
2632 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2634 * loader.c, class-internals.h, reflection.c: removed the per-method
2635 generics hashtable: we use the global one through the call of
2636 mono_class_inflate_generic_method ().
2638 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2640 * class.c, metadata.c, class-internals.h: introduce yet another
2641 generics global cache for inflated methods (fixes 98% of the perf
2642 issue in bug #81806).
2644 2007-07-23 Raja R Harinath <rharinath@novell.com>
2646 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
2647 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
2648 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
2649 return a MonoGenericInst containing (a copy) of those types.
2650 (mono_metadata_inflate_generic_inst): Update to changes.
2651 (mono_metadata_parse_generic_inst): Likewise.
2652 (mono_get_shared_generic_inst): Likewise.
2653 * reflection.c (mono_class_bind_generic_parameters): Likewise.
2654 (mono_reflection_bind_generic_method_parameters): Likewise.
2655 * metadata-internals.h: Likewise.
2656 * icall.c (free_generic_context): Kill.
2657 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
2659 * reflection.c (reflection_methodbuilder_to_mono_method): Use
2660 mono_metadata_type_dup.
2661 * marshal.c (mono_mb_create_method): Likewise.
2663 * metadata.c (mono_metadata_type_dup): Rename from
2664 mono_metadata_type_dup_mp. Take an optional mempool instead of a
2665 MonoImage. Handle a few more cases, esp. when no mempool is given.
2666 * marshal.c, metadata-internals.h: Update to changes.
2668 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
2670 * class.c: fixed a small leak for array classes and removed warning.
2672 2007-07-22 Zoltan Varga <vargaz@gmail.com>
2674 * loader.c (mono_method_get_param_token): Make this work on generic methods.
2675 Return 0x8000000 for return parameters. Fixes #82161.
2677 2007-07-21 Marek Habersack <grendello@gmail.com>
2679 * appdomain.c (get_shadow_assembly_location): append the current
2680 ticks value to the path. Avoids overwriting the same assemblies by
2681 several threads at the same time.
2683 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
2684 and Raja R Harinath <rharinath@novell.com>
2686 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2688 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
2689 property for testing if a method is a generic method definition.
2691 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
2693 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
2695 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2697 * verify.c: used function from private branch, reverted to the one in class.h
2699 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2701 * verify.c: a typo slipped in and the code wont compile
2703 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2705 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
2706 disabled box instruction as it is doing the wrong thing
2707 improved stack dump messages, now it is easier to debug type related issues
2710 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
2712 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
2714 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2716 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
2717 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
2718 grouped with class and valuetype. This change will simply
2719 the code as it should be handled just like unmanaged pointers.
2721 2007-07-19 Mark Probst <mark.probst@gmail.com>
2723 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
2725 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2727 * verify.c: several stack merge issues fixed, reference comparisons now
2728 check the type size. strict type check now works correctly.
2729 added more uses of IS_MANAGED_POINTER macro.
2730 fixed issues pointed by running the test suite against .net.
2733 2007-07-19 Mark Probst <mark.probst@gmail.com>
2735 * class.c, loader.c, class-internals.h: Removed the
2736 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
2739 * icall.c: Better error checking in some internal reflection
2742 2007-07-18 William Holmes <billholmes54@gmail.com>
2744 * filewatcher.c : removed unused variable 'filename' in
2745 ves_icall_System_IO_FSW_SupportsFSW
2747 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2749 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
2752 2007-07-15 Zoltan Varga <vargaz@gmail.com>
2754 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
2756 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
2758 2007-07-14 Zoltan Varga <vargaz@gmail.com>
2760 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
2761 Implement generics support.
2762 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2764 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
2765 type_args and method_args arguments.
2766 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
2767 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2768 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
2770 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
2772 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
2773 It adds a rootimage parameter to mono_reflection_get_type_internal,
2774 adds new function mono_reflection_get_type_with_rootimage and use
2775 the rootimage to resolve the types instead of the current image
2777 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
2779 * culture-info-table.h: Forgot to update after r78304.
2781 2007-07-13 Raja R Harinath <rharinath@novell.com>
2783 * class.c (mono_class_is_open_constructed_type)
2784 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
2786 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
2788 * class.c (mono_bounded_array_class_get): method fails if used with
2789 an incomplete TypeBuilder enum (no basetype field), fixed it by
2790 avoiding calculating the size for such array as it cannot be instantiated.
2793 2007-07-12 Raja R Harinath <rharinath@novell.com>
2795 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
2797 * metadata.c, reflection.c: Update to changes.
2799 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2801 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
2802 mono_class_is_valid_enum, they are used to valide a enum when loading.
2803 * reflection.c: used new functions to throw TypeLoadException when and
2804 invalid enum is build with TypeBuilder. Fixes #82018
2806 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
2808 * object.c: forgot commit of mono_class_setup_methods () to access
2810 * object-internals.h: added a few more handy fields to
2813 2007-07-11 Zoltan Varga <vargaz@gmail.com>
2815 * object.c (build_imt): Call mono_class_setup_methods () before accessing
2818 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
2820 * class-internals.h, object-internals.h, object.c: IMT-based
2821 interface invocation core from Massimiliano Mantione
2822 (massi@ximian.com) with a reworked arch-specific interface,
2823 bsearch implementation and a few bugfixes and memory savings by me.
2825 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
2827 * class.c (mono_class_create_from_typedef): mono would segfault if
2828 an enum did not have a __value field. It now throws a TypeLoadException
2829 for such cases. Fix bug #82022
2831 2007-07-10 Zoltan Varga <vargaz@gmail.com>
2833 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
2835 2007-07-09 Mark Probst <mark.probst@gmail.com>
2837 * class.c (mono_class_init): If a class is already inited but has
2838 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
2840 2007-07-09 Mark Probst <mark.probst@gmail.com>
2842 * class.c: Properly handle the case of an unimplemented interface
2843 method. Fixes: 81673.
2845 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
2847 * class-internals.h, object.c: cleanup patch from massi: use
2848 MonoVTable->interface_bitmap since the vtable interfaces offset array
2851 2007-07-10 Zoltan Varga <vargaz@gmail.com>
2853 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
2854 GetMDStreamVersion icall instead.
2856 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2858 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
2859 not use mono_dl_build_path() with a full library name: makes
2860 fallbacks to libgaim and libfam work.
2862 2007-07-06 William Holmes <billholmes54@gmail.com>
2864 * assembly.c: Added a continue statement in probe_for_partial_name when
2865 parse_assembly_directory_name fails. Fixes : 82002
2867 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
2869 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
2870 and added a verification for TYPEDBYREF.
2871 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
2872 make native int interchangeable with int32 and some small cleanup and formating.
2873 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
2874 handle byref of byref.
2875 * verify.c (push_local): handle byref of byref.
2876 * verify.c (do_binop): invalid mix of values is unverifiable
2877 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
2878 added visibility checks
2879 * verify.c (field related method): added visibility checks
2880 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
2882 2007-07-06 Zoltan Varga <vargaz@gmail.com>
2884 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
2887 2007-07-05 Zoltan Varga <vargaz@gmail.com>
2889 * profiler.c (mono_profiler_load): Fix an off-by-one error.
2891 * marshal.c (emit_marshal_string): When returning a string from managed code,
2892 allways make a copy even for unicode strings. Fixes #81990.
2894 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
2896 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
2897 of byref generic inst types (bug #81997).
2899 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
2901 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
2902 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
2904 2007-07-02 Zoltan Varga <vargaz@gmail.com>
2906 * marshal.c (emit_marshal_string): Add support for unicode strings in
2907 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
2909 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
2911 * verify.c: field load/store are now verified, missing only access checks now
2913 2007-06-28 Martin Baulig <martin@ximian.com>
2915 * mono-debug.c (mono_debug_debugger_version): New public variable.
2917 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
2919 * locales.c: When constructing DateTimeFormat or NumberFormat for
2920 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
2921 MonoCultureInfo contructed from the current locale is always
2922 read-only and has UseUserOverride set to true. All MonoCultureInfo
2923 instances returned for GetCultures have both IsReadOnly and
2924 UseUserOverride set to true. Fixes part of bug #81930.
2926 2007-06-22 Jonathan Chambers <joncham@gmail.com>
2928 * icall-def.h: Update System.__ComObject icalls
2929 * marshal.c: Avoid managed transition (and object creation)
2930 when looking up COM interface in RCW.
2933 Code is contributed under MIT/X11 license.
2935 2007-06-22 Zoltan Varga <vargaz@gmail.com>
2937 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
2938 to avoid crashes during assembly unloading.
2940 2007-06-22 Raja R Harinath <rharinath@novell.com>
2942 Fix MethodInfo.IsGenericMethodDefinition
2943 * reflection.c (mono_reflection_bind_generic_method_parameters):
2944 Rearrange code to ensure we always uses a generic method definition.
2945 * class.c (mono_class_inflate_generic_method_full): Set
2946 'generic_container' field only for generic method definitions.
2947 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2948 Use presense of 'generic_container' field as indication of being a
2949 generic method definition.
2951 2007-06-21 Zoltan Varga <vargaz@gmail.com>
2953 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2955 * object-internals.h: Reflect changes in the layout of the managed Delegate
2958 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
2959 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
2960 runtime memory used by the dynamic method. Fixes #77146.
2962 2007-06-21 Dick Porter <dick@ximian.com>
2965 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
2966 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
2969 2007-06-21 Raja R Harinath <rharinath@novell.com>
2971 * reflection.c (method_encode_methodspec): Add a tripwire.
2972 * class.c (inflate_generic_type): The fully open generic type is
2973 not the same as the generic type definition.
2975 2007-06-21 Martin Baulig <martin@ximian.com>
2977 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
2979 * mono-debug-debugger.h
2980 (MonoDebuggerBreakpointInfo): Removed.
2981 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
2982 (mono_debugger_remove_breakpoint): Likewise.
2983 (mono_debugger_breakpoint_callback): Likewise.
2984 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
2986 2007-06-21 Raja R Harinath <rharinath@novell.com>
2988 * metadata.c (mono_metadata_lookup_generic_class): The fully open
2989 generic type is not the same as the generic type definition.
2990 * class.c (mono_generic_class_get_class): Likewise.
2992 2007-06-20 Geoff Norton <gnorton@customerdna.com>
2994 * icall.c: The second argument to
2995 System.Reflection.MethodBase.GetMethodFromHandleInternalType
2996 is a MonoType not a MonoClass.
2998 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
3000 * verify.c: support for function pointers in the verifier
3002 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
3004 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
3006 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
3008 * assembly.c: removed Mono.Data.SqliteClient from the list of
3009 forward-compatible assemblies as it breaks the ABI (bug #81899).
3011 2007-06-19 Raja R Harinath <rharinath@novell.com>
3013 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
3014 lookup/update with the loader lock.
3015 * reflection.c (mono_class_bind_generic_parameters): No need to
3016 protect mono_metadata_lookup_* with the loader lock.
3017 * class.c (inflate_generic_type): Likewise.
3019 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
3020 on a generic instantiated type.
3022 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
3024 *verify.c: produce meanfull error messages on verification error
3025 *verify.c: fixed some cases of verification errors reported as validation errors
3026 *pedump.c: fixed the error name array, now it shows validation errors properly
3027 *verify.h: fixed the contant that should be used for verification errors
3029 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3031 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
3032 for bug #77596, 81858 and 80743 (generics data structures on domain
3035 2007-06-15 Raja R Harinath <rharinath@novell.com>
3037 Avoid allocating 'MonoGenericContext' on the heap.
3038 * class-internals (_MonoMethodInflated::context): Make field
3039 inline, not a pointer.
3040 * loader.c (method_from_methodspec): Allocate 'new_context' on the
3041 stack. Use the context embedded within the inflated method as the
3042 hash key, rather than 'new_context'.
3043 * class.c (inflate_generic_context): Simplify. Return a struct
3044 rather than allocating on the heap.
3045 (mono_class_inflate_generic_method_full): Update to changes. Now,
3046 doesn't salt away a copy of the context -- simplifying the
3047 lifetime rules of a 'MonoGenericContext *'.
3048 (mono_method_get_context): Return pointer to embedded context.
3049 (setup_generic_array_ifaces): Allocate temporary context on stack.
3050 * reflection.c (inflate_mono_method): Likewise.
3051 (mono_reflection_bind_generic_method_parameters): Likewise.
3052 Use the context embedded within the inflated method as the hash key.
3054 Avoid a source of allocation of 'MonoGenericContext'.
3055 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
3056 and 'cached_context' fields into embedded 'MonoGenericContext' field.
3057 * class.c: Update to changes.
3058 (mono_generic_class_get_context): Simplify drastically. Now just
3059 returns a pointer to the field.
3060 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
3061 argument as a const pointer.
3062 (mono_metadata_generic_context_equal): Likewise.
3063 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
3066 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
3068 * verify.c improved the handling of brtrue/brfalse, factored out common code
3070 2007-06-14 Raja R Harinath <rharinath@novell.com>
3072 Kill MonoGenericMethod.
3073 * class-internals.h (MonoGenericContext::method_inst): Rename from
3074 'gmethod' and convert to a MonoGenericInst.
3075 (MonoGenericMethod): Remove.
3076 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
3077 * loader.c (method_from_methodspec): Update to changes. Use a
3078 MonoGenericContext as the key to the hashtable.
3079 * metadata.c (mono_metadata_generic_context_equal): Rename from
3080 'mono_metadata_generic_method_equal' and take MonoGenericContext.
3081 (mono_metadata_generic_context_hash): Likewise from
3082 'mono_metadata_generic_method_hash'. Change hash function.
3083 (mono_metadata_load_generic_params): Update to changes.
3084 (mono_get_shared_generic_method): Remove.
3085 * metadata-internals.h (mono_get_shared_generic_method): Remove.
3086 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
3087 (inflate_generic_context): Likewise.
3088 (mono_class_inflate_generic_method_full): Likewise.
3089 (setup_generic_array_ifaces): Likewise.
3090 (mono_class_create_from_typespec): Likewise.
3091 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
3092 (method_encode_methodspec): Update callsite.
3093 (reflection_methodbuilder_to_mono_method): Update to changes.
3094 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
3095 MonoGenericContext as the key to the hashtable.
3096 (inflate_mono_method): Update to changes.
3098 * class-internals.h (MonoGenericMethod::container): Remove.
3099 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
3101 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
3103 * profiler-private.h, profiler.c, profiler.h: added API to profile
3106 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
3108 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
3110 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
3112 * verify.c: method invocation is now validated, now we verify parameter types on stack.
3113 Fixed overflow and underflow not aborting the verification process.
3115 2007-06-13 Mark Probst <mark.probst@gmail.com>
3117 * class-internals.h (MonoStats): Added stats entries for dynamic
3120 2007-06-12 Zoltan Varga <vargaz@gmail.com>
3122 * loader.c (mono_free_method): Free header->locals and header->clauses.
3124 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
3127 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
3129 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
3131 2007-06-12 Raja R Harinath <rharinath@novell.com>
3133 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
3136 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
3138 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
3140 2007-06-11 Raja R Harinath <harinath@gmail.com>
3142 MonoGenericMethod on a diet
3143 * class-internals.h (_MonoMethodInflated::reflection_info): Move
3145 (_MonoGenericMethod::reflection_info): ... from here.
3146 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
3148 * reflection.c (inflate_mono_method): Likewise.
3149 (mono_reflection_bind_generic_method_parameters): Likewise.
3151 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
3153 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
3154 *verify.c: factored long ldarg forms to share code with short forms
3156 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
3158 *verify.c: fixed code formating factored some duplicate code
3161 *verify.h: fixed binary incompatibility introduced earlier
3163 *pedump.c: fixed formating
3165 2007-06-11 Raja R Harinath <harinath@gmail.com>
3167 Fix assertion when disassembling Mono.C5.dll
3168 * loader.c (method_from_methodspec): Avoid inflating a method
3169 twice with the same context. If the methodref is inflated, use
3170 the declaring method instead.
3172 * class.c (mono_class_from_generic_parameter): Fix case similar to
3173 bug #81830 handled below, but for method containers.
3175 2007-06-10 Raja R Harinath <harinath@gmail.com>
3177 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
3178 get_shared_generic_class. Directly inflate the instance.
3179 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
3180 (inflate_generic_class): Delete.
3181 (get_shared_generic_class): Delete. Move setting of
3182 'cached_class' and 'cached_context' ...
3183 * metadata.c (mono_metadata_lookup_generic_class): ... here.
3185 * metadata.c (mono_metadata_lookup_generic_class): Change
3186 signature to take the components of a MonoGenericClass rather than
3187 an allocated MonoGenericClass. Change semantics to be intern-like.
3188 * reflection.c (mono_class_bind_generic_parameters): Update to
3189 changes. Make locking region tighter.
3190 * class.c (inflate_generic_class): Update to changes.
3191 (get_shared_generic_class): Likewise.
3192 * metadata-internals.h: Likewise.
3194 * reflection.c (mono_class_bind_generic_parameters): Take and
3195 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
3196 (mono_reflection_bind_generic_parameters): Use
3197 'mono_class_bind_generic_parameters' rather than duplicate the code.
3198 * class.c (mono_bounded_array_class_get): Update to changes.
3199 * object-internals.h: Likewise.
3201 * reflection.c (mono_class_bind_generic_parameters): Only support
3202 parameterizing generic type definitions. Remove support for other
3205 2007-06-08 Zoltan Varga <vargaz@gmail.com>
3207 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
3209 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
3210 in the dynamic case.
3212 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
3214 * threads.c: When cleaning up thread, reset the Background bit.
3217 2007-06-08 Jonathan Chambers <joncham@gmail.com>
3219 * metadata.c: Move variable declarations to top of scope.
3220 * verify.c: Move variable declarations to top of scope.
3222 Code is contributed under MIT/X11 license.
3224 2007-06-08 Raja R Harinath <rharinath@novell.com>
3226 * reflection.c (mono_class_bind_generic_parameters): Replace
3227 open-coded loop with mono_metadata_inflate_generic_inst.
3229 * class.c (get_shared_generic_class): Don't call
3230 mono_get_shared_generic_inst. Use the container's own
3233 * metadata.c (mono_metadata_load_generic_params): Move
3234 initialization of 'context' field here from ...
3235 * class.c (mono_class_create_from_typedef): ... here, and ...
3236 * loader.c (mono_get_method_from_token): ... here.
3238 * class.c (get_shared_generic_class): Rename from
3239 mono_get_shared_generic_class and make static.
3240 (mono_get_shared_generic_inst): Move to metadata.c.
3241 * loader.c (mono_get_shared_generic_method): Likewise.
3242 * class-internals.h, metadata-internals.h: Update to changes.
3245 * class.c (mono_class_from_generic_parameter): Don't assume a
3246 generic container owner exists. Generic containers from monodis
3249 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
3251 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
3252 * verify.h: new typedefs to returns the non-verifiable status
3253 * verify.c: initial implementation of generics, stack merging and object compatibility check
3255 2007-06-06 Mark Probst <mark.probst@gmail.com>
3257 * class.c, image.c, class-internals.h (MonoImage): class_cache is
3258 a MonoInternalHashTable again (fixed bug in internal hash table
3261 2007-06-06 Mark Probst <mark.probst@gmail.com>
3263 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
3264 MonoInternalHashTable again (fixed bug in internal hash table
3267 2007-06-06 Mark Probst <mark.probst@gmail.com>
3269 * class.c, image.c, class-internals.h, domain.c,
3270 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
3271 changes. Have to figure out what makes them break the SWF
3274 2007-06-04 Mark Probst <mark.probst@gmail.com>
3276 * class.c, image.c, class-internals.h (MonoImage): class_cache is
3277 a MonoInternalHashTable now.
3279 2007-06-04 Mark Probst <mark.probst@gmail.com>
3281 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
3282 MonoInternalHashTable now.
3284 2007-05-31 Zoltan Varga <vargaz@gmail.com>
3286 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
3289 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
3291 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
3292 dependent trampoline.
3294 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3296 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
3298 2007-05-29 Robert Jordan <robertj@gmx.net>
3300 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
3302 2007-05-28 Zoltan Varga <vargaz@gmail.com>
3304 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
3306 2007-05-25 Jonathan Chambers <joncham@gmail.com>
3308 * marshal.c: Fix interface lookup loops for
3309 cominterop_get_com_slot_for_method and
3310 cominterop_get_method_interface. Only need to lookup
3311 if type is a class, else use interface type method is on.
3313 Code is contributed under MIT/X11 license.
3315 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
3317 * reflection.c: HasSecurity can be present even if no specially
3318 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
3319 SecurityAttribute). Fix CAS regression tests on buildbot.
3321 2007-05-24 Jonathan Chambers <joncham@gmail.com>
3323 * appdomain.c: Add configure checks for header files.
3324 * image.c: Add configure checks for header files.
3325 * file-io.c: Add configure checks for header files.
3326 * debug-mono-symfile.c: Add configure checks for header files.
3327 * threadpool.c: Add configure checks for header files.
3328 * console-io.c: Add configure checks for header files.
3329 * profiler.c: Add configure checks for header files.
3330 * rawbuffer.c: Add configure checks for header files.
3331 * icall.c: Add configure checks for header files.
3332 * rand.c: Add configure checks for header files.
3333 * socket-io.c: Add configure checks for header files.
3335 Code is contributed under MIT/X11 license.
3337 2007-05-24 Zoltan Varga <vargaz@gmail.com>
3339 * reflection.c (mono_custom_attrs_from_builders): Remove the
3340 assertion as it breaks the build.
3342 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
3344 * reflection.c (lookup_custom_attr): Make a copy here too.
3346 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
3349 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
3352 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
3355 2007-05-22 Zoltan Varga <vargaz@gmail.com>
3357 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
3358 (load_cattr_value): Ditto.
3360 2007-05-20 Zoltan Varga <vargaz@gmail.com>
3362 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
3364 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
3366 * threads.c: In "start_wrapper", set apartment_state to MTA if
3367 apartment_state is Unknown and we're running on 2.0 profile or
3369 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
3370 to main method, then set apartment_state to Unknown on 1.0 profile,
3371 and MTA on 2.0 profile.
3373 2007-05-16 Jb Evain <jb@nurv.fr>
3375 * class-internals.h (MonoDefaults): Add an attribute_class and
3376 customattribute_data_class.
3377 * domain.c (mono_init_internal): Populate them.
3378 * reflection.c: Use them to remove duplicates. Make a vew
3379 MonoClass variables `static'.
3381 2007-05-15 Massimiliano Mantione <massi@ximian.com>
3383 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
3384 step in implementing IMT, so that all isinst checks now can go
3386 This was needed because vtables for TransparentProxy need to look
3387 like the vtable of the "target" class, so they need to point to
3388 its interface bitmap directly.
3390 * object.c: inside "mono_class_create_runtime_vtable" and
3391 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
3393 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
3395 * object-internals.h
3396 culture-info.h : added territory field in MonoCulture and
3397 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
3398 * locales.c : fill territory field above too.
3399 * culture-info-table.h : regenerated.
3401 2007-05-12 Zoltan Varga <vargaz@gmail.com>
3403 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
3406 2007-05-11 Jonathan Chambers <joncham@gmail.com>
3408 * object.c: Always initialize apartment, even if
3409 there is no custom attributes on entry point.
3411 Code is contributed under MIT/X11 license.
3413 2007-05-10 Jonathan Chambers <joncham@gmail.com>
3415 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
3416 * metadata.c: If no encoding is set, check for unicode
3419 Code is contributed under MIT/X11 license.
3421 2007-05-09 Jonathan Chambers <joncham@gmail.com>
3423 * threads.c: Handle if mono_thread_current returns NULL
3425 Code is contributed under MIT/X11 license.
3427 2007-05-09 Jonathan Chambers <joncham@gmail.com>
3429 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
3430 in start_wrapper. Added mono_thread_init_apartment_state and
3431 mono_thread_cleanup_apartment_state.
3432 * object.c: Initialize thread apartment state on main thread
3433 by checking for STAThreadAttribute on entry point.
3434 * object-internals.h: Add apartment_state field to MonoThread.
3435 * threads-types.h: Add unmanaged definition of
3436 System.Threading.ApartmentState, MonoThreadApartmentState.
3438 Code is contributed under MIT/X11 license.
3440 2007-05-08 Jonathan Chambers <joncham@gmail.com>
3442 * class.c: Fix windows build.
3443 * class-internals.h: Fix windows build.
3445 Code is contributed under MIT/X11 license.
3447 2007-05-08 Robert Jordan <robertj@gmx.net>
3449 * process.c (CreateProcess_internal):
3450 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
3451 .CreateNoWindow was specified. Fixes #81496.
3453 2007-05-08 Massimiliano Mantione <massi@ximian.com>
3455 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
3456 step in implementing IMT, replaced it with two compact arrays
3457 (interfaces_packed and interface_offsets_packed) and a bitmap that
3458 is used for isinst checks (interface_bitmap).
3460 * class.c: (compare_interface_ids): compare function to pass to
3461 bsearch when looking for an interface with a given id.
3462 (mono_class_interface_offset): reimplemented using bsearch on
3463 interfaces_packed, getting the offset from interface_offsets_packed.
3464 (print_implemented_interfaces): utility debugging function.
3465 (setup_interface_offsets): reworked to initialize interfaces_packed,
3466 interface_offsets_packed and interface_bitmap.
3468 * object.c: replaced all accesses to "MonoClass.interface_offsets"
3469 with uses of interfaces_packed and interface_offsets_packed.
3471 2007-05-08 Massimiliano Mantione <massi@ximian.com>
3473 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
3474 mono_class_interface_offset prototype to wrap all accesses to
3475 "MonoClass.interface_offsets".
3477 * class.c: Implemented mono_class_interface_offset, and wrapped all
3478 accesses to "MonoClass.interface_offsets".
3480 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
3481 "MonoClass.interface_offsets".
3483 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
3485 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
3486 GetMethodFromHandle overloads (bug #78637).
3488 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3490 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
3491 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
3493 2007-05-01 Zoltan Varga <vargaz@gmail.com>
3495 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
3498 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
3500 (mono_custom_attrs_from_index): Ditto.
3502 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
3505 2007-04-30 Zoltan Varga <vargaz@gmail.com>
3507 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
3508 is now allocated from a mempool.
3510 2007-04-28 Zoltan Varga <vargaz@gmail.com>
3512 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
3513 caller holds threads_lock, leading to deadlocks. Fixes #81476.
3515 2007-04-26 Zoltan Varga <vargaz@gmail.com>
3517 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
3518 mono_loader_clear_error () too late. Fixes #81463.
3520 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
3522 * culture-info-table.h : regenerated.
3524 2007-04-25 Zoltan Varga <vargaz@gmail.com>
3526 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
3529 2007-04-25 Dick Porter <dick@ximian.com>
3531 * Makefile.am: Put the mingw enforced-optimisation back into the
3532 PLATFORM_WIN32 section.
3534 2007-04-24 Zoltan Varga <vargaz@gmail.com>
3536 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
3539 * image.c (mono_image_load_module): New API function to load a module reference.
3541 * image.c (load_modules): Load modules lazily. Fixes #80812.
3543 * class.c (mono_class_from_typeref): Use mono_image_load_module.
3545 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
3547 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
3548 to mono_image_load_module_dynamic.
3550 2007-04-23 Jonathan Chambers <joncham@gmail.com>
3552 * marshal.c: Fix calling convention for CCW on non-windows
3553 platforms. STDCALL on windows, CDECL everywhere else to work
3554 with XPCOM and MainWin COM.
3556 Code is contributed under MIT/X11 license.
3558 2007-04-23 Martin Baulig <martin@ximian.com>
3563 (method_from_memberref): Added `gboolean *used_context' argument.
3564 (mono_get_method_from_token): Likewise.
3565 (mono_get_method_full): Don't insert the method in the cache when
3566 `used_context' is true.
3568 2007-04-23 Raja R Harinath <rharinath@novell.com>
3570 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
3572 * reflection.c (mono_reflection_bind_generic_parameters): Don't
3573 create new MonoTypes for returned types.
3574 * class.c (mono_generic_class_get_class): Export mono-internal.
3575 * class-internals.h: Update to changes.
3577 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
3579 * threadpool.c, threadpool.h, icall-def.h: patch from
3580 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
3582 2007-04-18 Zoltan Varga <vargaz@gmail.com>
3584 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
3586 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
3588 * threads.c (mono_thread_get_stack_bounds): New helper function.
3590 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
3591 Correctly compute stack bounds when attaching. Fixes #81394.
3593 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
3595 * reflection.c: fix handling of doubles in custom attributes
3596 for the arm-fpa format (bug #81368).
3598 2007-04-18 Raja R Harinath <rharinath@novell.com>
3600 * reflection.c (assembly_add_win32_resources): Mildly relax an
3601 bounds check to let the end pointer point just past the end of the
3602 allocated buffer. (may fix #81384)
3604 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
3606 * culture-info-table.h : regenerated.
3608 2007-04-07 Zoltan Varga <vargaz@gmail.com>
3610 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
3611 the thread is aborted early.
3613 2007-04-05 Dick Porter <dick@ximian.com>
3615 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
3616 FindFirstFile()/FindNextFile() to find entries. This lets the
3617 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
3620 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
3622 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
3624 2007-04-04 Martin Baulig <martin@ximian.com>
3627 (mono_method_desc_full_match): Add support for nested classes.
3629 2007-04-02 Zoltan Varga <vargaz@gmail.com>
3631 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
3633 2007-04-01 Zoltan Varga <vargaz@gmail.com>
3635 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
3636 waiting for too many threads.
3638 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
3640 * environment.c: Fix return value check on uname so we can get the
3641 executing version on Solaris operating systems.
3643 2007-03-28 Jb Evain <jbevain@gmail.com>
3645 * class.c (mono_type_get_name_recurse): Complete the
3646 fix for the creation of assembly qualified names for
3647 pointer types. Fixes #81208.
3649 2007-03-27 Dick Porter <dick@ximian.com>
3651 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
3652 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
3656 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
3657 the value of ReleaseMutex().
3659 2007-03-27 Dick Porter <dick@ximian.com>
3661 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
3662 in little-endian order, not network endian, so must be converted
3663 to host endian here. Fixes bug 80593.
3665 2007-03-22 Jb Evain <jbevain@gmail.com>
3667 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
3668 qualified names for pointer types. Fixes #81208.
3670 2007-03-21 Jonathan Chambers <joncham@gmail.com>
3672 * marshal.c: Add support for PreserveSigAttribute.
3674 Code is contributed under MIT/X11 license.
3676 2007-03-14 Zoltan Varga <vargaz@gmail.com>
3678 * process.c: Fix endianness issues. Fixes #81126.
3680 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
3681 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
3683 * image.c (mono_image_lookup_resource): Make this work on big-endian
3684 machines.Change API contract so the caller needs to free the return value.
3686 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
3689 2007-03-14 Martin Baulig <martin@ximian.com>
3691 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
3692 mono_type_get_desc() as well.
3694 2007-03-13 Jonathan Chambers <joncham@gmail.com>
3696 * icall.c: Fix environ access in VS.
3698 2007-03-13 Alp Toker <alp@atoker.com>
3700 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
3701 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
3704 2007-03-12 Zoltan Varga <vargaz@gmail.com>
3706 * reflection.c (mono_reflection_create_dynamic_method): Add support for
3707 circular references among dynamic methods. Fixes #81091.
3709 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
3711 2007-03-09 Martin Baulig <martin@ximian.com>
3713 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
3715 2007-03-09 Jonathan Chambers <joncham@gmail.com>
3717 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
3718 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
3720 Code is contributed under MIT/X11 license.
3722 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
3724 * loader.c: Reapply patch for bug #79424.
3726 2007-03-06 Zoltan Varga <vargaz@gmail.com>
3728 * metadata.c (mono_type_to_unmanaged): Only convert object to
3729 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
3731 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
3733 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
3734 (and incorrectly set) is_reference field from MonoGenericInst.
3736 2007-03-06 Zoltan Varga <vargaz@gmail.com>
3738 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
3741 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
3743 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
3745 2007-03-05 Miguel de Icaza <miguel@novell.com>
3747 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
3748 FileOptions.1 value to mean "temporary", map that to
3749 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
3753 2007-03-03 Marek Habersack <mhabersack@novell.com>
3755 * appdomain.c: implement MS .Net style shadow copying. Copies of
3756 the assemblies are made in a subdirectory of the dynamic base
3757 directory, the assembly names are preserved.
3758 Copy .mdb and .config files along with the assemblies being shadowed.
3760 2007-02-28 Zoltan Varga <vargaz@gmail.com>
3762 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
3763 (emit_marshal_handleref): Ditto.
3765 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
3766 on Visual C++. Fixes #80671.
3768 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3770 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
3771 for clone operations.
3773 2007-02-28 Zoltan Varga <vargaz@gmail.com>
3775 * marshal.c: Fix warnings.
3777 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
3779 * loader.c: allow case-insensitive matching of the dll name
3780 in dllmap handling when prefixed with "i:".
3782 2007-02-20 Jonathan Chambers <joncham@gmail.com>
3784 * threads.c: Fix #ifdef for dummy_apc function for VS.
3786 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3788 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
3790 2007-02-19 Massimiliano Mantione <massi@ximian.com>
3791 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
3792 giving precedence to the methods with a fully qualified name
3793 (InterfaceName.MethodName) when building the interface sections
3796 2007-02-16 Dick Porter <dick@ximian.com>
3798 * threadpool.c (append_job): Fix fast-path array handling, so it's
3799 less likely the array will grow exponentially when the load is
3802 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3804 * metadata-internals.h, loader.c: fix dllmap lookup order
3805 for non-function maps, too, and prepare for fallback code.
3807 2007-02-12 Robert Jordan <robertj@gmx.net>
3809 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
3810 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
3811 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
3812 GlobalFree. Fixes a part of bug #77075.
3814 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
3816 * loader.c: implemented typedef parent in field memberref.
3818 2007-02-11 Jonathan Chambers <joncham@gmail.com>
3820 * marshal.c: Fix warnings and remember to call Release on
3823 Code is contributed under MIT/X11 license.
3825 2007-02-10 Miguel de Icaza <miguel@novell.com>
3827 * class-internals.h: Add MonoHandleRef definition, and
3828 handleref_class to mono_defaults.
3830 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
3831 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
3833 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
3834 (do nothing on this stage)
3835 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
3836 (emit_marshal_handleref): New method, used for argument handling
3839 2007-02-08 Jonathan Chambers <joncham@gmail.com>
3841 * class.c (mono_class_setup_parent): Lazily init com types.
3842 * domain.c (mono_init_internal, mono_init_com_types): Lazily
3844 * object.c (mono_remote_class_vtable): Lazily init com types.
3845 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
3846 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
3847 * domain-internals.h: Expose mono_init_com_types.
3848 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
3849 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
3850 Add support for COM Callable Wrapper marshalling.
3851 * marshal.h: Add icall definitions.
3852 * gc.c: Handle freeing of CCWs in finalizer code.
3854 Code is contributed under MIT/X11 license.
3856 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
3858 * reflection.c: changed all the signature encoding code to use
3859 a variable-sized buffer.
3861 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3863 * marshal.c: locking fixes: never take the loader lock
3864 or other runtime locks when holding the marshal lock
3867 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
3869 * marshal.c: make the delegate function pointer mapping
3870 work for the moving GC.
3872 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
3874 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
3877 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3879 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
3882 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3884 * threadpool.c: made the code moving-GC safe.
3886 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
3888 * assembly.c, boehm-gc.c, class-internals.h, class.c,
3889 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
3890 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
3892 * reflection.c: warning cleanup, some threading and moving GC fixes.
3894 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
3896 * class.c, loader.c: create the needed Set/Get/Address array methods
3897 as well as the .ctors in mono_class_init (), fixes bug #80567.
3899 2007-01-24 Zoltan Varga <vargaz@gmail.com>
3901 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
3902 we doesn't decrease its alignment. Should fix the sparc build.
3904 2007-01-24 Dick Porter <dick@ximian.com>
3907 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3908 Create the returned object if we need to ignore an unsupported
3909 socket option. Fixes a segfault reported by Atsushi.
3911 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3913 * class.c, object.c: restrict GC-tracked fields to
3914 UIntPtr fields used inside corlib, so we provide better
3915 type info to the GC and also allow broken packing as in
3918 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
3920 * sgen-gc.c: removed duplicated function.
3922 2007-01-19 Miguel de Icaza <miguel@novell.com>
3924 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
3925 value that means that the value is not supported, but that we
3926 should not return a failure, but instead report this as a
3927 successful operation.
3929 2007-01-19 Raja R Harinath <rharinath@novell.com>
3931 Fix tests/bug79956.2.il
3932 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
3933 (mono_generic_class_get_class): If the generic definition in an
3934 enum, copy over other fields related to it.
3936 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3938 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
3939 genericinst enums (bug #79215).
3941 2007-01-17 Massimiliano Mantione <massi@ximian.com>
3942 * class.c: Fix bug 80307.
3944 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
3946 * image.c: if the file table is not present, try to load
3947 all the modules, since we don't have info about them
3948 having or not metadata (bug #80517).
3949 * assembly.c: allow mono_assembly_load_references () to
3950 work for netmodules.
3952 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3954 * image.c, metadata-internals.h, object.c: execute module
3955 cctors when running on the 2 runtime if present (bug #80487).
3957 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
3959 * icall.c: optimized InitializeArray() on bigendian.
3961 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
3963 * icall.c: fix for the broken ARM FPA double format.
3965 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3967 * icall.c: handle endian issues for r4 and r8 types, too, in
3968 the InitializeArray() icall.
3970 2007-01-15 Miguel de Icaza <miguel@novell.com>
3972 * loader.c (mono_loader_error_prepare_exception): Clear the error
3973 once we have extracted the information from it, do this before we
3974 call into the JIT's class loading mechanisms.
3976 * object.c (mono_class_create_runtime_vtable): Do not clear the
3977 loader error before calling mono_class_get_exception_for_failure
3978 as the loader error is needed inside
3979 mono_class_get_exception_for_failure to throw the error (thinko).
3983 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3985 * reflection.c: align fields rva data so it's faster to load at
3988 2007-01-12 Raja R Harinath <rharinath@novell.com>
3990 Prepare to simplify GenericMethod handling.
3991 * class-internals.h (mono_method_get_context): New accessor function.
3992 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
3993 rather than directly accessing '->context' field.
3995 * class-internals.h (_MonoGenericParam.method): Move ...
3996 (_MonoGenericContainer): ... here. Add into union with klass field.
3997 * class.c, icall.c, loader.c, metadata.c, reflection.c:
4000 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
4002 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
4003 the wrapper type enum and reduce relocations.
4005 2007-01-12 Raja R Harinath <rharinath@novell.com>
4007 * reflection.c (inflate_mono_method): Reuse method instantiation
4008 from the generic method, if available.
4010 2007-01-11 Jonathan Chambers <joncham@gmail.com>
4012 * marshal.c (emit_marshal_variant): Fix conv_arg
4013 type in last commit, based on whether parameter is byref.
4015 2007-01-11 Jonathan Chambers <joncham@gmail.com>
4017 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
4019 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
4020 MONO_TYPE_OBJECT back for VARIANT support.
4022 2007-01-11 Jonathan Chambers <joncham@gmail.com>
4024 * marshal.c, marshal.h, icall-def.h: Implement
4025 Marshal.ReAllocCoTaskMem.
4027 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
4029 * marshal.c: memory retention fixes: use the proper
4030 image cache for runtime_invoke method lookups.
4032 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4034 * mempool.c: added code to help debug mempool allocations.
4036 2007-01-11 Dick Porter <dick@ximian.com>
4038 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
4039 support (experimenting with faking it with IP_MTU_DISCOVER for
4040 systems that don't have IP_DONTFRAGMENT.)
4041 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
4044 * icall-def.h: new System.Net.Sockets.Disconnect icall.
4046 * socket-io.h: Add new fields to MonoSocketAsyncResult
4047 corresponding to the new ones in Socket.cs.
4049 2007-01-11 Raja R Harinath <rharinath@novell.com>
4051 Fix IronPython regression mentioned in #80249
4052 * metadata.c (do_mono_metadata_parse_generic_class): Clear
4053 'cached_context' field, since it may have been initialized as a
4054 side-effect of metadata parsing.
4056 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
4057 (_MonoGenericClass.cached_class): Move here and rename from lone
4058 remaining field of ...
4059 (_MonoInflatedGenericClass): ... this. Remove.
4060 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
4063 Fix mcs/tests/test-128.cs regression.
4064 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
4065 2007-01-10 change below.
4066 [MONO_TYPE_OBJECT]: Recurse into array case.
4068 2007-01-11 Raja R Harinath <harinath@gmail.com>
4070 * class-internals.h (mono_get_inflated_generic_class): Remove.
4071 * class.c (mono_get_inflated_generic_class): Remove.
4072 (mono_generic_class_get_class): Rename from
4073 mono_class_create_generic.
4074 (mono_class_from_mono_type) [GENERICINST]: Use it.
4075 * reflection.c, metadata.c: Update to changes. Use
4076 'mono_class_from_mono_type'.
4078 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
4080 * reflection.c: use passed type when encoding an array element
4081 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
4083 2007-01-09 Robert Jordan <robertj@gmx.net>
4085 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
4086 result arguments (someDelegate.EndInvoke (unrelatedAres)).
4089 2007-01-09 Raja R Harinath <rharinath@novell.com>
4091 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
4093 * object.c (set_value): Avoid aliasing between type->data.klass
4094 and type->data.generic_class.
4096 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
4098 2007-01-08 Raja R Harinath <rharinath@novell.com>
4100 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
4101 between type->data.klass and type->data.generic_class.
4103 2007-01-08 Lluis Sanchez <lluis@ximian.com>
4105 * marshal.c: In MS.NET, StringBuilder objects are not copied by
4106 value in out parameters.
4108 2007-01-08 Raja R Harinath <rharinath@novell.com>
4110 Simplify invariant for MonoGenericClass::klass field.
4111 * class.c (mono_class_create_generic): Verify 'klass' is null.
4112 * metadata.c (do_mono_metadata_parse_generic_class): Don't
4113 initialize 'klass' field.
4115 2007-01-05 Raja R Harinath <rharinath@novell.com>
4117 Ongoing work to avoid redundant data and simplify invariants.
4118 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
4119 'generic_class', and change type to a GenericInst.
4120 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
4121 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
4123 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
4125 * class.c : skip io-layer under PLATFORM_WIN32.
4127 2007-01-03 Tor Lillqvist <tml@novell.com>
4129 Fix #80305: In a bundled executable, look in the bundled exe
4130 assembly to determine the runtime version. Add the possibility to
4131 bundle also the machine.config file.
4133 * assembly.c (mono_assembly_open_from_bundle): Make
4134 non-static. Allow being called even if we have no bundled
4135 assemblies, and return NULL right away in that case.
4137 * domain-internals.h: Declare mono_assembly_open_from_bundle()
4140 * domain.c (app_config_parse): Take an assembly exe file name as
4141 parameter instead of a config file name. Check for a bundled
4142 config file for that assembly by calling
4143 mono_config_string_for_assembly_file() (see below) before looking
4144 for one in the file system.
4145 (get_runtimes_from_exe): Corrsponding change to call of
4147 (get_runtimes_from_exe): Check for bundled assembly exe file first
4148 by calling mono_assembly_open_from_bundle(). If no bundled
4149 assembly exe file is found, call mono_image_open() as before to
4150 look it up in the file system.
4152 * mono-config.c: Add variable bundled_machinec_onfig.
4153 (mono_config_string_for_assembly_file): New function.
4154 (mono_config_for_assembly): Move code snippet that looks for a
4155 bundled assembly .config file into the above new function. Call
4157 (mono_register_machine_config, mono_get_machine_config): New
4158 functions to set and retrieve
4160 * assembly.h: Declare mono_register_machine_config().
4162 * mono-config.h: Declare mono_get_machine_config() and
4163 mono_config_string_for_assembly_file().
4165 * icall.c: No declaration of environ necessary on Win32. It is
4166 declared (as a macro expanding to a function call) in stdlib.h.
4167 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
4168 New internal mono function. Returns the value of
4169 mono_get_machine_config() as a Mono string.
4171 * icall-def.h: Add get_bundled_machine_config().
4173 2007-01-04 Raja R Harinath <rharinath@novell.com>
4175 Remove redundant field
4176 * class-internals.h (_MonoGenericContext.container): Remove field.
4177 * loader.c (mono_method_get_signature_full): Don't parse a
4178 "container" for a signature parse when the signature is inflated
4180 (method_from_methodspec): Likewise, for a generic_inst.
4181 * class.c, metadata.c, reflection.c: Update to changes.
4183 2006-01-04 Raja R Harinath <rharinath@novell.com>
4185 * class-internals.h (_MonoGenericClass): Rename 'context' field to
4186 'cached_context', and change semantics -- it starts off NULL, and
4187 is initialized on demand.
4188 * class.c (mono_generic_class_get_context): New accessor to
4189 replace 'context' field accesses.
4190 (mono_class_get_context): New helper.
4191 (*): Update to changes.
4192 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
4194 2007-01-03 Miguel de Icaza <miguel@novell.com>
4196 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
4197 before the memcpy. Fixes Marshal2 regression.
4199 2007-01-02 Jb Evain <jbevain@gmail.com>
4201 * blob.h: add a MONO_TYPE_ENUM definition
4202 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
4203 fix the encoding of arrays of enums in custom attributes.
4207 2007-01-01 Miguel de Icaza <miguel@novell.com>
4209 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
4210 string is null terminated, but only cut the string short if it
4211 overflows the buffer.
4213 (mono_string_to_byvalstr): Also fix this routine. The code here
4214 was not properly terminating a string (it was only terminated
4215 because of the previous catch-all memset).
4217 I left the memset, because I do not know if applications expect
4218 the runtime to clear this region.
4222 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4223 Clear the error before returning to unmanaged code to prevent the
4224 runtime from being confused later on (fixes 80420).
4225 (ves_icall_type_from_name): Always call mono_loader_clear_error
4226 after parsing a type that could have failed.
4227 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
4229 * loader.c (mono_loader_clear_error): Fix indentation.
4231 2006-12-28 Martin Baulig <martin@ximian.com>
4233 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
4235 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
4237 * reflection.c: patch from Rolf Bjarne Kvinge to fix
4238 getting a token for an EnumBuilder.
4240 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
4242 * reflection.c: be more careful in case resource generation
4243 fails to create the data array.
4245 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
4247 * sgen-gc.c: write barrier for clone and fix unregister handles.
4249 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4251 * reflection.c: some fixes needed in the generics code for the moving GC.
4253 2006-12-22 Robert Jordan <robertj@gmx.net>
4255 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
4256 account. Fixes bug #80299.
4258 2006-12-21 Raja R Harinath <rharinath@novell.com>
4260 Fix WaitHandle usage in delegates.
4261 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
4262 * object.c (mono_wait_handle_new): Use the property set method to
4263 initialize the handle.
4264 (mono_wait_handle_get_handle): New.
4265 * threadpool.c (mono_async_invoke): Use it.
4266 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
4268 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
4270 2006-12-21 Jonathan Chambers <joncham@gmail.com>
4272 * marshal.c (emit_marshal): Call emit_marshal_variant and
4273 emit_marshal_com_interface when applicable.
4274 (emit_marshal_variant, emit_marshal_com_interface): Add
4275 methods for this case and remove if's from emit_marshal_object.
4277 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
4279 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
4281 2006-12-19 Jonathan Chambers <joncham@gmail.com>
4283 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
4284 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
4285 and GlobalFree on Windows. Remove FIXME.
4287 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
4289 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
4290 implementation for managed objects.
4292 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4294 * object.c: implemented code to be used for checking
4295 that no reference field overlaps with non-references.
4297 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4299 * threadpool.c: fix queue code to be compatible with the
4302 2006-12-18 Miguel de Icaza <miguel@novell.com>
4304 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
4305 in structures by throwing ArgumentNullException.
4307 (emit_marshal_safehandle): Also when they are null parameters.
4309 (emit_marshal_safehandle): Add support for ref
4310 SafeHandles parameters
4312 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4314 * profiler.c: updated to use the mono-dl API instead of
4317 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4319 * profiler.c: updated to use the mono-dl dynamic loading
4320 API instead of gmodule.
4322 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
4324 * profiler.c: use readlink, older versions of glib don't have
4325 g_file_read_link ().
4327 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4329 * profiler.c: try to detect the path to mono if libc fails to provide
4330 a useful name (bug #80286).
4332 2006-12-16 Raja R Harinath <rharinath@novell.com>
4335 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
4336 instance, use the generic type definition instead.
4337 (ves_icall_Type_GetNestedTypes): Likewise.
4338 * class.c (mono_class_create_generic): Always set the
4339 nested_classes of a generic instance to NULL, even if the generic
4340 type definition has nested types.
4342 2006-12-15 Jonathan Chambers <joncham@gmail.com>
4344 * marshal.c (mono_string_from_bstr): Revert previous Windows change
4347 2006-12-15 Miguel de Icaza <miguel@novell.com>
4349 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
4350 my arguments were in the wrong order. I also fixed the Windows
4351 version which seems to have had the same issue.
4353 (mono_free_bstr): On Unix, this is g_free.
4354 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
4355 conversions (for the tests in corlib to pass).
4357 2006-12-14 Miguel de Icaza <miguel@novell.com>
4359 * marshal.c (emit_ptr_to_object_conv): For now, ignore
4360 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
4361 exception if a ref SafeHandle in a struct has changed).
4363 (emit_struct_conv): Do not perform layout checks for classes
4364 derived from SafeHandle, as those are specially handled.
4366 (emit_object_to_ptr_conv): Add support for
4367 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
4369 (emit_marshal_safehandle): Implement conversion of return values
4370 of safehandles (MARSHAL_ACTION_CONV_RESULT).
4372 * threads.c: WaitHandle now is compiled with two different handles
4373 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
4376 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
4377 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
4378 these routines to cope with both kinds of fields.
4380 2006-12-12 Miguel de Icaza <miguel@novell.com>
4382 * metadata.c (mono_type_to_unmanaged): Handle the case where
4383 type->data.klass is a SafeHandle, and in that case, return the
4384 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
4385 MONO_MARSHAL_CONV_SAFEHANDLE.
4387 2006-12-11 Miguel de Icaza <miguel@novell.com>
4389 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
4390 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
4391 calling emit_marshal_object.
4393 (emit_marshal_safehandle): Implement marshalling of
4394 SafeHandle parameters (no ref support yet).
4396 (MarshalAction): Document the defines as I implement
4397 them for SafeHandle.
4399 (emit_marshal_object): indentation police.
4401 * class-internals.h: Define MonoSafeHandle.
4402 Add safehandle_class to MonoDefaults type.
4404 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
4405 list of classes to check for fields.
4407 * domain.c (mono_init_internal): Add SafeHandle to the list of
4408 mono_defaults loaded.
4410 2006-12-15 Raja R Harinath <rharinath@novell.com>
4413 * reflection.c (mono_reflection_bind_generic_parameters): If the
4414 generic type definition is a type builder, ensure that it is fully
4415 initialized before instantiating it. Kill some dead code.
4417 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
4419 * object.c: clear the loader_error () before loading
4420 more metadata stuff (bug #80258).
4422 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
4424 * icall.c, icall-defs.h: type modifiers icalls for
4425 parameters and properties.
4427 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4429 * object.c, icall.c: fixed warnings.
4431 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4433 * marshal.c: fixed a couple of leaks and coding style in a few places.
4435 2006-12-08 Dick Porter <dick@ximian.com>
4437 * process.c: Cope with NULL ProcessStartInfo arguments on windows
4438 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
4441 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4443 * process.c: ProcessStartInfo may have only filename set and
4444 arguments can be NULL.
4446 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4448 * icall.c: fix leak found by Robert Jordan.
4450 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4452 * marshal.c, marshal.h: generate managed method to access an element
4453 of a multi-dimensional array.
4455 2006-11-30 Paolo Molaro (lupus@ximian.com)
4457 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
4459 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4461 * icall.c: back out GetFields () fix until the serialization code is
4462 fixed to not depend on the incorrect behaviour.
4464 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
4466 * profiler.c: provide defaults if none are set.
4468 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4470 * Makefile.am, attrdefs.h: new public header file with
4471 constants for attributes for use by embedders.
4473 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4475 * icall.c: GetFields () fix for bug #80064.
4477 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
4479 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
4480 removed long unused icalls.
4482 2006-11-27 Jonathan Chambers <joncham@gmail.com>
4485 (mono_marshal_emit_managed_wrapper): Level of indirection for
4486 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
4487 can be generated without a delegate class.
4488 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
4490 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4492 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4494 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
4497 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4499 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
4500 icall-def.h: added icalls needed by System.GC.
4502 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
4504 * loader.c: ensure the class in catch clauses is handled
4505 correctly for generics methods (fixes bug#79980).
4507 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4509 * monitor.h, monitor.c: added mono_locks_dump () function
4510 to help debug deadlocks involving managed locks.
4512 2006-11-13 Dick Porter <dick@ximian.com>
4514 * file-io.c (get_file_attributes): If the file is a symlink try
4515 and get the stat data for the target, but also add the
4516 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
4517 the specs for the windows symlink support, but will probably have
4518 to be reworked when I have test data from a vista machine. Fixes
4521 2006-11-13 Dick Porter <dick@ximian.com>
4523 * gc.c (mono_domain_finalize):
4524 * marshal.c (mono_delegate_begin_invoke):
4525 * threadpool.c (socket_io_init, mono_thread_pool_init)
4526 (mono_thread_pool_finish):
4527 * monitor.c (mono_monitor_try_enter_internal):
4528 * threads.c (mono_thread_resume, mono_thread_init)
4529 (mono_thread_suspend_all_other_threads)
4530 (mono_thread_execute_interruption):
4531 * appdomain.c (mono_domain_unload): Check for NULL error returns
4532 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
4535 2006-11-11 Miguel de Icaza <miguel@novell.com>
4538 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
4539 Only close the handle if the value of the handle is not
4540 INVALID_HANDLE_VALUE. This just makes the process a bit more
4543 Improvement for #75733, so that we do not run into this problem.
4546 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
4547 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
4548 internal variables. Fixes #79462
4551 2006-11-09 Dick Porter <dick@ximian.com>
4553 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4554 Use poll() not select(). Fixes bug 79397.
4556 2006-11-09 Raja R Harinath <rharinath@novell.com>
4559 * assembly.c (mono_assembly_load_from_full): Check that the given
4560 image has an assembly manifest.
4562 2006-11-09 Ankit Jain <jankit@novell.com>
4564 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
4565 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
4566 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
4568 2006-11-07 Dick Porter <dick@ximian.com>
4570 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4571 Put the old resolver behaviour back for pre-2.0 profiles.
4573 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
4575 * threadpool.c: precise GC and locking fixes.
4577 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
4579 * class.c: don't load types that have an explicit unaligned
4580 managed reference. Provide better info in the TypeLoad exception.
4581 Part of the fix for bug #79744.
4582 * object.c: use the correct check for class type load issues.
4584 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4586 * class.c: enforce alignment of fields with managed references
4587 even when Pack=1 is forced by the user (bug #77788).
4589 2006-11-03 Dick Porter <dick@ximian.com>
4591 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4592 If the address reverse lookup fails, return it as the hostname
4593 anyway. Fixes bug 79721.
4595 2006-11-03 Dick Porter <dick@ximian.com>
4597 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
4598 Fix build on Windows.
4600 2006-11-02 Dick Porter <dick@ximian.com>
4603 * object-internals.h:
4604 * exception.c (mono_get_exception_thread_interrupted):
4605 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
4608 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
4609 Check for pending Thread.Interrupt.
4611 2006-10-27 Massimiliano Mantione <massi@ximian.com>
4612 * loader.c: Fixed bug 79684.
4614 2006-10-27 Dick Porter <dick@ximian.com>
4616 * file-io.c (get_file_attributes): Force symlinks to directories
4617 to be returned as a regular file. Fixes bug 79733.
4618 2006-10-26 Dick Porter <dick@ximian.com>
4620 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
4621 CreateFile to open a directory then we need to set the
4622 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
4624 2006-10-23 Zoltan Varga <vargaz@gmail.com>
4626 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
4629 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4631 * sgengc.c: small cleanup of timer code.
4633 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4635 * sgen-gc.c: fix some warnings and start adding support for
4636 complete object removal on domain unload.
4638 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
4640 * assembly.c: build_assembly_name should not consider a version
4641 number without build or revision number invalid. Fixes bug #79715.
4643 2006-10-18 Jonathan Chambers <joncham@gmail.com>
4645 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
4646 call kernel32 function OutputDebugString directly.
4648 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4650 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
4652 * reflection.c: small cleanup, using a function to insert a MonoString
4655 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
4657 * reflection.c: moving GC fixes.
4659 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4661 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
4662 all the objects with finalizers belonging to an unloading appdomain.
4664 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4666 * sgen-gc.c: added ability to allocate even when the nursery is fully
4667 pinned and fixed a couple of bugs.
4669 2006-10-15 Zoltan Varga <vargaz@gmail.com>
4671 * threads.h: Revert the last change for now.
4673 * threads.h (mono_thread_get_pending_exception): Rename this to
4674 mono_thread_get_undeniable_exception ().
4676 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
4678 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
4679 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
4680 when fname does not refer to valid assembly. This result in a more
4681 meaningful error message.
4682 * exception.c: added mono_get_exception_bad_image_format2 which
4683 constructs a BadImageFormatException using the ctor taking a custom
4684 message and the file name. Passing in a NULL msg results in a default
4686 * exception.h: define mono_get_exception_bad_image_format2 function.
4687 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
4688 when file name pointed to an invalid IL image. Use
4689 mono_get_exception_file_not_found2 to construct FileNotFoundException,
4690 as this results in a more meaningful error message.
4692 2006-10-15 Zoltan Varga <vargaz@gmail.com>
4694 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
4697 2006-10-12 Zoltan Varga <vargaz@gmail.com>
4699 * metadata.c (mono_type_size): Change the align parameter to guint32 for
4700 consistency with the other _size functions.
4701 (mono_type_stack_size): Ditto.
4703 * class.c object.c icall.c: Fix warnings caused by the above change.
4705 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
4707 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
4709 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
4711 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
4713 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
4714 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
4715 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
4716 threadpool.h, threads-types.h: mark more internal functions.
4718 2006-10-11 Dick Porter <dick@ximian.com>
4720 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4721 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
4722 reproduce the bug even before applying the fix.)
4724 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
4726 * reflection.c: allow retrieving attributes for arguments in generic
4727 methods (bug #79241).
4729 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
4731 * debug-mono-symfile.c: properly check fopen () result (found by
4734 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
4736 * reflection.c: make error message clearer and fixed two
4737 issuelets found by Coverity.
4739 2006-10-10 Zoltan Varga <vargaz@gmail.com>
4741 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
4743 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
4745 * object-internals.h, gc-internal.h, profiler-private.h:
4746 mark internal functions.
4748 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4750 * reflection.c: put data in the text section.
4751 * icall.c: recognize more types in type_from_typename ().
4752 * process.c, marshal.c: added some GC FIXMEs.
4754 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4756 * loader.c: check for NULL before initializing.
4758 2006-10-09 Zoltan Varga <vargaz@gmail.com>
4760 * gc.c (finalizer_thread): Use a non-alertable wait here.
4762 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
4763 until the correct solution is found.
4765 2006-10-06 Zoltan Varga <vargaz@gmail.com>
4767 * reflection.c (mono_module_get_object): Avoid an assert when operating on
4768 modules with no metadata. Fixes #79596.
4770 * image.c (load_metadata_ptrs): Put back the error message when
4771 the #- heap is encountered since the support is not complete yet.
4773 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4775 * gc.c: do not allow the user to SuppressFinalize () a
4776 delegate because it would leak the trampoline if present.
4778 2006-10-06 Zoltan Varga <vargaz@gmail.com>
4780 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
4783 2006-10-05 Zoltan Varga <vargaz@gmail.com>
4785 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
4787 * metadata.c (mono_metadata_get_param_attrs): Ditto.
4789 * row-indexes.h: Add definitions for *Ptr tables.
4791 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
4793 * metadata.c (mono_metadata_translate_token_index): New helper function to
4794 translate table indexes used in uncompressed metadata.
4795 (mono_metadata_decode_table_row): Ditto.
4796 (mono_metadata_decode_table_row_col): Ditto.
4798 * metadata.c: Add table schema for *Ptr tables.
4800 * class.c loader.c: Use the new helper function to access the affected metadata
4803 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
4806 2006-10-04 Zoltan Varga <vargaz@gmail.com>
4808 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
4809 sequences which can be unbounded in size. Fixes #79583.
4811 2006-10-02 Zoltan Varga <vargaz@gmail.com>
4813 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
4814 static initialization.
4816 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
4818 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
4820 * domain.c (mono_domain_free): Free up type_init_exception_hash.
4822 * object.c (mono_runtime_class_init): Implement correct semantics when a static
4823 ctor fails, i.e. throw the same exception on subsequent accesses.
4825 2006-09-0 Jonathan Chambers <joncham@gmail.com>
4827 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
4828 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
4829 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
4830 Handle marshalling of interfaces and VARIANTs contained in structs.
4832 Code is contributed under MIT/X11 license.
4834 2006-09-30 Zoltan Varga <vargaz@gmail.com>
4836 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
4838 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
4841 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4843 * console-io.c: ignore previous SIGINT handler.
4845 2006-09-27 Zoltan Varga <vargaz@gmail.com>
4847 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
4848 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
4849 #79460, #79461, #79485.
4851 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
4853 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
4856 2006-09-26 Zoltan Varga <vargaz@gmail.com>
4858 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
4859 could be generated from it.
4861 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
4863 * rand.c: fix read loop to correctly handle EINTR.
4865 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4867 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
4868 internal calls are defined to keep methods closer to the declaring
4869 type and allow a significant reduction in runtime relocations and
4872 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
4874 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
4875 exception message to have FileNotFoundException use the default
4876 assembly load error message. Fixes bug #79426.
4877 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
4879 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4881 * threadpool.c: (start_thread_or_queue) use the root domain when
4882 creating the thread instead of the async object one.
4884 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
4886 * class.c, object.c, class-internals.h, reflection.c:
4887 for arrays, store element_size inside MonoClass (speedup
4888 for array object creation).
4890 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
4892 * icall.c: fixed CodeBase to use the file name and not the module
4895 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
4897 * mono-debug.c, mono-debug.h: export find_method as
4898 mono_debug_find_method ().
4900 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4902 * debug-helpers.c, class-internals.h: added a few functions useful
4903 when debugging under gdb.
4905 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4907 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
4908 characters that need special handling.
4910 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4912 * mono-config.c: make the os/cpu specification more flexible,
4913 allowing lists and negation.
4915 2006-09-18 Jonathan Chambers <joncham@gmail.com>
4917 * marshal.c: COM Interop fixes. Handle case where method->klass.
4918 is interface. Handle BSTR/MonoString when null. Use CDECL as
4919 calling convention on non-windows platforms. This is for
4920 compatibility with XPCOM and MainWin COM.
4922 Code is contributed under MIT/X11 license.
4925 2006-09-18 Zoltan Varga <vargaz@gmail.com>
4927 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
4928 correctly. Fixes #79217.
4930 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
4932 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
4934 * mono-config.c: allow both an os and cpu attribute for dllmap
4935 and dllentry elemnets to enable a single config file to be used
4936 for multiple architectures.
4938 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
4940 * loader.c: MonoLoaderError was cleared too soon on load failure.
4943 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
4945 * icall.c: use the defining class vtable when accessing a
4946 static field, not a pobblibly derived class.
4948 2006-09-17 Zoltan Varga <vargaz@gmail.com>
4950 * icall.c string-icalls.c: Remove references to unicode.h.
4952 * unicode.h unicode.c Makefile.am: Remove these unused source files.
4954 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
4956 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
4957 indicating the image where custom marshaller types should be looked up.
4958 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
4959 custom marshallers, instead of corlib. Fixes #79425.
4961 2006-09-14 Zoltan Varga <vargaz@gmail.com>
4963 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
4965 2006-09-14 Jonathan Chambers <joncham@gmail.com>
4967 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
4968 Implement Environment.ProcessorCount.
4970 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
4971 Implement Environment.ProcessorCount.
4974 Add Environment.ProcessorCount icall.
4976 Patch by Jason McFall.
4978 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4980 * assembly.c: don't append .exe/.dll when the filename already contains
4981 one of those extensions.
4983 2006-09-12 Martin Baulig <martin@ximian.com>
4985 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
4986 to array interfaces.
4988 2006-09-11 Martin Baulig <martin@ximian.com>
4990 * reflection.c (mono_image_build_metadata): Create the
4991 MethodImpl's after emitting all types and methods, so we don't
4992 need another fixup pass for them.
4994 2006-09-11 Zoltan Varga <vargaz@gmail.com>
4996 * class.c (mono_class_from_name_case): Fix regression introduced by the last
4999 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
5001 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
5004 2006-09-10 Zoltan Varga <vargaz@gmail.com>
5006 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
5007 args is not set. Fixes #78926.
5009 2006-09-08 Zoltan Varga <vargaz@gmail.com>
5011 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
5013 * image.c (load_class_names): Move this to class.c, and rename it to
5014 'mono_image_init_name_cache'.
5015 (load_modules): Fix a warning.
5017 * class.c icall.c image.c: Initialize image->name_cache lazily.
5019 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
5020 on its name using information in the AOT file.
5022 * class.c (mono_class_from_name): Use the new hook function.
5024 2006-09-06 Zoltan Varga <vargaz@gmail.com>
5026 * reflection.c (mono_param_get_objects): Handle enum default parameter values
5029 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
5032 2006-09-06 Martin Baulig <martin@ximian.com>
5034 * icall.c (mono_lookup_internal_call): Small fix.
5036 2006-09-05 Raja R Harinath <rharinath@novell.com>
5038 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
5041 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
5043 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
5044 when --debug is specified.
5046 2006-09-04 Zoltan Varga <vargaz@gmail.com>
5048 * class.c (setup_generic_array_ifaces): Fix a warning.
5050 2006-09-04 Miguel de Icaza <miguel@novell.com>
5052 * Temporarily remove the patch to assemly.c that checks the
5053 assembly versions as it breaks our gacutil.
5055 2006-09-03 Zoltan Varga <vargaz@gmail.com>
5057 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
5059 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
5062 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
5063 created using the default ctor. Fixes #79152.
5064 (mono_string_builder_to_utf16): Ditto.
5066 2006-09-01 Martin Baulig <martin@ximian.com>
5068 Fix handling of the generic array interfaces.
5071 (MonoDefaults): Removed `generic_array_class' and added
5072 `generic_ilist' class.
5075 (mono_bounded_array_class_get): Add the new generic array interfaces.
5076 (setup_generic_array_ifaces): New static method; create vtable
5077 entries for each method in the generic array interfaces.
5080 (select_container): Allow "parent-less" generic methods.
5083 (mono_marshal_get_generic_array_helper): New public method.
5086 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
5087 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
5088 moved the interncall into System.Array.
5090 2006-09-01 Raja R Harinath <rharinath@novell.com>
5092 A few more cases of avoiding work on types with ->byref set.
5093 Has the real fix for #79238
5094 * icall.c (is_generic_parameter): New helper.
5095 (ves_icall_Type_GetGenericParameterPosition): Use it.
5096 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
5097 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
5098 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
5099 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
5101 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
5103 (ves_icall_Type_get_IsGenericInstance): Likewise.
5104 (ves_icall_Type_get_IsGenericType): Likewise.
5106 2006-09-01 Zoltan Varga <vargaz@gmail.com>
5108 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
5111 * mempool.h (mono_mempool_get_allocated): New helper function.
5113 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
5116 * mempool.c: Fix warnings and the calculation of stats.
5118 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
5120 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
5122 * loader.c (mono_get_method_from_token): Update method_count stat.
5124 * class-internals.h (MonoStats): Add some stats.
5126 2006-08-31 Robert Jordan <robertj@gmx.net>
5128 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
5129 with managed variants.
5130 All code is contributed under the MIT/X11 license.
5132 2006-08-31 Zoltan Varga <vargaz@gmail.com>
5134 * reflection.c (reflection_methodbuilder_to_mono_method): Set
5135 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
5137 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
5139 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
5140 with cycles in classes.
5142 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
5144 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
5145 missing a [MarshalAs] directive. Fixes #79203.
5147 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
5148 klass->marshal_info. Fixes #79217.
5150 2006-08-30 Martin Baulig <martin@ximian.com>
5152 Committing a patch from Joachim Ante <joe@otee.dk>:
5153 Add support for binary data symbol stores.
5155 * debug-mono-symfile.c
5156 (mono_debug_open_mono_symbol_file): Renamed into
5157 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
5161 (mono_debug_open_image): Added `raw_contents' and `size' args.
5162 (mono_debug_init_2_memory): New public function.
5164 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
5166 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
5168 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5170 * appdomain.c: implement support for ShadowCopyFiles.
5172 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
5174 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
5175 when value is NULL (and should remove CID #51).
5177 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5179 * image.c: moved 2 functions to ../utils.
5181 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5183 * gc.c: cope with the target object of a GC handle being NULL
5186 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5188 * class.c: recursively check parent's explicit implementations
5189 of interface methods (fixes bug #79125).
5191 2006-08-19 Miguel de Icaza <miguel@novell.com>
5193 * filewatcher.c: Avoid warnings when building, do not redefine
5194 constants that are defined.
5198 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5200 * image.c: don't fail when the link points to an absolute path.
5202 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
5204 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
5207 2006-08-17 Miguel de Icaza <miguel@novell.com>
5209 * image.c (full_path): A new method used to obtain the actual path
5210 of an assembly even in the presence of symbolic links.
5212 This is necessary for the case where we are running a binary that
5213 has been GACed, but we are using the "published" path name
5214 ($prefix/mono/1.0/blah.exe) which happens to point to the real
5217 This was the source of the failure for the `xsp' command with the
5218 recent AppDomain changes, as far as the runtime was concerned,
5219 there were two different assemblies: $prefix/mono/1.0/blah.exe and
5220 $prefix/mono/gac/blah/version/blah.exe.
5222 (do_mono_image_open): use full path
5224 2006-08-17 Zoltan Varga <vargaz@gmail.com>
5226 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
5228 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
5230 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
5231 domain_id is supplied. Fix CID #241 and corlib's unit tests.
5233 2006-08-17 Zoltan Varga <vargaz@gmail.com>
5235 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
5236 small structures. Fixes #78990.
5238 2006-08-17 Zoltan Varga <vargaz@gmail.com>
5240 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
5242 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
5244 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5247 * marshal.c: don't load all the assemblies from a domain into newly
5248 created ones. The new domains might have different rules and load
5249 assemblies from different locations. Fixes bug #76757.
5251 Patch by Lluis. Conflicts resolved by Brian Crowell.
5253 2006-08-16 Alp Toker <alp@atoker.com>
5255 * socket-io.c: First half of the fix for #79084.
5256 Set sa_size to the length of the content, not that of the struct.
5257 Don't add NULL suffix to the content, this should be done in
5258 managed code if needed.
5260 2006-08-14 Raja R Harinath <rharinath@novell.com>
5263 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
5264 mono_metadata_parse_type returns NULL.
5266 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
5268 * normalization-tables.h : new file for string normalization data.
5269 * locales.c, locales.h, icall.c :
5270 added load_normalization_resource() for string normalization,
5272 * Makefile.am : added normalization-tables.h to the sources.
5274 2006-08-13 Zoltan Varga <vargaz@gmail.com>
5276 * marshal.c: Add more helper functions to reduce code duplication and use them
5279 2006-08-12 Zoltan Varga <vargaz@gmail.com>
5281 * marshal.c: Fix non-x86 stdcall warnings.
5283 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
5286 2006-08-11 Jonathan Chambers <joncham@gmail.com>
5288 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
5289 type check on multi-dimensional arrays. Fixes #79000.
5291 2006-08-10 Jonathan Chambers <joncham@gmail.com>
5293 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
5294 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
5295 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
5296 * class-internals.h: add is_com_object to class structure.
5297 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
5298 null checks to COM object marshalling. Fix .ctor call on RCW.
5299 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
5301 All code is contributed under the MIT/X11 license.
5303 2006-08-09 Dick Porter <dick@ximian.com>
5305 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
5306 racing mono_monitor_allocator_lock() somewhere, so don't delete
5307 the critical section for now. Found by running and exiting
5310 2006-08-10 Zoltan Varga <vargaz@gmail.com>
5312 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
5313 (ves_icall_System_ComObject_FindInterface): Ditto.
5314 (ves_icall_System_ComObject_CacheInterface): Ditto.
5316 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
5317 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
5319 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5321 * threadpool.c: treat pipes from process asynchronous reads as sockets
5322 when reading from them, so we get select/poll or epoll to wait for
5325 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
5327 * loader.c: Fix a typo (CID #233) in the null check.
5329 2006-08-07 Zoltan Varga <vargaz@gmail.com>
5331 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
5332 Hopefully fixes #78949.
5334 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
5335 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
5336 bytes. Fixes #78972.
5338 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5340 * filewatcher.c: we need to set errno here.
5342 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5344 * filewatcher.c: let Win32Exception get the error value.
5346 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5348 * filewatcher.c: translate errno into win32 errors for Win32Exception
5349 to know what happened.
5351 2006-08-01 Zoltan Varga <vargaz@gmail.com>
5353 * threadpool.c: Fix more warnings.
5355 * assembly.c (search_loaded): Fix warnings.
5357 * threadpool.c (mono_thread_pool_finish): Fix warnings.
5358 (mono_async_invoke): Ditto.
5360 2006-07-28 Jonathan Chambers <joncham@gmail.com>
5362 * object.c (mono_remote_class_vtable): Need to create proxy vtable
5363 entries for __ComObject type in addition to ComImport types.
5364 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
5367 All code is contributed under the MIT/X11 license.
5369 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
5371 * image.c: avoid tentative loading of modulerefs that contain
5372 no metadata (P/Invoke library names).
5374 2006-07-28 Dick Porter <dick@ximian.com>
5376 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
5377 mono_loader_lock() somewhere, so don't delete the critical section
5378 for now. Found by running and exiting monodevelop.
5380 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5382 * filewatcher.c: define the inotify syscalls when we're building on
5383 linux and have sys/syscall.h. The build system might not have support
5384 for inotify but the target system might have it.
5386 2006-07-26 Miguel de Icaza <miguel@novell.com>
5388 * domain.c: Documentation updates.
5390 * loader.c (mono_free_method): Do not release the method
5391 information if we are being profiled, as profilers will use this
5392 information at shut down to present some data to the user.
5394 This is needed so that the profiler does not crash, as the
5395 profiler tends to keep MonoMethods around, and they might become
5396 invalid if we free these.
5398 (mono_get_method_constrained): Return the original CIL stream
5399 method as well, so verification can be performed against it.
5401 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5403 * filewatcher.[ch]: support for inotify file system watcher.
5404 * icall.c: add new internal calls for the inotify file system watcher.
5406 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5408 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
5411 2006-07-20 Dick Porter <dick@ximian.com>
5413 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
5416 2006-07-20 Dick Porter <dick@ximian.com>
5418 * threads.c (start_wrapper): Do the thread cleanup while we still
5419 hold a reference to its object. Fixes bug 78123.
5421 2006-07-18 Kornél Pál <kornelpal@gmail.com>
5423 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
5424 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
5425 "managed-to-managed".
5426 * icall.c: Redirect string constructors that take sbyte* to
5427 ves_icall_System_String_ctor_RedirectToCreateString.
5428 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
5429 to CreateString () methods with matching signature.
5430 * reflection.c: Use original security informations for
5431 MONO_WRAPPER_MANAGED_TO_MANAGED.
5432 * security-manager.c: Use original security informations for
5433 MONO_WRAPPER_MANAGED_TO_MANAGED.
5434 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
5435 that is a placeholder and only its address should be used.
5436 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
5437 that is a placeholder and only its address should be used.
5439 2006-07-15 Jonathan Chambers <joncham@gmail.com>
5441 Begin implementing COM Interop.
5442 * appdomain.c: Increment corlib version.
5443 * class.c: Set ComImport classes' parent to __ComObject.
5444 * loader.c: Mark cominterop methods as such.
5445 * domain.c: Add __ComObject class to MonoDefaults structure.
5446 * image.c: Add 2 hashtables to the image for COM Interop related methods
5447 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
5448 using the mempool allocator
5450 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
5451 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
5452 declaration for mono_metadata_type_dup_mp.
5454 * debug-helpers.c: Added strings for two additional wrapper types
5455 * object.c: Create proxy objects for ComImport classes
5456 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
5457 and added __ComObject class to MonoDefaults structure.
5459 * object-internals.h: Finish MonoRealProxy definition, and add definition of
5460 MonoComInteropProxy and MonoComObject.
5462 * marshal.c: Added support for COM Interop
5463 (signature_cominterop): Converts managed signature to corresponding
5464 unmanaged COM signature.
5465 (cominterop_get_function_pointer): gets unmanaged function pointer via
5467 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
5468 (cominterop_get_method_interface): returns interface type that method is defined on
5469 (mono_mb_emit_cominterop_call): emits native call to function pointer
5471 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
5472 that matches signature of unmanaged function.
5473 (cominterop_get_native_wrapper): wrapper around adjusted method call.
5474 (cominterop_get_invoke): forwards call from proxy to __ComObject
5475 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
5476 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
5477 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
5479 * marshal.h: Added Marshal icall declarations.
5480 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
5481 so we can access them in finalizer
5483 2006-07-14 Dick Porter <dick@ximian.com>
5485 * object.c (mono_type_initialization_cleanup): Fix a race
5486 condition by temporarily commenting out the critical section
5489 2006-07-14 Zoltan Varga <vargaz@gmail.com>
5491 * reflection.c (create_custom_attr): Fix some warnings.
5492 (create_custom_attr_data): Ditto.
5493 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
5494 types. Fixes #78855.
5496 2006-07-11 Zoltan Varga <vargaz@gmail.com>
5498 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
5500 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
5502 2006-07-08 Zoltan Varga <vargaz@gmail.com>
5504 * reflection.c (resolve_object): Add support for DynamicMethod.
5506 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
5507 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
5509 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
5511 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
5512 don't leak GPtrArray's pdata has we have no use (nor free) for it.
5514 2006-07-01 Zoltan Varga <vargaz@gmail.com>
5516 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
5519 2006-06-30 Raja R Harinath <rharinath@novell.com>
5521 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
5522 slightly: remove a shadow local variable.
5524 2006-06-29 Raja R Harinath <rharinath@novell.com>
5526 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
5527 definition that introduces the virtual function slot.
5528 Also fix Coverity #105.
5530 2006-06-29 Zoltan Varga <vargaz@gmail.com>
5532 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
5533 for dynamic assemblies. Fixes #78724.
5535 2006-06-28 Zoltan Varga <vargaz@gmail.com>
5537 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
5540 2006-06-21 Martin Baulig <martin@ximian.com>
5543 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
5546 2006-06-21 Zoltan Varga <vargaz@gmail.com>
5548 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
5550 2006-06-20 Raja R Harinath <rharinath@novell.com>
5552 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
5554 * class.c (mono_class_create_from_typespec): Add 'context' argument.
5555 Inflate result if necessary.
5556 (mono_class_get_full): Remove old version. Rename from
5557 'mono_class_get' and add 'context' argument. Pass it to
5558 ..._create_from_typespec.
5559 (mono_class_get): New. Simple wrapper to mono_class_get_full.
5560 (mono_ldtoken): Revert change below.
5562 2006-06-20 Martin Baulig <martin@ximian.com>
5564 * class.c (mono_ldtoken): Don't pass the generic context to
5565 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
5567 2006-06-15 Zoltan Varga <vargaz@gmail.com>
5569 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
5570 and later freeing it. Fixes #78638.
5572 2006-06-15 Miguel de Icaza <miguel@novell.com>
5574 * icall.c (mono_class_get_throw): Revert over-zealous error
5575 throwing, the caller for mono_class_get_throw will cope with
5576 errors when classes are not properly initialized already.
5578 The code still copes with loader exceptions though.
5580 Fixes the regression in reftype1 and reftype3 from the CAS tests.
5582 2006-06-14 Miguel de Icaza <miguel@novell.com>
5584 Fixes the `make run1' version of RuntimeAbort (to be commited,
5585 source is in Bugzilla).
5587 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
5588 FALSE on class loading failure instead of returning true.
5590 * class.c (mono_class_create_from_typedef): It is possible for
5591 mono_metadata_interfaces_from_typedef_full to fail if a class is
5592 not found, cope with this.
5595 2006-06-14 Dick Porter <dick@ximian.com>
5598 * process.c: Fix a bunch of signed/unsigned warnings from gcc
5601 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
5603 * culture-info-table.h : oops, forgot to make it nsync with r61548.
5605 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
5607 * icall.c: Another fix for building mono in Visual Studio.
5609 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
5611 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
5613 2006-06-09 Martin Baulig <martin@ximian.com>
5615 * debug-mono-symfile.c: Put this back and really fix it this
5616 time. Sorry for all the trouble.
5618 2006-06-08 Zoltan Varga <vargaz@gmail.com>
5620 * icall.c (mono_class_get_throw): Fix a warning.
5621 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
5622 ReflectionTypeLoadException if needed. Fixes #78606.
5624 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
5625 (mono_class_init): Ditto.
5627 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
5628 ref_only exceptions.
5629 (mono_loader_clear_error): Make this work even if there is no error.
5631 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
5633 * object-internals.h marshal.c marshal.h icall.c: Implement method
5634 Marshal.GetComSlotForMethodInfo using internal call.
5636 2006-06-07 Zoltan Varga <vargaz@gmail.com>
5638 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
5639 a function for signalling it.
5641 * class.c (mono_class_from_typeref): Use the new kind of loader error when
5642 a referenced assembly is not found.
5644 * loader.c (mono_loader_error_prepare_exception): Add support for
5645 LOADER_ERROR_ASSEMBLY. Fix formatting.
5647 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
5649 * domain.c appdomain.c class-internals.h marshal.c: Add support
5650 for VARIANT marshalling on windows and increment corlib version
5651 since Variant struct was added.
5653 2006-06-03 Miguel de Icaza <miguel@novell.com>
5655 * debug-mono-symfile.c: Revert Martin's previous patch which broke
5656 stack trace line information:
5658 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
5659 (Martin) when looking up B which is between A and C, return A not C.
5663 Thanks to Alexander Olk for tracking this down.
5665 2006-06-02 Zoltan Varga <vargaz@gmail.com>
5667 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
5669 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
5670 avoid clobbering its value.
5671 (mono_string_to_lpstr): Fix a warning on windows.
5673 2006-05-31 Zoltan Varga <vargaz@gmail.com>
5675 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
5677 * reflection.c loader.c: Removed references to 'dummy' flag.
5679 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
5681 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
5682 it gets GC tracking.
5684 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
5687 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
5689 * marshal.c threadpool.c: Update callers of mono_async_result_new.
5691 * appdomain.c: Bump corlib version.
5693 2006-05-30 Zoltan Varga <vargaz@gmail.com>
5695 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5696 CEE_STIND_REF when working with object references.
5698 2006-05-31 Zoltan Varga <vargaz@gmail.com>
5700 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
5703 2006-05-30 Miguel de Icaza <miguel@novell.com>
5705 * loader.c (method_from_memberref): Fix argument value for
5706 mono_loader_set_error_method_load (I was passing the MonoClass
5707 instead of the class name char *).
5709 2006-05-30 Zoltan Varga <vargaz@gmail.com>
5711 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5712 CEE_STIND_REF when working with object references.
5714 2006-05-30 Martin Baulig <martin@ximian.com>
5716 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
5717 mono_method_full_name() change and replace the ':' with a '.'
5720 2006-05-30 Martin Baulig <martin@ximian.com>
5722 * debug-mono-symfile.c
5723 (mono_debug_symfile_lookup_location): Fix the algorithm:
5724 when looking up B which is between A and C, return A not C.
5726 2006-05-29 Martin Baulig <martin@ximian.com>
5729 (MonoDebugMethodInfo): Make the typedef public.
5730 (MonoDebugSourceLocation): New public struct.
5733 (mono_debug_source_location_from_address): Removed.
5734 (mono_debug_source_location_from_il_offset): Removed.
5735 (mono_debug_il_offset_from_address): Removed.
5736 (mono_debug_address_from_il_offset): Removed.
5737 (mono_debug_lookup_method): New public function.
5738 (mono_debug_lookup_source_location): New public function; replaces
5739 the old mono_debug_source_location_from_*() functions; see the
5740 inline documentation.
5741 (mono_debug_free_source_location): New public function.
5742 (mono_debug_print_stack_frame): New public function; see the
5743 inline documentation.
5745 * debug-mono-symfile.c
5746 (mono_debug_find_source_location): Renamed into
5747 mono_debug_symfile_lookup_location(); only take a
5748 `MonoDebugMethodInfo *' and an `offset' argument; added inline
5750 (mono_debug_find_method): Renamed into
5751 mono_debug_symfile_lookup_method().
5753 2006-05-27 Zoltan Varga <vargaz@gmail.com>
5755 * assembly.c (mono_assembly_open_full): Dont overwrite the status
5756 returned by mono_image_open_full ().
5758 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
5759 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
5762 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
5765 2006-05-27 Miguel de Icaza <miguel@novell.com>
5767 * class.c (mono_class_from_typeref): handle missing images
5768 earlier, deals with bug #78418. Refactor code;
5770 Fix a warning introduced in my previous commit (some stale code
5771 from before I revisited my patch).
5773 * class.c (mono_class_create_from_typedef): On failure, remove the
5774 class from the MonoImage->class_cache as the class is not
5775 initialized; Fixes the leak pointed out by Paolo.
5777 2006-05-25 Dick Porter <dick@ximian.com>
5779 * threads.c (mono_thread_cleanup): Build fix. Comment out the
5780 DeleteCriticalSections until I figure out which one may still be
5781 sometimes locked when mono_thread_cleanup is called.
5783 2006-05-24 Dick Porter <dick@ximian.com>
5785 * threads.c (mono_thread_cleanup): Move the threading cleanup out
5786 of mono_thread_manage and back into its own function, so it can be
5787 called after the finalizer thread has finished.
5789 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
5791 2006-05-24 Zoltan Varga <vargaz@gmail.com>
5793 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
5796 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
5797 with non-blittable elements.
5798 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
5800 2006-05-24 Martin Baulig <martin@ximian.com>
5802 * mono-debug-debugger.h (MonoDebuggerEvent): Added
5803 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
5805 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
5806 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
5807 `mono_debugger_event_handler' to NULL.
5809 2006-05-24 Martin Baulig <martin@ximian.com>
5811 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
5813 2006-05-24 Martin Baulig <martin@ximian.com>
5815 * mono-debug-debugger.h
5816 (mono_debugger_create_notification_function): Added
5817 `MonoCodeManager *' argument.
5819 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
5821 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
5823 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
5825 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
5826 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
5829 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
5831 * icall.c: precise GC support: objects can't be stored in unmanaged
5832 memory anymore, even if they are kept alive by other references: since
5833 they can move the GC needs to be able to always find them.
5835 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5837 * object.c: precise GC support for static fields. Support
5838 for moving GCs: write barriers and pinned allocation for interned
5841 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
5843 * domain.c, domain-internals.h: precise GC support for the MonoDomain
5846 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5848 * class.c, gc.c: sgen and precise GC updates.
5850 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5852 * marshal.h, marshal.c: added write barrier wrapper and precise type
5855 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
5857 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
5860 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5862 * reflection.c: precise and sgen GC updates.
5864 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5866 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
5868 2006-05-22 Zoltan Varga <vargaz@gmail.com>
5870 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
5872 2006-05-20 Zoltan Varga <vargaz@gmail.com>
5874 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
5875 MONO_TYPE_OBJECT. Fixes #78462.
5877 2006-05-18 Zoltan Varga <vargaz@gmail.com>
5879 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
5880 and blittable types.
5882 2006-05-17 Miguel de Icaza <miguel@novell.com>
5884 * class.c (mono_class_get_exception_for_failure): Implement parts
5885 of a TODO: if the loader error is set (instead of the class
5886 error), we return a Loader exception that can be properly thrown
5889 This was exposed by some Winforms 2.0 code that I tried to run
5890 (Atsushi pointed me to it).
5892 2006-05-17 Zoltan Varga <vargaz@gmail.com>
5894 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
5895 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
5897 * marshal.c (emit_marshal_vtype): Add limited support for
5898 UnmanagedType.LPStruct. Fixes #78427.
5900 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
5901 Applied a patch from kangaroo to fix #77523.
5903 2006-05-17 Martin Baulig <martin@ximian.com>
5906 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
5907 (debugger_thread_created): Removed.
5908 (debugger_thread_exited): Removed.
5910 2006-05-15 Zoltan Varga <vargaz@gmail.com>
5912 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5914 * object-internals.h (MonoReflectionResource): Sync with managed version.
5916 2006-05-12 Wade Berrier <wberrier@novell.com>
5918 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
5920 2006-05-12 Zoltan Varga <vargaz@gmail.com>
5922 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
5923 functions try to allocate from the image mempool.
5925 2006-05-12 Dick Porter <dick@ximian.com>
5927 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
5929 2006-05-12 Lluis Sanchez <lluis@ximian.com>
5931 * object.c: The FieldGetter and FieldSetter methods require the full
5932 name of the class, not only the name. Fixes bug #78277.
5934 2006-05-11 Miguel de Icaza <miguel@novell.com>
5936 * loader.c (method_from_memberref): Do not pass the NULL klass to
5937 mono_loader_set_error_() methods. Pass the non-NULL value
5940 2006-05-11 Zoltan Varga <vargaz@gmail.com>
5942 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
5943 (mono_assembly_close): Null out assembly->image->references after freeing it.
5945 * image.c (mono_image_close): Free image->references.
5947 * reflection.c (mono_image_basic_init): Fix a small memory leak.
5949 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
5951 * marshal.c: In function mono_mb_add_local don't use the mb pointer
5952 before checking if it's NULL (g_assert).
5954 2006-05-10 Martin Baulig <martin@ximian.com>
5956 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
5957 I thought I already killed that two months ago, but now it somehow reappeared.
5959 2006-05-10 Martin Baulig <martin@ximian.com>
5961 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
5963 2006-05-10 Zoltan Varga <vargaz@gmail.com>
5965 * reflection.c: Allocate memory for dynamically created methods in the image
5968 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
5970 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
5971 don't use the ad pointer before checking if it's NULL (g_assert).
5973 2006-05-09 Zoltan Varga <vargaz@gmail.com>
5975 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
5976 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
5978 * marshal.c: Allocate all signatures from mempools.
5980 * marshal.c: Allocate some more signatures from mempools.
5982 2006-05-09 Miguel de Icaza <miguel@novell.com>
5984 * object.c (mono_load_remote_field): The code used to provide a
5985 temporary variable for returning results if the user did not
5986 provide a result pointer. But our temporary variable was allocted
5989 Fix calling code to always pass a result area. Coverity ID 103.
5991 2006-05-06 Zoltan Varga <vargaz@gmail.com>
5993 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
5994 value, not the old. Fixes #78312.
5995 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
5997 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
5998 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
6001 * assembly.c (mono_assembly_close): Free image->references.
6003 * assembly.c (mono_assembly_names_equal): Fix a warning.
6004 (mono_assemblies_cleanup): Cleanup more global data.
6006 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
6008 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
6009 ptr_cache and image->modules.
6011 * image.c (mono_image_init): Allocate array_cache lazily.
6013 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6015 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
6016 behavior was changed recently and has bad side effects.
6018 2006-05-05 Zoltan Varga <vargaz@gmail.com>
6020 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
6022 * assembly.c (mono_assembly_close): Remove a debug printf.
6024 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
6026 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
6027 to also allow for temporary references between mono_image_open ()/close ().
6029 * domain.c (get_runtimes_from_exe): Add a FIXME.
6031 2006-05-04 Zoltan Varga <vargaz@gmail.com>
6033 * marshal.c: Fix support for dynamic methods.
6035 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
6037 * marshal.c (mono_marshal_cleanup): New cleanup function.
6039 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
6042 * class.c (mono_class_init): Fix leaking class->nested_classes.
6044 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
6046 * image.c (mono_image_init): Initialize the new cashes.
6048 * image.c (mono_image_close): Destroy the new cashes.
6050 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
6052 * mempool.c (mono_mempool_strdup): New helper function.
6054 * class-internals.h: Add prototype for mono_loader_unlock ().
6056 * domain.c (mono_jit_info_table_find): Fix a warning.
6057 (mono_debugger_check_runtime_version): Ditto.
6059 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
6060 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
6061 functions to these modules.
6063 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
6066 * marshal.c (mono_free_bstr): Fix a warning.
6068 * assembly.c (mono_assembly_open_full): Fix another small leak.
6070 * object.c: Fix some unload leaks in the remoting code.
6072 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
6075 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
6077 * reflection.c: Fix some unload leaks in dynamic assemblies.
6079 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
6081 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
6082 * marshal.h: Add BSTR support on Win32
6083 * icall.c: Add BSTR icalls
6084 * metadata.h: Add BSTR enums
6086 2006-04-28 Miguel de Icaza <miguel@novell.com>
6088 Work to catch the crash from #76795 and turn it into an
6089 exception. As I stubbed out pieces of the VisualBasic support,
6090 I found a number of places where the code was failing and I added
6091 checks to those places.
6093 * metadata.c (do_mono_metadata_parse_generic_class): Make this
6094 function return a status code. If we fail to parse the signature
6095 from mono_metadata_parse_generic_inst, return FALSE.
6097 * loader.c (mono_get_method_from_token): If we fail to load the
6098 method (mono_class_get) return NULL.
6100 * (method_from_memberref): Return NULL if we are unable to parse
6101 the method signature
6103 (mono_loader_error_prepare_exception): Since we now use the
6104 loader_error flag internally to stop processing, and obtaining
6105 exceptions that might be thrown will walk this code path the
6106 proper way of going from a MonoLoaderError into a
6107 MonoException was convoluted. This new routine encapsulates the
6108 process of turning the error into an exception and *clearing* the
6111 2006-04-27 Miguel de Icaza <miguel@novell.com>
6113 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
6114 with missing assemblies), and to cope with:
6116 * Missing fieldref from a non-existing assembly.
6117 * Missing methodref from a non-existing assembly.
6119 The first batch of work to address *some* of the issues from 76661.
6121 * object.c (mono_class_create_runtime_vtable): If we fail to
6122 initialize the class raise the exception here.
6124 * metadata.c (mono_class_get_overrides_full): If any methods fail
6125 to load return the failure to the caller.
6127 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
6128 flagging assemblies that failed to load.
6130 Do not crash if we are unable to load the assembly.
6132 (mono_assembly_close): Do nothing with REFERENCE_MISSING
6135 * loader.c (mono_loader_set_error_type_load): Change the
6136 convention to always pass unallocated strings, so we make our own
6137 copies (I know our own code had duplicated strings before, but
6138 this keeps the normal conventions).
6139 (method_from_memberref): Call mono_loader_set_error_method_load
6140 for all possible failures of loading the class.
6141 Remove assert, turn into a loader error.
6143 (mono_loader_error_to_exception): Move this routine from mini
6144 (mini_loader_error_to_exception) there was no need to have that in
6147 * class.c (mono_class_from_typeref): If we were not able to load
6148 the assembly with mono_assembly_load_reference, call the
6149 mono_loader_set_error_type_load to register the problem.
6151 (mono_class_setup_fields): If we fail to load the type from
6152 mono_metadata_parse_type_full, call mono_class_set_failure and
6153 break from the loop.
6155 If class->exception_type is set, we do not layout the fields as
6156 that might crash the runtime, and instead return (from breaking
6157 from the previous loop).
6159 (mono_class_setup_vtable): This now returns a boolean indicating
6160 whether the table was properly setup. The decision is driven by
6161 mono_class_get_overrides_full which might run into non-existing
6164 (mono_class_init): Returns TRUE on success or FALSE if there was a
6165 problem in loading the type (incorrect assemblies, missing
6166 assemblies, methods, etc).
6168 When we call mono_class_setup_fields we also check for a potential
6169 error inside this call (either a class exception or a general
6172 (mono_class_create_from_typedef): If the parent fails to load
6173 (calling mono_class_get_full) return NULL.
6177 calls to mono_metadata_parse_type_full should be checked
6178 everywhere and set the mono_class_set_failure
6179 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
6181 The current patch checks the places where my manually constructed
6182 tests show the errors are showing up, but we should do it
6187 mono_class_init return values should be tested everywhere, like
6188 the previous case this is something that we should audit
6189 everywhere and not only on the cases exposed by the tests I
6192 2006-04-26 Miguel de Icaza <miguel@novell.com>
6194 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
6195 boolean parameter and instead pass the information on `options'
6196 parameter (FileOptions).
6198 * icall.c: Register the new signature for MonoIO.Open.
6200 * debug-helpers.c (dis_one): Trying to understand how coverity
6201 works. Fix Run 5, item 78.
6203 2006-04-26 Dick Porter <dick@ximian.com>
6205 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
6208 2006-04-25 Martin Baulig <martin@ximian.com>
6210 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
6212 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
6213 debugger_thread_created().
6214 (debugger_gc_push_all_stacks): Don't handle the main thread in any
6216 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
6217 (mono_debugger_finalize_threads): New function; undo the effects
6218 of mono_debugger_init_threads().
6219 (mono_debugger_create_all_threads): Removed.
6221 2006-04-24 Zoltan Varga <vargaz@gmail.com>
6223 * image.c (mono_image_close): Tidy up trace messages.
6225 * assembly.c (mono_assembly_close): Ditto.
6227 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
6228 no longer references an already freed assembly. Fixes #78168.
6230 2006-04-21 Dick Porter <dick@ximian.com>
6232 * threads.c (mono_thread_detach): Fix reference counting when
6235 2006-04-21 Zoltan Varga <vargaz@gmail.com>
6237 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
6240 2006-04-19 Zoltan Varga <vargaz@gmail.com>
6242 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
6243 (mono_type_to_stind): Ditto.
6245 * marshal.c: Use the new helper functions to simplify code.
6247 * image.c (mono_image_close): Add some code for help debug assembly unloading
6250 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
6253 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
6254 assembly was already loaded in another appdomain. Fixes #78083.
6256 2006-04-13 Zoltan Varga <vargaz@gmail.com>
6258 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
6259 referenced assemblies.
6260 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
6262 * domain.c (mono_domain_free): Add a trace message.
6264 * appdomain.c (add_assemblies_to_domain): Ditto.
6266 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
6269 2006-04-12 Zoltan Varga <vargaz@gmail.com>
6271 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
6273 2006-04-12 Martin Baulig <martin@ximian.com>
6275 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
6276 `USE_INCLUDED_LIBGC'.
6278 2006-04-12 Zoltan Varga <vargaz@gmail.com>
6280 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
6281 the patch contains ../ and a small directory name later. Hopefully fixes
6284 2006-04-10 Martin Baulig <martin@ximian.com>
6286 Clean up the debugger's thread-handling code.
6288 The debugger's thread-handling code has been moved from
6289 ../mini/debug-debugger.c to threads.c. We now iterate directly
6290 over the `threads' hash, keep track of exiting threads and also
6293 We can now debug XSP and XSP based applications with the debugger.
6295 * object-internals.h (MonoThread): Added `gpointer end_stack'.
6298 (MonoThreadCallbacks): Removed; this was only used by the debugger.
6299 (mono_install_thread_callbacks): Likewise.
6301 * threads.c (mono_thread_callbacks): Removed.
6302 (debugger_thread_created, debugger_thread_exited): New static functions.
6303 (start_wrapper): Call debugger_thread_created().
6304 (thread_cleanup): Call debugger_thread_exited().
6305 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
6306 (mono_debugger_init_threads): New public function.
6307 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
6308 iterate directly over the `threads' hash and also use proper locking.
6310 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
6312 * mono-debug-debugger.h
6313 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
6315 2006-04-10 Zoltan Varga <vargaz@gmail.com>
6317 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
6318 argument type=array. Fixes #78057.
6320 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
6322 * culture-info-table.h : regenerated. Fixed bug #69652.
6324 2006-04-07 Zoltan Varga <vargaz@gmail.com>
6326 * loader.c metadata.c: Reapply a variant r59116.
6328 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
6330 * class.c (mono_class_setup_interface_offsets): New internal function.
6332 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
6333 interfaces too. Fixes #77398.
6335 * reflection.c (encode_cattr_value): Add support for
6336 parameter type=object, argument type=array.
6337 (load_cattr_value): Ditto. Fixes #77916.
6339 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
6340 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
6342 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
6343 a byval char array and CharSet is Ansi.
6345 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
6347 2006-04-06 Zoltan Varga <vargaz@gmail.com>
6349 * metadata.c: Add some locking comments.
6351 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
6353 (mono_metadata_free_method_signature): Don't free the signature itself.
6355 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
6357 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
6358 reference the same MonoImage.
6359 (mono_assembly_load_from_full): Add an assert.
6361 2006-04-05 Zoltan Varga <vargaz@gmail.com>
6363 * image.c (mono_image_close): Don't put the image we are about to free into the
6364 loaded_images_guid_hash.
6366 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
6367 to reduce code duplication.
6369 * marshal.c: Register the native functions called by this module as icalls, to
6370 somewhat centralize the creation of MonoMethodSignature's.
6372 * loader.c (mono_method_signature): Add a cache for method signatures.
6374 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
6375 the parameter attributes of a method.
6376 (mono_metadata_parse_method_signature_full): Refactored the computation of
6377 parameter attributes into a separate function. Also avoid one allocation in
6380 * assembly.c (mono_assembly_close): Ditto.
6382 * image.c (mono_image_close): Log trace messages with INFO level.
6384 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
6386 * image.c reflection.c: Correct reference counting of image modules.
6388 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
6389 of this function from the image mempool.
6391 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
6392 to allow more cached types to be used.
6394 * mono-debug.c (mono_debug_add_method): Appled patch from
6395 David S. Miller <davem@sunset.davemloft.net>: Access
6396 minfo->lexical_blocks[] entry elements using read32().
6398 2006-04-04 Zoltan Varga <vargaz@gmail.com>
6400 * loader.c (mono_free_method): No longer free the method header for non-dynamic
6401 methods as it is allocated from the mempool.
6403 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
6406 * metadata-internals.h: Add comments describing the reference counting scheme
6407 used for MonoImage and MonoAssembly.
6409 * image.c assembly.c reflection.c: Rework reference counting of images and
6410 assemblies so they are freed when the runtime is shut down. Free some
6411 additional memory structures when an image is unloaded.
6413 2006-04-03 Zoltan Varga <vargaz@gmail.com>
6415 * class.c loader.c reflection.c: Allocate more data structures in
6418 2006-03-31 Miguel de Icaza <miguel@novell.com>
6421 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
6422 build on pre glib 2.4 systems.
6424 2006-03-31 Zoltan Varga <vargaz@gmail.com>
6426 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
6428 * icall.c: Fix some warnings.
6430 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
6432 * culture-info-table.h : regenerated.
6434 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
6436 * threads.c, object-internals.h, verify.c: changed the culture caching
6437 code to use a normal MonoArray for storage so the GC can keep track of
6438 them easily. Fixed bits of the cache logic, too and simplified the
6441 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
6443 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
6444 thread for non-Boehm GCs.
6446 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
6448 * domain.c, object.c, domain-internals.h: reduce the amount of memory
6449 needed to keep track of the data for static fields.
6451 2006-03-29 Raja R Harinath <rharinath@novell.com>
6454 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
6455 for interface classes. Use 'num_methods' instead.
6456 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
6457 before using '->vtable_size' field.
6459 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6461 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
6462 doesn't contain managed pointers, so use a normal hashtable.
6464 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6466 * reflection.c, class-internals.h, domain.c: fixed handling of types
6467 used as values for objects in custom attributes (bug #77915):
6469 2006-03-24 Martin Baulig <martin@ximian.com>
6471 * class.c (mono_class_setup_fields): Added support for generic
6472 instances; fixes #77580.
6474 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6476 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
6478 2006-03-24 Dick Porter <dick@ximian.com>
6480 * file-io.c (get_file_attributes): More stat macro breakage.
6483 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
6485 * profiler.c: added the file=filename option in the default profiler
6486 to output the profile data to filename.
6488 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6490 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
6493 2006-03-22 Martin Baulig <martin@ximian.com>
6495 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
6496 allocated `MonoClassField *' in `fb->handle'.
6498 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6500 * class.c, image.c, metadata-internals.h: implemented new mechanism to
6501 allocate interface ID to save memory and allow better ID reuse on
6502 appdomain unload. setup_generic_vtable () removal from Martin.
6504 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6506 * object.h, appdomain.c, domain.c, exception.c, icall.c,
6507 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
6508 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
6509 write barriers for reference stores with managed objects accessed with
6510 C structures in the runtime and in embedding programs.
6512 2006-03-20 Raja R Harinath <rharinath@novell.com>
6514 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
6515 'interface_id' and 'max_interface_id' fields of MonoClasses
6516 representing open generic types.
6518 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
6520 * object.h, object.c, icall.c: added functions to deal with
6521 storing valuetypes that contain references in managed objects.
6522 * reflection.c, string-icalls.c, threads.c, marshal.c: small
6523 fixes and comments around uses of mono_array_addr ().
6525 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
6527 * object.h, icall.c, monitor.c: object.GetHashCode ()
6528 implementation that supports the moving garbage collector.
6530 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6532 * icall.c, threads-types.h, threads.c: implemented finalizer for
6535 2006-03-15 Zoltan Varga <vargaz@gmail.com>
6537 * metadata.c (mono_type_size): Add a fixme.
6538 (mono_type_stack_size): Ditto.
6540 * object-internals.h (MonoReflectionAssemblyBuilder): Added
6541 'type_forwarders' field.
6543 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
6544 attribute from net 2.0.
6546 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
6549 * class.c (mono_class_setup_fields): Fix a warning.
6551 * class.c (mono_class_from_name): Add support for assemblyref entries
6552 in the EXPORTEDTYPE table.
6554 * reflection.c: Add support for handling type forwarders under net 2.0.
6556 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6558 2006-03-14 Zoltan Varga <vargaz@gmail.com>
6560 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
6561 overwriting entries in ModuleBuild->types, also clean up the code
6562 a little. Fixes #77774.
6564 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6566 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
6567 load friend assembly info when present.
6569 2006-03-14 Raja R Harinath <rharinath@novell.com>
6571 Fix crasher on gtest-158.cs.
6572 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
6573 the return value if the MonoClass we want is yet in an
6575 * class.c (mono_class_create_from_typedef): Add an comment
6576 explaining an order dependency between mono_class_setup_parent and
6577 mono_class_setup_mono_type.
6579 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6581 * class.c: documentation updates and events bug fix.
6583 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
6585 * class.c: some cleanup, locking fixes.
6587 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6589 * class.c: fix the generics code to setup nested
6590 type info to the instantiated type (bug #77770).
6592 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6594 * marshal.c: fixed a few type correctness issues.
6596 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6598 * loader.c: the Set/Get/Addrtess array methods should be public.
6600 2006-03-11 Zoltan Varga <vargaz@gmail.com>
6602 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
6604 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
6607 2006-03-10 Zoltan Varga <vargaz@gmail.com>
6609 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
6611 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
6613 * mempool.c (mono_mempool_alloc): Speed this up a bit.
6614 (mono_mempool_alloc0): Ditto.
6616 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6619 (create_object_from_sockaddr): it was allocating 4 extra bytes
6620 for the AF_UNIX data. Fixes bug #77747.
6622 2006-03-09 Zoltan Varga <vargaz@gmail.com>
6624 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
6626 2006-03-09 Dick Porter <dick@ximian.com>
6628 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
6629 Fixes bug 76966 again.
6631 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
6633 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
6635 * appdomain.c: Bumped corlib version to 48 (due to r57532)
6637 2006-03-07 Martin Baulig <martin@ximian.com>
6640 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
6642 2006-03-07 Martin Baulig <martin@ximian.com>
6645 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
6646 regression introduced in r56970; see gtest-252.cs.
6648 * loader.c (mono_get_method_constrained): Correctly handle generic
6649 methods; see gtest-253.cs.
6651 2006-03-04 Zoltan Varga <vargaz@gmail.com>
6653 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
6655 2006-03-04 Martin Baulig <martin@ximian.com>
6657 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
6658 compute the parent type at runtime, just like we're already doing
6662 (mono_reflection_bind_generic_parameters): Don't compute the
6663 parent type anymore.
6665 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
6667 2006-03-04 Martin Baulig <martin@ximian.com>
6669 * mono-debug-debugger.h
6670 (mono_debugger_create_notification_function): Allocate memory at
6671 runtime and return a pointer to it.
6673 2006-03-03 Zoltan Varga <vargaz@gmail.com>
6675 * assembly.c: Fix windows build.
6677 * assembly.c: Fix build.
6679 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
6681 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
6683 2006-03-03 Dick Porter <dick@ximian.com>
6686 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
6687 Check parameters before dereferencing them. Fixes Aaron's part of
6690 2006-03-03 Raja R Harinath <rharinath@novell.com>
6692 Fix performance regression.
6693 * loader.c (find_method_in_class): Add 'from_class' argument.
6694 Rename 'klass' argument to 'in_class'. The signature is compared
6695 against the method in 'in_class', and the corresponding method is
6696 returned from 'from_class'.
6697 (find_method): Walk both 'in_class' and 'from_class' in parallel.
6698 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
6699 type definition and generic instantiation in parallel.
6700 (mono_get_method_constrained): Update to changes.
6702 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6704 * threads.c: make sure the domain is correct, too when doing
6705 mono_thread_attach ().
6707 2006-03-01 Zoltan Varga <vargaz@gmail.com>
6709 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
6710 windows. Fixes #77683.
6712 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6714 * object.h, *: introduced specific way to set elements of an array
6715 of references to be used as write barrier. Still need to audit the
6716 uses of mono_array_addr.
6718 2006-03-01 Miguel de Icaza <miguel@novell.com>
6720 * object-internals.h: New field to cache the assmebly name, patch
6721 from Tambet Ingo (tambet@ximian.com)
6723 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6725 * decimal.h, class-internals.h, metadata-internals.h,
6726 file-io.h: mark a few function declarations as internal, to
6727 reduce the number of PLT entries.
6729 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6731 * file-io.c: fix typo in warning message.
6733 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
6735 * loader.c: on unix, lookup the "*A" version of a function
6736 if charset is auto as a second option before failing.
6738 2006-02-28 Raja R Harinath <rharinath@novell.com>
6740 * class.h (mono_class_inflate_generic_method): Revert to two
6742 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
6743 (mono_class_inflate_generic_method_full): Add.
6744 * class.c (mono_class_inflate_generic_method_full): Rename from
6745 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
6746 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
6747 * loader.c, reflection.c: Update to changes.
6749 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6751 * icall.c: const fixes and small improvements.
6753 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6755 * threadpool.c: for asynchronous connect(), enable the same workaround
6756 for BSD 6 as for the Mac. Fixes bug #77637.
6758 2006-02-24 Zoltan Varga <vargaz@gmail.com>
6760 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
6761 formatted classes. Fixes #77524.
6763 2006-02-24 Raja R Harinath <rharinath@novell.com>
6765 * class.c (inflate_generic_type): Add a couple more
6766 micro-optimizations.
6767 (inflate_generic_context): Don't use the 'gmethod' from
6769 (mono_class_inflate_generic_method): If the method has generic
6770 parameters, but the passed-in context doesn't have a 'gmethod',
6771 create one. Use the possibly simplified generic instantiation
6772 from the declaring class instead of the one passed in.
6774 2006-02-24 Raja R Harinath <harinath@gmail.com>
6776 Make generic method signature and method header handling lazy.
6777 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
6778 (inflate_generic_header): Likewise.
6779 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
6780 parameter to avoid inflating types.
6781 (mono_get_inflated_method): Empty out.
6782 * class.h (mono_class_inflate_generic_method): Update to changes.
6783 * loader.c (mono_get_method_from_token): Don't parse signature for
6784 generic methods, nor methods of generic classes.
6785 (mono_method_signature): Rename from 'mono_method_signature'.
6786 Inflate signature on demand.
6787 (mono_method_get_header): Inflate method header on demand.
6788 * reflection.c: Update to changes.
6790 2006-02-23 Raja R Harinath <rharinath@novell.com>
6792 * metadata.c (mono_metadata_inflate_generic_inst): If the
6793 instantiation is closed, don't bother expanding it in the new
6795 * class.c (inflate_generic_class): If the generic instantiation
6796 doesn't change after inflation, return the argument itself.
6797 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
6799 (inflate_generic_context): If neither the generic class nor the
6800 generic method instantiations change, return the original context.
6801 * reflection.c (mono_method_get_object): Do
6802 'mono_get_inflated_method' before accessing the ->klass field.
6803 (inflate_mono_method): Don't create a MonoGenericMethod unless
6805 (inflate_method): Don't pass a constructed type as the declaring
6806 type of a methodbuilder.
6808 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
6810 * object.c: fix memory overwrite.
6812 2006-02-22 Dick Porter <dick@ximian.com>
6814 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
6815 it doesn't work any more.
6816 (mono_threads_request_thread_dump): Fix unused variable warnings.
6818 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6820 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
6821 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
6822 the public header file.
6824 2006-02-21 Zoltan Varga <vargaz@gmail.com>
6826 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
6828 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6830 * class-internals.h, object.c: reduce the size of MonoVTable
6831 and store the interface_offsets array at negative offsets.
6833 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6835 * metadata.c: tweak table descriptors data structures to reduce
6836 size and runtime relocations.
6838 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6840 * marshal.c: fix some types and opcodes to be type-safe
6841 in marshaling wrappers.
6843 2006-02-21 Ankit Jain <jankit@novell.com>
6845 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
6847 2006-02-21 Raja R Harinath <rharinath@novell.com>
6849 * metadata.c (get_constraints): Relax debugging checks for monodis.
6851 2006-02-21 Ankit Jain <jankit@novell.com>
6853 * metadata.c (mono_metadata_load_generic_params): Move the code
6854 checking for ambiguous generic params from here to mono/dis/get.c
6855 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
6857 2006-02-21 Raja R Harinath <harinath@gmail.com>
6859 Fix assertion triggered when compiling nemerle.
6860 * class.c (mono_get_shared_generic_inst): Rename from
6861 get_shared_inst and make non-static.
6862 * loader.c (mono_get_shared_generic_method): New. Used to create
6863 the MonoGenericContext-equivalent of a MonoGenericContainer.
6864 (mono_get_method_from_token): Initialize the 'context' field of
6865 the created MonoGenericContainer.
6866 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
6867 * metadata.c (get_constraints): Add sanity check.
6868 * class-internals.h: Add new internal methods.
6870 * reflection.c (verify_safe_for_managed_space): New sanity check.
6871 Currently checks that owner-less generic parameters aren't allowed
6873 (mono_type_get_object): Use it.
6874 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
6875 that are now in mono_type_get_object.
6876 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
6878 2006-02-19 Raja R Harinath <harinath@gmail.com>
6880 * metadata.c (mono_type_create_from_typespec): Rename from
6881 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
6882 argument and caching of types in the generic container.
6883 (unwrap_arrays, find_generic_param): Remove.
6884 * metadata-internals.h: Update.
6885 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
6887 2006-02-18 Zoltan Varga <vargaz@gmail.com>
6889 * class.c (mono_class_get_exception_for_failure): Fix a warning.
6891 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
6892 return values. Fixes #77581.
6894 * class.c (mono_fnptr_class_get): Switch name and name_space.
6896 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
6897 classes and add support for [In, Out] attributes.
6898 (mono_marshal_free_asany): Ditto. Fixes #77524.
6900 2006-02-18 Raja R Harinath <harinath@gmail.com>
6902 * class.c (mono_class_from_generic_parameter): Make more robust to
6903 incomplete MonoGenericContainers from monodis.
6905 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6907 * class-internals.h: added some more exception types.
6908 * class.c, metadata.c: added a few checks to handle missing
6911 2006-02-17 Raja R Harinath <rharinath@novell.com>
6913 Use owner-less generic-params some more.
6914 * class.c (my_mono_class_from_generic_parameter): Remove.
6915 (mono_class_from_generic_parameter): Handle null image,
6916 param->name and param->owner.
6917 (mono_class_from_mono_type): Update.
6918 (mono_class_create_from_typespec): Remove 'container' parameter.
6919 If that parameter is non-null, the result is always inflated by
6920 'mono_class_get_full' anyway.
6921 (mono_class_get): Rename from _mono_class_get. Remove 'container'
6923 (mono_class_get_full): Update.
6925 * class.c (inflate_generic_type) [GENERICINST]: If the generic
6926 instance is not open, don't bother inflating.
6927 (mono_class_setup_fields): Hoist some loop-invariants. Don't
6928 parse metadata for inflated classes.
6929 (_mono_class_get): Change GenericContext* parameter to
6931 (mono_class_create_from_typespec): Likewise. Simplify, and
6932 implement trivially. All the cases are handled in
6933 mono_class_from_mono_type. Don't inflate returned class.
6934 (mono_class_get_full): Delegate GENERICINST optimization to
6935 inflate_generic_type.
6936 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
6938 2006-02-16 Dick Porter <dick@ximian.com>
6940 * socket-io.c (create_object_from_sockaddr): Fix typo.
6941 (create_sockaddr_from_object): Check array lengths before
6942 potentially accessing items off the end.
6943 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
6944 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
6945 (ves_icall_System_Net_Sockets_Socket_Send_internal)
6946 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
6947 length checks to avoid wraparound overflows.
6948 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
6949 contents of the array of sockets
6950 (hostent_to_IPHostEntry2)
6951 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
6952 Check return value of inet_ntop ().
6953 (addrinfo_to_IPHostEntry): Fix typo
6955 2006-02-16 Raja R Harinath <rharinath@novell.com>
6957 Type metadata parsing doesn't use generic-instantiation information.
6958 * metadata.c (mono_metadata_parse_array_full): Change
6959 MonoGenericContext* parameter to MonoGenericContainer*.
6960 (mono_metadata_parse_type_full): Likewise.
6961 (mono_type_create_from_typespec_full): Likewise.
6962 (mono_metadata_parse_mh_full): Likewise.
6963 (mono_metadata_parse_generic_inst): Likewise.
6964 (do_mono_metadata_parse_generic_class): Likewise.
6965 (do_mono_metadata_parse_type): Likewise.
6966 * metadata-internals.h: Update to changes.
6967 * class.c (mono_class_find_enum_basetype): Likewise.
6968 (mono_class_setup_fields): Likewise.
6969 (mono_class_create_from_typespec): Likewise.
6970 * loader.c (method_from_methodspec): Likewise.
6971 (mono_get_method_from_token): Likewise.
6972 (mono_method_get_header): Likewise.
6974 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6976 * marshal.c: handle additional GENERICINST case (patch from
6977 Thong Nguyen <tum@veridicus.com>).
6978 Fix a few cases where LDIND_I/STIND_I was used for references.
6980 2006-02-16 Raja R Harinath <rharinath@novell.com>
6982 * reflection.c (mono_reflection_get_token): Remove unused variable.
6984 2006-02-16 Martin Baulig <martin@ximian.com>
6986 * reflection.c (mono_reflection_get_token): Add support for fields
6987 in instantiated generic types.
6990 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
6992 2006-02-15 Martin Baulig <martin@ximian.com>
6995 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
6996 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
6997 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
6998 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
7000 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
7002 * class.c, metadata.c, metadata.h, object.c, icall.c,
7003 marshal.c: changed mono_type_get_underlying_type () to do
7004 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
7005 Fixed handling of instantiated generic valuetypes (bug #75479).
7007 2006-02-15 Raja R Harinath <rharinath@novell.com>
7009 * metadata.c (mono_metadata_decode_signed_value): Simplify.
7010 Delegate to mono_metadata_decode_value, and work on the returned value.
7012 * icall.c (ves_icall_MonoType_GetGenericArguments):
7013 Add consistency check here too.
7015 2006-02-15 Ankit Jain <jankit@novell.com>
7017 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
7020 2006-02-15 Ankit Jain <jankit@novell.com>
7022 * metadata.c (mono_metadata_decode_signed_value): New function to decode
7023 signed values, used only for representing lower bounds of arrays.
7024 (mono_metadata_parse_array_full): Use new
7025 mono_metadata_decode_signed_value to decode lower bounds.
7027 2006-02-14 Martin Baulig <martin@ximian.com>
7030 (mono_reflection_get_token): Support "MonoGenericMethod" and
7031 "MonoGenericCMethod" and allow generic instances / methods.
7033 2006-02-11 Zoltan Varga <vargaz@gmail.com>
7035 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
7036 to obtain the terminal size using an ioctl.
7038 * object.c (mono_nullable_init): Revert this as nullable reference
7039 types are not valid.
7040 (mono_nullable_box): Ditto.
7042 2006-02-09 Dick Porter <dick@ximian.com>
7044 * threads.c (mono_thread_detach): Drop a reference to the thread
7047 2006-02-09 Zoltan Varga <vargaz@gmail.com>
7049 * object.c (mono_nullable_init): Handle nullable reference types.
7050 (mono_nullable_box): Ditto. Fixes #77446.
7052 2006-02-07 Martin Baulig <martin@ximian.com>
7054 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
7056 2006-02-07 Ankit Jain <jankit@novell.com>
7058 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
7059 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
7060 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
7061 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
7062 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
7063 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
7065 2006-02-02 Zoltan Varga <vargaz@gmail.com>
7067 * class.c (mono_class_create_generic): Set type_token as well.
7069 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
7072 2006-02-02 Martin Baulig <martin@ximian.com>
7074 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
7075 has never been used so far.
7077 2006-02-02 Martin Baulig <martin@ximian.com>
7079 * mono-debug-debugger.h: Changed comment at the top of this file;
7080 the header is not installed, but it's safe to #include it from
7083 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
7084 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
7086 2006-02-02 Martin Baulig <martin@ximian.com>
7089 (MonoSymbolTable): Removed the `metadata_info' field.
7092 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
7094 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
7095 (mono_debugger_add_builtin_types): Removed.
7096 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
7097 (mono_debugger_create_notification_function): We now operate on a
7098 pre-allocated area; take a `gpointer' and return `void'.
7100 * mono-debug-debugger.c
7101 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
7102 (mono_debugger_add_builtin_types): Removed.
7104 2006-02-02 Martin Baulig <martin@ximian.com>
7106 * threads.c (mono_debugger_create_all_threads): New public method.
7108 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
7110 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
7111 breaks on several platforms.
7113 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
7115 * assembly.c: the VS.NET build doesn't supply default values for
7116 MONO_ASSEMBLIES and MONO_CFG_DIR.
7118 2006-02-01 Zoltan Varga <vargaz@gmail.com>
7120 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
7123 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
7125 * loader.c (method_from_memberref): Fix a warning.
7127 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
7129 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
7130 with explicit layout. Fixes #77433.
7132 2006-01-31 Zoltan Varga <vargaz@gmail.com>
7134 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
7135 max_interface_id is initialized before using it. Fixes #77398.
7136 (ves_icall_Type_GetInterfaces): Ditto.
7138 2006-01-30 Raja R Harinath <rharinath@novell.com>
7140 * metadata.c (mono_metadata_parse_method_signature_full): Don't
7141 allocate memory for parameter attributes when parsing memberref
7143 * loader.c (mono_loader_set_error_method_load): Don't warn.
7144 (method_from_memberref): Ensure MissingMethodException gets thrown
7145 if method is not found. Make warning more informative.
7147 2006-01-29 Raja R Harinath <harinath@gmail.com>
7150 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
7151 return true if is byref.
7152 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
7153 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
7154 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7156 2006-01-27 Raja R Harinath <rharinath@novell.com>
7158 Fix tests/find-method.2.il
7159 * loader.c (find_method, find_method_in_class): Remove is_inflated
7160 argument. Revert 2006-01-18 change.
7161 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
7162 is generic, search for method in its generic definition.
7163 * class.c (mono_class_setup_vtable_general): Print generic
7164 arguments of generic types in debugging printf.
7166 2006-01-26 Zoltan Varga <vargaz@gmail.com>
7168 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
7170 * threads.c (mono_threads_request_thread_dump): New helper function.
7172 2006-01-25 Raja R Harinath <rharinath@novell.com>
7174 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
7176 2006-01-25 Ankit Jain <jankit@novell.com>
7178 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
7179 move definition to ..
7180 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
7182 2006-01-25 Ankit Jain <jankit@novell.com>
7183 Raja R Harinath <rharinath@novell.com>
7185 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
7186 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
7189 2006-01-25 Martin Baulig <martin@ximian.com>
7191 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
7192 `MonoDebuggerThread' into debug-debugger.c.
7194 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7196 * profiler.c: fix printing of data.
7198 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
7200 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
7201 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
7203 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7205 * object.c: fix deadlock related to string interning.
7207 2006-01-23 Martin Baulig <martin@ximian.com>
7209 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
7211 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
7213 2006-01-23 Martin Baulig <martin@ximian.com>
7215 * mono-debug.h: Moved the prototypes of some functions which are
7216 used by the JIT here from mono-debug-debugger.h.
7218 2006-01-21 Martin Baulig <martin@ximian.com>
7220 * Makefile.am: Don't install mono-debug-debugger.h.
7222 2006-01-21 Martin Baulig <martin@ximian.com>
7224 * mono-debug-debugger.h: Enforce the private status of this header
7225 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
7226 Moved some stuff from mono-debugger-jit-wrapper.h here.
7228 2006-01-20 Raja R Harinath <rharinath@novell.com>
7230 * class.c (mono_class_from_typeref): Add a sanity test to help
7231 catch lack of assembly load/search hooks.
7233 2006-01-19 Zoltan Varga <vargaz@gmail.com>
7235 * marshal.c (emit_struct_conv): Relax the fields with same offset
7236 check even more. Fixes #77230.
7238 2006-01-18 Martin Baulig <martin@ximian.com>
7240 * loader.c (find_method_in_class): Added `gboolean is_inflated'
7241 argument; if false, we compare the uninstantiated signatures.
7242 (method_from_memberref): Compare the uninstantiated signatures;
7245 2006-01-18 Robert Jordan <robertj@gmx.net>
7247 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
7248 Clear the weak link. Fixes bug #77170.
7250 * gc.c (mono_gchandle_free):
7251 Reflect *-gc.c changes (tiny optimization).
7253 2006-01-18 Zoltan Varga <vargaz@gmail.com>
7255 * metadata.c (mono_metadata_signature_dup): Applied patch from
7256 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
7259 2006-01-17 Zoltan Varga <vargaz@gmail.com>
7261 * marshal.c (emit_struct_conv): Allow fields with the same offset when
7262 marshalling from native to managed code. Fixes #77230.
7264 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7266 * threadpool.c: fix problem (Mac only) when more than one asynchronous
7267 connect. Fixes bug #77020.
7269 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7271 * class.c: fixed id assignement for nested interfaces (bug #77275).
7272 Added also better info for --print-vtable debugging.
7274 2006-01-12 Martin Baulig <martin@ximian.com>
7276 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
7277 interfaces on-the-fly; fixes #76625.
7280 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
7281 don't need that anymore.
7283 2006-01-12 Miguel de Icaza <miguel@novell.com>
7286 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
7287 To avoid initing the nested_classes when not needed I turned the
7288 PeerCredData as a toplevel internal class, as it has to be shared
7291 Fixes the CASA issue.
7293 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
7295 * domain.c: Accessors for MonoJitInfo
7297 * profiler-private.h: Add jitinfo to the end jit hook
7299 * profiler.[ch]: Define new hooks, called after jitting which give
7300 the MonoJitInfo that was compiled
7302 2006-01-10 Martin Baulig <martin@ximian.com>
7304 * class.c (mono_class_setup_events): Add support for generic
7305 classes; fixes #76440.
7307 2006-01-06 Raja R Harinath <rharinath@novell.com>
7310 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
7311 on passed-in method.
7313 2006-01-03 Zoltan Varga <vargaz@gmail.com>
7315 * object.c (mono_runtime_invoke_array): Add Nullable support.
7317 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
7319 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
7321 * file-io.c: Don't consider sockets as directory and avoid an endless
7322 loop. Fix bug #76966.
7324 2006-01-03 Zoltan Varga <vargaz@gmail.com>
7326 * object.c (mono_nullable_init): New helper function.
7327 (mono_nullable_box): Ditto.
7329 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
7331 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
7333 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
7335 2006-01-02 Zoltan Varga <vargaz@gmail.com>
7337 * class.c (mono_class_is_assignable_from): Make T assignable to
7340 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
7342 * appdomain.c: Bump corlib version to 46.
7343 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
7344 serialization purpose) and changed ves_icall_System_Reflection_
7345 Assembly_get_code_base signature to accept a boolean (to escape, or
7346 not, the assembly code base).
7348 2005-12-23 Dick Porter <dick@ximian.com>
7352 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
7353 CreateEvent icall now returns "created" boolean parameter.
7355 2005-12-22 Zoltan Varga <vargaz@gmail.com>
7357 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
7360 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
7361 when attr_klass is an interface. Fixes #77045.
7363 2005-12-20 Zoltan Varga <vargaz@gmail.com>
7365 * marshal.c (emit_struct_conv): Fix previous patch.
7367 * marshal.c (emit_struct_conv): Add a check for fields with the same
7370 2005-12-20 Raja R Harinath <rharinath@novell.com>
7372 Fix regression in Mono.C5.
7373 * class.c (mono_class_create_generic): If 'klass' is an interface
7374 set up the interface offsets.
7375 (mono_class_is_assignable_from): Don't throw away generic arguments.
7377 2005-12-19 Raja R Harinath <rharinath@novell.com>
7379 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
7382 2005-12-15 Raja R Harinath <rharinath@novell.com>
7384 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
7386 (do_mono_metadata_parse_generic_class): Don't pass the current
7387 generic context when parsing the type being instantiated: it
7388 cannot use it, anyway.
7390 * loader.c (method_from_memberref): Don't inflate a signature if
7391 it doesn't contain any type parameters.
7393 2005-12-15 Zoltan Varga <vargaz@gmail.com>
7395 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
7397 2005-12-14 Martin Baulig <martin@ximian.com>
7400 (mono_type_get_name_recurse): Don't return null for type
7401 parameters and open generic classes.
7402 (mono_class_setup_methods): Don't exclude generic instances.
7403 (mono_get_unique_iid): Use different IDs for different
7404 instantiations of the same generic type.
7405 (mono_class_setup_vtable): Only use setup_generic_vtable() for
7406 open generic instances; create a normal vtable for closed generic
7408 (mono_class_setup_vtable_general): We're now also called for
7409 closed generic instances.
7412 (mono_reflection_bind_generic_parameters): Correctly use
7413 mono_metadata_lookup_generic_inst() everywhere.
7415 2005-12-14 Zoltan Varga <vargaz@gmail.com>
7417 * object.c (mono_class_create_runtime_vtable): Call
7418 mono_class_setup_vtable ().
7420 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
7422 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
7425 * loader.c (mono_loader_set_error_type_load): Print the type load
7426 warnings to the console so they are more visible to the user.
7427 (mono_loader_set_error_method_load): Ditto.
7429 * reflection.c (ensure_runtime_vtable): Revert the last change as it
7432 * reflection.c (ensure_runtime_vtable): Fix build.
7434 * reflection.c (ensure_runtime_vtable): Disable an optimization which
7435 doesn't work in all cases.
7437 2005-12-13 Zoltan Varga <vargaz@gmail.com>
7439 * object.c (mono_array_new_full): Treat a single dimensional array
7440 with 0 lower bounds as an szarray. Fixes #76973.
7442 * reflection.c (custom_attr_visible): Really fix this.
7444 2005-12-12 Zoltan Varga <vargaz@gmail.com>
7446 * reflection.c (custom_attr_visible): Allow nested public attributes
7449 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
7452 2005-12-12 Raja R Harinath <harinath@gmail.com>
7454 * class.c (set_generic_param_owner): Delete.
7455 (mono_class_create_from_typedef): Don't set ->owner field of
7456 generic parameters to "param containers" of enclosing classes.
7457 * reflection.c (mono_reflection_initialize_generic_parameter):
7460 2005-12-11 Zoltan Varga <vargaz@gmail.com>
7462 * reflection.c (custom_attr_visible): Fix build.
7464 2005-12-10 Zoltan Varga <vargaz@gmail.com>
7466 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
7469 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
7470 handling of null parameter defaults.
7472 2005-12-09 Raja R Harinath <rharinath@novell.com>
7474 * class.c (mono_class_from_generic_parameter): Don't set
7475 klass->generic_container.
7476 (my_mono_class_from_generic_parameter): Likewise.
7478 2005-12-07 Zoltan Varga <vargaz@gmail.com>
7480 * reflection.c (load_public_key): Fix a warning.
7481 (method_encode_code): Fix unaligned accesses.
7483 2005-12-07 Martin Baulig <martin@ximian.com>
7485 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
7488 (write_generic_param_entry): Encode our custom attrs.
7490 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
7492 2005-12-07 Martin Baulig <martin@ximian.com>
7494 * reflection.c (encode_new_constraint): Removed; we don't use the
7495 `NewConstraintAttribute' anymore.
7497 2005-12-06 Zoltan Varga <vargaz@gmail.com>
7499 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
7500 not fire a TypeResolve event when Assembly.GetType () is called.
7502 2005-12-05 Ben Maurer <bmaurer@ximian.com>
7504 Beginning of support for nullable types in the runtime. Parts of
7505 this patch are from Martin.
7507 * appdomain.c (MONO_CORLIB_VERSION): Bump
7509 * domain.c (mono_init_internal): get the nullable type
7511 * class.c (mono_class_is_nullable): New method
7512 (mono_class_get_nullable_param): New mehod
7513 (mono_class_create_generic): In types T? set cast_class to T
7515 * class-internals.h (MonoDefaults): new nullable default class
7516 (mono_class_get_nullable_param, mono_class_get_nullable_param):
7519 2005-12-05 Raja R Harinath <rharinath@novell.com>
7521 * metadata.c (select_container): New. Refactor code to select the
7522 appropriate GenericContainer given the type of generic parameter
7524 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
7525 not a MonoGenericContext. Use select_container. Update parameters.
7526 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
7528 (unwrap_arrays): Remove duplicate tests.
7529 (find_generic_param): Rename from 'has_same_context'. Now walks a
7530 generic instantiated class to find any arguments that are generic
7532 (mono_type_create_from_typespec_full): Use find_generic_param to
7533 avoid evicting some generic instantiations from the typespec
7536 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
7538 * reflection.c: fixed writing of doubles on ARM FPA.
7540 2005-12-02 Robert Jordan <robertj@gmx.net>
7542 * icall.c: Fixed EventInfo.ReflectedType (#76829).
7544 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7546 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
7547 least on SUSE 10 they are not the same (on debian, they are just the
7550 2005-12-01 Raja R Harinath <rharinath@novell.com>
7552 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
7553 DeclaringType for VARs and MVARs.
7554 * class.c (set_generic_param_owner): Fix initialization of owner
7557 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7559 * icall.c: fixed Enum.ToObject() to correctly convert the values.
7561 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7563 * threadpool.c: workaround for a bug that shows up on the Mac:
7564 select()+connect() on a blocking socket is not like it should
7565 be, so we proceed to connect() in that case, wasting the I/O
7566 threadpool thread until connect succeedes. Fixes bug #75436.
7568 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7570 * threadpool.c: fix typo when setting file descriptor states.
7572 2005-11-28 Raja R Harinath <rharinath@novell.com>
7574 * class-internals.h (MonoGenericContainer.is_signature): Remove.
7575 * metadata.c (mono_metadata_parse_method_signature_full): Don't
7576 create a temporary signature container.
7577 (mono_metadata_parse_generic_param): Update to changes.
7578 (mono_type_create_from_typespec_full): Update to changes.
7579 * loader.c (method_from_memberref): Don't use a
7580 MonoGenericContainer while parsing a memberref signature.
7581 (method_from_methodspec): Remove dead-store of the 'container'
7582 variable. It's overwritten before use.
7584 * metadata.c (mono_type_create_from_typespec_full): Make debugging
7586 (mono_metadata_parse_generic_param): Likewise.
7587 * loader.c (find_method_in_class): Does not need a
7588 MonoGenericContainer. Use 'mono_method_signature' rather than
7589 'mono_method_signature_full'.
7590 (find_method, mono_get_method_constrained, method_from_memberref):
7593 * metadata.c (mono_type_create_from_typespec_full): Ensure that
7594 owner-less generic-parameters are never evicted from the typespec
7597 * loader.c (method_from_memberref): Don't use the current context
7598 when parsing signatures.
7599 (method_from_methodspec, mono_get_method_from_token): Update to changes.
7601 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
7602 side-effects in g_assert.
7603 * loader.c (mono_get_method_from_token): Resolve klass earlier so
7604 that we don't potentially lose information.
7606 2005-11-26 Dick Porter <dick@ximian.com>
7609 * threads.c: icalls to implement basic (ie, not named)
7610 System.Threading.Semaphore.
7612 2005-11-24 Dick Porter <dick@ximian.com>
7615 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
7616 Use GetProcessId() if it's available.
7618 2005-11-23 Zoltan Varga <vargaz@gmail.com>
7620 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
7622 2005-11-23 Raja R Harinath <rharinath@novell.com>
7623 Ankit Jain <jankit@novell.com>
7625 * loader.c (mono_get_method_from_token): Initialize 'method' field
7626 of all generic parameters before parsing the signature. Remove
7627 code that "fixed"-up MVAR references.
7629 2005-11-23 Ankit Jain <jankit@novell.com>
7631 * metadata.c (mono_metadata_has_generic_params):
7632 (mono_metadata_load_generic_param_constraints):
7633 (mono_metadata_load_generic_params): Move duplicate code ...
7634 (mono_metadata_get_generic_param_row): ... here. Returns the
7635 first row-id in GenericParam table for a given owner (token).
7636 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
7639 2005-11-23 Raja R Harinath <rharinath@novell.com>
7640 Ankit Jain <jankit@novell.com>
7642 * metadata.c (mono_metadata_class_equal): Pass signature_only when
7644 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
7645 type->data.generic_param only if the type is an MVAR.
7646 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
7647 leak owner-less VARs and MVARs into managed space.
7649 2005-11-21 Martin Baulig <martin@ximian.com>
7652 (MonoMethod): Moved the `generic_container' here from
7653 `MonoMethodNormal' since we now also need it for
7654 `MonoMethodPInvoke';
7655 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
7656 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
7657 an union containing both `MonoMethodNormal' and
7658 `MonoMethodPInvoke'.
7661 (mono_get_method_from_token): Allow implementing generic methods
7665 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
7668 2005-11-17 Dick Porter <dick@ximian.com>
7672 * process.c: Split the Process Start_internal icall into
7673 ShellExecuteEx_internal and CreateProcess_internal, which are
7674 called depending on whether UseShellExecute is true. Fixes bug
7677 * appdomain.c (MONO_CORLIB_VERSION): Incremented
7679 2005-11-17 Zoltan Varga <vargaz@gmail.com>
7681 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
7682 'msize' parameters, use the information in 'mspec' instead.
7683 (emit_object_to_ptr_conv): Ditto.
7685 * marshal.c (emit_struct_conv): Handle explicit layout structs with
7686 fields out of order. Fixes #76733.
7688 2005-11-17 Ankit Jain <jankit@novell.com>
7690 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
7692 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
7694 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
7697 2005-11-16 Zoltan Varga <vargaz@gmail.com>
7699 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
7700 for types with non-auto layout. Fixes #76717.
7702 2005-11-16 Ankit Jain <jankit@novell.com>
7704 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
7705 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
7706 if generic_context is null.
7707 (mono_metadata_generic_param_equal): param->owner can be null.
7708 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
7711 2005-11-16 Zoltan Varga <vargaz@gmail.com>
7713 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
7716 2005-11-15 Martin Baulig <martin@ximian.com>
7718 * object.c (set_value): Use mono_class_from_mono_type() instead of
7719 the hack for generic instances; fixes #76136.
7721 2005-11-15 Zoltan Varga <vargaz@gmail.com>
7723 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
7726 * image.c (load_metadata_ptrs): Initialize the new fields.
7728 * reflection.c (create_dynamic_mono_image): Ditto.
7730 * reflection.c (build_compressed_metadata): Use the new fields.
7732 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
7735 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
7738 2005-11-15 Ankit Jain <jankit@novell.com>
7739 Raja R Harinath <harinath@gmail.com>
7741 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
7742 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
7743 new per-generic_container cache if the cached MonoType's context matches
7744 the current context.
7745 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
7746 to the expected context.
7747 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
7749 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7751 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
7752 we changed the signature of an icall.
7753 * icall.c: Modify to mono_double_ParseImpl return true/false
7754 depending on the success, instead of throwing the exception. This will
7755 help us in Double.TryParse methods.
7757 2005-11-14 Zoltan Varga <vargaz@gmail.com>
7759 * marshal.c (emit_marshal_object): Throw an exception when
7760 marshalling 'object' instead of crashing. Fixes #76696.
7762 2005-11-11 Zoltan Varga <vargaz@gmail.com>
7764 * class-internals.h: Add prototype for mono_type_get_full_name ().
7766 2005-11-11 Dick Porter <dick@ximian.com>
7768 * threads.c (mono_thread_manage): Make sure the main thread has
7769 abandoned all its mutexes when cleaning up. Fixes bug 74680.
7771 2005-11-11 Zoltan Varga <vargaz@gmail.com>
7773 * loader.c (mono_loader_set_error_type_load): Log a warning to the
7774 console about the missing type.
7775 (mono_loader_set_error_method_load): Ditto.
7777 2005-11-09 Miguel de Icaza <miguel@novell.com>
7779 * mono-config.c (mono_get_config_dir): Set the system defaults if
7782 * assembly.c (mono_set_dirs): New API entry point to set the
7783 assembly and the config directory in one call
7785 2005-11-09 Zoltan Varga <vargaz@gmail.com>
7787 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
7788 the ftnptr was created from a delegate in a domain other than the
7789 current domain. Fixes #75377.
7791 * exception.h exception.c: Add mono_get_exception_not_supported ().
7793 2005-11-08 Martin Baulig <martin@ximian.com>
7795 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
7797 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
7799 * security-manager.h: Added definitions to deal with strongname key
7800 pairs bigger (and smaller) than 1024 bits.
7801 * reflection.c: Remove hardcoded strongname size (128 bytes) and
7802 adjust wrt the public key length being used.
7804 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
7806 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
7807 Windows build (r51396-51397).
7809 2005-11-03 Martin Baulig <martin@ximian.com>
7811 * class.c (mono_class_setup_vtable_general): Also add generic
7812 methods to the vtable; fixes #76581.
7814 2005-11-01 Miguel de Icaza <miguel@novell.com>
7816 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
7817 sure that we lookup GetString method from the System.Text.Encoding
7818 class, not the derived class or we get an empty method.
7822 2005-10-25 Miguel de Icaza <miguel@novell.com>
7824 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
7825 if it has been previously set (embedders).
7827 Make mono_set_rootdir available also on Unix.
7829 005-10-24 Robert Jordan <robertj@gmx.net>
7831 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
7833 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
7835 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
7836 only calls which are made to native code use this flag.
7838 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
7840 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
7842 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7843 Add support for FieldBuilders.
7845 2005-10-29 Martin Baulig <martin@ximian.com>
7848 (mono_debug_using_mono_debugger): New public method; returns
7849 whether we're running inside the debugger.
7851 2005-10-27 Zoltan Varga <vargaz@gmail.com>
7853 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
7854 for Method/Constructor/FieldBuilders.
7856 2005-10-26 Zoltan Varga <vargaz@gmail.com>
7858 * reflection.c (module_add_cattrs): Save custom attributes for global methods
7861 2005-10-26 Martin Baulig <martin@ximian.com>
7863 * mono-debug-debugger.c
7864 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
7866 2005-10-24 Raja R Harinath <harinath@gmail.com>
7868 * icall.c (base64_to_byte_array): Don't pass an out-of-range
7871 2005-10-21 Zoltan Varga <vargaz@gmail.com>
7873 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
7874 when passing valuetypes byref. Fixes #76502.
7876 2005-10-19 Jackson Harper <jackson@ximian.com>
7878 * profiler.c: Don't put a . in front of types that are not in a
7881 2005-10-18 Zoltan Varga <vargaz@gmail.com>
7883 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
7885 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
7887 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
7889 (mono_marshal_get_ldflda_wrapper): Fix a warning.
7891 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7893 * assembly.c metadata-internals.h icall.c: Define an additional
7894 parameter for mono_assembly_name_parse_full, so we can avoid creating
7895 S.R.AssemblyName.Version when no version info wasn't passed.
7897 2005-10-09 Miguel de Icaza <miguel@novell.com>
7899 * class.c (mono_type_get_full_name): Reimplement method that was
7902 * image.c: Some docs
7904 2005-10-10 Zoltan Varga <vargaz@gmail.com>
7906 * profiler.c (output_newobj_profile): Fix printing of Total memory
7909 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
7911 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
7913 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
7915 * threads.c: remove debug output.
7917 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
7919 * threads.c (mono_thread_manage): Fix crashes if more than 64
7920 threads need to be aborted. Hopefully fixes #75899.
7922 * assembly.c (mono_stringify_assembly_name): New helper function.
7924 * class.c: Use mono_stringify_assembly_name instead of the similar
7927 * assembly.h assembly.c: Add support for calling a postload search
7928 hook if an assembly cannot be loaded.
7930 * appdomain.c: Register new search hooks which call the AssemblyResolve
7931 events in AppDomain. Fixes #75231
7933 2005-10-07 Martin Baulig <martin@ximian.com>
7935 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
7936 methods without debug info.
7938 2005-10-07 Zoltan Varga <vargaz@gmail.com>
7940 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
7943 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7945 * file-io.c: now that we return symlinks, use lstat and, when the file
7946 is a symbolic link, stat, to get the file attributes. Also avoid the
7947 conversion to/from utf16/external.
7949 2005-10-06 Zoltan Varga <vargaz@gmail.com>
7951 * class.c (mono_class_layout_fields): Compute klass->has_references
7952 correctly if an embedded valuetype is not yet initialized. Fixes
7955 2005-10-04 Martin Baulig <martin@ximian.com>
7958 (mono_metadata_load_generic_param_constraints): New public
7959 function; splitted the constraints loading out from
7960 mono_metadata_load_generic_params().
7962 * class.c (mono_class_create_from_typedef): Call
7963 mono_metadata_load_generic_param_constraints() after setting up
7964 the type and creating our parent; fixes #75329.
7966 2005-10-04 Martin Baulig <martin@ximian.com>
7968 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
7969 non-dynamic parent classes.
7971 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
7973 * file-io.c : win32 build fix (ETXTBSY seems not found).
7975 2005-10-04 Martin Baulig <martin@ximian.com>
7978 (mono_image_get_methodspec_token): Make the cache actually work;
7981 2005-10-04 Martin Baulig <martin@ximian.com>
7983 * class.c (mono_class_name_from_token): Removed the unneccessary
7984 `MonoGenericContext *' argument.
7986 2005-10-04 Martin Baulig <martin@ximian.com>
7989 (method_from_methodspec): Make the caching work again; fixes the
7990 performance regression from #76262.
7992 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7996 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
7997 GetFileSystemEntries that performs the same work but without going
7998 into io-layer, locking, etc.
8000 2005-09-30 Zoltan Varga <vargaz@gmail.com>
8002 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
8003 ThreadState_Stopped as well. Fixes #76047.
8005 2005-09-29 Martin Baulig <martin@ximian.com>
8008 (inflate_generic_context): If the new context has a `gmethod', set
8009 its `container' that that gmethod's `container'.
8012 (mono_metadata_parse_generic_param): Simplify things;
8013 `generic_container = generic_context->container;' is just fine.
8015 * loader.c (method_from_methodspec): Code cleanups.
8017 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
8019 * decimal.c: fix warning (and let gcc generate correct
8020 code on ARM with optimizations).
8022 2005-09-28 Martin Baulig <martin@ximian.com>
8025 (method_from_memberref): Added `MonoGenericContext *class_context'
8026 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
8027 (method_from_methodspec): If we're a memberref, use the enclosing
8028 context when parsing its parent. Fixes #76262; see gtest-206.cs.
8030 2005-09-28 Martin Baulig <martin@ximian.com>
8032 * object.c (mono_runtime_invoke_array): Added support for
8033 MONO_TYPE_GENERICINST; fixes #75917.
8035 2005-09-27 Martin Baulig <martin@ximian.com>
8037 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
8038 `k->byval_arg.type' to determine the actual type.
8040 * loader.c (method_from_methodspec): Removed some hacks.
8042 2005-09-27 Ben Maurer <bmaurer@ximian.com>
8044 * class-internals.h (mono_field_is_deleted): Do the test for
8045 rtspecialname before we check the actual name of the field. This
8046 prevents us from dereferencing a pointer into the string table,
8047 saving us from accessing a few pages
8049 * *.c: Replace the use of {Enter,Leave}CriticalSection with
8050 macros. This will allow a deadlock debugger to easily be plugged
8053 2005-09-27 Martin Baulig <martin@ximian.com>
8055 * loader.c (method_from_methodspec): Create a "signature"
8056 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
8058 2005-09-27 Martin Baulig <martin@ximian.com>
8061 (inflate_generic_class): Correctly set the new context's
8065 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
8066 instead of a `MonoGenericContext *'.
8067 (mono_method_signature_full): Take a `MonoGenericContainer *'
8068 instead of a `MonoGenericContext *'.
8071 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
8072 instead of a `MonoGenericContext *'.
8073 (mono_metadata_parse_method_signature_full): Likewise.
8075 2005-09-26 Martin Baulig <martin@ximian.com>
8078 (mono_class_from_generic_parameter): Set `klass->generic_container'
8079 (mono_class_from_generic_parameter): Likewise.
8080 (mono_bounded_array_class_get): We inherit the generic container
8081 from the element class.
8084 (find_method, find_method_in_class): Take a `MonoGenericContext *'
8085 argument rather than computing it here.
8086 (method_from_memberref): Correctly set the generic context before
8087 parsing the signature. Fixes #75681.
8089 2005-09-26 Zoltan Varga <vargaz@gmail.com>
8091 * object.c (mono_class_has_special_static_fields): Fix warnings.
8093 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8095 * assembly.c: Add parse_public_key function, to
8096 par the public keys. Also added mono_assembly_name_parse_full,
8097 to define it the parsed key should be freed or not.
8098 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
8099 to parse a long format assembly name.
8100 * metadata-internals.h: Keep mono_assembly_name_parse_full as
8101 private, since calling it to preserve the key requires
8102 freeing it manually.
8104 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
8106 * locales.c : removed HAVE_ICU part.
8108 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
8110 * object.c (mono_class_create_runtime_vtable): Avoid calling
8111 field_is_special_static if the klass has no special static fields.
8113 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
8114 (MonoCachedClassInfo): Likewise.
8116 * object.c (mono_class_has_special_static_fields): New helper function.
8118 2005-09-23 Zoltan Varga <vargaz@gmail.com>
8120 * class.c (mono_class_create_from_typedef): Don't call
8121 interfaces_from_typedef_full for enums.
8122 (mono_class_create_from_typedef): Compute the base types of enums directly
8123 without calling mono_class_setup_fields ().
8124 (mono_class_find_enum_basetype): New helper function.
8126 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
8127 one place inside the string heap.
8129 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
8131 * class.c: locking fixes, code cleanups, some docs added.
8132 Allocate some data structures in the image mempool.
8134 2005-09-23 Zoltan Varga <vargaz@gmail.com>
8136 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
8139 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
8141 * class-internals.h, class.c, reflection.c: reduce memory taken by
8144 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
8146 * metadata.c, metadata.h, loader.h: documentation updates, code and
8149 2005-09-23 Zoltan Varga <vargaz@gmail.com>
8151 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
8154 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
8155 page faults caused by the runtime while reading metadata.
8157 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8159 * socket-io.c: the field names were changed 3 months ago and no one
8160 realized until bug #76077 got filed!
8162 2005-09-20 Martin Baulig <martin@ximian.com>
8164 * icall.c (assembly_icalls): Removed some unused debugger icalls.
8166 2005-09-20 Martin Baulig <martin@ximian.com>
8168 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
8169 write the rank into the class entry.
8171 2005-09-20 Martin Baulig <martin@ximian.com>
8173 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
8175 2005-09-19 Zoltan Varga <vargaz@gmail.com>
8177 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8179 * icall.c (custom_attrs_defined_internal): New icall.
8181 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
8183 (mono_custom_attrs_construct_by_type): New helper function.
8185 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
8187 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
8188 terminate the resulting string. Fixes #76123.
8190 2005-09-16 Martin Baulig <martin@ximian.com>
8193 (mono_debug_add_method): Ignore inflated methods for the moment.
8195 2005-09-14 Martin Baulig <martin@ximian.com>
8197 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
8199 2005-09-13 Zoltan Varga <vargaz@gmail.com>
8201 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
8202 return a success/failure indication.
8203 (mono_metadata_interfaces_from_typedef_full): Ditto.
8204 (get_constraints): Ditto.
8206 2005-09-12 Zoltan Varga <vargaz@gmail.com>
8208 * marshal.c (emit_marshal_array): Fix handling of null arrays.
8210 * marshal.c (emit_marshal_array): Add support for returning string
8211 arrays from delegates. Fixes #76063.
8213 * marshal.c: Use the emit_ldloc/stloc macros where possible.
8215 2005-09-11 Zoltan Varga <vargaz@gmail.com>
8217 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
8220 2005-09-09 Zoltan Varga <vargaz@gmail.com>
8222 * reflection.c icall.c: Fix after mono_get_exception_type_load
8225 * assembly.c (mono_assembly_get_assemblyref): New helper function.
8226 (mono_assembly_load_reference): Use the new helper.
8228 * class-internals.h (MonoLoaderError): New structure containing
8229 information about type loading errors.
8231 * class-internals.h loader.c: Add APIs to store per-thread loader
8234 * loader.c class.c: Set the loader error if needed.
8236 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
8238 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
8240 * decimal.c: fixed to handle the broken ARM fp format.
8242 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
8244 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
8247 2005-09-06 Martin Baulig <martin@ximian.com>
8249 * domain.c (supported_runtimes): Added v2.0.50727.
8251 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
8253 * culture-info.h: reduce the size of some structures.
8255 2005-09-05 Martin Baulig <martin@ximian.com>
8257 Reflect latest API changes in the August CTP.
8260 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
8261 ("MonoType.HasGenericArguments"): Removed.
8262 ("MonoMethod.BindGenericParameters"): Renamed to
8263 "MakeGenericMethod".
8264 ("MethodBuilder.BindGenericParameters"): Renamed to
8265 "MakeGenericMethod".
8267 2005-09-05 Martin Baulig <martin@ximian.com>
8269 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
8271 2005-09-05 Martin Baulig <martin@ximian.com>
8273 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8275 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
8276 generic_container is non-NULL.
8278 2005-09-05 Martin Baulig <martin@ximian.com>
8280 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8282 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
8284 2005-08-29 Michal Moskal <malekith@nemerle.org>
8286 * reflection.c (encode_locals,
8287 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
8288 for large generic types.
8290 2005-09-05 Martin Baulig <martin@ximian.com>
8292 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8294 * class.c (mono_dup_array_type): New public method.
8295 (mono_metadata_signature_deep_dup): New public method.
8296 (dup_type): Correctly duplicate array and function types.
8298 2005-09-05 Martin Baulig <martin@ximian.com>
8300 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8302 * reflection.c (get_default_param_value_blobs): Handle generic types
8303 and generic methods.
8305 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
8307 * class.c: Fixed error reporting (method/class were inversed) for
8308 inheritance demands.
8309 * security-manager.c|h: Added the AppDomain when calling the managed
8310 System.Security.SecurityManager.InheritanceDemand method.
8312 2005-09-01 Raja R Harinath <rharinath@novell.com>
8314 * reflection.c (encode_marshal_blob): 'marshaltype' and
8315 'marshaltyperef' are alternate sources for the custom marshaler
8318 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
8320 * class.c: fix creation of array classes with rank == 1
8321 (patch by Ankit Jain <jankit@novell.com>).
8323 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
8325 * object.c: fix check for creating the bound data for arrays vs
8328 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8330 * object.c: configuration file name is now based on the executable name,
8331 not the image name. Fixes bug #75931.
8333 2005-08-29 Zoltan Varga <vargaz@gmail.com>
8335 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
8336 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
8338 2005-08-25 Zoltan Varga <vargaz@gmail.com>
8340 * rand.c: Use wincrypt.h instead of WinCrypt.h.
8342 2005-08-24 Ankit Jain <jankit@novell.com>
8343 Raja R Harinath <rharinath@novell.com>
8345 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
8346 called by it recursively.
8347 (mono_class_init): Remove special case in pending_init handling, since it's
8348 superseded by the fix to mono_class_from_typeref.
8350 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
8352 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
8353 BROKEN_THREAD_START stuff.
8355 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
8357 * class-internals.h object.c: Add a new kind of trampoline called a delegate
8360 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
8362 * object.c (mono_delegate_ctor): Replace the original function address with
8363 a delegate trampoline.
8365 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
8367 * icall.c: add boolean argument to base64_to_byte_array and
8368 InternalFromBase64String to control whether a whitespace-only string
8369 is allowed (or should casue a FormatException to be thrown). We need
8370 this as the behavior has changed between MS.NET 1.x and 2.0, and we
8371 to match the MS behaviour in both profiles.
8372 * appdomain.c: Bump corlib version.
8374 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8376 This patch implements a big portion of publisher policy
8377 support, used to bind assembly versions and redirect
8378 one assembly from version A to version B.
8381 New GSList loaded_assembly_bindings, for storing the cached
8383 (assembly_binding_maps_name): New static function for checking if a
8384 assembly binding information maps an assembly name.
8385 (mono_assembly_binding_info_free): New function for freeing
8386 assembly binding information resources.
8387 (get_publisher_policy_info): New static function for retrieving
8388 assembly binding information from a MonoImage.
8389 (compare_versions): New static function for comparing an assembly
8390 binding information data and the version of an assembly name.
8391 (check_policy_versions): New static function for checking if an
8392 assembly binding info mapping an assembly name is valid for it.
8393 (mono_assembly_load_publisher_policy): New static function for
8394 loading the 'policy.major.minor.MyAssembly' image for an assembly
8395 with an assembly name 'aname'.
8396 (mono_assembly_bind_version): New static function for updating
8397 assembly redirection.
8398 (mono_assembly_apply_binding): New static function for applying
8400 (search_binding_loaded): New static function for searching
8401 loaded assembly binding infos in the cache domain.
8402 (mono_assembly_load_full): Don't apply assembly binding for
8403 reflection only assemblies.
8405 * metadata-internals.h: Add MonoAssemblyBindingInfo,
8406 which contains information about assembly binding. Also
8407 declare signature for mono_config_parse_publisher_policy ()
8408 function, used to retrieve pub policy info.
8411 (publisher_policy_start): New static function used to parse publisher
8412 policy config files.
8413 (publisher_policy_parser): New static MonoParseHandler containing
8414 the functions used when parsing config files.
8415 (mono_config_parse_publisher_policy): New function for parsing
8416 publisher policy files.
8418 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
8420 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
8422 * marshal.c (mono_delegate_free_ftnptr): Ditto.
8424 * object.c (mono_get_addr_from_ftnptr): New helper function.
8426 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
8428 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8430 2005-08-19 Dick Porter <dick@ximian.com>
8432 * threads.c, threads.h, appdomain.c, appdomain.h,
8433 profiler-private.h, monitor.c, object.c, object-internals.h,
8434 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
8435 store the thread ID, so it can hold a 64 bit value if needed.
8437 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
8439 * reflection.c (mono_reflection_create_dynamic_method): Store the
8440 handle class into the method references as well so ldtoken works in
8443 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
8446 2005-08-19 Ankit Jain <jankit@novell.com>
8449 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
8450 here rather than using the method signature of a arbitrary function
8451 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
8453 Hack done with Harinath.
8455 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8457 * threadpool.c: disable printing stack traces when we get a exception
8458 in a threadpool thread. I need to do more testing to figure out which
8459 cases actually print this. Fixes bug #75828.
8461 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8463 * icall.c: there might be ignored whitespace after the last '='. This
8464 fixes length computation and bug #75840.
8466 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
8468 * assembly.c (mono_assembly_load_full): Consider .exe extension as
8471 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
8474 * reflection.c (create_custom_attr_data): Ditto.
8476 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
8478 * locales.c, culture-info.h : removed RegionLCIDMap.
8479 * culture-info-tables.h : regenerated.
8481 2005-08-16 Martin Baulig <martin@ximian.com>
8483 * class.c (mono_type_get_name_recurse): Small fix.
8485 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
8487 * locales.c : indentation fixie.
8489 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
8491 * object-internals.h,
8495 icall.c : added RegionInfo table support.
8496 * culture-info-table.h : regenerated for region support.
8498 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
8500 * reflection.c (resolve_object): handle all kinds of MonoMethod
8501 including generic ones
8503 2005-08-12 Ankit Jain <jankit@novell.com>
8505 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
8506 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
8508 2005-09-12 Lluis Sanchez <lluis@ximian.com>
8510 * process.c: Don't close a thread handle when it's NULL. This is a
8511 workaround for bug #75733.
8513 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
8515 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
8517 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
8519 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
8521 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8523 * threadpool.c: if a work item in the thread pool has a callback that
8524 catches a exception, don't propagate it after invoking the callback.
8527 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
8529 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
8531 * class-internals.h (MonoCachedClassInfo): Add some new fields.
8533 * class.c (mono_class_init): Load field info lazily in the AOT case.
8535 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
8537 2005-08-03 Ankit Jain <jankit@novell.com>
8540 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
8541 PInvoke calling convention is 0.
8543 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
8545 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
8546 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
8548 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
8550 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
8551 to handle threads not started by the GC (patch by Michael Meeks
8552 <michael.meeks@novell.com>).
8554 2005-07-31 Kamil Skalski <nazgul@omega.pl>
8556 * reflection.c: Make buffer used in emitting types larger for some
8557 big generic types (patch by Michal Moskal).
8559 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
8561 * mono-debug.c: Fix some (not all) alignment problems.
8563 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8565 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
8566 Invoke mono_image_load_from_data_full passing the refonly
8570 (mono_assembly_open_from_bundle): Add the refonly argument,
8571 in order to pass it to other methods it calls to.
8572 (do_mono_assembly_open): Add the refonly argument, in order
8573 to pass it to other methods it calls to.
8574 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
8575 the refonly parameter to it.
8577 * image.c: Add loaded_images_refonly_hash and
8578 loaded_images_refonly_guid_hash to cache the reflection
8580 (mono_images_init): Initialize the hash tables used for
8581 caching the reflection only images.
8582 (load_modules): Invoke mono_image_open_full passing the refonly
8583 parameter to load the modules the correct way.
8584 (build_guid_table): Add the refonly argument, to re-build the
8586 (do_mono_image_open): Added the refonly argument, in order to
8587 define it for the loaded image.
8588 (mono_image_loaded_full): New function, which receives an
8589 additional parameter to look for the image in the refonly or
8590 non-refonly section.
8591 (mono_image_loaded): Updated, using mono_image_loaded_full.
8592 (mono_image_loaded_by_guid_full): The same case that happens
8593 with mono_image_loaded_full.
8594 (mono_image_loaded_by_guid): Likewise.
8595 (register_image): Use the ref_only variable inside MonoImage
8596 to decide in which hash table store the current image.
8597 (mono_image_open_from_data_full): Rename
8598 mono_image_open_from_data to mono_image_open_from_data_full,
8599 adding the refonly argument, to define the ref_only variable
8601 (mono_image_open_from_data): Return
8602 mono_image_open_from_data_full.
8603 (mono_image_open_full): Rename mono_image_open to
8604 mono_image_open_full, receiving the new refonly argument,
8605 to pass it to inner methods.
8606 (mono_pe_file_open): Update this function, to open
8607 a MonoImage as a non-refonly image.
8608 (mono_image_close): Use the refonly variable inside
8609 MonoImage to remove the image from the correct caches.
8611 * image.h: Add the signatures of mono_image_open_full,
8612 mono_image_open_from_data_full, mono_image_loaded_full,
8613 mono_image_loaded_by_guid_full.
8615 * metadata-internals.h: Add the ref_only field to
8618 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8620 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
8621 Fix the last behavior, which used to load the assemblies and
8622 extract MonoReflectionAssemblyName information, instead of
8623 extract it from the metadata tables. Needed for Reflection
8626 2005-07-29 Martin Baulig <martin@ximian.com>
8628 * mono-debug-debugger.c
8629 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
8633 (mono_debug_address_from_il_offset): Check whether we have
8634 debugging support before attempting to take the lock.
8635 (mono_debug_source_location_from_address): Likewise.
8636 (mono_debug_source_location_from_il_offset): Likewise.
8637 (mono_debug_il_offset_from_address): Likewise.
8638 (mono_debug_address_from_il_offset): Likewise.
8640 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
8642 * class.c (mono_class_from_name_case): Add support for dynamic images.
8645 * object.c (mono_class_compute_gc_descriptor): Add a workaround
8648 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
8650 * reflection.c (mono_method_get_object): Fix warning.
8652 2005-07-28 Martin Baulig <martin@ximian.com>
8655 (mono_debug_add_wrapper): Also write the wrapper type.
8657 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
8659 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
8661 * class.c (mono_class_init): Avoid reading nested classes if the AOT
8662 data indicates the class has none.
8664 2005-07-26 Ben Maurer <bmaurer@ximian.com>
8666 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
8667 loader lock with the debugger lock. Prevents deadlocks for beagle.
8669 Beagle can now run on an smp box for a weekend without any
8672 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
8674 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
8675 in a module. Fixes #75629.
8677 2005-07-26 Martin Baulig <martin@ximian.com>
8679 * mono-debug.c (mono_debug_add_wrapper): New static method.
8680 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
8681 interncall or a wrapper.
8683 * mono-debug.h (MonoDebugWrapperData): New public typedef.
8684 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
8685 (MONO_DEBUGGER_VERSION): Bump to 51.
8687 * mono-debug-debugger.c
8688 (mono_debugger_add_type): Removed this empty function.
8689 (mono_debugger_add_method): Likewise.
8691 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
8693 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
8694 before accessing method->slot.
8696 2005-07-21 Jb Evain <jbevain@gmail.com>
8698 * reflection.c (method_encode_clauses/class): Handle filters clauses.
8701 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
8703 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
8706 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
8708 * image.h image.c: Add mono_image_get_guid () API function.
8710 2005-07-19 Ben Maurer <bmaurer@ximian.com>
8712 There were issues when multiple threads tried to load
8713 assemblies. A deadlock was created between assemblies_mutex and
8714 mono_domain_assemblies_lock. This fixes the issue by making the
8715 assembly ref counting be lock free. See bug 75586.
8717 * image.c (mono_image_close): The add ref function here was using
8718 Interlocked operations while the unref was using a mutex and a
8719 --. I don't think this was ever a bug that would be exposed in a
8720 non-pendantic way (ie, by an embedder doing a ref on one thread
8721 and an unref on another), but for the sake of correctness, this is
8724 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
8725 (mono_assembly_load_reference): Call mono_assembly_addref rather
8726 than touching the refcount ourselves.
8727 (mono_assembly_close): Use InterlockedDecrement to unref the
8728 assembly. Don't acquire the lock unless it is actually needed.
8730 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
8732 * class.c (mono_class_layout_fields): Fix calculation of has_references
8735 2005-07-12 Martin Baulig <martin@ximian.com>
8737 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8740 (mono_type_hash): Provide better hashing for generic instances.
8741 (mono_generic_inst_hash): Improve hashing.
8742 (mono_generic_class_hash): Likewise.
8744 * reflection.c (mymono_metadata_type_hash): Improve hashing for
8747 2005-07-12 Martin Baulig <martin@ximian.com>
8749 * reflection.c (mono_reflection_create_runtime_class): Remove the
8750 hack for generic type definitions and non-`Run' assemblies.
8751 (mono_reflection_bind_generic_parameters): Also use
8752 `klass->wastypebuilder' to check for TypeBuilders.
8754 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
8756 * class.c (mono_class_layout_fields): Fix calculation of has_references
8759 * class.c (inflate_generic_class): Fix a leak.
8760 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
8763 2005-07-11 Martin Baulig <martin@ximian.com>
8765 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
8768 2005-07-11 Martin Baulig <martin@ximian.com>
8770 * loader.c (find_method): Also lookup in
8771 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
8773 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8775 * appdomain.c (mono_domain_unload): Don't free the error message
8776 before passing it to mono_get_exception_...
8778 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
8780 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
8782 * threads.c: try to better guess an available RT signal (bug #75387).
8784 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8786 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
8789 2005-07-07 Martin Baulig <martin@ximian.com>
8791 * class.c (mono_type_get_name_full): Return NULL for
8792 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
8795 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8797 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
8798 exit the appdomain as well being aborted.
8800 * threadpool.c: Create all threadpool threads inside the root appdomain, and
8801 change back to the root domain after calling managed code. This enables
8802 appdomains using threadpools to be unloaded.
8804 2005-07-07 Martin Baulig <martin@ximian.com>
8807 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
8808 into `MonoDynamicGenericClass' since we only need it for dynamic
8811 * reflection.c (mono_class_bind_generic_parameters): We don't need
8812 to compute the `parent' here.
8814 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
8816 * culture-info-table.h : regenerated.
8818 2005-07-06 Martin Baulig <martin@ximian.com>
8821 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
8823 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
8825 2005-07-06 Martin Baulig <martin@ximian.com>
8827 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
8828 we're doing a signature-only comparision; fixes #74945.
8830 2005-07-06 Martin Baulig <martin@ximian.com>
8832 * class-internals.h (MonoGenericClass): Moved some things out into
8833 a new `MonoInflatedGenericClass' type.
8834 (MonoInflatedGenericClass): New type; the `klass' of a
8835 `MonoGenericClass' is now computed lazyly in
8836 mono_get_inflated_generic_class().
8838 * class.c (mono_get_inflated_generic_class): New public function.
8839 (mono_class_inflate_generic_method): Removed the unused
8840 `MonoClass *' argument.
8841 (setup_generic_vtable): Don't call mono_get_inflated_method() on
8843 (mono_class_create_generic): Make this static and merge it with
8844 mono_class_create_generic_2(); we're now called automatically from
8845 mono_get_inflated_generic_class().
8847 * loader.c (mono_method_signature): Call
8848 mono_get_inflated_method() here.
8850 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
8852 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
8853 type of fields with RVA.
8855 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
8856 for this pseudo class.
8857 (my_mono_class_from_generic_parameter): Likewise.
8858 (mono_class_init): Allow interfaces to have cctors.
8860 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
8862 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
8863 lazily for AOT methods.
8865 2005-07-05 Martin Baulig <martin@ximian.com>
8867 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
8868 returns FALSE for a successful match, not TRUE.
8870 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
8872 * loader.c (mono_method_get_index): Optimize this a bit.
8874 2005-07-04 Martin Baulig <martin@ximian.com>
8877 (class_compute_field_layout): Move the check for generic type
8878 definitions into mono_class_layout_fields(). Fixes #74684.
8879 (mono_class_from_generic_parameter): Correctly compute
8880 `klass->parent'; fixes #75457.
8882 * reflection.c (register_assembly, register_module): Make sure
8883 `domain->rejobject_hash' is already created.
8885 2005-07-02 Martin Baulig <martin@ximian.com>
8888 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
8889 `MonoDynamicGenericClass'.
8891 2005-07-01 Lluis Sanchez <lluis@ximian.com>
8893 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
8894 returned by a field getter is null, since null is a valid value.
8896 2005-07-01 Martin Baulig <martin@ximian.com>
8898 * reflection.c (mono_reflection_generic_class_initialize): Update
8899 the `dgclass->fields [i].parent' to the correct class.
8900 (mono_image_get_fieldref_token): Use the declaring type, not the
8903 2005-07-01 Martin Baulig <martin@ximian.com>
8905 * loader.c (find_method): Also look in the interfaces; fixes #75429.
8907 2005-06-30 Ben Maurer <bmaurer@ximian.com>
8909 * threads.c (thread_cleanup): assert that thread != NULL
8910 (wait_for_tids_or_state_change): We were using the wrong variable
8911 when accessing wait->threads. `i' was always out of the bounds of
8914 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8916 * loader.c: map user32 and kernel32 to libMonoSupportW
8918 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
8920 * appdomain.c (unload_thread_main): Mark this as WINAPI.
8922 2005-06-28 Martin Baulig <martin@ximian.com>
8924 * loader.c (method_from_methodspec): Fix #75334.
8926 2005-06-28 Martin Baulig <martin@ximian.com>
8928 Fix #74953 - Arrays now implement the generic IList<T> interface
8929 on the 2.0 platform.
8931 * class-internals.h (MonoDefaults): Added `generic_array_class'.
8933 * reflection.c (mono_class_bind_generic_parameters): New public
8934 function; similar to mono_reflection_bind_generic_parameters(),
8935 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
8937 * domain.c (mono_init_internal): Try to initialize.
8938 `mono_defaults.generic_array_class' here; this'll only succeed if
8939 we're using the 2.0 corlib.
8942 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
8943 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
8944 (mono_lookup_internal_call): Added support for nested classes.
8947 (mono_get_method_from_token): Set `result->signature->pinvoke' if
8948 we're an interncall and have generic arguments.
8951 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
8952 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
8953 instance of System.Array.InternalArray<T> for arrays, so they
8954 implement the generic IList<T> interface.
8956 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
8958 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
8959 (chastamar@yahoo.com). Fixes #75374.
8961 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
8963 * culture-info-table.h: regenerated.
8965 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8967 * icall.c: handle spaces correctly for base64 strings.
8969 2005-06-26 Ben Maurer <bmaurer@ximian.com>
8971 * *.c: Kill some warnings.
8973 2005-06-23 Duncan Mak <duncan@novell.com>
8975 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
8976 that this builds on Solaris 10 (x86).
8978 2005-06-23 Martin Baulig <martin@ximian.com>
8981 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
8982 generic type definitions.
8984 2005-06-23 Martin Baulig <martin@ximian.com>
8988 * metadata.c (mono_class_get_overrides): Renamed to
8989 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
8990 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
8991 pass it to mono_get_method_full().
8993 2005-06-22 Ben Maurer <bmaurer@ximian.com>
8995 * reflection.c (mono_reflection_create_runtime_class): take the
8996 mono_domain_lock in this method. Prevents deadlocks
8998 2005-06-22 Martin Baulig <martin@ximian.com>
9000 * loader.c (method_from_methodspec): Fix #75330.
9002 2005-06-22 Martin Baulig <martin@ximian.com>
9004 * reflection.c (type_get_qualified_name): Use
9005 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
9006 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
9007 argument; use it if we don't have an assembly name.
9009 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
9011 * object.c: In mono_message_init, set "copy out" flag for in
9012 parameters with the [Out] flag.
9014 2005-06-21 Martin Baulig <martin@ximian.com>
9017 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
9020 2005-06-21 Martin Baulig <martin@ximian.com>
9022 * class.c (mono_class_init): Don't initialize `class->fields' for
9023 generic instances since they're initialized again in
9024 compute_field_layout().
9025 (compute_field_layout): Set the field's `generic_info' here; fix
9028 2005-06-21 Martin Baulig <martin@ximian.com>
9031 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
9033 * metadata.c (mono_metadata_generic_method_equal): Also
9034 distinguish the `generic_class'; fixes #75334.
9036 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9040 * domain-internals.h:
9041 * reflection.c: 'domain_assemblies' field is now protected by its own
9042 lock. Don't call into managed code to run the AssemblyLoad event if we
9043 now there are no registered delegates for it.
9045 2005-06-20 Martin Baulig <martin@ximian.com>
9047 * class.c (mono_class_is_assignable_from): Use a custom version of
9048 mono_class_has_parent() to make things work for generic instances;
9051 2005-06-20 Martin Baulig <martin@ximian.com>
9053 * loader.c (method_from_methodspec): Apply a patch from
9054 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
9056 2005-06-20 Martin Baulig <martin@ximian.com>
9058 * class.c (mono_class_init): Reverted Zoltan's last change; it
9061 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
9063 * threads.c (wait_for_tids_or_state_change): Add missing locking.
9065 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9067 * socket-io.c: fix the index in the socket array for writable/error
9068 sockets. Fixes bug #75306.
9070 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
9072 * class.c (mono_class_init): Allow interfaces to have static ctors.
9074 2005-06-17 Martin Baulig <martin@ximian.com>
9076 * loader.c (method_from_methodspec): Use `context->container' when
9077 parsing the `gmethod->inst'.
9079 2005-06-17 Martin Baulig <martin@ximian.com>
9081 * class.c (mono_type_get_name_recurse): Don't add the assembly
9082 name for type arguments.
9084 2005-06-15 Martin Baulig <martin@ximian.com>
9086 * reflection.c (mono_image_get_inflated_method_token): Encode
9087 correct klass; fixes #75260.
9089 2005-06-13 Michal Moskal <malekith@nemerle.org>
9091 * icall.c: Make GetCorrespondingMethod/Constructor take
9092 MonoReflectionMethod method not MonoMethod. Removed
9093 MonoType.GetCorrespondingField, and make
9094 MonoGenericType.GetCorrespondingField take name not
9097 2005-06-13 Michal Moskal <malekith@nemerle.org>
9099 * reflection.c (field_encode_signature, encode_locals):
9100 Make sizes of buffers for types larger (for big generic types).
9101 (create_generic_typespec,
9102 mono_reflection_sighelper_get_signature_local,
9103 mono_reflection_sighelper_get_signature_field):
9104 Add asserts for too small buffers.
9106 2005-06-15 Martin Baulig <martin@ximian.com>
9108 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
9109 if our parent is not a dynamic type.
9111 2005-06-15 Martin Baulig <martin@ximian.com>
9113 * class-internals.h (MonoTypeNameFormat): New enum.
9116 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
9117 (mono_type_get_full_name): Removed.
9118 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
9119 argument instead of the boolean's.
9121 * icall.c (ves_icall_System_MonoType_getFullName):
9122 Added `gboolean assembly_qualified'.
9125 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
9127 * reflection.c (mono_reflection_parse_type): Parse the new type
9130 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9132 * icall.c: no need to convert from utf16 to utf8 and then back again
9133 after the call to GetLogicalDrives.
9135 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9137 * icall.c: frombase64. Fix problems exposed by new tests.
9139 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9141 * icall.c: added internal calls for converting char [] and strings in
9142 base64 into byte [].
9144 2005-06-10 Martin Baulig <martin@ximian.com>
9146 * class.c (mono_class_create_generic_2): Read the nested classes
9147 from the metadata rather than from `gklass->nested_classes' since
9148 `gklass' might not be initialized yet.
9150 2005-06-09 Duncan Mak <duncan@novell.com>
9152 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
9153 all public headers. Fixes #74919.
9155 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
9157 * domain.c: The key for proxy_vtable_hash is now a pointer
9158 array. Added new GHashFunc and GCompareFunc functions for this.
9160 * class.h: The list of interfaces in MonoRemoteClass is known in
9161 advance and can't grow (we create a new MonoRemoteClass if needed),
9162 so now the interface array can be allocated together with
9165 * object.c: Added a new method create_remote_class_key.
9166 Fixed mono_remote_class so it does not depend on
9167 mono_upgrade_remote_class.
9168 Removed extend_interface_array.
9169 Added new method clone_remote_class(), which makes a copy of a remote
9170 class and adds a new interface or class to it.
9171 mono_upgrade_remote_class() now creates a new remote class (or gets
9172 it from the cache) if an vtable upgrade is needed. In this way
9173 we make sure that other objects sharing the same remote class
9174 don't get the new vtable with unwanted interfaces.
9176 * object-internals.h:
9177 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
9179 * marshal.c: Track changes in mono_upgrade_remote_class().
9181 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
9182 * icall.c: Add runtime methods for obtaining members of inflated
9183 class, which were created from supplied non-inflated members. It
9184 is used in internal Get{Method,Constructor,Field} methods in
9187 2005-06-09 Martin Baulig <martin@ximian.com>
9190 (mono_reflection_bind_generic_method_parameters): Fix #75169.
9192 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
9193 * reflection.c (mono_image_basic_init): Define
9194 Version in MonoDynamicAssembly.
9196 2005-06-08 Martin Baulig <martin@ximian.com>
9201 (mono_method_signature_full): New public method; takes a
9202 `MonoGenericContext *'.
9203 (find_method): Use mono_method_signature_full() and pass the
9204 klass'es context to it.
9206 * class.c (mono_class_is_inflated_method): Use
9207 mono_method_signature_full() and pass the context to it.
9209 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
9211 * object.c: add proper locking in mono_remote_class_vtable(),
9212 fixes possible memory corruption.
9214 2005-06-08 Michael Meeks <michael.meeks@novell.com>
9216 * marshal.c (mono_remoting_marshal_init): set
9217 initialized after initialization.
9219 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
9223 2005-06-06 Michael Meeks <michael.meeks@novell.com>
9225 * object.c (extend_interface_array): fix really silly
9226 memory corrupting / comparison bug.
9228 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
9230 * reflection.c: Functions added to support the creation
9231 of CustomAttributeData, which includes Attribute data
9232 used by ReflectionOnly methods.
9234 * reflection.h: mono_reflection_get_custom_attrs_data and
9235 mono_custom_attrs_data_construct added (functions exposed).
9237 * icall.c: Added mono_reflection_get_custom_attrs_data
9240 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
9242 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
9245 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
9247 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
9249 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
9250 dynamic DllImportAttribute.
9252 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
9253 dynamic DllImportAttribute.
9255 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
9258 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9260 * threads.c: avoid segfault when an unstarted thread is aborted.
9262 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
9264 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
9265 Returns the name and version of the runtime for reporting.
9267 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9269 * appdomain.c: bump corlib version.
9270 * object-internals.h: new field in MonoReflectionAssembly.
9272 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9274 * object-internals.h: Carlos forgot to add this field.
9276 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
9278 * icall.c: Added create_version to create instances
9279 of Version of MonoReflectionAssemblyName. This change helps
9280 the AssemblyName tests to keep running fine.
9282 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
9284 * object.c (mono_method_return_message_restore): A somehow less
9285 intrusive fix for #75138.
9287 2005-06-03 Raja R Harinath <rharinath@novell.com>
9289 * object.c (mono_method_return_message_restore): Fix computation
9290 of expected number of out args.
9292 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
9294 * reflection.c (mono_image_get_method_info): Fix the case when the
9297 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
9299 * object.c: Added missing null check in
9300 mono_method_return_message_restore.
9302 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
9304 * reflection.c (mono_image_get_method_info): Handle the case when
9307 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
9309 * object.c: When creating the vtable for a proxy, take into account
9310 all inherited interfaces, not only the ones registered in
9311 iclass->interfaces. This fixs bug #74996.
9312 Also, in mono_method_return_message_restore, verify that the array
9313 of out args has the expected lengh.
9315 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9317 * socket-io.c: update the timeout in Poll when the call is interrupte.
9319 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9321 * socket-io.c: support abort/suspend in Select_internal after last
9324 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9326 * threadpool.c: remove warning.
9328 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9331 * socket-io.[ch]: Select_internal uses poll() now when available, thus
9332 removing the 1024 limit from select(). Runtime part of the fix for
9335 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9337 * socket-io.c: when resolving the addresses for the same
9338 host returned by gethostname(), get the local IPs from the interface
9339 list. Loopback addresses are discarded if the are interfaces up with
9340 non-loopback ones. Fixes bug #63265.
9342 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
9344 * appdomain.c, verify.c, object-internals.h, reflection.c:
9345 bumped corlib number to 36, and added new extra_flags field
9346 to ReflectionMethodBuilder and friends. Fixes #75060.
9348 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
9350 * gc.c: register a new weak link only if the object is non-null
9353 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
9355 * culture-info.h : short time pattern too.
9357 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
9359 * culture-info.h : expand long time pattern string length.
9361 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
9363 * culture-info-table.h : update (more French date format; #72788).
9365 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
9367 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
9368 the method is static. Fixes #75029.
9370 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
9372 * reflection.c: Update the table_idx field of method builders after
9373 saving the module, since it can change. This is a workaround for
9376 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
9378 * culture-info-table.h : update (additional French date format).
9380 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
9382 * icall.c (ves_icall_type_Equals): Revert last change.
9384 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
9386 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
9388 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
9390 * class-internals.h: Added executioncontext_class field to
9391 MonoDefaults structure.
9392 * domain.c: Cache System.Threading.ExecutionContext class in
9394 * object.c: Capture the ExecutionContext for asynchroneous calls in
9395 mono_async_result_new.
9396 * object-internals.h: Added execution_context and original_context
9397 fields to MonoAsyncResult. Added execution_context to MonoThread.
9398 * security-manager.c|.h: Added mono_get_context_capture_method to
9399 return the capture method (if required by the security manager or by
9400 the framework version used).
9401 * threadpool.c: Apply capture (if present) ExecutionContext in
9402 mono_async_invoke and revert to original context after it completes.
9404 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
9406 * culture-info-table.h : updated (real hacky solution for zh-CHT).
9408 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
9410 * culture-info-table.h : zh-CHT related workaround.
9412 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
9414 * marshal.c (emit_marshal_custom): Add some error checking and call the
9415 methods in the ICustomMarshaler interface. Fixes #74875.
9417 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
9418 native->managed wrappers.
9420 2005-05-12 Martin Baulig <martin@ximian.com>
9422 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
9423 here and use the loader lock.
9425 * mono-debug.c: Properly lock when the debugger is not attached.
9426 (mono_debug_init): Release the initial lock if we're not running
9429 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
9431 * marshal.c (emit_marshal_custom): Pass through NULL values without
9432 calling the custom marshalling routines.
9434 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
9435 conversion in structures. Fixes #74882.
9437 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
9439 * culture-info-table.h : zh-* cultures were missing.
9441 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
9443 * threads.c: Added a new event background_change_event which is signaled
9444 when a thread changes its background mode.
9445 Moved here several checks previously done in managed code. The checks
9446 require the thread lock, and using the thread lock in managed code
9447 can result in deadlocks.
9448 Merged Start_internal and Thread_internal into a single method. Now
9449 Thread_internal does all work of creating and starting a thread.
9450 Added icalls for setting and getting the state of the object. Moved from
9451 managed code to avoid locking there.
9452 Added wait_for_tids_or_state_change() which is called instad of
9453 wait_for_tids when waiting for non-backround threads to end. This method
9454 will return if one of the threads ends or the background_change_event
9456 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
9457 the background mode. This method signals the background_change_event
9460 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
9461 removed Start_internal.
9463 2005-05-11 Martin Baulig <martin@ximian.com>
9465 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
9466 to order of some fields to get proper alignment on 64-bit machines.
9468 2005-05-11 Martin Baulig <martin@ximian.com>
9470 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
9471 changes as they're broken and completely fuck up the debugger.
9473 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
9475 2005-05-10 Martin Baulig <martin@ximian.com>
9477 * reflection.c (mono_reflection_generic_class_initialize): Don't
9478 call mono_class_setup_parent() here.
9480 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9482 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
9483 send/receive timeout use an integer in milliseconds. We were using a
9486 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9489 (internal_get_cultures): reserve the first slot of the array for the
9490 InvariantCulture, which will be filled in managed code.
9492 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
9494 * reflection.c (mono_image_fill_module_table): Initialize the
9495 GENERATION field as well.
9497 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9499 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
9500 Monitor.Enter on the object.
9502 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
9504 * threads.c: Enable the wait for running threads when exiting.
9505 * icall.c: Suspend all threads before exiting.
9507 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
9509 * assembly.c (mono_assembly_load_reference): Fix warning.
9511 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9513 * threadpool.c: changed the default number of threads per cpu. From now
9514 on, the default will be 20 + (5 * number of cpus) instead of 50.
9516 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
9518 * loader.c (mono_method_get_signature_full): Add locking here.
9520 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
9522 * appdomain.c: Moved methods for parsing and freeing assembly
9523 names to assembly.c.
9524 * assembly.c, domain-internals.h: Created public methods for parsing
9525 assembly names. Fixed mono_assembly_load_with_partial_name:
9526 it now finds the best match, taking into account the version,
9527 token and culture specified in the partial name. Also return
9528 the latest version if no version information is specified.
9530 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
9532 * threadpool.c: replace check for SocketAsyncCall class.
9534 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9536 * threadpool-internals.h:
9537 * Makefile.am: added threadpool-internals.h
9539 * threadpool.c: call mono_unhandled_exception on exceptions not handled
9540 that happen in threadpool threads (tested on MS).
9541 (mono_thread_pool_remove_socket): new function that dispatch any pending
9542 AIO call on a socket that is closing. By now only epoll really needs it,
9543 as select/poll wake up when the socket closes.
9546 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
9548 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
9550 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
9552 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
9554 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
9556 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
9558 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
9559 has an abort request, convert it into a suspend request.
9561 2005-04-30 Ben Maurer <bmaurer@ximian.com>
9563 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
9564 warning for the usage of `UnmanagedFunctionPointerAttribute' which
9565 is not supported yet.
9567 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9569 * image.c: register assemblies loaded from data (bundles) in the loaded
9570 assemblies hash. Fixes bug #74772.
9572 2005-04-29 Martin Baulig <martin@ximian.com>
9574 * class.c (mono_type_get_name_recurse): Update to the new naming
9575 schema from the latest .NET 2.x beta2.
9576 (mono_class_setup_vtable_general): If we're a generic instance,
9577 copy the vtable from our generic type definition and inflate all
9580 * loader.c (find_method): Update to the new naming schema from the
9581 latest .NET 2.x beta2.
9583 2005-04-29 Raja R Harinath <harinath@gmail.com>
9585 * class.c (mono_class_init): Add a mono_loader_unlock to the
9588 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
9590 * icall.c (ves_icall_System_Environment_Exit): Remove the
9591 suspend_all_other_threads () call for the time being, since it can hang.
9593 * threads.c (mono_thread_manage): Similarly, disable the waiting for
9594 the background threads to exit, since it can also hang.
9596 * class.c (mono_class_init): Applied patch from Ankit Jain
9597 (radical@gmail.com). Avoid pending init errors when a field refers
9598 to a nested class using a typeref. Fixes #74734.
9600 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
9601 this for dynamic modules.
9603 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9605 * threads.c: don't wait for threads that are in the process of aborting
9606 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
9607 and waiting for background threads to finish. This makes xsp and
9608 mod-mono-server exit without random length delays and/or hangs.
9610 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9612 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
9614 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
9616 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
9617 dynamic types to prevent infinite loops. Fixes #74727.
9619 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
9620 ..._is_assignable_to.
9622 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
9624 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
9626 2005-04-25 Martin Baulig <martin@ximian.com>
9628 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
9631 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
9633 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
9635 * reflection.c (build_compressed_metadata): Set metadata header
9638 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
9640 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
9641 number into an integral and a decimal part. Fixes #70473.
9643 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
9645 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
9647 * culture-info-table.h : reflected the latest locale-builder output.
9649 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9651 * threadpool.c: check for SuspendRequested too when deciding if
9652 mono_thread_interruption_checkpoint should be called.
9654 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9656 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
9657 * threads.c: remove interruption_mutex and use Interlocked instead. When
9658 suspending all the threads, wait for all the suspended events at once.
9659 If we're shutting down and get an APC that is going to be queued,
9660 call mono_thread_execute_interruption immediately, as the thread might
9661 be sleeping on a pthread condition or mutex.
9663 * icall.c: call mono_runtime_set_shutting_down before suspending the
9666 Fixes bug #74693. And now xsp is happier when exiting.
9668 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
9670 * loader.c (mono_stack_walk): Fix #74690.
9672 2005-04-22 Martin Baulig <martin@ximian.com>
9674 * mono-debug.h (MonoDebugMethodJitInfo): Added
9675 `MonoDebugMethodJitInfo *jit'.
9677 * mono-debug.c (mono_debug_read_method): Cache the
9678 MonoDebugMethodJitInfo in `address->jit'.
9679 (mono_debug_free_method_jit_info): New public method.
9681 2005-04-22 Martin Baulig <martin@ximian.com>
9683 * class.c (mono_class_is_assignable_from): Disallow
9684 type parameter -> interface.
9686 2005-04-21 Dick Porter <dick@ximian.com>
9688 * threads.c (mono_thread_create): Turn an assertion into an error.
9690 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
9692 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
9694 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
9695 Fix some gcc 4.0 warnings.
9697 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
9699 * file-io.c: fix alt dir separator char on unix systems
9700 and cleanup (fixes bug #71214).
9702 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
9704 * marshal.c: Use CALLVIRT instead of CALL when dispatching
9705 a call to a remote domain, since the method may be an
9706 interface method in the client domain. This fixes bug #74192.
9708 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9710 * threadpool.c: recv/send are now performed before going back to managed
9711 code to save one transition.
9713 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9715 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
9717 * metadata/threadpool.c: removed hack to workaround the bug above.
9721 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
9723 * reflection.c reflection.h: Fix handling of parameter defaults in
9724 dynamic methods. Also fixes handling of parameter attributes.
9727 * mono-debug.c (mono_debug_close_image): Fix warning.
9729 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9731 * socket-io.h: replaced old unused field with new 'blocking'.
9732 * threadpool.c: restore socket blocking state on windows(tm).
9734 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
9736 * icall.c: don't return the codebase in the AssemblyName[] returned by
9737 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
9738 * object-internals.h: Removed FIXME (fields were presents) and fixed
9739 versioncompat declaration.
9741 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9743 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
9744 not closed, so don't cleanup when it happens.
9746 2005-04-13 Chris Toshok <toshok@ximian.com>
9748 * mono-debug-debugger.h: change prototype for
9749 mono_debugger_lookup_type.
9751 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
9752 this function, although it should probably be named
9753 mono_debugger_init_type.
9755 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9757 * threadpool.c: fix non-AIO case.
9759 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
9761 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
9762 the built-in profiler to measure just JIT compilation times.
9764 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9766 * threadpool.c: the epollfd might be closed by another thread at
9767 any time, so ignore EBADF at treat it as a "we're closing" sign.
9769 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9771 * threadpool.c: release the semaphores with a count equals to the number
9772 of working threads in both IO and regular pools. Fixed typo that messed
9773 up the count of IO pool threads. Don't initialize the pipe handles if
9776 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9778 * threadpool.c: some systems don't like a NULL when deleting the socket
9781 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9783 * threadpool.c: fix semaphore allocation.
9785 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9787 * threadpool.c: added epoll() based implementation for asynchronous IO
9788 that is used instead of the default poll() when available.
9789 It can be disabled by setting MONO_DISABLE_AIO.
9791 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9793 * threadpool.c: windows needs 'closesocket' and instead of returning
9794 0 when the stream is closed while in select, it returns -1. Fixes bug
9797 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
9799 * class.c (class_compute_field_layout): Fix the regression caused by
9802 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9804 * threadpool.c: separate pool for socket async. IO.
9805 * threadpool.h: mono_max_worker_threads is not a global any more.
9807 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
9809 * class.c (class_compute_field_layout): Fix #74549.
9811 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9813 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
9814 use 2 connected sockets instead.
9816 2005-04-08 Miguel de Icaza <miguel@novell.com>
9818 * mono-config.c: Add new entry point for mkbundle
9819 mono_config_parse_memory.
9821 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9823 * threadpool.c: removed another unused function.
9825 2005-04-08 Ankit Jain <radical@corewars.org>
9827 * reflection.c (get_default_param_value_blobs): Add 'types'
9828 parameter to get the types encoded in the constant table.
9829 (mono_param_get_objects): Use the type from the constant table,
9830 not the type of the parameter, when creating default values.
9831 Handle null default values correctly.
9833 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9840 * socket-io.c: removed dead code for async IO.
9842 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9844 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
9846 * threadpool.c: intercept socket async. calls and pass them to a thread
9847 that is polling and dispatching the job items to the threadpool as
9848 socket become ready. Fixes bugs #71217, #71933.
9850 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
9851 between char and short/ushort arrays.
9853 * socket-io.c: remove dead code.
9855 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
9858 icall.c : removed InternalToUpper_Comp() and
9859 InternalToLower_Comp().
9861 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
9863 * char-conversions.h : The tables were incorrectly generated. Should
9864 be generated against invariant culture.
9866 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
9868 * object.c (mono_runtime_invoke_array): Fix return value when
9869 passing pre-created valuetype objects to ctors.
9871 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
9872 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
9875 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
9877 * domain.c: removed g_assert for runtimesecurityframe_class. This is
9878 only used with --security and hides the wrong corlib version error.
9880 2005-03-30 Joshua Tauberer <tauberer@for.net>
9882 * class.c: Changed mono_class_name_from_token so that types
9883 outside of a namespace don't have an initial period. Improved
9884 the g_warning message used in _mono_class_get when loading
9886 * assembly.c: In mono_assembly_load_reference, when an assembly
9887 can't be found, "No such file or directory" is misleading and
9888 unhelpful because a few paths were checked for the presence of
9889 the assembly. When that happens (ENOENT), display a nicer
9890 message indicating the directories that were searched. In all
9891 cases, the warning is made easier to read for non-hackers.
9893 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
9895 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
9897 * appdomain.h|domain.c: Removed inline from functions.
9898 * appdomain.c: Reduced warnings when compiling on windows.
9899 * icall.c: Fixed output_debug declaration to gunichar2*.
9900 * mono-config.c: Reduced warnings when compiling on windows.
9901 * rand.c: Added missing "windows.h". Added missing return value.
9902 * rawbuffer.c: Added missing winsock2.h for windows.
9903 * sysmath.h: Added mono-compiler.h header to allow/ease
9904 compilation with non-GCC compilers.
9905 * threads.c: Fixed declarations to compile with VS.NET C compiler.
9906 Removed cast warnings.
9908 Adapted from the work of J Lothian (for VC6).
9910 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
9912 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
9915 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
9917 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
9920 2005-03-27 Raja R Harinath <harinath@gmail.com>
9922 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
9923 has to be in $(exec_prefix). $(prefix) is for arch-independent
9924 stuff, and it would probably use $(prefix)/share rather than
9927 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9929 * console-io.c: added 2 includes that might be missing.
9931 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
9933 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
9936 * reflection.c (create_custom_attr): Allocate the params array using
9937 alloca so it gets GC tracking.
9939 2005-03-23 Chris Toshok <toshok@ximian.com>
9941 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
9944 2005-03-24 Raja R Harinath <rharinath@novell.com>
9946 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
9947 changes to pick up any changes in prefix, etc.
9949 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
9951 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
9953 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
9954 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
9956 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
9958 * class-internals.h object-internals.h class.c reflection.c: Extend the
9959 mono_lookup_dynamic_token () function to return the class of the
9962 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
9965 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
9967 * security-manager.c: Skip inheritance checks for intra-corlib
9968 class inheritance and method overrides. This skips a lot of checks
9969 and (anyway) permissions cannot work until corlib is loaded.
9971 2005-03-23 Martin Baulig <martin@ximian.com>
9973 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
9974 MONO_TYPE_GENERICINST.
9976 2005-03-23 Martin Baulig <martin@ximian.com>
9978 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
9980 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9982 * class.c: added locking comments to some functions.
9983 Cache the interface offsets arrays (saves about 20 KB
9984 of runtime memory in a typical app).
9985 Reduce the time overhead in mono_class_setup_supertypes ().
9987 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
9989 * icall.c: speedup and fix leaks in GetMethodsByName and
9990 GetPropertiesByName.
9992 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9994 * reflection.c: some locking fixes.
9996 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9998 * metadata.c: added missing break in case statement.
10000 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
10002 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
10003 typedbyref return values. Fixes #73941.
10005 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
10007 * security-manager.c|h: Added demandunmanaged method and
10008 suppressunmanagedcodesecurity class to MonoSecurityManager.
10009 Renamed aptc class to allowpartiallytrustedcallers.
10011 2005-03-17 Martin Baulig <martin@ximian.com>
10013 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
10015 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10017 * file-io.c: disabled file async. IO using aio_*. It uses the
10018 threadpool now. Workaround for bug #73718.
10020 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10022 * assembly.h, mono-config.c: added code to deal with bundled configs
10023 for bundled assemblies.
10025 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
10027 * *.c, private.h: cleanup, removing old private.h header file.
10029 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
10031 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
10032 and throw_on_unmappable_char attributes.
10034 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
10036 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
10037 _ProcessName_internal.
10039 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
10041 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
10044 * icall.c threads.c threads-types.h: Remove slothash icalls as they
10045 are no longer used.
10047 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
10049 * object.c (compute_class_bitmap): Add support for generics. Fixes
10052 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
10054 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
10056 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10058 * filewatcher.c: commented out the code for windows watcher, as we don't
10059 use it (we use the managed implementation instead).
10061 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
10063 * object-internals.h (MonoThread): Remove 'unused1' field.
10065 * appdomain.c: Bump corlib version.
10067 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
10069 * reflection.c (mono_reflection_create_runtime_class): Remove the
10070 AssemblyBuilder.Save optimization since it causes too many problems.
10072 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
10074 * exception.c|h: Added mono_get_exception_reflection_type_load to
10075 create a ReflectionTypeLoadException object.
10076 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
10077 to return NULL is a InheritanceDemand fails during reflection. Updated
10078 ves_icall_System_Reflection_Assembly_GetTypes to throw a
10079 ReflectionTypeLoadException if an InheritanceDemand fails during
10080 reflection. Added icall mapping for GetLinkDemandSecurity.
10081 * security-manager.c|h: Added ves_icall_System_Security_
10082 SecurityManager_GetLinkDemandSecurity internal call to return the
10083 class and methods permissions set for a LinkDemand. Removed unused
10084 fields in MonoSecurityManager.
10086 2005-03-10 Martin Baulig <martin@ximian.com>
10088 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
10089 it's a generic instance.
10091 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
10093 * reflection.c (mono_get_object_from_blob): Applied patch from
10094 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
10096 * class.c (mono_class_is_assignable_from): Another try at fixing
10097 #73469 without breaking anything.
10099 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
10101 * class.c: (mono_class_is_assignable_from): Revert the last changes
10102 since they don't work with generics.
10104 * class.c (mono_class_is_assignable_from): Fix build bustage.
10106 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
10107 the managed IsAssignableFrom method. Fixes #73469.
10109 * reflection.c (mono_reflection_call_is_assignable_from): New helper
10112 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
10114 * object.c (mono_load_remote_field_new): Fix returning uninitialized
10115 memory when the remoting callback does not sets the out arguments.
10118 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
10121 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
10123 * object-internals.h (MonoStackFrame): Sync with managed object layout.
10125 * appdomain.c: Bump corlib version.
10127 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
10129 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
10132 * threads.c (mono_thread_attach): Detect threads which are not started
10133 by the GC pthread wrappers.
10135 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
10137 * icall.c: Added new icall for RNG.
10138 * rand.c|h: Added new icall to open the RNG. This allows to share a
10139 single handle on Linux to access /dev/urandom and fix #73183.
10141 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10143 * object.c: setting the new vtable in a transparent proxy object must
10144 not change the GC descriptor.
10146 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10148 * object.c: fixed compilation without GCJ support.
10149 * reflection.c: for runtime-created types ensure klass->has_references
10150 is correct (bug #73215).
10152 2005-03-02 Martin Baulig <martin@ximian.com>
10154 * class.c (mono_class_is_assignable_from): Make this work if
10155 `oklass' is a generic instance; fixes #72831.
10157 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
10159 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
10162 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
10164 * marshal.c: Reorganize native->managed marshalling code to also use
10165 the emit_marshal_... functions.
10167 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
10169 * object.c: typed allocs have issues with bitmap sizes > 30,
10170 so check for max_set >= 30.
10172 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
10174 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
10175 managed code. Fixes #73012.
10177 * metadata.h (MonoMarshalSpec): Add elem_mult field.
10179 * metadata.c reflection.c: Load/Emit elem_mult as well.
10181 * metadata.h (MonoMarshalSpec): Add comment.
10183 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
10185 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
10186 num_elem to -1 if not given.
10188 * object-internals.h (MonoReflectionMarshal): Add has_size field.
10190 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
10193 2005-03-01 Marek Safar <marek.safar@seznam.cz>
10195 * null-gc.c (mono_gc_free_fixed): Was not compilable.
10197 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
10199 * reflection.c (encode_marshal_blob): Encode param_num field as well.
10201 * object-internals.h (MonoReflectionMarshal): Add param_num field.
10203 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
10205 * object.c: generalized the reference bitmap creation
10206 and added hooks for the new GC.
10207 * class-internals.c: removed the gc_bitmap field from MonoClass.
10209 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10211 * domain.c: help the compiler to produce better code
10212 in mono_jit_info_table_find ().
10214 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
10216 * object.c: make all allocations look typed.
10218 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10220 * socket-io.c: load Mono.Posix if it's not loaded already
10223 2005-02-24 Martin Baulig <martin@ximian.com>
10225 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
10226 * reflection.c (dup_type): Likewise.
10228 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
10230 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
10231 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
10233 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10235 * domain.c, threads.c, object-internals.h: make the critical thread
10236 local vars use the fast access mode (even when we're compiled in
10237 a lib). Provide accessors to be used by the jit during codegen.
10239 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
10241 * appdomain.c: Changed hook functios behavior to include
10242 support for the reflection only assemblies. Some icalls were changed
10243 to support the mentioned assemblies too. Signatures of static methods
10244 try_assembly_resolve and real_load now have an additional parameter:
10247 * assembly.c: General changes to mono_assembly_ methods to support
10248 reflection only api. Functions mono_assembly_open, mono_assembly_load,
10249 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
10250 suffix, to support an additional gbool parameter to specify whether
10251 the assembli is reflection only or not. Created some new hook functions
10252 to add support for reflection only assemblies. Signatures of static
10253 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
10254 have now an additional parameter: refonly.
10256 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
10257 indicating whether the assembly is reflection only or not.
10259 * exception.c: Add mono_get_exception_invalid_operation.
10261 * icall.c: Throw an InvalidOperationException when trying to invoke
10262 a property/method/event, or trying to set/get the value of a field.
10263 Also add an icall to retrieve the ref_only flag to the
10264 MonoReflectionAssembly.
10266 2005-02-23 Chris Toshok <toshok@ximian.com>
10268 Part of fix for #72827.
10269 * mono-debug.c (mono_debug_add_method): add lexical block data to
10270 the info we write. Kind of a hack at the moment - we copy the
10271 lexical block info from the MonoDebugMethodInfo to the
10272 MonoDebugMethodJitInfo here, before writing it.
10273 (mono_debug_read_method): read the lexical block info.
10275 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
10277 * debug-mono-symfile.h: add lexical block support.
10279 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
10282 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
10284 * loader.c (mono_lookup_pinvoke_call): Fix warning.
10286 * object.c (mono_runtime_free_method): Call mono_free_method () and
10287 put the TODOs there.
10289 * loader.c (mono_free_method): Free up most memory allocated for
10292 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10294 * reflection.c: properly flag a Type argument to a
10295 named custom attr value (bug #72248).
10297 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10299 * reflection.c: reduce code duplication in named custom
10300 attribute encoding.
10302 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
10304 * reflection.c: properly encode custom attrs of type object
10307 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
10309 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
10311 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
10313 * socket-io.c: load System.dll if it's not loaded already
10314 (bug #72850 and #70477).
10316 2005-02-21 Martin Baulig <martin@ximian.com>
10318 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
10321 2005-02-21 Martin Baulig <martin@ximian.com>
10323 * reflection.c (mono_image_build_metadata): We also need to
10324 "fixup" the MethodImpl table after we computed the final method
10325 indices. Call fixup_methodimpl() to do that.
10326 (fixup_methodimpl): New private method.
10328 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
10330 * assembly.c: special case mscorlib.dll (bug#72536),
10331 patch from Carlos Alberto Cortez.
10333 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
10335 * threads-types.h threads.c: Fix build bustage.
10337 * threads.c: Use a union for long<->double conversions.
10339 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
10340 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
10342 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
10343 containing the checkpoint call with NOT_TAKEN.
10345 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
10346 checkpoint before pushing the arguments, so they won't have to be
10349 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10351 * domain.c, assembly.c, domain-internals.h: make some data
10352 const and relocation-free.
10354 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10356 * object.c, appdomain.c, class-internals.h: introduce the
10357 MonoClassRuntimeInfo structure to hold the info needed to
10358 use a class at runtime. Made mono_class_vtable() lock-free
10359 for all the appdomains.
10361 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
10363 * metadata-internals.h, image.c: introduce a per-image mempool to
10364 be used for memory that has the same lifetime as the image.
10366 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
10368 * domain.c: In mono_init_internal(), instead of selecting the first
10369 runtime version supported by an executable, get a list of all
10370 supported versions and select the one for which an mscorlib exists
10371 (since even if the runtime supports a given version, it doesn't mean
10372 that the framework for that version is installed).
10373 Modified get_runtimes_from_exe to support this behavior.
10374 In supported_runtimes, added information about additional system
10377 * assembly.c: Added support for more than one system assembly version
10378 per runtime version. Updated the assembly list.
10379 In mono_assembly_remap_version, removed the initial version check,
10380 since we don't know to which version we need to compare until we
10381 get the version set on which the assembly is based.
10382 Moved the code for loading corlib into the new method
10383 mono_assembly_load_corlib(), so it can be used by the initialization
10386 * domain-internals.h: Updated data structures and added declaration
10387 for mono_assembly_load_corlib.
10389 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
10391 * reflection.c (resolve_object): Fix the creation of the signature in
10392 the SignatureHelper case.
10394 * assembly.c (mono_assembly_remap_version): Fix binary search.
10396 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
10398 * class.c: Added inheritance check when a method is overloaded (from a
10399 virtual method or when implementing an interface) and when a class is
10400 inherited. Added functions to set a failure for a class and to
10401 retreive the exception from a failure.
10402 * class-internals.h: Added fields to MonoClass to keep the exception
10403 information status for inheritance (or other exceptions) to be thrown
10404 later (i.e. not at load time).
10405 * object.c: Throw the inheritance SecurityException when a type is to
10406 be created with either class or method inheritance violations.
10407 * reflection.c|h: Fix when getting declsec from a class. Removed
10408 unrequired code for class. Improved sanity in parameter naming.
10409 * security-manager.c|h: Added functions to check for class and method
10412 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
10414 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
10415 and has_finalize in dynamic types as well.
10417 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
10419 * culture-info-table.h : fixed currency format for en-GB (and so on).
10421 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
10423 * gc.c: ensure the GC handles never have 0 as a value.
10425 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
10427 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
10428 a pointer to a struct to unmanaged code. Fixes #72625.
10430 2005-02-16 Martin Baulig <martin@ximian.com>
10432 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
10434 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
10436 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
10438 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
10440 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
10442 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
10443 UnmanagedFunctionPointerAttribute, use it for determining calling convention
10446 * reflection.c (mono_custom_attrs_get_attr): New helper function.
10448 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
10450 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
10452 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
10453 changes to make the current context a field in MonoThread.
10455 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
10457 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
10460 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
10461 extracted from mono_marshal_get_native_wrapper.
10463 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
10464 to create wrappers around native functions.
10466 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
10467 delegates for arbitrary function pointers. Fixes #71472.
10469 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10471 * threads.c: cleaned up the code a little.
10473 2005-02-15 Martin Baulig <martin@ximian.com>
10475 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
10478 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
10479 allocate larger chunks if needed.
10481 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
10483 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
10486 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
10488 * domain.c: keep the domains in an array and ensure the domain ids
10489 are kept small, so they can be used as indexes to domain-specific data
10490 with a small memory overhead.
10492 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
10494 * icall.c: Handle byref types in Type icalls. Fixes #72544.
10496 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
10498 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
10500 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
10502 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
10504 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
10507 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
10509 2005-02-12 Ben Maurer <bmaurer@ximian.com>
10511 * domain-internals.h: add the hashtable here.
10513 * class-internals.h: Remove `info' from MonoMethod
10515 * domain.c: Add a new hashtable, jit_trampoline_hash
10517 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10519 * object.c: don't set the value of static fields
10522 2005-02-11 Martin Baulig <martin@ximian.com>
10524 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
10525 (mono_debug_add_method): Silently ignore the method if it's too big.
10526 (mono_debug_add_type): Likewise.
10528 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
10530 * threads.c, appdomain.c: remove #ifdefs from the code.
10532 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
10534 * metadata-internals.h: Added flags to MonoAssembly to cache the most
10535 common security informations. This allows us to stay in unmanaged code
10536 when doing LinkDemand and it's special cases (except for the first
10537 time for initialization). The flags a very much used with --security.
10538 * reflection.c|h: Added code to get declarative security attributes
10539 for LinkDemand and InheritanceDemand. This required to refactor the
10540 existing code for Demand.
10541 * security-manager.c|h: Added new method fields for the special cases
10544 2005-02-10 Martin Baulig <martin@ximian.com>
10546 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
10547 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
10549 2005-02-10 Martin Baulig <martin@ximian.com>
10551 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
10552 debugging code; this is almost a complete rewrite.
10554 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
10556 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10558 * domain.c, object.h: expose mono_string_equal () and
10559 mono_string_hash ().
10560 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
10561 it's implemented in managed code.
10563 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10565 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
10566 lo leak objects between appdomains.
10568 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10570 * assembly.c: old compilers compilation fix from
10571 robertj@gmx.net (Robert Jordan).
10573 2005-02-09 Ben Maurer <bmaurer@ximian.com>
10575 * class-internals.h: Little reminder for the future.
10577 * debug-helpers.c: Fix up wrapper_type_names
10579 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10581 * image.c, metadata-internals.h: when loading an image from a file,
10582 mmap all of it and use the same codepaths as when using a
10583 in-memory image: the code is simpler and we use less memory
10584 (both writable and readonly).
10586 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10588 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
10589 API to alloc runtime data structures that need to be tracked by the
10590 GC and contain pointers.
10591 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
10592 make the code more readable and eventually use a different GC.
10594 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
10596 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
10599 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
10601 * object.c: In release_type_locks(), don't release the cctor lock
10602 if it has already been released. This fixes a crash in the
10605 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10607 * gc.c, marshal.c, icall.c: register a delegate for finalization
10608 only when the native function pointer has been allocated for it.
10610 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10612 * object.c: cleaned up some code, allocate objects that are
10613 pointer free with the atomic malloc variant. Allocate memory
10614 for static data from the mempool if it's pointer-free.
10615 Allocate the bounds array at the end of the array data, when needed.
10616 * object-internals.h, object.h: move a private function in a private
10618 * class.c: handle missing case in tracking references in fields.
10620 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10622 * class.c, class-internals.h: keep track if a type has
10623 reference fields in either the instance or static fields.
10625 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
10627 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
10628 and renamed to MonoRuntimeInfo. Added fields to store the expected
10629 framework assembly version. Changed mono_get_framework_version and
10630 mono_get_runtime_version for a single mono_get_runtime_info method.
10632 * assembly.c: Added method to remap system assembly versions to the
10633 current executing runtime version. Removed old mapping code.
10634 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
10636 * icall.c, reflection.c: Track api changes.
10638 2005-02-06 Miguel de Icaza <miguel@novell.com>
10640 * loader.c (method_from_memberref): Improve error reporting,
10641 produce the class name instead of the typeref/typedef index.
10643 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
10645 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
10647 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10649 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
10650 stdcall and charset name mangling. Reorganize the code and add
10651 some tracing stuff.
10653 2005-02-05 Ben Maurer <bmaurer@ximian.com>
10655 * monodiet.c: More iters!
10657 * marshal.c: Iter usage.
10659 * icall.c: Iter usage.
10661 * object.c: Use iters.
10663 * debug-helpers.c: More iters
10665 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10667 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
10670 2005-02-05 Ben Maurer <bmaurer@ximian.com>
10672 * mono-debug-debugger.c: use iters
10674 * class.c, class-internals.h: mono_class_setup_events is static
10677 * All callers: use iters
10679 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10681 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
10682 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10684 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
10686 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
10688 * marshal.h: Add prototypes for ldfld/stfld_remote.
10690 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
10691 this is called during startup.
10693 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10695 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
10696 MonoThreadsSync struct private in monitor.c. Changed the way
10697 MonoThreadsSync is allocated so it's faster and there is no
10698 need to keep track of it with a finalizer and it uses less memory.
10699 This also finally allows us to allocate mono objects as ptrfree when
10700 there are no reference fields.
10702 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
10704 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
10705 disappearing link to the GC interface and use them to simplify
10706 the gchandles code.
10708 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
10710 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
10711 stfld_remote which call mono_load/store_field_new. This allows methods
10712 calling ldfld/stfld wrappers to be AOTed.
10714 * console-io.c: Include sys/filio.h under solaris.
10716 * console-io.c: Include curses.h if needed correctly.
10718 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
10720 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
10721 method->klass as well.
10723 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
10725 * class.c (mono_class_init): Switch on lazy initialization of
10728 * class.c (mono_class_get_finalizer): Handle the case when the
10729 finalizer is inherited.
10731 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10733 * console-io.c: <curses.h> is needed by term.h on solaris.
10735 2005-02-03 Ben Maurer <bmaurer@ximian.com>
10737 * icall.c, class-internals.h, monodiet.c, class.c: Remove
10738 mono_class_setup_properties where possible. Remove this ftn from
10739 the header file, and make it static.
10741 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
10743 * loader.c: Add missing setup_... call.
10745 * class.c: Add missing setup_... calls.
10747 * class.c (mono_class_init): Switch on lazy initialization of
10748 the generic vtable.
10750 * class.c (mono_class_init): Fix generics broken by the recent changes.
10752 * monodiet.c (handle_type): Add missing setup_... calls.
10754 * class.c: Back out garbage in previous patch.
10756 * class.c: Add missing setup_... calls.
10758 * class.c (mono_class_get_method_from_name_flags): Avoid calling
10759 mono_class_setup_methods () if possible.
10761 * class-internals.h (MonoClass): Add 'has_cctor' flag.
10763 * class-internals.h (MonoCachedClassInfo): New structure.
10765 * class.c: Initialize properties and events fields of MonoClass lazily.
10767 * class.c: Add infrastructure for lazily initializing the methods and
10768 vtable fields of MonoClass. Not yet used.
10770 * class.c (mono_class_get_finalizer): New helper function.
10772 * class.c: Add infrastructure for loading some class related data from
10775 * object.c: Add infrastructure for initializing the vtable from data
10778 * gc.c (run_finalize): Use mono_class_get_finalizer ().
10780 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
10781 appropriate initialization function before accessing parts of the
10782 MonoClass structure.
10784 * marshal.c: Fix warnings.
10786 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
10788 * mono-debug-debugger.c (get_exception_message): Use
10789 mono_class_get_method_from_name_flags ().
10791 2005-02-02 Ben Maurer <bmaurer@ximian.com>
10793 * reflection.c, appdomain.c: Replace a few manual searches that
10794 Zoltan missed. (Paolo approved this part of my initial patch).
10796 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
10798 * profiler.c: disable recording statistical events at report time.
10800 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10802 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
10803 to byteswap arrays of enum values, too (bug #72080).
10805 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
10807 * appdomain.c (set_domain_search_path): Allow this to be called if
10808 domain->setup is not yet set.
10810 * loader.c (mono_method_get_index): New helper function.
10812 * loader.c reflection.c: Use mono_method_get_index ().
10814 * class.c (mono_class_get_method_from_name_flags): New helper method.
10816 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
10819 * class.c (mono_class_get_cctor): New helper method.
10821 * string-icalls.c object.c class.c marshal.c reflection.c: Use
10822 mono_class_get_method () to look up methods.
10824 2005-02-01 Miguel de Icaza <miguel@novell.com>
10826 * console-io.c: Fix the build, this should work on Windows.
10828 2005-01-31 Ben Maurer <bmaurer@ximian.com>
10830 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
10831 be set to null to keep things valid
10833 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10835 * icall.c: added Console 2.0 icalls.
10836 * Makefile.am: added console-io.[ch]
10837 * console-io.[ch]: internal calls for Console 2.0 API.
10839 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10841 * class.c: make sure we consider all the interfaces
10842 when calculating max_interface_id (bug found by
10843 Jeroen Frijters running ikvm).
10845 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
10847 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
10848 valuetype fields to null.
10850 * object.c (set_value): Ditto. Fixes #71669.
10852 2005-01-31 Martin Baulig <martin@ximian.com>
10854 * metadata.c (mono_metadata_has_generic_params): New public
10855 function; checks whether something is a generic method.
10857 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10859 * appdomain.c: fix infinite recursion when adding assemblies.
10861 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
10863 * object.c: Fix small typo to return all items for Environment.
10864 GetCommandLineArgs.
10866 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10868 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
10869 reflection.c: more domain and assembly-unload related fixes
10870 and memory leaks plugs.
10872 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
10874 * class.c loader.c security.c loader.h process.c threads.c mono-debug-debugger.c profiler.c marshal.c rand.cpedump.c: Fix 64 bit warnings.
10876 2005-01-29 Ben Maurer <bmaurer@ximian.com>
10878 * loader.c (mono_method_signature): Make this method lazy
10879 (mono_get_method_from_token): Don't computate the signature here.
10881 Doing this saves quite a bit of memory. I got 90 kb on starting up
10882 monodoc. It should also save some disk reads on startup.
10884 * *: MonoMethod->signature might be NULL now. You *MUST* use
10885 mono_method_signature.
10887 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
10889 * object.c (mono_runtime_get_main_args): Return an array from the
10890 current domain here. Fixes #71938.
10892 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10894 * monitor.c: formatting changes to comply with the
10895 mono coding style and remove #ifdefs from the code.
10897 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10899 * metadata.c, private.h: remove some unneeded data
10900 and use a more compact representation for table schemas.
10902 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10904 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
10905 to get a better distribution in hash tables.
10906 * *.c: use mono_aligned_addr_hash() where appropriate.
10907 * assembly.c: make var static.
10909 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
10911 * domain-internals.h: Put MonoJitInfo on a diet.
10913 * domain.c: Fix a warning.
10915 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10917 * gc.c: rework the gc handles code to reuse handles
10920 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10922 * domain.c: fixed long standing bug in mono_string_equal() which
10923 was brought to light with the ldstr changes.
10925 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
10927 * reflection.c: Remove warning by adding missing include for marshal.h
10929 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10931 * domain.c, object.c: change the ldstr_table to hold
10932 MonoString* as keys: makes the runtime isinterned lookup
10933 faster and simplifies memory management.
10935 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
10937 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
10938 possible to add imperative security checks before calling the icall.
10939 * reflection.c: Return security attributes on the original MonoMethod
10940 (and not the wrapped one). This fix permissions on icalls.
10942 2005-01-25 Dick Porter <dick@ximian.com>
10944 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
10945 the check for mktime() support actually test the mktime() return
10946 value. "Fixes" bug 71682, though the output is still different to
10949 2005-01-25 Martin Baulig <martin@ximian.com>
10951 * class.c (mono_class_is_assignable_from): Make this work for
10954 2005-01-24 Ben Maurer <bmaurer@ximian.com>
10956 * marshal.c (mono_string_utf8_to_builder)
10957 (mono_string_builder_to_utf16): We might not have ownership of the
10958 string. In thise case, we need to create a new buffer.
10960 * object-internals.h (mono_stringbuilder_capacity): sb->str might
10961 be null, in which case, use the default capacity.
10963 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10965 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
10966 GC events to the profiler.
10968 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10970 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
10971 if you don't want the GC to run.
10973 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
10975 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
10976 start providing a GC API and keeping different implementations in
10978 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
10980 2005-01-22 Ben Maurer <bmaurer@ximian.com>
10982 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
10983 mmap rather than allocating a huge buffer.
10984 (mono_debug_close_mono_symbol_file): Free the buffer allocated
10987 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
10989 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
10990 and CheckExecutionRights.
10991 * reflection.c|h: Keep the index of the declarative security to be
10992 used, instead of the pointer, when AOT compiler is used. Also add
10993 class initialization when requesting demands.
10994 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
10995 CheckExecutionRights. Both properties are now FALSE by default, and
10996 unmodifiable, unless the --security option is used.
10998 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11000 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
11001 reflection.c: properly refcount images and assemblies, many leaks fixed.
11003 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11005 * threadpool.c: increase the timeout for threads in the thread pool to
11006 10s. Fixes bug #67159.
11008 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
11010 * class-internals.h: Sun's compiler insists on explicit
11011 signed on bit fields to handle then correctly.
11013 2005-01-19 Miguel de Icaza <miguel@ximian.com>
11015 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
11016 Make the size of the array fit only the number of invalid path
11017 chars that we have.
11019 * class.c (_mono_class_get): Improve the error reporting when a
11020 class referenced is not found, to assist debugging.
11022 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
11024 * threads.c: fix off-by-one error.
11025 * domain.c: free data allocated in the domain.
11027 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
11029 * reflection.c (mono_method_body_get_object): Fill out exception info
11032 * object-internals.h: Add MonoReflectionExceptionHandlingClause
11035 2005-01-19 Martin Baulig <martin@ximian.com>
11037 * loader.c (mono_get_method_constrained): Make this work again.
11039 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
11041 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
11042 guint16 to match the managed side.
11044 * reflection.c (mono_reflection_body_get_object): Fill out local
11047 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
11050 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
11051 'local_var_sig_token'.
11053 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
11055 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
11058 * reflection.c (mono_method_body_get_object): Handle abstract and
11061 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
11063 * marshal.c, loader.c, class-internals.h, reflection.c:
11064 store the emthod data for a wrapper in an array instead of a list.
11066 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
11068 * marshal.c: change the code to allocate memory more
11069 conservatively for method wrappers.
11071 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11073 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
11074 fields from MonoClass to the marshal info structure where they belong.
11076 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
11078 * class.c, object.c, class-internals.h, marshal.c: rearrange
11079 some fields and tweak some types to lower memory usage.
11081 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
11083 * threads.c (signal_thread_state_change): Handle the case when the
11084 target thread is the current thread.
11086 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
11088 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
11089 emit_ptr_to_object_conv.
11091 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
11092 marshalling. Fixes #71352.
11094 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11096 * metadata.h, blob.h: move table enum to blob.h so it can be included
11098 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
11099 cut the size of MonoImage/MonoDynamicImage.
11101 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
11103 * profiler.c (mono_profiler_install_simple): Fix default arguments.
11105 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
11107 * reflection.c, reflection.h, icall.c: add a function to check
11108 if an attribute type is defined for a metadata object.
11110 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
11112 * object-internals.h: Added some needed fields from StringBuilder class.
11113 * marshal.c: Set the maxCapacity when creating a StringBuilder.
11115 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
11117 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
11118 threads before shutting down the runtime.
11120 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
11122 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11124 * object-internal.h, threads.c: implement stacksize and
11125 parameterized thread start functionality (requires
11126 matching corlib). Marked broken code for later removal.
11128 2005-01-12 Martin Baulig <martin@ximian.com>
11130 * class-internals.h (MonoGenericClass): Moved the `initialized'
11131 flag to MonoDynamicGenericClass, removed `init_pending'.
11132 (MonoGenericInst): Added `is_reference' flag.
11134 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
11136 * reflection.c (mono_image_create_pefile): Only set the pe_offset
11137 inside the MSDOS header. Fixes #71201.
11139 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
11141 (mono_domain_finalize): Ditto.
11143 2005-01-12 Martin Baulig <martin@ximian.com>
11145 * class.c (mono_get_shared_generic_class): Use the cache for
11146 non-dynamic generic classes.
11148 * class-internals.h (mono_class_create_generic_2): Removed
11149 function prototype, this function is now static inside class.c.
11151 * class.c (mono_class_create_generic_2): Made this static, only
11152 call it from mono_class_init() and mono_class_setup_parent().
11153 (collect_implemented_interfaces_aux): Call mono_class_init() on
11154 the interfaces we collect.
11155 (mono_class_setup_vtable): Call mono_class_init (class->parent).
11157 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
11159 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
11160 it a real thread handle.
11162 * domain-internals.h: Move exvar_offset from MonoJitInfo to
11163 MonoJitExceptionInfo, since each catch clause needs its own variable.
11165 2005-01-11 Dick Porter <dick@ximian.com>
11167 * image.c (mono_pe_file_open): New variant on mono_image_open()
11168 that does not set up the CLI metadata; used for FileVersionInfo so
11169 it can get the data for windows binaries too.
11171 * process.c (process_read_string_block): Don't read off the end of
11172 the StringTable block.
11174 These both fix bug 70766.
11176 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
11178 * gc.c: set some fields to NULL at GC cleanup time.
11179 * threads.c: if we quit the main thread, call exit ().
11181 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
11183 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
11185 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
11187 * threads.h, threads.c, object.c: added accessor and settor for
11188 main_thread. Handle it specially when exiting from it: wait
11189 for other foreground threads to exit.
11191 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11193 * process.c, verify.c: remove some bloat.
11195 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
11197 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
11198 the calling convention to cdecl under win32.
11200 2005-01-08 Ben Maurer <bmaurer@ximian.com>
11202 * object.c (mono_object_get_size): New function to get the size of
11203 an object instance.
11205 * profiler.c (simple_allocation): Use above.
11207 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
11209 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
11210 ves_icall_System_AppDomain_getRootDomain (as it's not required to
11211 get an appdomain by it's id and we can't assume the root's id is 0).
11212 * domain-internals.h: Change the function prototype to match.
11213 * icall.c: Change the icall table for AppDomain.
11215 2005-01-08 Miguel de Icaza <miguel@ximian.com>
11217 * locales.c (string_invariant_compare_char): Only compute
11218 GUnicodeTypes in the case where we need them. Test for ordinality
11219 first and return if so.
11224 * FIXME: here we must use the information from c1type and c2type
11225 * to find out the proper collation, even on the InvariantCulture, the
11226 * sorting is not done by computing the unicode values, but their
11227 * actual sort order.
11230 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11232 * loader.c: for P/Invoke methods, allow the "Internal" shared
11233 library name to refer to the calling process symbol namespace.
11235 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
11237 * Makefile.am: Add the security manager to the build.
11238 * security-manager.c|h: New. Initialization of the security manager.
11240 2005-01-07 Dick Porter <dick@ximian.com>
11243 * monitor.c: Update thread state during Monitor and WaitHandle
11244 waits. Fixes bug 71031.
11246 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
11248 * reflection.c (property_encode_signature): Correctly handle when the
11249 property has no methods.
11251 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
11253 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
11255 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
11256 fields from mb, not rmb. Fixes #71017.
11258 * marshal.c (emit_ptr_to_str_conv): Add support for
11259 ByValTStr -> string conversion. Fixes #71015.
11261 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
11263 * mempool.c (mono_mempool_contains_addr): New helper function.
11265 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11267 * metadata.c (mono_metadata_compute_size): Fix size calculation of
11268 HasSematics encoded fields.
11270 * metadata.c (mono_type_to_unmanaged): Improve error message for
11271 invalid string marshalling.
11273 * metadata.c: Fix warnings.
11275 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11277 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
11280 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11282 * domain.c object.c domain-internals.h: Revert part of r38077 since the
11283 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
11286 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
11288 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
11289 so methods containing these can be AOTed.
11291 2005-01-03 Martin Baulig <martin@ximian.com>
11293 * loader.c (find_method): Removed the hack for generic instances.
11294 (method_from_memberref): If our parent is a generic instance, pass
11295 its generic type definition to find_method() and then inflate the
11297 (mono_get_method_constrained): Pass the generic type definition to
11298 find_method() and inflate the method later.
11300 * class-internals.h (MonoStats): Added `generic_class_count'.
11302 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
11303 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
11305 * reflection.c (mono_custom_attrs_from_params): Don't ignore
11306 generic type definitions.
11308 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
11310 * loader.c icall.c: Fix warnings.
11312 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
11314 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
11315 blittable types. Fixes #70864.
11317 2004-12-29 Martin Baulig <martin@ximian.com>
11320 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
11322 * reflection.c (mono_method_get_object): Create a
11323 "System.Reflection.MonoGenericMethod" for inflated methods; don't
11324 call mono_get_inflated_method().
11326 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
11328 2004-12-27 Martin Baulig <martin@ximian.com>
11330 * class-internals.h (MonoMethod): Added `is_inflated' flag.
11331 (MonoMethodInflated): Added `inflated' field.
11333 * class.c (mono_class_inflate_generic_method): Don't really
11334 inflate the method here; just set the `is_inflated' flag in the
11336 (mono_class_get_inflated_method): Actually inflate the method here
11337 if it's not already inflated; we use the MonoMethodInflated's new
11338 `inflated' field as a cache.
11340 2004-12-26 Martin Baulig <martin@ximian.com>
11343 (inflate_generic_class): Moved some code out of inflate_generic_type().
11344 (mono_class_inflate_generic_method): If we're already inflated,
11345 inflate the context and use the declaring method; ie. make sure
11346 the declaring method of an inflated method is always the generic
11348 (mono_class_create_from_typedef): Create
11349 `class->generic_container->context->gclass'.
11351 2004-12-24 Ben Maurer <bmaurer@ximian.com>
11353 * metadata-internals.h, marshal.c, reflection.c: More
11354 MonoGHashTable->GHashTable.
11356 * domain-internals.h, class.c: Change MonoGHashTable's into
11357 GHashTables for some cases where no gc stuff is used
11359 All users: update apis
11361 2004-12-23 Ben Maurer <bmaurer@ximian.com>
11363 * metadata.c (builtin_types): Make this `const'. Makes this get
11364 put into the shareable section.
11365 (mono_metadata_init): Casts to make gcc happy.
11367 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
11369 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
11371 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
11373 * icall.c: Added an internal call to retrieve the position and length
11374 of assembly-level declarative security attributes (RequestMinimum,
11375 RequestOptional and RequestRefuse). This is used by the Assembly class
11376 to re-create the corresponding permission sets.
11378 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11380 * marshal.c: fix the stelemref wrapper to be type correct
11383 2004-12-20 Ben Maurer <bmaurer@ximian.com>
11385 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
11386 to do key & 0x7fffffff. Hashtable already does this. It just
11387 results in longer code.
11389 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
11391 * appdomain.c: Bump corlib version.
11392 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
11393 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
11394 * reflection.c|h: Add functions to get declarative security infos
11395 (blob position and length) for assemblies, classes and methods.
11397 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
11399 * reflection.c: sort the constant table (bug #70693).
11401 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
11403 * object-internals.h, threads.c, domain.c: add accessors for
11404 the MonoThread and MonoDomain tls keys.
11406 2004-12-18 Martin Baulig <martin@ximian.com>
11408 * class.c (inflate_generic_type): If we're inflating a generic
11409 instance, set `ngclass->context->container = context->container';
11410 ie. the container we inflated into.
11412 * metadata.c (mono_metadata_parse_generic_param): Reflect above
11413 inflate_generic_type() changes.
11415 2004-12-17 Martin Baulig <martin@ximian.com>
11417 * class-internals.h
11418 (MonoGenericClass): Replaced `MonoType *generic_type' with
11419 `MonoClass *generic_class'. Removed `dynamic_info'; if
11420 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
11421 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
11423 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
11425 * exception.c (mono_exception_from_token): New helper function.
11427 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
11429 * assembly.c (mono_assembly_load_with_partial_name): Call
11430 mono_assembly_loaded before invoking the preload hooks. Fixes
11433 * object-internals.h (MonoThread): Change culture_info and
11434 ui_culture_info into an array.
11436 * threads.c: Cache culture info objects from more than one appdomain.
11438 * threads.c threads-types.h icall.c: Add icalls for manipulating the
11439 current UI culture.
11441 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
11443 * threads.h threads.c appdomain.c: Clear the culture_info field of
11444 all threads during unloading if they point to an object in the dying
11447 2004-12-13 Ben Maurer <bmaurer@ximian.com>
11449 * culture-info.h (TextInfoEntry): New struct
11450 * object-internals.h: sync with managed
11451 * locales.c: fill the `text_info_data' field
11452 * culture-info-tables.h: update
11454 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11456 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
11459 2004-12-12 Ben Maurer <bmaurer@ximian.com>
11461 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
11462 (ves_icall_ModuleBuilder_getMethodToken): Ditto
11464 2004-12-12 Martin Baulig <martin@ximian.com>
11466 * mono-debug-debugger.c (write_type): If we're an enum and the
11467 builtin types have already been initialized, call mono_class_init().
11469 2004-12-11 Martin Baulig <martin@ximian.com>
11471 * metadata.c (mono_metadata_load_generic_params): Added
11472 `MonoGenericContainer *parent_container' argument; automatically
11473 compute `container->is_method'; pass the correct owner to
11476 * reflection.c (compare_genericparam): Sort the GenericParam table
11477 according to increasing owners.
11479 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11481 * profiler.c: allow disabling the default profiler.
11483 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
11485 * decimal.c, icall.c: allow disabling System.Decimal support.
11487 2004-12-09 Marek Safar <marek.safar@seznam.cz>
11489 * reflection.c: Add support for null attribute arguments.
11491 2004-12-09 Martin Baulig <martin@ximian.com>
11493 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
11494 names to get rid of compiler warnings.
11496 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11498 * marshal.c (mono_marshal_get_struct_to_ptr): Call
11499 mono_marshal_load_type_info (). Fixes #69625.
11500 (mono_marshal_get_ptr_to_struct): Likewise.
11502 2004-12-08 Martin Baulig <martin@ximian.com>
11504 * mono-debug.h: Bumped version number to 47.
11506 * mono-debug-debugger.c
11507 (mono_debugger_event_handler, mono_debugger_event): Take two
11508 guint64 arguments insteed of a gpointer and a guint32.
11510 2004-12-08 Martin Baulig <martin@ximian.com>
11512 * debug-mono-symfile.h
11513 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
11514 `address' to `native_offset'.
11516 2004-12-08 Martin Baulig <martin@ximian.com>
11518 * class.c (mono_class_create_from_typespec): Only inflate if we
11519 either have `context->gclass' or `context->gmethod'.
11521 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11523 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
11525 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
11527 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
11529 * reflection.c (mono_assembly_get_object): Remove the workaround put
11530 in for the release.
11532 * appdomain.c: Use the corlib_internal field from MonoAssembly.
11534 * appdomain.c: Bump corlib version.
11536 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
11537 be visible in other appdomains.
11539 2004-12-07 Ben Maurer <bmaurer@ximian.com>
11541 * threads.c: Interlocked inc and dec for longs were messed up,
11542 use a KISS based impl for this. Fixes 70234
11544 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
11546 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
11548 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11550 * icall.c: fix to follow policy not to allow struct
11551 arguments in icalls.
11553 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11555 * process.c: make the patch that handles spaces in file paths work
11556 on mono/windows too.
11558 2004-12-06 Martin Baulig <martin@ximian.com>
11560 * class.c (mono_class_create_generic): Call
11561 mono_class_setup_supertypes() if we're dynamic.
11562 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
11564 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
11566 * object-internals.h: Add new fields to MonoThread.
11568 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11570 * icall.c threads-types.h threads.c: Add new icalls.
11572 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
11574 * object-internals.h (MonoReflectionAssembly): Sync object layout with
11577 * appdomain.c: Bump corlib version.
11579 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
11580 internal assemblies. Fixes #69181.
11582 2004-12-05 Martin Baulig <martin@ximian.com>
11584 * class.c (mono_class_inflate_generic_signature): Make this a
11585 no-op if `context' is NULL or we don't have any type parameters;
11586 also copy `sentinelpos'.
11588 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
11590 * image.c: Add unbox_wrapper_cache.
11592 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
11594 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
11595 function generator.
11597 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
11600 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
11602 2004-12-04 Martin Baulig <martin@ximian.com>
11604 * loader.c (mono_method_get_signature_full): New public function;
11605 like mono_method_get_signature(), but with an additional
11606 `MonoGenericContext *' argument.
11608 * class.c (mono_class_inflate_generic_signature): Formerly known
11609 as inflate_generic_signature(); make this public.
11611 2004-12-04 Martin Baulig <martin@ximian.com>
11614 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
11615 instead of a `MonoGenericContainer *'.
11616 (mono_metadata_parse_array_full): Likewise.
11617 (mono_metadata_parse_signature_full): Likewise.
11618 (mono_metadata_parse_method_signature_full): Likewise.
11619 (mono_metadata_parse_generic_inst): Likewise.
11620 (mono_metadata_parse_generic_param): Likewise.
11621 (mono_metadata_parse_mh_full): Likewise.
11622 (mono_type_create_from_typespec_full): Likewise.
11624 2004-12-03 Martin Baulig <martin@ximian.com>
11626 * class-internals.h (MonoGenericContainer): Replaced the
11627 `MonoGenericContext * pointer with a `MonoGenericContext'
11628 structure and made it the first element.
11630 2004-12-03 Martin Baulig <martin@ximian.com>
11633 (inflate_generic_type): Set the `context->container' when creating
11634 a new MonoGenericContext.
11635 (mono_class_inflate_generic_method): Likewise.
11636 (mono_class_create_from_typespec): Just use `context->container'
11637 to get the container.
11639 * loader.c (method_from_methodspec): Set `context->parent' from
11640 `context->container' - and if that's a method container, use its
11641 parent. Also set the `context->container' when creating a new
11642 MonoGenericContext.
11643 (mono_get_method_from_token): Use just `context->container' to get
11646 * metadata.c (do_mono_metadata_parse_generic_class): Also set
11647 `gclass->context->container'.
11649 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
11650 the `context->container' when creating a new MonoGenericContext.
11652 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
11654 * reflection.c (compare_genericparam): Sort params with identical
11655 owner by their number. Fixes gen-111 on sparc.
11657 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
11659 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
11660 around the domain changes.
11662 * appdomain.c (mono_domain_unload): Handle the case when the thread
11663 calling Unload is itself being aborted during unloading. Fixes #70022.
11665 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
11667 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
11668 checkpoint_func as an icall so it gets a wrapper.
11669 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
11670 in the cross-appdomain wrappers too.
11672 * threads.c (mono_thread_has_appdomain_ref): Make this public.
11674 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
11676 * reflection.c: Fix some memory leaks.
11678 2004-12-02 Martin Baulig <martin@ximian.com>
11680 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
11682 * metadata.c (generic_class_cache): New static hashtable.
11683 (mono_metadata_lookup_generic_class): New public method.
11685 2004-12-02 Martin Baulig <martin@ximian.com>
11687 * class.c (mono_class_create_from_typedef): Call
11688 mono_class_setup_parent() and mono_class_create_mono_type() before
11689 parsing the interfaces.
11691 2004-12-02 Martin Baulig <martin@ximian.com>
11693 * metadata.c (generic_inst_cache): New static hashtable.
11694 (mono_metadata_lookup_generic_inst): New public function.
11695 (mono_metadata_inflate_generic_inst): New public function.
11696 (mono_metadata_parse_generic_inst): New public function.
11697 (do_mono_metadata_parse_generic_class): Use the new
11698 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
11699 since this'll also use the cache.
11701 * reflection.c (mono_reflection_bind_generic_method_parameters):
11702 Use mono_metadata_lookup_generic_inst() to use the new cache.
11704 * class.c (inflate_mono_type): Use
11705 mono_metadata_inflate_generic_inst() to inflate a generic
11706 instance; this'll also use the new cache.
11708 * loader.c (method_from_methodspec): Use
11709 mono_metadata_parse_generic_inst() and
11710 mono_metadata_inflate_generic_inst() rather than parsing it
11711 manually, so we can use the new cache.
11713 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
11715 * threads.c (wait_for_tids): Do not incorrectly free threads when
11716 the wait times out.
11718 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11720 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
11721 iter->args based on whether parameters are passed in registers (i.e.
11722 MONO_ARCH_REGPARMS is defined)
11724 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
11726 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
11727 the exception message. Fixes #70070.
11728 (method_from_methodspec): Fix warnings.
11730 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11732 * process.c: (complete_path) return the path quoted
11734 2004-12-01 Martin Baulig <martin@ximian.com>
11736 * class-internals.h (MonoGenericInst): New structure.
11737 (MonoGenericClass): Replaced `type_argc', `type_argv' and
11738 `is_open' with `MonoGenericInst *inst'.
11739 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
11740 `is_open' with `MonoGenericInst *inst'.
11742 2004-11-30 Martin Baulig <martin@ximian.com>
11744 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
11746 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
11747 to `generic_class_cache'.
11750 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
11751 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
11752 (mono_generic_inst_is_valuetype): Renamed to
11753 mono_generic_class_is_valuetype().
11755 * class-internals.h
11756 (MonoGenericInst): Renamed to MonoGenericClass.
11757 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
11758 (MonoClass): Renamed `generic_inst' to `generic_class'.
11759 (MonoGenericContext): Renamed `ginst' to `gclass'.
11761 * object-internals.h
11762 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
11764 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
11765 mono_reflection_generic_class_initialize().
11767 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
11768 now known as "System.Reflection.MonoGenericClass".
11769 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
11771 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
11773 * class-internals.h: Added a flag field to MonoClass to cache the
11774 declarative security attributes actions associated with the class.
11775 * domain-internals.h: Added booleans to MonoJitInfo to cache the
11776 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
11777 applicable to the JITted method.
11778 * reflection.c|h: Added functions to extract (as flags) which security
11779 actions are available (declaratively) for a method, class or assembly.
11780 * metadata.c|h: Added functions to search the declarative security
11781 table in the metadata.
11783 2004-11-29 Ben Maurer <bmaurer@ximian.com>
11785 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
11786 EXPORTEDTYPES are already in the class name cache, so there is no
11787 need to add extra code here to look at them. Just removes a bit of
11790 (ves_icall_System_Environment_get_TickCount): No need for #if
11791 WINDOWS. We already have the code in io-layer.
11793 2004-11-28 Martin Baulig <martin@ximian.com>
11796 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
11799 2004-11-27 Miguel de Icaza <miguel@ximian.com>
11801 * assembly.c (do_mono_assembly_open): Instead of having a
11802 conditional WITH_BUNDLE, incorporate support for bundles here, by
11803 having a global `bundles' variable holding a pointer to the actual
11806 (mono_register_bundled_assemblies): New API call used by the
11809 See mkbundle.1 for details.
11811 2004-11-27 Martin Baulig <martin@ximian.com>
11813 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
11814 the vtable for generic methods.
11816 2004-11-26 Martin Baulig <martin@ximian.com>
11819 (mono_metadata_generic_method_hash): New public function.
11820 (mono_metadata_generic_method_equal): Likewise.
11822 * class-internals.h
11823 (MonoGenericContainer): Added `GHashTable *method_hash'.
11825 * reflection.c (ReflectionMethodBuilder): Added
11826 `MonoGenericContainer *generic_container'.
11827 (reflection_methodbuilder_to_mono_method): Don't create a new
11828 MonoGenericContainer each time we're called.
11829 (mono_reflection_bind_generic_method_parameters): Use
11830 `container->method_hash' to cache the results so we don't create a
11831 different method if we're called several times with the same
11834 * loader.c (method_from_methodspec): Use the new
11835 `container->method_hash' here, too.
11837 2004-11-26 Martin Baulig <martin@ximian.com>
11839 * class.c (inflate_generic_signature): Correctly compute
11840 `res->has_type_parameters'.
11841 (mono_class_vtable): Use the `has_type_parameters' flag to
11842 determine whether we're a generic method.
11844 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
11846 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
11848 * object.c (mono_runtime_run_main): Fix a small memory leak.
11850 2004-11-25 Martin Baulig <martin@ximian.com>
11852 * class.c (set_generic_param_owner): Fixed the loop.
11854 2004-11-25 Martin Baulig <martin@ximian.com>
11856 * object.c (mono_class_vtable): Don't create any JIT wrappers for
11859 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
11861 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
11862 names. Fixes #69787.
11864 2004-11-24 Martin Baulig <martin@ximian.com>
11866 * class.c (mono_class_create_generic_2): If we don't have a
11867 `ginst->parent', inflate `gklass->parent' to get our parent.
11869 2004-11-24 Martin Baulig <martin@ximian.com>
11871 * reflection.c (compare_genericparam): Correctly sort the
11872 GenericParam table; fixes #69779.
11874 2004-11-23 Ben Maurer <bmaurer@ximian.com>
11876 * reflection.c: When writing a PE file, don't create a huge
11877 buffer in memory. Just write the arrays we have to the file.
11878 This reduces memory usage.
11880 * metadata-internals.h: MonoDynamicStream pefile is no longer used
11883 2004-11-17 Martin Baulig <martin@ximian.com>
11885 * class.c (mono_class_init): Don't setup `class->parent' for
11886 dynamic instances; moved this to mono_class_generic_2().
11887 (mono_class_create_generic): Also set `klass->inited' for dynamic
11889 (mono_class_create_generic_2): Don't do anything for dynamic
11890 generic instances. Set `klass->parent' here and also call
11891 mono_class_setup_parent() here.
11893 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
11894 `MonoType *parent' argument; set `ginst->parent' before calling
11895 mono_class_create_generic_2(), so we set the correct parent.
11897 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
11899 * reflection.c: allow getting attributes from ModuleBuilder
11902 2004-11-17 Martin Baulig <martin@ximian.com>
11904 * class.c (mono_class_create_from_typedef): If a type parameter is
11905 inherited from an outer class, set its owner to that class.
11907 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
11909 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
11910 for (int*) written size. This fixes bug #69592.
11912 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
11914 * icall.c: Added IsAuthenticodePresnet internal call.
11915 * image.c|h: New function that check a MonoImage for an Authenticode
11916 signature in the certificate PE data directory.
11917 * security.c|h: New internal call to ask the runtime if an
11918 Authenticode signature seems referenced in the PE header.
11920 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
11922 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
11924 * reflection.c (mono_image_create_pefile): Free the assembly streams
11925 after writing out the assembly file.
11927 * object.c (mono_runtime_run_main): Fix small memory leak.
11929 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
11930 property access modifiers. Fixes #69389.
11932 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11934 * domain.c, object.c, object-internals.h, domain-internals.h,
11935 object.h, marshal.c: keep dynamic code info per domain.
11937 2004-11-15 Martin Baulig <martin@ximian.com>
11939 * class.c (mono_type_get_name_recurse): Put type arguments in
11940 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
11943 2004-11-15 Martin Baulig <martin@ximian.com>
11945 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
11946 (mono_class_setup_vtable): When computing `the_cname' for a
11947 generic instance, don't include the namespace since we'd otherwise
11950 2004-11-15 Martin Baulig <martin@ximian.com>
11952 * class.c (mono_class_create_generic): Changed return type to void.
11953 (mono_class_create_generic_2): New public function; setup
11954 `class->method', `class->field' and `class->interfaces' here
11955 instead of in mono_class_init().
11957 * class.h (mono_class_create_generic): Moved to class-internals.h.
11959 2004-11-14 Ben Maurer <bmaurer@ximian.com>
11961 * reflection.c (mono_image_create_pefile): take a file HANDLE.
11962 rather than writing to memory, write to this file. Right now,
11963 we are just writting into a buffer, and copying that. However
11964 we can avoid the buffer later.
11966 (mono_dynamic_stream_reset): new function
11968 * icall.c, object-internals.h: update for the above.
11970 2004-11-13 Ben Maurer <bmaurer@ximian.com>
11972 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
11973 have been using gc'd memory. First it is slower, unlikely
11974 the comment in the source code said, secondly, it increases
11975 our footprint to do it in the gc.
11977 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
11978 the method so that it does not have to copy to managed code.
11980 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
11982 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
11984 2004-11-12 Martin Baulig <martin@localhost>
11986 * reflection.c (mono_image_create_token): Allow generic method
11987 definitions here, since they may appear in an `.override'; see
11988 gen-98/gen-99 for an example.
11990 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
11992 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
11995 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
11998 2004-11-11 Martin Baulig <martin@ximian.com>
12000 * class.c (mono_class_setup_vtable): In an explicit interface
12001 implementation, the method name now includes the arity.
12003 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
12005 * object.c (mono_array_full_copy): Fix warning.
12007 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
12009 * appdomain.c: Removed look_for_method_by_name(). Use the new method
12010 mono_class_get_method_from_name() instead.
12012 * class-internals.h: Added two new types of wrappers.
12013 Added MonoRemotingTarget enum. Added new trampoline function type, which
12014 takes an additional MonoRemotingTarget value as parameter, so it is
12015 possible to request a trampoline for a specific target.
12017 * class.c: Added new mono_class_get_method_from_name() method.
12019 * class.h: In MonoRemoteClass, we can have now to vtables, one for
12020 general remoting sinks and one specific for cross domain calls.
12022 * debug-helpers.c: Added new wrapper names.
12024 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
12027 * image.c: Porperly delete value objects form the remoting invoke hashtable.
12029 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
12030 with several other methods (mono_marshal_get_xappdomain_dispatch,
12031 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
12032 and others) can generate a fast remoting wrapper for cross domain calls.
12033 More information can be found in docs/remoting.
12034 Other changes: Removed mono_find_method_by_name, and used
12035 mono_class_get_method_from_name instead.
12036 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
12037 is stored in the remoting invoke hashtable.
12039 * marshal.h: published the new method for getting the xdomain wrapper,
12040 and also added a method for getting the adequate wrapper for a given
12043 * object-internals.h, object.c: Added a couple of methods for capying and
12045 Modified mono_install_remoting_trampoline, which takes the new remoting
12046 trampoline that has a remoting target as parameter.
12047 mono_class_proxy_vtable now also takes a remoting target as parameter, and
12048 will return the most suitable vtable for the target.
12049 Added mono_remote_class_vtable, which returns the vtable of a remote class
12050 (which can be the normal remoting vtable or the xdomain vtable).
12052 * threads.c: the xdomain invoke and dispatch wrappers must also be
12053 protected against interruptions.
12055 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12057 * icall.c: use memmove in BlockCopyInternal when the source and
12058 destination arrays are the same.
12060 2004-11-09 Martin Baulig <martin@ximian.com>
12062 * class-internals.h (MonoGenericContainer): Removed `method' and
12063 `signature', replaced them with `is_method' and `is_signature'
12064 flags. Added `context'.
12066 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
12067 instead of a `MonoGenericContainer *'.
12069 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
12070 for dynamic type parameters.
12071 (mono_metadata_load_generic_params): Setup `container->context'.
12073 * reflection.c (mono_reflection_setup_generic_class): Setup
12074 `tb->generic_container->context'.
12075 (do_mono_reflection_bind_generic_parameters): Use
12076 mono_class_inflate_generic_type() to correctly inflate types,
12077 rather than using our own hack just for MONO_TYPE_VAR.
12079 2004-11-09 Martin Baulig <martin@ximian.com>
12081 * class.c (mono_class_inflate_generic_method): Small fix; don't
12085 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
12086 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
12087 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
12088 (ves_icall_Type_BindGenericParameters): Likewise.
12089 (ves_icall_Type_get_IsGenericInstance): Likewise.
12090 (ves_icall_Type_GetGenericParameterPosition): Likewise.
12091 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
12092 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
12093 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
12095 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
12097 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
12098 assembly versions and public key tokens. Fixes #69113.
12100 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
12102 * metadata.c: fix bug introduced with the type cache changes
12105 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
12107 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
12108 the MonoClass pointer instead of the token in exception clauses.
12109 * reflection.c: updates for the above and make the code not depend
12110 on the structure of MonoExceptionClause.
12112 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
12114 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12115 Add support for dynamic assemblies. Fixes #69114.
12117 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
12119 2004-11-07 Ben Maurer <bmaurer@ximian.com>
12121 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
12122 since most only those methods use it. the code member of
12123 MonoMethodPInvoke was dead, so that can be removed too. Also,
12124 remove inline_count (again, not used), and move slot so that it
12125 can share bits with some other flags. This saves 8 bytes in the
12126 structure and gives us about 50 kb back for mcs helloworld.cs
12128 * *.[ch]: Do naming changes for the above.
12130 * loader.c (mono_method_get_header): Lazily init the header
12132 (mono_get_method_from_token): don't init the header here
12133 (mono_free_method): the header may never be allocated
12135 Overall, this saves 150 kb of unmanaged allocations
12136 for mcs helloworld.cs. That accounts for 10% of the unmanaged
12139 * loader.c, loader.h (mono_method_get_header): new accessor.
12141 * *.[ch]: use the above method. Prepares us to lazily load
12144 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
12145 three warnings, which are actual bugs (see 69206).
12147 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
12148 unused. Saves a cool 4 bytes / method.
12150 2004-11-06 Ben Maurer <bmaurer@ximian.com>
12152 * metadata.c (builtin_types): Add types for System.Object here.
12153 (mono_metadata_parse_type_full): Cache MonoType*'s that are
12154 for a class or valuetype from klass->this_arg or klass->byval_arg.
12156 On mcs for a hello world, this gets us down from 21836 MonoType's
12159 (mono_metadata_free_type): Account for the above change.
12161 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
12163 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
12164 exception instead of asserting if name is null.
12165 (ves_icall_System_AppDomain_GetData): Ditto.
12167 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
12169 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
12172 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
12173 Return NULL when the domain does not have entry_assembly set.
12175 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
12176 Add a 'resource_modules' argument.
12177 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
12179 * reflection.c (mono_reflection_create_runtime_class): Move setting
12180 of wastypebuilder here, so mono_get_type_object () returns a MonoType
12183 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
12184 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
12185 Throw an ArgumentNullException if 'ptr' is null.
12187 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
12188 assemblies here. Fixes #69020.
12190 2004-11-05 Geoff Norton <gnorton@customerdna.com>
12192 * reflection.c (build_compressed_metadata): Fix the previous patch for
12193 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
12196 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
12198 * assembly.c (mono_assembly_names_equal): Allow a match if one of
12199 the cultures is false. Fixes #69090.
12201 * reflection.c (build_compressed_metadata): Fix invalid memory read
12202 detected by valgrind.
12204 * reflection.c (mono_reflection_get_type): Avoid triggering a
12205 TypeResolve multiple times for the same type. Fixes #65577.
12207 2004-11-04 Ben Maurer <bmaurer@ximian.com>
12209 * marshal.c: Avoid using ldftn to call managed functions. It is
12210 much slower than just a call.
12212 * reflection.c (mono_module_get_object): free the basename we
12213 allocate here from glib.
12215 * reflection.c (ensure_runtime_vtable): make sure to free
12216 overrides. Also, we were allocating an array of MonoMethod not an
12217 array of MonoMethod*.
12219 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
12221 * image.c (mono_image_close): free image->guid here.
12223 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
12225 * reflection.c: Fix some spec conformance issues with the PE file
12226 structures so mcs compiled apps run on the Net 2.0 beta.
12228 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
12230 * string-icalls.c (ves_icall_System_String_ctor_encoding):
12231 Implement this. Fixes #67264.
12233 * debug-helpers.h debug-helpers.c marshal.c: Move
12234 mono_find_method_by_name to debug-helpers.c.
12236 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
12238 * object.c (mono_release_type_locks): type_initialization_hash is
12241 * reflection.c object.c object-internals.h: Fix warnings.
12243 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
12244 without accessors. Fixes #61561.
12246 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
12247 application base from the root domain if not set. Fixes #65641.
12248 (mono_runtime_init): Fix warning.
12250 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12252 * appdomain.c: call mono_thread_pool_init.
12253 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
12254 of worker threads based on the number of CPUs and the environment
12255 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
12256 for non-windows (windows) systems.
12258 2004-10-27 Chris Toshok <toshok@ximian.com>
12260 * mono-debug-debugger.c (write_class): don't call mono_class_init
12261 here, as even with the check for (!klass->init_pending), we get
12262 into a situation where we're hitting cycles in class
12263 initialization. Fixes #68816.
12265 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
12267 * image.c: Avoid overwriting values in the loaded_images_hash when an
12268 assembly is loaded multiple times. Fixes #61152.
12270 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
12271 so multiple satellite assemblies for the same name can be loaded.
12274 * mono_domain_assembly_preload: Actually return the loaded assembly,
12277 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
12278 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
12280 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
12281 pending finalizers are not invoked after the appdomain has been
12282 unloaded. Fixes #67862.
12284 2004-10-22 Martin Baulig <martin@ximian.com>
12286 * mono-debug-debugger.c
12287 (mono_debugger_runtime_invoke): Don't box valuetypes.
12289 2004-10-22 Chris Toshok <toshok@ximian.com>
12291 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
12292 don't hide private methods.
12294 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
12296 * icall.c: Allows the runtime to "share" (when known) the public key
12297 token of an assembly. This avoid the need to recalculate the token
12298 (from the public key) in managed code.
12300 2004-10-21 Chris Toshok <toshok@ximian.com>
12302 * debug-helpers.c (append_class_name): argh, revert last patch.
12304 2004-10-21 Chris Toshok <toshok@ximian.com>
12306 * debug-helpers.c (append_class_name): use '+' as the delimiter,
12307 not '/', so that it matches what the debugger uses to look up
12310 2004-10-21 Martin Baulig <martin@ximian.com>
12312 * mono-debug-debugger.c (mono_debugger_throw_exception): New
12313 public method; this is called each time an exception is thrown and
12314 allows the debugger to use exception catch points.
12316 2004-10-21 Martin Baulig <martin@ximian.com>
12318 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
12319 the stack pointer and the exception object in some struct and pass
12320 that to the debugger.
12322 2004-10-21 Chris Toshok <toshok@ximian.com>
12324 * mono-debug-debugger.c (do_write_class): add instance/static
12325 event support. We don't expose "raise" or "other" yet.
12326 (event_is_static): new method.
12328 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
12330 * mono-debug-debugger.c
12331 (mono_debugger_handle_exception): Remove
12332 bogus return value for fussy compilers.
12334 2004-10-20 Martin Baulig <martin@ximian.com>
12336 * mono-debug-debugger.c
12337 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
12338 (mono_debugger_handled_exception): Likewise.
12340 2004-10-20 Martin Baulig <martin@ximian.com>
12342 * mono-debug-debugger.h (MonoDebuggerEvent): Added
12343 MONO_DEBUGGER_EVENT_EXCEPTION.
12345 * mono-debug-debugger.c (mono_debugger_handle_exception): New
12346 public function to send the debugger a notification for an
12347 exception and inform it about a catch/finally clause.
12349 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
12351 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
12352 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
12355 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
12357 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
12359 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
12360 marshalled as [In,Out]. Fixes #58325.
12362 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
12364 * reflection.c (mono_method_body_get_object): Implement some fields.
12366 2004-10-12 Martin Baulig <martin@ximian.com>
12368 * reflection.c (mono_reflection_bind_generic_parameters): Small
12369 fix, correctly retrieve our parent from a generic instance.
12371 2004-10-12 Martin Baulig <martin@ximian.com>
12373 * metadata.c (mono_metadata_generic_param_equal): We always have
12377 (mono_class_from_generic_parameter): We need to have an owner.
12378 (my_mono_class_from_generic_parameter): Likewise.
12380 * reflection.c (mono_reflection_setup_generic_class): Renamed to
12381 mono_reflection_create_generic_class() and added a new
12382 mono_reflection_setup_generic_class().
12383 (mono_reflection_initialize_generic_param): If we're a nested
12384 generic type and inherited from the containing class, set our
12385 owner to the outer class.
12387 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
12389 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
12391 * reflection.c (mono_method_body_get_object): New function to create
12392 a MethodBody object.
12394 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
12396 2004-10-11 Martin Baulig <martin@ximian.com>
12398 * metadata.c (_mono_metadata_type_equal): Renamed to
12399 do_mono_metadata_type_equal() and made static.
12401 2004-10-11 Martin Baulig <martin@ximian.com>
12403 * appdomain.c: Bump corlib version number to 28.
12405 2004-10-10 Martin Baulig <martin@ximian.com>
12407 * class-internals.h
12408 (MonoGenericInst): Added `MonoGenericContainer *container'.
12409 (MonoGenericMethod): Likewise.
12410 (MonoGenericContext): Likewise.
12411 (MonoGenericParam): Added `MonoGenericContainer *owner'.
12414 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
12415 (do_mono_metadata_parse_generic_inst): Likewise.
12416 (mono_metadata_parse_type_full): New public method. This is the actual
12417 mono_metadata_parse_type() implementation - with an additional
12418 `MonoGenericContainer *' argument.
12419 (mono_metadata_parse_array_full): Likewise.
12420 (mono_metadata_parse_signature_full): Likewise.
12421 (mono_metadata_parse_method_signature_full): Likewise.
12422 (mono_metadata_parse_mh_full): Likewise.
12423 (mono_type_create_from_typespec): Likewise.
12424 (mono_metadata_interfaces_from_typedef_full): New public method;
12425 this is similar to the other _full() methods, but we take a
12426 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
12427 (mono_metadata_parse_generic_param): Take an additional
12428 `MonoGenericContainer *' argument and lookup the MonoGenericParam
12429 from that container.
12430 (mono_metadata_generic_param_equal): New static method to compare
12431 two type parameters.
12432 (_mono_metadata_type_equal): New static method; takes an
12433 additional `gboolean signature_only' argument - if true, we don't
12434 compare the owners of generic parameters.
12435 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
12436 with a TRUE argument - do a signature-only comparision.
12438 * loader.c: Use the new _full() methods and pass the
12439 MonoGenericContainer to them.
12441 * object-internals.h (MonoReflectionTypeBuilder): Added
12442 `MonoGenericContainer *generic_container' field.
12443 (MonoReflectionMethodBuilder): Likewise.
12445 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
12447 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
12448 case initial images of dynamic assemblies.
12450 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
12452 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
12454 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
12455 length of event->other array.
12456 (typebuilder_setup_events): Ditto.
12458 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
12459 'assembly_by_name' and add an 'assemblies' list.
12461 * assembly.h assembly.c: Add a new search hook for determining whenever
12462 an assembly is already loaded. Use this instead of searching in the
12463 loaded_assemblies list.
12465 * domain.c appdomain.c: Implement the new search hook so loaded
12466 assemblies are now scoped by appdomain. Fixes #67727.
12468 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
12470 * threads.c (mono_thread_attach): Initialize synch_lock field so
12471 mono_thread_detach works again.
12473 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
12474 'lib' too. Fixes #63130.
12476 2004-10-06 Jackson Harper <jackson@ximian.com>
12478 * culture-info-tables.h: regenerated.
12480 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
12482 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
12483 implemented by other interfaces in the result. Fixes #65764.
12485 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12486 Handle unloadable modules without crashing.
12488 * image.c (load_modules): Revert the previous patch since modules must
12489 have a fixed index inside the array.
12491 * image.c (load_modules): Don't include native modules in the modules
12494 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
12496 * reflection.h: Add param_defaults field.
12498 * reflection.c: Add support for parameter defaults in dynamic methods.
12501 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
12502 an empty string when a type has no namespace. Fixes #64230.
12504 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
12506 * tabledefs.h: Added "internal" security actions to support non-CAS
12507 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
12508 Note: they do not seems to be used anymore in 2.0 (new metadata format)
12510 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
12512 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
12513 constructor of abstract class. Fixes #61689.
12515 2004-10-04 Martin Baulig <martin@ximian.com>
12517 * class-internals.h (MonoGenericContainer): New type.
12518 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
12519 `MonoGenericContainer *generic_container'.
12520 (MonoClass): Replaced `gen_params' and `num_gen_params' with
12521 `MonoGenericContainer *generic_container'.
12523 * metadata.c (mono_metadata_load_generic_params): Return a
12524 `MonoGenericContainer *' instead of a `MonoGenericParam *';
12525 removed the `num' argument.
12527 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
12529 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
12530 for dynamic images.
12532 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
12535 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
12537 * reflection.c: Save pe_kind and machine values into the generated
12540 * appdomain.c: Bump corlib version number.
12542 * object-internals.h: Reorganize layout of LocalBuilder.
12544 * class-internals.h class.c (mono_class_get_implemented_interfaces):
12545 New helper function.
12547 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
12548 created MonoType for dynamic types. Fixes #66180.
12550 2004-10-02 Ben Maurer <bmaurer@ximian.com>
12552 * threadpool.c: the ares hashtable needs a critical section around it.
12553 this prevents some nasty segfaults
12555 2004-10-02 Massimiliano Mantione <massi@ximian.com>
12557 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
12558 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
12561 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
12563 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
12565 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
12567 * image.c: Always canonicalize image file names, to avoid loading
12568 the same assembly twice when referenced using a relative path.
12570 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
12572 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
12574 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
12576 * marshal.c: Fix warnings.
12578 2004-09-29 Geoff Norton <gnorton@customerdna.com>
12580 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
12581 attempting to marshal the delegate_trampoline as the method_addr.
12582 This patch has a static hashtable of marshalled delegates so that
12583 we can map delegate_trampoline addresses back to delegates. This
12584 allows a delegate passed to managed code to be passed back into native
12587 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
12589 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
12591 * reflection.c (method_encode_code): Align method headers properly.
12594 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
12596 * marshal.c: In the runtime invoke wrapper, reset the abort
12597 exception if it is cached. This avoids the automatic rethrowal of
12598 the exception after the catch of the wrapper. Also check for pending
12599 interruptions before calling the managed method. This is done using
12600 the new method emit_thread_force_interrupt_checkpoint, since the
12601 normal checkpoint method is ignored when running the invoke wrapper.
12602 * object.c: If the abort exception is rethrown, set the abort_exc
12603 field of the thread, so it will be rethrown aftere every catch.
12604 * threadpool.c: Only run an interruption checkpoint if what has been
12605 requested is a stop of the thread (aborts will be ignored).
12606 * threads.c: By default, a thread will now never be interrumped while
12607 running the runtime invoke wrapper (this ensures that runtime_invoke
12608 will always return to the caller if an exception pointer is provided).
12609 There is a new special method mono_thread_force_interruption_checkpoint()
12610 to force an interruption checkpoint even if running a protected
12611 wrapper, which is used by the same runtime invoke wrapper to do a check
12614 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
12616 * object.c, object-internals.h: Implemented mono_release_type_locks,
12617 which releases the cctor locks held by a thread.
12618 * threads.c, threads.h: In thread_cleanup, release cctor locks held
12619 by a thread. Added mono_thread_exit() method to be used to safely stop
12622 2004-09-28 Raja R Harinath <rharinath@novell.com>
12624 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12625 Move null check before dereference. Avoid indexing beyond the end
12626 of the 'modules' array.
12628 2004-09-28 Raja R Harinath <rharinath@novell.com>
12630 * metadata-internals.h (MonoImage): Add module_count field.
12631 * image.c (load_modules): Set image->module_count.
12632 (mono_image_load_file_for_image): Use image->module_count.
12633 * reflection.c (mono_image_load_module): Append to image->modules array
12634 of dynamic assembly.
12635 (mono_module_get_object): Fix loop to actually increment index.
12636 Use image->module_count.
12637 * assembly.c (mono_assembly_load_references): Use image->module_count.
12638 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12641 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
12643 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
12644 Avoid assert on generic types.
12646 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
12648 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
12650 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
12652 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
12653 function to convert a MarshalSpec structure to its managed counterpart.
12655 * reflection.c: Fix warnings.
12657 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
12660 * icall.c (mono_create_icall_signature): Fix build.
12662 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
12664 * icall.c: Add MakePointType icall.
12666 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
12669 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12671 * threadpool.c: reuse allocated slots in the queue.
12673 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
12675 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
12677 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
12679 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
12682 * tabledefs.h: Add constants for pinvoke attributes BestFit and
12683 ThrowOnUnmappableChar.
12685 * icall.c (ves_icall_Type_GetPacking): New icall.
12687 2004-09-24 Martin Baulig <martin@ximian.com>
12689 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
12691 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12694 (mono_domain_set): allow setting a domain that is being unloaded.
12695 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
12698 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
12700 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
12701 the GetCustomAttributes icall.
12703 2004-09-23 Martin Baulig <martin@ximian.com>
12705 * object-internals.h (MonoReflectionGenericParam): Replaced
12706 'has_ctor_constraint', `has_reference_type' and `has_value_type'
12707 with `guint32 attrs'.
12709 2004-09-23 Martin Baulig <martin@ximian.com>
12711 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
12713 2004-09-23 Martin Baulig <martin@ximian.com>
12715 * object-internals.h (GenericParameterAttributes): New enum.
12717 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
12719 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
12721 * class.c (init_events): Fill out event->other field.
12723 * class.c: Fix warnings.
12725 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
12727 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12729 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
12730 walk which doesn't supply the IL offset.
12732 2004-09-22 Martin Baulig <martin@ximian.com>
12734 * reflection.c (mono_reflection_setup_internal_class): If we're
12735 System.ValueType, System.Object or System.Enum, set
12736 `klass->instance_size' and create the vtable.
12737 (mono_reflection_create_internal_class): If we're an enum type,
12738 get the base class from our current corlib.
12740 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
12742 * reflection.h (MonoResolveTokenError): New type.
12744 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
12747 * icall.c: Add an 'error' argument to the ResolveToken icalls.
12749 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
12751 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
12752 Support also calling constructors, but only for already allocated objects.
12754 2004-09-17 Geoff Norton <gnorton@customerdna.com>
12756 * reflection.c (type_get_qualified_name): If the klass is null
12757 return the typename to avoid a NullRefEx.
12758 (encode_cattr_value): Get the qualified name of the boxed type,
12759 not the underlying enumtype. Fixes #62984.
12761 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
12763 * marshal.c: Fix problems with previous checkin.
12765 2004-09-21 <vargaz@freemail.hu>
12767 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
12768 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
12770 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
12772 2004-09-21 Geoff Norton <gnorton@customerdna.com>
12774 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
12775 should only return a type for pointers, arrays, and passbyref types.
12778 2004-09-21 Martin Baulig <martin@ximian.com>
12780 * domain.c (mono_debugger_check_runtime_version): New public
12783 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
12785 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
12787 * reflection.c: Added missing sort to the declarative security
12788 attributes table. MS implementation stops seeing the attributes if the
12789 token number regress in the table (as shown by ildasm and permview).
12791 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
12793 * object-internals.h (MonoReflectionModule): Add 'token' field.
12795 * reflection.c (mono_reflection_get_token): Add support for Module
12797 (mono_module_get_object): Set 'token' field.
12798 (mono_module_file_get_object): Set 'token' field.
12800 * icall.c: Add new Assembly and Module icalls.
12802 * appdomain.c: Bump corlib version.
12804 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
12806 * loader.h loader.c class.h class.c: Add helper functions for obtaining
12807 tokens of metadata objects.
12809 * reflection.h reflection.c (mono_reflection_get_token): New function
12810 to obtain the token of a metadata object.
12812 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
12814 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
12816 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
12818 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
12820 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
12822 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
12823 * object-internals.h: Added 3 MonoArray* members to MonoReflection
12824 AssemblyBuilder to access the permissions set in the class lib.
12825 * reflection.c: Added security attributes encoding step in
12826 mono_image_build_metadata.
12827 * tabledefs.h: Added new security actions defined in 2.0:
12828 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
12830 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
12832 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
12835 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
12837 * locales.c: nullify the ICU_collator member of CompareInfo when it is
12838 finalized. There where random SIGSEVs at program termination, when
12839 an object being finalized was trying to do a string comparison and
12840 the current culture was already finalized.
12842 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12844 * threads.c: call thread_cleanup before finishing the thread if we get
12847 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
12849 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
12850 assemblies from the parent. Fixes #65665.
12852 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
12854 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
12857 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
12859 * reflection.h: add prototype for mono_get_dbnull_object
12860 * reflection.c: add prototypes for get_default_param_value_blobs
12861 and mono_get_object_from_blob for fussier compilers
12863 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
12865 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
12866 false deadlock checks in class initialization.
12868 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
12870 * image.c (mono_image_addref): Fix comment.
12872 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
12875 2004-09-12 Jambunathan K <kjambunathan@novell.com>
12877 * reflection.c (mono_param_get_objects): Modified to return
12878 ParameterInfo.DefaultValue object.
12880 (get_default_param_value_blobs):
12881 (mono_get_object_from_blob):
12882 (mono_get_dbnull_object): New helper routines.
12884 * object.c (mono_get_constant_value_from_blob): New helper routine
12885 carved out from get_default_field_value ()
12887 * object-internals.h (mono_get_constant_value_from_blob): Added
12888 function declaration.
12890 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
12892 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
12893 referenced assemblies. Fixes #62135.
12895 * exception.h exception.c (mono_get_exception_file_not_found2): New
12898 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
12900 * class.h class.c: Add mono_type_get_underlying_type ().
12902 2004-09-09 Geoff Norton <gnorton@customerndna.com>
12904 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
12905 Fix GetTypes() to support dynamically created assemblies.
12907 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
12909 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
12911 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
12914 * reflection.h reflection.c loader.c: Allow dynamic construction of
12915 pinvoke methods. Fixes #65571.
12917 * reflection.c (mono_reflection_get_type): Revert previous change since
12918 it causes regressions.
12920 2004-09-08 Martin Baulig <martin@ximian.com>
12922 * class.c (class_compute_field_layout): Don't call
12923 mono_class_layout_fields() for open generic instances.
12925 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
12926 * threads.c appdomain.c: fix typo in GC macro
12928 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12930 * threads.c: don't call mono_thread_detach() in start_wrapper(),
12931 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
12933 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
12935 * image.c (mono_image_close): Applied patch from
12936 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
12937 assembly is loaded multiple times from data.
12939 * image.c (mono_image_open): Fix warning.
12941 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12943 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
12944 once. Fixes #58334.
12946 * reflection.c (mono_reflection_create_runtime_class): Initialize
12947 klass->nested_classes. Fixes #61224.
12949 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12951 * threads.c: sched_yield() on exit, to allow threads to quit.
12953 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12955 * object.c (mono_unhandled_exception): Remove leftover debug code.
12957 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
12959 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
12961 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12963 * marshal.c (emit_marshal_array): Really null terminate string arrays.
12965 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
12967 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12969 * marshal.c (emit_marshal_array): Null terminate string arrays.
12971 * marshal.c (raise_auto_layout_exception): Fix warning.
12973 * reflection.c (mono_param_get_objects): Initialize the default value
12974 with DBNull.Value, not null. Fixes #62123.
12976 2004-09-01 Miguel de Icaza <miguel@ximian.com>
12978 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
12979 throw an exception with a cute explanation.
12981 2004-09-06 Dick Porter <dick@ximian.com>
12983 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
12984 Close the new process's thread handle, as we don't use it. The
12985 handle stays around forever otherwise.
12987 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12989 * object.c (arith_overflow): Fix warning.
12991 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
12992 calling conventions in method refs. Fixes #65352.
12994 * reflection.c: Fix warnings.
12996 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
12998 * icall.c: Add a new icall for Array.Clear
13000 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
13002 * object.c: When allocating an array, we have to throw
13003 an overflow exception if any of the lengths are < 0.
13005 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
13007 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
13008 properly. Also move implementation of string array marshalling to
13009 managed code. Fixes #42316.
13011 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13013 * assembly.c: provide more information when loading an assembly fails.
13015 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13017 * filewatcher.c: don't expect the development fam package to be
13020 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
13022 * marshal.c: Make a copy of the signature cookie since it will be
13023 freed by the caller.
13025 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
13027 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
13029 * metadata.c (mono_metadata_free_marshal_spec): New function to free
13032 * marshal.c: More refactoring.
13034 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
13037 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
13039 * object.c: In mono_message_invoke, fill the output parameter array after
13040 calling the managed method (it was done before the call). This fixes
13043 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
13045 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
13048 2004-09-02 Martin Baulig <martin@ximian.com>
13050 * class.c (mono_class_instance_size): Don't allow generic type
13051 definitions or open generic instances.
13052 (mono_class_array_element_size): If we're a value type, call
13053 mono_class_instance_size() on the original class.
13055 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
13056 handle generic instances.
13058 * mono-debug-debugger.c (write_type): Handle generic instances
13061 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
13063 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
13064 the allocation request fails. Fixes #65089.
13066 * object.c (mono_runtime_free_method): Do not call mono_free_method.
13068 * object.c (mono_runtime_free_method): New function to free a dynamic
13071 * marshal.c (mono_delegate_free_ftnptr): New function to free the
13072 delegate trampoline.
13074 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
13075 with hasthis as dynamic,
13077 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
13079 * domain.c (mono_jit_info_table_remove): New function to remove an
13080 entry from the jit info table.
13082 * class-internals.h (MonoMethod): Add 'dynamic' field.
13084 * loader.c: Fix warnings.
13086 2004-09-01 Martin Baulig <martin@ximian.com>
13088 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
13089 instead of mono_debugger_lock() because the latter one is a no-op
13090 unless running in the debugger.
13092 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
13094 * class.c (class_compute_field_layout): Classes with auto-layout or
13095 reference fields are not blittable.
13097 2004-09-01 Dick Porter <dick@ximian.com>
13099 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
13100 mono_image_get_filename() to get the assembly location.
13103 * metadata.h: Fix compile warnings
13105 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
13107 * class.c (class_compute_field_layout): System.Object is blittable.
13109 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
13110 as in/out. Fixes #59909.
13112 2004-09-01 Martin Baulig <martin@ximian.com>
13114 * metadata.h (MONO_TYPE_ISREFERENCE): Call
13115 mono_metadata_generic_inst_is_valuetype() if we're a generic
13116 instance to check whether our underlying type is a reference type.
13118 2004-09-01 Martin Baulig <martin@ximian.com>
13120 * metadata.c (mono_type_size): If we're a generic instance, call
13121 mono_class_value_size() for value types.
13123 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
13125 * marshal.c: Implement more custom marshalling functionality. Fixes
13128 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13130 * mono-debug.c, debug-mono-symfile.c: add some locking love.
13132 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
13134 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
13136 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
13138 * icall.c: Fix some warnings.
13140 * threads.c (abort_appdomain_thread): Fix unref errors.
13141 (mono_thread_current): Fix THREAD_DEBUG define.
13143 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
13145 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
13147 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
13149 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
13151 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
13154 2004-08-28 Martin Baulig <martin@ximian.com>
13157 (mono_metadata_generic_inst_is_valuetype): New public function.
13159 * metadata.h (MONO_TYPE_ISSTRUCT): Call
13160 mono_metadata_generic_inst_is_valuetype() if we're a generic
13161 instance to check whether our underlying type is a valuetype.
13163 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
13165 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
13168 2004-08-25 Martin Baulig <martin@ximian.com>
13170 * loader.c (mono_get_method_from_token): Abstract methods can also
13171 be generic and thus have type parameters.
13173 * metadata-internals.h
13174 (MonoDynamicImage): Added `GPtrArray *gen_params'.
13176 * reflection.c (mono_image_get_generic_param_info): Don't create a
13177 metadata row, just add an entry to the `gen_params' array.
13178 (build_compressed_metadata): Sort the `gen_params' array and then
13179 actually create the metadata.
13181 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13183 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
13185 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
13187 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
13189 2004-08-24 Martin Baulig <martin@ximian.com>
13191 * class.cs (mono_class_is_subclass_of): Like an interface, a
13192 generic instance also derives from System.Object.
13194 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
13196 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
13197 custom modifiers to be in any order. Fixes #61990.
13199 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
13201 * object.c: Register mono_object_new_fast icall.
13203 * object.c (mono_class_get_allocation_ftn): Return to calling
13204 mono_object_new_fast, since it seems faster to compute the object
13205 size in unmanaged code than passing it as a parameter.
13207 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
13209 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
13210 this function with Boehm as the oom handler, so we don't have to check
13211 the result of GC_malloc.
13213 * object.c: Remove checks for oom.
13215 * object.h object.c (mono_class_get_allocation_ftn): New function to
13216 return the icall which can be used to allocate an instance of a given
13219 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
13221 * class-internals.h: Add 'enabled' field.
13223 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
13225 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
13227 2004-08-18 Jambunathan K <kjambunathan@novell.com>
13228 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
13231 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
13233 * appdomain.c: use the Tls function for appdomain too,
13234 at Zoltan's request. Actually return in mono_context_get
13236 * appdomain.c, profiler.c, threads.c: use __thread
13238 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
13240 * appdomain.c threads.c: Call GC_CreateThread on windows.
13242 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
13243 multiple libraries since this don't work on windows.
13245 2004-08-18 Martin Baulig <martin@ximian.com>
13247 * class-internals.h
13248 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
13251 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
13252 MonoMethodNormal since we also need it for abstract and interface
13256 (build_compressed_metadata): Sort the GenericParam table.
13257 (mono_image_create_token): Added `gboolean create_methodspec'
13258 argument; this is false when generating a MethodImpl token.
13259 (reflection_methodbuilder_to_mono_method): Abstract and interface
13260 methods may also have generic parameters.
13262 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
13264 * appdomain.c: thread local alloc
13266 2004-08-17 Martin Baulig <martin@ximian.com>
13268 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
13271 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
13274 * class.c (mono_type_get_full_name): New public function.
13275 (mono_type_get_name): Don't include the type arguments.
13277 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
13279 * Makefile.am: Build static versions of libmetadata and libmonoruntime
13280 for inclusion into the mono executable.
13282 2004-08-16 Martin Baulig <martin@ximian.com>
13284 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
13285 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
13287 2004-08-14 Martin Baulig <martin@ximian.com>
13289 * class.c (dup_type): Also copy the `byref' field.
13291 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
13293 * reflection.c (create_dynamic_mono_image): Revert the last change
13294 since it breaks bootstrap.
13296 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13298 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
13300 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
13301 not free them with g_free.
13303 2004-08-11 Martin Baulig <martin@ximian.com>
13305 * reflection.c (mono_reflection_setup_internal_class): Also call
13306 mono_class_setup_mono_type() if we already have a `tb->type.type'.
13308 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
13310 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
13311 called during default (first) AppDomain creation. Keep track of
13312 Evidence when loading assemblies.
13314 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13316 * opcodes.c, opcodes.h: reduce runtime relocations.
13318 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13320 * culture-info.h, locales.c: fixes and chages to sue the new
13321 optimized format of the locale data.
13322 * culture-info-tables.h: regenerated.
13324 2004-08-06 Geoff Norton <gnorton@customerdna.com>
13326 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
13328 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
13330 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
13331 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
13332 * domain-internals.h: icall declaration.
13333 * icall.c: icall registration.
13334 * object-internals.h: New fields in MonoAssembly for CAS.
13336 2004-08-05 Duncan Mak <duncan@ximian.com>
13338 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13341 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13343 * reflection.c: fix to deal with object[] arrays in custom ctors
13346 2004-08-05 Martin Baulig <martin@ximian.com>
13348 * class.c (mono_class_array_element_size): Added support for
13349 generic instances and correctly handle "recursive" types.
13351 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13353 * assembly.c: Fix warnings.
13355 2004-08-04 Martin Baulig <martin@ximian.com>
13358 (mono_type_get_name_recurse): Added `gboolean include_arity'
13359 argument specifying whether or not we should include the generic
13360 arity in the type name.
13361 (_mono_type_get_name): New static function.
13362 (mono_class_setup_vtable): If we're a generic instance, don't
13363 include the generic arity in the names of explicit method
13366 2004-08-03 Martin Baulig <martin@ximian.com>
13368 * class.c (mono_type_get_name_recurse): Enclose the generic type
13369 arguments in `<', '>'.
13371 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13373 * gc.c: make GC warning messages use the trace API, they are just
13374 noise to most of the users.
13376 2004-08-03 Martin Baulig <martin@ximian.com>
13378 * debug-mono-symfile.c (read_string): Correctly read the string.
13380 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13382 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
13384 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
13386 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
13388 2004-07-30 Martin Baulig <martin@ximian.com>
13390 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
13391 Reflect latest symbol writer changes.
13393 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13395 * object.c: always create an object if null is passed
13396 to Invoke() where a valuetype is expected.
13398 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
13400 * marshal.c (mono_marshal_init): make managed
13401 signatures match native ones better for 64bits.
13403 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13405 * appdomain.c: hack to build correctly the private bin path on windows.
13408 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
13410 * assembly.c: Load mscorlib from the correct framework directory
13411 (mono/<version>/mscorlib.dll).
13412 * appdomain.h: Added prototypes for new functions.
13413 * internals.h: Added some prototypes.
13414 * domain.c: When initializing the runtime, get from the executable and
13415 the configuration files the runtime version that the app supports.
13416 Added support methods for reading app.exe.config. Added list of versions
13417 supported by the JIT. Added two new methods: mono_init_from_assembly,
13418 which initializes the runtime and determines the required version from
13419 the provided exe file, and mono_init_version, which initializes
13420 the runtime using the provided version.
13421 * icall.c: Get machine.config from version-specific directory.
13422 * reflection.c: When generating an image, embed the version number
13423 of the current runtime.
13425 2004-07-28 Dick Porter <dick@ximian.com>
13428 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
13429 returned sockaddr size before creating the remote address object.
13430 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
13433 2004-07-28 Dick Porter <dick@ximian.com>
13435 * locales.c (string_invariant_compare_char): Fix invariant char
13436 compares between upper and lower cases. Fixes bug 61458.
13438 2004-07-27 Ben Maurer <bmaurer@ximain.com>
13440 * marshal.c: actually cache stelem.ref wrappers.
13442 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13444 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
13445 sections and remove the mono_cli_rva_map () function.
13447 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13449 * debug-mono-symfile.c: fix one more endianess issue, from a patch
13450 by Geoff Norton (<gnorton@customerdna.com>).
13452 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13454 * class.c: fix class loads for pointer types (typeof(int) !=
13457 2004-07-27 Martin Baulig <martin@ximian.com>
13459 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
13460 reading the debugging information from an external ".mdb" file.
13462 2004-07-24 Martin Baulig <martin@ximian.com>
13464 * reflection.c (mono_image_get_type_info): Only write a class
13465 layout entry if we actually have a size or a packing size.
13467 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
13469 * reflection.c (type_get_fully_qualified_name):
13470 insert cast to get type checking of ?: with non-gcc compilers
13472 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
13474 * rand.c: use g_getenv for both lookups of
13477 2004-07-17 Martin Baulig <martin@ximian.com>
13479 * reflection.c (mono_reflection_bind_generic_method_parameters):
13480 Set `gmethod->reflection_info'.
13482 2004-07-17 Martin Baulig <martin@ximian.com>
13484 * class.c (mono_class_create_from_typedef): Insert the newly
13485 created class into the hash table before computing the interfaces
13486 since we could be called recursively.
13488 2004-07-16 Ben Maurer <bmaurer@ximain.com>
13490 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
13491 function to implement stelem.ref in managed code
13492 * class-internals.h, debug-helpers.c: a new wrapper type
13495 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13497 * gc.c: allow GC handles to work even when no GC is compiled in.
13498 Fix part of bug #61134 (GetAddrOfPinnedObject).
13500 2004-07-13 Peter Williams <peter@newton.cx>
13502 * process.c (complete_path): Make sure we don't attempt to execute
13505 2004-07-12 Geoff Norton <gnorton@customerdna.com>
13507 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
13508 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
13509 and will add/subtract the hour if needed
13511 2004-07-12 Martin Baulig <martin@ximian.com>
13513 * reflection.c (mono_field_get_object): If we have
13514 `field->generic_info', take the attributes from
13515 `field->generic_info->generic_type'.
13517 2004-07-12 Martin Baulig <martin@ximian.com>
13519 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
13520 This function must be called before initializing the runtime.
13521 (mono_debug_init_1): New function; call this after initializing
13522 the runtime, but before loading the assembly. It tells the
13523 debugger to load corlib and the builtin types.
13525 * mono-debug-debugger.c: Did some larger changes in the debugging
13526 code; support recursive class declarations, make sure we actually
13529 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13531 * debug-helpers.c: undo my previous patch and fixed the real issue in
13532 ../mini/exceptions-x86.c
13534 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13536 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
13537 when no HOME env. variable was set and a NullRef was thrown in a .cctor
13538 called from other .cctors.
13540 2004-07-09 Miguel de Icaza <miguel@ximian.com>
13542 * loader.c: Removed the mono_loader_wine_init hack now that we are
13543 doing a managed version of Windows.Forms.
13545 2004-07-09 Ben Maurer <bmaurer@ximian.com>
13547 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
13548 threadpool.c, threads.c: remove static data from rootset.
13550 2004-07-09 Dick Porter <dick@ximian.com>
13552 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
13553 Don't do any more processing if the matched length was 0. It was
13554 increasing the size of the string before. Fixes bug 61167.
13556 2004-07-09 Dick Porter <dick@ximian.com>
13560 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13561 Add support for SO_PEERCRED if its available.
13563 2004-07-09 Peter Bartok <pbartok@novell.com>
13564 * loader.c: winelib.exe.so error message is now only displayed if
13565 MONO_DEBUG is set. To help us avoid questions when people are trying
13566 out the new Managed.Windows.Forms.
13568 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
13570 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
13571 for isinst and castclass wrappers.
13573 * class-internals.h icall.c: Move registration and lookup of JIT icalls
13574 to libmetadata from the JIT, so they could be used by the marshalling
13575 code and the interpreter.
13577 * marshal.c: Register marshalling related JIT icalls here instead of
13578 in mini.c. Use CEE_MONO_ICALL instead of the family of
13579 CEE_MONO_PROC<x> opcodes to call marshalling functions.
13581 * metadata.h: Remove unneeded marshalling conversions.
13583 * opcodes.c: Update for new opcodes.
13585 2004-07-08 Martin Baulig <martin@ximian.com>
13587 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
13588 (mono_debug_get_domain_data): Make this function static.
13590 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13592 * gc.c, object.h: add nice GC handle API for embedders.
13594 2004-07-06 Ben Maurer <bmaurer@ximian.com>
13596 * reflection.c: more changes for the new api
13598 * object.c: When we reflect on a field w/ a constant value, it
13599 will not have a memory location, so we must access metadata. Also,
13600 allow easier reading of strings so that we can read them from
13603 * class.c (mono_class_layout_fields): no need for literal fields here.
13605 * class-internals.h: api changes for const fields
13607 * icall.c (ves_icall_get_enum_info): use new apis for const fields
13609 2004-07-06 Martin Baulig <martin@ximian.com>
13611 * mono-debug.h: Increment version number to 44.
13613 * mono-debug.c (mono_debug_add_wrapper): The second argument is
13614 now a gpointer, rewrote this whole method.
13616 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
13617 function. Add information about the wrapper in a new "misc table".
13619 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
13620 for the new misc table.
13622 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
13624 * metadata-internals.h image.c: Add a cache for helper signatures.
13626 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
13628 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
13630 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
13631 delegates from a delegate. Fixes #61033.
13633 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
13634 marshalling of stringbuilder arrays. Fixes #59900.
13636 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
13638 * icall.c: Add EnumBuilder:setup_enum_type icall.
13640 2004-06-30 Ben Maurer <bmaurer@ximian.com>
13642 * icall.c: Added a new icall for the property version of
13643 OffsetOfStringData.
13645 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
13647 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
13648 it has a constant size across platforms.
13650 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
13653 2004-06-29 Martin Baulig <martin@ximian.com>
13655 * mono-debug.c (mono_debug_add_method): Protect the whole function
13656 in mono_debugger_lock(), not just parts of it.
13658 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13660 * reflection.c: make sure padding bytes in heaps are zeroed.
13662 2004-06-24 David Waite <mass@akuma.org>
13664 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
13665 image.c, loader.c, locales.c, marshal.c, metadata.c,
13666 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
13667 string-icalls.c, threads.c: change to C90-style comments from C99 /
13670 2004-06-24 Dick Porter <dick@ximian.com>
13673 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
13674 return createdNew. Fixes bug 60412.
13677 * icall.c: Add createdNew parameter to CreateMutex icall
13679 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13681 * reflection.c, object-internals.h: save default value in params.
13683 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13685 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
13686 no need to build a new path combining that with the application base.
13689 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13691 * reflection.c: fixed minor standard compliance issues.
13693 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13695 * reflection.c: fixed issue with encoding some custom attributes
13696 (arrays in properties and fields, bug #60411).
13698 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13700 * reflection.c: fix start address when copying the public key token.
13702 2004-06-23 Martin Baulig <martin@ximian.com>
13704 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
13705 the `exc' object in a static object to put it into the GC's root set.
13707 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13709 * reflection.c: make mono_reflection_setup_internal_class ()
13710 callable a second time to setup a new parent class.
13712 2004-06-23 Dick Porter <dick@ximian.com>
13714 * threads.c: Check for WAIT_IO_COMPLETION return values.
13716 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
13718 * appdomain.c: Removed the g_free on the public key token. Now copy
13719 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
13720 * assembly.c: Added public key token string value when loading
13721 assemblies. Fix bug #60439.
13722 * icall.c: Added missing informations (like public key) in
13723 GetReferencedAssemblies. Fix #60519.
13724 * image.h: Changed definition for public key token from const char*
13725 public_tok_value to guchar public_key_token [17];
13726 * reflection.c: Updated for changes to public key token.
13728 2004-06-22 Lluis Sanchez Gual
13730 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
13731 for the field in base classes.
13733 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13735 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
13736 mark headers as not supported, they are installed only for use by the
13739 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
13741 * *.c, *.h: avoid namespace pollution in public headers.
13743 2004-06-21 Martin Baulig <martin@ximian.com>
13745 * exception.c (mono_get_exception_security): It's in
13746 "System.Security", not in "System".
13748 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
13749 the exception classes.
13751 2004-06-21 Martin Baulig <martin@ximian.com>
13753 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
13754 Protect the exception object from being finalized.
13756 2004-06-21 Martin Baulig <martin@ximian.com>
13758 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
13761 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
13763 * reflection.c: Load the assembly in mono_reflection_type_from_name,
13764 if it was not loaded before. Fix parts of #60439.
13766 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
13768 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
13769 code that was broken since Ben's change: wrappers are now
13770 dependent on the method signature only again.
13772 2004-06-21 Martin Baulig <martin@ximian.com>
13774 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
13775 added interface support.
13777 2004-06-21 Martin Baulig <martin@ximian.com>
13779 * class.c (mono_vtable_get_static_field_data): New public method.
13781 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
13783 * filewatcher.c : Windows build fix to be compliant with API changes.
13785 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13787 * class.h, class.c: more accessors.
13788 * metadata.h, metadata.c: prepare for hiding MonoType and
13789 MonoMethodSignature: people should use the accessors from now on
13790 outside of the tree.
13792 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13794 * *.c, *.h: more API cleanups.
13796 2004-06-18 Jackson Harper <jackson@ximian.com>
13798 * assembly.c: Trace loading assemblies.
13799 * loader.c: Trace loading native libraries.
13800 * mono-config.c: Trace loading config files.
13802 2004-06-18 Dick Porter <dick@ximian.com>
13804 * locales.c: Tell ICU the lengths of strings, it can cope with
13805 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
13807 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13809 * image.c: swapped name/filename;
13811 2004-06-18 Martin Baulig <martin@ximian.com>
13813 * mono-debug-debugger.c (write_class): Write the parent class at
13814 the end of the header.
13816 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13818 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
13820 2004-06-17 Raja R Harinath <rharinath@novell.com>
13822 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
13823 (bundle_obj): New conditional define.
13824 (BUILT_SOURCES): Remove.
13825 ($(bundle_srcs)): Make parallel-make safe.
13826 (libmonoruntime_la_LIBADD): Make unconditional.
13827 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
13828 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
13830 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
13832 * culture-info-tables.h: It was inconsistent with the latest
13835 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
13837 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
13840 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
13843 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13845 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
13846 cleaned up public header threads.h.
13848 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13850 * Makefile.am, *.c, *.h: more API cleanups.
13852 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13854 * Makefile.am: removed monosn from compilation.
13855 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
13856 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
13857 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
13858 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
13859 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
13860 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
13862 2004-06-15 Jackson Harper <jackson@ximian.com>
13864 * assembly.c: Make locales lower case when searching the GAC for
13865 assemblies. gacutil will always make locales lowercase when
13866 installing so this effectively makes them case insensitive.
13868 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
13870 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
13871 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
13872 parameter which allows to choose whether the wait can be interrupted or
13873 not. Also added the method mono_monitor_enter(), which locks the monitor
13874 using an infinite wait and without allowing interruption.
13875 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
13877 * object.h: Added new fields in MonoThread. suspend_event holds the event
13878 used to susped/resume the thread. synch_lock is the lock object to use for
13879 modifying the thread state.
13880 * threads.c: Use the new synch_lock object for locking, instead of "this",
13881 which can generate deadlocks.
13882 Moved thread state change in Thread.Sleep and Thread.Join from managed
13883 to unmanaged code. This avoids a deadlock when the thread was suspended
13884 just after acquiring the thread lock.
13885 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
13886 Implemented Thread.Suspend using an event instead of ThreadSuspend,
13887 which is not fully implemented in the io-layer.
13888 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
13890 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
13892 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
13893 threads-types.h: more API cleanups.
13895 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13897 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
13898 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
13899 threadpool.c, threads.c: first pass at the exported API cleanup.
13901 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13903 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
13905 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13907 * icall.c: added internalGetHome.
13909 2004-06-14 Dick Porter <dick@ximian.com>
13911 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
13912 possible to return successfully when '.' or '..' were the only
13913 entries in a directory, but were skipped. The MonoIOStat was not
13914 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
13917 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13919 * reflection.c: make binaries run on .Net 1.1 by default.
13921 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13923 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
13925 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
13927 * marshal.c: keep track of struct size with explicit layout
13930 2004-06-12 Martin Baulig <martin@ximian.com>
13932 * mono-debug-debugger.c: Comment out a debugging g_message().
13934 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13936 * reflection.c, reflection.h: do not free custom attrs that are cached.
13937 * icall.c: use braces to make code clearer.
13939 2004-06-11 Martin Baulig <martin@ximian.com>
13941 * class.h (MonoInflatedField): New type.
13942 (MonoClassField): Replaced `MonoType *generic_type' with
13943 `MonoInflatedField *generic_info'.
13946 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
13948 2004-06-11 Martin Baulig <martin@ximian.com>
13950 * reflection.c (mono_image_create_method_token): Correctly encode
13953 2004-06-11 Martin Baulig <martin@ximian.com>
13955 * metadata.c (mono_metadata_parse_method_signature): When parsing
13956 a MethodDef which has VarArgs, also set sentinelpos if we don't
13957 have any parameters.
13959 2004-06-11 Martin Baulig <martin@ximian.com>
13961 * verify.c (mono_method_verify): In CEE_CALL, use
13962 mono_method_get_signature() to get the method's signature, unless
13963 we're a PInvoke method.
13965 2004-06-10 Jackson Harper <jackson@ximian.com>
13967 * assembly.c: Use <path>/lib/mono/gac for the extra paths
13968 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
13969 logical name as the supplied path is just a prefix to the gac not
13970 the direct path to it.
13972 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
13974 * reflection.c: make the token for a created method match
13975 the token of the MethodBuilder it was created from
13976 (IKVM requires this behaviour now).
13978 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
13980 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
13981 reflection.c, socket-io.c: leak fixes.
13983 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13985 * icall.c: handle sentinel pos in vararg methods in position different
13988 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13990 * culture-info-tables.h: freshly generated.
13992 2004-06-09 Martin Baulig <martin@ximian.com>
13994 * loader.c (mono_get_method_constrained): Call `mono_class_init
13995 (constrained_class)'.
13997 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
13999 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
14000 any methods. Fixes #59629.
14002 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
14004 * culture-info-tables.h: reflecting locale-builder updates.
14006 2004-06-08 Dick Porter <dick@ximian.com>
14009 * locales.c: Fixed compile warnings, including a real bug in
14010 CompareInfo_internal_compare.
14012 2004-06-08 Dick Porter <dick@ximian.com>
14015 (ves_icall_System_Globalization_CompareInfo_internal_index):
14016 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
14017 Double-check the resuls of usearches, because ICU currently
14018 ignores most of the collator settings here. Fixes bug 59720.
14020 2004-06-08 Dick Porter <dick@ximian.com>
14023 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
14024 Fix memory leak and segfault-causing typo. No idea how this one
14025 lasted so long without being noticed.
14027 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
14029 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
14030 any methods. Fixes #59629.
14032 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14035 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
14036 own the critical section before). Removed dead code (that's done
14037 in the preload hook).
14039 (mono_assembly_load_with_partial_name): call the preload hook.
14041 2004-06-08 Martin Baulig <martin@ximian.com>
14043 * metadata.c (mono_metadata_signature_alloc): Default
14044 `sentinelpos' to -1.
14046 * reflection.c (mono_image_get_array_token): Likewise.
14048 2004-06-08 Martin Baulig <martin@ximian.com>
14050 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
14052 * metadata.c (mono_metadata_parse_method_signature): When parsing
14053 a MethodDef which has VarArgs, set sentinelpos.
14055 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
14056 `gint16' since we're using -1 for non-varargs methods.
14059 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
14060 (method_encode_signature): Added varargs support.
14061 (method_builder_encode_signature): Likewise.
14062 (mono_image_get_varargs_method_token): New static method.
14063 (mono_image_create_method_token): New public method; this is
14064 called via an icall instead of mono_image_create_token() when
14065 calling a varargs method.
14067 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
14069 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
14071 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
14073 * culture-info-tables.h : Reflecting the latest locale-builder that
14074 fixed empty array representation ({} to {0}).
14076 2004-06-07 Jackson Harper <jackson@ximian.com>
14078 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
14079 looking up extra gac paths. This allows MONO_GAC_PATH to act
14080 exactly like a prefix.
14082 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
14084 * reflection.c (mono_reflection_type_from_name): Make a copy of the
14085 type name before modifying it. Fixes #59405.
14087 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
14089 * culture-info.h: added fields for "all datetime patterns".
14090 * locales.c: ( ves_icall_System_Globalization_CultureInfo
14091 _construct_datetime_format ()): fill xxx_patterns fields.
14092 * object.h: added fields for "all datetime patterns" to
14093 MonoDateTimeFormatInfo.
14094 * culture-info-tables.h: reflecting locale-builder updates.
14096 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
14098 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
14099 the event has no add and remove methods. Fixes #59629.
14101 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
14103 * object.c: Fixed possible integer overflow when allocating large
14106 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
14108 * culture-info-tables.h: reflecting locale-builder updates.
14110 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
14112 * culture-info-tables.h: reflecting locale-builder updates.
14114 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
14116 * culture-info-tables.h: reflecting locale-builder updates.
14118 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
14120 * threads.c: Made Thread.Sleep abortable.
14122 2004-06-02 Martin Baulig <martin@ximian.com>
14124 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
14126 * debug-mono-symfile.h: Bumped symbol file version number to 37.
14128 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
14130 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
14132 2004-05-30 Jackson Harper <jackson@ximian.com>
14134 * reflection.c: Do not hardcode assembly versions or public key
14135 tokens anymore. All of this except the corlib section was dead
14138 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
14140 * object.c (mono_runtime_invoke_array): Automatically create boxed
14141 objects for byref valuetypes if needed. Fixes #59300.
14143 * object.c (mono_method_return_message_restore): Handle
14144 MONO_TYPE_OBJECT as well.
14146 2004-05-28 Jackson Harper <jackson@ximian.com>
14148 * reflection.c: The modified type encoding was causing build
14149 problems. Reverted for now.
14151 2004-05-28 Jackson Harper <jackson@ximian.com>
14153 * reflection.c/h: Take an assembly ref so that we dont create
14154 fully qualified names when encoding types in the same assembly as
14155 the custom attribute being emitted.
14156 * appdomain.c: Increment version number.
14158 2004-05-26 Duncan Mak <duncan@ximian.com>
14161 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14162 Set the full version number (major, minor, build, revision).
14164 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
14166 * marshal.c (emit_struct_conv): increment src/dst after blit
14167 (mono_marshal_get_managed_wrapper,
14168 mono_marshal_get_native_wrapper): make sure we have marshalling
14169 info before marshalling params (info computation affects
14172 * class.c (class_compute_field_layout): correctly deal with
14174 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
14175 value types (as per what windows dows by default)
14176 (mono_class_setup_mono_type): System.ValueType is blittable
14177 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
14180 * marshal.c (mono_marshal_load_type_info): flag types as
14181 non-blittable if the native layout doesn't match the managed
14184 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14186 * appdomain.c: don't add stuff in the private search path that is
14187 above the application base. If application base is not set, there's
14188 no private search path.
14190 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
14192 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
14193 byref struct arguments in native->managed marshalling.
14195 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
14197 * marshal.c (mono_marshal_get_runtime_invoke): correctly
14198 cache methods using signature (special case for methods
14199 that are value type or string class)
14201 * image.c (mono_image_close): clean up allocated GSList's
14202 in runtime_invoke_cache.
14204 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14206 * mono-config.c: set the correct path for mono_cfg_dir on windows when
14207 there's no MONO_CFG_DIR environment variable defined.
14209 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14211 * threads.c: windows version must be >= 0x0500 to include OpenThread.
14213 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
14215 * threadpool.c: Really wait for 500ms after the async call, even if the wait
14217 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
14218 before waiting for it, and call CloseHandle after the wait to unref it.
14219 This will make sure that handles are not disposed too early.
14221 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14226 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
14229 * object.c: se the application_base only for the domain that runs
14230 Main. Fixes bug #59216,
14232 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14235 * object.c: only the domain in which Main is run have
14236 SetupInformation.ConfigurationFile set, so moved a few lines from
14237 appdomain.c to object.c.
14239 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14241 * appdomain.c: we tried to load [name].(dll|exe), but according
14242 to bug #57710, we must also try [culture]/[name].(dll|exe) and
14243 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
14244 There's a test case attached to bug #58922.
14246 2004-05-27 Dick Porter <dick@ximian.com>
14249 * file-io.c: Implemented icalls for locking and unlocking regions
14251 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
14252 FALSE on error (fixes both compiler warning and real bug.)
14254 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
14256 * culture-info-tables.h: reflecting locale-builder updates.
14258 (Added missing ChangeLog entry for 05/26)
14260 2004-05-27 Jackson Harper <jackson@ximian.com>
14262 * locales.c: Fix some cut and paste errors.
14264 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14266 * mono-config.c: set the correct path for config. directory on windows.
14268 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
14270 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
14273 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14275 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
14276 from pinvoke functions.
14278 * marshal.c (mono_ftnptr_to_delegate): Implement this.
14280 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
14282 * culture-info-tables.h: reflecting locale-builder updates.
14284 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
14286 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
14289 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
14291 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
14292 * icall.c: Modified icalls for RNG.
14293 * rand.c|h: Changed RNG interface to allow thread-safe usage under
14294 Windows (CryptoAPI).
14296 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
14298 * locales.c: Fix build.
14300 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
14302 * culture-info-tables.h: reflecting locale-builder updates.
14304 2004-05-25 Jackson Harper <jackson@ximian.com>
14306 * locales.c: When creating the current culture use the $LANGs
14307 specific culture. So DateTimeFormat and NumberFormat entries are created.
14309 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
14311 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
14312 a char array as parameter.
14314 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
14316 * image.c: In mono_image_open(), always use an absolute path name to
14317 look for already loaded images.
14319 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
14321 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
14322 missing in the windows build (like older cygwin include files).
14324 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
14326 * icall.c: Fixed check for possible integer overflow in Buffer_
14327 BlockCopy icall. Replaced comments style // by /* */.
14329 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
14331 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
14333 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
14334 check after MONO_VTADDR. Fixes pinvoke2.exe.
14336 * marshal.h marshal.c metadata.h: Add beginnings of support for
14337 ftnptr -> delegate marshalling.
14339 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
14341 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
14342 * threads.c: Fix warnings.
14344 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
14346 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
14347 * icall.c: Registered icalls for Suspend and Resume.
14348 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
14350 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
14351 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
14352 * process.c: Use WaitForSingleObjectEx.
14353 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
14355 * threads.c, threads.h: Make use of new Ex wait methods. Improved
14356 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
14357 for Suspend and Resume. Added new mono_thread_stop, used for stoping
14358 background threads. Added basic support for Abort in Windows.
14359 Start new threads using a managed delegate invoke wrapper. This wrapper
14360 has an interruption checkpoint that is needed since an interruption
14361 can be requested before the thread leaves the unmanaged code that starts
14363 * marshal.c: Added interruption checkpoint after every native call, and
14364 also before managed calls for wrappers called from unmanaged code to
14365 go into managed code.
14366 * object.h: Added new field in MonoThread to keep track of interruption
14369 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
14371 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
14374 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14381 * rand.c: getenv -> g_getenv (windows!)
14383 * process.c: complete_path is also used on non-windows platforms.
14385 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14387 * icall.c: new signature for Process_Start.
14389 * process.[ch]: new signature for Process_Start. If we're on windows
14390 and UseShellExecute is false, we have to search for the program by
14391 ourselves if we don't get a full path.
14393 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
14395 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
14396 marshalling and call CleanUpNativeData if needed. Fixes #58646.
14398 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14400 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
14403 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14405 * process.c: use double quotes to quote program name and arguments on
14406 windows. Fixes bug #58575.
14408 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14410 * file-io.c: don't return "." and ".." when using windows Find*File.
14412 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
14414 * marshal.c: Don't pass wrappers to message init because method
14415 addressed used to lookup metadata. part of remoting[2|3] fix.
14417 2004-05-15 Jackson Harper <jackson@ximian.com>
14419 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
14420 path is essentially the same as MONO_PATH except that it points to
14421 GACs instead of lib directories.
14422 * loader.h: The user gac is gone so we dont need function to
14424 * mono-config.c: user gac option is now gone.
14426 2004-05-15 Jackson Harper <jackson@ximian.com>
14428 * culture-info.h: Make defines more consistent, add calendar data
14429 to the culture info table.
14430 * culture-info-tables.h: Add basic calendar data. Basically
14431 everyone gets default gregorian until all the data is
14433 * locales.c: Use the new consistent defines. Set calendar data for
14434 culture info objects.
14435 * object.h: add a field for calendar data to CultureInfo
14437 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
14439 * image.c: image->runtime_invoke_cache is keyed on signatures now.
14440 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
14442 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
14443 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
14444 an extra param that is the pointer of the method to invoke. The IL for
14445 the invoke method is no longer specific to the method, but to the
14446 signature of the method. Thus, we can share the same code for multiple
14447 methods. This reduces the number of methods that have to be compiled.
14449 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
14451 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
14453 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14455 * icall.c: Optimize Buffer.BlockCopy.
14457 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14459 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
14460 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
14461 quote). Changed them to "MMMM yyyy".
14463 2004-05-12 Miguel de Icaza <miguel@ximian.com>
14466 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
14468 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
14470 * reflection.h: Updated after changes to managed structures.
14472 * appdomain.c: Bump corlib version.
14474 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14476 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
14479 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14481 * Makefile.am: link to ../os/libmonoos.la on windows.
14484 -If MONO_DEBUG, warn about non-existing directories in
14486 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
14487 compile time variable.
14488 -Removed init_default_path and call mono_set_rootdir from
14489 libmonoos.a instead (windows only).
14491 * assembly.h: declare mono_assembly_getrootdir().
14494 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
14496 * loader.c: s/getenv/g_getenv/
14498 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
14500 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
14502 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
14504 * metadata.h: Add new marshalling conversions.
14506 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
14509 * reflection.c (mono_reflection_get_type): Lookup the type in all
14510 modules of a multi-module assembly. Fixes #58291.
14512 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
14514 * threads.c: Before aborting a background, set the StopRequested
14515 state. This avoids throwing the Abort exception.
14516 In mono_thread_manage, don't continue with the shutdown until all
14517 aborted threads have actually stopped.
14519 2004-05-10 Jackson Harper <jackson@ximian.com>
14521 * locales.c: Remove the modifier from culture names.
14523 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14525 * Makefile.am: monosn is not installed any more. It has been deprecated
14528 2004-05-07 Jackson Harper <jackson@ximian.com>
14531 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
14532 Fix array construction, add bailout if the length is 0.
14534 2004-05-07 Dick Porter <dick@ximian.com>
14536 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
14537 machine doesn't have a DNS entry. Patch by Urs Muff
14538 (umuff@quark.com), fixes bug 57928.
14540 2004-05-06 Jackson Harper <jackson@ximian.com>
14542 * reflection.c: Handle null PublicTokens properly. alloc mem for
14543 assembly names culture so we dont crash when freeing it.
14545 2004-05-06 Jackson Harper <jackson@ximian.com>
14547 * assembly.c: Check the usergac when loading with partial names.
14549 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
14551 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
14552 does nothing for now (not required for Linux/Windows) but the class
14553 library can call it (and a newer or modified runtime could need it).
14554 * icall.c: Registred icall.
14556 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14558 * loader.c: prints a message on module loading error we set MONO_DEBUG
14559 environment variable.
14561 2004-05-05 Jackson Harper <jackson@ximian.com>
14563 * appdomain.c: Handle PublicKeyToken=null properly.
14565 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
14567 * environment.c|h: Added icall ves_icall_System_Environment_
14568 GetOSVersionString to get the current OS version as a string.
14569 * icall.c: Registred icall.
14571 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
14573 * object.c: in mono_object_get_virtual_method(), take into account that
14574 non-virtual methods don't have a slot in the vtable. Check needed when
14575 the object is a proxy.
14577 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
14579 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
14580 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
14582 * object.c (mono_class_compute_gc_descriptor): Fix warning.
14584 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
14585 passed when a valuetype is expected.
14587 * object.c (mono_unhandled_exception): Only set the exit code if the
14588 exception happens in the main thread. Fixes thread5.exe.
14590 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
14591 invalid names. Fixes #58047.
14593 2004-05-03 Jackson Harper <jackson@ximian.com>
14595 * assembly.c: This line was committed accidently and is unneeded.
14597 2004-05-03 Jackson Harper <jackson@ximian.com>
14599 * icall.c: Add new icall for Assembly::LoadWithPartialName
14600 * assembly.c/.h: new function that probes the GAC to load partial
14601 assembly names by Paolo Molaro.
14603 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14605 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
14606 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
14607 (type_get_fully_qualified_name): Added PublicKeyToken when building a
14610 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14612 * appdomain.c: fixed check for 'neutral' culture and removed warning.
14613 * reflection.c: fix bug when parsing a full type name and Version is not
14614 the last thing in the string.
14616 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
14618 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
14619 crashes when it is freed.
14621 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14623 * assembly.c: print the compat warning to stderr.
14625 2004-05-01 Miguel de Icaza <miguel@ximian.com>
14627 * assembly.c (mono_assembly_load_references): Add a compatibility
14628 hack to run old applications that might be still referencing the
14629 3300-based assemblies, only do this for System.xxx.
14631 2004-05-01 Jackson Harper <jackson@ximian.com>
14633 * appdomain.c: If the culture is neutral we set it to "".
14635 2004-04-29 Jackson Harper <jackson@ximian.com>
14637 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
14639 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
14641 * string-icalls.c: added low overhead function for copying chars
14642 * icall.c: added needed icall for the above function
14644 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14646 * icall.c: fix return value of get_global_assembly_cache. Implemented
14647 Environment.GetLogicalDrives.
14649 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
14651 * rand.c: try and talk to egd or prngd
14652 for random bytes if opening devices fail.
14654 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
14656 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
14657 alignment for the type using the native alignment of its members
14658 instead of using klass->min_align.
14660 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
14662 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14665 * socket-io.c: added check for sys/aio.h.
14667 2004-04-28 Dick Porter <dick@ximian.com>
14669 * threads.c: Don't abort a thread thats already aborting, when
14670 terminating everything.
14672 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14674 * icall.c: added 2 new async calls for Socket.
14676 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
14677 IO on *nix systems.
14679 * threadpool.c: removed unused variable.
14681 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
14683 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
14685 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
14687 * locales.c: put back string_invariant_tolower () and
14688 string_invariant_toupper ().
14690 2004-04-26 David Waite <mass@akuma.org>
14695 * unicode.h: remove comma from end of enumeration declarations
14697 2004-04-26 David Waite <mass@akuma.org>
14699 * debug-mono-symfile.h:
14702 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
14705 2004-04-26 Jackson Harper <jackson@ximian.com>
14707 * appdomain.c: Increment version number.
14709 2004-04-26 Jackson Harper <jackson@ximian.com>
14711 * appdomain.c: Set assembly references public token value when
14712 PublicKeyToken is specified, not the hash_value. Free public token
14713 values when free assembly name data. Previously the public key
14714 token was hex decoded, however we are using hex encoded public key
14715 tokens, so this is not neccasary.
14716 * assembly.c: Lookup assemblies in the gac if their public token
14717 value is set. Add function to allow enabling user gac
14718 lookups. Specify whether or not the assembly was loaded from the
14719 GAC. Compare full assembly names when checking the cache for
14720 assemblies (Temporarily disabled see comment in code). Remove
14721 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
14722 specifies trace-loader they get extra info to stdout on the
14723 loading of assemblies.
14724 * image.h: Add a field for an assembly references public token
14725 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
14726 whether an assembly has been loaded from the GAC.
14727 * image.c: Remove a corlib -> mscorlib name mapping.
14728 * loader.h: Add function to enable/disable the user gac.
14729 * mono-config.c: Check if the usergac is enabled in the config
14731 * icall.c: New icall to determine whether or not an assembly has
14732 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
14733 * tabldefs.h: Add constant for assemblyref flag that specifies a
14734 full public key is used instead of a public token.
14735 * reflection.c: Remove mscorlib -> corlib mappings. Set
14736 PublicTokenValue instead of hash value. This value is a hex
14737 string so it does not need to be expanded.
14739 2004-04-26 Martin Baulig <martin@ximian.com>
14741 * mono-debug-debugger.c (mono_debugger_initialize): Set
14742 `mono_debugger_initialized' before calling mono_debug_lock().
14744 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
14746 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
14747 InternalToUpper/InternalToLower.
14748 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
14749 removed invariant culture shortcut. This is now done in managed code.
14750 * locales.c: (string_invariant_toupper/tolower) removed.
14752 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14754 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
14755 Added Poll internal call.
14757 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
14758 call for Poll. Select was too heavy for polling a single socket.
14760 * threadpool.[ch]: added mono_threadpool_cleanup.
14761 * threads.c: use it. Don't use Thread_Abort on windows.
14763 2004-04-23 Martin Baulig <martin@ximian.com>
14765 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
14767 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
14769 * icall.c: Registred new icalls for key pair protection and added an
14770 icall for Environment.GetFolderPath on Windows.
14771 * security.c|h: Added new icalls for key pair protection.
14773 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14775 * socket-io.c: don't display the non-supported family warning for known
14776 families. Now this is not displayed on windows when checking support
14779 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14781 * class.c: don't display the layout warning for static fields.
14783 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
14785 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
14786 * locales.c, locales.h: Added new icalls for culture-specific
14787 Char.ToLower and Char.ToUpper.
14789 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14791 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
14794 2004-04-20 Martin Baulig <martin@ximian.com>
14796 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
14797 of the type name before passing it to mono_reflection_type_from_name().
14799 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
14801 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
14802 encodings here. Fixes #56965.
14804 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
14806 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14807 fix test on strstr result not that I can see anything that
14808 relies on the result.
14810 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
14812 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
14815 * marshal.c (mono_marshal_get_string_encoding): New helper function.
14817 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
14818 function to determine which marshalling to use for strings. Fixes
14821 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
14823 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
14825 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
14827 * icall.c: #include mono-config.h
14829 2004-04-15 Jackson Harper <jackson@ximian.com>
14831 * culture-info-tables.h: Fix date formats for en-US culture.
14833 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
14835 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
14836 ThreadPool.SetMinThreads.
14837 * threadpool.c: Implemented ThreadPool.GetMinThreads and
14838 ThreadPool.SetMinThreads.
14840 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14842 * mono-config.c: also load the .config file in the directory
14843 where the assembly was found.
14845 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14847 * assembly.c: load per-assembly config files.
14848 * icall.c: decrapified code to get the config dir and moved to
14850 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
14851 per-assembly config files. When doing a dll map lookup give precedence
14852 to the per-assembly data.
14854 2004-04-14 Martin Baulig <martin@ximian.com>
14856 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
14857 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
14858 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
14860 * mono-debugger-debugger.c: While the debugger is locked, remember
14861 whether the symbol tables have changes and send one single
14862 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
14864 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
14866 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
14868 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
14871 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
14872 account when marshalling string arrays. Fixes #56965.
14874 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
14876 * icall.c: Add new icalls mapping for security.
14877 * security.c|h: Add internal calls for WindowsIdentity,
14878 WindowsImpersonationContext and WindowsPrincipal.
14880 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
14882 * class.c: Added comment to ensure the System.MonoDummy class
14883 is removed when no longer necessary
14885 2004-04-13 Miguel de Icaza <miguel@ximian.com>
14887 * appdomain.c: Pass arguments to the bootstraping exceptions to
14888 minimize JITed methods at boot
14890 * metadata.c (mono_exception_from_name_two_strings): Allow for the
14891 second string to be null.
14893 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14894 Change the protocol to minimize the JIT methods at startup. Now
14895 it Returns the internal codepage, if the value of "int_code_page"
14896 is 1 at entry, and we can not compute a suitable code page
14897 number, returns the code page as a string.
14899 2004-04-13 Jackson Harper <jackson@ximian.com>
14901 * culture-info-tables.h: Fix number of decimal digits for all
14904 2004-04-13 Jackson Harper <jackson@ximian.com>
14906 * icall.c: Clairfy out of sync error message. It is not always
14907 your corlib that is out of sync.
14909 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
14911 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
14912 properties when only the set accessor is overriden. Fixes #55874.
14914 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
14916 * assembly.c (mono_assembly_load_references): Make this thread safe.
14919 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
14921 * monosn.c: Add missing initialization calls.
14923 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
14926 ves_icall_System_Globalization_CultureInfo_construct_number_format
14927 Fix g_assert so it compiles on fussier compilers re int/ptr
14930 2004-04-08 Dick Porter <dick@ximian.com>
14933 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
14934 53992. Also rearrange the code so that the internal calls return
14935 an error value and exceptions are thrown from managed code.
14937 * icall.c: Add type info to the socket icalls.
14939 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14941 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
14944 2004-04-07 Martin Baulig <martin@ximian.com>
14946 * class.c (mono_class_from_generic_parameter): Don't default
14947 `klass->parent' to `mono_defaults.object_type'.
14949 2004-04-07 Martin Baulig <martin@ximian.com>
14951 * reflection.c (mono_reflection_initialize_generic_parameter): Set
14952 `param->pklass->reflection_info'.
14954 2004-04-07 Jackson Harper <jackson@ximian.com>
14956 * culture-info-tables.h: Fix date separator symbol.
14958 2004-04-07 Martin Baulig <martin@ximian.com>
14960 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
14961 from System.Type to System.MonoType.
14963 2004-04-07 Martin Baulig <martin@ximian.com>
14966 (MonoReflectionGenericParam): Added `has_reference_type' and
14967 `has_value_type' fields.
14969 * reflection.c (mono_image_get_generic_param_info): Encode the
14970 correct flags if we have the `class' or `struct' constraint.
14972 2004-04-07 Martin Baulig <martin@ximian.com>
14975 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
14977 2004-04-07 Jackson Harper <jackson@ximian.com>
14979 * appdomain.c: Revert extra patches, just wanted to bump the
14982 2004-04-07 Jackson Harper <jackson@ximian.com>
14984 * Makefile.am: Add culture-info private headers.
14985 * icall.c: Add new icalls for contructing locales.
14986 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
14987 * locales.h: Declare new culture info construction methods.
14988 * object.h: Add new fields used to avoid the CultureMap to
14990 * culture-info.h: Definition of structs used in the culture info
14992 * culture-info-tables.h: Autogenerated tables that contain culture
14993 info data. This file was generated with the locale-builder tool.
14994 * appdomain.c: Incement corlib version number.
14996 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
14998 * appdomain.c: (mono_runtime_init) move mono_thread_init
14999 to before mono_object_new calls so critical sections
15000 are initialized before use.
15002 2004-04-07 Martin Baulig <martin@ximian.com>
15005 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
15006 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
15007 (ves_icall_MonoGenericParam_initialize): Removed.
15008 (monogenericparam_icalls): Removed.
15009 (generictypeparambuilder_icalls): Added new table for
15010 System.Reflection.Emit.GenericTypeParameterBuilder.
15013 (mono_reflection_define_generic_parameter): Removed.
15014 (mono_reflection_initialize_generic_parameter): This is now called
15015 from GenericTypeParameterBuilder's .ctor.
15017 2004-04-06 Martin Baulig <martin@ximian.com>
15019 * class.c (mono_class_init): Don't inflate nested classes in a
15021 (mono_type_get_name_recurse): Include the generic arguments for
15022 generic instances and generic type declarations.
15023 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
15024 (_mono_class_get_instantiation_name): Removed.
15025 (mono_class_create_generic): Always use `gklass->name' as our name.
15027 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
15029 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
15030 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
15031 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
15032 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
15033 closed generic methods here.
15036 (mono_reflection_generic_inst_get_nested_types): Removed.
15037 (inflate_mono_method): Copy the generic parameters from the
15038 MonoMethodHeader into out MonoGenericMethod.
15040 2004-04-06 Martin Baulig <martin@ximian.com>
15043 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
15045 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
15047 * reflection.c (build_compressed_metadata): If we have any entries
15048 in the GenericParam, MethodSpec or GenericParamConstraint tables,
15049 set the header version to 1.1.
15051 2004-04-06 Martin Baulig <martin@ximian.com>
15053 * class.c (mono_class_init): If we're a generic instance,
15054 initialize our nested classes, too.
15055 (_mono_class_get_instantiation_name): Deal with the new `!%d'
15058 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15060 * process.c: quote the argument passed to the shell on windows.
15062 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
15064 * threads.c (mono_alloc_special_static_data): Allow this to be
15065 called during startup.
15067 2004-04-02 Martin Baulig <martin@ximian.com>
15070 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
15072 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
15074 * icall.c: Fix build.
15076 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
15078 * Makefile.am: Added security.c|h.
15079 * icall.c: Added icall for get_UserName;
15080 * security.c: New file for security related icalls. Added function
15081 get_UserName for System.Environment (fix #56144).
15082 * security.h: New. Header file for security.c
15084 2004-04-02 Dick Porter <dick@ximian.com>
15086 * icall.c: Deleted the icalls that were obsoleted some time ago
15087 by the ICU string code, and which were mixed into the icall
15088 rearranging. Fixes bug 55969.
15091 * string-icalls.c: Deleted the code that those icalls reference.
15093 2004-04-01 Martin Baulig <martin@ximian.com>
15095 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
15097 * class.c (mono_class_from_generic_parameter): Don't set
15098 TYPE_ATTRIBUTE_INTERFACE.
15099 (my_mono_class_from_generic_parameter): Likewise.
15101 2004-04-01 Martin Baulig <martin@ximian.com>
15103 * loader.c (find_method): Added an optional `MonoClass *ic'
15104 argument to search in a specific interface.
15105 (mono_get_method_constrained): New public function.
15107 2004-04-01 Martin Baulig <martin@ximian.com>
15109 * reflection.c (mono_image_get_generic_field_token): Use the
15110 `handleref' cache here.
15112 2004-04-01 Martin Baulig <martin@ximian.com>
15114 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
15116 * reflection.c (create_generic_typespec): Use the `typespec' hash
15117 here, not the `typeref' one.
15119 2004-04-01 Martin Baulig <martin@ximian.com>
15121 * class.c (mono_class_inflate_generic_type): Moved the
15122 functionality into a new static inflate_generic_type() which
15123 returns NULL if it didn't do anything. Only increment the
15124 `mono_stats.inflated_type_count' if we actually inflated
15126 (mono_class_get_full): Check the classes type to see whether we
15127 need to inflate it; also inflate MONO_TYPE_(M)VAR.
15129 2004-04-01 Jackson Harper <jackson@ximian.com>
15131 * reflection.c: Set culture for assembly references.
15133 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
15135 * reflection.[ch], icall.[ch], Fix support for pinning variables.
15137 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15140 (do_mono_assembly_open): the critical section also covers
15141 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
15143 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15146 (mono_manage_threads): abort the background threads when finishing.
15149 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15151 * gc.c: only close the done_event handle if there was no timeout.
15154 2004-03-30 Martin Baulig <martin@ximian.com>
15156 * icall.c (icall_entries): It's called "System.Activator", not
15157 "System.Activation".
15159 2004-03-30 Martin Baulig <martin@ximian.com>
15161 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
15162 (mono_class_create_from_typespec): Likewise.
15164 2004-03-30 Martin Baulig <martin@ximian.com>
15166 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
15167 `has_ctor_constraint' and `initialized'.
15169 2004-03-30 Martin Baulig <martin@ximian.com>
15171 * reflection.c (encode_new_constraint): New static function to add
15172 the constructor constraint attribute to a type parameter.
15173 (encode_constraints): Call encode_new_constraint() if necessary.
15176 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
15178 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
15180 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
15182 * reflection.c, icall.c: add support for pinning variables.
15184 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
15186 * marshal.c (mono_marshal_get_managed_wrapper):
15187 init bool local with zero rather than null.
15189 2004-03-29 Martin Baulig <martin@ximian.com>
15191 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
15192 the "official" behavior here.
15193 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
15195 2004-03-29 Martin Baulig <martin@ximian.com>
15197 * icall.c: Reflect latest API changes.
15199 2004-03-29 Martin Baulig <martin@ximian.com>
15201 * loader.c (mono_get_method_from_token): Also call
15202 mono_metadata_load_generic_params () for abstract and interface
15203 methods; replace the type arguments in the method signature with
15204 the ones which are loaded from the metadata.
15206 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
15208 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
15209 of the lock is not the current thread. MS.NET don't do it, in spite of
15210 what the documentation says. See bug #56157.
15212 2004-03-28 Martin Baulig <martin@ximian.com>
15214 * class.c (mono_class_init): Don't call init_properties() and
15215 init_events() for generic instances; set `prop->parent' when
15216 inflating properties.
15218 * reflection.c (mono_generic_inst_get_object): Call
15219 `mono_class_init (ginst->klass)'.
15220 (mono_type_get_object): Only create a MonoGenericInst if your
15221 generic type is a TypeBuilder.
15222 (do_mono_reflection_bind_generic_parameters): Only set
15223 `ginst->is_dynamic' if our generic type is a TypeBuilder.
15225 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
15227 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
15230 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15232 * icall.c: added Kill_internal icall.
15233 * process.[ch]: added Kill_internal icall.
15235 2004-03-25 Martin Baulig <martin@ximian.com>
15237 * class.h (MonoStats): Added `generic_instance_count',
15238 `inflated_method_count', `inflated_type_count' and
15239 `generics_metadata_size'.
15241 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15243 * reflection.c: no warnings now.
15245 2004-03-25 Martin Baulig <martin@ximian.com>
15247 * class.c (mono_class_get_full): New public function; does a
15248 mono_class_get(), but also takes a `MonoGenericContext *'.
15250 * loader.c (mono_field_from_memberref): Renamed to
15251 `field_from_memberref', made static and added `MonoGenericContext *'
15253 (mono_field_from_token): Added `MonoGenericInst *' argument.
15254 (method_from_memberef): Likewise.
15255 (mono_get_method_from_token): Likewise.
15256 (mono_get_method_full): New public function; does a
15257 mono_get_method(), but also takes a `MonoGenericContext *'.
15259 * verify.c (mono_method_verify): Get the method's generic context
15260 and pass it to mono_field_from_token(), mono_get_method_full() and
15261 mono_class_get_full().
15263 2004-03-25 Martin Baulig <martin@ximian.com>
15265 * class.c (mono_class_inflate_generic_type): Take a
15266 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
15267 `MonoGenericMethod *'.
15269 2004-03-25 Martin Baulig <martin@ximian.com>
15271 * loader.h (MonoMethodInflated): Store the MonoGenericContext
15272 instead of the MonoGenericMethod here.
15274 2004-03-25 Martin Baulig <martin@ximian.com>
15276 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
15277 each time we create a new MonoGenericInst, we also create a new
15278 context which points back to us.
15280 * class.c (inflate_method): Use `ginst->context' instead of
15281 creating a new context.
15283 * loader.c (method_from_memberref): Use
15284 `klass->generic_inst->context' instead of creating a new context.
15286 2004-03-25 Martin Baulig <martin@ximian.com>
15288 * class.h (MonoGenericContext): New struct.
15289 (MonoGenericMethod): Removed `generic_inst'.
15291 * class.c (mono_class_inflate_generic_method): Take a
15292 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
15294 2004-03-25 Martin Baulig <martin@ximian.com>
15296 * loader.h (MonoMethodInflated): New typedef.
15298 * metadata.h (MonoMethodSignature): Removed `gen_method', make
15299 `generic_param_count' consume just 30 bits, added `is_inflated'
15300 and `has_type_parameters' flags (one bit each).
15302 * class.c (mono_class_inflate_generic_method): Create a
15303 MonoMethodInflated instead of a MonoMethodNormal and set
15304 `is_inflated' in the method signature.
15306 * class.h (MonoGenericMethod): Removed `generic_method'.
15308 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
15310 * image.c: Make sure the name of a MonoImage is always an absolute path.
15311 This fixes bug #54415.
15313 2004-03-24 Martin Baulig <martin@ximian.com>
15315 * class.c (mono_class_setup_vtable): If we're a generic instance,
15316 use our generic type's vtable size.
15318 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
15320 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
15321 MONO_NO_UNLOAD env var as a temporary workaround for unloading
15324 2004-03-23 Martin Baulig <martin@ximian.com>
15326 * class.h (MonoDynamicGenericInst): Added `int count_events' and
15327 `MonoEvent *events'.
15329 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
15330 (typebuilder_icalls): Added "get_event_info"; calls
15331 mono_reflection_event_builder_get_event_info().
15333 * reflection.c (mono_reflection_generic_inst_initialize): Added
15334 `MonoArray *events'.
15335 (mono_reflection_event_builder_get_event_info): New function.
15337 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
15339 * object.h: add mono_type_initialization_init
15341 * object.c (mono_runtime_class_init):
15342 implement class constructor synchronization rules
15343 to cope with threading issues.
15344 add mono_type_initialization_init
15346 * appdomain.c (mono_runtime_init): call
15347 mono_type_initialization_init
15349 * class.h: removing initializing field from MonoVTable
15351 2004-03-23 Martin Baulig <martin@ximian.com>
15353 * class.c (my_mono_class_from_generic_parameter): Use
15354 `param->name' if it's not NULL.
15356 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
15358 * class.c: do not insert non-virtual methods in the vtable.
15359 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
15360 that means the method is non-virtual. This never would have
15363 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
15365 * profiler.c: Added lock for accessing coverage_hash.
15367 2004-03-22 Martin Baulig <martin@ximian.com>
15369 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
15370 `method->method->signature->generic_param_count != 0' to make it
15371 work for interface methods.
15373 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15375 * process.c: quote the string passed to the shell using g_shell_quote.
15377 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15380 (mono_threads_manage): don't remove the finalizer thread and self
15381 from the threads hash table so that mono_thread_manage can be called
15384 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15386 * process.c: quote the arguments when UseShellExecute is true. Fixes
15389 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15391 * threads.c: set mono_thread_detach as a cleanup routine for every
15392 thread. This way it's always executed upon thread termination, either
15393 aborted or finished normally. No more xsp hangs!
15395 2004-03-17 Martin Baulig <martin@ximian.com>
15397 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
15398 `int count_nested' and a `MonoType **nested'.
15400 * reflection.c (mono_reflection_bind_generic_parameters): Moved
15401 most of the functionality into a new static
15402 do_mono_reflection_bind_generic_parameters() and don't take a
15403 `MonoType *nested_in' argument any more. Don't compute nested
15405 (mono_reflection_generic_inst_get_nested_types): New public method
15406 to get nested types.
15408 * class.c (mono_class_create_generic): Set `klass->nested_in' if
15409 we're a nested class.
15411 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
15412 mono_reflection_generic_inst_get_nested_types() to compute the
15415 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15417 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
15418 descriptive error message under windows.
15420 2004-03-17 Martin Baulig <martin@ximian.com>
15422 * class.c (dup_type): Added `const MonoType *original' argument;
15423 copy the attrs from the original type.
15425 2004-03-17 Martin Baulig <martin@ximian.com>
15427 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
15428 `m->generic_inst_cache' here.
15430 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15432 * exception.h exception.c: Add stack_overflow_exception.
15434 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15437 (overlapped_callback): call SetEvent *after* invoking the callback.
15438 No need to call CloseHandle.
15440 2004-03-16 Martin Baulig <martin@ximian.com>
15442 * reflection.c (mono_image_get_fieldref_token): Take a
15443 `MonoReflectionField *' instead of a `MonoClassField *' and a
15444 `MonoClass *'; store the `MonoReflectionField *' in the hash.
15446 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15448 * appdomain.c: don't add the culture to the filename we're looking for
15449 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
15451 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15453 * locales.c: don't ignore symbols when doing case insensitive compares.
15454 Thanks Dick! Fixes bug #54046.
15456 * threads.c: surround 'threads' usage with enter/leave in
15457 mono_thread_manage.
15459 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
15461 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
15462 implicitly marshalled as [Out]. Fixes #55450.
15464 (mono_marshal_get_runtime_invoke): Zero out the result if there is
15467 2004-03-16 Martin Baulig <martin@ximian.com>
15469 * class.c (mono_class_from_generic_parameter): Use the actual
15472 2004-03-16 Martin Baulig <martin@ximian.com>
15474 * reflection.c (type_get_signature_size): New static function.
15475 Compues the size of the type in a method signature.
15476 (method_get_signature_size): New static function; calls
15477 type_get_signature_size() to compute the actual size of the
15478 method's signature.
15479 (method_encode_signature): Use method_get_signature_size() to get
15480 the signature's size rather than using `nparams * 10'.
15482 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15484 * file-io.h: define here WapiOverlapped on windows. I don't want the
15485 regular OVERLAPPED one.
15488 * threadpool.c: somehow, BindIoCompletionCallback is not found.
15489 Disabling AIO on windows.
15491 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15493 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
15496 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15498 * appdomain.c: upgraded corlib version.
15500 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
15501 and BeginWrite. Allow opening files for asynchrnous operations.
15503 * file-io.h: new struct that maps FileStreamAsyncResult.
15504 * icall.c: added new icalls.
15505 * process.[ch]: support setting child process environment variables
15506 and use the SHELL or COMSPEC when UseShellExecute is true.
15508 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
15509 callback for async. IO is here and also BindHandle.
15511 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
15514 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
15516 * reflection.c (create_custom_attr): Allow len == 0.
15518 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
15519 computation on big-endian machines.
15521 2004-03-13 Martin Baulig <martin@ximian.com>
15523 * class.h (MonoGenericInst): Added `int count_ifaces'.
15525 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
15526 `ginst->count_ifaces' instead `klass->interface_count' since we
15527 may get called before the vtable is created.
15529 * loader.c (mono_method_get_param_names): If we're a generic
15530 instance, return and don't initialize the class.
15532 * reflection.c (mono_reflection_setup_generic_class): Don't call
15533 ensure_runtime_vtable().
15534 (mono_reflection_bind_generic_parameters): Set
15535 `ginst->count_ifaces'.
15537 2004-03-11 Jackson Harper <jackson@ximian.com>
15541 * unicode.h: Remove unused System.Char icalls.
15543 2004-03-11 Miguel de Icaza <miguel@ximian.com>
15545 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
15546 code when we P/Invoke the first library in Windows.Forms, instead
15547 of when we first open the assembly.
15549 * assembly.c: Drop the lookup from here.
15551 2004-03-10 Martin Baulig <martin@ximian.com>
15553 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
15554 class for properties, fields and events. Finally fixes #54945.
15556 2004-03-10 Martin Baulig <martin@ximian.com>
15558 * metadata.c (mono_metadata_class_equal): New static function;
15559 checks whether two generic instances or two generic parameters are
15561 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
15564 2004-03-10 Martin Baulig <martin@ximian.com>
15566 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
15568 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
15569 argument and write it into the `reflection_info' field.
15572 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
15573 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
15575 2004-03-09 Jackson Harper <jackson@ximian.com>
15577 * char-conversions.h: use 8 bits for numeric data its all we need
15578 * icall.c: numeric data is only 8 bits now.
15580 2004-03-09 Martin Baulig <martin@ximian.com>
15582 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
15584 * class.c (init_properties, init_events): Initialize the new
15587 * reflection.c (typebuilder_setup_properties): Likewise.
15588 (typebuilder_setup_events): Likewise.
15590 * reflection.h (MonoEventInfo): Replaced `parent with
15591 `declaring_type' and `reflected_type'.
15593 * icall.c (ves_icall_get_property_info): Distinguish between
15594 declaring and reflected type.
15595 (ves_icall_get_event_info): Likewise.
15597 2004-03-09 Martin Baulig <martin@ximian.com>
15599 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
15600 (ves_icall_Type_GetField): Correctly set field->klass.
15602 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
15604 * loader.h: Fix warning.
15606 2004-03-08 Miguel de Icaza <miguel@ximian.com>
15608 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
15609 library routine if present. Notice that it will still continue
15610 executing even if its missing, for those working on the Gtk#
15611 edition of Windows.Forms.
15613 * assembly.c (do_mono_assembly_open): If loading the
15614 System.Windows.Forms call mono_loader_wini_init.
15616 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
15618 * class.h: Added MonoRemoteClass struct.
15619 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
15620 function for MonoStrings.
15621 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
15622 Added internal call for getting the proxy type.
15623 * marshal.c: Get the type of transparent proxies from its remote_class.
15624 Added methods that generate the IL for type checks and casts:
15625 mono_marshal_get_isinst, mono_marshal_get_castclass,
15626 mono_marshal_get_proxy_cancast.
15627 * marshal.h: Declaration of the previous new methods.
15628 * object.c: Added new moethods for creating and updating MonoRemoteClass
15629 instances: mono_remote_class, mono_upgrade_remote_class,
15630 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
15631 * verify.c: FIx transparent_proxy_fields layout.
15632 * appdomain.c: Bump corlib version.
15634 2004-03-04 Jackson Harper <jackson@ximian.com>
15636 * icall.c: Add icall to access char conversion tables.
15637 * char-conversions.h: Character conversion tables.
15638 * Makefile.am: Add char-conversions.h private header file.
15640 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
15642 * appdomain.c (unload_thread_main): Increase unloading timeout to
15643 10 sec as a temporary workaround for Nant problems.
15645 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
15647 * gc.c: Add checks for GC_enable and GC_disable.
15649 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
15650 (jaak@zd.com.pl). Fix memory corruption in String.Replace
15653 2004-02-27 Martin Baulig <martin@ximian.com>
15655 * reflection.c (mono_reflection_bind_generic_parameters): Take a
15656 `MonoReflectionType *' instead of a `MonoType *'.
15658 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
15660 * gc.c (run_finalize): Avoid finalizing the object representing the
15662 (finalizer_thread): Fix warning.
15664 2004-02-25 Martin Baulig <martin@ximian.com>
15666 * class.c (_mono_class_get_instantiation_name): Added `int offset'
15667 argument for nested types.
15668 (mono_class_create_generic): Added support for nested generictypes.
15670 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
15673 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
15675 * reflection.c (method_encode_signature): Increase the minimum
15676 value of `size' from 10 to 11.
15677 (mono_reflection_bind_generic_parameters): Take `int type_argc'
15678 and `MonoType **types' arguments instead of the `MonoArray
15679 *types'; added `MonoType *nested_in'. Recursively instantiate
15682 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
15684 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
15685 stack_overflow_ex members which are used by exception handling.
15687 * appdomain.c (mono_runtime_init): Initialize the new members.
15689 * gc.c (mono_gc_enable): New helper function.
15690 * gc.c (mono_gc_disable): New helper function.
15692 2004-02-23 Martin Baulig <martin@ximian.com>
15694 * icall.c: I must have been really stupid - make it actually work
15697 2004-02-23 Martin Baulig <martin@ximian.com>
15699 * loader.c (method_from_memberref): Only inflate the method if
15700 it's in another klass.
15702 2004-02-23 Martin Baulig <martin@ximian.com>
15704 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
15705 (mono_class_init): If we're a generic instance and an interface,
15706 compute `class->interface_id'; also create `class->interfaces'
15707 here and inflate them.
15709 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
15711 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
15713 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
15715 2004-02-15 Miguel de Icaza <miguel@ximian.com>
15717 * reflection.c (method_encode_code): Improved the error message
15718 generated by the exception.
15720 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15722 * icall.c: Martin did not do what he said in the ChangeLog for
15723 2004-02-18, but put back the changes for properties and events.
15724 Commenting those changes out again and adding comment to bug #54518.
15726 * process.c: removed warning.
15728 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
15730 * marshal.c (emit_struct_conv): Print an error message instead of
15731 asserting when a type does not have the StructLayout attribute.
15733 2004-02-20 Martin Baulig <martin@ximian.com>
15735 * reflection.c (mono_type_get_object): Also use the cache for
15737 (mono_reflection_bind_generic_parameters): Always compute
15740 2004-02-20 Martin Baulig <martin@ximian.com>
15742 * class.h (MonoGenericMethod): Removed `klass'.
15744 * class.c (mono_class_inflate_generic_method): Added `MonoClass
15747 2004-02-20 Martin Baulig <martin@ximian.com>
15749 * reflection.c (method_encode_methodspec): Actually use the
15750 uninflated signature for the memberref.
15752 2004-02-20 Martin Baulig <martin@ximian.com>
15754 * class.h (MonoGenericMethod): Removed `declaring'.
15756 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
15757 is NULL, compute it here.
15759 2004-02-20 Martin Baulig <martin@ximian.com>
15761 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
15763 * metadata.c (mono_metadata_generic_inst_hash): New method.
15764 (mono_metadata_generic_inst_equal): New method.
15766 * reflection.c (mono_reflection_bind_generic_parameters): Use the
15767 `klass->image->generic_inst_cache' cache to avoid creating
15768 duplicate MonoGenericInst's.
15770 * class.c (mono_class_inflate_generic_type): Use the cache.
15772 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
15774 * object.c: fixed gc descriptor calculation for embedded valuetypes.
15776 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15778 * icall.c: added Socket.WSAIoctl icall.
15780 * socket-io.[ch]: implemented
15781 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
15783 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
15785 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
15787 2004-02-18 Urs C Muff <umuff@quark.com>
15789 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
15790 this work on PPC and other big-endian architectures.
15792 * debug-mono-symfile.h: Prepended the names of all the `guint32'
15793 fields with an underscore to make sure they're only accessed by
15794 the read32() macro.
15796 2004-02-18 Martin Baulig <martin@ximian.com>
15798 * icall.c: Put the klass->refclass changes back for methods and
15799 fields, but not for properties and events. We're currently not
15800 distinguishing between DeclaringType and ReflectedType for
15801 properties and events, that's what caused the regressions.
15803 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15806 (mono_async_result_new): the handle can be NULL.
15808 * threadpool.c: Use an event instead of a semaphore, don't initialize
15809 it until needed. This saves quite a few semaphores from being created
15810 when using the threadpool.
15812 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
15814 * object.c (mono_string_is_interned_lookup): Fix interning of long
15815 strings. Fixes #54473.
15817 * domain.c (ldstr_equal): Optimize if the two strings are equal.
15819 * icall.c: Revert the klass->refclass changes since they introduce
15820 regressions (bug #54518).
15822 2004-02-18 Martin Baulig <martin@ximian.com>
15824 * class.c (mono_class_init): If we're a generic instance and don't
15825 come from a TypeBuilder, inflate our members here.
15826 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
15827 (mono_class_create_generic): New public method.
15828 (mono_class_initialize_generic): Removed.
15829 (get_instantiation_name): Renamed to
15830 _mono_class_get_instantiation_name() and made it public.
15832 2004-02-18 Martin Baulig <martin@ximian.com>
15834 * class.c (mono_class_inflate_generic_type): Clear the new
15835 instance's `nginst->klass' when inflating a generic instance.
15836 (mono_class_is_subclass_of): Added (basic) support for generic
15839 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
15841 * appdomain.h, domain.c: use a MonoCodeManager instead of a
15842 MonoMempool to hold compiled native code.
15844 2004-02-17 Martin Baulig <martin@ximian.com>
15846 * class.h (MonoDynamicGenericInst): Added `count_properties' and
15849 * reflection.c (mono_reflection_generic_inst_initialize): Added
15850 `MonoArray *properties' argument.
15852 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
15854 2004-02-17 Martin Baulig <martin@ximian.com>
15856 * icall.c (ves_icall_Type_GetFields): Renamed to
15857 ves_icall_Type_GetFields_internal() and added a
15858 `MonoReflectionType *rtype' argument; pass it to
15859 mono_field_get_object() to set the field's "reflected" type.
15860 (ves_icall_Type_GetConstructors): Likewise.
15861 (ves_icall_Type_GetEvents): Likewise.
15862 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
15863 argument; pass it to mono_method_get_object() to set the method's
15866 2004-02-17 Martin Baulig <martin@ximian.com>
15868 * class.h (MonoDynamicGenericInst): New type.
15869 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
15871 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
15872 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
15873 (ves_icall_MonoGenericInst_GetFields): New interncall.
15875 * class.c (mono_class_from_generic): Don't call
15876 mono_class_initialize_generic() if this is a dynamic instance;
15877 ie. it's being created from a TypeBuilder.
15878 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
15879 `class->byval_arg.type'.
15881 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
15882 to `inflate_method' and made static.
15883 (mono_reflection_inflate_field): Removed.
15884 (mono_reflection_generic_inst_initialize): New public method.
15886 * reflection.h (MonoReflectionGenericInst): Removed `methods',
15887 `ctors' and `fields'; added `initialized'.
15889 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
15891 * debug-helpers.c (mono_method_full_name): Fix output for empty
15894 2004-02-12 Martin Baulig <martin@ximian.com>
15896 * class.h (MonoClassField): Added `MonoType *generic_type'.
15898 * reflection.c (mono_image_get_fieldref_token): Added support for
15899 instantiated generic types.
15900 (field_encode_inflated_field): Removed.
15901 (mono_image_get_inflated_field_token): Removed.
15902 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
15904 * reflection.h (MonoReflectionInflatedField): Removed.
15906 2004-02-12 Martin Baulig <martin@ximian.com>
15908 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
15909 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
15911 * reflection.c (mono_image_get_methodspec_token): Take a
15912 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
15913 (mono_image_create_token): Check whether we have a
15914 `method->signature->gen_method' and call
15915 mono_image_get_methodspec_token() if appropriate.
15916 (inflated_method_get_object): Removed.
15917 (mono_reflection_bind_generic_method_parameters): Return a
15918 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
15919 (mono_reflection_inflate_method_or_ctor): Likewise.
15921 * reflection.h (MonoReflectionInflatedMethod): Removed.
15923 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
15925 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
15926 for custom valuetype marshalling.
15928 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
15930 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15932 * icall.c: fixed WSAGetLastError_internal name.
15934 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
15936 * threads.c (mono_thread_attach): Allow this to be called multiple
15937 times for a thread.
15939 * threads.c (build_wait_tids): Do not wait for ourselves.
15941 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
15942 appdomain list is empty.
15944 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
15945 memory returned by mono_string_builder_to_utf16, since it points into
15946 managed memory. Thanks to Bernie Solomon for noticing this.
15948 * icall.c: Add AppDomainSetup icalls.
15950 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
15952 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
15955 * reflection.c (reflection_methodbuilder_to_mono_method): Save
15956 custom attributes to the method_aux struct. Also fix array indexes etc.
15958 * loader.c (mono_method_get_param_names): Make dynamic case work again.
15960 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
15962 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
15963 (both static and runtime) and reduce startup time.
15965 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
15967 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
15968 AsAny marshalling conversion instead of crashing.
15970 * marshal.c: Fix warnings.
15972 2004-02-09 Martin Baulig <martin@ximian.com>
15974 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
15976 * reflection.h (MonoReflectionInflatedMethod): Removed the
15977 `declaring' field, it's now in the unmanaged MonoGenericMethod.
15979 * reflection.c (method_encode_methodspec): Removed the `method'
15980 argument; we get it from `gmethod->declaring'.
15981 (inflated_method_get_object): Removed the `declaring' argument.
15983 2004-02-09 Martin Baulig <martin@ximian.com>
15985 * class.h (MonoGenericMethod): New type.
15986 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
15989 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
15990 a `MonoGenericMethod *gen_method' one.
15992 * class.c (mono_class_inflate_generic_type): Take an additional
15993 `MonoGenericMethod * argument. This is only non-NULL if we're
15994 inflating types for a generic method.
15995 (mono_class_inflate_generic_signature): Renamed to
15996 inflate_generic_signature() and made static; take a
15997 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15998 (inflate_generic_header): Take a `MonoGenericMethod *' argument
15999 instead of a `MonoGenericInst *' one.
16000 (mono_class_inflate_generic_method): Likewise.
16002 * reflection.c (encode_generic_method_sig): Take a
16003 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
16004 (method_encode_methodspec): Likewise.
16005 (inflated_method_get_object): Likewise.
16007 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
16008 field with a `MonoGenericMethod *gmethod' one.
16010 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
16012 * class.h (mono_class_has_parent): add parens to expansion
16015 2004-02-08 Martin Baulig <martin@ximian.com>
16017 * image.h (MonoImage): Removed `generics_cache'.
16019 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
16020 instead of a `MonoType *' argument; removed the `inflate_methods'
16021 argument. Don't inflate methods here.
16023 * loader.c (find_method): If it's a generic instance, call
16024 mono_class_init() on the `sclass->generic_inst->generic_type'.
16026 * metadata.c (mono_type_size): Make this work on uninitialized
16027 generic instances; call it on the `ginst->generic_type's class.
16029 * reflection.c (mono_reflection_bind_generic_parameters): Call
16030 mono_class_from_generic() to create the `ginst->klass'.
16032 2004-02-08 Martin Baulig <martin@ximian.com>
16034 * class.h (MonoClass): Changed type of `generic_inst' from
16035 `MonoType *' to `MonoGenericInst *'.
16037 2004-02-08 Martin Baulig <martin@ximian.com>
16039 * icall.c (ves_icall_Type_BindGenericParameters): Just call
16040 mono_type_get_object(), this is now creating a `MonoGenericInst'
16041 for MONO_TYPE_GENERICINST.
16042 (ves_icall_MonoGenericInst_GetParentType): Likewise.
16043 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
16045 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
16046 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
16047 (inflated_method_get_object): Added `MonoClass *refclass' argument.
16048 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
16049 and reflected type.
16051 * reflection.h (MonoReflectionInflatedMethod): Removed
16052 `declaring_type' and `reflected_type'.
16054 2004-02-08 Martin Baulig <martin@ximian.com>
16056 * class.h (MonoGenericInst): Added `MonoType *parent' and
16057 `MonoType **ifaces'.
16059 * reflection.h (MonoReflectionGenericInst): Removed `klass',
16060 `parent' and `interfaces'.
16062 * reflection.c (mono_reflection_bind_generic_parameters): Take a
16063 `MonoType *' argument and return a `MonoType *'.
16066 (ves_icall_MonoGenericInst_GetParentType): New interncall.
16067 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
16069 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
16071 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
16072 valuetype marshalling.
16074 2004-02-06 Martin Baulig <martin@ximian.com>
16077 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
16078 (my_mono_class_from_generic_parameter): Likewise.
16080 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
16082 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
16083 contents of the symbol files lazily.
16085 * object.h (MonoThread): Add 'name' and 'name_len' fields.
16087 * threads.h threads.c icall.c: New icalls for getting and setting the
16090 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
16092 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
16093 Raise an exception when the domain is not found.
16095 2004-02-03 Martin Baulig <martin@ximian.com>
16097 * reflection.c (mono_image_get_methodspec_token): Use the
16098 uninflated signature; fixes gen-33.
16100 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
16102 * gc.c threads.c: Make the finalizer thread a normal managed thread so
16103 the finalizer code can use thread functionality.
16105 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
16106 the finalizer thread.
16108 * threads.c: Make some functions more robust.
16110 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
16112 * metadata.h: Add new marshalling conventions.
16114 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
16115 stringbuilder marshalling. Fixes #53700.
16117 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
16119 * reflection.c (mono_image_get_type_info): Save declarative security
16122 * reflection.c (mono_image_get_field_info): Handle uninitialized
16123 unmanaged fields as well.
16125 * appdomain.c: Bump corlib version.
16127 2004-02-01 Martin Baulig <martin@ximian.com>
16129 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
16130 method type arguments.
16132 2004-01-30 Duncan Mak <duncan@ximian.com>
16134 * marshal.h: Add prototype for
16135 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
16137 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
16140 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
16142 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
16143 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
16145 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
16147 * marshal.c (mono_marshal_get_native_wrapper): Add support for
16148 custom marshalling of valuetypes.
16150 * marshal.c: Fix some warnings.
16152 2004-01-29 Martin Baulig <martin@ximian.com>
16154 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
16155 for generic method parameters.
16157 * reflection.c (method_encode_methodspec): Write the uninflated
16158 signature into the methodspec table.
16159 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
16160 is always the uninflated method.
16161 (reflection_methodbuilder_to_mono_method): Copy the generic
16162 parameters from the MethodBuilder into `header->gen_params'.
16164 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
16166 * class.c (mono_class_from_generic_parameter): Fix warning.
16168 2004-01-27 Martin Baulig <martin@ximian.com>
16170 * class.c (mono_class_from_generic_parameter): Don't create
16171 `klass->methods' here.
16173 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
16175 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
16176 extension since it does not work with libraries named lib<FOO>.dll.so.
16178 2004-01-25 Martin Baulig <martin@ximian.com>
16180 * class.c (mono_class_inflate_generic_type): Added support for
16181 MONO_TYPE_GENERICINST.
16183 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
16184 inflate methods on open constructed types.
16186 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16188 * object.c: fire ProcessExit event in the root AppDomain after running
16189 Main. Fixes bug #53299.
16191 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16193 * socket-io.c: include the new socket-wrappers.h header.
16194 Use the wrappers instead of the unix socket functions to make the code
16197 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
16199 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
16201 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
16204 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
16206 * reflection.c (mono_image_create_pefile): Handle the case when the
16207 entry point is not a MethodBuilder.
16209 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
16210 field to ReflectionMethod since it is not allways a builder.
16212 * reflection.c (type_get_fully_qualified_name): New helper function to
16213 return the fully qualified name of a type.
16215 * reflection.c (encode_marshal_blob): Always emit the fully qualified
16216 type name for custom marshallers.
16218 * reflection.c (mono_marshal_spec_from_builder): Ditto.
16220 * class.c (mono_class_setup_vtable): If a parent class already
16221 implements an interface, use the implementing methods from that class.
16224 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16226 * threadpool.c: just return instead of ExitThread to allow for thread
16229 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
16231 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
16232 when closing resource modules.
16234 * reflection.c (mono_image_create_pefile): Handle the case when the
16235 entry point is not a MethodBuilder.
16237 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
16238 field to ReflectionMethod since it is not allways a builder.
16240 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
16242 * marshal.c (mono_marshal_get_managed_wrapper):
16243 mono_marshal_alloc takes native int so CONV_I
16244 the arg for 64bits.
16246 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
16248 * reflection.c (fixup_cattrs): New function to fixup the methoddef
16249 tokens in the cattr table. Fixes #53108.
16251 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16253 * loader.c: don't trim ".dll" before looking up in the config file.
16254 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
16256 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
16258 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
16259 Return the module which contains the resource as well.
16260 (ves_icall_System_Reflection_Module_Close): New icall.
16262 * appdomain.c: Bump corlib version number.
16264 * image.c (mono_image_addref): New public function.
16266 * assembly.c: Call mono_image_addref.
16268 * reflection.c (mono_module_get_object): Increase reference count of
16271 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
16274 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
16275 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
16276 proper exceptions on DllImport problems.
16278 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
16280 * class.c, metadata.c: eliminate CSIZE macro.
16282 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
16284 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
16285 * object.h: Added async_callback field in MonoAsyncResult.
16286 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
16287 * verify.c: Added async_callback in MonoAsyncResult layout.
16289 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
16291 * reflection.c (mono_reflection_get_custom_attrs): Add support
16294 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
16296 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
16298 (mono_marshal_method_from_wrapper): Add null pointer check.
16300 2004-01-16 Martin Baulig <martin@ximian.com>
16302 * debug-mono-symfile.h: Set version number to 36 and reflect
16303 latest symbol writer changes.
16305 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
16307 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
16308 multi-dimensional arrays.
16309 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
16310 (mono_class_from_mono_type): Use bounded_array_class_get.
16312 * class.c (mono_bounded_array_class_get): New function which takes
16313 a 'bounded' bool argument to distinguish vectors from one dimensional
16316 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
16317 bounded_array_class_get if the array has bounds.
16319 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16320 Search modules loaded using AssemblyBuilder:AddModule as well.
16322 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16324 * appdomain.c: increased corlib version.
16325 * filewatcher.c: removed g_print.
16327 (get_property_info): only allocate what is actually requested.
16328 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
16330 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16332 * Makefile.am: added filewatcher.[ch]
16333 * filewatcher.[ch]: FileSystemWatcher runtime support.
16334 * icall.c: added new FSW icalls.
16336 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
16338 * string-icalls.c: fix stringbuilder regression as suggested by
16339 Iain McCoy <iain@mccoy.id.au>.
16341 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
16343 * process.c (process_read_stringtable_block): Recognize '007f' as
16344 a language neutral stringtable block.
16346 2004-01-12 Patrik Torstensson
16348 * object.h (MonoStringBuilder) : Changed layout to support our
16349 new stringbuilder class.
16350 * marshal.c: Change marshalling to support the new layout of
16352 * appdomain.c: increased version number because new layout of
16355 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
16357 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
16358 assembly name as an string instead of an AssemblyName, since it is
16359 easier to extract info from it.
16361 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
16362 the culture subdirectories too. Fixes #52231.
16364 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16366 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
16367 It takes 2 new parameters with an optional name for the method to look
16368 for and case ignoring info.
16370 * threadpool.c: removed unused variable.
16372 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16374 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
16375 It takes 2 new parameters with an optional name for the property to look
16376 for and case ignoring info.
16379 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
16381 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
16384 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16387 * assembly.c: escape the uri before passing it to g_filename_from_uri.
16390 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
16392 * reflection.c: Add support for more than one unmanaged resource.
16394 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
16395 in field->def_value, as done in all other cases.
16397 * reflection.c (mono_reflection_get_custom_attrs): Add support for
16400 * reflection.c (mono_reflection_create_runtime_class): Remove
16401 errorneous assignment to klass->element_class, since it is already
16402 done in mono_reflection_setup_internal_class.
16404 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16406 * gc.c: added missing LeaveCriticalSection.
16407 * icall.c: indented a couple of lines.
16408 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
16409 if we call EndInvoke inside a callback. Fixes bug #52601.
16411 2004-01-07 Martin Baulig <martin@ximian.com>
16413 * mono-debug-debugger.h
16414 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
16416 2004-01-06 Miguel de Icaza <miguel@ximian.com>
16418 * appdomain.c: Use messages in NotImplementedException.
16420 * exception.c (mono_get_exception_not_implemented): Now this takes
16421 a message argument.
16423 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
16424 exception instead of g_asserting an aborting when something is not
16427 Add some inline docs.
16429 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
16431 * reflection.h: Update after changes to object layout.
16433 * reflection.c: Implement saving of unmanaged aka win32 resources.
16435 * appdomain.c: Bump version number.
16437 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
16438 Handle missing domains gracefully.
16440 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
16442 * file-io.c : On Windows, there are much more invalid_path_chars.
16444 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16446 * class.h, object.c: prepare for GetType () speedup.
16448 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
16450 * profiler.c: workaround for --profile null reference exception on
16451 cygwin. Patch by Patrik Torstensson.
16453 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
16455 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
16456 make work for unaligned access.
16458 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
16460 * class.c: small cleanup (class->fields [i] -> field).
16461 * image.c: check address of metadata is valid.
16463 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
16465 * assembly.h assembly.c (mono_assembly_loaded): New public function to
16466 search the list of loaded assemblies.
16468 * reflection.c (mono_reflection_type_from_name): Use
16469 mono_assembly_loaded instead of mono_image_loaded.
16471 * reflection.c: Fix warnings.
16473 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
16475 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
16476 is dynamic. This is needed since an assembly can contain both dynamic and
16477 non-dynamic images.
16479 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
16482 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
16484 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
16485 to store modules loaded using AddModule.
16487 * reflection.c (mono_image_fill_file_table): Generalize this so it works
16490 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
16492 * reflection.c (mono_image_fill_export_table_from_module): New function to
16493 fill out the EXPORTEDTYPES table from a module.
16495 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
16496 into a separate function. Also handle loaded non-dynamic modules.
16498 * reflection.c (mono_image_basic_init): Fix memory allocation.
16500 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16502 * assembly.c (mono_assembly_load_references): Make this public.
16504 2003-12-19 Martin Baulig <martin@ximian.com>
16506 * class.c (mono_class_initialize_generic): Made this static, take
16507 a `MonoGenericInst *' instead of a `MonoClass *'.
16508 (mono_class_from_generic): Call mono_class_initialize_generic()
16509 unless we're already initialized or being called from
16510 do_mono_metadata_parse_generic_inst().
16512 * class.h (MonoGenericInst): Added `initialized' and
16513 `init_pending' flags.
16515 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
16516 `mono_class_init (gklass)' or mono_class_initialize_generic()
16517 here; set `generic_inst->init_pending' while parsing the
16520 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
16522 * locales.c: include string.h for memxxx prototypes
16524 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
16526 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
16527 constructor when accessing literal fields.
16529 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
16531 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16533 * reflection.c (assembly_add_resource_manifest): New function to fill
16534 the MANIFESTRESOURCE table.
16536 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
16538 * reflection.h: Update to changes in class layout.
16540 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
16541 Reenable call to mono_runtime_is_shutting_down ().
16543 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
16544 determine if the runtime is shutting down.
16546 2003-12-16 Jackson Harper <jackson@ximian.com>
16548 * icall.c: comment out call to mono_runtime_is_shutting_down to
16551 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
16553 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
16554 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
16556 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
16558 * reflection.c: move definition of swap_with_size
16559 to before its first call
16561 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
16563 * appdomain.c (mono_runtime_is_shutting_down): New public function.
16565 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
16568 * object.c: Fix warnings.
16570 * icall.c (ves_icall_Type_Get...): Only consider inherited static
16571 members if FlattenHierarchy is set.
16573 * reflection.c (mono_image_add_decl_security): New function to emit
16574 declarative security.
16576 * reflection.h reflection.c: Add support for declarative security.
16578 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16580 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
16582 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16584 * appdomain.c verify.c: Moved corlib version checking into its own
16585 function in appdomain.c since it needs to create vtables etc.
16587 2003-12-13 Patrik Torstensson <p@rxc.se>
16589 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
16590 instead of unwrapped server.
16592 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
16594 * verify.c (check_corlib): Fix field index.
16596 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
16598 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
16601 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
16603 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
16604 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
16605 cope with sizeof(size_t) != sizeof(guint32).
16607 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16609 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
16610 in case of failure.
16612 2003-12-10 Mark Crichton <crichton@gimp.org>
16614 * icall.c: removed the GetNonZeroBytes. We now handle this case
16617 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
16619 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
16621 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
16624 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
16626 * verify.c (check_corlib): Handle the case when the version field is
16627 initialized by a static constructor.
16629 2003-12-08 Patrik Torstensson <p@rxc.se>
16631 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
16633 2003-12-08 Martin Baulig <martin@ximian.com>
16635 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
16636 a MonoReflectionGenericParameter, also take the parameter index
16637 and name as arguments.
16638 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
16639 (ves_icall_MonoGenericParam_initialize): New interncall.
16640 (ves_icall_Type_make_byref_type): New interncall.
16642 * reflection.h (MonoReflectionGenericParam): Derive from
16643 MonoReflectionType, not just from MonoObject. Added `refobj' and
16646 * reflection.c (mono_reflection_define_generic_parameter): Create
16647 and return a new MonoReflectionGenericParam; don't initialize the
16649 (mono_reflection_initialize_generic_parameter): New public method;
16650 initializes the constraints and creates the `param->pklass'.
16652 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
16654 * reflection.h reflection.c: Use the new fields 'num_types',
16655 'num_fields' and 'num_methods' to track the number of types etc.
16657 * verify.c (check_corlib): Check corlib version number.
16659 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
16661 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
16662 function works on all methods.
16664 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
16666 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
16667 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
16668 the custom_type_info flag of the transparent proxy.
16669 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
16670 objects that supports IRemotingTypeInfo.
16671 * object.h: Added custom_type_info field in transparent proxy.
16673 2003-12-06 Martin Baulig <martin@ximian.com>
16675 * class.c (mono_class_create_from_generic): Removed.
16676 (mono_class_from_generic): Check `ginst->klass' before doing
16677 anything else. This is important to fully support "recursive"
16680 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
16681 empty `generic_inst->klass' before doing anything else.
16683 2003-12-06 Dick Porter <dick@ximian.com>
16688 * locales.c: Use C structs to access class fields. Don't do a
16689 conversion between MonoString and UChar because both are
16690 platform-endian UTF-16. Compare now takes startindex and count
16691 parameters. Add a char overload for IndexOf. Speed up the
16692 invariant string IndexOf.
16694 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
16696 * Makefile.am (monosn_LDADD): Fix parallel build.
16698 2003-12-04 Martin Baulig <martin@ximian.com>
16701 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
16702 (ves_icall_Type_make_array_type): New interncall.
16704 2003-12-04 Martin Baulig <martin@ximian.com>
16706 * locales.c: also change it in the !HAVE_ICU case.
16708 2003-12-04 Dick Porter <dick@ximian.com>
16711 * locales.c: construct_compareinfo is now in CompareInfo, not
16714 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
16716 * image.c (mono_image_load_file_for_image): Cache loaded images in the
16717 image->files array.
16719 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
16722 * assembly.c (mono_assembly_load_references): Only load references
16725 * class.c (mono_class_from_name): Avoid linear search of the
16726 EXPORTEDTYPE table.
16728 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
16730 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
16732 * image.h (MonoImage): Add 'field_cache' field.
16734 * loader.c (mono_field_from_token): Cache field lookups.
16736 * reflection.c (mono_module_get_object): Fix name property.
16738 * icall.c (ves_icall_get_enum_info): Update after changes to
16739 mono_metadata_get_constant_index ().
16741 * icall.c: Get rid of get_type_info icall, use a separate icall for
16742 each type property to avoid needless memory allocations. Fixes #51514.
16744 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
16745 to avoid needless binary searches.
16747 * class.c (class_compute_field_layout): Move the initialization of
16748 field->def_value to mono_class_vtable ().
16750 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
16753 * object.c (mono_object_allocate): Make it inline.
16755 * object.c (mono_object_allocate_spec): Make it inline.
16757 2003-12-02 Dick Porter <dick@ximian.com>
16759 * locales.c (create_NumberFormat): NumberFormatInfo construction.
16760 Patch by Mohammad DAMT (mdamt@cdl2000.com).
16762 2003-12-01 Dick Porter <dick@ximian.com>
16764 * threads.c: Fix signature and call in CreateMutex and
16767 2003-12-01 Dick Porter <dick@ximian.com>
16770 * locales.c: Implement string compares and searching
16772 * object.h: Add extra Thread field
16774 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
16776 * reflection.c (fixup_method): Add support for MonoCMethod.
16778 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
16780 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
16782 * reflection.c (assembly_name_to_aname): Allow extra characters in
16783 assembly names. Fixes #51468.
16785 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
16787 * exception.c (mono_exception_from_name_domain): New helper function.
16789 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
16790 exception object in the correct domain.
16792 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
16793 formatting + make a copy a the input data.
16795 * loader.c (mono_get_method_from_token): Methods which contain
16796 native code do not have entries in the ImplMap.
16798 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
16799 Thanks to Gonzalo for spotting this.
16801 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
16802 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
16804 * assembly.h (mono_assembly_load_from): Split the second part of
16805 assembly loading into a new public function.
16807 * exception.h (mono_get_exception_bad_image_format): New function.
16809 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
16811 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16812 Enumerate all modules inside a dynamic assembly. Fixes #51293.
16814 * icall.c: Add new icall for creating dynamic methods.
16816 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
16818 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
16820 * reflection.c (mono_reflection_create_dynamic_method): New icall to
16821 create a dynamic method.
16823 * reflection.c (resolve_object): New helper function.
16825 * reflection.c: Generalize ReflectionMethodBuilder and the functions
16826 which manipulate it so they can also work on dynamic methods.
16828 * reflection.c (reflection_method_builder_to_mono_method): Avoid
16829 creating the MonoReflectionMethodAux structure if it is not needed.
16831 * reflection.h verify.c: Update after changes to object layout.
16833 * reflection.c (method_builder_encode_signature): Fix compilation on
16836 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
16838 * appdomain.h: Added support for context static fields. Added static_data
16839 field to MonoAppContext and renamed thread_static_fields to a more
16840 generic special_static_fields in MonoAppDomain, since it can now contain
16841 context static fields.
16842 * domain.c: Updated hashtable name.
16843 * object.c: Replaced field_is_thread_static() for a more generic
16844 field_is_special_static() which also checks for context static attribute.
16845 In mono_class_vtable(), added support for static context fields.
16846 * threads.c: Changed methods that manage thread static fields to more
16847 generic methods so they can be reused both for thread and context static
16849 * threads.h: Declared some new methods.
16851 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
16853 * reflection.h: Update after changes to the managed types.
16855 * reflection.c (encode_custom_modifiers): New helper function.
16857 * reflection.c (method_encode_signature): Emit custom modifiers.
16859 * reflection.c (field_encode_signature): Emit custom modifiers.
16861 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
16863 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
16865 * icall.c (ves_icall_System_ValueType_Equals): New optimized
16868 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
16871 * object.c (mono_field_get_value_object): New function.
16873 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
16876 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
16878 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
16879 return a preallocated out-of-memory exception instance.
16881 * object.c (out_of_memory): Use the new function.
16883 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
16884 flag is before the custom modifiers. Fixes #49802.
16886 2003-11-16 Martin Baulig <martin@ximian.com>
16888 * class.c (mono_class_is_open_constructed_type): Implemented the
16889 MONO_TYPE_GENERICINST case.
16891 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
16893 * assembly.c (mono_assembly_fill_assembly_name): New function to
16894 fill out the MonoAssemblyName structure.
16895 (mono_assembly_open): Use the new function.
16897 * icall.c (fill_reflection_assembly_name): New helper function.
16899 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
16902 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
16904 2003-11-15 Martin Baulig <martin@ximian.com>
16906 * class.c (mono_class_is_open_constructed_type): New public
16907 function; checks whether a type is an open constructed type,
16908 ie. whether it still contains type parameters.
16909 (mono_class_inflate_generic_type): If we're a type parameter and
16910 the inflated type is also a MONO_TYPE_(M)VAR, return the original
16913 * class.h (MonoGenericInst): Added `guint32 is_open'.
16915 * loader.c (method_from_methodspec): Check whether we're an open
16916 or closed constructed type and set `ginst->is_open'.
16918 * reflection.c (mono_reflection_bind_generic_parameters): Check
16919 whether we're an open or closed constructed type and set
16921 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
16922 from open constructed types.
16924 2003-11-15 Martin Baulig <martin@ximian.com>
16926 * reflection.c (mono_reflection_bind_generic_parameters): If we're
16927 a generic instance (instead of a generic type declaration) with
16928 unbound generic parameters, bind them to our actual types.
16930 2003-11-14 Martin Baulig <martin@ximian.com>
16932 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
16934 * reflection.c (mono_reflection_bind_generic_parameters): If we're
16935 an interface type, populate `res->interfaces' with instantiated
16936 versions of all the interfaces we inherit.
16938 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
16940 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
16941 when MONO_PATH is set but doesn't contain the install dir.
16943 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16946 (ves_icall_Type_GetInterfaces): don't return an interface twice when
16947 it's also implemented in base classes. Fixes bug #50927.
16949 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
16951 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
16952 if this method is called from a finalizer. Fixes #50913.
16954 2003-11-12 Miguel de Icaza <miguel@ximian.com>
16956 * threads.c: Implement VolatileRead/VolatileWrite
16958 * icall.c: Add new icalls for VolatileRead/VolatileWrite
16960 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16962 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
16963 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
16966 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
16967 from Peter Ross (pro@missioncriticalit.com).
16969 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
16971 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
16973 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16975 * assembly.c (mono_assembly_load_references): Disable check because it
16976 triggers on older corlibs which lots of people have.
16978 2003-11-12 Jackson Harper <jackson@ximian.com>
16980 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
16981 load corlib.dll if mscorlib.dll is not found.
16982 * assembly.h: Remove corlib name define.
16985 * image.c: Change corlib name to mscorlib.
16987 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16989 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
16991 2003-11-11 Miguel de Icaza <miguel@ximian.com>
16993 * appdomain.h: Added loader_optimization here to sync with the C#
16994 code, and add disallow_binding_redirects field.
16996 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
16998 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
17000 * reflection.c (mono_image_build_metadata): Fix crash on modules
17003 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
17005 * icall.c (ves_icall_get_method_info): Return callingConvention as
17008 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
17009 namespaces from the EXPORTEDTYPE table as well.
17011 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
17012 from all modules inside the assembly.
17014 2003-11-11 Martin Baulig <martin@ximian.com>
17016 * reflection.c (mono_reflection_bind_generic_parameters): Make
17017 this work for interfaces.
17019 2003-11-11 Martin Baulig <martin@ximian.com>
17021 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
17023 2003-11-11 Martin Baulig <martin@ximian.com>
17025 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
17026 "MonoInflatedMethod" and "MonoInflatedCtor".
17028 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
17030 * reflection.c (resolution_scope_from_image): Use the assembly table
17031 from the manifest module, since other modules don't have it.
17033 * debug-helpers.c (mono_type_full_name): New helper function.
17035 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
17037 * image.c (mono_image_load_file_for_image): New public function which
17038 is a replacement for the load_file_for_image in class.c.
17040 * assembly.c (mono_assembly_load_module): A wrapper for the function
17041 above which does assembly association and reference loading too.
17043 * class.c (mono_class_from_name): Call mono_assembly_load_module.
17045 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17047 * appdomain.c: not all of the attributes for the full assembly name
17048 are required and the order doesn't matter. Fixes bug #50787.
17050 2003-11-10 Dick Porter <dick@ximian.com>
17052 * locales.c: Use platform-endian UTF16
17054 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
17056 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
17058 2003-11-10 Martin Baulig <martin@ximian.com>
17061 (mono_metadata_load_generic_params): Make this actually work.
17063 * reflection.c (mono_reflection_bind_generic_parameters): If our
17064 parent is a generic instance, pass all the `types' to it, no
17065 matter whether it has the same number of type parameters or not.
17067 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
17069 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
17071 * assembly.c (mono_assembly_load_references): Move the image<->assembly
17072 assignment code to this function so it gets called recursively for all
17075 * image.c (load_modules): Remove the assembly assignment since it is
17076 now done by mono_assembly_load_references.
17078 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
17079 Add 'module' argument.
17080 (mono_module_get_types): New helper function.
17081 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
17083 2003-11-08 Martin Baulig <martin@ximian.com>
17085 * class.c (mono_class_inflate_generic_method): Interface method
17086 don't have a header.
17088 * reflection.c (mono_image_get_methodspec_token): Take an
17089 additional `MonoGenericInst *' argument instead of reading it from
17090 the header; this is necessary to support interfaces.
17091 (mono_image_create_token): Pass the `MonoGenericInst *' from the
17092 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
17093 (inflated_method_get_object): Take an additional `MonoGenericInst *'
17096 * reflection.h (MonoReflectionInflatedMethod): Added
17097 `MonoGenericInst *ginst'.
17099 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
17101 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
17103 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
17105 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
17107 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
17110 (reflection_methodbuilder_from_method_builder):
17111 (reflection_methodbuilder_from_ctor_builder): New helper functions to
17112 initialize a ReflectionMethodBuilder structure.
17113 (mono_image_get_methodbuilder_token):
17114 (mono_image_get_ctorbuilder_token): New functions to emit memberref
17115 tokens which point to types in another module inside the same assembly.
17117 * reflection.c: Use the new helper functions.
17119 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
17121 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
17122 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
17124 * reflection.c (resolution_scope_from_image): Emit a moduleref if
17127 * reflection.c (mono_image_build_metadata): Emit metadata only for the
17128 current module. Emit the manifest only for the main module.
17130 * reflection.c (mono_image_create_token): Add assertion when a
17131 memberref needs to be created.
17133 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
17135 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
17136 larger buffer for the custom attribute blob. Fixes #50637.
17138 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17140 * threadpool.c: notify listener on async processing handles after
17141 invoking the async callback. Thanks to Zoltan.
17143 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
17145 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
17146 avoid code duplication.
17148 * reflection.h (MonoDynamicImage): New type which is currently unused,
17149 but will be used through the ref.emit code in place of
17150 MonoDynamicAssembly.
17152 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
17155 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
17156 a MonoDynamicImage instead of just a MonoImage.
17158 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
17159 icalls to ModuleBuilder but keep their semantics, so they will work
17160 with moduleb->assemblyb. This will change later.
17162 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
17164 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
17167 * reflection.c (mono_image_build_metadata): Avoid creation of a default
17168 main module, since it is now done by the managed code.
17170 2003-11-03 Martin Baulig <martin@ximian.com>
17172 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
17173 `ginst->klass' here.
17174 (method_encode_methodspec): Don't use the `ginst->generic_method's
17175 klass if it's a generic instance, use `ginst->klass' in this case.
17177 2003-11-03 Martin Baulig <martin@ximian.com>
17179 * reflection.c (mono_image_get_generic_method_param_info):
17180 Removed, use mono_image_get_generic_param_info() instead.
17181 (mono_image_get_type_info): Write the GenericParam table before
17182 the Method table. This is neccessary because in the GenericParam
17183 table, type parameters of the class (ie. '!0' etc.) must come
17184 before the ones from its generic methods (ie. '!!0' etc).
17186 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
17188 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
17190 2003-11-02 Martin Baulig <martin@ximian.com>
17192 * reflection.c (create_generic_typespec): Take a
17193 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
17194 the generic parameters from it.
17196 2003-11-02 Martin Baulig <martin@ximian.com>
17198 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
17199 instead of a `MonoClassField *' since we just need the type.
17200 (create_generic_typespec): New static function. Creates a
17201 TypeSpec token for a generic type declaration.
17202 (mono_image_get_generic_field_token): New static function.
17203 (mono_image_create_token): If we're a FieldBuilder in a generic
17204 type declaration, call mono_image_get_generic_field_token() to get
17207 2003-11-02 Martin Baulig <martin@ximian.com>
17210 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
17211 `MonoReflectionGenericInst *declaring_type' and
17212 `MonoReflectionGenericInst *reflected_type' fields.
17214 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
17215 `MonoReflectionGenericInst *declaring_type' and a
17216 `MonoReflectionGenericInst *reflected_type' argument instead of a
17217 single `MonoReflectionGenericInst *type' one. Set
17218 `res->declaring_type' and `res->reflected_type' from them.
17219 (mono_reflection_inflate_field): Likewise.
17221 2003-11-02 Martin Baulig <martin@ximian.com>
17223 * class.c (mono_class_setup_vtable): Don't store generic methods
17226 2003-11-02 Martin Baulig <martin@ximian.com>
17228 * reflection.h (MonoReflectionGenericInst): Added
17229 `MonoReflectionType *declaring_type'.
17231 * reflection.c (mono_reflection_bind_generic_parameters): Use
17232 `if (tb->parent)' instead of `klass->parent'.
17234 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
17236 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
17237 with an empty ASSEMBLY table.
17239 * reflection.c (mono_image_build_metadata): Avoid using the same loop
17240 variable in the inner and outer loops.
17242 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
17244 * metadata.h (mono_metadata_make_token): Put parentheses around macro
17247 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
17249 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
17250 icalls. Instead, do everything in managed code. This is needed since
17251 it is hard to restore the original domain etc. in unmanaged code in the
17252 presence of undeniable exceptions.
17254 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
17255 New icalls to push and pop appdomain refs.
17257 2003-10-31 Martin Baulig <martin@ximian.com>
17259 * class.c (inflate_generic_type): Renamed to
17260 mono_class_inflate_generic_type() and made it public.
17262 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
17265 * loader.c (mono_field_from_memberref): Also set the retklass for
17268 * fielder.c (mono_image_get_inflated_field_token): New static
17269 method; creates a metadata token for an inflated field.
17270 (mono_image_create_token, fixup_method): Added support for
17271 "MonoInflatedField".
17272 (fieldbuilder_to_mono_class_field): New static function.
17273 (mono_reflection_inflate_field): New public function.
17276 (MonoReflectionGenericInst): Added `MonoArray *fields'.
17277 (MonoReflectionInflatedField): New typedef.
17279 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
17281 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
17282 for Solaris and other platforms without s6_addr16
17284 2003-10-30 Martin Baulig <martin@ximian.com>
17286 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
17287 argument instead of two.
17288 (mono_class_inflate_generic_signature): Likewise.
17289 (inflate_generic_header): Likewise.
17290 (mono_class_inflate_generic_method): Likewise. In addition, if
17291 `ginst->klass' is set, it becomes the new `method->klass'.
17293 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
17296 * reflection.c (encode_generic_method_sig): Write a 0xa as the
17297 first byte. [FIXME]
17298 (method_encode_methodspec): If we have generic parameters, create
17299 a MethodSpec instead of a MethodRef.
17300 (fixup_method): Added support for "MonoInflatedMethod" and
17301 "MonoInflatedCtor".
17302 (mono_image_create_token): Added support for "MonoInflatedMethod"
17303 and "MonoInflatedCtor".
17304 (inflated_method_get_object): New static function; returns a
17305 managed "System.Reflection.MonoInflatedMethod" object.
17306 (mono_reflection_bind_generic_method_parameters): Return a
17307 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
17308 (mono_reflection_inflate_method_or_ctor): Likewise.
17309 (mono_image_get_generic_method_param_info): Initialize unused
17311 (mono_image_get_generic_param_info): Likewise.
17313 * reflection.h (MonoReflectionInflatedMethod): New public
17314 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
17315 "S.R.MonoInflatedCtor" classes.
17317 * loader.c (method_from_memberref): If we're a TypeSpec and it
17318 resolves to a generic instance, inflate the method.
17320 2003-10-28 Dick Porter <dick@ximian.com>
17322 * object.c (mono_runtime_run_main): Convert command-line arguments
17323 into utf8, falling back to the user's locale encoding to do so.
17325 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
17327 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
17330 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
17332 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
17333 up icalls at method definition time. Partially fixes #33569.
17335 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
17337 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
17338 marshalling of arrays. Fixes #50116.
17340 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
17342 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
17343 points to a vtable in the dying appdomain.
17345 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
17346 listeners into unmanaged code inside the lock.
17348 * object.c (mono_class_vtable): Turn off typed allocation in non-root
17349 domains and add some comments.
17351 2003-10-25 Martin Baulig <martin@ximian.com>
17353 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
17355 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
17357 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
17358 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
17359 currently parsing. Create the generic class and store it in
17360 `generic_inst->klass' before parsing the type arguments. This is
17361 required to support "recursive" definitions; see mcs/tests/gen-23.cs
17363 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
17364 to support recursive typespec entries.
17366 * class.c (mono_class_setup_parent): If our parent is a generic
17367 instance, we may get called before it has its name set.
17368 (mono_class_from_generic): Splitted into
17369 mono_class_create_from_generic() and mono_class_initialize_generic().
17371 2003-10-25 Martin Baulig <martin@ximian.com>
17373 * icall.c (ves_icall_Type_BindGenericParameters): Return a
17374 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
17375 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
17376 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
17378 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
17379 (create_typespec): Likewise.
17380 (mono_reflection_bind_generic_parameters): Return a
17381 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
17382 (mono_reflection_inflate_method_or_ctor): New public function.
17384 * reflection.h (MonoReflectionGenericInst): New typedef.
17386 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
17388 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
17389 inside the domain lock. Fixes #49993.
17391 * object.c (mono_class_vtable): When typed allocation is used,
17392 allocate vtables in the GC heap instead of in the mempool, since the
17393 vtables contain GC descriptors which are used by the collector even
17394 after the domain owning the mempool is unloaded.
17396 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
17398 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
17399 reflect what it does. Also invalidate mempools instead of freeing
17400 them if a define is set.
17402 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
17405 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
17406 hold the finalizable objects in this domain.
17408 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
17411 * appdomain.c (mono_domain_set): New function to set the current
17412 appdomain, but only if it is not being unloaded.
17414 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
17415 appdomain which is being unloaded.
17417 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
17418 unloading of the root appdomain.
17420 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
17421 icall to execute a method in another appdomain. Intended as a
17422 replacement for InternalSetDomain, which can confuse the code
17423 generation in the JIT.
17425 * appdomain.c (mono_domain_is_unloading): New function to determine
17426 whenever an appdomain is unloading.
17428 * appdomain.c (mono_domain_unload): New function to correctly unload
17431 * assembly.c (mono_assembly_load_references): Check that an assembly
17432 does not references itself.
17434 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
17435 domain manually, it asks the finalizer thread to do it, then waits for
17436 the result. Also added a timeout.
17438 * icall.c: Register the new icalls.
17440 * threads.h threads.c: Export the mono_gc_stop_world and
17441 mono_gc_start_world functions.
17443 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
17444 function to fill out the mempool with 0x2a.
17446 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
17448 * reflection.h (MonoReflectionMethodAux): New structure to store
17449 information which is rarely used, thus is not in the MonoMethod
17452 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
17453 store the aux info.
17455 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
17456 and marshalling info into the aux structure.
17458 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
17459 from the aux structure.
17461 * loader.c (mono_method_get_param_names): Retrieve the param names from
17464 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
17466 * exception.h exception.c: Add AppDomainUnloadedException && fix
17469 2003-10-21 Dick Porter <dick@ximian.com>
17472 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
17473 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
17475 2003-10-21 Martin Baulig <martin@ximian.com>
17477 * reflection.c (mono_reflection_bind_generic_parameters):
17478 `klass->parent' is NULL for interfaces.
17480 2003-10-21 Martin Baulig <martin@ximian.com>
17482 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17484 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
17486 * exception.c (mono_exception_from_name_msg): New helper function for
17487 creating exceptions and initializing their message field.
17489 * exception.c: Simplify functions using the new helper.
17491 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
17494 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
17495 mono_raise_exception, since otherwise gcc doesn't generate the function
17496 epilog for raise_exception, confusing the stack unwinding in the JIT.
17499 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
17500 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
17503 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17505 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
17508 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
17510 * icall.c: Removed GetUninitializedObject method because
17511 AllocateUninitializedClassInstance does the same.
17513 2003-10-18 Martin Baulig <martin@ximian.com>
17515 * class.c (inflate_generic_signature): Renamed to
17516 mono_class_inflate_generic_signature() and made it public.
17517 (my_mono_class_from_generic_parameter): New static function; if we
17518 don't already have the generic parameter's MonoClass, create a
17519 very simple one which is just used internally in the runtime and
17520 not passed back to managed code.
17522 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
17524 * metadata.h (MonoMethodSignature): Moved the
17525 `MonoGenericParam *gen_params' to the MonoMethodHeader.
17526 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
17528 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
17529 ves_icall_MonoMethod_GetGenericArguments(); this is now an
17530 interncall on the MonoMethod class, not on MethodInfo.
17531 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
17532 calling mono_reflection_bind_generic_method_parameters() directly.
17534 * loader.c (mono_method_get_signature): If this is a MethodSpec;
17535 return the already computed `method->signature'.
17536 (method_from_methodspec): New static function to load a method
17537 from a MethodSpec entry.
17538 (mono_get_method_from_token): Call the new method_from_methodspec()
17539 for MethodSpec tokens.
17540 (mono_get_method_from_token): If we're a generic method, load the
17543 * reflection.c (mono_image_get_memberref_token): Allow
17544 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
17546 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
17547 (mono_image_create_token): First check whether it's a generic
17548 method (so we'd need to create a MethodSpec), then do the other
17550 (mono_reflection_bind_generic_method_parameters): Return a
17551 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
17552 called directly from the interncall.
17554 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
17556 * reflection.c (load_public_key): Move loading of the public key
17559 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
17561 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
17564 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
17565 culture, hash_alg and public_key. Fixes #49555.
17567 2003-10-17 Martin Baulig <martin@ximian.com>
17569 * class.h (MonoGenericInst): Moved this declaration here and added
17570 `MonoMethod *generic_method'.
17573 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
17574 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
17576 * metadata.c (mono_metadata_type_equal): Two types of
17577 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
17578 index; ie. don't compare the address of the `MonoGenericParam'
17580 (mono_metadata_load_generic_params): Removed the `MonoMethod
17583 * metadata.h (MonoGenericInst): Moved declaration to class.h.
17584 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
17586 * reflection.c (method_encode_signature): Encode the number of
17587 generic parameters.
17588 (encode_generic_method_sig): New static function.
17589 (method_encode_methodspec): New static function; creates an entry
17590 in the MethodSpec table for a generic method.
17591 (mono_image_get_methodspec_token): New static function.
17592 (mono_image_create_token): Call mono_image_get_methodspec_token()
17593 for generic methods.
17594 (mono_reflection_bind_generic_method_parameters): New public
17595 function. Instantiates a generic method.
17597 2003-10-16 Martin Baulig <martin@ximian.com>
17599 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
17600 *gen_params' here from MonoMethodHeader.
17602 * metadata.c (mono_metadata_parse_method_signature): If we have
17603 generic parameters, initialize `method->gen_params' and then set
17604 the correct `type->data.generic_param' in all the parameters.
17606 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
17608 * threads.c (mono_threads_get_default_stacksize): New function to
17609 return the default stacksize.
17611 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
17612 termination of the finalizer thread, since the previous method had
17613 race conditions. Fixes #49628.
17615 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
17616 as for the other managed threads.
17618 2003-10-16 Martin Baulig <martin@ximian.com>
17620 * class.c (inflate_generic_signature): Copy `generic_param_count'
17623 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
17626 * metadata.c (mono_metadata_parse_method_signature): Actually set
17627 the `method->generic_param_count' here.
17628 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
17630 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
17632 * object.h: Add a new field to TypedRef to simplify the implementation
17633 of the REFANY opcodes in the JIT.
17635 * icall.c: Make use of the new field.
17637 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
17640 2003-10-15 Martin Baulig <martin@ximian.com>
17642 * class.c (mono_class_from_gen_param): Renamed to
17643 mono_class_from_generic_parameter() and moved most of the
17644 functionality from mono_reflection_define_generic_parameter()
17645 here; ie. we create a "real" class here.
17646 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
17647 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
17648 previously been called.
17650 * class.h (MonoGenericParam): Moved the declaration of this struct
17651 here from metadata.h and added `MonoMethod *method'.
17653 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
17656 * loader.c (mono_get_method_from_token): If we have any generic
17657 parameters, call mono_metadata_load_generic_params() to read them
17658 from the MONO_TABLE_GENERICPAR.
17660 * metadata.c (mono_metadata_load_generic_params): Added
17661 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
17663 * metadata.h (MonoMethodSignature): Replaced
17664 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
17665 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
17667 * reflection.c (mono_reflection_define_generic_parameter): Moved
17668 most of the functionality into the new
17669 mono_class_from_generic_parameter(); set the `method' field if
17670 we're a method parameter.
17672 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
17674 * marshal.c (emit_struct_conv): if native size is 0
17677 2003-10-14 Martin Baulig <martin@ximian.com>
17679 * icall.c: The generics API has changed in the spec since it was
17680 added to System.Type; these modifications make it match the spec
17682 (ves_icall_Type_GetGenericParameters): Renamed to
17683 `ves_icall_Type_GetGenericArguments'.
17684 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
17685 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
17686 `ves_icall_MonoType_get_HasGenericArguments'.
17687 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
17688 `ves_icall_MonoType_get_IsGenericParameter'.
17689 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
17690 this is no interncall anymore.
17691 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
17692 `ves_icall_TypeBuilder_get_IsGenericParameter'.
17694 2003-10-14 Martin Baulig <martin@ximian.com>
17696 * reflection.c (mono_reflection_bind_generic_parameters): Also
17697 inflate generic methods if we're reading the class from IL.
17699 2003-10-13 Martin Baulig <martin@ximian.com>
17701 * reflection.c (mono_reflection_define_generic_parameter): This
17702 method isn't called directly from the icall anymore; take a
17703 `MonoReflectionAssemblyBuilder *' so we can use this for type and
17704 method generic parameters.
17705 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
17706 (method_builder_encode_signature): Encode generic parameters.
17707 (mono_image_get_method_info): Write generic params to the
17708 MONO_TABLE_GENERICPARAM table.
17710 * reflection.h (MonoReflectionMethodBuilder): Added
17711 `MonoArray *generic_params'.
17713 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
17715 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
17716 wrapper for mono_reflection_define_generic_parameter().
17717 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
17719 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
17721 * marshal.h: Add missing function to fix build.
17723 * marshal.c (mono_marshal_get_native_wrapper): Add support for
17724 the SetLastError pinvoke attribute.
17726 * marshal.c (mono_marshal_set_last_error): New helper function called
17727 by the generated code.
17729 * marshal.c (mono_mb_emit_branch): New helper function.
17731 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
17733 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
17734 classes as parameters and return values of delegates. Fixes #29256.
17736 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
17738 * locales.c: use gint32 in non HAVE_ICU case
17740 2003-10-11 Martin Baulig <martin@ximian.com>
17742 * mono-debug.c (mono_debug_add_method): Added a workaround for
17745 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
17747 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
17748 delegates passed to native code must use the STDCALL calling
17749 convention. Fixes #35987.
17751 2003-10-10 Martin Baulig <martin@ximian.com>
17753 * class.c (inflate_generic_type): If we're inflating for a generic
17754 type instance (and not for a generic method), return
17755 MONO_TYPE_MVAR unchanged.
17757 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17759 * string-icalls.c: Join ignores null strings in the source array.
17760 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
17761 * threads.c: GetAvailableTheads is slightly more accurate.
17763 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
17765 * threads.h threads.c : add mono_threads_set_default_stacksize
17766 and pass default to CreateThread calls.
17768 2003-10-09 Dick Porter <dick@ximian.com>
17772 * locales.c: Internal calls for constructing CultureInfo and
17773 related objects from libicu (if its available.)
17775 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
17777 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
17779 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17781 * threadpool.c: added an argument to async_invoke_thread that is the
17782 item to process, pass the MonoAsyncResult to the thread start function
17783 when creating a new thread. This way we don't need to acquire any lock
17784 when we're creating a new thread. Readded a semaphore for faster
17785 response times (instead of that Sleep i added).
17787 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
17789 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17790 get daylight change dates better on Windows, fix handling
17791 of platforms without tm_gmtoff.
17793 2003-10-06 Martin Baulig <martin@ximian.com>
17795 * class.c (inflate_generic_method): Renamed to
17796 mono_class_inflate_generic_method() and made public.
17797 (mono_class_init): Don't inflate the generic methods here.
17798 (mono_class_from_generic): Added `gboolean inflate_methods'
17799 argument. Inflate the methods here.
17801 * loader.c (mono_method_get_param_names): Ignore instances of
17802 generic types for the moment.
17804 * reflection.c (fixup_method): Added support for inflated methods.
17805 (mono_image_create_token): Use mono_image_get_methodref_token()
17806 for inflated methods.
17807 (mono_custom_attrs_from_param): Ignore instances of generic types
17809 (mono_reflection_bind_generic_parameters): New public function.
17810 Moved all the functionality from
17811 ves_icall_Type_BindGenericParameters() here and added support for
17813 (mono_reflection_define_generic_parameter): Initialize
17814 `klass->methods' here.
17816 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
17817 functionality into mono_reflection_define_generic_parameter().
17818 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
17819 TypeBuilder, return that TypeBuilder.
17821 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17823 * appdomain.c: removed mono_delegate_semaphore.
17826 (mono_thread_pool_add): moved hash table creation inside and the thread
17827 creation outside of the critical region.
17828 (mono_thread_pool_finish): removed obsolete code.
17829 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
17830 continue or exit the thread depending on the queue.
17832 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
17834 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
17835 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
17836 handle more bool marshalling options
17838 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
17840 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
17841 arrays of structs. Also add a more descriptive error message when
17842 a structure member is marshalled as LPArray.
17844 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
17846 * marshal.c (mono_marshal_get_native_wrapper): Add support for
17847 marshalling arrays of complex types. Fixes #29098. Also remove an
17848 usused and incomplete function.
17850 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
17852 * gc.c: report heap_size - free_bytes as total memory allocated
17855 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
17857 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
17858 fix timezone handling problems on Windows.
17860 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
17861 asserts when the year is outside the range handled by ms the functions.
17863 * class.c (setup_interface_offsets): If the class is an interface,
17864 fill out its interface_offsets slot.
17866 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17868 * threadpool.c: mark threadpool threads as background.
17870 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
17872 * decimal.c - define DECINLINE to nothing if not using GCC
17874 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
17876 * assembly.c: More refcount fixes.
17878 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17880 * string-icalls.c: if we're not trimming, return the same string.
17881 When not splitting, don't create a new string.
17883 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17886 (mono_image_open): increment the ref_count inside the critical section.
17888 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
17890 * image.c (mono_image_open): Fix reference counting bug.
17892 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
17894 * marshal.c (mono_marshal_type_size) struct alignment changed for
17895 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
17896 64bits. Avoid leak in mono_marshal_get_native_wrapper when
17897 mono_lookup_pinvoke_call throws.
17899 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
17901 * reflection.c (mono_reflection_parse_type): Fix #49114.
17903 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
17904 temporary workaround for cygwin header problem.
17906 * object.c (mono_object_isinst): Synchronize this with the code
17907 generated by the JIT for casts.
17909 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
17911 * reflection.c (encode_type): Fix #38332.
17913 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
17915 * marshal.c (mono_marshal_method_from_wrapper): New function to return
17916 the original method from the wrapper method.
17918 2003-09-25 Martin Baulig <martin@ximian.com>
17920 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
17921 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
17922 (ves_icall_Type_get_IsGenericInstance): New interncall.
17924 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
17926 * object.c: fix cast warning in big endian code.
17928 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
17930 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
17932 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17934 * assembly.c: don't call check_env from mono_assembly_load. It's
17935 already done once in mono_assemblies_init and may cause headaches when
17936 multiple threads are loading assemblies.
17938 2003-09-19 Martin Baulig <martin@ximian.com>
17940 * reflection.c (mono_reflection_define_generic_parameter): Don't
17941 allocate `klass->methods', set `klass->flags' to
17942 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
17944 2003-09-18 Martin Baulig <martin@ximian.com>
17946 * class.c (mono_class_init): Don't create `class->methods' if it's
17947 already initialized.
17949 * metadata.c (mono_metadata_load_generic_params): Make this
17952 * reflection.c (mono_reflection_define_generic_parameter): Set
17953 parent class and interfaces from the constraints.
17955 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
17956 to keep this struct in sync with the declaration in TypeBuilder.cs.
17958 2003-09-17 Martin Baulig <martin@ximian.com>
17960 * metadata.h (MonoType): Replaced the data's `int type_param'
17961 field with `MonoGenericParam *generic_param'.
17962 (MonoGenericParam): Added `MonoClass *klass'.
17964 * class.c (mono_class_from_gen_param): Removed the
17965 `MonoImage *image' and `int type_num' arguments.
17967 * metadata.c (mono_metadata_parse_generic_param): New static
17968 method; creates a MonoGenericParam which just contains the index.
17969 (do_mono_metadata_parse_type): Call
17970 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
17973 * reflection.c (mono_image_typedef_or_ref): Generic type
17974 parameters may be in the same assembly, but never use a typedef
17976 (mono_reflection_define_generic_parameter): We're now creating a
17977 "real" class for the type parameter; it's now safe to call
17978 mono_class_from_mono_type() on the class'es type, it'll do the
17981 2003-09-16 Martin Baulig <martin@ximian.com>
17983 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
17984 `symfile->range_entry_size' and `symfile->class_entry_size' here;
17985 the `symfile' data structure must be fully initialized before it
17986 gets added to the table.
17988 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
17990 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
17992 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
17993 class init trampolines.
17995 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
17997 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
17998 to the built-in profiler to turn off time and allocation profiling
18001 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
18003 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
18006 * debug-helpers.c (mono_method_full_name): Print the wrapper type
18007 in human readable form.
18009 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
18011 * reflection.c icall.c: Fixed warnings.
18013 * image.c (load_class_names): Use a temporary hash table to hold the
18014 namespaces in order to avoid doing many string comparisons.
18016 * image.h: Fix typo.
18018 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
18019 Pass NULL instead of g_direct_equal to the GHashTable constructor
18020 since the NULL case is short-circuited inside g_hash_table_lookup,
18021 leading to better performance.
18023 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
18024 obtain the first custom attribute for a given index. Depends on the
18025 CustomAttribute table being sorted by the parent field.
18027 * reflection.c (mono_custom_attrs_from_index): Use the new function
18028 for better performance.
18030 2003-09-07 Martin Baulig <martin@ximian.com>
18032 * class.c (mono_class_init): If we're a generic instance, inflate
18033 all our methods instead of loading them from the image.
18034 (mono_class_from_generic): Set `class->methods = gklass->methods'.
18036 2003-09-07 Martin Baulig <martin@ximian.com>
18038 * mono-debug-debugger.c: Added support for constructors.
18040 2003-09-06 Martin Baulig <martin@ximian.com>
18042 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
18045 * reflection.c (mono_reflection_setup_generic_class): Call
18046 ensure_runtime_vtable() to create the vtable.
18048 2003-09-05 Martin Baulig <martin@ximian.com>
18050 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
18053 2003-09-04 Martin Baulig <martin@ximian.com>
18055 * reflection.c (mono_reflection_define_generic_parameter): Generic
18056 parameters start with zero.
18058 2003-09-04 Martin Baulig <martin@ximian.com>
18060 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
18062 * reflection.h (MonoReflectionGenericParam): New typedef.
18063 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
18064 the generic parameters from the managed TypeBuilder.
18066 * reflection.c (mono_reflection_define_generic_parameter): New function.
18067 (mono_reflection_create_runtime_class): Encode generic parameters.
18068 (mono_reflection_setup_generic_class): New function; this is
18069 called after adding adding all generic params to the TypeBuilder.
18070 (encode_type): Added MONO_TYPE_VAR.
18072 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
18074 * class.h class.c (mono_class_needs_cctor_run): Moved this method
18077 * assembly.h assembly.c: Moved the AOT loading code into an assembly
18080 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
18082 * reflection.h reflection.c class.h class.c: Delete duplicate
18083 definition of mono_type_get_name () from reflection.c and export the
18086 * class.c: Class loading fixes from Bernie Solomon
18087 (bernard@ugsolutions.com).
18089 * reflection.c: Endianness fixes from Bernie Solomon
18090 (bernard@ugsolutions.com).
18092 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
18094 * assembly.h assembly.c: Define a file format version for AOT
18097 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
18099 * appdomain.h (MonoJitInfo): New field to determine whenever the
18100 code is domain neutral.
18102 2003-08-31 Miguel de Icaza <miguel@ximian.com>
18104 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
18106 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
18108 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
18109 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
18110 Avoid caching the result since strings must be domain specific. Fixes
18113 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
18115 * marshal.c (mono_marshal_init): Make this callable multiple times
18116 since it is hard to find a correct place to call it.
18118 * object.c (mono_runtime_class_init): Execute static constructors in
18119 the correct appdomain.
18121 * image.c (build_guid_table): Handle the case when multiple images have
18124 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18126 * icall.c: added a couple of icalls for System.Web.
18128 2003-08-28 Martin Baulig <martin@ximian.com>
18130 * icall.c (ves_icall_Type_BindGenericParameters): Use
18131 `klass->generic_inst' instead of `&klass->byval_arg' in the
18132 mono_type_get_object() call. The returned type must be
18133 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
18135 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
18139 * object.c (mono_class_proxy_vtable): Make it thread safe.
18141 * pedump.c: Fix warning.
18143 * object.c appdomain.h: Get rid of metadata_section.
18144 It is no longer needed and it was causing deadlocks with domain->lock.
18146 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
18148 2003-08-26 Martin Baulig <martin@ximian.com>
18150 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
18152 2003-08-26 Martin Baulig <martin@ximian.com>
18154 * pedump.c (main): Call mono_metadata_init(),
18155 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
18156 and mono_loader_init().
18158 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
18160 * loader.h: Add missing include to fix build.
18162 * image.h: mono_image_load_references is no more.
18164 * assembly.c: Reworked assembly loading to make it really thread safe.
18165 After these changes, the assembly returned by mono_assembly_open is
18166 fully initialized, i.e. all its references assemblies are loaded.
18168 * assembly.c (mono_image_load_references): Renamed to
18169 mono_assembly_load_references, and made private, since clients no
18170 longer need to call it.
18172 * class.c: Removed calls to mono_assembly_load_references, since it was
18173 a source of deadlocks.
18175 * loader.h loader.c class.h class.c: Protect data structures using a
18176 new lock, the loader lock.
18178 * class.c (mono_class_setup_vtable): Create temporary hash tables and
18179 GPtrArrays only when needed.
18181 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
18182 into empty structures by mcs. Fixes pinvoke7.cs.
18184 * domain.c (mono_init): Call a new initialization function.
18186 * appdomain.c (mono_runtime_init): Call the new initializer function
18187 of the marshal module.
18189 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
18190 inserted into empty structures by mcs. Fixes pinvoke7.cs.
18192 * marshal.h marshal.c: Added locks around the wrapper caches to make
18193 this module thread safe.
18195 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
18196 this argument. Fixes pinvoke1.exe.
18198 2003-08-25 Lluis Sanchez <lluis@ximian.com>
18200 * object.h: Added call_type field to MonoMethodMessage and the corresponding
18201 enumeration of values. Removed fields to store remote call output values in
18202 MonoAsyncResult. Not needed any more.
18203 * object.c: Initialize call_type and async_result fields in mono_message_init.
18204 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
18205 dispatching the message.
18206 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
18207 async call to finish. To do it use a message with EndInvoke call type.
18209 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
18211 * loader.h loader.c (mono_method_hash_marhal_info): New function which
18212 determines whenever a method has marshalling info.
18214 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18216 * assembly.c: fix the build on windows.
18218 2003-08-22 Lluis Sanchez <lluis@ximian.com>
18220 * object.cs: Fixed bug #47785.
18222 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
18224 * string-icalls.c (StringReplace): If their are no occurances of
18225 the old string found return a reference to the supplied
18226 string. This saves some memory and matches MS behavoir.
18228 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18230 * socket-io.c: fixed compilation for systems that define AF_INET6
18231 and don't define SOL_IP/SOL_IPV6.
18233 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
18235 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
18236 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
18238 * rawbuffer.c rawbuffer.h: Make this module thread safe.
18240 * domain.c: Make this module thread safe.
18242 * domain.c (mono_init): Call new initialization function.
18244 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
18245 reference types too. Fixes #38812.
18247 * image.c (mono_image_init): Fixed warnings.
18249 * class.c (mono_class_from_typeref): Handle assembly load failure
18252 * appdomain.c (add_assemblies_to_domain): Handle the case when
18253 the references of an assembly are not yet loaded.
18255 * metadata.c image.c assembly.c: Moved initialization of global
18256 variables to a separate function called at startup since lazy
18257 initialization of these variables is not thread safe.
18259 * image.c assembly.c: Made this module thread safe by adding locks in
18260 the appropriate places.
18262 * domain.c (mono_init): Call the new initialization functions of the
18265 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
18267 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
18268 make a direct call. It is proxy's work to make the call asynchronous.
18269 mono_delegate_end_invoke(): If the targe is a proxy, just collect
18271 * object.cs: mono_method_call_message_new(): read AsyncResult and
18272 state object from parameters list, if this info is requested.
18273 * object.h: Added fields to store remote call output values in
18274 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
18276 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18278 * object.h: add needed fields to MonoThread.
18279 * threads.c, threads.h: allow registering a function to cleanup data
18280 allocated per thread by the JIT.
18282 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18284 * loader.h: portability fix by Bernie Solomon
18285 * <bernard@ugsolutions.com>.
18287 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
18289 * reflection.h reflection.c (mono_param_get_objects): Changed this to
18290 return a MonoArray. This simplifies the code and also ensures that
18291 the cache allways contains an object reference as a value.
18293 * icall.c (ves_icall_get_parameter_info): Simplified using the new
18296 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18298 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
18299 fixes a problem with byte ordering when getting the address family for
18302 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
18304 * .cvsignore: Added monosn.
18306 * reflection.h reflection.c loader.c: Added support for parameter
18307 marshalling to dynamically created types. Fixes #47295.
18309 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18311 * rand.c: remove useless warnings.
18313 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18315 * class.c: implemented ldtoken for methods and fieldrefs.
18317 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18319 * threadpool.c: when mono_async_invoke was called, no one took care of
18320 monitoring the queue. So if the method invoked took some time and we
18321 got new async invoke requests after 500 ms (the thread created waited
18322 that long in WaitForSingleObject), the new async invoke was not called
18323 until the previous one finished.
18325 This is fixed now. Thanks to Totte for helping with it.
18327 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18329 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
18331 2003-08-11 Martin Baulig <martin@ximian.com>
18333 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
18335 2003-08-06 Martin Baulig <martin@ximian.com>
18337 * mono-debug-debugger.c: Added support for static fields,
18338 properties and methods.
18340 2003-08-06 Martin Baulig <martin@ximian.com>
18342 * mono-debug-debugger.c: Don't store the MonoString's vtable to
18343 make this work for applications with multiple application domains.
18345 2003-08-04 Martin Baulig <martin@ximian.com>
18347 * mono-debug-debugger.c: Completely reworked the type support; the
18348 most important thing is that we're now just using one single
18349 `MonoType' instance per type.
18351 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
18353 * mono-endian.h, mono-endian.c, icall.c: Added icall
18354 ves_icall_System_Double_AssertEndianity to assert double word endianity
18355 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
18357 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18359 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
18360 support, icalls and fixes.
18362 2003-07-31 Miguel de Icaza <miguel@ximian.com>
18364 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
18365 classes that are a punctuation character in .NET is not the same a
18368 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18370 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
18372 2003-07-29 Miguel de Icaza <miguel@ximian.com>
18374 * icall.c: Add new MemCopy internalcall.
18375 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
18376 Simplified code; It is not necessary to handle all the cases here,
18377 as the C# code takes care of it. Only handle the case of the name
18378 resource embedded into the assembly.
18380 Changed signature to return the data pointer and the size of the
18383 2003-07-26 Miguel de Icaza <miguel@ximian.com>
18385 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
18386 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
18388 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
18390 * socket-io.c: ignore EINTR error in select.
18392 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18394 * class.h, class.c: removed unused subclasses field in MonoClass.
18396 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
18398 * icall.c: improve fix of get_base_definition(). If the parent class
18399 doesn't have the mehod, look at the parent of the parent.
18400 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
18401 to check if a parameter is an in or out parameter
18402 (PARAM_ATTRIBUTE_IN is not set by default).
18403 mono_method_return_message_restore(): Use mono_class_value_size to
18404 get the size of a value type. mono_type_stack_size (parameterType)
18405 does not return the correct value if parameterType is byRef.
18406 mono_load_remote_field(), mono_load_remote_field_new(),
18407 mono_store_remote_field(), mono_store_remote_field_new():
18408 raise exception if the remote call returns an exception.
18410 2003-07-28 Martin Baulig <martin@ximian.com>
18412 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
18413 method. This is a wrapper around mono_runtime_invoke() which
18414 boxes the instance object if neccessary.
18416 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18418 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
18419 metadata.h, row-indexes.h, verify.c: first cut of generics support.
18421 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18423 * icall.c: disable mcs bug workaround.
18425 2003-07-21 Miguel de Icaza <miguel@ximian.com>
18427 * object.c (mono_runtime_class_init): Take the metadata_section
18428 mutex before obtaining the domain mutex.
18430 * appdomain.h: Added definition of metadata_section mutex here.
18432 * object.c: define metadata_mutex here.
18434 2003-07-24 Ravi Pratap <ravi@ximian.com>
18436 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
18439 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
18441 * reflection.c: Fix bug #46669
18443 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18448 * object.h: fill in the type name for TypeLoadException.
18450 2003-07-23 Ravi Pratap <ravi@ximian.com>
18452 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
18453 relationship between TypeBuilders while compiling corlib) and bug
18454 45993 (Array types returned from the runtime while compiling
18455 corlib were from the loaded corlib).
18457 2003-07-22 Martin Baulig <martin@ximian.com>
18459 * mono-debug-debugger.c: Reworked the type support a bit more;
18460 distinguish between types and classes.
18462 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
18464 * icall.c: add IsArrayImpl icall.
18466 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
18468 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
18469 initializing real_size only once. Also fix bug #46602.
18471 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
18473 * object.c: Renamed mono_metadata_section to metadata_section.
18475 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
18477 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
18478 empty array if the type is an array. Fixed.
18479 ves_icall_MonoMethod_get_base_definition: if the base method
18480 is abstract, get the MethodInfo from the list of methods of
18482 * reflection.c: ParameterInfo.PositionImpl should be zero-based
18483 and it was 1-based. Fixed in mono_param_get_objects.
18485 2003-07-20 Martin Baulig <martin@ximian.com>
18487 * mono-debug.h: Set version number to 31.
18488 (mono_debug_init): Added `MonoDomain *' argument.
18490 * mono-debug-debugger.c: Reworked the type support; explicitly
18491 tell the debugger about builtin types; pass the `klass' address to
18494 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
18496 * image.c: Allow new metadata tables to be loaded without a
18497 warning. Also update the warning message to give the new constant value.
18499 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18501 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
18502 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
18503 array type representation changes.
18505 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18507 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
18508 on Environment.Exit () call.
18510 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18512 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
18513 requires a matching corlib.
18515 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
18517 * Changelog: My editor decided to add a CR to each line. Sorry about that.
18518 Committed again without the CRs.
18520 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
18522 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
18523 getting it from the "this" socket instance. Did not work
18524 if the socket is a subclass of Socket.
18525 Also fixed bug #35371.
18527 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18529 * metadata.c: fixed size for TypedByRef.
18530 * loader.c: when searching for a method, consider the vararg amrker.
18531 * unicode.c, decimal.c: constify some arrays.
18533 2003-07-15 Dick Porter <dick@ximian.com>
18535 * socket-io.c: Fixed compilation for gcc < 3.2.
18537 Fixed compilation for machines that don't have AF_INET6 (thanks to
18538 Bernie Solomon <bernard@ugsolutions.com> for that part.)
18540 Fixed compile warnings.
18542 Fixed formatting and line endings.
18544 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
18547 * socket-io.c: Added IPv6 support.
18549 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
18551 * class.c (mono_class_is_assignable_from): New function to implement
18552 the is_assignable_from logic. Used by mono_object_isinst,
18553 Type::IsAssignableFrom () and the interpreter.
18555 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
18556 Object, even interfaces.
18558 * object.c (mono_object_isinst): Implement in terms of
18559 is_assignable_from.
18561 * icall.c (ves_icall_type_is_assignable_from): New icall.
18563 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
18565 * domain.c (foreach_domain): fix compiler warning.
18567 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
18569 * image.c (load_metadata_ptrs): use g_strndup because strndup is
18570 not available on all plattforms
18572 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
18574 * image.h image.c: Store the metadata version string in MonoImage.
18575 * icall.c: New icall to retrieve the image version.
18576 * reflection.c (create_dynamic_image): Fill in the image version field
18577 * reflection.c (build_compressed_metadata): Use the image version
18578 from the image structure.
18580 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18582 * appdomain.c: modified comment.
18583 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
18584 That will be its last iteration when mono_gc_cleanup is called from
18585 mono_runtime_cleanup and before the domain is unloaded.
18589 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
18591 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
18594 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18596 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
18597 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
18598 Bernie Solomon <bernard@ugsolutions.com>.
18600 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18602 * object.c, object.h: provide mono_object_new_fast() for faster
18603 allocation in some special cases.
18605 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18607 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
18608 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
18610 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18612 * threadpool.c: fix leaks.
18614 2003-07-01 Dick Porter <dick@ximian.com>
18616 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
18617 using MonoGHashTables. Fixes threadpool bug posted to list.
18619 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
18621 * image.h, image.c: added support to load an assembly from a byte array.
18622 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
18623 assembly bundle support.
18625 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
18627 * threadpool.c (mono_thread_pool_add): keep a reference to the
18628 AsyncResult to prevent GC
18630 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18632 * class.c: leak fix.
18634 2003-06-25 Dick Porter <dick@ximian.com>
18636 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
18637 for the async object, the WaitHandle object will close the handle.
18640 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18642 * class.c: in mono_array_class_get (), lookup from the hash with the
18643 same type we insert: this works around a bug in
18644 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
18645 lluis. The real fix will have to wait for after the release.
18647 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18649 * icall.c: fix memory leak when getting type members.
18651 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18653 * reflection.c: added more pubtoken special cases.
18655 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18657 * class.c: handle field offset correctly when class size
18658 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
18660 2003-06-20 Martin Baulig <martin@ximian.com>
18662 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
18665 2003-06-20 Martin Baulig <martin@ximian.com>
18667 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
18669 2003-06-20 Martin Baulig <martin@ximian.com>
18671 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
18672 just distinguish between variables in registers and variables at
18673 an offset relative to a register.
18675 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18677 * icall.c: #ifdef out latest changes until mcs is fixed.
18679 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18681 * icall.c: return members in metadata order.
18683 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18685 * icall.c: avoid infinite loop in GetTimeZoneData.
18687 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18689 * icall.c: added Marshal.Prelink/All icalls.
18691 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18693 * object.c, object.h: fix warnings and do some overflow checking
18694 when creating arrays.
18696 2003-06-17 Dick Porter <dick@ximian.com>
18699 * file-io.c: File attributes need to be tweaked slightly when
18700 passed from the managed to the w32 world.
18702 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18703 * profiler.h profiler-private.h profiler.c: Rework last patch
18704 based on suggestion by Paolo.
18706 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18708 * profiler.h profiler-private.h profiler.c: Added infrastructure for
18709 instruction level coverage data collection.
18710 * profiler.h profiler.c (: Added new callback function which can be
18711 used by the profiler to limit which functions should have coverage
18713 * profiler.c (mono_profiler_load): Call g_module_build_path to
18714 generate the file name of the profiler library.
18716 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18718 * profiler.c, profiler.h, profiler-private.h: added basic block
18719 coverage profiling API.
18721 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
18723 * reflection.c (mono_reflection_create_runtime_class): Add support
18724 for events in dynamically generated code.
18726 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
18729 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18731 * icall.c: when getting timezone info, return reasonable values if we
18732 can't get the actual data.
18734 2003-06-14 Dick Porter <dick@ximian.com>
18736 * threads.c (start_wrapper): Remove the reference to the thread
18737 object in the TLS data, so the thread object can be finalized.
18738 This won't be reached if the thread threw an uncaught exception,
18739 so those thread handles will stay referenced :-( (This is due to
18740 missing support for scanning thread-specific data in the Boehm GC
18741 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
18743 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
18745 * reflection.c: ensure streams and tables are first allocated with
18746 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
18748 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18750 * icall.c: fixed GetElementType for byrefs (bug# 44792).
18752 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
18754 * reflection.c (mono_reflection_create_runtime_class): Add support for
18755 properties to dynamically created classes.
18756 * reflection.c: Fix a few places where non-MonoObjects were inserted
18757 into the tokens hashtable.
18759 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18761 * object.c: some support to handle out of memory exceptions.
18763 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
18765 * marshal.c (mono_marshal_get_native_wrapper): support reference
18768 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18770 * object.h, object.c: more portability stuff from Bernie Solomon.
18771 Unexport mono_object_allocate(). Added mono_object_unbox ().
18772 Set exitcode when an unhandled exception is thrown.
18774 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
18776 * marshal.c (mono_marshal_get_native_wrapper): use custom
18777 marshaler for return types.
18779 2003-06-10 Dick Porter <dick@ximian.com>
18781 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
18782 ip_mreq is available
18784 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18786 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
18787 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
18788 by Bernie Solomon <bernard@ugsolutions.com>.
18790 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
18792 * gc.c (mono_gc_init): Avoid error message on shutdown when
18793 GC_DONT_GC=1 is used.
18795 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
18796 New icall to return the GUID of a module.
18798 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18800 * class.c: ensure instance size always includes the parent's size
18801 even whem class size is set explicitly (fixes bug#44294).
18803 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18805 * profiler.h, profiler.c: made the simple profiler thread-safe,
18806 get more accurate timing info. Allow the loading of an
18807 externally-developed profiler module.
18809 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
18811 * marshal.c (mono_marshal_get_native_wrapper): improved
18812 class/byref arguments.
18813 (mono_marshal_get_native_wrapper): better string marshaling support.
18815 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18817 * class.c: ensure .pack and .size are handled correctly and
18818 simplified layout of static fields.
18820 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18823 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
18825 * loader.c (mono_lookup_pinvoke_call): look for modules in the
18826 current directory (fix bug 44008)
18828 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
18830 * marshal.c (mono_marshal_get_native_wrapper): started support for
18832 (mono_delegate_to_ftnptr): consider marshalling specifications
18834 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18836 * reflection.c, reflection.h: emit custom marshal info.
18838 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18840 * object.c: free the GError.
18841 * icall.c: added CloseEvent_internal.
18843 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
18846 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
18848 * loader.c (mono_method_get_signature): Add support for dynamic
18851 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18853 * reflection.c: fixed bug #43905.
18855 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18857 * class.c, domain.c, icall.c, metadata.h, object.h: support for
18858 handling TypedReference and ArgIterator.
18859 * loader.c, loader.h: added function to get signature at call site.
18861 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18863 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
18864 data readonly. Buglets and warning fixes. Some MethodSpec support.
18866 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18868 * class.h, class.c, object.c: remove relative numbering support.
18870 2003-05-26 Miguel de Icaza <miguel@ximian.com>
18872 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
18873 free the string, until we get a chance to fix Gtk#
18875 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18877 * marshal.c: revert last patch.
18879 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18881 * icall.c: updates for new mono_class_vtable() not calling
18882 the type constructor anymore.
18884 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18886 * object.h, object.c: separate vtable creation from type
18887 initialization. Make running the .cctor thread safe.
18889 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
18891 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
18893 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
18895 * loader.c (mono_get_method): consider calling convention
18897 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
18899 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
18900 to return the invisible global type for a module.
18902 * reflection.c (mono_image_build_metadata): Emit global fields too.
18904 2003-05-20 Peter Williams <peterw@ximian.com>
18906 * loader.c (mono_lookup_internal_call): Add a few newlines.
18908 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
18910 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
18913 * appdomain.c (set_domain_search_path): Recalculate search path when
18914 AppDomainSetup.PrivateBinPath changes.
18916 * object.c (mono_class_compute_gc_descriptor): It turns out some
18917 parts of the class libs (like System.Thread) holds pointers to
18918 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
18919 to treat native int a pointer type here.
18921 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
18923 * appdomain.h, domain.c: add hashtable for jump target resolution.
18925 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
18927 * reflection.h reflection.c icall.c: Added new icalls
18928 GetManifestResourceInfoInternal, GetModulesInternal and support
18931 2003-05-16 Dick Porter <dick@ximian.com>
18935 * file-io.c: Implement System.IO.MonoIO::GetTempPath
18937 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
18939 * object.c: mono_store_remote_field: little fix to previous patch.
18941 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18943 * class.c: add constructors to array classes.
18944 * icall.c: special case array construction for InternalInvoke (),
18946 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
18948 * class.h class.c reflection.c object.c: Added support for field
18949 defaults in dynamically generated classes.
18951 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18953 * reflection.c: properly encode charset for ddlimport.
18955 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18957 * threads.c: allow compiling without GC.
18959 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18961 * appdomain.h, object.c, object.h, threads.c, threads.h: added
18962 handling of thread static data.
18964 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18966 * reflection.h, reflection.c: added mono_custom_attrs_free ().
18968 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
18970 * class.c (mono_array_class_get): always set the serializable flags
18971 (mono_array_class_get): always set the SEALED attribute for array types
18973 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
18975 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
18976 attributes (fix for bug 42021).
18978 2003-05-12 Dick Porter <dick@ximian.com>
18980 * gc.c: Don't run finalizers when the finalizer thread is
18981 finishing up, because the default domain has already been
18984 2003-05-11 Miguel de Icaza <miguel@ximian.com>
18986 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
18987 value is null, we should throw an exception. This is slightly
18988 different than the other conventions used for the constructor.
18990 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18992 * socket-io.c: fixed windows build.
18994 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18996 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
18998 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
19000 * object.c (mono_string_new_wrapper): Compatibility fix for MS
19003 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
19005 * class.c (mono_class_layout_fields): Add experimental GC aware
19006 auto layout facility. Requires class library changes to work correctly.
19008 (mono_class_setup_vtable): Avoid overriding explicit interface
19009 method implementations. Fixes iface3.exe test.
19011 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
19013 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
19014 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
19016 * metadata.h: Add new type classification macro which determines
19017 whenever the type holds an object reference.
19019 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
19021 * marshal.c (mono_marshal_get_native_wrapper): cleanups
19023 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
19025 * gc.c (finalizer_thread): Work around a GC bug.
19027 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
19029 * marshal.c (emit_struct_conv): allow unions
19031 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
19033 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
19035 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
19037 2003-05-06 Martin Baulig <martin@ximian.com>
19039 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
19041 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19044 (Select_internal): allow NULLs, don't create arrays if not needed.
19045 Coupled with Socket.cs changes.
19048 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
19049 register a finalizer for it that will close the semaphore handle. This
19050 fixes the leak and make Lupus' test run with > 4080 loops.
19052 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
19054 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
19055 Jerome Laban (bug #42287)
19057 2003-05-02 Martin Baulig <martin@ximian.com>
19059 * debug-mono-symfile.h
19060 (MonoSymbolFile): Moved declaration into mono-debug.h.
19061 (MonoDebugMethodJitInfo): Likewise.
19062 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
19064 (_mono_debug_address_from_il_offset): Take a
19065 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
19068 (MonoDebugDomainData): New struct.
19069 (mono_debug_get_domain_data): New function.
19070 (mono_debug_add_method): Take an additional `MonoDomain *'
19072 (mono_debug_source_location_from_address): Likewise.
19073 (mono_debug_il_offset_from_address): Likewise.
19074 (mono_debug_address_from_il_offset): Likewise.
19076 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
19078 * reflection.c: one more check for null type in custom attrs.
19080 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19082 * reflection.c: avoid warning (comparison is always false due to limited
19083 range of data type).
19085 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19087 * icall.c: throw an exception in Type.GetField if the argument 'name'
19090 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
19092 * reflection.c: fixed handling of enums in named arguments to custom
19093 attributes (bug #42123).
19095 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19097 * reflection.c: use the right array element type and handle
19098 a null for a Type argument, too.
19100 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
19102 * reflection.c: handle arrays as arguments to custom attributes.
19104 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
19106 * reflection.c: handle a string value in a custom attr
19107 ctor that takes an object.
19109 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
19111 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
19114 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
19116 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
19118 2003-04-27 Martin Baulig <martin@ximian.com>
19120 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
19121 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
19122 MONO_DEBUGGER_EVENT_BREAKPOINT.
19123 (mono_breakpoint_trampoline_code): Removed.
19124 (mono_debugger_event_handler): The last argument is now a
19126 (mono_debugger_insert_breakpoint_full): Removed the
19127 `use_trampoline' argument.
19128 (mono_debugger_method_has_breakpoint): Likewise.
19129 (mono_debugger_trampoline_breakpoint_callback): Renamed to
19130 mono_debugger_breakpoint_callback(); take the method and
19131 breakpoint number as arguments.
19133 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19135 * metadata.c: fix off by one when loading parameters attributes.
19137 2003-04-24 Martin Baulig <martin@ximian.com>
19139 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
19141 2003-04-24 Martin Baulig <martin@ximian.com>
19143 * mono-debug-debugger.c: Moved all code which interacts with the
19144 Mono Debugger here.
19146 * debug-mono-symfile.c: This code now just deals with the symbol
19147 file itself, the debugger code is now in mono-debug-debugger.c.
19149 2003-04-23 Martin Baulig <martin@ximian.com>
19151 * mono-debug.c (mono_debug_source_location_from_il_offset):
19152 New method; like mono_debug_source_location_from_address(), but
19153 takes an IL offset instead of a machine address.
19155 2003-04-23 Martin Baulig <martin@ximian.com>
19157 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
19158 `line' field; this is now computed by the debugger.
19160 2003-04-23 Martin Baulig <martin@ximian.com>
19162 * mono-debug.[ch]: New files. This is the new debugging interface.
19164 * mono-debug-debugger.[ch]: New files. Moved all code which
19165 interacts with the Mono Debugger here.
19167 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
19169 * domain.c (mono_init): initialize mono_defaults.monitor_class
19171 2003-04-21 Miguel de Icaza <miguel@ximian.com>
19173 * reflection.c (method_encode_code): Add a spicy exception to help
19174 future compiler authors.
19176 2003-04-21 Martin Baulig <martin@ximian.com>
19179 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19180 Make this work with relative pathnames; g_filename_to_uri() needs
19181 an absolute filename.
19183 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
19185 * icall.c: Track name changes in Object and ValueType.
19187 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
19189 * metadata.c (mono_type_stack_size): size should be a multiple of
19192 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19195 (internal_domain_finalize): moved into mono_domain_finalize. No need
19196 to create another thread because the finalizers will be run in the
19199 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
19200 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
19201 to be run (MS does this too).
19203 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
19205 * object.c (mono_class_compute_gc_descriptor): Update comment.
19207 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
19209 * image.h: Add synchronized wrapper cache.
19211 * image.c (do_mono_image_open): Initialize cache.
19213 * reflection.c (create_dynamic_mono_image): Initialize cache.
19215 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19217 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
19218 ves_icall_System_Buffer_ByteLengthInternal.
19220 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
19222 * reflection.c: setup klass->nested_in earlier. Allow
19223 a dash in the assembly name.
19225 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
19227 * metadata.c (mono_type_to_unmanaged): dont access
19228 type->data.klass for MONO_TYPE_OBJECT
19229 (mono_type_to_unmanaged): consider System.Delegate class
19231 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
19233 * class.c: just setup supertypes in the proper place instead of
19234 initializing the full element class for arrays.
19236 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
19238 * class.c: ensure the element class of arrays is initialized.
19239 Setup the supertype info for array classes, too.
19241 2003-04-14 Miguel de Icaza <miguel@ximian.com>
19243 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
19245 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19247 * Makefile.am: re-added -m option when running cygpath. This way,
19248 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
19250 * mono-config.c: same codepath for locating mono config file for WIN32
19252 * assembly.c: if mono_assembly_setrootdir is called, don't override
19255 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19257 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
19258 MONO_ASSEMBLIES variable.
19260 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
19262 * icall.c: added Assembly::GetNamespaces() icall.
19264 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19266 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
19268 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
19270 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
19271 * object.c: fixed bug in the construction of vtable for proxies
19273 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
19275 * object.c (mono_array_new): Mark mono_array_new as an icall.
19277 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19279 * class.c: fixed test for public method when overriding interfaces.
19282 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19284 * appdomain.h, domain.c: added mono_domain_foreach() to
19285 be able to access the currently loaded appdomains.
19286 * object.c: make string interning work across sppdomains.
19287 Mark some functions for use as icalls.
19289 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
19291 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
19293 * reflection.h reflection.c: Allocate long living data using
19294 GC_MALLOC_ATOMIC so the collector does not need to scan it.
19296 * reflection.c: Double the allocation size in streams instead of
19297 increasing it, to prevent unneccesary copying on large assemblies.
19299 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
19300 creation if the assembly does not have the Run flag set.
19302 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19304 * class.h: avoid the C++ keywords in header files (Jerome Laban
19305 spotted and fixed this).
19307 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19310 (mono_unhandled_exception): fill in the arguments for the
19311 UnhandledException event. Only trigger that event for the default
19312 domain (as MS does).
19314 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
19316 * object.c: Improve typed allocation stuff based on suggestions from
19317 Paolo. Also turn it on if the GC library supports it.
19319 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
19321 * object.c object.h class.h: Added experimental typed allocation
19322 facility using the interfaces in gc_gcj.h.
19324 * os/gc_wrapper.h: Added new include files.
19326 2003-04-03 Martin Baulig <martin@ximian.com>
19328 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
19329 which is not yet enabled by default.
19331 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
19333 (mono_gc_lock, mono_gc_unlock): New static functions.
19335 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
19336 functions; stop/start the world for the garbage collector. This
19337 is using the windows API; we need to complete the SuspendThread()/
19338 ResumeThread() implementation in the io-layer to make this work on Unix.
19339 (mono_gc_push_all_stacks): New public function; tells the garbage
19340 collector about the stack pointers from all managed threads.
19342 2003-04-03 Martin Baulig <martin@ximian.com>
19344 * object.h (MonoThread): Added `gpointer stack_ptr'.
19346 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
19348 2003-04-03 Martin Baulig <martin@ximian.com>
19350 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
19352 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
19354 * reflection.c (typebuilder_setup_fields): Initialize field.first and
19357 2003-04-02 Miguel de Icaza <miguel@ximian.com>
19359 * loader.c (mono_lookup_internal_call): Report the corlib that is
19362 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
19364 * icall.c (ves_icall_type_GetTypeCode): fixed check for
19365 System.DBNull (it's class not valuetype).
19367 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19369 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
19370 if the array method was already assigned a token (fixes bug#40646).
19372 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
19374 * reflection.c (mono_reflection_get_type): Attempt type resolve even
19375 if no assembly is given.
19377 2003-04-01 Miguel de Icaza <miguel@ximian.com>
19379 * metadata.h: Added the new tables.
19381 * row-indexes.h: Added definitions for new tables.
19383 * metadata.c: Add schemas for new tables, and add support for
19384 computing the sizes of them.
19386 * class.c: Update for handling the new type cases.
19388 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
19390 * metadata.h (MONO_TYPE_IS_VOID): new macro
19392 2003-03-31 Martin Baulig <martin@ximian.com>
19394 * threads.h (MonoThreadCallbacks): Added `thread_created'.
19396 * threads.c (mono_thread_new_init): Call `thread_created' in the
19397 mono_thread_callbacks.
19399 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
19401 * loader.h: added marshalbyrefobject_class to mono_defaults
19402 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
19403 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
19404 generation of output parameters.
19405 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
19406 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
19407 contextbound and the target object belongs to the context of the caller.
19408 * object.h: added context and unwrapped_server variables in MonoRealProxy.
19409 * object.c: Implemented support for interfaces and abstract classes
19410 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
19411 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
19413 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
19415 * class.h class.c (mono_class_is_subclass_of): New function.
19417 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
19418 routines for most common case (calls from ArrayList::ToArray).
19420 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
19421 routine so programs which call Environment::Exit() can be profiled.
19423 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
19424 Added MONO_ARCH_SAVE_REGS.
19426 * icall.c (ves_icall_type_is_subtype_of): Use new function.
19428 2003-03-29 Miguel de Icaza <miguel@ximian.com>
19430 * blob.h: Add a couple of new MonoType types definitions.
19432 * tabledefs.h: Add a couple of new call convs.
19434 2003-03-27 Zoltan Varga <vargaz@freemail.h>
19436 * reflection.h (MonoReflectionDynamicAssembly): track changes in
19437 the layout of the class.
19439 * reflection.c (alloc_table): double the size on overflow to avoid
19440 unnecessary copying.
19442 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
19443 avoid filling out metadata tables and blobs. Also set mb->ilgen to
19444 null so it can be garbage collected.
19446 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
19448 * reflection.c (mono_reflection_get_type): Return the resolved type
19449 only if it is in the assembly we searched.
19451 * reflection.c (ensure_runtime_vtable): Initialize method slots.
19453 * class.c (mono_class_setup_vtable): Set the slot of the overriding
19456 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19459 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
19460 the right one is 'file:///blah', but MS allows it.
19462 (mono_assembly_open): allow 'file://blah'
19464 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
19466 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
19468 * socket-io.c: fixes bug #40310.
19470 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
19472 * reflection.c (mono_reflection_parse_type): handle deeply nested
19475 * reflection.c (mono_image_create_token): Use unique token values
19476 since they will be put into a hash table.
19478 * class.c (mono_class_setup_vtable): If a method occurs in more than
19479 one place in the vtable, and it gets overriden, then change the
19480 other occurances too.
19482 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
19483 object as return type.
19485 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
19487 * icall.c: Deleted "ToString" implementation for double and float
19488 because they are full implemented in managed code.
19490 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19492 * reflection.c, reflection.h: implemented and exported functions
19493 to retrieve info about custom attributes.
19495 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19497 * appdomain.c: moved Uri handling to assembly.c
19498 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
19499 work when using a file Uri in *nix and windows.
19501 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
19502 GetReferencedAssemblies.
19504 2003-03-18 Dick Porter <dick@ximian.com>
19506 * icall.c: Rename a couple of internal calls
19508 * threads.c: Set the thread state to Stopped when a thread exits.
19511 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
19513 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
19516 * object.c (mono_class_vtable): fix warning.
19518 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
19520 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
19522 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
19524 (method_encode_clauses): Create exception info structures in the right
19526 (mono_reflection_setup_internal_class): Initialize supertypes field.
19528 * class.c object.c: Handle interfaces which implement other interfaces
19531 * class.h class.c: Move the supertypes array initialization code into
19532 a separate function so it can be used for dynamic types too. Also call
19533 it earlier, in mono_class_init(), since it can be used before the
19534 type is initialized.
19536 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19540 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
19545 * object.c: remove warnings.
19547 2003-03-13 Martin Baulig <martin@ximian.com>
19549 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
19550 (MonoDebugLexicalBlockEntry): New types.
19552 * debug-mono-symfile.c
19553 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
19555 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19557 * process.c: ret can be any non-zero value accroding to MS doc.
19559 2003-03-07 Miguel de Icaza <miguel@ximian.com>
19561 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
19562 fixing a warning for a miss-used prototype, would have cause
19563 random memory corruption.
19565 2003-03-07 Martin Baulig <martin@ximian.com>
19567 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
19568 getting really annoying ....
19570 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
19572 * reflection.c (fixup_method): added support for array methods.
19574 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19576 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
19577 (pointed out by Michael Adams).
19579 2003-03-04 Dick Porter <dick@ximian.com>
19581 * icall.c: Temporarily reverted the Double and Single ToString()
19582 change, because it broke nunit.
19584 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
19586 * object.h, threads.h: make include files compatible with C++
19587 (patch by Jerome Laban <jlaban@wanadoo.fr>).
19589 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
19591 * icall.c: Erased ToString helper functions for Double and Single.
19592 Now, that implementations ar all in managed code (Double and Single
19595 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
19597 * appdomain.c: Added method for initializing the default context of
19598 a domain. Added internal call for getting the default context.
19599 * appdomain.h: Added context variable in MonoDomain struct.
19600 * domain.c: mono_domain_set also sets the default context of the domain
19601 * icall.c: Mapped internal method InternalGetDefaultContext.
19602 * object.c: mono_object_get_virtual_method returns always a remoting
19603 wrapper if the object is a transparent proxy.
19604 mono_runtime_invoke_array: when creating an object by calling the
19605 constructor, if the created object is a proxy, then the constructor should
19606 be called using the a remoting wrapper.
19608 2003-03-03 Dick Porter <dick@ximian.com>
19610 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
19611 variable so it compiles on solaris. Problem spotted by
19612 Christopher Taylor <ct@cs.clemson.edu>
19614 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19617 (get_info_from_assembly_name): don't leak value.
19620 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
19623 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
19625 * assembly.c: export mono_image_load_references ().
19626 * class.c: handle function pointers. mono_class_from_name() now
19627 supports nested type names directly.
19629 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
19631 * reflection.h reflection.c: Encode already created dynamic methods
19632 and fields correctly as a DEF instead of a REF.
19634 * reflection.c: Get rid of the force_ref argument to
19635 mono_image_typedef_or_ref since it was wrong in the first place.
19637 * string-icalls.c: add error checking to string constructors according
19640 * reflection.c: Emit types in the order their TypeBuilders were
19641 created. Previously, a new table index was assigned to each type before
19642 the tables were emitted. This was wrong because the signature blob
19643 might already refer to a type by its original table index.
19645 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
19647 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
19650 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19652 * Makefile.am: make assemblies dir have \ instead of / on windows.
19654 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
19656 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
19657 iterate over the NESTEDCLASS table using a linear search since the
19658 table is not guaranteed to be sorted by the secondary key.
19660 * class.c (mono_class_create_from_typedef): fixed up call to
19661 mono_metadata_nesting_typedef.
19663 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
19665 * marshal.c (mono_string_to_byvalstr): clear the memory as
19666 suggested by Jerome Laban <jlaban@wanadoo.fr>
19668 2003-02-26 Dick Porter <dick@ximian.com>
19670 * process.c: Cope with padding in .rsrc blocks
19672 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
19674 * metadata.h: reverted the filter_len change, it breaks reflection
19676 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
19678 * metadata.h: added a new field to store the filter_len
19681 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19683 * reflection.c: handle custom attributes for types and members
19684 created with Reflection.Emit (bug#38422).
19686 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
19688 * reflection.c: define RTSpecialName automatically for constructors for
19689 compatibility with MS.NET.
19691 * reflection.c (mono_reflection_create_runtime_class): initialize
19692 nested_in field of dynamically created classes.
19694 2003-02-22 Martin Baulig <martin@ximian.com>
19696 * debug-mono-symfile.h: Incremented version number.
19698 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
19700 * object.h icall.c process.c: fix warnings.
19702 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
19704 * appdomain.h appdomain.c:
19705 (mono_domain_try_type_resolve): split the
19706 name_or_tb argument into a name and a tb argument.
19707 (mono_domain_has_type_resolve): new function to check whenever the
19708 application has registered a TypeResolve event handler.
19710 * icall.c reflection.h reflection.c: move the type resolve logic into
19711 mono_reflection_get_type () so it will be invoked when
19712 Assembly::GetType () is called.
19715 (mono_reflection_get_type): renamed to get_type_internal.
19716 (mono_reflection_get_type): fixed type name generation so it works
19717 for nested types too.
19718 (mono_reflection_get_type): call has_type_resolve () to avoid the
19719 costly type name generation if there is no resolve event handler.
19721 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19723 * class.c, image.c: load exported types from file references.
19725 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
19727 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
19728 used to cache the managed methods used to create proxies and make
19729 remote invocation of methods.
19730 * class.h: Added in MonoVTable a flag to indicate that a class needs
19731 to be remotely created.
19732 * object.c: Modified the method mono_class_vtable(). It now initializes
19733 the remote flag of the vtable. Modified mono_object_new_specific(),
19734 so now it checks the remote flag.
19735 * icall.c: Added a couple of internal methods, one for enabling instance
19736 creation interception for a type, and one for creating objects bypassing
19739 2003-02-18 Martin Baulig <martin@ximian.com>
19741 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
19742 New interncall to get a method's metadata token.
19744 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
19745 New interncall for the debugger.
19747 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
19749 * class.c (mono_class_setup_vtable): allocate supertype array
19751 2003-02-18 Martin Baulig <martin@ximian.com>
19753 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
19755 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19758 (assembly_name_to_aname): jump over unknown properties (i've found
19759 something like: 'type, assembly, version=xxx, custom=null, public...',
19760 so now will ignore custom=null and still get the rest of the values).
19762 2003-02-17 Dick Porter <dick@ximian.com>
19764 * threads.c: Have Thread.Start() wait for a semaphore to signal
19765 that the thread has set up all its local data. This fixes bug
19766 34323, where Abort() raced the new thread's TLS data.
19768 Also removes the handle_store() call from start_wrapper, because
19769 threads are now always created suspended and there is no longer a
19770 race between the parent and child threads to store the info.
19772 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
19774 * image.c: explain the #- heap issue in a message, hopefully
19775 avoiding FAQs on mono-list.
19777 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19780 (GetEntryAssembly): if the domain has not invoked
19781 AppDomain.ExecuteAssembly yet, return the assembly of the default
19784 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
19786 * class.c (mono_ldtoken): make it work in dynamic assemblies.
19788 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
19790 * metadata.c, reflection.c: simple speedup to type hash
19793 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
19795 * image.c, image.h, class.c, assembly.c: move module loading
19796 to MonoImage. When loading metadata, consider alignemnet from
19797 the start of metadata, not from the metadata address in memory.
19799 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
19801 * reflection.c (mono_reflection_get_custom_attrs): Added support for
19802 AssemblyBuilder objects. Factored out custom attribute creation into
19803 a separate function.
19804 (create_custom_attr): new function to create custom attributes.
19806 2003-02-12 Miguel de Icaza <miguel@ximian.com>
19808 * Makefile.am: Got tired of typing the full pathname to pedump.
19809 Until there is another option, am installing this.
19811 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
19813 * class.c (class_compute_field_layout): always set field->parent
19814 (mono_ldtoken): use mono_defaults.fieldhandle_class;
19816 2003-02-11 Dick Porter <dick@ximian.com>
19819 * monitor.c: Rewrote Monitor, making lock much faster and
19820 Pulse/Wait work as specified. Also uses much fewer handles, and only
19821 creates them as needed.
19823 * exception.c: Added SynchronizationLockException
19825 * threads.c: Deleted old Monitor implementation. The new one is
19828 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19830 * class.c: handled TypedReference type code. Set the correct size for
19831 class data. Setup interface_offsets for interface classes, too.
19833 2003-02-09 Martin Baulig <martin@ximian.com>
19835 * debug-mono-symfile.h: Reflect latest symbol writer changes.
19837 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
19839 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
19840 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
19841 * object.c: fixed mono_object_get_virtual_method () for interfaces.
19842 * verify.c: check for code that runs after the end of the method.
19844 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
19846 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
19847 "System.Math::Round2".
19848 * sysmath.h: Added Floor, Round and Round2 definitions.
19849 * sysmath.c: Modified certain functions that were not 100% compliant
19850 with MS.NET (math precision) and added the implementation of Floor,
19853 2003-02-07 Martin Baulig <martin@ximian.com>
19855 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
19857 2003-02-07 Martin Baulig <martin@ximian.com>
19859 * debug-mono-symfile.c: Reflected latest symwriter changes.
19860 (mono_debug_create_mono_symbol_file): Removed.
19861 (mono_debug_open_mono_symbol_file): Take an argument which
19862 specifies whether to create a dynamic symbol file.
19864 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
19866 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
19868 2003-02-05 Martin Baulig <martin@ximian.com>
19870 * reflection.c (mono_image_build_metadata): Make this public,
19871 protect it against being called multiple times, don't create
19872 resources and don't build the compressed metadata here.
19873 (mono_image_create_pefile): Do this here.
19876 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
19878 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19880 * socket-io.c: fixed bug #36322.
19882 2003-02-06 Piers Haken <piersh@friskit.com>
19886 * debug-mono-symfile.c:
19892 * socket-io.c: warning cleanups
19894 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
19896 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
19897 function. works like remoting invoke, but does a check for the Proxy first.
19899 2003-02-05 Miguel de Icaza <miguel@ximian.com>
19901 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
19903 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
19905 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
19907 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
19908 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
19910 * object.c (mono_store_remote_field_new): used by the new jit
19911 instead of mono_store_remote_field
19912 (mono_load_remote_field_new): used by the new jit
19913 instead of mono_load_remote_field
19915 2003-02-05 Patrik Torstensson
19917 * appdomain.c: changed unload to take the domain id instead
19920 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
19923 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19925 * appdomain.c: don't look for assemblies in ApplicationBase if
19926 PrivateBinPathProbe is set.
19928 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19930 * object.c: make the first argument in main_args contain the absolute
19931 path to the assembly. Fixes bug #37511.
19933 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19935 * icall.c: get correct UTC offset for countries not using daylight
19936 time saving. Fixes bug #30030.
19938 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19940 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
19941 and 1 are the family).
19943 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
19945 * icall.c (ves_icall_InternalExecute): removed wrong assertion
19947 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
19949 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
19951 * reflection.c: added support for SignatureHelper tokens, which is
19952 needed by the Calli opcode.
19954 * reflection.h: track changes to SignatureHelper class.
19956 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
19958 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19960 * appdomain.c: fixed loading assemblies from PrivateBinPath.
19962 2003-02-03 Patrik Torstensson
19963 * appdomain.[c|h], domain.c :
19964 - Added support for getting a domain via domain id
19965 - Support for setting and getting domain from System.AppDomain
19966 (used in cross appdomain channel)
19967 - Added support for get/set for a MonoAppContext on a thread
19968 (Context class in System.Runtime.Remoting.Contexts),
19969 - Removed hack in Get/SetData and ExecuteAssembly.
19971 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
19972 the managed world to get control when a proxy is created.
19974 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
19976 2003-02-03 Miguel de Icaza <miguel@ximian.com>
19979 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19980 Populate the codebase field as well.
19982 2003-02-02 Martin Baulig <martin@ximian.com>
19984 * debug-mono-symfile.c
19985 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
19986 (mono_debug_symfile_add_method): Allow interncalls.
19988 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19990 * icall.c: throw parse exception if strtod fails or the string is empty.
19992 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
19994 * marshal.c: handle object type separately from defined
19997 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
19999 * marshal.c: handle NATIVE_LPSTR for strings when it's
20000 explicitly specified.
20002 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
20004 * reflection.c, reflection.h, icall.c: setup the reflection
20005 handle cache for ModuleBuilders and AssemblyBuilders.
20007 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
20009 * reflection.c (reflection_methodbuilder_to_mono_method): set
20012 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20014 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
20016 2003-01-29 Dick Porter <dick@ximian.com>
20018 * threads.c: No need for the fake_thread kludge now that Thread
20019 doesn't run a class constructor
20021 2003-01-29 Dick Porter <dick@ximian.com>
20023 * threads.c: Use g_direct_hash instead of the rather bogus
20026 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
20028 * marshal.c (mono_marshal_get_native_wrapper): add check for null
20029 (fix pinvoke12.exe)
20030 (mono_marshal_get_struct_to_ptr): generate valid IL code
20031 (mono_marshal_get_ptr_to_struct): generate valid IL code
20032 (*): correctly set sig->pinvoke, we need to memdup the signature
20035 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
20037 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
20038 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
20040 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
20042 * profiler.c: provide more callers information.
20044 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
20046 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
20048 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
20050 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
20052 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
20054 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
20055 exception instead of going into an infinite loop on dates which it
20058 * string-icalls.c (ves_icall_System_String_get_Chars): raise
20059 out-of-range exception if needed.
20061 * class.c (mono_class_setup_vtable): allow a virtual method to provide
20062 an implementation for an interface method and to override an inherited
20063 method at the same time.
20064 Imagine a scenario when a virtual method is used to override a
20065 virtual abstract method in a parent class, and this same method
20066 provides an implementation for an method inherited from an interface.
20067 In this case, the interface resolution code will set im->slot, which
20068 means that the virtual method override pass will skip this method
20069 which means a pointer to the abstract method inherited from the parent
20070 will remain in the vtable of this non-abstract class.
20072 * class.c: (mono_class_setup_vtable): continue search for a real
20073 method if only an abstract method is found.
20075 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
20077 * reflection.c: add size to encoding for ByValStr and ByValArray
20078 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
20080 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
20082 * class.c (mono_class_setup_vtable): pass the override info as an
20085 * class.c (mono_class_setup_vtable): set the slot of overriding methods
20088 * reflection.c (ensure_runtime_vtable); add support for method
20091 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
20093 * reflection.c (resolution_scope_from_image): Hack to work to work with
20094 dynamic assemblies.
20096 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
20097 added a 'force_ref' argument to force this function to allways return
20098 a TypeRef. This is needed by mono_image_get_memberref_token ().
20100 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
20102 * reflection.c (mono_image_get_type_info): interfaces really don't have
20105 * reflection.c (mono_image_basic_init): fill out missing fields of
20108 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
20109 dynamic assemblies. This is required so dynamic assemblies show up in
20110 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
20111 Type::GetType() etc. This is consistent with MS behaviour.
20113 * image.c image.h reflection.c: add newly created classes to the name
20114 cache so mono_class_get () will find them.
20116 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
20118 First part of changes to get IKVM.NET running under mono.
20120 * appdomain.h, appdomain.c: added new function
20121 mono_domain_try_type_resolve() which will emit TypeResolve events.
20122 This function will call AppDomain::DoTypeResolve to do the actual work.
20124 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
20125 moved existing code dealing with dynamic tokens to a new function
20126 called mono_reflection_lookup_dynamic_token (). This function will
20127 raise TypeResolve events when appropriate. Since reflection.c is not
20128 part of libmetadata, a new hook function called
20129 mono_lookup_dynamic_token() is added to class.c which will call this.
20131 * assembly.h assembly.c: make the invoke_load_hook function public,
20132 so it can be called for dynamic assemblies.
20134 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
20136 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
20139 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
20140 MonoGHashTable, since it contains pointers to objects which the GC
20143 * assembly.c (search_loaded): remove unused variable.
20145 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
20147 * object.c: fixed issue exposed by gcc-generated IL programs
20148 that use RVA data for pointers.
20150 2003-01-25 Martin Baulig <martin@ximian.com>
20152 * threads.c (start_wrapper): Moved the initialization of
20153 `start_func' above the mono_new_thread_init() call to which we
20154 pass it as argument.
20156 2003-01-24 Martin Baulig <martin@ximian.com>
20158 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
20159 the MonoThread pointer.
20161 2003-01-21 Miguel de Icaza <miguel@ximian.com>
20163 * icall.c: Rename `PowImpl' to Pow.
20165 2003-01-23 Dick Porter <dick@ximian.com>
20167 * threads.c (start_wrapper): Create a Thread object if needed, so
20168 the Main() thread can do the class initialisation in a subthread
20169 that has been set up to allow managed code execution.
20171 Pass the thread ID instead of the MonoThread pointer to the thread
20172 start and attach callbacks. This change is required, because the
20173 jit thread start callback must be called _before_ the Thread
20174 object can be created.
20176 (mono_thread_init): Removed much object creation code that is no
20177 longer needed. No managed code is called from here now.
20179 * object.c (mono_runtime_exec_managed_code): Create a subthread
20180 for Main, and call back to the runtime to use it.
20181 Set the exit code when Main exits.
20183 * gc.c: Make sure domain finalisation happens in a subthread.
20184 Re-enable threaded GC, fixing bug 31333 (again).
20186 * environment.c: System.Environment internall calls (so far just
20187 ExitCode is here, the others are still in icall.c)
20189 * appdomain.c (mono_runtime_cleanup): All threads running managed
20190 code should have finished before mono_runtime_cleanup() is
20191 reached, so no need to clean up threads.
20193 2003-01-22 Martin Baulig <martin@ximian.com>
20195 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
20196 `gpointer func' arguments.
20197 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
20198 but added `MonoThread *thread' argument.
20199 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
20201 * threads.c (mono_new_thread_init): Added `gpointer func' argument
20202 and pass it to the mono_thread_start_cb callback.
20203 (mono_install_thread_callbacks): New public function to install a
20204 set of callbacks which are set by the debugger.
20205 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
20207 2003-01-22 Martin Baulig <martin@ximian.com>
20209 * Makefile.am: Install debug-mono-symfile.h.
20211 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
20213 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
20215 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
20217 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
20218 * class.c (mono_ptr_class_get): correctly set access levels of pointers
20219 (mono_array_class_get): correctly set access levels of arrays
20221 2003-01-20 Patrik Torstensson
20222 * image.h (MonoAssemblyName): changed major, minor, build, revision
20223 from signed to unsigned.
20225 2003-01-20 sean kasun <skasun@azstarnet.com>
20227 * reflection.c (load_cattr_value): Now this handles
20228 MONO_TYPE_SZARRAY. Fixes bug #35629
20230 2003-01-20 Miguel de Icaza <miguel@ximian.com>
20232 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
20235 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20237 * decimal.c: fixed bug #26056.
20239 2003-01-17 Martin Baulig <martin@ximian.com>
20241 * gc.c: Raise an ExecutionEngineException instead of using g_error().
20243 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20246 (mono_get_exception_type_initialization): new function.
20248 * object.c: throw a TypeInitializationException when an exception is
20249 thrown invoking the class constructor.
20251 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20253 * reflection.c: fixed attribute reading.
20255 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20258 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
20259 provided, look for the type in the calling assembly and then in
20260 mscorlib; if the assembly name is provided, only try that one.
20262 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
20264 * object.c: register the vtable before there is a chance it's
20265 queried again recursively.
20267 2003-01-13 Duncan Mak <duncan@ximian.com>
20269 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
20272 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
20274 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
20276 2003-01-11 Martin Baulig <martin@ximian.com>
20278 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
20279 this to 20 for the release.
20281 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
20283 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
20285 * loader.c (mono_method_get_marshal_info): bug fix
20287 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
20288 structures with explicit layout
20290 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20292 * profiler.c: made the output more readable (and sorted).
20293 Added caller information for the allocation profiler.
20295 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
20297 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
20299 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20301 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
20302 to get value types.
20304 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
20306 * object.c, profiler.h, profiler.c, profiler-private.h:
20307 Added object allocation profiler.
20309 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
20311 * reflection.h, reflection.c: handle global methods.
20312 Compress blob entries.
20314 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
20316 * marshal.c: fix compilation.
20318 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
20320 * loader.c (mono_method_get_marshal_info): impl.
20322 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
20324 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20326 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
20327 for reference types.
20329 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
20331 * loader.c: fixed off by one error in loaded parameter names.
20333 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
20335 * marshal.c (mono_marshal_get_icall_wrapper): like
20336 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
20337 instead of a MonoMethod.
20339 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20341 * decimal.c: fixed bug #36537.
20343 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
20345 * marshal.c: throw a missing method exception if a
20346 P/Invoke method is not found.
20348 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20350 * icall.c: allow a null this for constructors.
20352 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20354 * icall.c: raise the proper exceptions if the arguments to the
20355 internal Invoke are incorrect.
20357 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
20359 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
20361 2003-01-03 Martin Baulig <martin@ximian.com>
20363 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20365 2002-12-31 Martin Baulig <martin@ximian.com>
20367 * debug-mono-symfile.c: Completely rewrote the type section.
20368 Instead of using individual malloc()ed fields, we use one big
20369 continuous memory area and offsets into this area.
20370 See the comments in the source code for details.
20372 2002-12-30 Martin Baulig <martin@ximian.com>
20374 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
20376 2002-12-30 Martin Baulig <martin@ximian.com>
20378 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
20379 line number table in this data blob instead of using an external
20382 2002-12-28 Martin Baulig <martin@ximian.com>
20384 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20386 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
20388 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
20389 as a boxed return type.
20391 2002-12-21 Miguel de Icaza <miguel@ximian.com>
20394 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
20395 g_build_filename to properly get separators on the filename created.
20397 * object.h: Small change, introduce MonoMarshalByRefObject to
20398 track the layout of that structure in the C# universe as we make
20401 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
20403 * object.c: removed assert to allow static fields on interfaces.
20404 * loader.c: a TypeSpec may be used for any type, not just arrays.
20406 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20408 * class.c, class.h: added mono_class_array_element_size ().
20409 Ignore static methods in interfaces.
20411 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20413 * threads.c: fixed the build under cygwin.
20415 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20417 * reflection.c: handle nullref constants. Allocate keys for
20418 reflection handles with the GC.
20420 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20422 * threads.c, threads.h: added mono_thread_get_abort_signal()
20423 to get a suitable signal for thread abort.
20425 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20427 * metadata.c: fix handling of ExportedType table.
20429 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20431 * icall.c: added WriteWindowsDebugString internal call.
20433 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20435 * reflection.h: added fields to match C# implementation.
20437 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20439 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
20441 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
20443 * gc.h, gc-internal.h: Rename header for GC internal calls to
20444 gc-internal.h from gc.h as to not clash with Boehm GC having its
20445 header installed as <gc.h> in outside include paths.
20446 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
20447 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
20449 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20451 * icall.c: assign minor, build and revision in FillName.
20453 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
20455 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
20456 Added support for running code generated by Reflection.Emit.
20458 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20460 * appdomain.c: check for NULL argument in LoadFrom.
20462 2002-12-10 Dick Porter <dick@ximian.com>
20464 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
20466 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20468 * appdomain.c: fix buglet when building exe file name. Handle full
20469 assembly name (needed after latest changes to AssemblyName).
20471 (mono_image_close): free some hashtables.
20473 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
20475 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
20476 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
20477 on some systems (redhat 7.3)
20479 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
20481 * threads.c: delete the critical section of a sync block,
20482 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
20484 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
20486 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
20488 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20490 * appdomain.[ch]: handle the assembly preload event to try loading the
20491 assemblies using the paths we have in the current domain.
20493 * assembly.[ch]: created an assembly preload hook that is called to try
20494 loading the assembly by other means that the ones provided here.
20496 * domain.c: initialize the domain search path.
20498 From now on, assemblies (TODO: except corlib and System) are loaded
20499 according to these rules when using mono_assembly_load ():
20501 1. It tries to load the assembly from the ApplicationBase
20502 of the current domain appending .dll and .exe (TODO: have to
20503 try loading from name/name.dll and name/name.exe).
20505 2. It tries the search path specified in PrivateBinPath for the
20506 current domain (if any).
20508 3. Previous behavior.
20510 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
20512 * icall.c: implemented GetInterfaceMap() related icall.
20513 * domain.c, loader.h: load MethodInfo in mono_defaults.
20515 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20517 * gc.c: disable the finalizer thread for now, untill all the issues
20518 with it are resolved.
20520 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20522 * string-icalls.c: handle embedded nulls in string ctor when the
20523 length is specified.
20525 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20527 * class.c: look for explicit interface implementation in parent
20530 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
20532 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
20534 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20536 * gc.c: protect handles with a critical section.
20538 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20541 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
20542 parameters. If no assembly specified, try getting the type from all
20543 the assemblies in the current domain, else, load the assembly and get
20546 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20548 * marshal.c: applied patch from Aleksey Demakov that fixes
20549 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
20551 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20553 * icall.c: fixed get_location.
20555 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
20557 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
20558 declarations to make it work with older gcc.
20560 * loader.c (mono_get_method): set signature->pinvoke for native calls
20562 2002-11-20 Dick Porter <dick@ximian.com>
20564 * threads.c (mono_thread_init): Set the main thread's handle
20566 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20568 * gc.c: allow compilation without GC support. Changed to match the
20571 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20573 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
20575 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
20577 * reflection.c: set a public key token on the core assemblies.
20579 2002-11-18 Dick Porter <dick@ximian.com>
20581 * threads.c: Split out some thread initialisation so that other
20582 files can set the start callback function.
20584 * gc.c: Run finalisers in a separate thread, to avoid stack
20585 overflow. Fixes bug 31333.
20587 * appdomain.c: Set up GC finalisation thread.
20591 * domain.c: Use gc.h macros for GC_malloc
20593 2002-11-15 Dick Porter <dick@ximian.com>
20597 * appdomain.c: Removed mono_runtime_init_with_attach(),
20598 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
20599 merging the extra parameter with the existing function. Removed
20600 unneeded code in mono_thread_attach().
20602 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
20604 * image.c (mono_image_loaded_by_guid): a method to get loaded
20606 (load_metadata_ptrs): we store the guid as string.
20608 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
20610 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
20612 * metadata.c (mono_guid_to_string): imported method form Zoltan
20613 Varga (slightly modified)
20615 * assembly.c (mono_assembly_open): load precompiled code
20617 * loader.h (MonoMethod): we store the method token for use in the
20620 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20622 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
20623 the hook function called when an assembly is loaded.
20625 * domain.c: Modified file.
20626 (mono_domain_assembly_load): removed hash table insertion of assemblies.
20630 2002-11-07 Miguel de Icaza <miguel@ximian.com>
20632 * reflection.c: Map PEFileKind to the value expected by the WinNT
20635 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20637 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
20638 Read until the buffer is filled completely.
20640 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20642 * icall.c: implemented MonoType.InternalGetEvent ().
20644 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20646 * appdomain.c: implemented InitAppDomainSetup. Delayed
20647 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
20648 the entry_assembly.
20650 * assembly.c: base_dir is now an absolute path ending with
20653 * icall.c: modified get_location according to the above changes.
20655 * object.c: init AppDomain.SetupInformation for the default domain after
20656 we have the entry assembly.
20658 * domain.c: when unloading a domain, setup = NULL.
20660 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
20662 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
20664 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
20666 * object.h, object.c: introduced mono_object_get_virtual_method ()
20667 to lookup the method invoked on an object when a callvirt is done on
20669 * icall.c: make MethodInfo::Invoke() always do a virtual call.
20671 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20673 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
20674 current domain when loaded an assembly and failed to load it.
20676 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
20678 2002-10-31 Dick Porter <dick@ximian.com>
20682 * file-io.c: Return the error status in a parameter, as the
20683 GetLastError() value has long since been blown away if we try and
20684 look it up in a subsequent internal call invocation. Delete the
20685 GetLastError() internal call, because it's useless.
20687 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
20689 * class.[ch]: added cast_class to fix bug 29517
20691 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
20693 * marshal.c: create valid IL code in the filter clause:
20694 the new JIT is less forgiving:-)
20696 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20698 * icall.c: removed get_property internal call.
20700 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
20702 * appdomain.h domain.c: Added an ID to appdomains.
20704 * threads.c threads.h icall.c: Implement icall
20705 Thread:GetDomainID(), and remove unused icall
20706 CurrentThreadDomain_internal.
20708 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20710 * icall.c: Don't recurse through the base types in GetConstructor.
20713 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
20715 * mempool.h, mempool.c: added mono_mempool_empty() and
20716 mono_mempool_stats().
20718 2002-10-23 Dick Porter <dick@ximian.com>
20722 * icall.c: Added MonoIO.GetFileType internal call
20724 2002-10-17 Dick Porter <dick@ximian.com>
20726 * appdomain.c (mono_runtime_cleanup): Don't signal the async
20727 delegate semaphore before waiting for all threads to finish,
20728 because new threads can also call async delegates. Fixes bug
20731 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
20732 of 3 seconds, in case another async job is queued. (This part is
20733 needed because the bug fix reintroduced the 3s exit lag.) This
20734 makes the mono_runtime_shutdown flag superfluous.
20736 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
20738 * reflection.c: include ehader size in method section headers.
20739 Really check for suplicated modules entries.
20741 2002-10-17 Martin Baulig <martin@gnome.org>
20743 * debug-mono-symfile.c: Added back support for locals.
20745 2002-10-14 Martin Baulig <martin@gnome.org>
20747 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
20750 2002-10-14 Martin Baulig <martin@gnome.org>
20752 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
20753 mono_class_get() instead of looking in the class cache.
20755 2002-10-13 Martin Baulig <martin@gnome.org>
20757 * debug-mono-symfile.c: Set version number to 28, include the
20758 signature in method names.
20760 2002-10-13 Martin Baulig <martin@gnome.org>
20762 * debug-mono-symfile.h: Set version number to 27.
20764 2002-10-11 Martin Baulig <martin@gnome.org>
20766 * gc.c: Don't register/unregister NULL pointers as disappearing links.
20768 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20770 * metadata.c, metadata.h: added helper function to allocate signatures.
20772 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20774 * icall.c: added internal call to get the location of machine.config.
20776 2002-10-08 Martin Baulig <martin@gnome.org>
20778 * debug-mono-symfile.c: Ignore classes with a pending init for the
20781 2002-10-03 Dick Porter <dick@ximian.com>
20783 * threads.c: Freebsd pthread_t is a pointer
20785 2002-10-03 Dick Porter <dick@ximian.com>
20787 * socket-io.c: Implemented GetHostName_internal
20789 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20792 (mono_config_parse_file): don't leak the text.
20794 2002-10-02 Martin Baulig <martin@gnome.org>
20796 * debug-mono-symfile.c: Added support for methods.
20798 2002-10-01 Martin Baulig <martin@gnome.org>
20800 * debug-mono-symfile.c: Don't emit methods and line numbers for
20801 the dynamic symbol file, just write the type table. We can easily
20802 have an external helper program which creates a symbol file for an
20805 2002-10-01 Dick Porter <dick@ximian.com>
20807 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
20808 Only add the handle to the cleanup array when we're about to
20809 launch the thread. Bug 31425 deadlocked when the test was run on
20812 2002-10-01 Martin Baulig <martin@gnome.org>
20814 * debug-mono-symfile.c: Added support for properties.
20816 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20818 * reflection.c: unaligned store fix from Mark Crichton
20819 <crichton@gimp.org>.
20821 2002-09-27 Martin Baulig <martin@gnome.org>
20823 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
20826 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
20828 * assembly.h, assembly.c: use a sane API to hook into the assembly
20829 loading process instead of a useless special-purpouse hack
20830 (ngen needs a hook, too, for example).
20832 2002-09-27 Dick Porter <dick@ximian.com>
20834 * threads.c (mono_thread_init): Call GetCurrentProcess() so
20835 io-layer can set up some process handle info. Not needed on w32,
20836 but doesn't hurt either.
20838 * process.c: Pass the program name in the second parameter to
20839 CreateProcess, so the path is searched. Include the working
20840 directory. Implemented process name, process enumeration, and some
20841 process detail internal calls.
20843 * icall.c: Added internal calls for process lookup, and some
20846 2002-09-26 Martin Baulig <martin@gnome.org>
20848 * assembly.c (mono_install_open_assembly_hook): New global
20849 function to install a function to be invoked each time a new
20850 assembly is loaded.
20851 (mono_assembly_open): Run this callback function if set.
20853 * debug-mono-symfile.c: Put back line numbers for the dynamic
20854 symbol file and also record the .il file as source file. This
20855 allows us to install the temporary symbol file as `file.dbg' just
20856 like a compiler-generated one.
20858 2002-09-26 Nick Zigarovich <nick@chemlab.org>
20860 * Corrected typo in gc.c (BOHEM vs BOEHM).
20862 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20864 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
20865 GetProperties. Also avoid calling g_slist_length in GetProperties and
20868 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
20870 * reflection.c: avoid unaligned stores (bug spotted by
20871 Mark Crichton <crichton@gimp.org>).
20873 2002-09-25 Martin Baulig <martin@gnome.org>
20875 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
20876 instead of guint64 for addresses and added prologue/epilogue info.
20878 2002-09-25 Martin Baulig <martin@gnome.org>
20880 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
20881 store line number info. For the dynamic symbol file, we only need
20882 to provide the JIT generated dynamic line number info for the dynamic
20885 2002-09-25 Martin Baulig <martin@gnome.org>
20887 * debug-mono-symfile.h: Incremented version number.
20889 2002-09-24 Martin Baulig <martin@gnome.org>
20891 * class.c (mono_debugger_class_init_func): New global function
20893 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
20896 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
20897 function. This is called via the mono_debugger_class_init_func
20898 hook to add all types to the dynamic type table.
20899 (ves_icall_MonoDebugger_GetType): New interncall to get a class
20900 from its metadata token.
20902 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
20903 New interncall for the debugger.
20905 2002-09-24 Nick Drochak <ndrochak@gol.com>
20907 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
20908 before using it in case it is null.
20910 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20912 * metadata.c: allow custom modifiers in local var signatures
20913 (bug spotted by Zoltan Varga).
20915 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20917 * class.c: deal with the <Module> class that may have a NULL vtable.
20918 Eliminate warnings.
20920 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20922 * image.c, image.h: more strong name helpers.
20923 * monosn.c: more work: convert pem keys to cryptoapi format.
20925 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
20927 * string-icalls.c: speedup IndexOf.
20929 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20931 * icall.c: updates from Zoltan.2.Varga@nokia.com.
20933 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
20935 * icall.c: cleanup: use mono_object_domain ().
20937 2002-09-23 Martin Baulig <martin@gnome.org>
20939 * debug-mono-symfile.c: Improved type support.
20941 2002-09-22 Martin Baulig <martin@gnome.org>
20943 * debug-mono-symfile.c: Added support for reference types and strings.
20945 2002-09-22 Martin Baulig <martin@gnome.org>
20947 * debug-mono-symfile.c: Started to work on the type table.
20949 2002-09-21 Martin Baulig <martin@gnome.org>
20951 * debug-mono-symfile.c: Largely reworked the symbol table format.
20952 The symbol table is now incrementally updated each time a new
20953 method is added. We're now also using our own magic and version
20954 so that you don't need to recompile all your classes if the
20955 dynamic table changes.
20956 (mono_debug_update_mono_symbol_file): Removed.
20957 (mono_debug_symfile_add_method): New function to add a method.
20959 2002-09-21 Martin Baulig <martin@gnome.org>
20962 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
20965 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
20966 New interncall to get a method from its metadata token.
20968 2002-09-21 Martin Baulig <martin@gnome.org>
20970 * debug-mono-symfile.c: Create type table.
20972 2002-09-20 Martin Baulig <martin@gnome.org>
20974 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
20976 2002-09-20 Martin Baulig <martin@gnome.org>
20978 * debug-mono-symfile.c: Provide information about params and locals.
20980 2002-09-20 Martin Baulig <martin@gnome.org>
20982 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
20985 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
20986 interncall to get a method from its metadata token.
20988 2002-09-20 Martin Baulig <martin@gnome.org>
20990 * debug-mono-symfile.c: Added a few checks for method->header
20991 being non-NULL. This should never happen, but for the moment
20992 let's use a g_warning() rather than a g_assert().
20994 2002-09-19 Mark Crichton <crichton@gimp.org>
20996 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
20997 even if support for it isn't present. Added an #ifdef to fix this.
20999 * socket-io.c: Added checks back for Solaris support.
21001 2002-09-19 Martin Baulig <martin@gnome.org>
21003 * debug-mono-symfile.c (read_string, write_string): Reflect latest
21004 changes in the symbol file format.
21006 2002-09-18 Martin Baulig <martin@gnome.org>
21008 * debug-mono-symfile.c: Set version number to 21.
21010 2002-09-18 Dick Porter <dick@ximian.com>
21012 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
21013 on netbsd. Fixes bug 30051.
21015 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21018 (set_version_from_string): little fix.
21020 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21022 * monosn.c, Makefile.am: added strong name utility.
21023 * reflection.h, reflection.c: implemented delayed signing,
21024 locale, version and hash id assembly attributes.
21026 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21028 * loader.c, metadata.c: load param attributes in signatures.
21030 2002-09-16 Martin Baulig <martin@gnome.org>
21032 * debug-mono-symfile.c: Added string table with all method names.
21034 2002-09-14 Martin Baulig <martin@gnome.org>
21036 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
21037 fast method lookup.
21039 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
21041 * reflection.c: record the public key token of referenced assemblies.
21043 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21045 * image.c, image.h: added functions to get the strong name and the
21046 public key of an assembly.
21047 * pedump.c: use them.
21049 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
21051 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
21053 2002-09-12 Miguel de Icaza <miguel@ximian.com>
21055 * marshal.c (mono_marshal_get_managed_wrapper): Added
21058 2002-09-11 Martin Baulig <martin@gnome.org>
21060 * gc.c: Call GC_unregister_disappearing_link() on all links when
21061 finalizing them, this is necessary to aviod a crash in boehm's
21064 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21066 * gc.c: handle GetTarget for finalized objects spotted and fixed by
21069 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
21071 * icall.c: implemented MonoType::Module.
21072 * reflection.c, reflection.h: mono_module_get_object () from
21073 Tomi Pakarinen <tomi.pakarinen@welho.com>.
21075 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
21077 * icall.c: ignore overridden methods in GetMethods ().
21078 Fix for FieldInfo::SetValue().
21079 * object.c: handle float/double in runtime invoke.
21081 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
21083 * object.c: allow a constructor to be called again on an object.
21085 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
21087 * class.h, class.c: move field layout code to it's own function and
21088 export it. Get an interface id earlier. Move fields in MonoClass
21089 so they are more cache friendly and align the bitfields.
21090 * loader.c: temporary handle get_param_names() for a runtime method.
21091 * reflection.c, reflection.h: more code to handle runtime creation of
21094 2002-09-09 Martin Baulig <martin@gnome.org>
21096 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
21097 signature with the pinvoke field being set for the actual call.
21099 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21101 * icall.c: removed some unused icalls. Start of map of glib charsets
21102 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
21104 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21106 * debug-helpers.c: break infinite loop (found and fixed by
21107 Holger Arnold <harnold@gmx.de>).
21109 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
21111 * icall.c: target may be null in create_delegate.
21113 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21115 * marshal.c: handle a boolean return type.
21117 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
21119 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
21121 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
21123 * gc.c: fix weakreferences.
21125 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
21127 * icall.c: added icall to get default codepage.
21129 2002-09-03 Dick Porter <dick@ximian.com>
21132 * threads.c: Use MonoThread instead of MonoObject where
21135 Store running thread objects in a hash table, so that we have all
21136 the info to hand when waiting for them to finish
21137 (means we don't need OpenThread() any more, so mingw builds should
21138 be fully functional again.)
21141 * object.h: Added thread ID to MonoThread
21143 2002-09-03 Martin Baulig <martin@gnome.org>
21145 * icall.c (System.Reflection.Assembly::get_location): New interncall.
21147 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21149 * icall.c: fixed leak in get_temp_path. Thanks lupus.
21151 2002-09-03 Martin Baulig <martin@gnome.org>
21153 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
21154 argument to store the end address of the disassembled instruction.
21156 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
21157 here from debug-symfile.h.
21158 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
21159 JIT into this struct.
21160 (MonoSymbolFile): Added `char *image_file' field.
21161 (MonoDebugGetMethodFunc): Removed.
21162 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
21163 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
21164 (mono_debug_find_method): New method.
21166 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
21167 create a full symbol file.
21168 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
21169 and static symbol files.
21170 (mono_debug_find_method): The symbol file keeps an internal method hash,
21171 call this to get a MonoDebugMethodInfo from a MonoMethod.
21173 * debug-symfile.[ch]: Removed.
21175 2002-08-29 Miguel de Icaza <miguel@ximian.com>
21177 * image.c (do_mono_image_open): Remove linker version check.
21179 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
21181 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
21182 wrappers for instance methods.
21184 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21186 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
21188 2002-08-28 Dick Porter <dick@ximian.com>
21190 * Makefile.am: Export HOST_CC for w32 builds
21192 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21194 * file-io.c process.c: MonoString are null terminated, no
21195 need for mono_string_to_utf16() anymore.
21197 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21199 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
21201 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
21203 * icall.c, reflection.h: speedup System.MonoType.
21205 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
21207 * reflection.c: allow null as the value of a string argument in
21208 custom attributes constructors.
21210 2002-08-27 Martin Baulig <martin@gnome.org>
21212 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
21213 `trampoline_address' field.
21215 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
21217 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
21218 check (fixes bug #29486)
21220 2002-08-27 Martin Baulig <martin@gnome.org>
21222 * debug-mono-symfile.c: Changed the file format in a way that allows us
21223 open it read-only and to use a specially malloced area for all the
21224 dynamic data. We can now also generate a symbol file on-the-fly if we're
21225 debugging IL code and there is no MCS generated symbol file for it.
21227 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
21229 * object.c: added a define for a good string and array
21230 creation speedup (not enabled by default because we need to deal with
21233 2002-08-26 Martin Baulig <martin@gnome.org>
21235 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
21236 function to create a dynamic symbol file. This is used by the
21237 debugger to create a symbol file for IL code on-the-fly.
21239 2002-08-26 Martin Baulig <martin@gnome.org>
21241 * loader.c (mono_lookup_pinvoke_call): Include the error message
21242 from g_module_error() in the error message.
21244 2002-08-24 Martin Baulig <martin@gnome.org>
21246 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
21247 function to update the symbol file. The symbol file is mmap()ed
21248 writable, but private. This allows us to install the symbol file
21249 together with the assembly.
21251 2002-08-24 Martin Baulig <martin@gnome.org>
21253 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
21254 but they can read the new symbol file format which mcs is now creating.
21256 * debug-symfile.c (mono_debug_find_source_location): Moved to
21257 debug-mono-symfile.c; this is now operating on the new symbol file.
21259 2002-08-23 Martin Baulig <martin@gnome.org>
21261 * debug-helpers.c (mono_method_desc_from_method): New function to get
21262 a MonoMethodDesc from a MonoMethod.
21264 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
21266 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
21267 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
21269 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
21271 * string-icalls.[ch]: make helper methods static.
21273 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21275 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
21276 types to it and to SetValueInternal.
21278 * object.c: Moved handle_enum label to its proper place. This was the
21281 This time i compiled mcs and gtk-sharp and they both work.
21283 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21285 * icall.c: reverted partially my previous patch until
21286 object.c:set_value handles enums correcly.
21288 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21291 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
21292 (ves_icall_System_Environment_get_MachineName): removed warning when
21293 compiling under cygwin.
21295 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21297 * object.c: fixed field_get_value() for reference types.
21299 2002-08-22 Dick Porter <dick@ximian.com>
21301 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
21302 Don't free a buffer while it's still needed. Patch from Jonathan
21303 Liger <Jonathan.liger@wanadoo.fr>
21305 2002-08-21 Miguel de Icaza <miguel@ximian.com>
21307 * icall.c (ves_icall_System_Environment_get_Platform): Add new
21310 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
21312 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
21313 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
21315 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
21316 we call unmanaged code which throws exceptions.
21318 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21320 * appdomain.h: added per-domain entry_assembly.
21321 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
21323 * icall.c: Assembly::GetEntryAssembly icall.
21324 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
21325 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
21327 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21329 * appdomain.h, gc.c: added mono_domain_finalize ().
21331 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21334 (mono_print_unhandled_exception): changed g_warning by g_printerr
21335 because g_log has a 1024 characters limit (yeah, i got a big stack
21336 trace). Don't print exception name, that should be in ToString
21339 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21341 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
21342 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
21344 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21347 (mono_print_unhandled_exception): after previous commit, i realized
21348 that MS calls ToString on the exception. I changed this function to
21349 do that. This way we get stack_trace for free.
21351 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21354 (mono_print_unhandled_exception): invoke Message property instead of
21355 getting 'message' field from Exception. Don't allocate memory for
21356 'trace' and 'message' if not needed.
21358 2002-08-18 Dick Porter <dick@ximian.com>
21360 * unicode.c: Fix asserts to match Encoder.cs checks
21362 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21364 * marshal.c: fix unaligned store issue and a few wrong
21365 opcode argument types.
21367 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21369 * icall.c: added GetUninitializedObjectInternal internal call.
21371 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
21373 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
21374 to the right domain.
21376 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
21378 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
21380 * class.c (class_compute_field_layout): set blittable to false for Strings
21382 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
21384 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21386 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
21387 first chunk of code to create types at runtime. Code to
21388 handle ReflectedType/DeclaringType. Make reflection handles
21391 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
21393 * class.c: set correct name in arrays.
21395 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
21397 * appdomain.c (mono_domain_transfer_object): make it work with
21398 valuetypes. bug fixes.
21400 2002-08-12 Dick Porter <dick@ximian.com>
21402 * object.h: Rename some parameters to avoid c++ keywords (Patch
21403 from Joseph Wenninger <kde@jowenn.at>)
21405 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
21407 * icall.c: added icall to implement Assembly.GetFile*.
21409 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21411 * reflection.h, reflection.c: code to embed managed resources.
21413 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21415 * class.c: move all the type size stuff into
21416 class_compute_field_layout().
21418 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21420 * class.c: ensure enums have always the correct instance size.
21421 * unicode.c: remove wrong assert.
21423 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21425 * assembly.c: fix mem corruption issue.
21426 * image.h, image.c: added mono_image_get_resource () to access
21428 * icall.c: implemented Assembly.EntryPoint property and some
21429 Managed Resources related internalcalls.
21432 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21434 * image.c, image.h: impemented mono_image_get_entry_point ().
21435 * appdomain.c: use mono_image_get_entry_point.
21437 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21439 * reflection.c: support the object type argument when loading
21442 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
21444 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
21445 String as return type.
21447 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
21449 * reflection.c: fix encoding of named args for custom attrs to match
21450 the ms implementation. Read them back when instantiating custom
21453 2002-08-02 Radek Doulik <rodo@ximian.com>
21455 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
21456 by Dietmar as quick fix
21457 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
21458 16 as stack size, used on more places as quick fix before Dietmar
21459 will fix it properly
21461 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21463 * object.h, object.c: added accessors for fields and properties.
21465 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21467 * class.c, class.h: made mono_class_get_field_from_name ()
21468 loop on parent types.
21469 Added mono_class_get_property_from_name ().
21471 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21473 * class.c, class.h: move the code to setup the type vtable in its own
21474 function so that it can be reused also for types created at runtime.
21475 Eliminate the "class" identifier from the header file.
21476 * reflection.c: setup the vtable for enums so that we can create
21477 objects for use in SetConstant ().
21479 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
21481 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
21482 instead of the delegate itself as this pointer (bug #28383)
21484 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
21486 * marshal.c (mono_marshal_get_managed_wrapper): added return type
21489 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21491 * loader.c: don't set the pinvoke bit on icalls.
21493 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
21495 * debug-helpers.c (mono_method_full_name): only print a number to
21496 indicate wrapper type (so that the output is more readable in traces).
21498 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
21500 * class.c (mono_class_init): include method override patch from Paolo
21502 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
21504 * icall.c: fixed GetTypeCode().
21506 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
21508 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
21509 use real delegate invoke function to make it work with multicast
21510 delegates (fix bug# 28291).
21512 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21514 * object.c: load constant strings.
21516 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21518 * reflection.c: no magic numbers.
21519 * tabledefs.h: security action enum.
21521 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21523 * assembly.c: fix possible memory corruption.
21525 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21527 * reflection.h, reflection.c: added support for linking resources.
21528 * verify.c: check we have an updated corlib.
21530 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
21532 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
21534 (mono_marshal_string_array): null terminate unmanaged string arrays.
21535 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
21537 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21539 * icall.c: Type.GetType () can now return also types from the
21542 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21544 * loader.h, loader.c: stack walking support.
21545 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
21546 GetCallingAssembly.
21548 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
21550 * marshal.c: added optimisations for blittable types
21552 * class.c (mono_array_class_get): do not set blittable attribute on arrays
21553 (mono_class_setup_mono_type): set blittable attribute for single
21556 * marshal.c (mono_string_utf8_to_builder): impl.
21557 (mono_string_builder_to_utf8): impl.
21558 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
21560 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
21562 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
21563 (mono_marshal_get_managed_wrapper): impl. byref types
21565 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21568 (search_method): don't display debug message.
21570 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
21572 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
21574 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21576 * appdomain.c: set the missing filename when throwing exception.
21578 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
21580 * metadata.c (mono_type_size): code cleanup
21581 (mono_type_stack_size): removed some test code
21583 2002-07-21 Miguel de Icaza <miguel@ximian.com>
21585 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
21586 mono_get_exception_file_not_found now.
21588 * exception.c (mono_exception_from_name_two_strings): New version
21589 that will call a constructor with two string arguments.
21590 (mono_get_exception_file_not_found): New helper routine, used to
21591 report file-not-found errors.
21593 2002-07-20 Dick Porter <dick@ximian.com>
21596 * process.c: Pass file handles to CreateProcess
21600 * file-io.c: Implemented CreatePipe
21602 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
21604 * metadata.c (mono_get_param_info): set alignment for value types
21606 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21608 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
21609 Constify mono_domain_assembly_open().
21610 * loader.c: handle null namespace in icalls.
21612 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
21614 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
21615 (emit_str_to_ptr_conv): marshal object as structs
21617 * metadata.c (mono_type_to_unmanaged): marshal object as structs
21619 * marshal.c (mono_marshal_get_runtime_invoke): support value types
21621 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
21623 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
21624 (mono_marshal_get_native_wrapper): we an now return value types
21626 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21628 * verify.c: more checks implemented.
21630 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
21632 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
21634 (mono_marshal_get_native_wrapper): allow byref arguments
21635 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
21636 impl. PtrToStringXXX methods
21637 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
21638 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
21639 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
21640 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
21641 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
21643 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21645 * reflection.c: fix buglet in parsing an assembly name.
21647 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
21649 * marshal.c (emit_ptr_to_str_conv): first impl.
21651 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21653 * object.c, class.h: cache the vtable in the class as suggested by
21654 vargaz@freemail.hu (Zoltan Varga).
21656 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21658 * class.h, loader.c: added mono_field_from_token().
21659 * verify.c: first cut of type checking code.
21661 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
21663 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
21665 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
21667 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
21669 (mono_marshal_get_remoting_invoke): impl.
21670 (mono_delegate_begin_invoke): impl.
21671 (mono_mb_emit_save_args): impl.
21672 (mono_delegate_end_invoke): impl.
21673 (mono_marshal_get_delegate_begin_invoke):
21674 (mono_marshal_get_delegate_end_invoke):
21675 (mono_marshal_get_delegate_invoke): generate a special name for
21676 those methods (including the signature) and associate them whith
21677 the delegate class.
21679 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
21682 (mono_reflection_type_from_name): now it has a MonoImage parameter
21683 which is used as the default image to search the type in. If the image
21684 is NULL or getting the type from it fails, it defaults to corlib.
21686 * icall.c: changed 1 call to mono_reflection_type_from_name to match
21689 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21691 * reflection.c: update the parameter table index.
21693 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21695 * domain.c: don't include the mark byte in the string hash.
21697 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21699 * icall.cs: icall for Type.GetTypeCode ().
21700 * verify: a couple of fixes and disabled local initialization checks.
21702 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
21704 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
21706 * debug-helpers.c (mono_method_full_name): print the type of the
21709 * metadata.c (mono_signature_hash): a hash function for signatures
21710 (mono_signature_hash): better hash algorithm
21712 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
21714 * debug-helpers.c (mono_method_full_name): this can now generate
21715 method names with signatures
21717 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
21718 method dont have this pointers.
21720 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
21722 * reflection.c: fixup typebuilder tokens.
21723 * image.c: fix buglet.
21724 * marshal.h: remove whitespace.
21725 * metadata.h, metadata.c: reinstate code that was removed.
21726 * verify.c: handle catch directives and fix another couple of bugs.
21728 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
21730 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
21731 (mono_marshal_get_native_wrapper): make it comp. with the old code
21732 (mono_marshal_get_native_wrapper): support boolean
21733 (mono_marshal_get_managed_wrapper): support more types
21735 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
21737 * class.c (class_compute_field_layout): compute class->blittable attribute.
21739 2002-07-09 Dick Porter <dick@ximian.com>
21741 * threads.c: Make the thread cleaning up cope with threads that
21744 2002-07-08 Radek Doulik <rodo@ximian.com>
21746 * reflection.c (method_encode_code): use non-translated values to
21747 compute finally_start, this fixes exception handling on ppc, yay!
21749 * decimal.h (struct signscale): fix endianess
21751 2002-07-07 Radek Doulik <rodo@ximian.com>
21753 * reflection.c: swap box_val and not val
21755 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
21757 * reflection.c, reflection.h: handle full assembly info in type name.
21758 Handle Type arguments when loading custom attributes.
21759 * icall.c: updated to use new mono_reflection_type_from_name () method.
21761 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21764 (method_from_memberref): also print assembly name when method not found.
21766 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21769 (ves_icall_TypeGetProperties): fixed bug #27473.
21771 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21773 * reflection.c: display image name and token when cannot find the
21774 .ctor for an attribute.
21776 2002-07-05 Martin Baulig <martin@gnome.org>
21778 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21780 2002-07-04 Dick Porter <dick@ximian.com>
21782 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
21783 compile on mingw. This will cause mingw builds to not wait for
21784 subthreads to terminate after the main thread does. I've lodged a
21785 bug with the mingw developers for them to wrap OpenThread().
21787 2002-07-03 Dick Porter <dick@ximian.com>
21789 * threads.c: Store thread IDs instead of handles, because
21790 GetCurrentThread() returns a pseudohandle and therefore stores
21791 useless values. mono_thread_cleanup() continues checking the
21792 array of threads until it is empty, to cope with subthreads
21793 spawning new threads after the main thread has finished.
21797 * profiler-private.h: Pass the thread ID to thread profiler
21798 functions, instead of a handle
21800 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21802 * verify.c: fixes to make it more usable.
21803 * pedump.c: added --verify code to verify IL code in an assembly.
21805 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21807 * reflection.c: turn errors into warnings to allow compiling corlib.
21809 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
21811 * reflection.c: add special cases to compile corlib.
21813 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21815 * reflection.c: handle properties with only a set method.
21817 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21819 * opcodes.h: add enum with opcodes in opval order.
21821 2002-07-01 Dick Porter <dick@ximian.com>
21824 * object.c (mono_runtime_run_main): Removed unneeded argument
21826 2002-06-28 Martin Baulig <martin@gnome.org>
21828 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21830 2002-06-27 Dick Porter <dick@ximian.com>
21832 * threads.c: Store the handle in both the parent thread and in the
21833 subthread, to minimise the time between starting a new thread and
21836 2002-06-26 Dick Porter <dick@ximian.com>
21838 * appdomain.c (mono_runtime_cleanup): Close the socket library
21839 after all the threads have finished, not before
21841 2002-06-26 Martin Baulig <martin@gnome.org>
21843 * debug-symfile.c (mono_debug_find_source_location): Added
21844 `guint32 *line_number' argument. If it's not NULL, store the line number
21845 there and return the file name without the line number.
21847 2002-06-25 Dick Porter <dick@ximian.com>
21851 * process.c: Process forking and other support functions
21853 2002-06-25 Dick Porter <dick@ximian.com>
21855 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
21856 things dont happen when the image is closed.
21857 (mono_image_lookup_resource): Walk the resource section looking
21858 for a particular entry
21860 * cil-coff.h: PE resource section decoding
21862 2002-06-25 Dick Porter <dick@ximian.com>
21866 (mono_assembly_foreach): Accessor functions to walk the list of
21868 (mono_assembly_set_main):
21869 (mono_assembly_get_main): Process methods need to know which
21870 assembly is the "main" one
21872 * object.c (mono_runtime_run_main): Record the main assembly
21874 * debug-helpers.c: Fix typo
21876 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
21878 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
21879 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
21881 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21883 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
21885 2002-06-21 Miguel de Icaza <miguel@ximian.com>
21887 * image.c (do_mono_image_open): Initialize reference count,
21888 otherwise we leak the MonoImage.
21890 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21892 * reflection.c: small tweak to handle self-hosting.
21894 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21896 * reflection.c: fix type name parse code.
21898 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21900 * reflection.c: break out of the loop.
21901 * image.c: special case corlib.
21903 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21905 * reflection.c: add all the custom attrs at the end to ensure the
21906 ctors have been properly initialized when the attributes are defined
21907 in the current assembly.
21909 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21911 * reflection.c: handle correctly multiple-nested types.
21913 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
21915 * row-indexes.h: fix typos.
21916 * reflection.c: adjust for typos and fix method_def_or_ref
21917 encoding in MethodImpl table.
21919 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21921 * reflection.c: fix entry point patching (thanks Serge!).
21923 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
21925 * verify.c: add check for System.Exception
21927 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21929 * image.c, class.c: minifix for code just c&p'ed.
21930 * reflection.c: warning fix.
21931 * object.h, loader.h, domain.c: load also StringBuilder.
21933 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21935 * marshal.h, marshal.c: some support code to handle complex marshaling.
21937 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21939 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
21940 Better signatures with vtable error dump.
21942 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
21944 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
21946 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
21948 * icall.c (ves_icall_Type_GetField): impl.
21950 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21952 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
21953 to retrieve a marshal description blob for a field or param.
21955 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21957 * reflection.h, reflection.c: change order of nested type emission
21958 to avoid table corruption. The NestedTypes table is sorted.
21959 * icall.c: change order of GetConstructor results to workaround mcs bug.
21961 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21963 * reflection.h, reflection.c: handle field and param marshal
21966 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21968 * icall.c, marshal.c marshal.h: more Marshal class implementation.
21970 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21972 * reflection.c: fix call convention.
21974 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21976 * reflection.h, reflection.c: mono_image_get_memberref_token()
21977 takes a type instead of a class, now. Added
21978 mono_image_get_array_token() to create tokens for the special
21979 multi-dim array methods.
21981 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21983 * assembly.c: handle modules (no assembly table). Split
21984 loading references in its own function.
21985 * class.c: handle moduleref resolution scope.
21986 * image.c, image.h: cache module name in image.
21988 2002-06-07 Martin Baulig <martin@gnome.org>
21990 * reflection.c (mono_image_get_type_info): Only add a class layout entry
21991 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
21993 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21995 * icall.c: more signature fixes that used uint instead of int.
21997 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21999 * reflection.c: fixed signature of field refs.
22001 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22003 * class.c, reflection.c: handle typerefs of nested types
22004 (both on read and when writing files).
22006 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
22008 * icall.c: fix method signatures that tried to workaround the previous
22011 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
22013 * debug-helpers.c: fix typo.
22015 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
22017 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
22018 rewrote the PE/COFF writing code (our programs are understood by the
22021 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
22023 * gc.c, gc.h, icall.c: weakreference support.
22025 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
22027 * Makefile.am, mono-config.c: use $(sysconfdir).
22029 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
22031 * icall.c: changed default precision of Double.ToString() to 15.
22032 Fixed memory leak. Unified with Single.ToString.
22034 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
22036 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
22038 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
22040 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
22041 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
22042 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
22045 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22047 * debug-symfile.c, sysmath.c: yet more compilation fixes.
22049 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22051 * reflection.c, socket-io.c: more compilation fixes.
22053 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22055 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
22056 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
22057 unicode.c: warning and compiler compatibility fixes.
22059 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22061 * class.h, metadata.c: fixed warnings/compilation errors.
22063 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
22065 * Makefile.am, mono-config.c, mono-config.h: configuration file
22067 * loader.c, loader.h: make Dll mapping configurable at runtime in the
22068 config file. Export methods to insert and lookup mappings.
22070 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
22072 * reflection.c: handle types and boxed objects in custom attr
22075 2002-05-30 Martin Baulig <martin@gnome.org>
22078 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
22080 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
22082 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
22083 to lookup the implmap row for a P/Invoke method.
22084 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
22085 P/Invoke method from the runtime on an as needed basis.
22087 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
22089 * metadata.c (mono_metadata_parse_signature): impl.
22091 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22093 * class.c: handle .pack directive.
22095 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
22097 * object.c: initialize static fields with RVA data.
22099 2002-05-25 Martin Baulig <martin@gnome.org>
22102 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
22104 2002-05-24 Martin Baulig <martin@gnome.org>
22107 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
22108 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
22109 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
22111 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
22113 * object.c: special case string ctros in invoke.
22114 * gc.c: silly whitespace changes.
22116 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
22118 * threadpool.[ch]: impl. a threadpool that can
22119 be used by mint and mono.
22121 2002-05-22 Martin Baulig <martin@gnome.org>
22123 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
22124 The first argument is now a `MonoReflectionModuleBuilder *', the return
22125 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
22126 `methods' field to get the method builder. The `token' argument is the
22129 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
22130 invalid characters instead of g_assert_not_reached()ing. This seems
22131 to be the behaviour of mscorlib.
22133 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
22135 * object.c (mono_runtime_invoke_array): applied patch from Rachel
22136 Hestilow to fix bug #25104
22138 2002-05-21 Martin Baulig <martin@gnome.org>
22140 * debug-symfile.c (mono_debug_find_source_location): New function.
22141 Looks up an IL offset in the line number table and returns the source
22142 location as a string.
22144 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22147 (mono_double_ToStringImpl): changed %f by %g until we have something
22150 2002-05-21 Nick Drochak <ndrochak@gol.com>
22152 * icall.c : Use different name for Math.Pow's icall. Needed to check
22153 parameters first in C#.
22155 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22157 * icall.c, reflection.h: added icall to get info about an event.
22159 2002-05-20 Radek Doulik <rodo@ximian.com>
22161 * object.c (mono_value_box): don't use memcpy for boxing on BIG
22163 (mono_value_box): don't use memcpy for small sizes on
22164 architectures with unaligned access
22166 2002-05-20 Martin Baulig <martin@gnome.org>
22168 * reflection.c (mono_reflection_setup_internal_class): Don't crash
22169 if `tb->parent == NULL'.
22170 (mono_reflection_create_internal_class): New function. This is
22171 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
22174 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
22177 2002-05-19 Martin Baulig <martin@gnome.org>
22179 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
22180 argument to get the length, don't default to the array length.
22182 2002-05-18 Miguel de Icaza <miguel@ximian.com>
22184 * assembly.c (mono_assembly_setrootdir): New function used to
22185 override the MONO_ASSEMBLIES directory.
22187 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22189 * icall.c: ValueType_GetHashCode() initialize local var.
22191 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22193 * reflection.c: sort custom attributes table.
22195 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22197 * reflection.c: support named args in custom attributes (write support).
22199 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
22201 * reflection.c: fix finally position calculation.
22203 2002-05-15 Radek Doulik <rodo@ximian.com>
22205 * reflection.c: fixed endianess at many places
22207 * icall.c (ves_icall_InitializeArray): comment out debug msg
22209 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
22211 * object.c (mono_unhandled_exception): new function to handle
22212 unhandled exceptions.
22213 (mono_unhandled_exception): call the UnhandledException event.
22214 (mono_runtime_delegate_invoke): impl.
22216 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
22218 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
22219 returns the RVA, not the direct pointer to the data. Handle the case
22220 when the class size is fixed.
22222 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
22224 * reflection.c: fix some endianess issues.
22226 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
22228 * object.c (mono_runtime_invoke): is now able to catch exceptions.
22230 * threads.c (mono_thread_init): added a callback which is invoked
22233 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
22235 * icall.c: make GetHashCode return non-negative values.
22237 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
22239 * object.c, icall.c, gc.c: revert to address-based hashcode.
22241 2002-05-13 Miguel de Icaza <miguel@ximian.com>
22243 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
22245 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22247 * icall.c, class.c: special case <Module>.
22249 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
22251 * icall.c: fix bug in GetNow().
22253 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
22255 * object.c (mono_runtime_class_init): make sure that we call all
22256 static class constructors.
22258 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
22260 * reflection.c: sort methodsemantics table.
22262 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
22264 * reflection.h, reflection.c: honour init locals setting.
22266 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
22268 * icall.c: copied Double ToStringImpl for Single ToStringImpl
22270 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22272 * reflection.c: support ContructorBuilders in attribute blob creation.
22274 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22276 * reflection.c: some changes to build a binary that can be run
22277 directly in windows.
22279 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22281 * loader.c: print a big message when an icall can't be found.
22283 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22285 * string-icalls.c: fix bug 24248.
22287 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
22289 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
22290 icall.c, reflection.h: separate assembly loading by pathname and by
22291 assembly name. Use the MONO_PATH env var to search for assemblies.
22293 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22295 * assembly.c, image.h: add some support for assemblies
22296 with multiple modules.
22297 * class.c, class.h: export mono_class_from_typeref().
22298 * loader.c: remove duplicated code and use mono_class_from_typeref(),
22301 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22303 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
22304 documentation says (the ECMA one is correct).
22306 2002-05-02 Dick Porter <dick@ximian.com>
22308 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
22309 Don't name the synchronisation mutex.
22311 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
22314 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
22315 Make the prototypes match.
22316 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
22320 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
22321 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
22322 all systems have tm.tm_zone, so use strftime() with %Z to print
22323 the timezone abreviation into a temp string.
22325 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
22326 rather than mono_array_addr() on a MonoString on Big Endian
22329 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
22331 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
22334 2002-04-30 Dick Porter <dick@ximian.com>
22336 * socket-io.c: Cope with SOCKET being an integer rather than a
22339 * threads.c: Added Thread_free_internal, to deal with thread
22340 handle cleanup. Moved calls to handle_store() and handle_remove()
22341 to start_wrapper(), so each can only be called once. Allocate
22342 synchronisation blocks with GC_malloc(), and use GC finalisation
22343 to close the handles.
22345 * icall.c: added System.Threading.Thread::Thread_free_internal
22347 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22349 * icall.c: support Environment.Exit, CommandLineArgs().
22351 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
22353 * object.c, object.h: added mono_runtime_run_main () and
22354 mono_runtime_get_main_args () for use in System.Environment.
22356 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22358 * gc.c: fix thinko, enable actual finalization since the jit is now
22361 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22363 * gc.c, object.c: take into account that an object may be offset wrt the address
22364 returned by GC_malloc().
22366 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
22368 * image.c: handle files without entries in the assembly table (modules).
22370 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
22372 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
22373 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
22374 allowed to be null when it's System.Object class setup.
22376 2002-04-27 Martin Baulig <martin@gnome.org>
22378 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
22379 if `tb->parent == NULL' rather than crashing.
22381 2002-04-28 Nick Drochak <ndrochak@gol.com>
22383 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
22384 calling acos() where asin() should have been called.
22386 2002-04-26 Martin Baulig <martin@gnome.org>
22388 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
22389 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
22390 there's a subdirectory called `System', but we don't want to read that
22391 subdirectory as an assembly.
22393 2002-04-25 Martin Baulig <martin@gnome.org>
22395 * debug-symfile.c: Reflect latest MonoString changes.
22397 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22399 * rand.c, rand.h: instance method icalls need to have an explicit
22400 this pointer as first argument in the C implementation.
22402 2002-04-25 Nick Drochak <ndrochak@gol.com>
22404 * icall.c: Fix typo in map for GetNonZeroBytes
22406 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
22408 * string-icalls.c : String does now passes unit tests without any
22409 errors, the following changes has been made:
22411 Implemented replace methods.
22412 Renaming of methods to (try) follow the standard.
22413 Fixed compare ordinal
22414 Made all memory allocated directly to function instead of via icall function.
22415 Small performance fix in is_in_array function
22417 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
22419 c (mono_string_Internal_ctor_charp_int_int):
22420 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
22421 sindex < 0, throw ArgumentOutOfRangeException instead of
22422 ArgumentNullException.
22424 Added new check for length == 0, however
22425 I need to make it return String.Empty from the C code.
22427 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
22428 that calculate the length for us here.
22430 (mono_string_Internal_ctor_sbytep_int_int): Replaced
22431 mono_string_new_utf16 with mono_string_new, since value is utf8.
22433 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22435 * object.c: register the object for finalization if needed.
22436 Allocate one more char in the string for the terminating 0 char.
22438 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22440 * class.c, class.h, image.c: check if a type implemenst a destructor.
22441 Use the proper key for array class lookups.
22442 * icall.c: register the icalls in the System.GC class.
22443 * gc.c, gc.h: GC-related functions and icalls.
22445 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22449 * unicode.c: free some strings gotten from mono_string_to_utf8 and
22450 changed a couple of free () by g_free ().
22452 * decimal.c: one-liner in the comments for decimal2string ().
22454 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
22456 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
22458 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
22460 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
22461 * object.c (mono_runtime_invoke_array) : handle null in params
22463 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
22465 * string-icalls.c: fixed bug in split (one off bug)
22467 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
22469 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
22470 * icalls.c: added String::Equals as internal method
22472 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
22474 * threads.c: fixed bug in the double interlocked functions
22476 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
22478 * threads.c: implemented all of the new interlocked icalls.
22479 * string-icalls.c: fix a bug in insert.
22480 * icalls.c: added the icalls for interlocked, removed old string functions.
22482 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22484 * loader.c: fix off-by-one error when reading argument names.
22486 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22488 * profiler.c: win32 counter implementation (untested).
22489 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
22490 (the latter needs testing and more complete impl. from win32 folks).
22492 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
22494 * object.c: mono_array_new_full workaround mono_array_class_get
22497 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22499 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
22500 * object.h (mono_string_chars): Changed casting type.
22502 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22504 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
22505 method signatures to use gunichar2 instead of gint16.
22507 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
22509 * object.h, object.c: domain-specific versions of mono_object_new and
22512 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
22514 * object.c: changed String layout
22516 * string-icalls.c (mono_string_Internal_ctor_chara): added
22517 internal string constructors.
22519 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
22521 * threads.c: pass 'this' to the thread start routine.
22523 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22525 * string-icalls.c: fix IndexOf and LastIndexOf. Now
22526 InternalCompareStr don't call twice mono_string_cmp_char for the last
22527 character. Improved performance in mono_string_cmp_char.
22529 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22531 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
22532 code into its own library: libmonoruntime.
22534 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
22536 * object.h, object.c: changed array format so that szarrays do not
22537 require a bounds structure.
22538 * icall.c, appdomain.c: support for new szarray format.
22540 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22542 * metadata.c: compare also the retuns type when comparing signatures:
22543 we didn't do this as an optimization since really overloaded methods
22544 must differ also in the arguments, but this doesn't work with
22545 low-level IL code (or when using explicit conversion operators: see
22546 bug#23498 for an example).
22548 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22550 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
22552 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
22554 * icall.c: make MonoType::GetElementType its own icall.
22556 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22558 * icall.c: remove MonoMethod_get_Name().
22559 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
22562 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22564 * string-icalls.c: optimized a few methods.
22566 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22568 * icall.c: added all new string internal calls
22569 * string-icalls.c: added, new string internal call implementation.
22570 * object.c: added mono_string_new_size for allocating a string a size
22572 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
22574 * object.c (mono_object_isinst): use the same code as in the
22575 optimized x86 version.
22577 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22579 * profiler.c: TSC-based timer code (faster and more accurate).
22580 Not hooked up in configure, yet (set USE_X86TSC to 1).
22582 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
22584 * profiler.c, profiler.h: track time spent compiling methods.
22585 * threads.c: track thread creation/destruction.
22587 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
22589 * profiler.c, profiler.h, profiler-private.h: profiling interface
22590 and sample implementation. Moved here so that it can be used also by
22593 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
22595 * reflection.c, reflection.h: keep types and other handles separate in
22596 the hash tables for referred tokens. Add guid for modules.
22598 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
22600 * assembly.c: fix bugs found with valgrind.
22601 * metadata.h, metadata.c: added mono_metadata_guid_heap().
22603 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
22605 * threads: added icall support for getting current domain for
22608 2002-04-13 Martin Baulig <martin@gnome.org>
22610 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
22611 (MonoDebugVarInfo): Added `index' field for register based addresses.
22612 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
22613 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
22614 `MonoDebugVarInfo *params' and `guint32 this_offset' with
22615 `MonoDebugVarInfo *this_var'.
22617 * debug-symfile.c (relocate_variable): New static function to write
22618 a location description for a local variable or method parameter.
22620 2002-04-12 Martin Baulig <martin@gnome.org>
22622 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
22623 stack offset and begin/end scope address of a local variable.
22624 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
22625 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
22626 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
22628 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
22629 Added new relocation types for start/end scope of a local variable.
22631 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22633 * object.h: add mono_object_domain() macro.
22634 * reflection.c: handle typespecs.
22635 * icall.c: MonoMethod::get_Name() implementation.
22637 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22639 * icall.c: String::GetHashCode() icall implementation.
22641 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22643 * icall.c: String::IndexOfAny icall.
22644 * object.c, object.h: make array->max_length more useful.
22645 Intrduced mono_object_class() and mono_string_length() macros.
22647 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22649 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
22650 instead of g_unichar_isdigit.
22652 2002-04-11 Nick Drochak <ndrochak@gol.com>
22654 * icall.c: Implement a simple Double.ToString().
22656 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22658 * appdomain.h: only io-layer.h is supposed to be included.
22659 * icall.c: explicitly import environ. Fix warning.
22661 2002-04-10 Nick Drochak <ndrochak@gol.com>
22663 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
22664 return true even if it's not Daylight Savings time.
22665 Only return false for the case where the function isn't
22666 implemented for a plaform (read Windows).
22668 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22670 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
22673 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
22675 * mempool.c (mono_mempool_alloc): only use g_malloc when
22676 absolutely necessary.
22678 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
22680 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
22682 * class.c (mono_class_vtable): use domain mempool to allocate vtable
22683 (mono_class_proxy_vtable): use domain mempool
22685 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
22687 * appdomain.h, appdomain.c: split initialization that requires the
22688 execution engine support into mono_runtime_init().
22690 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
22692 * class.c (mono_class_init): don't include vtable inside MonoClass
22693 to save some memory, gather some statistics.
22694 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
22696 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22698 * icall.c: internalcall implementation for ValueType.Equals().
22700 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
22702 * object.c (mono_message_init): moved
22703 (mono_runtime_exec_main): new arch. independent impl.
22704 (mono_runtime_invoke_array): new method - like
22705 mono_runtime_invoke, but you can pass an array of objects.
22706 (mono_remoting_invoke): new arch. independent impl.
22707 (mono_message_invoke): new arch. independent impl.
22708 (mono_runtime_class_init): new arch. independent impl.
22709 (mono_runtime_object_init): new arch. independent impl.
22711 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22713 * metadata.c, object.c, reflection.c: documented the exported
22716 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
22718 * icall.c: simpler code to pass the assembly builder data to corlib.
22719 Implement GetNestedTypes() internalcall.
22721 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22723 * class.c: warn if a type can't be loaded.
22725 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
22727 * image.h: typedef MonoImageOpenStatus
22728 * types.h: removed unused file
22730 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
22732 * icall.c: Enum_ToObject accepts enum value arguments.
22734 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
22736 * class.c: move initialization of properties, events and nested
22737 classes, so that they happen for interfaces, too.
22739 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
22741 * icall.c: cleanup some ugly casts in Array_SetValue*.
22743 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22745 * icall.c: the values array fro enums is of the correct type, now.
22746 Implement (correctly) getFullName instead of assQualifiedName for
22748 * reflection.h, reflection.c: added mono_type_get_name ().
22750 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22752 * assembly.c, image.h: for each MonoImage, record from wich assembly
22754 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
22755 Make Type.Assembly work.
22757 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
22759 * debug-symfile.h: use char* instead of gpointer to avoid
22762 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
22764 * icall.c (ves_icall_InternalExecute): impl. FielSetter
22765 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
22767 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
22769 * icall.c (mono_message_init): impl. (code cleanup)
22770 (ves_icall_InternalExecute): impl. FieldGetter
22772 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
22773 defined we call all (non-static)methods through the vtable.
22775 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
22777 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
22778 finalizer even though the memory is still referenced (and the chunk of
22779 memory is not freed).
22781 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
22783 * assembly.c: fix brokeness.
22785 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
22787 * class.c: kill some warnings. Check explicit interface method
22788 implementation also without considering the namespace.
22789 Load also literal strings in static class data.
22791 2002-03-29 Miguel de Icaza <miguel@ximian.com>
22793 * assembly.c (default_assembly_name_resolver): Kill memory leak.
22794 (default_assembly_name_resolver): Make the resolver take the
22795 "base" directory where the assembly was originally defined, so we
22796 can load DLLs that are in the same directory as the assembly that
22797 is being referenced.
22799 2002-03-28 Dick Porter <dick@ximian.com>
22805 * unicode.c: Warning cleanups
22807 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
22809 * object.h, reflection.h: use the correct type instead of MonoObject.
22811 2002-03-28 Martin Baulig <martin@gnome.org>
22813 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
22814 (mono_debug_update_symbol_file): Initialize classes if necessary.
22816 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22818 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
22819 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
22821 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
22823 * assembly.h: fix function prototype.
22824 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
22825 * mono-endian.h: use const cast.
22827 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
22829 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
22831 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
22833 * loader.c: don't assert when a typeref can't be loaded, give
22834 a chance to the runtime to trow an exception instead.
22835 * loader.h: fix warning.
22837 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
22839 * class.c (mono_class_proxy_vtable): added proxy support
22841 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
22843 * icall.c: removed last of PAL calls, added System.Environment
22844 * file-io.h, file-io.c: MonoIO implementation
22845 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
22847 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
22849 * appdomain.c: do not use the byte marker in ldstr table lookup.
22850 * debug-helpers.c: allow two ':' to separate class and method name.
22851 * object.c: allocate arrays bounds with the GC, too.
22852 * verify: add a few more checks.
22854 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
22856 * reflection.c: output also literal strings. Allocate parameter data
22857 with GC_malloc() (thanks, Martin, for catching this!).
22859 2002-03-26 Martin Baulig <martin@gnome.org>
22861 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
22862 include the `this' offset in the `param_offsets'.
22864 2002-03-25 Martin Baulig <martin@gnome.org>
22866 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
22867 mono_debug_get_class() function to get the classes. Added new
22868 relocation types for arrays and strings.
22869 (mono_debug_get_class): New static function to search in all
22870 referenced assemblies for a metadata token.
22872 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
22874 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22876 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
22877 hold gc-allocated objects. Make the string heap a stream like the
22878 others. Removed duplicated code when writing stream info.
22879 Added asserts to catch possible buffer overflows. Set the sorted map
22880 for tables that need sorting. Added some documentation.
22882 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
22884 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
22885 for interned strings and vtables.
22887 2002-03-24 Martin Baulig <martin@gnome.org>
22889 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
22890 it in the array since it was created with g_slist_prepend().
22892 2002-03-24 Martin Baulig <martin@gnome.org>
22894 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
22895 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
22896 (mono_debug_method_from_token): Renamed to
22897 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
22898 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
22900 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
22903 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
22905 2002-03-24 Martin Baulig <martin@gnome.org>
22907 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
22908 (mono_debug_method_from_token): New func.
22910 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
22911 New interncall, calls mono_debug_local_type_from_signature().
22912 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
22913 calls mono_debug_method_from_token().
22915 2002-03-23 Martin Baulig <martin@gnome.org>
22917 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
22918 specifies the number of bytes to be converted, not the array size.
22919 Return the number of chars, not the number of bytes.
22920 (ves_icall_iconv_get_chars): The `byteCount' argument
22921 specifies the number of bytes to be converted, not the array size.
22923 2002-03-23 Martin Baulig <martin@gnome.org>
22925 * reflection.h (MonoReflectionSigHelper): New type.
22927 * reflection.c (mono_reflection_sighelper_get_signature_local),
22928 (mono_reflection_sighelper_get_signature_local): New functions.
22930 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
22931 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
22934 2002-03-23 Martin Baulig <martin@gnome.org>
22936 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
22937 is_writeable is set.
22938 (mono_raw_buffer_update): New function to write the modified map
22941 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
22943 * debug-symfile.c (mono_debug_update_symbol_file): Call
22944 mono_raw_buffer_update() when done writing.
22946 2002-03-23 Martin Baulig <martin@gnome.org>
22948 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
22950 * debug-symfile.c: Added support for arguments and local variables.
22952 2002-03-23 Dick Porter <dick@ximian.com>
22954 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
22955 protected by ifdefs, hence breaking the w32 build.
22957 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22959 * object.c: implement is_interned() the right way.
22961 2002-03-21 Martin Baulig <martin@gnome.org>
22963 * debug-symfile.[ch]: New files to handle debugging information
22964 files. There's also support to dynamically update these symbol
22965 files to include machine dependent information.
22967 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
22969 * threads.c (mono_thread_create): new function to create thread
22972 2002-03-20 Martin Baulig <martin@gnome.org>
22974 * icall.c (ves_icall_InternalInvoke): Create a new object if the
22975 method is a constructor.
22976 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
22977 points to ves_icall_InternalInvoke().
22979 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
22981 * file-io.c: Flush shouldn't throw exceptions.
22983 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
22985 * file-io.c: FileStream flush support; FileSetLength now
22986 restores file pointer.
22988 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
22990 * class.c: set image for pointer classes.
22992 2002/03/19 Nick Drochak <ndrochak@gol.com>
22994 * sysmath.c: Forgot one.
22996 2002-03-18 Miguel de Icaza <miguel@ximian.com>
22998 * sysmath.c: Avoid redefining existing names.
23000 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
23002 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
23003 handled by runtime as icall rather than dllimport from libm.so
23004 * file-io.c, file-io.h: fixed handle argument type.
23006 2002-03-18 Dick Porter <dick@ximian.com>
23008 * reflection.c (mono_image_get_type_info): rename interface to
23009 iface, because of "#define interface struct" on windows.
23011 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
23013 * class.c, class.h: rename and export mono_ptr_class_get().
23014 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
23015 * reflection.c, reflection.h, icall.c: better/saner type name
23016 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
23019 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
23021 * class.c (mono_class_init): removed hardcoded GHC_SLOT
23023 * icall.c (ves_icall_InternalInvoke): impl.
23025 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
23027 * reflection.c: output the interface map table, too.
23029 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
23031 * class.c (class_compute_field_layout): separate computation of
23032 static field layout
23034 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
23036 * icall.c: added System.Buffer support.
23037 * file-io.c: moved file icalls from PAL to FileStream.
23039 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
23041 * icall.c (ves_icall_System_Object_GetHashCode): impl.
23043 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
23045 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
23047 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23049 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
23051 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
23053 * debug-helpers.{c,h}: moved here from monograph some useful functions
23054 to locate a method by name/signature in a class or image. Included
23055 also a small and flexible IL disassembler.
23057 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23059 * reflection.c: fixup tokens in methods with small header size, too.
23061 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
23063 * object.c (mono_string_to_utf8): remove assert(!error), instead
23066 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
23068 * icall.c: update to the new mono_Array_class_get interface.
23070 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
23072 * appdomain.c, object.c: Boehm-GC enable.
23073 * icall.c: make get_data_chunk() support split data requests.
23074 Ensure a class is initialized in more cases. Return only the first
23075 property found in GetProperties() or the compiler gets confused.
23076 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
23077 * reflection.h, reflection.c: add fixup mechanism for field and method
23078 tokens. Initialize assembly->typeref in a single place. Output
23079 properties after events. Support custom attributes for events, too.
23080 Typo fix for paramter custom attrs.
23082 2002-03-07 Martin Baulig <martin@gnome.org>
23084 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
23086 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
23088 * class.c (mono_array_class_get): fix. for multi. dim. arrays
23090 2002-03-06 Martin Baulig <martin@gnome.org>
23092 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
23093 non-zero lower bounds. See testcases #F10-#F13.
23095 2002-03-05 Martin Baulig <martin@gnome.org>
23097 * exception.c (mono_get_exception_argument_out_of_range): New exception.
23099 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
23100 ves_icall_System_Array_GetValue(), only calculate the absolute array position
23102 (ves_icall_System_Array_SetValue): Likewise.
23103 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
23104 as argument and does the actual work. This function is used when copying a
23105 multi-dimensional array.
23106 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
23107 now do all the widening conversions of value types.
23108 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
23110 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23112 * class.c: remove some magic numbers and use the smbolic names,
23113 instead. Added init_events() to load event info at class init time.
23114 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
23115 and mono_metadata_methods_from_event().
23116 * reflection.h, reflection.c: added support for writing out the evnets
23117 related information.
23119 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
23121 * reflection.h, icall.c: use a different method (GetInterfaces)
23122 to gather interface info and add isbyref, isprimitive and
23123 ispointer to the ves_icall_get_type_info() return value.
23125 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
23127 * class.h: stared adding support for events.
23128 * icall.c: split find_members implementation. Added debug icall to get
23129 the address of an object.
23130 * reflection.c: handle TypeBuilders in mono_type_get_object().
23132 2002-03-01 Martin Baulig <martin@gnome.org>
23134 * icall.c (ves_icall_System_Array_GetLength): This must throw an
23135 ArgumentOutOfRangeException(), not an ArgumentException().
23136 (ves_icall_System_Array_GetLowerBound): Likewise.
23137 (ves_icall_System_Array_GetValue): Improved argument checking.
23138 (ves_icall_System_Array_SetValue): Improved argument checking.
23140 2002-03-01 Martin Baulig <martin@gnome.org>
23142 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
23143 called with invalid arguments rather than just dying with g_assert().
23144 (ves_icall_System_Array_SetValue): Likewise.
23145 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
23146 raise a NotImplementedException instead.
23147 (ves_icall_System_Array_GetLength): Added argument checking.
23148 (ves_icall_System_Array_GetLowerBound): Added argument checking.
23150 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
23152 * object.h (mono_assert): new macros mono_assert and
23153 mono_assert_not_reached
23155 2002-02-28 Martin Baulig <martin@gnome.org>
23157 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
23158 and "System::String::IsInterned" to "System::String::_IsInterned".
23160 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
23162 * icall.c: remove hacks for typebuilder. Added icall to create a
23163 modified type from a tybebuilder.
23164 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
23165 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
23166 to create a backing MonoClass for a TypeBuilder.
23168 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23170 * class.c, class.h: more refactoring of class init.
23171 Export mono_class_setup_mono_type() and mono_class_setup_parent().
23173 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
23175 * marshal.c, marshal.h: start of marshaling interface.
23177 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23179 * icall.c: fix order in assembly qualified name icall.
23181 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23183 * class.c: do not free str, since we store it in the hash table.
23184 * reflection.h: add label field to MonoILExceptionInfo.
23185 * reflection.c: handle references to more than one assembly. Handle
23186 case when there isn't a module created in the assembly.
23188 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
23190 * class.c: Fix typo. Start refactoring of class init code.
23192 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
23194 * appdomain.c: exit with 1 on error.
23195 * class.c: we already have the name in MonoClassField.
23196 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
23197 MonoStreamHeader instead of an offset of image->raw_metadata.
23199 2002-02-26 Miguel de Icaza <miguel@ximian.com>
23201 * appdomain.c (mono_init): Be even more descriptive about the error.
23203 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
23205 * appdomain.c: give the user an informative message when corlib can't
23208 2002-02-26 Martin Baulig <martin@gnome.org>
23210 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
23211 New icall to get the time zone data.
23213 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23215 * reflection.c: set virtual and raw size of section correctly.
23216 * threads.c: transfer domain information to newly created threads.
23218 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23220 * class.c: when instancing a class in a domain, load the default
23221 vaules for static fields from the constant table. Fix System.Enum to
23223 * icall.c: implement Object::GetType() internalcall. Implemented
23224 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
23225 Fixed checking of binding flags in find_members().
23226 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
23227 * reflection.c: handle enumerations when writing to the constant
23228 table. Use a different object cache for types.
23231 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
23233 * object.c (mono_object_isinst): fix for arrays
23235 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
23237 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23239 * object.c: don't use mprotect () and fix intern pool hash table
23240 lookup for big endian systems.
23242 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23244 * icall.c: change type_is_subtype_of () signature.
23246 2002-02-21 Mark Crichton <crichton@gimp.org>
23248 * rand.c, rand.h: Added random number generator for
23249 System.Security.Cryptography classes.
23251 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
23253 * icall.c: Added System.Security.Cryptography calls.
23255 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
23257 * class.c, icall.c, metadata.c: better support for pointer types.
23258 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
23259 * reflection.c: Add support for getting custom attrs for properties
23260 and simplify some code.
23262 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
23264 * icall.c: change getToken () and add custom attribute GetBlob()helper
23266 * reflection.h: add custom attrs array to the reflection builder structures.
23267 * reflection.c: encode and emit custom attributes for all the relevant
23268 reflection objects. Cache fieldref and methodref tokens. Change
23269 mono_image_create_token() interface to take a MonoDynamicAssembly.
23270 More complete custom attributes decoder. Load custom attributes for
23271 Assembly, Field, Method and Constructor objects, too. Make the
23272 returned array an Attribute[] one, not object[]. Added
23273 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
23274 custom attribute constructor.
23276 2002-02-20 Dick Porter <dick@ximian.com>
23280 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
23281 problem code out for now).
23283 2002-02-19 Radek Doulik <rodo@ximian.com>
23285 * object.c (mono_ldstr): use hash table to avoid multiple swapping
23287 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
23289 * icall.c: register the GetCustomAttributes method.
23290 * object.c, object.h: add mono_string_new_len ().
23291 * reflection.h, reflection.c: added mono_runtime_invoke(),
23292 mono_install_runtime_invoke(). Added
23293 mono_reflection_get_custom_attrs () to load custom attributes and
23294 create the attribute objects.
23296 2002-02-19 Dick Porter <dick@ximian.com>
23297 * threads-dummy-types.c:
23298 * threads-dummy-types.h:
23301 * threads-pthread-types.c:
23302 * threads-pthread-types.h:
23303 * threads-pthread.c:
23304 * threads-pthread.h: Deleted obsolete files
23306 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
23308 * class.c (mono_class_vtable): runtime init the class when we
23309 allocate static class data.
23311 * icall.c (ves_icall_System_Array_SetValue): check for null values.
23313 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
23314 and String - but we will need generic marshalling support in the
23316 (mono_init): set the domain name in a ms compatible way
23318 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
23321 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
23323 * object.c (mono_array_clone): use alloca() instead of g_malloc
23326 * appdomain.c (mono_domain_unload): impl.
23328 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23330 * appdomain.c, object.c: fix intern pool implementation.
23331 * class.c: fix alignment code.
23333 2002-02-16 Radek Doulik <rodo@ximian.com>
23335 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
23336 and s2 > s1, just copy lower bytes to be compatible with little
23337 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
23338 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
23340 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
23341 force big_endian to be 1 for big endian machines
23342 (ves_icall_iconv_new_decoder): ditto
23344 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
23346 * socket-io.c (convert_sockopt_level_and_name): If the system
23347 doesn't define SOL_IP or SOL_TCP, get them by hand using
23348 getprotobyname() and caching the values (because this could be a
23350 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
23351 Use the appropriate struct when the system does support it. Ie,
23352 not all systems have struct ip_mreqn so use struct ip_mreq when
23355 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
23357 * reflection.c: handle finally clauses.
23359 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
23361 * socket-io.c: use g_snprintf() instead of snprintf.
23363 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
23365 * reflection.c (mono_param_get_objects): Cast second argument to
23366 mono_method_get_param_names to a const char** to silence the
23369 * appdomain.c (mono_domain_assembly_open): Put parens around the
23370 truth statement in the for-loop.
23372 * unicode.c (iconv_convert): Got rid of a compiler warning about
23373 int i being unused when the system has a new iconv.
23374 (iconv_get_length): Same.
23376 * image.c (load_class_names): Cast the second argument to
23377 g_hash_table_insert() to char* to hush compiler warnings about the
23379 (mono_image_open): Same here.
23381 * socket-io.c: Don't conditionally include sys/filio.h or
23382 sys/sockio.h here anymore since we now get them from
23383 io-layer/io-layer.h
23384 (inet_pton): If the system doesn't support inet_aton, implement
23385 using inet_addr and also #define INADDR_NONE if it isn't defined
23388 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
23390 * metadata.c, metadata.h: added function to get packing and size info
23392 * reflection.h, reflection.c: handle field RVA data. Save info about
23393 the table layout if needed. Assign typedef indexes to all the types
23394 before dumping the info about them to avoid forward reference problems.
23396 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
23398 * socket-io.c (convert_sockopt_level_and_name): ifdef
23399 SO_ACCEPTCONN because it is not defined on my system (old debian)
23401 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
23403 * opcode.c: use stddef.h to get NULL.
23405 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
23407 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
23408 for FIONBIO, FIONREAD and SIOCATMARK.
23409 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
23410 define INADDR_NONE and besides, inet_addr() is deprecated and
23411 should not be used. Use inet_pton() instead - it also has the
23412 added bonus that it can easily handle IPv6 addresses as well.
23413 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
23415 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
23417 * decimal.c: remove _MSC_VER conditional.
23419 2002-02-13 Dick Porter <dick@ximian.com>
23422 * icall.c: Internal calls for Blocking, Select, Shutdown,
23423 GetSocketOption and SetSocketOption
23425 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23427 * assembly.cs: better resolver: use it instead of some kludgy
23430 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
23432 * reflection.c: the best way to speed-up the compiler is to avoid
23435 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
23437 * class.c (mono_class_vtable): changed the object layout
23438 (obj->vtable->class).
23439 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
23441 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23443 * assembly.c: look for assemblies in the assembly dir, too.
23445 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23447 * class.c: fix thinko in mono_class_from_type().
23449 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23451 * exception.h, exception.c: added TypeLoadException.
23452 * object.h, object.c: added mono_array_clone ().
23453 * icall.c: handle throwOnError in AssemblyGetType().
23454 Added Array.Clone().
23455 * opcode.h, opcode.c: use a single value for the opcode val.
23456 Compile fix for non-gcc compilers.
23458 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
23460 * opcodes.c, opcodes.h: export interesting info about opcodes.
23462 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
23464 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
23467 * class.c (class_compute_field_layout): set element_class for enums
23468 (mono_class_create_from_typedef): set element_class for normal classes
23470 * icall.c (ves_icall_System_Enum_get_value): impl.
23472 * class.c (mono_class_create_from_typedef): do not set valuetype
23473 flag for System.ValueType and System.Enum
23475 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
23477 * unicode.c (iconv_convert): fix big endian problem.
23479 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23481 * class.c: add asserts if we are ever going to scribble over memory.
23482 * socket-io.c: not all systems have AF_IRDA defined.
23484 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
23486 * class.c (class_compute_field_layout): do not consider static
23487 fields to compute alignment
23489 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
23491 * appdomain.c (mono_appdomain_get): impl.
23492 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
23494 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
23496 * icall.c: ignore "file://" prefix when loading an assembly.
23498 2002-01-23 Dick Porter <dick@ximian.com>
23502 * Makefile.am: Added socket support
23504 2002-01-23 Miguel de Icaza <miguel@ximian.com>
23506 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
23507 code back. This should return the assemblies that are loaded by
23508 the runtime on behalf of an application domain.
23510 The current implementation is still broken, it just returns every
23511 assembly loaded, but until we get real applications domain this
23514 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
23516 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
23519 2002-01-23 Miguel de Icaza <miguel@ximian.com>
23521 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
23522 the mono_class_from_name lookup.
23523 (ves_icall_get_parameter_info): ditto.
23524 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
23526 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
23528 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
23530 * class.c: load also nested classes on class init.
23531 System.ValueType instance methods gets passed boxed
23532 values, unless methods in derived classed that get a pointer to the
23534 * icall.c: use better name parsing code in GetType().
23535 * image.c, image.h: add mono_image_loaded ().
23536 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
23537 * reflection.c, reflection.h: added mono_reflection_parse_type().
23539 2002-01-22 Veronica De Santis <veron78@interfree.it>
23541 * icall.c : Added mapping of internal calls for Manual and Auto reset events
23542 * threads.c : Added the implementation of internal calls for events
23543 * threads.h : Added prototypes of internal calls for events
23545 2002-01-21 Radek Doulik <rodo@ximian.com>
23547 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
23549 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
23551 * class.c (mono_class_init): set min_align to 1 (instead of 0)
23552 (mono_class_value_size): use min_align
23554 2002-01-20 Dick Porter <dick@ximian.com>
23557 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
23558 so it compiles on w32.
23560 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
23562 * metadata.c (mono_type_stack_size): impl.
23564 * class.c (mono_class_get_field): impl. memberref token
23566 2002-01-16 Veronica De Santis <veron78@@interfree.it>
23568 * icall.h : Added the internal calls mapping for CreateMutex_internal
23569 and ReleaseMutex_internal.
23570 * threads.h : Added the prototype of mutexes internal calls.
23571 * threads.c : Added the implementations of mutexes internal calls.
23573 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23575 * metaparse.h: removed unused file.
23576 * reflection.c, reflection.h: added stream_data_align () function
23577 to align data in streams and keep stream aligned. Add support for
23578 exception support in method headers.
23580 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
23582 * unicode.c: make iconv_convert () return the number of bytess written
23583 in the output buffer.
23585 2002-01-15 Dick Porter <dick@ximian.com>
23586 * threads.c: Make the runtime's idea of infinite timeouts coincide
23587 with the class library's
23589 Fix a particularly egregious bug in mono_thread_cleanup(). That
23590 code was so utterly bogus it must have been written on a Monday.
23592 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23594 * reflection.h: add subtypes field to TypeBuilder.
23595 * reflection.c: encode constants for literal fields.
23596 Handle subtypes. Fix user string token (and add a zero byte)
23599 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
23601 * class.c (mono_class_init): bug fix: assign slot numbers for
23604 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23606 * reflection.c: don't try to output a code RVA for abstract methods.
23607 Small fixes for method header format. Output parameter info to the
23608 ParamDef table. Save method overriding info to MethodImpl table.
23609 Fix property support. Allow typedef.extends to be a type in the
23611 * verify.c: fix off-by-one error.
23613 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
23615 * class.c: fix mono_class_from_mono_type () for szarray types.
23616 Remove unused cache check in mono_class_from_type_spec().
23617 * icall.c: *type_from_name () functions handle simple arrays and byref.
23618 * reflection.c: handle byref and szarray types. Handle methods without
23619 body (gets P/Invoke compilation working). Handle types and fields in
23621 * reflection.h: add rank to MonoTypeInfo.
23623 2002-01-10 Dick Porter <dick@ximian.com>
23625 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
23628 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23630 * icall.c: initialize class in type_from_handle ().
23631 Loop also in parent classes for get_method ().
23632 * reflection.c: properly encode class and valuetype types.
23633 Start on encoding TypeBuilder types. Handle fieldrefs.
23634 Use correct length when registering a user string.
23635 Handle ConstructorBuilder and MonoMethod in get_token ().
23636 Make mono_type_get_object () aware of cached types.
23637 * object.c: back out change to mono_string_new ().
23639 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
23640 * object.c: mono_string_new should return a NULL when the string
23641 passed in is NULL -- not try to deference it.
23643 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23645 * icall.c: hack to make IsSubType work for TypeBuilders.
23646 * reflection.c: emit constructors before methods.
23647 Retrieve param names in mono_param_get_objects().
23649 2002/01/05 Nick Drochak <ndrochak@gol.com>
23651 * Makefile.am: fix list of headers and sources so automake 1.5
23652 doesn't complain. Removed \# at end of list.
23654 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23656 * reflection.c: get token for a method ref. Set return type of
23657 constructor to void.
23658 * loader.c: debug message.
23659 * class.c: typo fix.
23661 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
23663 * icall.c: fix array init with rank > 1. FindMembers
23664 loops in parent class as well.
23665 * image.c: do not insert nested types in name cache.
23666 * reflection.c: warning fix.
23667 * reflection.h: add override method (for interface impl).
23669 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
23671 * metadata.c: fix customattr decoding.
23673 2001-12-21 Miguel de Icaza <miguel@ximian.com>
23675 * rawbuffer.cs: Added native Win32 implementation, avoids using
23676 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
23678 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
23680 * class.c: make the low-level routines handle the cache.
23682 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
23684 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
23686 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
23688 * class.c: fix mono_array_element_size() for objects.
23689 * class.h, class.c: add properties to MonoClass and load them
23691 * icall.c: check with isinst() when assigning a value to an array
23692 instead of requiring the classes to match exactly.
23693 Implemented icall for System.Type::GetType().
23694 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
23695 enums. Handle bindingflags when looking for methods and fields.
23696 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
23697 and mono_metadata_methods_from_property().
23698 * reflection.h, reflection.c: added structures for propreties,
23699 parameters and enums. Implemented mono_property_get_object() and
23700 mono_param_get_objects().
23702 2001-12-18 Dick Porter <dick@ximian.com>
23704 * file-io.c: Use mono_string_to_utf16() instead of
23705 mono_string_chars()
23707 * object.c: Added mono_string_to_utf16(), which copies the non
23708 NULL-terminated MonoString into a new double-null-terminated
23711 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
23713 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
23715 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
23717 * file-io.c: raise exceptions if handle is invalid.
23719 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
23721 * assembly.c: yet another check for mscorlib.
23722 * class.c, class.h: load nesting info for classes.
23723 * icall.c: many new functions to support the Reflection classes.
23724 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
23725 * reflection.h, reflection.c: mono_image_create_token(),
23726 mono_assembly_get_object(), mono_type_get_object(),
23727 mono_method_get_object(), mono_field_get_object(): methods to return
23728 objects that parallel the C representation of assemblies, types,
23731 2001-12-11 Dick Porter <dick@ximian.com>
23734 * file-io.c: Internal calls for file IO.
23736 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
23738 * tabledefs.h: missing FileAttributes.
23739 * verify.h, verify.c: use is_valid_string () to simplify and check for
23740 valid strings more correctly. Fix warnings and speeling.
23741 Check more tables: Filed, File, ModuleRef, StandAloneSig.
23742 Check code: branches, maxstack, method calls.
23744 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
23746 * object.c (mono_object_allocate): removed static, so that the jit
23747 can allocate value types.
23749 * icall.c (ves_icall_System_DateTime_GetNow): impl.
23751 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23753 * class.c: init enum types right away and register the
23754 token->MonoClass map in mono_class_create_from_typedef ().
23755 * verify.h, verify.c: first cut of the verifier.
23756 * pedump.c: add --verify switch to verify metadata tables.
23757 * tabledefs.h: add some missing enums.
23759 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
23761 * class.c (mono_install_runtime_class_init): impl.
23762 (mono_class_init): renamed mono_class_metadata_init to
23763 mono_class_init, also removed the metadata_inited flag
23765 * object.c (mono_object_isinst): use faster algorithm
23767 2001-11-30 Radek Doulik <rodo@ximian.com>
23769 * mono-endian.h: reverted last change
23770 added function prototypes
23772 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
23773 add mono-endian.c back
23775 * mono-endian.c: returned back, as Paolo pointed out, it's needed
23776 for unaligned access, I've mistaked it with endianess. I am
23778 (mono_read16): fix reverted endianess
23779 (mono_read64): ditto
23780 (mono_read32): ditto
23782 2001-11-30 Dick Porter <dick@ximian.com>
23784 * exception.c: Implement mono_exception_from_name()
23786 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23788 * metadata.h, metadata.c: remove params_size and locals_size and their
23789 calculation from the metadata code: they are only usefult to the
23792 2001-11-29 Radek Doulik <rodo@ximian.com>
23794 * object.c (mono_ldstr): swap bytes here, it's probably not the
23795 best place, but works for me now, I'll redo it once I know mono
23796 better, also note that I add PROT_WRITE and don't reset back, also
23797 note that it's only affects big endians, so x86 should be OK
23799 * mono-endian.h (read16): use just glib macros for both endians
23801 * mono-endian.c: removed as glib macros are used in in
23802 mono-endian.h so we don't need to care about endianess for read
23803 macros as glib does that for us already
23805 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
23807 * class.h, class.h: take minimum alignment into consideration so
23808 that the fields of a class remain aligned also when in an array.
23810 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23812 * loader.h, loader.c: add mono_method_get_param_names().
23813 * class.c: 0-init class fields.
23815 2001-11-26 Dick Porter <dick@ximian.com>
23819 * threads.c: New file that handles System.Threading on all platforms
23822 * object.h: Remove the synchronisation struct from MonoObject,
23823 replace it with a pointer that gets initialised on demand
23825 * Makefile.am: Replace all the system-specific threading code with
23826 a single file that uses the new wrapper library
23828 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
23830 * class.c, class.h: add mono_install_trampoline() so that the runtime
23831 can register a function to create a trampoline: removes the ugly
23832 requirement that a runtime needed to export arch_create_jit_trampoline.
23833 * object.h, object.c: added mono_install_handler() so that the runtime
23834 can install an handler for exceptions generated in C code (with
23835 mono_raise_exception()). Added C struct for System.Delegate.
23836 * pedump.c: removed arch_create_jit_trampoline.
23837 * reflection.c: some cleanups to allow registering user strings and
23838 later getting a token for methodrefs and fieldrefs before the assembly
23840 * row-indexes.h: updates and fixes from the new ECMA specs.
23842 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
23844 * class.h, class.c: add enum_basetype field to MonoClass.
23845 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
23846 to get index in the constant table reated to a field, param or
23848 * reflection.h, reflection.c: handle constructors. Set public-key and
23849 version number of the built assembly to 0.
23850 * row-indexes.h: update from new ECMA spec.
23852 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23854 * class.h, class.c: add a max_interface_id to MonoClass.
23855 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
23856 since it's used to do that. Added mono_type_type_from_obj().
23857 Make GetType() return NULL instead of segfaulting if the type was not
23858 found. Handle simple arrays in assQualifiedName.
23859 * object.h: add a struct to represent an Exception.
23860 * reflection.c: output call convention in method signature.
23861 Add code to support P/Invoke methods and fixed offsets for fields.
23863 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
23865 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
23867 * icall.c: use mono_array_addr instead of array->vector: fixes the
23868 reflection image writing.
23869 * reflection.c: init call convention byte to 0 in method signature.
23870 Encode the property signature. Don't output property-related methods
23871 twice. Really process the properties for a type (don't cast a field to
23872 a property, my mom always told me that).
23873 Fix 64 bit issues in pointer alignment in a different and more
23876 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
23878 * loader.h: Removed type class from MonoDefaults, added monotype
23880 * loader.c: Loaded MonoType, removed loading of Type
23882 * icall.c (my_mono_new_object): Now returns a System.MonoType,
23883 and fills in System.Type._impl with a RuntimeTypeHandle rather
23884 than the actual MonoClass *
23886 (ves_icall_type_from_handle): change from type_class to
23889 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
23892 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
23895 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
23897 (ves_icall_System_Reflection_Assembly_GetType): implemented
23899 (ves_icall_System_MonoType_assQualifiedName): implemented
23901 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
23903 2001-11-09 Miguel de Icaza <miguel@ximian.com>
23905 * assembly.c (mono_assembly_open): Implement a cache for the
23908 (mono_assembly_close): only destroy the assembly when the last
23911 2001-11-09 Dick Porter <dick@ximian.com>
23913 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
23915 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
23917 * class.c (mono_class_metadata_init): bug fix: compute the right slot
23919 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23921 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
23922 from Martin Weindel.
23923 * object.h: add mono_string_chars ().
23925 2001-11-07 Miguel de Icaza <miguel@ximian.com>
23927 * reflection.c (build_compressed_metadata): Eliminates warnings
23928 and uses 64-bit clean code.
23930 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
23931 (mono_type_equal): Change signature to eliminate warnings.
23933 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23935 * icall.c, loader.c: remove the internalcall array constructors.
23936 Changes to match the new MonoArray structure.
23937 * object.h, object.c: an array object doesn't allocate an extra
23938 vector. Add mono_array_new_full () to create jagged arrays easily.
23940 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23942 * metadata.h, metadata.c: add mono_metadata_field_info () to
23943 retreive all the info about a field from vairous tables.
23944 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
23945 * class.h, class.c: augment MonoClassField with more info.
23946 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
23947 policy and load a field's RVA if needed.
23949 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
23951 * class.c (mono_class_metadata_init): create a trampoline for all
23952 virtual functions instead of actually compiling them.
23954 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
23956 * class.h, class.c: include name in MonoClassField.
23957 * class.c: fix fundamental type of System.Object and System.String.
23958 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
23960 * icall.c: remove internalcalls for the Reflection stuff that is now
23962 * loader.c: mono_field_from_memberref () implementation.
23963 * mono-endian.c: thinko (s/struct/union/g).
23964 * object.c, object.h: make the mono_string_* prototypes actually use
23965 MonoString instead of MonoObject.
23966 * reflection.c, reflection.h: updates for changes in the reflection
23967 code in corlib: we use C structures that map to the actual C# classes.
23968 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
23969 fat method header if needed and use the info from the ILGenerator for
23970 methods. Handle fields in types. Misc fixes.
23972 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
23974 * class.c (mono_class_metadata_init): bug fix: always allocate
23975 space for static class data
23977 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
23979 * class.c (mono_compute_relative_numbering): use relative
23980 numbering to support fast runtime type checks.
23982 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
23984 * class.c (mono_class_create_from_typeref): added debugging output
23985 to print class name when MonoDummy is returned instead of real class
23987 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
23989 * class.c (mono_class_metadata_init): interface offset table now
23990 contains pointers into the vtable - this is more efficient for the jit
23992 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
23994 * class.c (mono_class_metadata_init): use a temporary vtable (the
23995 old algorithm only worked for the interpreter, but not for the jit)
23997 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
23999 * loader.c (method_from_memberref): use mono_class_get to get the
24000 class of an array instead of using System.Array directly.
24001 (mono_get_method): also add MEMBERREF methods to the method cache
24002 which usefull for arrays.
24004 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
24006 * pedump.c (arch_compile_method): added to compute vtable entry
24008 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
24009 number of interfaces.
24011 * class.h: merged MonoArrayClass into MonoClass
24013 * class.c (mono_class_create_from_typedef): compute the vtable size and
24014 allocate space to include the vtable inside MonoClass
24015 (mono_class_metadata_init): initialize the vtable
24017 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
24019 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
24020 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
24021 * image.c: endian fixes by Laurent Rioux.
24022 * object.h, object.c: rename MonoStringObject to MonoString and
24023 MonoArrayObject to MonoArray. Change some function names to conform to
24024 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
24025 guint16* as first argument, so don't use char*.
24026 Provide macros to do the interesting things on arrays in a portable way.
24027 * threads-pthread.c: updates for the API changes and #include <sched.h>
24028 (required for sched_yield()).
24029 * icall.c: updates for the API changes above.
24030 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
24031 platforms that need them.
24033 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
24035 * class.c: set the correct type for all the fundamental
24036 type when loading the class.
24038 2001-10-05 Dick Porter <dick@ximian.com>
24040 * threads-pthread.c (pthread_mutex_timedlock): Simple
24041 compatibility version for C libraries that lack this call.
24043 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
24045 * class.c: MonoTypes stored in MonoClass are stored as
24046 fundamental MonoTypes when the class represents a
24047 fundamental type (System.Int32, ...).
24048 The TypeHandle return by ldtoken is a MonoType*.
24049 * icall.c: ves_icall_get_data_chunk () write out all the
24050 PE/COFF stuff. Implement ves_icall_define_method (),
24051 ves_icall_set_method_body (), ves_icall_type_from_handle ().
24052 * image.c: properly skip unknown streams.
24053 * loader.h, loader.c: add type_class to mono_defaults.
24054 * metadata.c, metadata.h: export compute_size () as
24055 mono_metadata_compute_size () with a better interface.
24056 Typo and C&P fixes.
24057 * pedump.c: don't try to print the entry point RVA if there is no entry point.
24058 * reflection.c, reflection.h: many cleanups, fixes, output method
24059 signatures and headers, typedef and typeref info, compress the metadata
24060 tables, output all the heap streams, cli header etc.
24061 * row-indexes.h: typo fixes.
24063 2001-10-04 Dick Porter <dick@ximian.com>
24065 * object.h: Add a synchronisation mutex struct to MonoObject
24067 * object.c (mono_new_object): Initialise the object
24068 synchronisation mutexes
24070 * icall.c: System.Threading.Monitor internal calls
24072 * threads-pthread.h:
24073 * threads-pthread.c: System.Threading.Monitor internal calls
24075 * threads-types.h: New file, includes the system-specific thread
24078 * threads-pthread-types.h:
24079 * threads-pthread-types.c: New files, handle pthread-specific
24080 synchronisation types
24082 * threads-dummy-types.h:
24083 * threads-dummy-types.c: New files of dummy support for
24084 thread-specific types
24088 * pedump.c: include mono-endian.h not endian.h
24090 * Makefile.am: More threads files.
24091 Name mono-endian.h not endian.h
24093 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
24095 * Makefile.am, reflection.h, reflection.c: move here the reflection related
24096 stuff and implement a few more bits.
24097 * icall.c: a field needs to be dereferenced twice. Do not use the same
24098 name for two variables in the same scope.
24099 * image.c, image.h: cleanups.
24101 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
24103 * class.c (mono_class_metadata_init): bug fix: compute the right size
24105 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
24107 * icall.c: implemented some of the Reflection internalcalls.
24108 * image.c, image.h: start writing out the PE/COFF image.
24109 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
24110 that does the reverse than decode_blob_size ().
24111 * object.c: use mono_metadata_encode_value (). Move here
24112 temporary implementation of mono_string_to_utf8 ().
24113 * rawbuffer.c: make malloc_map static.
24115 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
24117 * metadata.c: fix type comparison for arrays.
24118 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
24119 Added a couple of new classes to monodefaults.
24120 * icall.c: added a couple of Reflection-related internalcalls.
24121 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
24122 Added a byval_arg MonoType to MonoClass.
24124 2001-09-28 Dick Porter <dick@ximian.com>
24127 * threads-pthread.h:
24128 * threads-pthread.c: Implemented internal calls for
24129 LocalDataStoreSlot operations. Applied mutexes around all shared
24130 data. Reworked the thread creation and Start() operations to
24131 avoid a race condition.
24134 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
24136 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
24138 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
24140 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
24142 * class.c, loader.c: warn and return NULL instead of erroring out.
24143 * icall.c: added System.AppDomain::getCurDomain().
24144 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
24146 2001-09-25 Dick Porter <dick@ximian.com>
24148 * threads-pthread.h:
24149 * threads-pthread.c: Implemented timed thread joining and added
24150 System.Threading.Thread::Join_internal internal call
24152 * icall.c: Added System.Threading.Thread::Join_internal internal call
24155 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
24157 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
24159 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
24160 mono_string_intern () to implement the semantics of the ldstr opcode
24161 and the interning of System.Strings.
24162 * icall.c: provide hooks to make String::IsIntern and String::Intern
24165 2001-09-23 Dick Porter <dick@ximian.com>
24168 * threads-dummy.h: New files of dummy threading routines
24170 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
24171 support code based on system specifics
24173 Rename PTHREAD_LIBS to THREAD_LIBS
24175 2001-09-23 Dick Porter <dick@ximian.com>
24177 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
24178 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
24180 (mono_thread_init): Set up a Thread object instance to return when
24181 the main thread calls Thread.CurrentThread
24182 (mono_thread_cleanup): Wait for all subthreads to exit
24184 * icall.c: New internal calls for System.Threading.Thread::Sleep
24185 (including Schedule) and CurrentThread
24187 * threads.h: New file, to insulate thread-specific stuff from the
24190 2001-09-21 Dick Porter <dick@ximian.com>
24192 * threads-pthread.h:
24193 * threads-pthread.c: New file, for handling pthreads-style
24194 threading support. Start() now starts a new thread and executes
24195 the ThreadStart delegate instance.
24197 * icall.c: Added the internalcall for
24198 System.Threading.Thread::Start_internal
24200 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
24202 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
24204 * loader.c: work around the different signatures for delegates
24205 constructors csc generates in compiled code vs the ones compiled in mscorlib.
24207 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24209 * class.h, class.c: add mono_class_get_field_from_name ().
24210 * *: Fix C comments and other ANSI C issues.
24212 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
24214 * endian.h, assembly.c: fix some endianness issues.
24216 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
24218 * loader.h, load.c: add delegate_class to mono_defaults.
24219 Handle runtime provided methods in mono_get_method ().
24221 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
24223 * loader.c (mono_get_method): use pinvoke for internal call
24225 * icall.c: use pinvoke for internal call
24227 * loader.c (method_from_memberref): set the method name
24229 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
24231 * metadata.c: help the compiler generate better code for
24232 mono_class_from_mono_type ().
24234 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
24236 * class.c (mono_class_metadata_init): delayed computing of the
24237 class size to mono_class_metadata_init ()
24239 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
24241 * class.c, class.h: add an interfaces member to MonoClass.
24242 * image.c, image.h: add assembly_name field to MonoImage
24243 from the assembly table.
24244 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
24246 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24248 * class.c: Handle Array in mono_class_from_mono_type ().
24249 * metadata.c, pedump.c: some endian fixes.
24251 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
24253 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
24254 * metadata.c: fix small problem introduced with the latest commit.
24256 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
24258 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
24259 We don't need a MonoMetadata pointer anymore to compare signatures in
24260 mono_metadata_signature_equal (), update callers.
24261 Reduced memory usage an number of allocations for MonoMethodHeader and
24262 MonoMethodSignature.
24264 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
24266 * metadata.c: added compare for szarray.
24268 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
24270 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
24271 and add a couple more types to it and mono_defaults. Give an hint on
24272 classes that need implementing in our corlib and are referenced
24275 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
24277 * class.h, class.c: keep track if a class is also an Enum.
24278 * loader.c: Implement a couple more types for use in libffi
24279 marshalling. Gives better diagnostics when failing to dlopen
24280 a library. Set method->klass for P/Invoke methods, too.
24282 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
24284 * class.c, class.h: add a MonoType this_arg to MonoClass that
24285 represents a pointer to an object of the class' type that
24286 can be used by the interpreter and later the type cache.
24287 Add best guess alignment info for valuetype objects.
24289 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
24291 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
24292 into MonoType: one less level of indirection and allocation and
24293 simplifies quite a bit of code. Added cache for MonoTypes that are
24294 used frequently, so that we don't need to allocate them all the time.
24296 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
24298 * class.c (mono_class_create_from_typedef): System.Enum is also a
24299 value type, although it does not derive from System.ValueType
24300 (maybe a bug in the ms compiler?)
24302 * metadata.c (mono_type_size): return the right size for value types
24304 * loader.c (mono_get_method): only initialize method header if not abstract
24306 * class.c (mono_class_from_mono_type): use mono_default values.
24308 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
24310 * *: use MonoClass pointers instead of <type_tokens>
24312 * class.h: new flag: metadata_inited.
24314 * class.c (mono_class_metadata_init): impl.
24315 (mono_class_instance_size): impl.
24316 (mono_class_data_size): impl.
24318 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
24320 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
24321 MonoClass now has the name and name_space fields.
24322 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
24323 mono_get_method () takes and optional MonoClass as argument.
24324 Removed mono_typedef_from_name() and added mono_class_token_from_name()
24325 instead that takes advantage of a map from class names to typedef
24326 tokens in MonoImage.
24328 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
24330 * metadata.c: zero is not a valid alignment boundary.
24331 Merge MONO_TYPE_VOID in default decoding code.
24333 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
24335 * image.h: merged MonoMetadata into MonoImage
24337 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
24338 identify the type of elements.
24340 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
24342 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
24343 * cil-coff.h: split MonoMSDOSHeader and add size info.
24344 * image.c: add some consistency checks.
24345 * metadata.c: fix row size computation: one programmer
24346 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
24347 add explanation for the locator routine.
24348 Fix decoding of size in method header.
24350 2001-08-20 Miguel de Icaza <miguel@ximian.com>
24352 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
24353 (g_concat_dir_and_file): Bring g_concat_dir_and_file
24354 function from gnome-libs. This uses the right path separator
24355 based on the OS, and also works around a bug in some systems where
24356 a double slash is not allowed.
24357 (default_assembly_name_resolver): Use g_concat_dir_and_file
24358 (mono_assembly_open): ditto.
24360 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
24362 * metadata.c (mono_metadata_signature_equal): impl.
24364 * *: void is now a realy MonoType (instead of using NULL)
24366 * metadata.c (do_mono_metadata_parse_type): use
24367 mono_metadata_parse_type to parse void value.
24369 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
24371 * metadata.c, metadata.h: in the signature and method header store
24372 only the space required for holding the loca vars and incoming arguments.
24374 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
24376 * metadata.c (do_mono_metadata_parse_type): treat void like any
24377 other type (instead of assigning NULL);
24379 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
24381 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
24383 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
24385 * image.c (do_mono_image_open): added a cache for arrays.
24387 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24389 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
24390 decode a single column from a row in a metadata table and changes
24391 to take advantage of it in the typedef locator (gives a nice speed up).
24392 Store offset info for function params.
24394 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
24396 * image.h (MONO_IMAGE_IS_CORLIB): removed
24398 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
24400 * assembly.c: how could mono_assembly_close () had ever worked?
24401 * metadata.c, metadata.h: provide offset info for local vars.
24402 Implement mono_type_size () to take care of alignment as well
24403 as size (it was mono_field_type_size in cli/class.c before).
24405 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
24407 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
24409 * assembly.h (CORLIB_NAME): set to corlib.dll
24411 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
24413 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24415 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
24416 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
24417 tokentype.h: massive namespace cleanup.
24419 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24421 * metadata.h, metadata.c: decode exception clauses when parsing method header.
24423 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
24425 * metadata.c (mono_metadata_free_type): added check for type !=
24426 NULL (void) before calling mono_metadata_free_type()
24428 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
24430 * metadata.h, row_indexes.h: added header with enumerations to use
24431 to index in the columns from tables in metadata and to decode coded
24432 tokens: we should start using this instead of embedding magic numbers
24435 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
24437 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
24438 Move metadata_t info from cli_image_info_t to MonoImage, where
24439 it's easily accessible. Changed all the uses accordingly.
24440 Added the method and class caches to MonoImage.
24441 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
24442 and mono_metadata_decode_value () signature to be more consistent
24443 with the other parse functions (and simplify code). Taken advantage
24444 of zero-length array allocation with GCC. Removed reduntant (and
24445 wrong) MonoFieldType struct and use MonoParam instead. Changed
24446 mono_metadata_parse_field_type () to use common code for parsing.
24447 Added mono_metadata_typedef_from_field () and
24448 mono_metadata_typedef_from_method () to lookup a typedef index from a
24449 field or method token.
24450 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
24452 2001-07-23 Miguel de Icaza <miguel@ximian.com>
24454 * metadata.c (mono_metadata_parse_field_type): Implement.
24455 (do_mono_metadata_parse_type): Split engine from
24456 mono_metadata_parse_type, so that we can create smaller structures
24457 for things that just have one pointer to the MonoType (look at
24460 2001-07-20 Miguel de Icaza <miguel@ximian.com>
24462 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
24463 as Jan Gray found out, it is incorrect.
24465 2001-07-18 Miguel de Icaza <miguel@ximian.com>
24467 * assembly.c: Implement asssembly loading. This loads an image
24468 and loads all the referenced assemblies. Come to think of it, we
24469 could always do lazy loading of the assemblies.
24471 * image.c (mono_image_open): Keep loaded images in a hashtable.
24473 * image.h (MonoImage): Add reference count.
24475 2001-07-17 Miguel de Icaza <miguel@ximian.com>
24477 * assembly.c (mono_assembly_open): Keep track of the file name in
24478 case the assembly has no ASSEMBLY table.
24480 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
24483 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
24485 * metadata.c, metadata.h: decode local vars in method header
24486 parse function. Change callers accordingly.
24488 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
24490 * metadata.h, cil-coff.h: protect against multiple inclusion.
24491 Added some new structures to hold information decoded from metadata:
24492 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
24493 and relevant decoding/free functions.
24494 * metadata.c: implement decoding functions. Add warning for out of bounds
24495 index in mono_metadata_locate(). Implement mono_get_method () to retreive
24496 all the info about a method signature and invocation. Remove check on
24497 uninitialized local var in parse_mh() and fix memory leak.
24499 2001-07-12 Miguel de Icaza <miguel@ximian.com>
24501 * metadata.h: More macros.
24503 * tokentype.h: New file.
24505 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
24507 * assembly.c: added a consistency check and initialize
24508 some structures with g_new0().
24509 * metadata.c: fixed a couple more bugs in table size computation
24510 and add other checks for out-of bound access to metadata.
24512 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
24514 * metatada.c: fix bugs computing table sizes. Spew a
24515 warning when index in string heap is out of bounds.
24517 2001-07-04 Miguel de Icaza <miguel@ximian.com>
24519 * metadata.h: Add a couple of macros to manipulate tokens.
24521 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24523 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
24524 cli_section_tables).
24526 2001-07-01 Miguel de Icaza <miguel@ximian.com>
24528 * metadata.c (mono_metadata_user_string): New function, provides
24529 access to the UserString heap.
24531 2001-06-27 Miguel de Icaza <miguel@ximian.com>
24533 * metadata.c: Add inline documentation.
24535 2001-06-26 Miguel de Icaza <miguel@ximian.com>
24537 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
24540 2001-06-22 Miguel de Icaza <miguel@ximian.com>
24542 * typeattr.h: New file, TypeAttribute flags.
24544 2001-06-21 Miguel de Icaza <miguel@ximian.com>
24546 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
24547 mono_assembly_ensure_section): Section loading code.
24548 (load_section_tables): Load the sections.
24550 * mono/metadata/metadata.c (mono_metadata_locate_token,
24551 mono_metadata_locate): Functions to locate the information
24552 definition given a token or a table and an index.
24553 (mono_metadata_compute_table_bases): New.
24554 (compute_size): New function to compute the sizes of the various
24557 * mono/metadata/metadata.h: Finish listing the different index
24560 * mono/metadata/pedump.c: Improve to dump new information.
24562 2001-06-19 Miguel de Icaza <miguel@ximian.com>
24564 * mono/metadata/metadata.c: Entered all the tables matching
24567 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2