1 2008-01-05 Zoltan Varga <vargaz@gmail.com>
3 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
5 (mono_array_clone_in_domain): Ditto.
6 (mono_array_clone_in_domain): Ditto.
8 * threads.c (start_wrapper): Register the thread start argument as a GC root.
9 (cache_culture): Use a write barrier.
11 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
12 (ves_icall_get_property_info): Ditto.
14 * object.h (MONO_STRUCT_SETREF): New macro.
16 * class-internals.h (MonoStats): Add some GC statistics.
18 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
20 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
22 * exception.c (mono_exception_from_name_two_strings):
23 Break from loop after method is found.
25 2008-01-04 Dick Porter <dick@ximian.com>
27 * process.c (process_module_string_read): Rename variable to
28 reflect correct usage, after fixing bug 345972.
30 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
32 * verify.c (mono_type_create_fnptr_from_mono_method):
33 created a MonoType function pointer instance to be used during
34 verification. The verifier releases this memory at end.
36 * verify.c (mono_method_is_constructor): extracted repeated
37 checks for constructor into a single class.
39 * verify.c (do_push_field): use new extracted method
40 for constructor check.
42 * verify.c (do_newobj): same.
44 * verify.c (do_ldftn): renamed to do_load_function_ptr
45 and make it verify ldvirtftn too.
47 * verify.c (mono_method_verify: proper verification
48 of ldvirtftn. release created MonoMethod instances.
50 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
52 * verify.c (token_bounds_check): added.
54 * verify.c (do_ldftn): added.
56 * verify.c (mono_method_verify): proper verificartion of ldftn.
58 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
60 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
61 than the table row count. It's the resposibility of the caller to
62 make the bounds check and raise the correct error.
64 * metadata.c (mono_metadata_decode_row_col): Same.
66 * loader.c (mono_get_method_from_token): perform bounds check
67 on token for methoddef table.
69 2007-12-29 Miguel de Icaza <miguel@novell.com>
72 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
73 assert into a negative result, the managed code already coped with
76 Some folks on Windows reported this error.
78 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
80 * appdomain.c: Bump corlib version.
82 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
83 CultureInfo.CreateCulture to create CultureInfo for name.
84 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
85 create CultureInfo for name. Fixes bug #347174.
87 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
89 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
92 * verify.c (is_valid_branch_instruction): allow branching to the
93 first instruction of the protected block.
95 * verify.c (is_valid_cmp_branch_instruction): same.
97 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
98 avoid double initialization.
100 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
101 detect which cases the eval stack should just be copied.
103 * verify.c (mono_method_verify): check if the eval stack
104 is empty when entering a protected block.
106 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
108 * verify.c: added is_clause_in_range, is_clause_inside_range,
109 is_clause_nested and verify_clause_relationship. They perform
110 the verifications stated in P1 12.4.2.7.
112 * verify.c (mono_method_verify): remove some unused variables,
113 add the new exception clause checks, add instruction border
114 checks for protected block start/end, improved some error
115 messages and fixed a bug in the way invalid instruction access
118 2007-12-26 Zoltan Varga <vargaz@gmail.com>
120 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
121 from GC 7.0 if available.
123 * object.c: Remove an unused define.
125 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
127 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
129 * null-gc.c (mono_gc_make_descr_for_array): Implement.
131 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
133 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
134 to take the same arguments as the other make_descr functions.
136 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
138 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
141 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
144 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
147 * boehm-gc.c (mono_gc_register_root): Fix a warning.
149 * null-gc.c (mono_gc_register_root): Fix a warning.
151 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
153 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
154 (mono_gc_base_init): Call GC_init ().
156 * null-gc.c: Define mono_gc_register_root () as a no-op.
158 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
160 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
162 * verify.c: add prototype for merge_stacks at top
164 * verify.c (do_switch): added.
166 * verify.c (merge_stacks): on some cases the stack merging
167 was not happening properly. Unequal stack sizes at merge
168 points should be invalid.
170 * verify.c (mono_method_verify): added more debug info on stack state.
171 verify switch properly.
173 2007-12-24 Zoltan Varga <vargaz@gmail.com>
175 * method-builder.h: New file, moved the mono_mb_ declarations here from
178 * boehm-gc.c marshal.c: Include method-builder.h.
180 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
182 * marshal.c: Remove some code which is now in method-builder.c.
184 2007-12-23 Zoltan Varga <vargaz@gmail.com>
186 * method-builder.c: New file, extraction of the method builder functionality
189 * marshal.c: Move the mb functions into method-builder.c.
191 * marshal.h marshal.c: Export some mono_mb_... functions.
193 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
195 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
198 * class.c (mono_class_get_full): Check the token type in the dynamic case.
200 * loader.c (mono_field_from_token): Ditto.
202 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
205 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
208 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
209 a helper function for setting it.
211 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
214 * assembly.c: Significally simplify code now that referenced assemblies are
215 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
217 * threads.h: Don't include the internal threads-types.h header file. Fixes
220 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
222 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
223 instructions that were target of branches or are at protected block boundaries.
225 * verify.c (in_same_block): handle filter clauses.
227 * verify.c (is_valid_branch_instruction): added. checks the target of
228 instructions br or brtrue/false.
230 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
231 binary branch instructions such as beq and bge.
233 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
234 and made it pin the instruction as been part of the exception block.
236 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
239 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
242 * verify.c (do_ret): ret from a protected block is unverifiable and
245 * verify.c (do_static_branch): verify br and br.s instructions.
247 * verify.c (merge_stacks): add extra param to support detection
248 of branches in the middle of instructions.
250 * verify.c (mono_method_verify): verify branches and exception blocks
251 that target the middle of instructions. Proper verification of br and br.s.
253 2007-12-21 Zoltan Varga <vargaz@gmail.com>
255 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
256 skip_visibility field.
257 (reflection_methodbuilder_from_dynamic_method): Ditto.
259 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
260 registrations. Fixes #348193.
262 * threads.h: Move the internal mono_thread_get_pending_exception () to
263 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
265 2007-12-20 Zoltan Varga <vargaz@gmail.com>
267 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
268 icall registration. Fixes #348193.
270 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
271 for corlib classes into object. Fixes #349621.
273 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
275 * icall.c (property_accessor_nonpublic): new function to determine
276 whether an accessor allows a property to be considered non-public.
277 Returns false for private accessor(s) from parent class, and internal
278 accessor(s) from parent on 2.0 profile (and higher).
279 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
280 to determine whether property should be included if NonPublic flag
281 is set. Fixes bug #349078.
283 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
285 * verify.c (init_stack_with_value): added.
287 * verify.c (mono_method_verify): extracted common
288 code for exception initialization into init_stack_with_value.
290 * verify.c (mono_method_verify): initialize the exception
291 for handler clauses as well.
293 * verify.c (mono_method_verify): fix the exception clause
294 ordering rules, it should use handler end offset and not
297 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
299 * rawbuffer.c: remove useless warning.
301 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
303 * threads.h, threads-types.h: move functions to the correct header
306 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
308 * verify.c (mono_method_verify): proper verification
309 of exception handling clauses ranges and fallthru in
310 and out of protected blocks.
312 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
314 * verify.c (mono_method_verify): fixed compilation issue.
316 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
318 * verify.c (mono_method_verify): a printf slipped in, changed
319 to use verifier debug macro.
321 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
323 * verify.c (is_correct_leave): check for filter clauses.
325 * verify.c (do_filter): added.
327 * verify.c (mono_method_verify): property verification of leave.
330 2007-12-18 Mark Probst <mark.probst@gmail.com>
332 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
333 Win32 build, until we figure out how to do the proper thing on
336 2007-12-17 Zoltan Varga <vargaz@gmail.com>
338 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
339 by the previous patch.
341 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
342 the assembly resolve handler for refonly assemblies.
344 2007-12-17 Mark Probst <mark.probst@gmail.com>
346 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
347 Make sure only one thread is allowed to commence shutdown, and
348 don't allow new threads to be started once shutdown is in
351 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
353 * verify.c (is_correct_endfilter): added.
355 * verify.c (is_unverifiable_endfilter): added.
357 * verify.c (do_endfilter): added.
359 * verify.c (mono_method_verify): property verification of endfilter
360 and fixed a corner case or endfinally.
362 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
364 * verify.h: new flags to support fail fast of unverifiable code and
365 do non-strict verification. Non-strict verification is required to
366 have MS runtime compatibility. There are a huge amount of unverifiable
367 code that it accepts as verifiable. The strict mode verifies the code
369 Non-strict mode will be required in cases where code needs to be
370 accepted as verifiable but fails under strict mode.
372 * pedump.c: added support to fail fast and non-strict verification.
374 * verify.c: added support for both fail fast and non-strict verification.
376 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
378 * verify.c (is_correct_endfinally): added.
380 * verify.c (mono_method_verify): property verification of endfinally.
382 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
384 * verify.c (in_any_block): check for filter clauses.
386 * verify.c (is_correct_rethrow): added.
388 * verify.c (mono_method_verify): property verification of rethrow.
390 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
392 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
394 * verify.c (do_throw): added.
396 * verify.c (mono_method_verify): property verification of throw
398 2007-12-11 Zoltan Varga <vargaz@gmail.com>
400 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
401 assemblies. Fixes #346425.
403 2007-12-10 Zoltan Varga <vargaz@gmail.com>
405 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
408 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
410 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
411 prevent asserts when this is called with a token which might not be valid.
413 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
414 lookup_dynamic_token_class with valid_token == FALSE.
416 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
418 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
420 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
422 2007-12-10 Mark Probst <mark.probst@gmail.com>
424 * gc.c: Don't delay threadpool thread finalization unless Mono is
427 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
429 * threads.c: turn an assert into a non-fatal warning.
431 2007-12-09 Robert Jordan <robertj@gmx.net>
433 * icall.c (GetVirtualMethod): Add missing argument validation.
435 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
437 * verify.c (do_cast): added.
439 * verify.c (mono_method_verify): property verification of castclass and isinst.
442 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
444 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
446 * verify.c (do_stelem): added.
448 * verify.c (mono_method_verify): property verification of stelem.X.
450 2007-12-07 Mark Probst <mark.probst@gmail.com>
452 * class.c, class-internals.h: Introduce an environment variable
453 (MONO_GENERIC_SHARING) through which the extent of generic code
454 sharing can be controlled (share all classes, share only corlib
455 classes, or share nothing).
457 * object.c: Only create runtime generic context for classes for
458 which sharing is enabled.
460 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
462 * verify.c (do_ldelem): refactor it to work with ldelem.any.
464 * verify.c (mono_method_verify): property verification of ldelem.any.
466 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
468 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
469 added ldelem.X opcodes.
471 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
473 * verify.c: proper verification of ldelem.X
475 2007-12-06 Zoltan Varga <vargaz@gmail.com>
477 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
479 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
481 * verify.c (mono_method_verify): null literal requires special handling,
482 the value pushed on stack need to be flagged as so.
484 * verify.c (do_ldelema): Verify ldelema properly.
486 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
488 * verify.c: Verify ldlen properly.
490 2007-12-05 Zoltan Varga <vargaz@gmail.com>
492 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
493 to the target object's type. Fixes #346160.
495 2007-12-05 Dick Porter <dick@ximian.com>
497 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
498 Solaris needs the same workaround as BSD-derived systems. Fixes
499 bug 323524, patch by Burkhard Linke
500 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
502 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
504 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
505 handle to use when error dialog is shown; otherwise, update mask
506 to show no error dialog when an error occurs.
508 2007-12-03 Zoltan Varga <vargaz@gmail.com>
510 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
512 * class.c (mono_class_get_field_default_value): New helper function to initialize
513 field->def_type and field->data.
515 2007-11-30 Zoltan Varga <vargaz@gmail.com>
517 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
520 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
522 * marshal.c: Avoid depending on delegate->method_info being set.
524 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
526 * object.c (mono_delegate_ctor): Set delegate->method.
528 * object-internals.h (struct _MonoDelegate): Add 'method' field.
530 * appdomain.c: Bump corlib version.
532 2007-11-27 Raja R Harinath <harinath@gmail.com>
534 * metadata.c (mono_generic_inst_equal_full): Short-circuit
535 equality check if we're comparing canonicalized MonoGenericInsts.
537 2007-11-23 Zoltan Varga <vargaz@gmail.com>
539 * class.c (generic_array_methods): Call mono_class_setup_methods () before
540 accessing class->methods.
542 2007-11-22 Dick Porter <dick@ximian.com>
544 * threads.c: Ensure that the synch_cs is set before trying to use
547 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
549 * profiler.c: r89126 broke the statistial profiler, unbreak.
551 2007-11-22 Martin Baulig <martin@ximian.com>
553 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
556 (mono_debug_debugger_version): Bump to 3.
557 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
558 -> mono_debugger_class_initialized().
560 * mono-debug-debugger.c
561 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
564 (mono_debugger_start_class_init_func): Removed.
565 (mono_debugger_class_loaded_methods_func): Added.
566 (mono_class_setup_methods): Call it here.
568 2007-11-22 Martin Baulig <martin@ximian.com>
571 (mono_debug_add_delegate_trampoline): New public method.
572 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
575 (MonoSymbolTable): Added `global_data_table'.
576 (MonoDebuggerTypeKind): Removed.
578 2007-11-21 Zoltan Varga <vargaz@gmail.com>
580 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
583 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
585 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
587 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
589 2007-11-20 Martin Baulig <martin@ximian.com>
591 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
593 * mono-debug-debugger.c
594 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
595 (mono_debugger_remove_breakpoint): Likewise.
596 (mono_debugger_check_breakpoints): Likewise.
597 (mono_debugger_register_class_init_callback): New public method.
598 (mono_debugger_remove_class_init_callback): Likewise.
599 (mono_debugger_add_type): Likewise.
601 * mono-debug-debugger.h
602 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
604 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
606 * class.c: more interface implementations needed for the
607 array enumerator (fixes bug #341112).
609 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
611 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
612 fix ParamName of ArgumentNullExceptions.
614 2007-11-17 Miguel de Icaza <miguel@novell.com>
616 * reflection.c (mono_reflection_encode_sighelper): Generate the
617 modopts and modreqs. I have a useless test that crashes monodis,
618 but that shows the code working.
620 2007-11-17 Zoltan Varga <vargaz@gmail.com>
622 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
623 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
625 2007-11-15 Dick Porter <dick@ximian.com>
627 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
628 When joining a thread, it's the thread that's calling Join that
629 gets WaitSleepJoin state not the target. Fixes the standalone
630 test case in bug 334740, and hopefully the whole bug too.
632 2007-11-15 Dick Porter <dick@ximian.com>
634 * process.c: Read file version info from the files pointed at by
635 process modules, not the current process. Fixes bug 315969.
637 Use windows typedef names in some places to fix warnings on the
640 2007-11-15 Mark Probst <mark.probst@gmail.com>
642 * image.c, metadata-internals.h: Added a generic_class_cache hash
643 to MonoImage for looking up generic classes when sharing generics.
645 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
647 * sgen-gc.c: warning cleanups.
649 2007-11-15 Zoltan Varga <vargaz@gmail.com>
651 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
652 inherited properties.
654 2007-11-14 Mark Probst <mark.probst@gmail.com>
656 * object.c, class-internals.h: Added more information to the
657 runtime generic context.
659 2007-11-13 Zoltan Varga <vargaz@gmail.com>
661 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
662 instead of just the target method. Generalize the abstract method handling to
663 handle any non-static method.
665 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
666 mono_marshal_get_delegate_invoke () signature change.
668 2007-11-13 Mark Probst <mark.probst@gmail.com>
670 * class.c, class-internals.h: Made
671 mono_type_get_basic_type_from_generic () public. Fixed member
672 access check for shared generics.
674 * loader.c: Don't insert field into field cache if it's part of a
675 non-inflated generic class.
677 * domain.c, domain-internals.h: The generic sharing context is now
678 part of the jit info data structure. Added two accessor
681 2007-11-12 Zoltan Varga <vargaz@gmail.com>
683 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
684 the array Get/Set/Address methods, since the JIT inlines them.
686 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
688 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
689 (mono_image_init): Initialize runtime_invoke_direct_cache.
691 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
692 mono_marshal_get_delegate_invoke signature change.
694 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
695 an additional argument. Add support for invoking abstract methods.
697 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
699 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
701 2007-11-09 Mark Probst <mark.probst@gmail.com>
703 * class.c: Do field layout for open generic classes as well.
705 2007-11-09 Mark Probst <mark.probst@gmail.com>
707 * gc.c, gc-internal.h: Don't finalize threadpool threads with
708 other objects, because the threadpool is still around. Put them
709 in a list instead and after finalizing all other objects in the
710 root domain shut down the thread pool and then finalize the
711 threads. Fixes bug #337383.
713 * threads.c, thread-types.h: New mono_thread_create_internal()
714 function for marking a thread with the threadpool flag before it
715 started. Set synch_cs to NULL after freeing it.
717 * threadpool.c: Mark threadpool threads before they start.
719 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
721 * reflection.h, reflection.c: don't export random functions
722 and lazy load dbnull and missing objects.
724 2007-11-07 Jonathan Chambers <joncham@gmail.com>
726 * class.c: Initialize COM types if COM interfaces
727 are present (not just COM classes).
729 Code is contributed under MIT/X11 license.
731 2007-11-07 Massimiliano Mantione <massi@ximian.com>
733 create_dynamic_mono_image: hook module profiler events (dynamic case).
734 mono_image_basic_init: hook assembly profiler events (dynamic case).
736 2007-11-07 Massimiliano Mantione <massi@ximian.com>
738 simple_appdomain_unload: completely terminate the profiler
739 instead of only processing the statistical samples.
740 simple_shutdown: make sure this is really called exactly once,
741 even in multithreaded applications, and always listen to
743 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
744 here, the "[un]load" functions will do it.
745 Fixes bugs #333791 and #325261.
747 2007-11-07 Geoff Norton <gnorton@novell.com>
749 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
750 rather than depend on __APPLE__.
752 2007-11-07 Mark Probst <mark.probst@gmail.com>
754 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
756 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
758 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
759 UTF16 MonoString. Fix the crash from bug #335488
761 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
763 * marshal.c: Correct (for non-Win32 OS) length != size in
764 mono_string_from_bstr. Fix #339530.
766 2007-11-06 Geoff Norton <gnorton@novell.com>
768 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
771 2007-11-05 Kornél Pál <kornelpal@gmail.com>
773 * process.c: Added run-time GetProcessId API detection for Windows.
775 2007-11-04 Miguel de Icaza <miguel@novell.com>
777 * reflection.c (mono_param_get_objects): If a parameter has the
778 attribute [System.Runtime.InteropServices.Optional] we should
779 set the DefaultValue of the ParameterInfo to be
780 System.Reflection.Missing instead of DBNull.
784 (mono_get_reflection_missing_object): New method,
785 returns the System.Reflection.Missing.Value singleton instance.
787 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
789 * culture-info-table.h : regenerated.
791 2007-11-02 Jonathan Chambers <joncham@gmail.com>
793 * icall.c: Use GetEnvironmentStrings on windows
794 so we are using the same environment block as
795 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
798 Code is contributed under MIT/X11 license.
800 2007-10-31 Martin Baulig <martin@ximian.com>
802 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
804 * mono-debug-debugger.h
805 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
807 2007-10-30 Zoltan Varga <vargaz@gmail.com>
809 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
812 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
814 * culture-info-table.h : regenerated.
816 2007-10-30 Robert Jordan <robertj@gmx.net>
818 * icall-def.h, icall.c:
819 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
821 Code is contributed under MIT/X11 license.
823 2007-10-29 Zoltan Varga <vargaz@gmail.com>
825 * class.c (mono_class_setup_vtable): Find the inflated methods in the
826 inflated class instead of inflating them again.
828 * class.c (mono_class_setup_vtable): Inflate the override methods in the
831 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
832 Call setup_supertypes () after klass->parent is set.
833 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
835 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
836 for inflated instances of not yet created dynamic generic classes.
837 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
838 times from inflated_method.
839 (methodbuilder_to_mono_method): Ditto.
841 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
843 * gc.c: code cleanup and removed old untested option of not creating the
846 2007-10-29 Zoltan Varga <vargaz@gmail.com>
848 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
849 creating a jump trampoline for dynamic methods.
851 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
853 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
854 generic TypeBuilders when called from another method of the same type (bug #335131).
857 2007-10-27 Zoltan Varga <vargaz@gmail.com>
859 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
860 doesn't seem to work perfectly.
862 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
863 called multiple times.
864 (methodbuilder_to_mono_method): Ditto.
865 (resolve_object): Inflate FieldBuilder's.
867 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
869 * string-icalls.c, string-icalls.h, appdomain.c: patch from
870 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
871 RemoveEmptyEntries in the string.Split implementation (bug #322375).
873 2007-10-26 Dick Porter <dick@ximian.com>
875 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
876 Thread initialisation changes
878 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
880 * verify.c: fix compatibility check between arrays and System.Array
882 2007-10-26 Zoltan Varga <vargaz@gmail.com>
884 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
887 2007-10-25 Zoltan Varga <vargaz@gmail.com>
889 * object.c (mono_value_box): Use typed allocation here.
891 2007-10-23 Zoltan Varga <vargaz@gmail.com>
893 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
894 trampoline instead of compiling the method right away.
896 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
898 2007-10-21 Zoltan Varga <vargaz@gmail.com>
900 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
901 related fields for dynamic classes. Fixes #334493.
903 2007-10-20 Zoltan Varga <vargaz@gmail.com>
905 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
907 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
909 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
910 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
912 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
914 * reflection.c (create_generic_typespec): Initialize klass->generic_container
916 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
918 2007-10-18 Jonathan Chambers <joncham@gmail.com>
920 * marshal.c: Use correct key when removing item
923 Code is contributed under MIT/X11 license.
925 2007-10-17 William Holmes <billholmes54@gmail.com>
927 *marshal.c: Adding a case to marshal booleans to U1
929 Code is contributed under MIT/X11 license.
931 2007-10-18 Zoltan Varga <vargaz@gmail.com>
933 * class.c (mono_class_from_name): Search the modules compromising dynamic
934 assemblies. Fixes #331601.
936 2007-10-16 Zoltan Varga <vargaz@gmail.com>
938 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
939 exception if the type name contains an assembly component. Fixes #334203.
941 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
942 modules inside dynamic assemblies. Fixes #334200.
944 * reflection.c: Set image->public_key and image->public_key_length;
946 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
949 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
951 2007-10-16 Mark Probst <mark.probst@gmail.com>
953 * metadata.c: Implemented correct comparing of generic classes.
954 An inflated generic class can be equal to a non-inflated one if it
955 is inflated with generic type variables as type arguments. Fixes
958 2007-10-15 Dick Porter <dick@ximian.com>
960 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
961 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
964 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
965 instead of a monitor lock. This means that monitor_try_enter and
966 co can set the thread state safely.
967 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
968 thread_interrupt_requested, so interrupt actually works.
970 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
971 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
972 state accessor function
974 2007-10-15 Martin Baulig <martin@ximian.com>
977 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
978 the debugger with the current runtime.
980 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
982 * object.c, object-internals.h: added the ability to set a single
983 trampoline for all the slots in a vtable.
985 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
987 * marshal.c: deal with a possible race condition during multicast
990 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
992 * class.c: ensure value type methods don't have the synchronized
995 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
997 * string-icalls.c, string-icalls.h: reverted unapproved patch that
1000 2007-10-11 Joel Reed <joelwreed@comcast.com>
1002 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
1003 to take an options parameter so that empty entries can be removed during
1004 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
1006 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1008 * marshal.c: make sure we don't store the signature from a dynamic
1009 method into the runtime invoke cache (bug #327189).
1011 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1013 * marshal.c: make sure the wrapper methods are properly initialized.
1015 2007-10-11 Mark Probst <mark.probst@gmail.com>
1017 * metadata.c, metadata-internals.h: Generalized
1018 mono_type_stack_size() to mono_type_stack_size_internal() which
1019 takes an additional argument specifying whether it allows open
1022 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
1024 * verify.c (do_invoke_method): handle typedbyref params
1025 correctly and check for unverifiable return values.
1027 * verify.c (do_newobj): fix a warning.
1029 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1031 * verify.c: don't tread typedbyref as allways unverifable,
1032 so uses, like (ld/st)loc.0 are valid. verify for the cases
1033 that it matters, like boxing related operations.
1035 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
1037 * verify.c: add verification of the newobj opcode. verification
1038 of delegate instantation still missing due ldftn and virldftn not
1039 pushing the function type on stack
1041 2007-10-08 Mark Probst <mark.probst@gmail.com>
1043 * class-internals.h: Runtime generic context data structure
1046 * object.c: Initialization of runtime generic context at runtime
1047 vtable creation time.
1049 2007-10-08 Massimiliano Mantione <massi@ximian.com>
1050 * class.c (mono_class_create_from_typedef,
1051 mono_class_from_generic_parameter, mono_ptr_class_get,
1052 mono_fnptr_class_get, mono_bounded_array_class_get)
1053 * domain.c (mono_domain_create, mono_domain_free)
1054 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
1055 * image.c (do_mono_image_load, mono_image_close):
1056 Hooked up load-unload profiler events.
1058 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1060 * domain.c: track statistics about the actual amount of native code
1063 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1065 * class.c: the valuetype enumerators don't have the additional
1066 supertypes interfaces.
1068 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1070 * class.c: need more interfaces setup for the IEnumerator<T>
1071 object created for arrays (tests/ienumerator-interfaces.2.cs).
1073 2007-10-05 Zoltan Varga <vargaz@gmail.com>
1075 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
1077 2007-10-05 Alp Toker <alp@atoker.com>
1079 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
1080 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
1083 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
1085 * verify.c (verify_type_compatibility_full): verification of
1086 compatibility improved, validates correctly non-strict checks between
1087 native int and I4 types different than (unsigned)int32.
1089 * verify.c (do_store_indirect): added, do all verification of
1092 * verify.c (get_load_indirect_mono_type): renamed to
1093 get_indirect_op_mono_type, as it now returns the MonoType for
1094 ldind.X and stind.X opcodes.
1096 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
1098 * reflection.c: Fix the encoding of generic type definition for
1101 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
1102 mono_image_typedef_or_ref but allows to specify if typespec lookups should
1103 be made. Typespec check is done prior to typeref cache lookup.
1105 * reflection.c (mono_image_typedef_or_ref): now just delegate to
1106 mono_image_typedef_or_ref_full.
1108 * reflection.c (encode_generic_class): encode the generic class
1109 directly instead of calling encode_type.
1111 * reflection.c (encode_type): encode the generic type definition
1112 MonoClass as a generic instantiation.
1114 * reflection.c (create_typespec): cache typespec tokens in
1115 the assembly->typespec cache. Don't create typespec for a generic
1116 instance MonoClass. Create typespec for the generic type defintion.
1118 * reflection.c (create_generic_typespec): encode the generic
1119 class directly instead of calling encode_type.
1121 * reflection.c (mono_image_create_token): encode the generic
1122 type definition not using a typespec for MonoType instances.
1125 2007-10-04 Raja R Harinath <rharinath@novell.com>
1128 * class.c (mono_image_init_name_cache): Don't return nested
1129 'protected internal' classes.
1130 (mono_class_from_name_case): Likewise.
1132 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
1134 * icall-def.h, icall.c : get_bundled_machine_config() is now the
1135 common function used by both DefaultConfig in System.dll and
1136 InternalConfigurationHost in System.Configuration.dll.
1138 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1140 * class.c: automatically add to vectors only a few essential explicit
1141 generic interfaces. The rest of the interfaces that arrays should
1142 provide are currently implicitly added (but still not lazily, see the
1143 design in the discussion of bug#325495 for the details of what is
1144 needed for that). Additionally, implicit interfaces are assigned the
1145 same vtable slot as the explicit interfaces (as they are compatible):
1146 this enables huge memory savings since we don't need to instantiate
1147 as many memthods and as large vtables anymore. Also, Since
1148 GetEnumerator<T> returns an instance of a type that is required to
1149 support a similarly large set of interfaces as arrays, we add
1150 implicit interfaces and interface offset sharing support to those
1151 types, too. This change adds all the required interfaces so that
1152 the anonarray.cs test case in the bug report works (we don't add
1153 all the interfaces to arrays of arrays 3-level deep and more because
1154 of the memory requirements explained in the bug and since they are much
1155 less common: the lazy-loading support will enabled them to work, too).
1157 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
1159 * verify.c (merge_stacks): major clean up, all type compatibility
1160 checks are done by verify_type_compatibility. This fix my earlier lack
1161 of understanding of the CLR type system and merge_stacks no longer looks
1164 * verify.c: fixed some bad spelling.
1166 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
1168 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
1169 a given stack slock.
1171 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
1172 verify_type_compatibility_full. This removed a near indentical function and fixed
1173 handling of Int32 and IntPtr across all opcodes.
1175 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1177 * class.c: only vectors have the additional generic interfaces.
1179 2007-10-01 Jonathan Chambers <joncham@gmail.com>
1181 * mono-config.c: Use g_strcasecmp instead of
1182 strcasecmp like everywhere else to fix
1183 compilation with MSVC.
1185 Code is contributed under MIT/X11 license.
1187 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1189 * object.c, object-internals.h: refactored the IMT code to enable
1190 building a single slot at a time and lazily creating the IMT trampolines
1193 2007-09-29 Zoltan Varga <vargaz@gmail.com>
1195 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
1197 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
1200 2007-09-29 Raja R Harinath <harinath@gmail.com>
1202 * loader.c (method_from_methodspec): Rearrange to avoid
1203 un-necessary exposition. Don't assert out if the method's
1204 declaring type is a generic type definition.
1206 2007-09-28 Martin Baulig <martin@ximian.com>
1208 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
1210 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
1212 * class-internals.h: optimize field layout of MonoClass to
1213 requires less cachelines at runtime and save a few bytes on 64 bit
1216 2007-09-28 Jb Evain <jbevain@novell.com>
1218 * reflection.c: when encoding type names in custom attributes,
1219 if the type is a closed generic type, its generic arguments
1220 have to be serialized as AssemblyQualifiedName, so that when
1221 they are deserialized, it's possible to re-create them properly.
1225 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1227 * object.c, class-internals.h: added delegate-creation counter.
1229 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
1231 * class.c: cleanup of the code that synthetizes interfaces for
1232 arrays in 2.0: saves quit a bit of corlib mempool memory.
1233 Code to fix bug #325495 ifdeffed out for now until the issues
1234 with memory usage and O(n^2) behaviour are fixed.
1236 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
1238 * marshal.c: when possible, do not duplicate the name of the methods
1239 in the method builder and in the generated MonoMethod.
1241 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
1242 * verify.c: added support for type checking ldind_* opcodes.
1244 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
1246 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
1247 which is used to distinguish the fully open instantiation of a TypeBuilder
1248 with the rest. This temporary hack is required to restore the property that
1249 the fully open instantiation is the same type of the generic type definition.
1251 * class-internals.h (mono_generic_class_is_generic_type_definition):
1252 new function as part of the internal API.
1254 * class.c (inflate_generic_type): return NULL when the generic inst is
1255 fully open. The fully open generic type is now the same as the generic type
1256 definition for non TypeBuilder types.
1258 * class.c (mono_generic_class_get_class): removed assert since it is
1259 no longer valid, gklass->cached_class can point to the generic type definition.
1261 * class.c (mono_generic_class_is_generic_type_definition): new.
1263 * metadata.c (mono_generic_class_hash): added is_tb_open field
1264 to the hash calculation.
1266 * metadata.c (free_generic_class): if the generic class is associated
1267 with the generic type definition, its field will come from the mempool and
1270 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
1271 new, this function identifies the corner case of a TypeBuilder fully open
1274 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
1275 for lookup. Set gclass->cached_class to be the container class in case of
1276 the fully open instantiation of non TypeBuilder types.
1278 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
1279 to compare generic classes.
1281 * reflection.c (method_encode_methodspec): remove assert that
1284 * reflection.c (mono_reflection_generic_class_initialize): add
1285 an aditional assert to ensure the proper type is used.
1287 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
1289 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
1292 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
1294 * verify.c (push_arg): Fixed support for ldarga
1295 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
1296 MonoType used as first arg in case of instance calls.
1298 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
1300 * verify.c: Support for verifying VAR and MVAR types,
1302 2007-09-25 Zoltan Varga <vargaz@gmail.com>
1304 * icall.c (ves_icall_get_property_info): Set the reflected type of the
1305 accessors correctly.
1307 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
1309 * threads.c: support OSX and other systems in
1310 mono_thread_get_stack_bounds (bug #328026).
1312 2007-09-25 Martin Baulig <martin@ximian.com>
1315 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
1317 2007-09-24 Martin Baulig <martin@ximian.com>
1320 (MonoDebugClassEntry): Moved the definition of this struct into
1321 mono-debug.c to make it private.
1324 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
1325 type table per symbol file, we don't need to store the symfile id
1328 2007-09-24 Martin Baulig <martin@ximian.com>
1330 Create one type table per symbol file, since a `MonoClass *' gets
1331 invalid when its image is unloaded.
1333 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
1334 (MonoDebugHandle): Added `type_table'.
1336 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
1338 * mempool.c, mempool.h: added mono_mempool_new_size () API
1339 to be able to specify a smaller initial size for the pool.
1340 Adjusted the code to slowly increase pool size before using
1341 the previous default size.
1342 * image.c: use a small initial size for image mempools.
1344 2007-09-23 Zoltan Varga <vargaz@gmail.com>
1346 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
1349 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
1350 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
1352 2007-09-22 Zoltan Varga <vargaz@gmail.com>
1354 * metadata.c (mono_type_create_from_typespec): Remove an invalid
1355 free. Fixes #327438.
1357 2007-09-21 Raja R Harinath <harinath@gmail.com>
1359 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
1360 generic instantiations, etc.
1361 <MONO_TYPE_ARRAY>: Likewise.
1363 2007-09-21 Martin Baulig <martin@ximian.com>
1365 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
1366 these structs were never defined.
1367 (MonoDebugHandle): Removed the `_priv' field, it was never used.
1369 2007-09-21 Martin Baulig <martin@ximian.com>
1371 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
1373 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
1375 * image.c: removed the guid hash tables: we can get the same info
1376 without the additional memory usage hit (partially fixes also bug #327052).
1378 2007-09-10 Massimiliano Mantione <massi@ximian.com>
1380 * profiler.h, profiler-private.h, profiler.c: add a new profiler
1381 event to handle unloading methods. After the event is called, the
1382 corresponding MonoMethod* must be considered invalid.
1383 * loader.c (mono_free_method): call the new mono_profiler_method_free
1386 2007-09-20 Mark Probst <mark.probst@gmail.com>
1388 * domain-internals.h: New flag in MonoJitInfo which marks shared
1389 generic methods. New hash table (shared_generics_hash) in
1390 MonoDomain to keep track of shared generic methods. Prototypes
1391 for functions to register and lookup shared generic methods.
1393 * domain.c: Support for registering and looking up shared generic
1394 methods via a hash table (shared_generics_hash) in MonoDomain.
1396 * class-internals.h: New exception to signal failure of shared
1397 compilation of a generic method. New counters for generics
1398 sharing in MonoStats.
1400 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
1402 * image.c, metadata-internals.h: don't keep a file descriptor open
1403 for loaded assemblies (bug#325988).
1405 2007-09-19 Raja R Harinath <rharinath@novell.com>
1407 * metadata.c (signature_in_image): New. Carve out of type_in_image.
1408 (ginst_in_image, gclass_in_image): Simplify. Change signature to
1409 use the corresponding datatypes.
1410 (type_in_image): Update to changes.
1411 (CleanForImageUserData): Simplify.
1412 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
1413 Avoid quadratic behaviour in handling the "stolen" list by
1414 separating the filter predicate out, and by prepending the stolen
1415 items rather than appending them.
1416 (steal_ginst_in_image): Likewise.
1417 (mono_metadata_clean_for_image): Update to changes.
1419 2007-09-19 Martin Baulig <martin@ximian.com>
1421 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
1423 2007-09-19 Martin Baulig <martin@ximian.com>
1425 * mono-debug.c (mono_debug_cleanup): Don't call
1426 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
1428 2007-09-19 Raja R Harinath <harinath@gmail.com>
1430 Fix crash on 'make run-test' in mcs/errors
1431 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
1432 Avoid more potential allocations in mono_class_from_mono_type.
1433 (ginst_in_image): Update to changes.
1434 (gclass_in_image): Rearrange slightly.
1436 2007-09-18 Zoltan Varga <vargaz@gmail.com>
1438 * class.c (mono_class_init): Move the code that sets up class->methods to
1439 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
1441 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
1442 canonical instance of an inflated generic signature.
1443 (mono_type_create_from_typespec): Remove an invalid free.
1445 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
1447 2007-09-18 Marek Habersack <mhabersack@novell.com>
1449 * domain-internals.h: added a declaration of the
1450 mono_assembly_load_full_nosearch internal function.
1452 * assembly.c (mono_assembly_load_with_partial_name): use
1453 mono_try_assembly_resolve return value properly.
1454 (mono_assembly_load_full_nosearch): copied the function body from
1455 mono_assembly_load_full, without the code to invoke assembly
1457 (mono_assembly_load_full): calls the above new function and if the
1458 assembly is not resolved, invokes the search hooks.
1460 * appdomain.c (mono_runtime_init): restore the global postload
1461 assembly search handlers.
1463 2007-09-18 Zoltan Varga <vargaz@gmail.com>
1465 * class.c (mono_class_init): Make sure class->methods and class->properties
1466 are never NULL in the generics case.
1468 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
1470 2007-09-17 Zoltan Varga <vargaz@gmail.com>
1472 * metadata.c (free_generic_class): Disable some code to fix the build.
1474 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
1476 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
1477 from the image mempool.
1479 * metadata.c (free_generic_class): Free more data from the inflated class.
1481 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
1483 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
1485 (mono_type_create_from_typespec): Ditto.
1487 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
1488 MonoImage to the caller.
1489 (mono_init_internal): Save the opened image in a global variable.
1490 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
1492 * reflection.c (resolve_object): Fix a leak.
1494 * metadata.c: Fix the freeing of data in the generics caches.
1496 * metadata.c (free_generic_inst): Comment this out to fix the build.
1497 (free_generic_class): Ditto.
1499 * metadata.c: Free cached generic methods, instantinations and classes when
1500 they are removed from the caches.
1501 (mono_metadata_free_type): Free the type itself.
1503 * class.c: Free the result of mono_class_inflate_generic_type () in a few
1506 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1508 * boehm-gc.c: restrict managed allocs to __thread supporting
1511 2007-09-16 Zoltan Varga <vargaz@gmail.com>
1513 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
1514 (mono_generic_class_get_class): Fix a leak.
1516 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
1517 mono_metadata_free_type ().
1518 (mono_metadata_inflate_generic_inst): Fix a leak.
1520 2007-09-14 Zoltan Varga <vargaz@gmail.com>
1522 * mono-debug.c (free_header_data): Fix a leak missed earlier.
1524 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
1527 * mono-debug.c (mono_debug_close_image): Fix call to
1528 g_hash_table_remove ().
1530 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1532 * icall-def.h: redirect all the string ctor to the managed
1533 CreateString () methods.
1534 * string-icalls.c, string-icalls.h: removed dead code for string
1537 2007-09-14 Zoltan Varga <vargaz@gmail.com>
1539 * mono-debug.c: Fix memory leaks.
1541 2007-09-14 Jonathan Chambers <joncham@gmail.com>
1543 * threads-types.h: Implement mono_hazard_pointer_set and
1544 mono_hazard_pointer_clear macros using do/while(0) to fix
1545 compilation with MSVC.
1547 Code is contributed under MIT/X11 license.
1549 2007-09-14 Zoltan Varga <vargaz@gmail.com>
1551 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
1552 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
1554 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1556 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
1559 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
1561 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
1562 managed-code allocated as well.
1564 2007-09-13 Zoltan Varga <vargaz@gmail.com>
1566 * class.c (mono_class_is_assignable_from): Add support for generic variance.
1568 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
1570 * boehm-gc.c: fixed the build after the AOT changes.
1572 2007-09-13 Zoltan Varga <vargaz@gmail.com>
1574 * wrapper-types.h: Add an ALLOC wrapper type.
1576 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
1577 reference managed allocator methods.
1579 2007-09-12 Marek Safar <marek.safar@gmail.com>
1581 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
1582 of Type array and not MonoType, a fix suggested by Hari.
1584 2007-09-12 Jonathan Chambers <joncham@gmail.com>
1586 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
1587 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
1589 Code is contributed under MIT/X11 license.
1591 2007-09-10 Massimiliano Mantione <massi@ximian.com>
1593 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
1595 2007-09-12 Marek Habersack <mhabersack@novell.com>
1597 * image.c (do_mono_image_open): if assembly file fails to open and
1598 MONO_IOMAP is in effect, try to find the path in a
1599 case-insensitive way.
1601 * appdomain.c (mono_runtime_init): do not install postload hooks -
1602 tests show that MS.NET doesn't use anything of that sort to
1603 trigger the AppDomain.AssemblyResolve event.
1604 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
1606 (mono_runtime_init): init portability helpers here.
1608 * assembly.c (mono_assembly_load_with_partial_name): if other
1609 attempts fail, trigger the AppDomain.AssemblyResolve event handler
1610 to resolve the assembly.
1612 * domain-internals.h: added mono_try_assembly_resolve and marked
1615 2007-09-11 Jb Evain <jbevain@novell.com>
1617 * object-internals.h (MonoReflectionDynamicMethod): add
1618 a `MonoReflectionType *owner` field. The owner is used
1620 (mono_reflection_create_dynamic_method): use the owner of the dynamic
1621 method as the class declaring the dynamic method.
1622 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
1623 dynamic method to the declaring type of the methodbuilder.
1625 2007-09-11 Mark Probst <mark.probst@gmail.com>
1627 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
1628 rules for calling methods via reflection.
1630 2007-09-11 Zoltan Varga <vargaz@gmail.com>
1632 * reflection.c (resolve_object): Add support for MonoGenericClass.
1635 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
1637 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
1638 provide a managed method that does fast allocations without needing
1639 a managed->unmanaged transition. Boehm GC implementation currently
1640 enabled for ptrfree objects on sane architectures.
1642 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1644 * marshal.c, marshal.h: exported a couple of useful functions and
1645 added mono_mb_get_label () to easily handle backward branches.
1647 2007-09-10 Zoltan Varga <vargaz@gmail.com>
1649 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
1651 2007-09-10 Massimiliano Mantione <massi@ximian.com>
1653 * loader.c (find_method): Fixed the regression introduced while
1656 2007-09-09 Zoltan Varga <vargaz@gmail.com>
1658 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
1661 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
1662 icall.c reflection.c: Pass a MonoGenericContext argument to
1663 mono_lookup_dynamic_token ().
1665 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
1668 2007-09-09 Robert Jordan <robertj@gmx.net>
1670 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
1671 for generic methods.
1673 * object.c (mono_object_get_virtual_method): Handle generic methods.
1676 Code is contributed under MIT/X11 license.
1678 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
1680 * image.c: fix locking in mono_image_load_file_for_image ().
1682 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
1684 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
1685 used only as a cache: added an icall to fill it.
1687 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
1689 * reflection.h: exposed mono_reflection_free_type_info
1690 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
1691 since mono_reflection_bind_generic_parameters makes a copy of it.
1692 * reflection.c (free_type_info): subinfos should be freed.
1693 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
1695 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
1696 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
1697 this fixes #82695 and #81726.
1700 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
1702 * process.h, process.c: added support for user profile/info in
1703 ProcessStartInfo. For now only Windows works.
1705 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1707 * metadata.c: consider the generic arguments when comparing
1708 signatures (bug #82614).
1710 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1712 * cil-coff.h, image.c: updated assembly loader to cope with the
1713 PE32+ 64 bit file format.
1715 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
1717 * assembly.c, class.c, domain.c, loader.c: remove useless
1718 inclusion of cil-coff.h.
1720 2007-08-29 Jonathan Chambers <joncham@gmail.com>
1722 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
1723 if interface is marked with CoClassAttribute.
1725 Code is contributed under MIT/X11 license.
1727 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
1729 * sgen-gc.c: ensure no object from the to space is copied again or finalized
1730 if it's seen twice in major collections.
1732 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
1734 * sgen-gc.c: big objects are not copied to the gray area, but they
1735 need to be considered for scanning, too, if they are brought alive
1736 by an object ready for finalizations or a survived one.
1738 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
1740 * sgen-gc.c: properly account the number of disappearing links when
1743 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
1745 * sgen-gc.c: share the code to scan the registered roots between the
1746 different types of collections.
1748 2007-08-28 Zoltan Varga <vargaz@gmail.com>
1750 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
1752 2007-08-28 Zoltan Varga <vargaz@gmail.com>
1754 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
1755 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
1757 2007-08-28 Mark Probst <mark.probst@gmail.com>
1759 * security-manager.c (mono_security_manager_get_methods):
1760 LinkDemandSecurityException now has 2 arguments instead of 3.
1762 2007-08-27 Zoltan Varga <vargaz@gmail.com>
1764 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
1765 platforms which need it.
1767 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
1769 * sgen-gc.c: unregister thread data structures with a pthread_key_t
1772 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
1774 * threads.c: free the thread static data on thread exit.
1776 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
1778 * class.c: walk the hierarchy to find the generic definition for
1779 a class (fixes runtime part of bug #82498).
1781 2007-08-24 Zoltan Varga <vargaz@gmail.com>
1783 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
1786 * image.c (mono_image_close): Here. Hopefully fixes #82510.
1788 2007-08-24 Mark Probst <mark.probst@gmail.com>
1790 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
1792 2007-08-24 Robert Jordan <robertj@gmx.net>
1794 * appdomain.c: don't perform the ':'->';' substitution on Win32.
1796 2007-08-24 Jb Evain <jbevain@novell.com>
1798 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
1801 2007-08-24 Mark Probst <mark.probst@gmail.com>
1803 * threads.c: Make sure a thread gets cleaned up only once. Fixes
1806 2007-08-24 Zoltan Varga <vargaz@gmail.com>
1808 * assembly.c: Fix a warning.
1810 2007-08-23 Marek Habersack <mhabersack@novell.com>
1812 * appdomain.c: parse the <runtime> section looking for the probing
1813 element with the 'privatePath' attribute, which sets additional
1814 directories in which the runtime should look for assemblies.
1816 2007-08-23 Robert Jordan <robertj@gmx.net>
1818 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
1821 2007-08-23 Martin Baulig <martin@ximian.com>
1823 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
1824 _mono_debug_init_corlib() and remove it from the header file.
1826 2007-08-23 Martin Baulig <martin@ximian.com>
1828 * mono-debug-debugger.c
1829 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
1830 don't notify the debugger about it.
1832 * mono-debug-debugger.h
1833 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
1835 2007-08-23 Robert Jordan <robertj@gmx.net>
1837 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
1838 Code is contributed under MIT/X11 license.
1840 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
1842 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
1844 2007-08-22 Martin Baulig <martin@ximian.com>
1846 * mono-debug.c: Store debugging info on a per-domain basis and
1847 free it on domain unload. Add support for unloading symbol files.
1850 (MonoDebugList): New typedef.
1852 - add `data_tables and `type_table'.
1853 - replace 'symbol_files' and `num_symbol_files' with a
1855 (mono_debug_data_table): Removed.
1856 (mono_debug_list_add): New public function.
1857 (mono_debug_list_remove): New public function.
1858 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
1859 (mono_debug_init_2_memory): Renamed into
1860 mono_debug_open_image_from_memory().
1861 (mono_debug_close_image): New public function.
1862 (mono_debug_domain_create): Likewise.
1863 (mono_debug_domain_unload): Likewise.
1864 (MONO_DEBUGGER_VERSION): Bump to 60.
1866 * mono-debug-debugger.h
1867 (MonoDebuggerEvent):
1868 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
1869 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
1870 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
1871 - rename `THREAD_CREATED' and `THREAD_EXITED' into
1872 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
1873 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
1875 (mono_debugger_add_symbol_file): Removed.
1876 (mono_debugger_add_type): Removed.
1877 (mono_debugger_lookup_type): Removed.
1878 (mono_debugger_lookup_assembly): Removed.
1881 (mono_domain_create): Call mono_debug_domain_create().
1882 (mono_init_internal): Call mono_debug_init_corlib().
1885 (mono_assembly_close): Call mono_debug_close_image().
1887 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
1889 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
1892 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
1894 * sgen-gc.c: ensure section->pin_queue_end is initialized
1895 correctly when non pinning objects in the section have been found.
1897 2007-08-22 Marek Habersack <mhabersack@novell.com>
1899 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
1900 containing a list of directories separated by ':'. MSDN docs say
1901 the directories should be separated with ';'. Part of a bugfix for
1904 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
1906 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
1907 it should MonoType and not MonoClass.
1909 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
1911 * culture-info-table.h : regenerated.
1913 2007-08-20 William Holmes <billholmes54@gmail.com>
1915 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
1916 to call ReplaceFile Kernel32 on windows or in io-layer.
1917 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
1918 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
1919 as an internal call.
1921 Code is contributed under MIT/X11 license.
1923 2007-08-20 Jb Evain <jbevain@novell.com>
1925 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
1926 and MONO_EXCEPTION_FIELD_ACCESS.
1928 * debug-helpers.[c|h]: new mono_field_full_name function.
1930 2007-08-20 Mark Probst <mark.probst@gmail.com>
1932 * class.c: Removed class_security_level() and moved it to
1933 security-core-clr.c.
1935 * security-core-clr.c, security-core-clr.h: class_security_level()
1936 is now public and renamed to mono_security_core_clr_class_level().
1937 It also looks for security attributes in the classes a class is
1940 2007-08-20 Mark Probst <mark.probst@gmail.com>
1942 * security-core-clr.c, security-core-clr.h: CoreCLR security
1945 * Makefile.am: Added security-core-clr.[ch].
1947 * security-manager.c, security-manager.h: Functions and enum for
1948 setting and getting the security mode.
1950 * class.c: CoreCLR security checks.
1952 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
1954 * icall-def.h, process.c, process.h: implemented icall to get
1955 user/system processor times.
1957 2007-08-17 Mark Probst <mark.probst@gmail.com>
1959 * domain.c, threads.c, class-internals.h, domain-internals.h: New
1960 reader-lock-free jit_info_table.
1962 2007-08-17 Zoltan Varga <vargaz@gmail.com>
1964 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
1966 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
1968 * object-internals.h (MonoException): Add missing _data member.
1970 2007-08-08 Massimiliano Mantione <massi@ximian.com>
1972 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
1973 checking that only methods with matching qname or fqname are picked
1974 from implemented interfaces.
1976 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
1978 * verify.c (do_newarr):added, do type verification of
1979 newarr ops, push the right value on the eval stack.
1980 * verify.c (mono_method_verify): use do_newarr
1983 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
1985 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
1986 factored the common code into get_boxable_mono_type, which
1987 is now using mono_type_get_full, this fixed byref related tests.
1989 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
1991 * class.c: added mono_type_get_full, this function has the same
1992 behavior of mono_class_get_full but the returned MonoType has
1993 all metadata of the associated token in case of a typespec token.
1994 * class.c: added mono_type_retrieve_from_typespec, used by
1995 mono_type_get_full to retrieve the token type.
1996 * class.c (mono_class_create_from_typespec): changed to use
1997 mono_type_retrieve_from_typespec.
1998 * class.c (mono_ldtoken): changed to use mono_type_get_full
1999 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
2000 * class-internals.h: exported mono_type_get_full for internal use.
2002 2007-08-16 Jb Evain <jbevain@novell.com>
2004 * domain.c (supported_runtimes): add entry for
2005 the 'moonlight' runtime version.
2007 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2009 * verify.c (mono_method_verify): small typo sliped in.
2011 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2013 * verify.c (do_unbox_value): added, do type verification of
2015 * verify.c (mono_method_verify): use do_unbox_value
2018 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2020 * verify.c (dump_stack_value): fixed typo, was printing string
2021 instead of object on stack.
2022 * verify.c (do_box_value): moved the byref check up as it leads
2023 to invalid code and should be done earlier.
2024 * verify.c: improved error messages for and ldobj
2026 2007-08-15 William Holmes <billholmes54@gmail.com>
2028 * marshal.c (emit_marshal_custom): Omit the call to
2029 marshal_native_to_managed when calling native to managed
2030 and the argument is specified as an out argument.
2032 Code is contributed under MIT/X11 license.
2034 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
2036 * verify.c: fixed the type checks for generics, function pointers and vectors.
2037 Added type verification for ldobj and ldtoken. The verifier
2038 would segfault if header or signature of a method contained references
2039 to non-existant types.
2041 2007-08-15 Jonathan Chambers <joncham@gmail.com>
2043 * marshal.c (cominterop_get_ccw): Patch from
2044 Bill Holmes to no walk up interface hierarchy.
2045 All parent methods should be present in the interface for COM.
2047 Code is contributed under MIT/X11 license.
2049 2007-08-15 Jonathan Chambers <joncham@gmail.com>
2051 * marshal.c (emit_marshal_com_interface): Patch from
2052 Bill Holmes to handle COM Interfaces as return values
2053 for native->managed calls.
2055 Code is contributed under MIT/X11 license.
2057 2007-08-14 Jonathan Chambers <joncham@gmail.com>
2059 * marshal.c (cominterop_get_idispatch_for_object): Implement
2060 for runtime callable wrappers.
2062 Code is contributed under MIT/X11 license.
2064 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
2066 * pedump.c (main): changed from mono_init to mono_init_from_assembly
2067 so 2.0 types are accessible
2070 2007-08-13 Miguel de Icaza <miguel@novell.com>
2072 * domain.c (mono_init_internal): Call mono_assembly_load_friends
2073 once we load mscorlib. Due to the order in which we initialize,
2074 the mono_assembly_load_full routine that loads mscorlib did not
2075 load friends. We now load it once we load the
2076 mono_defaults.internals_visible_class class.
2078 * assembly.c: Expose the mono_load_friend_assemblies method.
2080 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
2082 * verify.c: improved the handling of boxing, better
2083 type checking for unary ops and conversion. Fix bug
2084 regarding managed pointer compatibility checking
2086 2007-08-11 Zoltan Varga <vargaz@gmail.com>
2088 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
2090 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
2092 2007-08-09 Raja R Harinath <rharinath@novell.com>
2094 * reflection.c (dup_type): Remove.
2095 * class.c (dup_type): Remove.
2096 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
2097 instead of the dodgy 'dup_type'.
2098 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
2099 handle the case where 'dup_type' needed the second argument.
2101 2007-08-08 Zoltan Varga <vargaz@gmail.com>
2103 * domain.c: Fix a warning.
2105 2007-08-08 Massimiliano Mantione <massi@ximian.com>
2107 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
2108 checking that methods with the same fqname are not overridden
2109 with a method from an ancestor.
2111 2007-08-07 Zoltan Varga <vargaz@gmail.com>
2113 * threads.c (free_thread_static_data_helper): Avoid a crash if
2114 thread->static_data is not yet set.
2116 2007-08-07 Jonathan Chambers <joncham@gmail.com>
2118 * marshal.c: Use correct image when emitting
2119 native wrapper for COM calls.
2121 Code is contributed under MIT/X11 license.
2123 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
2125 * icall-def.h, security.c, security.h :
2126 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
2128 2007-08-07 Martin Baulig <martin@ximian.com>
2130 * mono-debug-debugger.h
2131 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
2133 * domain.c (mono_domain_free): Call
2134 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
2136 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
2138 * verify.c (check_underflow, check_overflow): error message now returns IL offset
2139 * verify.c (in_same_block): code should test if either offset is inside the clauses
2140 * verify.c (mono_method_verify): push the exception into the eval stack of exception
2143 2007-08-03 Zoltan Varga <vargaz@gmail.com>
2145 * image.c (mono_image_close): Fix a leak.
2147 * object.c (mono_runtime_invoke_array): Avoid using alloca.
2149 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
2151 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
2153 * domain.c, threads.c, threads-types.h: fix memory retention issue
2154 with thread static variables not being cleared on domain unload.
2155 Reuse thread static slots after domain unload.
2157 2007-08-03 Zoltan Varga <vargaz@gmail.com>
2159 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
2162 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
2163 now done in mono_runtime_invoke_array.
2165 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
2166 receiver is a nullable type.
2168 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
2171 2007-08-03 Jonathan Chambers <joncham@gmail.com>
2173 * marshal.c: Implement COM Objects as return type for
2174 managed->unmanaged calls. Added Release calls for COM Object
2175 out/return values in managed->unmanaged calls.
2177 Code is contributed under MIT/X11 license.
2179 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
2181 * threads.h, threads-type.h: move the hazard pointer declarations
2182 to the private header.
2184 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
2186 * file-io.c, appdomain.c: memory leak fixes.
2188 2007-08-02 Dick Porter <dick@ximian.com>
2191 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
2192 SO_REUSEADDR setting into io-layer/sockets.c.
2194 2007-08-01 Zoltan Varga <vargaz@gmail.com>
2196 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
2197 from Object when called on a generic parameter. Fixes #82211.
2199 2007-08-01 Dick Porter <dick@ximian.com>
2201 * file-io.c (convert_share): Test FileShare values bit-by-bit.
2202 Fixes bug 79250 yet again.
2204 2007-07-30 Martin Baulig <martin@ximian.com>
2206 Merged the `debugger-dublin' branch.
2209 (MonoDebugDataTable): New typedef.
2210 (MonoDebugMethodAddressList): New typedef.
2211 (MonoDebugWrapperData): Removed.
2212 (MonoDebugSymbolTable): Removed `current_data_table',
2213 `current_data_table_size', `current_data_table_offset'.
2214 (MonoDebugDataItemType): Moved into mono-debug.c.
2215 (MonoDebugMethodJitInfo): Remove `address'.
2216 (mono_debug_data_table): New global variable.
2217 (mono_debug_lookup_method_addresses): New public function.
2218 (mono_debug_find_method): Take a `MonoMethod *', not a
2219 `MonoDebugMethodInfo *'.
2221 * mono-debug.c: Drop support for the old symbol tables.
2223 2007-06-28 Martin Baulig <martin@ximian.com>
2225 * mono-debug.c (mono_debug_debugger_version): New public variable.
2227 2007-07-31 William Holmes <billholmes54@gmail.com>
2229 * metadata.c Changed mono_type_create_from_typespec to not insert
2230 the type into the hash map until after
2231 do_mono_metadata_parse_type has completed.
2233 Code is contributed under MIT/X11 license.
2235 2007-07-31 Zoltan Varga <vargaz@gmail.com>
2237 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
2238 generic parameter. Fixes #82211.
2240 2007-07-27 Jb Evain <jbevain@novell.com>
2242 * pedump.c (dump_metadata, dump_metadata_header): dump
2243 versions contained in the metadata header.
2245 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
2247 * threads.c: register small_id_table with the GC.
2249 2007-07-27 Mark Probst <mark.probst@gmail.com>
2251 * threads.c, threads.h, class-internals.h, object-internals.h:
2252 Hazard pointers, to be used by lock-free parallel algorithms.
2254 2007-07-26 Dick Porter <dick@ximian.com>
2256 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
2257 routine on non-windows platforms, as I've not managed to think of
2258 a non-kludgy way of doing this. Finishes off bug 78739.
2260 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
2262 * object.c: properly setup interface_bitmap in proxy vtables.
2264 2007-07-25 Marek Habersack <mhabersack@novell.com>
2266 * appdomain.c (get_shadow_assembly_location): do not use TickCount
2267 to create unique shadow copy target directories, use the domain's
2268 serial number instead. Each domain gets a unique target directory
2271 * domain.c (mono_domain_create): added code to increment domain
2272 shadow copy serial number and cache the value in the current
2275 * domain-internals.h (struct _MonoDomain): added a new field -
2276 shadow_serial to hold the serial number used in generation of
2277 shadow-copy directories. This is to make sure that the directory
2278 name is unique for each and every domain created. We avoid a race
2279 condition with overriding assemblies already in use by other app
2282 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
2284 * class.c (mono_bounded_array_class_get): fixed memory leak when
2285 binding generic parameters.
2287 2007-07-24 Raja R Harinath <rharinath@novell.com>
2289 * metadata.c (do_mono_metadata_parse_generic_class): Use
2290 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
2293 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
2295 * loader.c, class-internals.h, reflection.c: removed the per-method
2296 generics hashtable: we use the global one through the call of
2297 mono_class_inflate_generic_method ().
2299 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
2301 * class.c, metadata.c, class-internals.h: introduce yet another
2302 generics global cache for inflated methods (fixes 98% of the perf
2303 issue in bug #81806).
2305 2007-07-23 Raja R Harinath <rharinath@novell.com>
2307 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
2308 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
2309 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
2310 return a MonoGenericInst containing (a copy) of those types.
2311 (mono_metadata_inflate_generic_inst): Update to changes.
2312 (mono_metadata_parse_generic_inst): Likewise.
2313 (mono_get_shared_generic_inst): Likewise.
2314 * reflection.c (mono_class_bind_generic_parameters): Likewise.
2315 (mono_reflection_bind_generic_method_parameters): Likewise.
2316 * metadata-internals.h: Likewise.
2317 * icall.c (free_generic_context): Kill.
2318 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
2320 * reflection.c (reflection_methodbuilder_to_mono_method): Use
2321 mono_metadata_type_dup.
2322 * marshal.c (mono_mb_create_method): Likewise.
2324 * metadata.c (mono_metadata_type_dup): Rename from
2325 mono_metadata_type_dup_mp. Take an optional mempool instead of a
2326 MonoImage. Handle a few more cases, esp. when no mempool is given.
2327 * marshal.c, metadata-internals.h: Update to changes.
2329 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
2331 * class.c: fixed a small leak for array classes and removed warning.
2333 2007-07-22 Zoltan Varga <vargaz@gmail.com>
2335 * loader.c (mono_method_get_param_token): Make this work on generic methods.
2336 Return 0x8000000 for return parameters. Fixes #82161.
2338 2007-07-21 Marek Habersack <grendello@gmail.com>
2340 * appdomain.c (get_shadow_assembly_location): append the current
2341 ticks value to the path. Avoids overwriting the same assemblies by
2342 several threads at the same time.
2344 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
2345 and Raja R Harinath <rharinath@novell.com>
2347 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2349 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
2350 property for testing if a method is a generic method definition.
2352 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
2354 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
2356 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2358 * verify.c: used function from private branch, reverted to the one in class.h
2360 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2362 * verify.c: a typo slipped in and the code wont compile
2364 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2366 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
2367 disabled box instruction as it is doing the wrong thing
2368 improved stack dump messages, now it is easier to debug type related issues
2371 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
2373 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
2375 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2377 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
2378 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
2379 grouped with class and valuetype. This change will simply
2380 the code as it should be handled just like unmanaged pointers.
2382 2007-07-19 Mark Probst <mark.probst@gmail.com>
2384 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
2386 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
2388 * verify.c: several stack merge issues fixed, reference comparisons now
2389 check the type size. strict type check now works correctly.
2390 added more uses of IS_MANAGED_POINTER macro.
2391 fixed issues pointed by running the test suite against .net.
2394 2007-07-19 Mark Probst <mark.probst@gmail.com>
2396 * class.c, loader.c, class-internals.h: Removed the
2397 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
2400 * icall.c: Better error checking in some internal reflection
2403 2007-07-18 William Holmes <billholmes54@gmail.com>
2405 * filewatcher.c : removed unused variable 'filename' in
2406 ves_icall_System_IO_FSW_SupportsFSW
2408 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
2410 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
2413 2007-07-15 Zoltan Varga <vargaz@gmail.com>
2415 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
2417 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
2419 2007-07-14 Zoltan Varga <vargaz@gmail.com>
2421 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
2422 Implement generics support.
2423 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2425 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
2426 type_args and method_args arguments.
2427 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
2428 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
2429 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
2431 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
2433 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
2434 It adds a rootimage parameter to mono_reflection_get_type_internal,
2435 adds new function mono_reflection_get_type_with_rootimage and use
2436 the rootimage to resolve the types instead of the current image
2438 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
2440 * culture-info-table.h: Forgot to update after r78304.
2442 2007-07-13 Raja R Harinath <rharinath@novell.com>
2444 * class.c (mono_class_is_open_constructed_type)
2445 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
2447 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
2449 * class.c (mono_bounded_array_class_get): method fails if used with
2450 an incomplete TypeBuilder enum (no basetype field), fixed it by
2451 avoiding calculating the size for such array as it cannot be instantiated.
2454 2007-07-12 Raja R Harinath <rharinath@novell.com>
2456 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
2458 * metadata.c, reflection.c: Update to changes.
2460 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
2462 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
2463 mono_class_is_valid_enum, they are used to valide a enum when loading.
2464 * reflection.c: used new functions to throw TypeLoadException when and
2465 invalid enum is build with TypeBuilder. Fixes #82018
2467 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
2469 * object.c: forgot commit of mono_class_setup_methods () to access
2471 * object-internals.h: added a few more handy fields to
2474 2007-07-11 Zoltan Varga <vargaz@gmail.com>
2476 * object.c (build_imt): Call mono_class_setup_methods () before accessing
2479 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
2481 * class-internals.h, object-internals.h, object.c: IMT-based
2482 interface invocation core from Massimiliano Mantione
2483 (massi@ximian.com) with a reworked arch-specific interface,
2484 bsearch implementation and a few bugfixes and memory savings by me.
2486 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
2488 * class.c (mono_class_create_from_typedef): mono would segfault if
2489 an enum did not have a __value field. It now throws a TypeLoadException
2490 for such cases. Fix bug #82022
2492 2007-07-10 Zoltan Varga <vargaz@gmail.com>
2494 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
2496 2007-07-09 Mark Probst <mark.probst@gmail.com>
2498 * class.c (mono_class_init): If a class is already inited but has
2499 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
2501 2007-07-09 Mark Probst <mark.probst@gmail.com>
2503 * class.c: Properly handle the case of an unimplemented interface
2504 method. Fixes: 81673.
2506 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
2508 * class-internals.h, object.c: cleanup patch from massi: use
2509 MonoVTable->interface_bitmap since the vtable interfaces offset array
2512 2007-07-10 Zoltan Varga <vargaz@gmail.com>
2514 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
2515 GetMDStreamVersion icall instead.
2517 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
2519 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
2520 not use mono_dl_build_path() with a full library name: makes
2521 fallbacks to libgaim and libfam work.
2523 2007-07-06 William Holmes <billholmes54@gmail.com>
2525 * assembly.c: Added a continue statement in probe_for_partial_name when
2526 parse_assembly_directory_name fails. Fixes : 82002
2528 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
2530 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
2531 and added a verification for TYPEDBYREF.
2532 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
2533 make native int interchangeable with int32 and some small cleanup and formating.
2534 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
2535 handle byref of byref.
2536 * verify.c (push_local): handle byref of byref.
2537 * verify.c (do_binop): invalid mix of values is unverifiable
2538 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
2539 added visibility checks
2540 * verify.c (field related method): added visibility checks
2541 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
2543 2007-07-06 Zoltan Varga <vargaz@gmail.com>
2545 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
2548 2007-07-05 Zoltan Varga <vargaz@gmail.com>
2550 * profiler.c (mono_profiler_load): Fix an off-by-one error.
2552 * marshal.c (emit_marshal_string): When returning a string from managed code,
2553 allways make a copy even for unicode strings. Fixes #81990.
2555 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
2557 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
2558 of byref generic inst types (bug #81997).
2560 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
2562 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
2563 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
2565 2007-07-02 Zoltan Varga <vargaz@gmail.com>
2567 * marshal.c (emit_marshal_string): Add support for unicode strings in
2568 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
2570 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
2572 * verify.c: field load/store are now verified, missing only access checks now
2574 2007-06-28 Martin Baulig <martin@ximian.com>
2576 * mono-debug.c (mono_debug_debugger_version): New public variable.
2578 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
2580 * locales.c: When constructing DateTimeFormat or NumberFormat for
2581 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
2582 MonoCultureInfo contructed from the current locale is always
2583 read-only and has UseUserOverride set to true. All MonoCultureInfo
2584 instances returned for GetCultures have both IsReadOnly and
2585 UseUserOverride set to true. Fixes part of bug #81930.
2587 2007-06-22 Jonathan Chambers <joncham@gmail.com>
2589 * icall-def.h: Update System.__ComObject icalls
2590 * marshal.c: Avoid managed transition (and object creation)
2591 when looking up COM interface in RCW.
2594 Code is contributed under MIT/X11 license.
2596 2007-06-22 Zoltan Varga <vargaz@gmail.com>
2598 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
2599 to avoid crashes during assembly unloading.
2601 2007-06-22 Raja R Harinath <rharinath@novell.com>
2603 Fix MethodInfo.IsGenericMethodDefinition
2604 * reflection.c (mono_reflection_bind_generic_method_parameters):
2605 Rearrange code to ensure we always uses a generic method definition.
2606 * class.c (mono_class_inflate_generic_method_full): Set
2607 'generic_container' field only for generic method definitions.
2608 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
2609 Use presense of 'generic_container' field as indication of being a
2610 generic method definition.
2612 2007-06-21 Zoltan Varga <vargaz@gmail.com>
2614 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2616 * object-internals.h: Reflect changes in the layout of the managed Delegate
2619 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
2620 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
2621 runtime memory used by the dynamic method. Fixes #77146.
2623 2007-06-21 Dick Porter <dick@ximian.com>
2626 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
2627 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
2630 2007-06-21 Raja R Harinath <rharinath@novell.com>
2632 * reflection.c (method_encode_methodspec): Add a tripwire.
2633 * class.c (inflate_generic_type): The fully open generic type is
2634 not the same as the generic type definition.
2636 2007-06-21 Martin Baulig <martin@ximian.com>
2638 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
2640 * mono-debug-debugger.h
2641 (MonoDebuggerBreakpointInfo): Removed.
2642 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
2643 (mono_debugger_remove_breakpoint): Likewise.
2644 (mono_debugger_breakpoint_callback): Likewise.
2645 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
2647 2007-06-21 Raja R Harinath <rharinath@novell.com>
2649 * metadata.c (mono_metadata_lookup_generic_class): The fully open
2650 generic type is not the same as the generic type definition.
2651 * class.c (mono_generic_class_get_class): Likewise.
2653 2007-06-20 Geoff Norton <gnorton@customerdna.com>
2655 * icall.c: The second argument to
2656 System.Reflection.MethodBase.GetMethodFromHandleInternalType
2657 is a MonoType not a MonoClass.
2659 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
2661 * verify.c: support for function pointers in the verifier
2663 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
2665 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
2667 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
2669 * assembly.c: removed Mono.Data.SqliteClient from the list of
2670 forward-compatible assemblies as it breaks the ABI (bug #81899).
2672 2007-06-19 Raja R Harinath <rharinath@novell.com>
2674 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
2675 lookup/update with the loader lock.
2676 * reflection.c (mono_class_bind_generic_parameters): No need to
2677 protect mono_metadata_lookup_* with the loader lock.
2678 * class.c (inflate_generic_type): Likewise.
2680 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
2681 on a generic instantiated type.
2683 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
2685 *verify.c: produce meanfull error messages on verification error
2686 *verify.c: fixed some cases of verification errors reported as validation errors
2687 *pedump.c: fixed the error name array, now it shows validation errors properly
2688 *verify.h: fixed the contant that should be used for verification errors
2690 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
2692 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
2693 for bug #77596, 81858 and 80743 (generics data structures on domain
2696 2007-06-15 Raja R Harinath <rharinath@novell.com>
2698 Avoid allocating 'MonoGenericContext' on the heap.
2699 * class-internals (_MonoMethodInflated::context): Make field
2700 inline, not a pointer.
2701 * loader.c (method_from_methodspec): Allocate 'new_context' on the
2702 stack. Use the context embedded within the inflated method as the
2703 hash key, rather than 'new_context'.
2704 * class.c (inflate_generic_context): Simplify. Return a struct
2705 rather than allocating on the heap.
2706 (mono_class_inflate_generic_method_full): Update to changes. Now,
2707 doesn't salt away a copy of the context -- simplifying the
2708 lifetime rules of a 'MonoGenericContext *'.
2709 (mono_method_get_context): Return pointer to embedded context.
2710 (setup_generic_array_ifaces): Allocate temporary context on stack.
2711 * reflection.c (inflate_mono_method): Likewise.
2712 (mono_reflection_bind_generic_method_parameters): Likewise.
2713 Use the context embedded within the inflated method as the hash key.
2715 Avoid a source of allocation of 'MonoGenericContext'.
2716 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
2717 and 'cached_context' fields into embedded 'MonoGenericContext' field.
2718 * class.c: Update to changes.
2719 (mono_generic_class_get_context): Simplify drastically. Now just
2720 returns a pointer to the field.
2721 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
2722 argument as a const pointer.
2723 (mono_metadata_generic_context_equal): Likewise.
2724 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
2727 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
2729 * verify.c improved the handling of brtrue/brfalse, factored out common code
2731 2007-06-14 Raja R Harinath <rharinath@novell.com>
2733 Kill MonoGenericMethod.
2734 * class-internals.h (MonoGenericContext::method_inst): Rename from
2735 'gmethod' and convert to a MonoGenericInst.
2736 (MonoGenericMethod): Remove.
2737 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
2738 * loader.c (method_from_methodspec): Update to changes. Use a
2739 MonoGenericContext as the key to the hashtable.
2740 * metadata.c (mono_metadata_generic_context_equal): Rename from
2741 'mono_metadata_generic_method_equal' and take MonoGenericContext.
2742 (mono_metadata_generic_context_hash): Likewise from
2743 'mono_metadata_generic_method_hash'. Change hash function.
2744 (mono_metadata_load_generic_params): Update to changes.
2745 (mono_get_shared_generic_method): Remove.
2746 * metadata-internals.h (mono_get_shared_generic_method): Remove.
2747 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
2748 (inflate_generic_context): Likewise.
2749 (mono_class_inflate_generic_method_full): Likewise.
2750 (setup_generic_array_ifaces): Likewise.
2751 (mono_class_create_from_typespec): Likewise.
2752 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
2753 (method_encode_methodspec): Update callsite.
2754 (reflection_methodbuilder_to_mono_method): Update to changes.
2755 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
2756 MonoGenericContext as the key to the hashtable.
2757 (inflate_mono_method): Update to changes.
2759 * class-internals.h (MonoGenericMethod::container): Remove.
2760 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
2762 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
2764 * profiler-private.h, profiler.c, profiler.h: added API to profile
2767 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
2769 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
2771 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
2773 * verify.c: method invocation is now validated, now we verify parameter types on stack.
2774 Fixed overflow and underflow not aborting the verification process.
2776 2007-06-13 Mark Probst <mark.probst@gmail.com>
2778 * class-internals.h (MonoStats): Added stats entries for dynamic
2781 2007-06-12 Zoltan Varga <vargaz@gmail.com>
2783 * loader.c (mono_free_method): Free header->locals and header->clauses.
2785 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
2788 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
2790 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
2792 2007-06-12 Raja R Harinath <rharinath@novell.com>
2794 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
2797 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
2799 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
2801 2007-06-11 Raja R Harinath <harinath@gmail.com>
2803 MonoGenericMethod on a diet
2804 * class-internals.h (_MonoMethodInflated::reflection_info): Move
2806 (_MonoGenericMethod::reflection_info): ... from here.
2807 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
2809 * reflection.c (inflate_mono_method): Likewise.
2810 (mono_reflection_bind_generic_method_parameters): Likewise.
2812 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
2814 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
2815 *verify.c: factored long ldarg forms to share code with short forms
2817 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
2819 *verify.c: fixed code formating factored some duplicate code
2822 *verify.h: fixed binary incompatibility introduced earlier
2824 *pedump.c: fixed formating
2826 2007-06-11 Raja R Harinath <harinath@gmail.com>
2828 Fix assertion when disassembling Mono.C5.dll
2829 * loader.c (method_from_methodspec): Avoid inflating a method
2830 twice with the same context. If the methodref is inflated, use
2831 the declaring method instead.
2833 * class.c (mono_class_from_generic_parameter): Fix case similar to
2834 bug #81830 handled below, but for method containers.
2836 2007-06-10 Raja R Harinath <harinath@gmail.com>
2838 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
2839 get_shared_generic_class. Directly inflate the instance.
2840 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
2841 (inflate_generic_class): Delete.
2842 (get_shared_generic_class): Delete. Move setting of
2843 'cached_class' and 'cached_context' ...
2844 * metadata.c (mono_metadata_lookup_generic_class): ... here.
2846 * metadata.c (mono_metadata_lookup_generic_class): Change
2847 signature to take the components of a MonoGenericClass rather than
2848 an allocated MonoGenericClass. Change semantics to be intern-like.
2849 * reflection.c (mono_class_bind_generic_parameters): Update to
2850 changes. Make locking region tighter.
2851 * class.c (inflate_generic_class): Update to changes.
2852 (get_shared_generic_class): Likewise.
2853 * metadata-internals.h: Likewise.
2855 * reflection.c (mono_class_bind_generic_parameters): Take and
2856 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
2857 (mono_reflection_bind_generic_parameters): Use
2858 'mono_class_bind_generic_parameters' rather than duplicate the code.
2859 * class.c (mono_bounded_array_class_get): Update to changes.
2860 * object-internals.h: Likewise.
2862 * reflection.c (mono_class_bind_generic_parameters): Only support
2863 parameterizing generic type definitions. Remove support for other
2866 2007-06-08 Zoltan Varga <vargaz@gmail.com>
2868 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
2870 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
2871 in the dynamic case.
2873 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
2875 * threads.c: When cleaning up thread, reset the Background bit.
2878 2007-06-08 Jonathan Chambers <joncham@gmail.com>
2880 * metadata.c: Move variable declarations to top of scope.
2881 * verify.c: Move variable declarations to top of scope.
2883 Code is contributed under MIT/X11 license.
2885 2007-06-08 Raja R Harinath <rharinath@novell.com>
2887 * reflection.c (mono_class_bind_generic_parameters): Replace
2888 open-coded loop with mono_metadata_inflate_generic_inst.
2890 * class.c (get_shared_generic_class): Don't call
2891 mono_get_shared_generic_inst. Use the container's own
2894 * metadata.c (mono_metadata_load_generic_params): Move
2895 initialization of 'context' field here from ...
2896 * class.c (mono_class_create_from_typedef): ... here, and ...
2897 * loader.c (mono_get_method_from_token): ... here.
2899 * class.c (get_shared_generic_class): Rename from
2900 mono_get_shared_generic_class and make static.
2901 (mono_get_shared_generic_inst): Move to metadata.c.
2902 * loader.c (mono_get_shared_generic_method): Likewise.
2903 * class-internals.h, metadata-internals.h: Update to changes.
2906 * class.c (mono_class_from_generic_parameter): Don't assume a
2907 generic container owner exists. Generic containers from monodis
2910 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
2912 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
2913 * verify.h: new typedefs to returns the non-verifiable status
2914 * verify.c: initial implementation of generics, stack merging and object compatibility check
2916 2007-06-06 Mark Probst <mark.probst@gmail.com>
2918 * class.c, image.c, class-internals.h (MonoImage): class_cache is
2919 a MonoInternalHashTable again (fixed bug in internal hash table
2922 2007-06-06 Mark Probst <mark.probst@gmail.com>
2924 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
2925 MonoInternalHashTable again (fixed bug in internal hash table
2928 2007-06-06 Mark Probst <mark.probst@gmail.com>
2930 * class.c, image.c, class-internals.h, domain.c,
2931 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
2932 changes. Have to figure out what makes them break the SWF
2935 2007-06-04 Mark Probst <mark.probst@gmail.com>
2937 * class.c, image.c, class-internals.h (MonoImage): class_cache is
2938 a MonoInternalHashTable now.
2940 2007-06-04 Mark Probst <mark.probst@gmail.com>
2942 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
2943 MonoInternalHashTable now.
2945 2007-05-31 Zoltan Varga <vargaz@gmail.com>
2947 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
2950 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
2952 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
2953 dependent trampoline.
2955 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2957 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
2959 2007-05-29 Robert Jordan <robertj@gmx.net>
2961 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
2963 2007-05-28 Zoltan Varga <vargaz@gmail.com>
2965 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
2967 2007-05-25 Jonathan Chambers <joncham@gmail.com>
2969 * marshal.c: Fix interface lookup loops for
2970 cominterop_get_com_slot_for_method and
2971 cominterop_get_method_interface. Only need to lookup
2972 if type is a class, else use interface type method is on.
2974 Code is contributed under MIT/X11 license.
2976 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
2978 * reflection.c: HasSecurity can be present even if no specially
2979 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
2980 SecurityAttribute). Fix CAS regression tests on buildbot.
2982 2007-05-24 Jonathan Chambers <joncham@gmail.com>
2984 * appdomain.c: Add configure checks for header files.
2985 * image.c: Add configure checks for header files.
2986 * file-io.c: Add configure checks for header files.
2987 * debug-mono-symfile.c: Add configure checks for header files.
2988 * threadpool.c: Add configure checks for header files.
2989 * console-io.c: Add configure checks for header files.
2990 * profiler.c: Add configure checks for header files.
2991 * rawbuffer.c: Add configure checks for header files.
2992 * icall.c: Add configure checks for header files.
2993 * rand.c: Add configure checks for header files.
2994 * socket-io.c: Add configure checks for header files.
2996 Code is contributed under MIT/X11 license.
2998 2007-05-24 Zoltan Varga <vargaz@gmail.com>
3000 * reflection.c (mono_custom_attrs_from_builders): Remove the
3001 assertion as it breaks the build.
3003 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
3005 * reflection.c (lookup_custom_attr): Make a copy here too.
3007 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
3010 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
3013 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
3016 2007-05-22 Zoltan Varga <vargaz@gmail.com>
3018 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
3019 (load_cattr_value): Ditto.
3021 2007-05-20 Zoltan Varga <vargaz@gmail.com>
3023 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
3025 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
3027 * threads.c: In "start_wrapper", set apartment_state to MTA if
3028 apartment_state is Unknown and we're running on 2.0 profile or
3030 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
3031 to main method, then set apartment_state to Unknown on 1.0 profile,
3032 and MTA on 2.0 profile.
3034 2007-05-16 Jb Evain <jb@nurv.fr>
3036 * class-internals.h (MonoDefaults): Add an attribute_class and
3037 customattribute_data_class.
3038 * domain.c (mono_init_internal): Populate them.
3039 * reflection.c: Use them to remove duplicates. Make a vew
3040 MonoClass variables `static'.
3042 2007-05-15 Massimiliano Mantione <massi@ximian.com>
3044 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
3045 step in implementing IMT, so that all isinst checks now can go
3047 This was needed because vtables for TransparentProxy need to look
3048 like the vtable of the "target" class, so they need to point to
3049 its interface bitmap directly.
3051 * object.c: inside "mono_class_create_runtime_vtable" and
3052 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
3054 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
3056 * object-internals.h
3057 culture-info.h : added territory field in MonoCulture and
3058 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
3059 * locales.c : fill territory field above too.
3060 * culture-info-table.h : regenerated.
3062 2007-05-12 Zoltan Varga <vargaz@gmail.com>
3064 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
3067 2007-05-11 Jonathan Chambers <joncham@gmail.com>
3069 * object.c: Always initialize apartment, even if
3070 there is no custom attributes on entry point.
3072 Code is contributed under MIT/X11 license.
3074 2007-05-10 Jonathan Chambers <joncham@gmail.com>
3076 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
3077 * metadata.c: If no encoding is set, check for unicode
3080 Code is contributed under MIT/X11 license.
3082 2007-05-09 Jonathan Chambers <joncham@gmail.com>
3084 * threads.c: Handle if mono_thread_current returns NULL
3086 Code is contributed under MIT/X11 license.
3088 2007-05-09 Jonathan Chambers <joncham@gmail.com>
3090 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
3091 in start_wrapper. Added mono_thread_init_apartment_state and
3092 mono_thread_cleanup_apartment_state.
3093 * object.c: Initialize thread apartment state on main thread
3094 by checking for STAThreadAttribute on entry point.
3095 * object-internals.h: Add apartment_state field to MonoThread.
3096 * threads-types.h: Add unmanaged definition of
3097 System.Threading.ApartmentState, MonoThreadApartmentState.
3099 Code is contributed under MIT/X11 license.
3101 2007-05-08 Jonathan Chambers <joncham@gmail.com>
3103 * class.c: Fix windows build.
3104 * class-internals.h: Fix windows build.
3106 Code is contributed under MIT/X11 license.
3108 2007-05-08 Robert Jordan <robertj@gmx.net>
3110 * process.c (CreateProcess_internal):
3111 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
3112 .CreateNoWindow was specified. Fixes #81496.
3114 2007-05-08 Massimiliano Mantione <massi@ximian.com>
3116 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
3117 step in implementing IMT, replaced it with two compact arrays
3118 (interfaces_packed and interface_offsets_packed) and a bitmap that
3119 is used for isinst checks (interface_bitmap).
3121 * class.c: (compare_interface_ids): compare function to pass to
3122 bsearch when looking for an interface with a given id.
3123 (mono_class_interface_offset): reimplemented using bsearch on
3124 interfaces_packed, getting the offset from interface_offsets_packed.
3125 (print_implemented_interfaces): utility debugging function.
3126 (setup_interface_offsets): reworked to initialize interfaces_packed,
3127 interface_offsets_packed and interface_bitmap.
3129 * object.c: replaced all accesses to "MonoClass.interface_offsets"
3130 with uses of interfaces_packed and interface_offsets_packed.
3132 2007-05-08 Massimiliano Mantione <massi@ximian.com>
3134 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
3135 mono_class_interface_offset prototype to wrap all accesses to
3136 "MonoClass.interface_offsets".
3138 * class.c: Implemented mono_class_interface_offset, and wrapped all
3139 accesses to "MonoClass.interface_offsets".
3141 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
3142 "MonoClass.interface_offsets".
3144 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
3146 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
3147 GetMethodFromHandle overloads (bug #78637).
3149 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3151 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
3152 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
3154 2007-05-01 Zoltan Varga <vargaz@gmail.com>
3156 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
3159 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
3161 (mono_custom_attrs_from_index): Ditto.
3163 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
3166 2007-04-30 Zoltan Varga <vargaz@gmail.com>
3168 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
3169 is now allocated from a mempool.
3171 2007-04-28 Zoltan Varga <vargaz@gmail.com>
3173 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
3174 caller holds threads_lock, leading to deadlocks. Fixes #81476.
3176 2007-04-26 Zoltan Varga <vargaz@gmail.com>
3178 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
3179 mono_loader_clear_error () too late. Fixes #81463.
3181 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
3183 * culture-info-table.h : regenerated.
3185 2007-04-25 Zoltan Varga <vargaz@gmail.com>
3187 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
3190 2007-04-25 Dick Porter <dick@ximian.com>
3192 * Makefile.am: Put the mingw enforced-optimisation back into the
3193 PLATFORM_WIN32 section.
3195 2007-04-24 Zoltan Varga <vargaz@gmail.com>
3197 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
3200 * image.c (mono_image_load_module): New API function to load a module reference.
3202 * image.c (load_modules): Load modules lazily. Fixes #80812.
3204 * class.c (mono_class_from_typeref): Use mono_image_load_module.
3206 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
3208 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
3209 to mono_image_load_module_dynamic.
3211 2007-04-23 Jonathan Chambers <joncham@gmail.com>
3213 * marshal.c: Fix calling convention for CCW on non-windows
3214 platforms. STDCALL on windows, CDECL everywhere else to work
3215 with XPCOM and MainWin COM.
3217 Code is contributed under MIT/X11 license.
3219 2007-04-23 Martin Baulig <martin@ximian.com>
3224 (method_from_memberref): Added `gboolean *used_context' argument.
3225 (mono_get_method_from_token): Likewise.
3226 (mono_get_method_full): Don't insert the method in the cache when
3227 `used_context' is true.
3229 2007-04-23 Raja R Harinath <rharinath@novell.com>
3231 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
3233 * reflection.c (mono_reflection_bind_generic_parameters): Don't
3234 create new MonoTypes for returned types.
3235 * class.c (mono_generic_class_get_class): Export mono-internal.
3236 * class-internals.h: Update to changes.
3238 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
3240 * threadpool.c, threadpool.h, icall-def.h: patch from
3241 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
3243 2007-04-18 Zoltan Varga <vargaz@gmail.com>
3245 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
3247 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
3249 * threads.c (mono_thread_get_stack_bounds): New helper function.
3251 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
3252 Correctly compute stack bounds when attaching. Fixes #81394.
3254 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
3256 * reflection.c: fix handling of doubles in custom attributes
3257 for the arm-fpa format (bug #81368).
3259 2007-04-18 Raja R Harinath <rharinath@novell.com>
3261 * reflection.c (assembly_add_win32_resources): Mildly relax an
3262 bounds check to let the end pointer point just past the end of the
3263 allocated buffer. (may fix #81384)
3265 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
3267 * culture-info-table.h : regenerated.
3269 2007-04-07 Zoltan Varga <vargaz@gmail.com>
3271 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
3272 the thread is aborted early.
3274 2007-04-05 Dick Porter <dick@ximian.com>
3276 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
3277 FindFirstFile()/FindNextFile() to find entries. This lets the
3278 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
3281 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
3283 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
3285 2007-04-04 Martin Baulig <martin@ximian.com>
3288 (mono_method_desc_full_match): Add support for nested classes.
3290 2007-04-02 Zoltan Varga <vargaz@gmail.com>
3292 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
3294 2007-04-01 Zoltan Varga <vargaz@gmail.com>
3296 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
3297 waiting for too many threads.
3299 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
3301 * environment.c: Fix return value check on uname so we can get the
3302 executing version on Solaris operating systems.
3304 2007-03-28 Jb Evain <jbevain@gmail.com>
3306 * class.c (mono_type_get_name_recurse): Complete the
3307 fix for the creation of assembly qualified names for
3308 pointer types. Fixes #81208.
3310 2007-03-27 Dick Porter <dick@ximian.com>
3312 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
3313 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
3317 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
3318 the value of ReleaseMutex().
3320 2007-03-27 Dick Porter <dick@ximian.com>
3322 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
3323 in little-endian order, not network endian, so must be converted
3324 to host endian here. Fixes bug 80593.
3326 2007-03-22 Jb Evain <jbevain@gmail.com>
3328 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
3329 qualified names for pointer types. Fixes #81208.
3331 2007-03-21 Jonathan Chambers <joncham@gmail.com>
3333 * marshal.c: Add support for PreserveSigAttribute.
3335 Code is contributed under MIT/X11 license.
3337 2007-03-14 Zoltan Varga <vargaz@gmail.com>
3339 * process.c: Fix endianness issues. Fixes #81126.
3341 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
3342 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
3344 * image.c (mono_image_lookup_resource): Make this work on big-endian
3345 machines.Change API contract so the caller needs to free the return value.
3347 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
3350 2007-03-14 Martin Baulig <martin@ximian.com>
3352 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
3353 mono_type_get_desc() as well.
3355 2007-03-13 Jonathan Chambers <joncham@gmail.com>
3357 * icall.c: Fix environ access in VS.
3359 2007-03-13 Alp Toker <alp@atoker.com>
3361 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
3362 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
3365 2007-03-12 Zoltan Varga <vargaz@gmail.com>
3367 * reflection.c (mono_reflection_create_dynamic_method): Add support for
3368 circular references among dynamic methods. Fixes #81091.
3370 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
3372 2007-03-09 Martin Baulig <martin@ximian.com>
3374 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
3376 2007-03-09 Jonathan Chambers <joncham@gmail.com>
3378 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
3379 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
3381 Code is contributed under MIT/X11 license.
3383 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
3385 * loader.c: Reapply patch for bug #79424.
3387 2007-03-06 Zoltan Varga <vargaz@gmail.com>
3389 * metadata.c (mono_type_to_unmanaged): Only convert object to
3390 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
3392 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
3394 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
3395 (and incorrectly set) is_reference field from MonoGenericInst.
3397 2007-03-06 Zoltan Varga <vargaz@gmail.com>
3399 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
3402 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
3404 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
3406 2007-03-05 Miguel de Icaza <miguel@novell.com>
3408 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
3409 FileOptions.1 value to mean "temporary", map that to
3410 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
3414 2007-03-03 Marek Habersack <mhabersack@novell.com>
3416 * appdomain.c: implement MS .Net style shadow copying. Copies of
3417 the assemblies are made in a subdirectory of the dynamic base
3418 directory, the assembly names are preserved.
3419 Copy .mdb and .config files along with the assemblies being shadowed.
3421 2007-02-28 Zoltan Varga <vargaz@gmail.com>
3423 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
3424 (emit_marshal_handleref): Ditto.
3426 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
3427 on Visual C++. Fixes #80671.
3429 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
3431 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
3432 for clone operations.
3434 2007-02-28 Zoltan Varga <vargaz@gmail.com>
3436 * marshal.c: Fix warnings.
3438 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
3440 * loader.c: allow case-insensitive matching of the dll name
3441 in dllmap handling when prefixed with "i:".
3443 2007-02-20 Jonathan Chambers <joncham@gmail.com>
3445 * threads.c: Fix #ifdef for dummy_apc function for VS.
3447 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
3449 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
3451 2007-02-19 Massimiliano Mantione <massi@ximian.com>
3452 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
3453 giving precedence to the methods with a fully qualified name
3454 (InterfaceName.MethodName) when building the interface sections
3457 2007-02-16 Dick Porter <dick@ximian.com>
3459 * threadpool.c (append_job): Fix fast-path array handling, so it's
3460 less likely the array will grow exponentially when the load is
3463 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3465 * metadata-internals.h, loader.c: fix dllmap lookup order
3466 for non-function maps, too, and prepare for fallback code.
3468 2007-02-12 Robert Jordan <robertj@gmx.net>
3470 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
3471 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
3472 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
3473 GlobalFree. Fixes a part of bug #77075.
3475 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
3477 * loader.c: implemented typedef parent in field memberref.
3479 2007-02-11 Jonathan Chambers <joncham@gmail.com>
3481 * marshal.c: Fix warnings and remember to call Release on
3484 Code is contributed under MIT/X11 license.
3486 2007-02-10 Miguel de Icaza <miguel@novell.com>
3488 * class-internals.h: Add MonoHandleRef definition, and
3489 handleref_class to mono_defaults.
3491 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
3492 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
3494 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
3495 (do nothing on this stage)
3496 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
3497 (emit_marshal_handleref): New method, used for argument handling
3500 2007-02-08 Jonathan Chambers <joncham@gmail.com>
3502 * class.c (mono_class_setup_parent): Lazily init com types.
3503 * domain.c (mono_init_internal, mono_init_com_types): Lazily
3505 * object.c (mono_remote_class_vtable): Lazily init com types.
3506 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
3507 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
3508 * domain-internals.h: Expose mono_init_com_types.
3509 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
3510 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
3511 Add support for COM Callable Wrapper marshalling.
3512 * marshal.h: Add icall definitions.
3513 * gc.c: Handle freeing of CCWs in finalizer code.
3515 Code is contributed under MIT/X11 license.
3517 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
3519 * reflection.c: changed all the signature encoding code to use
3520 a variable-sized buffer.
3522 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3524 * marshal.c: locking fixes: never take the loader lock
3525 or other runtime locks when holding the marshal lock
3528 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
3530 * marshal.c: make the delegate function pointer mapping
3531 work for the moving GC.
3533 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
3535 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
3538 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3540 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
3543 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
3545 * threadpool.c: made the code moving-GC safe.
3547 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
3549 * assembly.c, boehm-gc.c, class-internals.h, class.c,
3550 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
3551 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
3553 * reflection.c: warning cleanup, some threading and moving GC fixes.
3555 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
3557 * class.c, loader.c: create the needed Set/Get/Address array methods
3558 as well as the .ctors in mono_class_init (), fixes bug #80567.
3560 2007-01-24 Zoltan Varga <vargaz@gmail.com>
3562 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
3563 we doesn't decrease its alignment. Should fix the sparc build.
3565 2007-01-24 Dick Porter <dick@ximian.com>
3568 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3569 Create the returned object if we need to ignore an unsupported
3570 socket option. Fixes a segfault reported by Atsushi.
3572 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3574 * class.c, object.c: restrict GC-tracked fields to
3575 UIntPtr fields used inside corlib, so we provide better
3576 type info to the GC and also allow broken packing as in
3579 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
3581 * sgen-gc.c: removed duplicated function.
3583 2007-01-19 Miguel de Icaza <miguel@novell.com>
3585 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
3586 value that means that the value is not supported, but that we
3587 should not return a failure, but instead report this as a
3588 successful operation.
3590 2007-01-19 Raja R Harinath <rharinath@novell.com>
3592 Fix tests/bug79956.2.il
3593 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
3594 (mono_generic_class_get_class): If the generic definition in an
3595 enum, copy over other fields related to it.
3597 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
3599 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
3600 genericinst enums (bug #79215).
3602 2007-01-17 Massimiliano Mantione <massi@ximian.com>
3603 * class.c: Fix bug 80307.
3605 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
3607 * image.c: if the file table is not present, try to load
3608 all the modules, since we don't have info about them
3609 having or not metadata (bug #80517).
3610 * assembly.c: allow mono_assembly_load_references () to
3611 work for netmodules.
3613 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3615 * image.c, metadata-internals.h, object.c: execute module
3616 cctors when running on the 2 runtime if present (bug #80487).
3618 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
3620 * icall.c: optimized InitializeArray() on bigendian.
3622 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
3624 * icall.c: fix for the broken ARM FPA double format.
3626 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
3628 * icall.c: handle endian issues for r4 and r8 types, too, in
3629 the InitializeArray() icall.
3631 2007-01-15 Miguel de Icaza <miguel@novell.com>
3633 * loader.c (mono_loader_error_prepare_exception): Clear the error
3634 once we have extracted the information from it, do this before we
3635 call into the JIT's class loading mechanisms.
3637 * object.c (mono_class_create_runtime_vtable): Do not clear the
3638 loader error before calling mono_class_get_exception_for_failure
3639 as the loader error is needed inside
3640 mono_class_get_exception_for_failure to throw the error (thinko).
3644 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
3646 * reflection.c: align fields rva data so it's faster to load at
3649 2007-01-12 Raja R Harinath <rharinath@novell.com>
3651 Prepare to simplify GenericMethod handling.
3652 * class-internals.h (mono_method_get_context): New accessor function.
3653 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
3654 rather than directly accessing '->context' field.
3656 * class-internals.h (_MonoGenericParam.method): Move ...
3657 (_MonoGenericContainer): ... here. Add into union with klass field.
3658 * class.c, icall.c, loader.c, metadata.c, reflection.c:
3661 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
3663 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
3664 the wrapper type enum and reduce relocations.
3666 2007-01-12 Raja R Harinath <rharinath@novell.com>
3668 * reflection.c (inflate_mono_method): Reuse method instantiation
3669 from the generic method, if available.
3671 2007-01-11 Jonathan Chambers <joncham@gmail.com>
3673 * marshal.c (emit_marshal_variant): Fix conv_arg
3674 type in last commit, based on whether parameter is byref.
3676 2007-01-11 Jonathan Chambers <joncham@gmail.com>
3678 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
3680 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
3681 MONO_TYPE_OBJECT back for VARIANT support.
3683 2007-01-11 Jonathan Chambers <joncham@gmail.com>
3685 * marshal.c, marshal.h, icall-def.h: Implement
3686 Marshal.ReAllocCoTaskMem.
3688 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
3690 * marshal.c: memory retention fixes: use the proper
3691 image cache for runtime_invoke method lookups.
3693 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
3695 * mempool.c: added code to help debug mempool allocations.
3697 2007-01-11 Dick Porter <dick@ximian.com>
3699 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
3700 support (experimenting with faking it with IP_MTU_DISCOVER for
3701 systems that don't have IP_DONTFRAGMENT.)
3702 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
3705 * icall-def.h: new System.Net.Sockets.Disconnect icall.
3707 * socket-io.h: Add new fields to MonoSocketAsyncResult
3708 corresponding to the new ones in Socket.cs.
3710 2007-01-11 Raja R Harinath <rharinath@novell.com>
3712 Fix IronPython regression mentioned in #80249
3713 * metadata.c (do_mono_metadata_parse_generic_class): Clear
3714 'cached_context' field, since it may have been initialized as a
3715 side-effect of metadata parsing.
3717 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
3718 (_MonoGenericClass.cached_class): Move here and rename from lone
3719 remaining field of ...
3720 (_MonoInflatedGenericClass): ... this. Remove.
3721 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
3724 Fix mcs/tests/test-128.cs regression.
3725 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
3726 2007-01-10 change below.
3727 [MONO_TYPE_OBJECT]: Recurse into array case.
3729 2007-01-11 Raja R Harinath <harinath@gmail.com>
3731 * class-internals.h (mono_get_inflated_generic_class): Remove.
3732 * class.c (mono_get_inflated_generic_class): Remove.
3733 (mono_generic_class_get_class): Rename from
3734 mono_class_create_generic.
3735 (mono_class_from_mono_type) [GENERICINST]: Use it.
3736 * reflection.c, metadata.c: Update to changes. Use
3737 'mono_class_from_mono_type'.
3739 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
3741 * reflection.c: use passed type when encoding an array element
3742 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
3744 2007-01-09 Robert Jordan <robertj@gmx.net>
3746 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
3747 result arguments (someDelegate.EndInvoke (unrelatedAres)).
3750 2007-01-09 Raja R Harinath <rharinath@novell.com>
3752 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
3754 * object.c (set_value): Avoid aliasing between type->data.klass
3755 and type->data.generic_class.
3757 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
3759 2007-01-08 Raja R Harinath <rharinath@novell.com>
3761 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
3762 between type->data.klass and type->data.generic_class.
3764 2007-01-08 Lluis Sanchez <lluis@ximian.com>
3766 * marshal.c: In MS.NET, StringBuilder objects are not copied by
3767 value in out parameters.
3769 2007-01-08 Raja R Harinath <rharinath@novell.com>
3771 Simplify invariant for MonoGenericClass::klass field.
3772 * class.c (mono_class_create_generic): Verify 'klass' is null.
3773 * metadata.c (do_mono_metadata_parse_generic_class): Don't
3774 initialize 'klass' field.
3776 2007-01-05 Raja R Harinath <rharinath@novell.com>
3778 Ongoing work to avoid redundant data and simplify invariants.
3779 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
3780 'generic_class', and change type to a GenericInst.
3781 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
3782 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
3784 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
3786 * class.c : skip io-layer under PLATFORM_WIN32.
3788 2007-01-03 Tor Lillqvist <tml@novell.com>
3790 Fix #80305: In a bundled executable, look in the bundled exe
3791 assembly to determine the runtime version. Add the possibility to
3792 bundle also the machine.config file.
3794 * assembly.c (mono_assembly_open_from_bundle): Make
3795 non-static. Allow being called even if we have no bundled
3796 assemblies, and return NULL right away in that case.
3798 * domain-internals.h: Declare mono_assembly_open_from_bundle()
3801 * domain.c (app_config_parse): Take an assembly exe file name as
3802 parameter instead of a config file name. Check for a bundled
3803 config file for that assembly by calling
3804 mono_config_string_for_assembly_file() (see below) before looking
3805 for one in the file system.
3806 (get_runtimes_from_exe): Corrsponding change to call of
3808 (get_runtimes_from_exe): Check for bundled assembly exe file first
3809 by calling mono_assembly_open_from_bundle(). If no bundled
3810 assembly exe file is found, call mono_image_open() as before to
3811 look it up in the file system.
3813 * mono-config.c: Add variable bundled_machinec_onfig.
3814 (mono_config_string_for_assembly_file): New function.
3815 (mono_config_for_assembly): Move code snippet that looks for a
3816 bundled assembly .config file into the above new function. Call
3818 (mono_register_machine_config, mono_get_machine_config): New
3819 functions to set and retrieve
3821 * assembly.h: Declare mono_register_machine_config().
3823 * mono-config.h: Declare mono_get_machine_config() and
3824 mono_config_string_for_assembly_file().
3826 * icall.c: No declaration of environ necessary on Win32. It is
3827 declared (as a macro expanding to a function call) in stdlib.h.
3828 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
3829 New internal mono function. Returns the value of
3830 mono_get_machine_config() as a Mono string.
3832 * icall-def.h: Add get_bundled_machine_config().
3834 2007-01-04 Raja R Harinath <rharinath@novell.com>
3836 Remove redundant field
3837 * class-internals.h (_MonoGenericContext.container): Remove field.
3838 * loader.c (mono_method_get_signature_full): Don't parse a
3839 "container" for a signature parse when the signature is inflated
3841 (method_from_methodspec): Likewise, for a generic_inst.
3842 * class.c, metadata.c, reflection.c: Update to changes.
3844 2006-01-04 Raja R Harinath <rharinath@novell.com>
3846 * class-internals.h (_MonoGenericClass): Rename 'context' field to
3847 'cached_context', and change semantics -- it starts off NULL, and
3848 is initialized on demand.
3849 * class.c (mono_generic_class_get_context): New accessor to
3850 replace 'context' field accesses.
3851 (mono_class_get_context): New helper.
3852 (*): Update to changes.
3853 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
3855 2007-01-03 Miguel de Icaza <miguel@novell.com>
3857 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
3858 before the memcpy. Fixes Marshal2 regression.
3860 2007-01-02 Jb Evain <jbevain@gmail.com>
3862 * blob.h: add a MONO_TYPE_ENUM definition
3863 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
3864 fix the encoding of arrays of enums in custom attributes.
3868 2007-01-01 Miguel de Icaza <miguel@novell.com>
3870 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
3871 string is null terminated, but only cut the string short if it
3872 overflows the buffer.
3874 (mono_string_to_byvalstr): Also fix this routine. The code here
3875 was not properly terminating a string (it was only terminated
3876 because of the previous catch-all memset).
3878 I left the memset, because I do not know if applications expect
3879 the runtime to clear this region.
3883 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3884 Clear the error before returning to unmanaged code to prevent the
3885 runtime from being confused later on (fixes 80420).
3886 (ves_icall_type_from_name): Always call mono_loader_clear_error
3887 after parsing a type that could have failed.
3888 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
3890 * loader.c (mono_loader_clear_error): Fix indentation.
3892 2006-12-28 Martin Baulig <martin@ximian.com>
3894 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
3896 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
3898 * reflection.c: patch from Rolf Bjarne Kvinge to fix
3899 getting a token for an EnumBuilder.
3901 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
3903 * reflection.c: be more careful in case resource generation
3904 fails to create the data array.
3906 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
3908 * sgen-gc.c: write barrier for clone and fix unregister handles.
3910 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
3912 * reflection.c: some fixes needed in the generics code for the moving GC.
3914 2006-12-22 Robert Jordan <robertj@gmx.net>
3916 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
3917 account. Fixes bug #80299.
3919 2006-12-21 Raja R Harinath <rharinath@novell.com>
3921 Fix WaitHandle usage in delegates.
3922 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
3923 * object.c (mono_wait_handle_new): Use the property set method to
3924 initialize the handle.
3925 (mono_wait_handle_get_handle): New.
3926 * threadpool.c (mono_async_invoke): Use it.
3927 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
3929 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
3931 2006-12-21 Jonathan Chambers <joncham@gmail.com>
3933 * marshal.c (emit_marshal): Call emit_marshal_variant and
3934 emit_marshal_com_interface when applicable.
3935 (emit_marshal_variant, emit_marshal_com_interface): Add
3936 methods for this case and remove if's from emit_marshal_object.
3938 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
3940 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
3942 2006-12-19 Jonathan Chambers <joncham@gmail.com>
3944 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
3945 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
3946 and GlobalFree on Windows. Remove FIXME.
3948 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
3950 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
3951 implementation for managed objects.
3953 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
3955 * object.c: implemented code to be used for checking
3956 that no reference field overlaps with non-references.
3958 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3960 * threadpool.c: fix queue code to be compatible with the
3963 2006-12-18 Miguel de Icaza <miguel@novell.com>
3965 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
3966 in structures by throwing ArgumentNullException.
3968 (emit_marshal_safehandle): Also when they are null parameters.
3970 (emit_marshal_safehandle): Add support for ref
3971 SafeHandles parameters
3973 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3975 * profiler.c: updated to use the mono-dl API instead of
3978 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
3980 * profiler.c: updated to use the mono-dl dynamic loading
3981 API instead of gmodule.
3983 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
3985 * profiler.c: use readlink, older versions of glib don't have
3986 g_file_read_link ().
3988 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3990 * profiler.c: try to detect the path to mono if libc fails to provide
3991 a useful name (bug #80286).
3993 2006-12-16 Raja R Harinath <rharinath@novell.com>
3996 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
3997 instance, use the generic type definition instead.
3998 (ves_icall_Type_GetNestedTypes): Likewise.
3999 * class.c (mono_class_create_generic): Always set the
4000 nested_classes of a generic instance to NULL, even if the generic
4001 type definition has nested types.
4003 2006-12-15 Jonathan Chambers <joncham@gmail.com>
4005 * marshal.c (mono_string_from_bstr): Revert previous Windows change
4008 2006-12-15 Miguel de Icaza <miguel@novell.com>
4010 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
4011 my arguments were in the wrong order. I also fixed the Windows
4012 version which seems to have had the same issue.
4014 (mono_free_bstr): On Unix, this is g_free.
4015 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
4016 conversions (for the tests in corlib to pass).
4018 2006-12-14 Miguel de Icaza <miguel@novell.com>
4020 * marshal.c (emit_ptr_to_object_conv): For now, ignore
4021 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
4022 exception if a ref SafeHandle in a struct has changed).
4024 (emit_struct_conv): Do not perform layout checks for classes
4025 derived from SafeHandle, as those are specially handled.
4027 (emit_object_to_ptr_conv): Add support for
4028 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
4030 (emit_marshal_safehandle): Implement conversion of return values
4031 of safehandles (MARSHAL_ACTION_CONV_RESULT).
4033 * threads.c: WaitHandle now is compiled with two different handles
4034 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
4037 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
4038 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
4039 these routines to cope with both kinds of fields.
4041 2006-12-12 Miguel de Icaza <miguel@novell.com>
4043 * metadata.c (mono_type_to_unmanaged): Handle the case where
4044 type->data.klass is a SafeHandle, and in that case, return the
4045 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
4046 MONO_MARSHAL_CONV_SAFEHANDLE.
4048 2006-12-11 Miguel de Icaza <miguel@novell.com>
4050 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
4051 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
4052 calling emit_marshal_object.
4054 (emit_marshal_safehandle): Implement marshalling of
4055 SafeHandle parameters (no ref support yet).
4057 (MarshalAction): Document the defines as I implement
4058 them for SafeHandle.
4060 (emit_marshal_object): indentation police.
4062 * class-internals.h: Define MonoSafeHandle.
4063 Add safehandle_class to MonoDefaults type.
4065 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
4066 list of classes to check for fields.
4068 * domain.c (mono_init_internal): Add SafeHandle to the list of
4069 mono_defaults loaded.
4071 2006-12-15 Raja R Harinath <rharinath@novell.com>
4074 * reflection.c (mono_reflection_bind_generic_parameters): If the
4075 generic type definition is a type builder, ensure that it is fully
4076 initialized before instantiating it. Kill some dead code.
4078 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
4080 * object.c: clear the loader_error () before loading
4081 more metadata stuff (bug #80258).
4083 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
4085 * icall.c, icall-defs.h: type modifiers icalls for
4086 parameters and properties.
4088 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4090 * object.c, icall.c: fixed warnings.
4092 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4094 * marshal.c: fixed a couple of leaks and coding style in a few places.
4096 2006-12-08 Dick Porter <dick@ximian.com>
4098 * process.c: Cope with NULL ProcessStartInfo arguments on windows
4099 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
4102 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
4104 * process.c: ProcessStartInfo may have only filename set and
4105 arguments can be NULL.
4107 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
4109 * icall.c: fix leak found by Robert Jordan.
4111 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
4113 * marshal.c, marshal.h: generate managed method to access an element
4114 of a multi-dimensional array.
4116 2006-11-30 Paolo Molaro (lupus@ximian.com)
4118 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
4120 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4122 * icall.c: back out GetFields () fix until the serialization code is
4123 fixed to not depend on the incorrect behaviour.
4125 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
4127 * profiler.c: provide defaults if none are set.
4129 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4131 * Makefile.am, attrdefs.h: new public header file with
4132 constants for attributes for use by embedders.
4134 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
4136 * icall.c: GetFields () fix for bug #80064.
4138 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
4140 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
4141 removed long unused icalls.
4143 2006-11-27 Jonathan Chambers <joncham@gmail.com>
4146 (mono_marshal_emit_managed_wrapper): Level of indirection for
4147 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
4148 can be generated without a delegate class.
4149 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
4151 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4153 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4155 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
4158 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4160 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
4161 icall-def.h: added icalls needed by System.GC.
4163 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
4165 * loader.c: ensure the class in catch clauses is handled
4166 correctly for generics methods (fixes bug#79980).
4168 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4170 * monitor.h, monitor.c: added mono_locks_dump () function
4171 to help debug deadlocks involving managed locks.
4173 2006-11-13 Dick Porter <dick@ximian.com>
4175 * file-io.c (get_file_attributes): If the file is a symlink try
4176 and get the stat data for the target, but also add the
4177 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
4178 the specs for the windows symlink support, but will probably have
4179 to be reworked when I have test data from a vista machine. Fixes
4182 2006-11-13 Dick Porter <dick@ximian.com>
4184 * gc.c (mono_domain_finalize):
4185 * marshal.c (mono_delegate_begin_invoke):
4186 * threadpool.c (socket_io_init, mono_thread_pool_init)
4187 (mono_thread_pool_finish):
4188 * monitor.c (mono_monitor_try_enter_internal):
4189 * threads.c (mono_thread_resume, mono_thread_init)
4190 (mono_thread_suspend_all_other_threads)
4191 (mono_thread_execute_interruption):
4192 * appdomain.c (mono_domain_unload): Check for NULL error returns
4193 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
4196 2006-11-11 Miguel de Icaza <miguel@novell.com>
4199 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
4200 Only close the handle if the value of the handle is not
4201 INVALID_HANDLE_VALUE. This just makes the process a bit more
4204 Improvement for #75733, so that we do not run into this problem.
4207 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
4208 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
4209 internal variables. Fixes #79462
4212 2006-11-09 Dick Porter <dick@ximian.com>
4214 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4215 Use poll() not select(). Fixes bug 79397.
4217 2006-11-09 Raja R Harinath <rharinath@novell.com>
4220 * assembly.c (mono_assembly_load_from_full): Check that the given
4221 image has an assembly manifest.
4223 2006-11-09 Ankit Jain <jankit@novell.com>
4225 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
4226 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
4227 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
4229 2006-11-07 Dick Porter <dick@ximian.com>
4231 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4232 Put the old resolver behaviour back for pre-2.0 profiles.
4234 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
4236 * threadpool.c: precise GC and locking fixes.
4238 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
4240 * class.c: don't load types that have an explicit unaligned
4241 managed reference. Provide better info in the TypeLoad exception.
4242 Part of the fix for bug #79744.
4243 * object.c: use the correct check for class type load issues.
4245 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4247 * class.c: enforce alignment of fields with managed references
4248 even when Pack=1 is forced by the user (bug #77788).
4250 2006-11-03 Dick Porter <dick@ximian.com>
4252 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
4253 If the address reverse lookup fails, return it as the hostname
4254 anyway. Fixes bug 79721.
4256 2006-11-03 Dick Porter <dick@ximian.com>
4258 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
4259 Fix build on Windows.
4261 2006-11-02 Dick Porter <dick@ximian.com>
4264 * object-internals.h:
4265 * exception.c (mono_get_exception_thread_interrupted):
4266 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
4269 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
4270 Check for pending Thread.Interrupt.
4272 2006-10-27 Massimiliano Mantione <massi@ximian.com>
4273 * loader.c: Fixed bug 79684.
4275 2006-10-27 Dick Porter <dick@ximian.com>
4277 * file-io.c (get_file_attributes): Force symlinks to directories
4278 to be returned as a regular file. Fixes bug 79733.
4279 2006-10-26 Dick Porter <dick@ximian.com>
4281 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
4282 CreateFile to open a directory then we need to set the
4283 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
4285 2006-10-23 Zoltan Varga <vargaz@gmail.com>
4287 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
4290 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4292 * sgengc.c: small cleanup of timer code.
4294 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
4296 * sgen-gc.c: fix some warnings and start adding support for
4297 complete object removal on domain unload.
4299 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
4301 * assembly.c: build_assembly_name should not consider a version
4302 number without build or revision number invalid. Fixes bug #79715.
4304 2006-10-18 Jonathan Chambers <joncham@gmail.com>
4306 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
4307 call kernel32 function OutputDebugString directly.
4309 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
4311 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
4313 * reflection.c: small cleanup, using a function to insert a MonoString
4316 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
4318 * reflection.c: moving GC fixes.
4320 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
4322 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
4323 all the objects with finalizers belonging to an unloading appdomain.
4325 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
4327 * sgen-gc.c: added ability to allocate even when the nursery is fully
4328 pinned and fixed a couple of bugs.
4330 2006-10-15 Zoltan Varga <vargaz@gmail.com>
4332 * threads.h: Revert the last change for now.
4334 * threads.h (mono_thread_get_pending_exception): Rename this to
4335 mono_thread_get_undeniable_exception ().
4337 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
4339 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
4340 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
4341 when fname does not refer to valid assembly. This result in a more
4342 meaningful error message.
4343 * exception.c: added mono_get_exception_bad_image_format2 which
4344 constructs a BadImageFormatException using the ctor taking a custom
4345 message and the file name. Passing in a NULL msg results in a default
4347 * exception.h: define mono_get_exception_bad_image_format2 function.
4348 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
4349 when file name pointed to an invalid IL image. Use
4350 mono_get_exception_file_not_found2 to construct FileNotFoundException,
4351 as this results in a more meaningful error message.
4353 2006-10-15 Zoltan Varga <vargaz@gmail.com>
4355 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
4358 2006-10-12 Zoltan Varga <vargaz@gmail.com>
4360 * metadata.c (mono_type_size): Change the align parameter to guint32 for
4361 consistency with the other _size functions.
4362 (mono_type_stack_size): Ditto.
4364 * class.c object.c icall.c: Fix warnings caused by the above change.
4366 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
4368 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
4370 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
4372 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
4374 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
4375 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
4376 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
4377 threadpool.h, threads-types.h: mark more internal functions.
4379 2006-10-11 Dick Porter <dick@ximian.com>
4381 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
4382 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
4383 reproduce the bug even before applying the fix.)
4385 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
4387 * reflection.c: allow retrieving attributes for arguments in generic
4388 methods (bug #79241).
4390 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
4392 * debug-mono-symfile.c: properly check fopen () result (found by
4395 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
4397 * reflection.c: make error message clearer and fixed two
4398 issuelets found by Coverity.
4400 2006-10-10 Zoltan Varga <vargaz@gmail.com>
4402 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
4404 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
4406 * object-internals.h, gc-internal.h, profiler-private.h:
4407 mark internal functions.
4409 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
4411 * reflection.c: put data in the text section.
4412 * icall.c: recognize more types in type_from_typename ().
4413 * process.c, marshal.c: added some GC FIXMEs.
4415 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4417 * loader.c: check for NULL before initializing.
4419 2006-10-09 Zoltan Varga <vargaz@gmail.com>
4421 * gc.c (finalizer_thread): Use a non-alertable wait here.
4423 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
4424 until the correct solution is found.
4426 2006-10-06 Zoltan Varga <vargaz@gmail.com>
4428 * reflection.c (mono_module_get_object): Avoid an assert when operating on
4429 modules with no metadata. Fixes #79596.
4431 * image.c (load_metadata_ptrs): Put back the error message when
4432 the #- heap is encountered since the support is not complete yet.
4434 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
4436 * gc.c: do not allow the user to SuppressFinalize () a
4437 delegate because it would leak the trampoline if present.
4439 2006-10-06 Zoltan Varga <vargaz@gmail.com>
4441 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
4444 2006-10-05 Zoltan Varga <vargaz@gmail.com>
4446 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
4448 * metadata.c (mono_metadata_get_param_attrs): Ditto.
4450 * row-indexes.h: Add definitions for *Ptr tables.
4452 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
4454 * metadata.c (mono_metadata_translate_token_index): New helper function to
4455 translate table indexes used in uncompressed metadata.
4456 (mono_metadata_decode_table_row): Ditto.
4457 (mono_metadata_decode_table_row_col): Ditto.
4459 * metadata.c: Add table schema for *Ptr tables.
4461 * class.c loader.c: Use the new helper function to access the affected metadata
4464 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
4467 2006-10-04 Zoltan Varga <vargaz@gmail.com>
4469 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
4470 sequences which can be unbounded in size. Fixes #79583.
4472 2006-10-02 Zoltan Varga <vargaz@gmail.com>
4474 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
4475 static initialization.
4477 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
4479 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
4481 * domain.c (mono_domain_free): Free up type_init_exception_hash.
4483 * object.c (mono_runtime_class_init): Implement correct semantics when a static
4484 ctor fails, i.e. throw the same exception on subsequent accesses.
4486 2006-09-0 Jonathan Chambers <joncham@gmail.com>
4488 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
4489 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
4490 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
4491 Handle marshalling of interfaces and VARIANTs contained in structs.
4493 Code is contributed under MIT/X11 license.
4495 2006-09-30 Zoltan Varga <vargaz@gmail.com>
4497 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
4499 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
4502 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4504 * console-io.c: ignore previous SIGINT handler.
4506 2006-09-27 Zoltan Varga <vargaz@gmail.com>
4508 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
4509 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
4510 #79460, #79461, #79485.
4512 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
4514 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
4517 2006-09-26 Zoltan Varga <vargaz@gmail.com>
4519 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
4520 could be generated from it.
4522 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
4524 * rand.c: fix read loop to correctly handle EINTR.
4526 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4528 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
4529 internal calls are defined to keep methods closer to the declaring
4530 type and allow a significant reduction in runtime relocations and
4533 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
4535 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
4536 exception message to have FileNotFoundException use the default
4537 assembly load error message. Fixes bug #79426.
4538 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
4540 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4542 * threadpool.c: (start_thread_or_queue) use the root domain when
4543 creating the thread instead of the async object one.
4545 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
4547 * class.c, object.c, class-internals.h, reflection.c:
4548 for arrays, store element_size inside MonoClass (speedup
4549 for array object creation).
4551 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
4553 * icall.c: fixed CodeBase to use the file name and not the module
4556 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
4558 * mono-debug.c, mono-debug.h: export find_method as
4559 mono_debug_find_method ().
4561 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
4563 * debug-helpers.c, class-internals.h: added a few functions useful
4564 when debugging under gdb.
4566 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4568 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
4569 characters that need special handling.
4571 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
4573 * mono-config.c: make the os/cpu specification more flexible,
4574 allowing lists and negation.
4576 2006-09-18 Jonathan Chambers <joncham@gmail.com>
4578 * marshal.c: COM Interop fixes. Handle case where method->klass.
4579 is interface. Handle BSTR/MonoString when null. Use CDECL as
4580 calling convention on non-windows platforms. This is for
4581 compatibility with XPCOM and MainWin COM.
4583 Code is contributed under MIT/X11 license.
4586 2006-09-18 Zoltan Varga <vargaz@gmail.com>
4588 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
4589 correctly. Fixes #79217.
4591 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
4593 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
4595 * mono-config.c: allow both an os and cpu attribute for dllmap
4596 and dllentry elemnets to enable a single config file to be used
4597 for multiple architectures.
4599 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
4601 * loader.c: MonoLoaderError was cleared too soon on load failure.
4604 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
4606 * icall.c: use the defining class vtable when accessing a
4607 static field, not a pobblibly derived class.
4609 2006-09-17 Zoltan Varga <vargaz@gmail.com>
4611 * icall.c string-icalls.c: Remove references to unicode.h.
4613 * unicode.h unicode.c Makefile.am: Remove these unused source files.
4615 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
4617 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
4618 indicating the image where custom marshaller types should be looked up.
4619 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
4620 custom marshallers, instead of corlib. Fixes #79425.
4622 2006-09-14 Zoltan Varga <vargaz@gmail.com>
4624 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
4626 2006-09-14 Jonathan Chambers <joncham@gmail.com>
4628 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
4629 Implement Environment.ProcessorCount.
4631 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
4632 Implement Environment.ProcessorCount.
4635 Add Environment.ProcessorCount icall.
4637 Patch by Jason McFall.
4639 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4641 * assembly.c: don't append .exe/.dll when the filename already contains
4642 one of those extensions.
4644 2006-09-12 Martin Baulig <martin@ximian.com>
4646 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
4647 to array interfaces.
4649 2006-09-11 Martin Baulig <martin@ximian.com>
4651 * reflection.c (mono_image_build_metadata): Create the
4652 MethodImpl's after emitting all types and methods, so we don't
4653 need another fixup pass for them.
4655 2006-09-11 Zoltan Varga <vargaz@gmail.com>
4657 * class.c (mono_class_from_name_case): Fix regression introduced by the last
4660 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
4662 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
4665 2006-09-10 Zoltan Varga <vargaz@gmail.com>
4667 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
4668 args is not set. Fixes #78926.
4670 2006-09-08 Zoltan Varga <vargaz@gmail.com>
4672 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
4674 * image.c (load_class_names): Move this to class.c, and rename it to
4675 'mono_image_init_name_cache'.
4676 (load_modules): Fix a warning.
4678 * class.c icall.c image.c: Initialize image->name_cache lazily.
4680 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
4681 on its name using information in the AOT file.
4683 * class.c (mono_class_from_name): Use the new hook function.
4685 2006-09-06 Zoltan Varga <vargaz@gmail.com>
4687 * reflection.c (mono_param_get_objects): Handle enum default parameter values
4690 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
4693 2006-09-06 Martin Baulig <martin@ximian.com>
4695 * icall.c (mono_lookup_internal_call): Small fix.
4697 2006-09-05 Raja R Harinath <rharinath@novell.com>
4699 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
4702 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
4704 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
4705 when --debug is specified.
4707 2006-09-04 Zoltan Varga <vargaz@gmail.com>
4709 * class.c (setup_generic_array_ifaces): Fix a warning.
4711 2006-09-04 Miguel de Icaza <miguel@novell.com>
4713 * Temporarily remove the patch to assemly.c that checks the
4714 assembly versions as it breaks our gacutil.
4716 2006-09-03 Zoltan Varga <vargaz@gmail.com>
4718 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
4720 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
4723 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
4724 created using the default ctor. Fixes #79152.
4725 (mono_string_builder_to_utf16): Ditto.
4727 2006-09-01 Martin Baulig <martin@ximian.com>
4729 Fix handling of the generic array interfaces.
4732 (MonoDefaults): Removed `generic_array_class' and added
4733 `generic_ilist' class.
4736 (mono_bounded_array_class_get): Add the new generic array interfaces.
4737 (setup_generic_array_ifaces): New static method; create vtable
4738 entries for each method in the generic array interfaces.
4741 (select_container): Allow "parent-less" generic methods.
4744 (mono_marshal_get_generic_array_helper): New public method.
4747 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
4748 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
4749 moved the interncall into System.Array.
4751 2006-09-01 Raja R Harinath <rharinath@novell.com>
4753 A few more cases of avoiding work on types with ->byref set.
4754 Has the real fix for #79238
4755 * icall.c (is_generic_parameter): New helper.
4756 (ves_icall_Type_GetGenericParameterPosition): Use it.
4757 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
4758 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
4759 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
4760 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
4762 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
4764 (ves_icall_Type_get_IsGenericInstance): Likewise.
4765 (ves_icall_Type_get_IsGenericType): Likewise.
4767 2006-09-01 Zoltan Varga <vargaz@gmail.com>
4769 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
4772 * mempool.h (mono_mempool_get_allocated): New helper function.
4774 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
4777 * mempool.c: Fix warnings and the calculation of stats.
4779 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
4781 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
4783 * loader.c (mono_get_method_from_token): Update method_count stat.
4785 * class-internals.h (MonoStats): Add some stats.
4787 2006-08-31 Robert Jordan <robertj@gmx.net>
4789 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
4790 with managed variants.
4791 All code is contributed under the MIT/X11 license.
4793 2006-08-31 Zoltan Varga <vargaz@gmail.com>
4795 * reflection.c (reflection_methodbuilder_to_mono_method): Set
4796 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
4798 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
4800 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
4801 with cycles in classes.
4803 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
4805 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
4806 missing a [MarshalAs] directive. Fixes #79203.
4808 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
4809 klass->marshal_info. Fixes #79217.
4811 2006-08-30 Martin Baulig <martin@ximian.com>
4813 Committing a patch from Joachim Ante <joe@otee.dk>:
4814 Add support for binary data symbol stores.
4816 * debug-mono-symfile.c
4817 (mono_debug_open_mono_symbol_file): Renamed into
4818 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
4822 (mono_debug_open_image): Added `raw_contents' and `size' args.
4823 (mono_debug_init_2_memory): New public function.
4825 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
4827 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
4829 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4831 * appdomain.c: implement support for ShadowCopyFiles.
4833 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
4835 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
4836 when value is NULL (and should remove CID #51).
4838 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4840 * image.c: moved 2 functions to ../utils.
4842 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
4844 * gc.c: cope with the target object of a GC handle being NULL
4847 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
4849 * class.c: recursively check parent's explicit implementations
4850 of interface methods (fixes bug #79125).
4852 2006-08-19 Miguel de Icaza <miguel@novell.com>
4854 * filewatcher.c: Avoid warnings when building, do not redefine
4855 constants that are defined.
4859 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4861 * image.c: don't fail when the link points to an absolute path.
4863 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
4865 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
4868 2006-08-17 Miguel de Icaza <miguel@novell.com>
4870 * image.c (full_path): A new method used to obtain the actual path
4871 of an assembly even in the presence of symbolic links.
4873 This is necessary for the case where we are running a binary that
4874 has been GACed, but we are using the "published" path name
4875 ($prefix/mono/1.0/blah.exe) which happens to point to the real
4878 This was the source of the failure for the `xsp' command with the
4879 recent AppDomain changes, as far as the runtime was concerned,
4880 there were two different assemblies: $prefix/mono/1.0/blah.exe and
4881 $prefix/mono/gac/blah/version/blah.exe.
4883 (do_mono_image_open): use full path
4885 2006-08-17 Zoltan Varga <vargaz@gmail.com>
4887 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
4889 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
4891 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
4892 domain_id is supplied. Fix CID #241 and corlib's unit tests.
4894 2006-08-17 Zoltan Varga <vargaz@gmail.com>
4896 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
4897 small structures. Fixes #78990.
4899 2006-08-17 Zoltan Varga <vargaz@gmail.com>
4901 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
4903 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
4905 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4908 * marshal.c: don't load all the assemblies from a domain into newly
4909 created ones. The new domains might have different rules and load
4910 assemblies from different locations. Fixes bug #76757.
4912 Patch by Lluis. Conflicts resolved by Brian Crowell.
4914 2006-08-16 Alp Toker <alp@atoker.com>
4916 * socket-io.c: First half of the fix for #79084.
4917 Set sa_size to the length of the content, not that of the struct.
4918 Don't add NULL suffix to the content, this should be done in
4919 managed code if needed.
4921 2006-08-14 Raja R Harinath <rharinath@novell.com>
4924 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
4925 mono_metadata_parse_type returns NULL.
4927 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
4929 * normalization-tables.h : new file for string normalization data.
4930 * locales.c, locales.h, icall.c :
4931 added load_normalization_resource() for string normalization,
4933 * Makefile.am : added normalization-tables.h to the sources.
4935 2006-08-13 Zoltan Varga <vargaz@gmail.com>
4937 * marshal.c: Add more helper functions to reduce code duplication and use them
4940 2006-08-12 Zoltan Varga <vargaz@gmail.com>
4942 * marshal.c: Fix non-x86 stdcall warnings.
4944 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
4947 2006-08-11 Jonathan Chambers <joncham@gmail.com>
4949 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
4950 type check on multi-dimensional arrays. Fixes #79000.
4952 2006-08-10 Jonathan Chambers <joncham@gmail.com>
4954 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
4955 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
4956 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
4957 * class-internals.h: add is_com_object to class structure.
4958 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
4959 null checks to COM object marshalling. Fix .ctor call on RCW.
4960 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
4962 All code is contributed under the MIT/X11 license.
4964 2006-08-09 Dick Porter <dick@ximian.com>
4966 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
4967 racing mono_monitor_allocator_lock() somewhere, so don't delete
4968 the critical section for now. Found by running and exiting
4971 2006-08-10 Zoltan Varga <vargaz@gmail.com>
4973 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
4974 (ves_icall_System_ComObject_FindInterface): Ditto.
4975 (ves_icall_System_ComObject_CacheInterface): Ditto.
4977 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
4978 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
4980 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4982 * threadpool.c: treat pipes from process asynchronous reads as sockets
4983 when reading from them, so we get select/poll or epoll to wait for
4986 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
4988 * loader.c: Fix a typo (CID #233) in the null check.
4990 2006-08-07 Zoltan Varga <vargaz@gmail.com>
4992 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
4993 Hopefully fixes #78949.
4995 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
4996 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
4997 bytes. Fixes #78972.
4999 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5001 * filewatcher.c: we need to set errno here.
5003 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5005 * filewatcher.c: let Win32Exception get the error value.
5007 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5009 * filewatcher.c: translate errno into win32 errors for Win32Exception
5010 to know what happened.
5012 2006-08-01 Zoltan Varga <vargaz@gmail.com>
5014 * threadpool.c: Fix more warnings.
5016 * assembly.c (search_loaded): Fix warnings.
5018 * threadpool.c (mono_thread_pool_finish): Fix warnings.
5019 (mono_async_invoke): Ditto.
5021 2006-07-28 Jonathan Chambers <joncham@gmail.com>
5023 * object.c (mono_remote_class_vtable): Need to create proxy vtable
5024 entries for __ComObject type in addition to ComImport types.
5025 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
5028 All code is contributed under the MIT/X11 license.
5030 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
5032 * image.c: avoid tentative loading of modulerefs that contain
5033 no metadata (P/Invoke library names).
5035 2006-07-28 Dick Porter <dick@ximian.com>
5037 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
5038 mono_loader_lock() somewhere, so don't delete the critical section
5039 for now. Found by running and exiting monodevelop.
5041 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5043 * filewatcher.c: define the inotify syscalls when we're building on
5044 linux and have sys/syscall.h. The build system might not have support
5045 for inotify but the target system might have it.
5047 2006-07-26 Miguel de Icaza <miguel@novell.com>
5049 * domain.c: Documentation updates.
5051 * loader.c (mono_free_method): Do not release the method
5052 information if we are being profiled, as profilers will use this
5053 information at shut down to present some data to the user.
5055 This is needed so that the profiler does not crash, as the
5056 profiler tends to keep MonoMethods around, and they might become
5057 invalid if we free these.
5059 (mono_get_method_constrained): Return the original CIL stream
5060 method as well, so verification can be performed against it.
5062 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5064 * filewatcher.[ch]: support for inotify file system watcher.
5065 * icall.c: add new internal calls for the inotify file system watcher.
5067 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5069 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
5072 2006-07-20 Dick Porter <dick@ximian.com>
5074 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
5077 2006-07-20 Dick Porter <dick@ximian.com>
5079 * threads.c (start_wrapper): Do the thread cleanup while we still
5080 hold a reference to its object. Fixes bug 78123.
5082 2006-07-18 Kornél Pál <kornelpal@gmail.com>
5084 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
5085 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
5086 "managed-to-managed".
5087 * icall.c: Redirect string constructors that take sbyte* to
5088 ves_icall_System_String_ctor_RedirectToCreateString.
5089 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
5090 to CreateString () methods with matching signature.
5091 * reflection.c: Use original security informations for
5092 MONO_WRAPPER_MANAGED_TO_MANAGED.
5093 * security-manager.c: Use original security informations for
5094 MONO_WRAPPER_MANAGED_TO_MANAGED.
5095 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
5096 that is a placeholder and only its address should be used.
5097 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
5098 that is a placeholder and only its address should be used.
5100 2006-07-15 Jonathan Chambers <joncham@gmail.com>
5102 Begin implementing COM Interop.
5103 * appdomain.c: Increment corlib version.
5104 * class.c: Set ComImport classes' parent to __ComObject.
5105 * loader.c: Mark cominterop methods as such.
5106 * domain.c: Add __ComObject class to MonoDefaults structure.
5107 * image.c: Add 2 hashtables to the image for COM Interop related methods
5108 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
5109 using the mempool allocator
5111 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
5112 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
5113 declaration for mono_metadata_type_dup_mp.
5115 * debug-helpers.c: Added strings for two additional wrapper types
5116 * object.c: Create proxy objects for ComImport classes
5117 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
5118 and added __ComObject class to MonoDefaults structure.
5120 * object-internals.h: Finish MonoRealProxy definition, and add definition of
5121 MonoComInteropProxy and MonoComObject.
5123 * marshal.c: Added support for COM Interop
5124 (signature_cominterop): Converts managed signature to corresponding
5125 unmanaged COM signature.
5126 (cominterop_get_function_pointer): gets unmanaged function pointer via
5128 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
5129 (cominterop_get_method_interface): returns interface type that method is defined on
5130 (mono_mb_emit_cominterop_call): emits native call to function pointer
5132 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
5133 that matches signature of unmanaged function.
5134 (cominterop_get_native_wrapper): wrapper around adjusted method call.
5135 (cominterop_get_invoke): forwards call from proxy to __ComObject
5136 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
5137 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
5138 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
5140 * marshal.h: Added Marshal icall declarations.
5141 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
5142 so we can access them in finalizer
5144 2006-07-14 Dick Porter <dick@ximian.com>
5146 * object.c (mono_type_initialization_cleanup): Fix a race
5147 condition by temporarily commenting out the critical section
5150 2006-07-14 Zoltan Varga <vargaz@gmail.com>
5152 * reflection.c (create_custom_attr): Fix some warnings.
5153 (create_custom_attr_data): Ditto.
5154 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
5155 types. Fixes #78855.
5157 2006-07-11 Zoltan Varga <vargaz@gmail.com>
5159 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
5161 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
5163 2006-07-08 Zoltan Varga <vargaz@gmail.com>
5165 * reflection.c (resolve_object): Add support for DynamicMethod.
5167 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
5168 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
5170 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
5172 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
5173 don't leak GPtrArray's pdata has we have no use (nor free) for it.
5175 2006-07-01 Zoltan Varga <vargaz@gmail.com>
5177 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
5180 2006-06-30 Raja R Harinath <rharinath@novell.com>
5182 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
5183 slightly: remove a shadow local variable.
5185 2006-06-29 Raja R Harinath <rharinath@novell.com>
5187 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
5188 definition that introduces the virtual function slot.
5189 Also fix Coverity #105.
5191 2006-06-29 Zoltan Varga <vargaz@gmail.com>
5193 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
5194 for dynamic assemblies. Fixes #78724.
5196 2006-06-28 Zoltan Varga <vargaz@gmail.com>
5198 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
5201 2006-06-21 Martin Baulig <martin@ximian.com>
5204 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
5207 2006-06-21 Zoltan Varga <vargaz@gmail.com>
5209 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
5211 2006-06-20 Raja R Harinath <rharinath@novell.com>
5213 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
5215 * class.c (mono_class_create_from_typespec): Add 'context' argument.
5216 Inflate result if necessary.
5217 (mono_class_get_full): Remove old version. Rename from
5218 'mono_class_get' and add 'context' argument. Pass it to
5219 ..._create_from_typespec.
5220 (mono_class_get): New. Simple wrapper to mono_class_get_full.
5221 (mono_ldtoken): Revert change below.
5223 2006-06-20 Martin Baulig <martin@ximian.com>
5225 * class.c (mono_ldtoken): Don't pass the generic context to
5226 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
5228 2006-06-15 Zoltan Varga <vargaz@gmail.com>
5230 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
5231 and later freeing it. Fixes #78638.
5233 2006-06-15 Miguel de Icaza <miguel@novell.com>
5235 * icall.c (mono_class_get_throw): Revert over-zealous error
5236 throwing, the caller for mono_class_get_throw will cope with
5237 errors when classes are not properly initialized already.
5239 The code still copes with loader exceptions though.
5241 Fixes the regression in reftype1 and reftype3 from the CAS tests.
5243 2006-06-14 Miguel de Icaza <miguel@novell.com>
5245 Fixes the `make run1' version of RuntimeAbort (to be commited,
5246 source is in Bugzilla).
5248 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
5249 FALSE on class loading failure instead of returning true.
5251 * class.c (mono_class_create_from_typedef): It is possible for
5252 mono_metadata_interfaces_from_typedef_full to fail if a class is
5253 not found, cope with this.
5256 2006-06-14 Dick Porter <dick@ximian.com>
5259 * process.c: Fix a bunch of signed/unsigned warnings from gcc
5262 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
5264 * culture-info-table.h : oops, forgot to make it nsync with r61548.
5266 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
5268 * icall.c: Another fix for building mono in Visual Studio.
5270 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
5272 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
5274 2006-06-09 Martin Baulig <martin@ximian.com>
5276 * debug-mono-symfile.c: Put this back and really fix it this
5277 time. Sorry for all the trouble.
5279 2006-06-08 Zoltan Varga <vargaz@gmail.com>
5281 * icall.c (mono_class_get_throw): Fix a warning.
5282 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
5283 ReflectionTypeLoadException if needed. Fixes #78606.
5285 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
5286 (mono_class_init): Ditto.
5288 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
5289 ref_only exceptions.
5290 (mono_loader_clear_error): Make this work even if there is no error.
5292 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
5294 * object-internals.h marshal.c marshal.h icall.c: Implement method
5295 Marshal.GetComSlotForMethodInfo using internal call.
5297 2006-06-07 Zoltan Varga <vargaz@gmail.com>
5299 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
5300 a function for signalling it.
5302 * class.c (mono_class_from_typeref): Use the new kind of loader error when
5303 a referenced assembly is not found.
5305 * loader.c (mono_loader_error_prepare_exception): Add support for
5306 LOADER_ERROR_ASSEMBLY. Fix formatting.
5308 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
5310 * domain.c appdomain.c class-internals.h marshal.c: Add support
5311 for VARIANT marshalling on windows and increment corlib version
5312 since Variant struct was added.
5314 2006-06-03 Miguel de Icaza <miguel@novell.com>
5316 * debug-mono-symfile.c: Revert Martin's previous patch which broke
5317 stack trace line information:
5319 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
5320 (Martin) when looking up B which is between A and C, return A not C.
5324 Thanks to Alexander Olk for tracking this down.
5326 2006-06-02 Zoltan Varga <vargaz@gmail.com>
5328 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
5330 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
5331 avoid clobbering its value.
5332 (mono_string_to_lpstr): Fix a warning on windows.
5334 2006-05-31 Zoltan Varga <vargaz@gmail.com>
5336 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
5338 * reflection.c loader.c: Removed references to 'dummy' flag.
5340 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
5342 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
5343 it gets GC tracking.
5345 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
5348 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
5350 * marshal.c threadpool.c: Update callers of mono_async_result_new.
5352 * appdomain.c: Bump corlib version.
5354 2006-05-30 Zoltan Varga <vargaz@gmail.com>
5356 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5357 CEE_STIND_REF when working with object references.
5359 2006-05-31 Zoltan Varga <vargaz@gmail.com>
5361 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
5364 2006-05-30 Miguel de Icaza <miguel@novell.com>
5366 * loader.c (method_from_memberref): Fix argument value for
5367 mono_loader_set_error_method_load (I was passing the MonoClass
5368 instead of the class name char *).
5370 2006-05-30 Zoltan Varga <vargaz@gmail.com>
5372 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
5373 CEE_STIND_REF when working with object references.
5375 2006-05-30 Martin Baulig <martin@ximian.com>
5377 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
5378 mono_method_full_name() change and replace the ':' with a '.'
5381 2006-05-30 Martin Baulig <martin@ximian.com>
5383 * debug-mono-symfile.c
5384 (mono_debug_symfile_lookup_location): Fix the algorithm:
5385 when looking up B which is between A and C, return A not C.
5387 2006-05-29 Martin Baulig <martin@ximian.com>
5390 (MonoDebugMethodInfo): Make the typedef public.
5391 (MonoDebugSourceLocation): New public struct.
5394 (mono_debug_source_location_from_address): Removed.
5395 (mono_debug_source_location_from_il_offset): Removed.
5396 (mono_debug_il_offset_from_address): Removed.
5397 (mono_debug_address_from_il_offset): Removed.
5398 (mono_debug_lookup_method): New public function.
5399 (mono_debug_lookup_source_location): New public function; replaces
5400 the old mono_debug_source_location_from_*() functions; see the
5401 inline documentation.
5402 (mono_debug_free_source_location): New public function.
5403 (mono_debug_print_stack_frame): New public function; see the
5404 inline documentation.
5406 * debug-mono-symfile.c
5407 (mono_debug_find_source_location): Renamed into
5408 mono_debug_symfile_lookup_location(); only take a
5409 `MonoDebugMethodInfo *' and an `offset' argument; added inline
5411 (mono_debug_find_method): Renamed into
5412 mono_debug_symfile_lookup_method().
5414 2006-05-27 Zoltan Varga <vargaz@gmail.com>
5416 * assembly.c (mono_assembly_open_full): Dont overwrite the status
5417 returned by mono_image_open_full ().
5419 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
5420 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
5423 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
5426 2006-05-27 Miguel de Icaza <miguel@novell.com>
5428 * class.c (mono_class_from_typeref): handle missing images
5429 earlier, deals with bug #78418. Refactor code;
5431 Fix a warning introduced in my previous commit (some stale code
5432 from before I revisited my patch).
5434 * class.c (mono_class_create_from_typedef): On failure, remove the
5435 class from the MonoImage->class_cache as the class is not
5436 initialized; Fixes the leak pointed out by Paolo.
5438 2006-05-25 Dick Porter <dick@ximian.com>
5440 * threads.c (mono_thread_cleanup): Build fix. Comment out the
5441 DeleteCriticalSections until I figure out which one may still be
5442 sometimes locked when mono_thread_cleanup is called.
5444 2006-05-24 Dick Porter <dick@ximian.com>
5446 * threads.c (mono_thread_cleanup): Move the threading cleanup out
5447 of mono_thread_manage and back into its own function, so it can be
5448 called after the finalizer thread has finished.
5450 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
5452 2006-05-24 Zoltan Varga <vargaz@gmail.com>
5454 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
5457 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
5458 with non-blittable elements.
5459 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
5461 2006-05-24 Martin Baulig <martin@ximian.com>
5463 * mono-debug-debugger.h (MonoDebuggerEvent): Added
5464 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
5466 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
5467 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
5468 `mono_debugger_event_handler' to NULL.
5470 2006-05-24 Martin Baulig <martin@ximian.com>
5472 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
5474 2006-05-24 Martin Baulig <martin@ximian.com>
5476 * mono-debug-debugger.h
5477 (mono_debugger_create_notification_function): Added
5478 `MonoCodeManager *' argument.
5480 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
5482 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
5484 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
5486 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
5487 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
5490 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
5492 * icall.c: precise GC support: objects can't be stored in unmanaged
5493 memory anymore, even if they are kept alive by other references: since
5494 they can move the GC needs to be able to always find them.
5496 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5498 * object.c: precise GC support for static fields. Support
5499 for moving GCs: write barriers and pinned allocation for interned
5502 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
5504 * domain.c, domain-internals.h: precise GC support for the MonoDomain
5507 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5509 * class.c, gc.c: sgen and precise GC updates.
5511 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5513 * marshal.h, marshal.c: added write barrier wrapper and precise type
5516 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
5518 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
5521 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
5523 * reflection.c: precise and sgen GC updates.
5525 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5527 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
5529 2006-05-22 Zoltan Varga <vargaz@gmail.com>
5531 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
5533 2006-05-20 Zoltan Varga <vargaz@gmail.com>
5535 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
5536 MONO_TYPE_OBJECT. Fixes #78462.
5538 2006-05-18 Zoltan Varga <vargaz@gmail.com>
5540 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
5541 and blittable types.
5543 2006-05-17 Miguel de Icaza <miguel@novell.com>
5545 * class.c (mono_class_get_exception_for_failure): Implement parts
5546 of a TODO: if the loader error is set (instead of the class
5547 error), we return a Loader exception that can be properly thrown
5550 This was exposed by some Winforms 2.0 code that I tried to run
5551 (Atsushi pointed me to it).
5553 2006-05-17 Zoltan Varga <vargaz@gmail.com>
5555 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
5556 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
5558 * marshal.c (emit_marshal_vtype): Add limited support for
5559 UnmanagedType.LPStruct. Fixes #78427.
5561 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
5562 Applied a patch from kangaroo to fix #77523.
5564 2006-05-17 Martin Baulig <martin@ximian.com>
5567 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
5568 (debugger_thread_created): Removed.
5569 (debugger_thread_exited): Removed.
5571 2006-05-15 Zoltan Varga <vargaz@gmail.com>
5573 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5575 * object-internals.h (MonoReflectionResource): Sync with managed version.
5577 2006-05-12 Wade Berrier <wberrier@novell.com>
5579 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
5581 2006-05-12 Zoltan Varga <vargaz@gmail.com>
5583 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
5584 functions try to allocate from the image mempool.
5586 2006-05-12 Dick Porter <dick@ximian.com>
5588 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
5590 2006-05-12 Lluis Sanchez <lluis@ximian.com>
5592 * object.c: The FieldGetter and FieldSetter methods require the full
5593 name of the class, not only the name. Fixes bug #78277.
5595 2006-05-11 Miguel de Icaza <miguel@novell.com>
5597 * loader.c (method_from_memberref): Do not pass the NULL klass to
5598 mono_loader_set_error_() methods. Pass the non-NULL value
5601 2006-05-11 Zoltan Varga <vargaz@gmail.com>
5603 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
5604 (mono_assembly_close): Null out assembly->image->references after freeing it.
5606 * image.c (mono_image_close): Free image->references.
5608 * reflection.c (mono_image_basic_init): Fix a small memory leak.
5610 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
5612 * marshal.c: In function mono_mb_add_local don't use the mb pointer
5613 before checking if it's NULL (g_assert).
5615 2006-05-10 Martin Baulig <martin@ximian.com>
5617 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
5618 I thought I already killed that two months ago, but now it somehow reappeared.
5620 2006-05-10 Martin Baulig <martin@ximian.com>
5622 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
5624 2006-05-10 Zoltan Varga <vargaz@gmail.com>
5626 * reflection.c: Allocate memory for dynamically created methods in the image
5629 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
5631 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
5632 don't use the ad pointer before checking if it's NULL (g_assert).
5634 2006-05-09 Zoltan Varga <vargaz@gmail.com>
5636 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
5637 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
5639 * marshal.c: Allocate all signatures from mempools.
5641 * marshal.c: Allocate some more signatures from mempools.
5643 2006-05-09 Miguel de Icaza <miguel@novell.com>
5645 * object.c (mono_load_remote_field): The code used to provide a
5646 temporary variable for returning results if the user did not
5647 provide a result pointer. But our temporary variable was allocted
5650 Fix calling code to always pass a result area. Coverity ID 103.
5652 2006-05-06 Zoltan Varga <vargaz@gmail.com>
5654 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
5655 value, not the old. Fixes #78312.
5656 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
5658 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
5659 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
5662 * assembly.c (mono_assembly_close): Free image->references.
5664 * assembly.c (mono_assembly_names_equal): Fix a warning.
5665 (mono_assemblies_cleanup): Cleanup more global data.
5667 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
5669 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
5670 ptr_cache and image->modules.
5672 * image.c (mono_image_init): Allocate array_cache lazily.
5674 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5676 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
5677 behavior was changed recently and has bad side effects.
5679 2006-05-05 Zoltan Varga <vargaz@gmail.com>
5681 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
5683 * assembly.c (mono_assembly_close): Remove a debug printf.
5685 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
5687 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
5688 to also allow for temporary references between mono_image_open ()/close ().
5690 * domain.c (get_runtimes_from_exe): Add a FIXME.
5692 2006-05-04 Zoltan Varga <vargaz@gmail.com>
5694 * marshal.c: Fix support for dynamic methods.
5696 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
5698 * marshal.c (mono_marshal_cleanup): New cleanup function.
5700 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
5703 * class.c (mono_class_init): Fix leaking class->nested_classes.
5705 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
5707 * image.c (mono_image_init): Initialize the new cashes.
5709 * image.c (mono_image_close): Destroy the new cashes.
5711 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
5713 * mempool.c (mono_mempool_strdup): New helper function.
5715 * class-internals.h: Add prototype for mono_loader_unlock ().
5717 * domain.c (mono_jit_info_table_find): Fix a warning.
5718 (mono_debugger_check_runtime_version): Ditto.
5720 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
5721 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
5722 functions to these modules.
5724 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
5727 * marshal.c (mono_free_bstr): Fix a warning.
5729 * assembly.c (mono_assembly_open_full): Fix another small leak.
5731 * object.c: Fix some unload leaks in the remoting code.
5733 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
5736 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
5738 * reflection.c: Fix some unload leaks in dynamic assemblies.
5740 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
5742 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
5743 * marshal.h: Add BSTR support on Win32
5744 * icall.c: Add BSTR icalls
5745 * metadata.h: Add BSTR enums
5747 2006-04-28 Miguel de Icaza <miguel@novell.com>
5749 Work to catch the crash from #76795 and turn it into an
5750 exception. As I stubbed out pieces of the VisualBasic support,
5751 I found a number of places where the code was failing and I added
5752 checks to those places.
5754 * metadata.c (do_mono_metadata_parse_generic_class): Make this
5755 function return a status code. If we fail to parse the signature
5756 from mono_metadata_parse_generic_inst, return FALSE.
5758 * loader.c (mono_get_method_from_token): If we fail to load the
5759 method (mono_class_get) return NULL.
5761 * (method_from_memberref): Return NULL if we are unable to parse
5762 the method signature
5764 (mono_loader_error_prepare_exception): Since we now use the
5765 loader_error flag internally to stop processing, and obtaining
5766 exceptions that might be thrown will walk this code path the
5767 proper way of going from a MonoLoaderError into a
5768 MonoException was convoluted. This new routine encapsulates the
5769 process of turning the error into an exception and *clearing* the
5772 2006-04-27 Miguel de Icaza <miguel@novell.com>
5774 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
5775 with missing assemblies), and to cope with:
5777 * Missing fieldref from a non-existing assembly.
5778 * Missing methodref from a non-existing assembly.
5780 The first batch of work to address *some* of the issues from 76661.
5782 * object.c (mono_class_create_runtime_vtable): If we fail to
5783 initialize the class raise the exception here.
5785 * metadata.c (mono_class_get_overrides_full): If any methods fail
5786 to load return the failure to the caller.
5788 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
5789 flagging assemblies that failed to load.
5791 Do not crash if we are unable to load the assembly.
5793 (mono_assembly_close): Do nothing with REFERENCE_MISSING
5796 * loader.c (mono_loader_set_error_type_load): Change the
5797 convention to always pass unallocated strings, so we make our own
5798 copies (I know our own code had duplicated strings before, but
5799 this keeps the normal conventions).
5800 (method_from_memberref): Call mono_loader_set_error_method_load
5801 for all possible failures of loading the class.
5802 Remove assert, turn into a loader error.
5804 (mono_loader_error_to_exception): Move this routine from mini
5805 (mini_loader_error_to_exception) there was no need to have that in
5808 * class.c (mono_class_from_typeref): If we were not able to load
5809 the assembly with mono_assembly_load_reference, call the
5810 mono_loader_set_error_type_load to register the problem.
5812 (mono_class_setup_fields): If we fail to load the type from
5813 mono_metadata_parse_type_full, call mono_class_set_failure and
5814 break from the loop.
5816 If class->exception_type is set, we do not layout the fields as
5817 that might crash the runtime, and instead return (from breaking
5818 from the previous loop).
5820 (mono_class_setup_vtable): This now returns a boolean indicating
5821 whether the table was properly setup. The decision is driven by
5822 mono_class_get_overrides_full which might run into non-existing
5825 (mono_class_init): Returns TRUE on success or FALSE if there was a
5826 problem in loading the type (incorrect assemblies, missing
5827 assemblies, methods, etc).
5829 When we call mono_class_setup_fields we also check for a potential
5830 error inside this call (either a class exception or a general
5833 (mono_class_create_from_typedef): If the parent fails to load
5834 (calling mono_class_get_full) return NULL.
5838 calls to mono_metadata_parse_type_full should be checked
5839 everywhere and set the mono_class_set_failure
5840 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
5842 The current patch checks the places where my manually constructed
5843 tests show the errors are showing up, but we should do it
5848 mono_class_init return values should be tested everywhere, like
5849 the previous case this is something that we should audit
5850 everywhere and not only on the cases exposed by the tests I
5853 2006-04-26 Miguel de Icaza <miguel@novell.com>
5855 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
5856 boolean parameter and instead pass the information on `options'
5857 parameter (FileOptions).
5859 * icall.c: Register the new signature for MonoIO.Open.
5861 * debug-helpers.c (dis_one): Trying to understand how coverity
5862 works. Fix Run 5, item 78.
5864 2006-04-26 Dick Porter <dick@ximian.com>
5866 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
5869 2006-04-25 Martin Baulig <martin@ximian.com>
5871 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
5873 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
5874 debugger_thread_created().
5875 (debugger_gc_push_all_stacks): Don't handle the main thread in any
5877 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
5878 (mono_debugger_finalize_threads): New function; undo the effects
5879 of mono_debugger_init_threads().
5880 (mono_debugger_create_all_threads): Removed.
5882 2006-04-24 Zoltan Varga <vargaz@gmail.com>
5884 * image.c (mono_image_close): Tidy up trace messages.
5886 * assembly.c (mono_assembly_close): Ditto.
5888 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
5889 no longer references an already freed assembly. Fixes #78168.
5891 2006-04-21 Dick Porter <dick@ximian.com>
5893 * threads.c (mono_thread_detach): Fix reference counting when
5896 2006-04-21 Zoltan Varga <vargaz@gmail.com>
5898 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
5901 2006-04-19 Zoltan Varga <vargaz@gmail.com>
5903 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
5904 (mono_type_to_stind): Ditto.
5906 * marshal.c: Use the new helper functions to simplify code.
5908 * image.c (mono_image_close): Add some code for help debug assembly unloading
5911 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
5914 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
5915 assembly was already loaded in another appdomain. Fixes #78083.
5917 2006-04-13 Zoltan Varga <vargaz@gmail.com>
5919 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
5920 referenced assemblies.
5921 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
5923 * domain.c (mono_domain_free): Add a trace message.
5925 * appdomain.c (add_assemblies_to_domain): Ditto.
5927 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
5930 2006-04-12 Zoltan Varga <vargaz@gmail.com>
5932 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
5934 2006-04-12 Martin Baulig <martin@ximian.com>
5936 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
5937 `USE_INCLUDED_LIBGC'.
5939 2006-04-12 Zoltan Varga <vargaz@gmail.com>
5941 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
5942 the patch contains ../ and a small directory name later. Hopefully fixes
5945 2006-04-10 Martin Baulig <martin@ximian.com>
5947 Clean up the debugger's thread-handling code.
5949 The debugger's thread-handling code has been moved from
5950 ../mini/debug-debugger.c to threads.c. We now iterate directly
5951 over the `threads' hash, keep track of exiting threads and also
5954 We can now debug XSP and XSP based applications with the debugger.
5956 * object-internals.h (MonoThread): Added `gpointer end_stack'.
5959 (MonoThreadCallbacks): Removed; this was only used by the debugger.
5960 (mono_install_thread_callbacks): Likewise.
5962 * threads.c (mono_thread_callbacks): Removed.
5963 (debugger_thread_created, debugger_thread_exited): New static functions.
5964 (start_wrapper): Call debugger_thread_created().
5965 (thread_cleanup): Call debugger_thread_exited().
5966 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
5967 (mono_debugger_init_threads): New public function.
5968 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
5969 iterate directly over the `threads' hash and also use proper locking.
5971 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
5973 * mono-debug-debugger.h
5974 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
5976 2006-04-10 Zoltan Varga <vargaz@gmail.com>
5978 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
5979 argument type=array. Fixes #78057.
5981 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
5983 * culture-info-table.h : regenerated. Fixed bug #69652.
5985 2006-04-07 Zoltan Varga <vargaz@gmail.com>
5987 * loader.c metadata.c: Reapply a variant r59116.
5989 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
5991 * class.c (mono_class_setup_interface_offsets): New internal function.
5993 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
5994 interfaces too. Fixes #77398.
5996 * reflection.c (encode_cattr_value): Add support for
5997 parameter type=object, argument type=array.
5998 (load_cattr_value): Ditto. Fixes #77916.
6000 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
6001 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
6003 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
6004 a byval char array and CharSet is Ansi.
6006 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
6008 2006-04-06 Zoltan Varga <vargaz@gmail.com>
6010 * metadata.c: Add some locking comments.
6012 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
6014 (mono_metadata_free_method_signature): Don't free the signature itself.
6016 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
6018 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
6019 reference the same MonoImage.
6020 (mono_assembly_load_from_full): Add an assert.
6022 2006-04-05 Zoltan Varga <vargaz@gmail.com>
6024 * image.c (mono_image_close): Don't put the image we are about to free into the
6025 loaded_images_guid_hash.
6027 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
6028 to reduce code duplication.
6030 * marshal.c: Register the native functions called by this module as icalls, to
6031 somewhat centralize the creation of MonoMethodSignature's.
6033 * loader.c (mono_method_signature): Add a cache for method signatures.
6035 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
6036 the parameter attributes of a method.
6037 (mono_metadata_parse_method_signature_full): Refactored the computation of
6038 parameter attributes into a separate function. Also avoid one allocation in
6041 * assembly.c (mono_assembly_close): Ditto.
6043 * image.c (mono_image_close): Log trace messages with INFO level.
6045 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
6047 * image.c reflection.c: Correct reference counting of image modules.
6049 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
6050 of this function from the image mempool.
6052 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
6053 to allow more cached types to be used.
6055 * mono-debug.c (mono_debug_add_method): Appled patch from
6056 David S. Miller <davem@sunset.davemloft.net>: Access
6057 minfo->lexical_blocks[] entry elements using read32().
6059 2006-04-04 Zoltan Varga <vargaz@gmail.com>
6061 * loader.c (mono_free_method): No longer free the method header for non-dynamic
6062 methods as it is allocated from the mempool.
6064 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
6067 * metadata-internals.h: Add comments describing the reference counting scheme
6068 used for MonoImage and MonoAssembly.
6070 * image.c assembly.c reflection.c: Rework reference counting of images and
6071 assemblies so they are freed when the runtime is shut down. Free some
6072 additional memory structures when an image is unloaded.
6074 2006-04-03 Zoltan Varga <vargaz@gmail.com>
6076 * class.c loader.c reflection.c: Allocate more data structures in
6079 2006-03-31 Miguel de Icaza <miguel@novell.com>
6082 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
6083 build on pre glib 2.4 systems.
6085 2006-03-31 Zoltan Varga <vargaz@gmail.com>
6087 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
6089 * icall.c: Fix some warnings.
6091 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
6093 * culture-info-table.h : regenerated.
6095 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
6097 * threads.c, object-internals.h, verify.c: changed the culture caching
6098 code to use a normal MonoArray for storage so the GC can keep track of
6099 them easily. Fixed bits of the cache logic, too and simplified the
6102 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
6104 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
6105 thread for non-Boehm GCs.
6107 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
6109 * domain.c, object.c, domain-internals.h: reduce the amount of memory
6110 needed to keep track of the data for static fields.
6112 2006-03-29 Raja R Harinath <rharinath@novell.com>
6115 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
6116 for interface classes. Use 'num_methods' instead.
6117 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
6118 before using '->vtable_size' field.
6120 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6122 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
6123 doesn't contain managed pointers, so use a normal hashtable.
6125 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6127 * reflection.c, class-internals.h, domain.c: fixed handling of types
6128 used as values for objects in custom attributes (bug #77915):
6130 2006-03-24 Martin Baulig <martin@ximian.com>
6132 * class.c (mono_class_setup_fields): Added support for generic
6133 instances; fixes #77580.
6135 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6137 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
6139 2006-03-24 Dick Porter <dick@ximian.com>
6141 * file-io.c (get_file_attributes): More stat macro breakage.
6144 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
6146 * profiler.c: added the file=filename option in the default profiler
6147 to output the profile data to filename.
6149 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6151 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
6154 2006-03-22 Martin Baulig <martin@ximian.com>
6156 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
6157 allocated `MonoClassField *' in `fb->handle'.
6159 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6161 * class.c, image.c, metadata-internals.h: implemented new mechanism to
6162 allocate interface ID to save memory and allow better ID reuse on
6163 appdomain unload. setup_generic_vtable () removal from Martin.
6165 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6167 * object.h, appdomain.c, domain.c, exception.c, icall.c,
6168 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
6169 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
6170 write barriers for reference stores with managed objects accessed with
6171 C structures in the runtime and in embedding programs.
6173 2006-03-20 Raja R Harinath <rharinath@novell.com>
6175 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
6176 'interface_id' and 'max_interface_id' fields of MonoClasses
6177 representing open generic types.
6179 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
6181 * object.h, object.c, icall.c: added functions to deal with
6182 storing valuetypes that contain references in managed objects.
6183 * reflection.c, string-icalls.c, threads.c, marshal.c: small
6184 fixes and comments around uses of mono_array_addr ().
6186 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
6188 * object.h, icall.c, monitor.c: object.GetHashCode ()
6189 implementation that supports the moving garbage collector.
6191 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6193 * icall.c, threads-types.h, threads.c: implemented finalizer for
6196 2006-03-15 Zoltan Varga <vargaz@gmail.com>
6198 * metadata.c (mono_type_size): Add a fixme.
6199 (mono_type_stack_size): Ditto.
6201 * object-internals.h (MonoReflectionAssemblyBuilder): Added
6202 'type_forwarders' field.
6204 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
6205 attribute from net 2.0.
6207 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
6210 * class.c (mono_class_setup_fields): Fix a warning.
6212 * class.c (mono_class_from_name): Add support for assemblyref entries
6213 in the EXPORTEDTYPE table.
6215 * reflection.c: Add support for handling type forwarders under net 2.0.
6217 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6219 2006-03-14 Zoltan Varga <vargaz@gmail.com>
6221 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
6222 overwriting entries in ModuleBuild->types, also clean up the code
6223 a little. Fixes #77774.
6225 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6227 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
6228 load friend assembly info when present.
6230 2006-03-14 Raja R Harinath <rharinath@novell.com>
6232 Fix crasher on gtest-158.cs.
6233 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
6234 the return value if the MonoClass we want is yet in an
6236 * class.c (mono_class_create_from_typedef): Add an comment
6237 explaining an order dependency between mono_class_setup_parent and
6238 mono_class_setup_mono_type.
6240 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6242 * class.c: documentation updates and events bug fix.
6244 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
6246 * class.c: some cleanup, locking fixes.
6248 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6250 * class.c: fix the generics code to setup nested
6251 type info to the instantiated type (bug #77770).
6253 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6255 * marshal.c: fixed a few type correctness issues.
6257 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6259 * loader.c: the Set/Get/Addrtess array methods should be public.
6261 2006-03-11 Zoltan Varga <vargaz@gmail.com>
6263 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
6265 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
6268 2006-03-10 Zoltan Varga <vargaz@gmail.com>
6270 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
6272 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
6274 * mempool.c (mono_mempool_alloc): Speed this up a bit.
6275 (mono_mempool_alloc0): Ditto.
6277 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6280 (create_object_from_sockaddr): it was allocating 4 extra bytes
6281 for the AF_UNIX data. Fixes bug #77747.
6283 2006-03-09 Zoltan Varga <vargaz@gmail.com>
6285 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
6287 2006-03-09 Dick Porter <dick@ximian.com>
6289 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
6290 Fixes bug 76966 again.
6292 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
6294 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
6296 * appdomain.c: Bumped corlib version to 48 (due to r57532)
6298 2006-03-07 Martin Baulig <martin@ximian.com>
6301 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
6303 2006-03-07 Martin Baulig <martin@ximian.com>
6306 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
6307 regression introduced in r56970; see gtest-252.cs.
6309 * loader.c (mono_get_method_constrained): Correctly handle generic
6310 methods; see gtest-253.cs.
6312 2006-03-04 Zoltan Varga <vargaz@gmail.com>
6314 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
6316 2006-03-04 Martin Baulig <martin@ximian.com>
6318 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
6319 compute the parent type at runtime, just like we're already doing
6323 (mono_reflection_bind_generic_parameters): Don't compute the
6324 parent type anymore.
6326 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
6328 2006-03-04 Martin Baulig <martin@ximian.com>
6330 * mono-debug-debugger.h
6331 (mono_debugger_create_notification_function): Allocate memory at
6332 runtime and return a pointer to it.
6334 2006-03-03 Zoltan Varga <vargaz@gmail.com>
6336 * assembly.c: Fix windows build.
6338 * assembly.c: Fix build.
6340 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
6342 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
6344 2006-03-03 Dick Porter <dick@ximian.com>
6347 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
6348 Check parameters before dereferencing them. Fixes Aaron's part of
6351 2006-03-03 Raja R Harinath <rharinath@novell.com>
6353 Fix performance regression.
6354 * loader.c (find_method_in_class): Add 'from_class' argument.
6355 Rename 'klass' argument to 'in_class'. The signature is compared
6356 against the method in 'in_class', and the corresponding method is
6357 returned from 'from_class'.
6358 (find_method): Walk both 'in_class' and 'from_class' in parallel.
6359 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
6360 type definition and generic instantiation in parallel.
6361 (mono_get_method_constrained): Update to changes.
6363 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6365 * threads.c: make sure the domain is correct, too when doing
6366 mono_thread_attach ().
6368 2006-03-01 Zoltan Varga <vargaz@gmail.com>
6370 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
6371 windows. Fixes #77683.
6373 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6375 * object.h, *: introduced specific way to set elements of an array
6376 of references to be used as write barrier. Still need to audit the
6377 uses of mono_array_addr.
6379 2006-03-01 Miguel de Icaza <miguel@novell.com>
6381 * object-internals.h: New field to cache the assmebly name, patch
6382 from Tambet Ingo (tambet@ximian.com)
6384 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
6386 * decimal.h, class-internals.h, metadata-internals.h,
6387 file-io.h: mark a few function declarations as internal, to
6388 reduce the number of PLT entries.
6390 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6392 * file-io.c: fix typo in warning message.
6394 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
6396 * loader.c: on unix, lookup the "*A" version of a function
6397 if charset is auto as a second option before failing.
6399 2006-02-28 Raja R Harinath <rharinath@novell.com>
6401 * class.h (mono_class_inflate_generic_method): Revert to two
6403 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
6404 (mono_class_inflate_generic_method_full): Add.
6405 * class.c (mono_class_inflate_generic_method_full): Rename from
6406 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
6407 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
6408 * loader.c, reflection.c: Update to changes.
6410 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6412 * icall.c: const fixes and small improvements.
6414 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6416 * threadpool.c: for asynchronous connect(), enable the same workaround
6417 for BSD 6 as for the Mac. Fixes bug #77637.
6419 2006-02-24 Zoltan Varga <vargaz@gmail.com>
6421 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
6422 formatted classes. Fixes #77524.
6424 2006-02-24 Raja R Harinath <rharinath@novell.com>
6426 * class.c (inflate_generic_type): Add a couple more
6427 micro-optimizations.
6428 (inflate_generic_context): Don't use the 'gmethod' from
6430 (mono_class_inflate_generic_method): If the method has generic
6431 parameters, but the passed-in context doesn't have a 'gmethod',
6432 create one. Use the possibly simplified generic instantiation
6433 from the declaring class instead of the one passed in.
6435 2006-02-24 Raja R Harinath <harinath@gmail.com>
6437 Make generic method signature and method header handling lazy.
6438 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
6439 (inflate_generic_header): Likewise.
6440 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
6441 parameter to avoid inflating types.
6442 (mono_get_inflated_method): Empty out.
6443 * class.h (mono_class_inflate_generic_method): Update to changes.
6444 * loader.c (mono_get_method_from_token): Don't parse signature for
6445 generic methods, nor methods of generic classes.
6446 (mono_method_signature): Rename from 'mono_method_signature'.
6447 Inflate signature on demand.
6448 (mono_method_get_header): Inflate method header on demand.
6449 * reflection.c: Update to changes.
6451 2006-02-23 Raja R Harinath <rharinath@novell.com>
6453 * metadata.c (mono_metadata_inflate_generic_inst): If the
6454 instantiation is closed, don't bother expanding it in the new
6456 * class.c (inflate_generic_class): If the generic instantiation
6457 doesn't change after inflation, return the argument itself.
6458 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
6460 (inflate_generic_context): If neither the generic class nor the
6461 generic method instantiations change, return the original context.
6462 * reflection.c (mono_method_get_object): Do
6463 'mono_get_inflated_method' before accessing the ->klass field.
6464 (inflate_mono_method): Don't create a MonoGenericMethod unless
6466 (inflate_method): Don't pass a constructed type as the declaring
6467 type of a methodbuilder.
6469 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
6471 * object.c: fix memory overwrite.
6473 2006-02-22 Dick Porter <dick@ximian.com>
6475 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
6476 it doesn't work any more.
6477 (mono_threads_request_thread_dump): Fix unused variable warnings.
6479 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6481 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
6482 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
6483 the public header file.
6485 2006-02-21 Zoltan Varga <vargaz@gmail.com>
6487 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
6489 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6491 * class-internals.h, object.c: reduce the size of MonoVTable
6492 and store the interface_offsets array at negative offsets.
6494 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6496 * metadata.c: tweak table descriptors data structures to reduce
6497 size and runtime relocations.
6499 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6501 * marshal.c: fix some types and opcodes to be type-safe
6502 in marshaling wrappers.
6504 2006-02-21 Ankit Jain <jankit@novell.com>
6506 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
6508 2006-02-21 Raja R Harinath <rharinath@novell.com>
6510 * metadata.c (get_constraints): Relax debugging checks for monodis.
6512 2006-02-21 Ankit Jain <jankit@novell.com>
6514 * metadata.c (mono_metadata_load_generic_params): Move the code
6515 checking for ambiguous generic params from here to mono/dis/get.c
6516 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
6518 2006-02-21 Raja R Harinath <harinath@gmail.com>
6520 Fix assertion triggered when compiling nemerle.
6521 * class.c (mono_get_shared_generic_inst): Rename from
6522 get_shared_inst and make non-static.
6523 * loader.c (mono_get_shared_generic_method): New. Used to create
6524 the MonoGenericContext-equivalent of a MonoGenericContainer.
6525 (mono_get_method_from_token): Initialize the 'context' field of
6526 the created MonoGenericContainer.
6527 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
6528 * metadata.c (get_constraints): Add sanity check.
6529 * class-internals.h: Add new internal methods.
6531 * reflection.c (verify_safe_for_managed_space): New sanity check.
6532 Currently checks that owner-less generic parameters aren't allowed
6534 (mono_type_get_object): Use it.
6535 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
6536 that are now in mono_type_get_object.
6537 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
6539 2006-02-19 Raja R Harinath <harinath@gmail.com>
6541 * metadata.c (mono_type_create_from_typespec): Rename from
6542 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
6543 argument and caching of types in the generic container.
6544 (unwrap_arrays, find_generic_param): Remove.
6545 * metadata-internals.h: Update.
6546 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
6548 2006-02-18 Zoltan Varga <vargaz@gmail.com>
6550 * class.c (mono_class_get_exception_for_failure): Fix a warning.
6552 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
6553 return values. Fixes #77581.
6555 * class.c (mono_fnptr_class_get): Switch name and name_space.
6557 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
6558 classes and add support for [In, Out] attributes.
6559 (mono_marshal_free_asany): Ditto. Fixes #77524.
6561 2006-02-18 Raja R Harinath <harinath@gmail.com>
6563 * class.c (mono_class_from_generic_parameter): Make more robust to
6564 incomplete MonoGenericContainers from monodis.
6566 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6568 * class-internals.h: added some more exception types.
6569 * class.c, metadata.c: added a few checks to handle missing
6572 2006-02-17 Raja R Harinath <rharinath@novell.com>
6574 Use owner-less generic-params some more.
6575 * class.c (my_mono_class_from_generic_parameter): Remove.
6576 (mono_class_from_generic_parameter): Handle null image,
6577 param->name and param->owner.
6578 (mono_class_from_mono_type): Update.
6579 (mono_class_create_from_typespec): Remove 'container' parameter.
6580 If that parameter is non-null, the result is always inflated by
6581 'mono_class_get_full' anyway.
6582 (mono_class_get): Rename from _mono_class_get. Remove 'container'
6584 (mono_class_get_full): Update.
6586 * class.c (inflate_generic_type) [GENERICINST]: If the generic
6587 instance is not open, don't bother inflating.
6588 (mono_class_setup_fields): Hoist some loop-invariants. Don't
6589 parse metadata for inflated classes.
6590 (_mono_class_get): Change GenericContext* parameter to
6592 (mono_class_create_from_typespec): Likewise. Simplify, and
6593 implement trivially. All the cases are handled in
6594 mono_class_from_mono_type. Don't inflate returned class.
6595 (mono_class_get_full): Delegate GENERICINST optimization to
6596 inflate_generic_type.
6597 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
6599 2006-02-16 Dick Porter <dick@ximian.com>
6601 * socket-io.c (create_object_from_sockaddr): Fix typo.
6602 (create_sockaddr_from_object): Check array lengths before
6603 potentially accessing items off the end.
6604 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
6605 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
6606 (ves_icall_System_Net_Sockets_Socket_Send_internal)
6607 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
6608 length checks to avoid wraparound overflows.
6609 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
6610 contents of the array of sockets
6611 (hostent_to_IPHostEntry2)
6612 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
6613 Check return value of inet_ntop ().
6614 (addrinfo_to_IPHostEntry): Fix typo
6616 2006-02-16 Raja R Harinath <rharinath@novell.com>
6618 Type metadata parsing doesn't use generic-instantiation information.
6619 * metadata.c (mono_metadata_parse_array_full): Change
6620 MonoGenericContext* parameter to MonoGenericContainer*.
6621 (mono_metadata_parse_type_full): Likewise.
6622 (mono_type_create_from_typespec_full): Likewise.
6623 (mono_metadata_parse_mh_full): Likewise.
6624 (mono_metadata_parse_generic_inst): Likewise.
6625 (do_mono_metadata_parse_generic_class): Likewise.
6626 (do_mono_metadata_parse_type): Likewise.
6627 * metadata-internals.h: Update to changes.
6628 * class.c (mono_class_find_enum_basetype): Likewise.
6629 (mono_class_setup_fields): Likewise.
6630 (mono_class_create_from_typespec): Likewise.
6631 * loader.c (method_from_methodspec): Likewise.
6632 (mono_get_method_from_token): Likewise.
6633 (mono_method_get_header): Likewise.
6635 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6637 * marshal.c: handle additional GENERICINST case (patch from
6638 Thong Nguyen <tum@veridicus.com>).
6639 Fix a few cases where LDIND_I/STIND_I was used for references.
6641 2006-02-16 Raja R Harinath <rharinath@novell.com>
6643 * reflection.c (mono_reflection_get_token): Remove unused variable.
6645 2006-02-16 Martin Baulig <martin@ximian.com>
6647 * reflection.c (mono_reflection_get_token): Add support for fields
6648 in instantiated generic types.
6651 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
6653 2006-02-15 Martin Baulig <martin@ximian.com>
6656 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
6657 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
6658 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
6659 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
6661 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
6663 * class.c, metadata.c, metadata.h, object.c, icall.c,
6664 marshal.c: changed mono_type_get_underlying_type () to do
6665 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
6666 Fixed handling of instantiated generic valuetypes (bug #75479).
6668 2006-02-15 Raja R Harinath <rharinath@novell.com>
6670 * metadata.c (mono_metadata_decode_signed_value): Simplify.
6671 Delegate to mono_metadata_decode_value, and work on the returned value.
6673 * icall.c (ves_icall_MonoType_GetGenericArguments):
6674 Add consistency check here too.
6676 2006-02-15 Ankit Jain <jankit@novell.com>
6678 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
6681 2006-02-15 Ankit Jain <jankit@novell.com>
6683 * metadata.c (mono_metadata_decode_signed_value): New function to decode
6684 signed values, used only for representing lower bounds of arrays.
6685 (mono_metadata_parse_array_full): Use new
6686 mono_metadata_decode_signed_value to decode lower bounds.
6688 2006-02-14 Martin Baulig <martin@ximian.com>
6691 (mono_reflection_get_token): Support "MonoGenericMethod" and
6692 "MonoGenericCMethod" and allow generic instances / methods.
6694 2006-02-11 Zoltan Varga <vargaz@gmail.com>
6696 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
6697 to obtain the terminal size using an ioctl.
6699 * object.c (mono_nullable_init): Revert this as nullable reference
6700 types are not valid.
6701 (mono_nullable_box): Ditto.
6703 2006-02-09 Dick Porter <dick@ximian.com>
6705 * threads.c (mono_thread_detach): Drop a reference to the thread
6708 2006-02-09 Zoltan Varga <vargaz@gmail.com>
6710 * object.c (mono_nullable_init): Handle nullable reference types.
6711 (mono_nullable_box): Ditto. Fixes #77446.
6713 2006-02-07 Martin Baulig <martin@ximian.com>
6715 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
6717 2006-02-07 Ankit Jain <jankit@novell.com>
6719 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
6720 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
6721 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
6722 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
6723 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
6724 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
6726 2006-02-02 Zoltan Varga <vargaz@gmail.com>
6728 * class.c (mono_class_create_generic): Set type_token as well.
6730 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
6733 2006-02-02 Martin Baulig <martin@ximian.com>
6735 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
6736 has never been used so far.
6738 2006-02-02 Martin Baulig <martin@ximian.com>
6740 * mono-debug-debugger.h: Changed comment at the top of this file;
6741 the header is not installed, but it's safe to #include it from
6744 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
6745 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
6747 2006-02-02 Martin Baulig <martin@ximian.com>
6750 (MonoSymbolTable): Removed the `metadata_info' field.
6753 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
6755 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
6756 (mono_debugger_add_builtin_types): Removed.
6757 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
6758 (mono_debugger_create_notification_function): We now operate on a
6759 pre-allocated area; take a `gpointer' and return `void'.
6761 * mono-debug-debugger.c
6762 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
6763 (mono_debugger_add_builtin_types): Removed.
6765 2006-02-02 Martin Baulig <martin@ximian.com>
6767 * threads.c (mono_debugger_create_all_threads): New public method.
6769 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
6771 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
6772 breaks on several platforms.
6774 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
6776 * assembly.c: the VS.NET build doesn't supply default values for
6777 MONO_ASSEMBLIES and MONO_CFG_DIR.
6779 2006-02-01 Zoltan Varga <vargaz@gmail.com>
6781 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
6784 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
6786 * loader.c (method_from_memberref): Fix a warning.
6788 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
6790 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
6791 with explicit layout. Fixes #77433.
6793 2006-01-31 Zoltan Varga <vargaz@gmail.com>
6795 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
6796 max_interface_id is initialized before using it. Fixes #77398.
6797 (ves_icall_Type_GetInterfaces): Ditto.
6799 2006-01-30 Raja R Harinath <rharinath@novell.com>
6801 * metadata.c (mono_metadata_parse_method_signature_full): Don't
6802 allocate memory for parameter attributes when parsing memberref
6804 * loader.c (mono_loader_set_error_method_load): Don't warn.
6805 (method_from_memberref): Ensure MissingMethodException gets thrown
6806 if method is not found. Make warning more informative.
6808 2006-01-29 Raja R Harinath <harinath@gmail.com>
6811 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
6812 return true if is byref.
6813 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
6814 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
6815 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
6817 2006-01-27 Raja R Harinath <rharinath@novell.com>
6819 Fix tests/find-method.2.il
6820 * loader.c (find_method, find_method_in_class): Remove is_inflated
6821 argument. Revert 2006-01-18 change.
6822 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
6823 is generic, search for method in its generic definition.
6824 * class.c (mono_class_setup_vtable_general): Print generic
6825 arguments of generic types in debugging printf.
6827 2006-01-26 Zoltan Varga <vargaz@gmail.com>
6829 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
6831 * threads.c (mono_threads_request_thread_dump): New helper function.
6833 2006-01-25 Raja R Harinath <rharinath@novell.com>
6835 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
6837 2006-01-25 Ankit Jain <jankit@novell.com>
6839 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
6840 move definition to ..
6841 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
6843 2006-01-25 Ankit Jain <jankit@novell.com>
6844 Raja R Harinath <rharinath@novell.com>
6846 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
6847 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
6850 2006-01-25 Martin Baulig <martin@ximian.com>
6852 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
6853 `MonoDebuggerThread' into debug-debugger.c.
6855 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6857 * profiler.c: fix printing of data.
6859 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
6861 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
6862 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
6864 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
6866 * object.c: fix deadlock related to string interning.
6868 2006-01-23 Martin Baulig <martin@ximian.com>
6870 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
6872 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
6874 2006-01-23 Martin Baulig <martin@ximian.com>
6876 * mono-debug.h: Moved the prototypes of some functions which are
6877 used by the JIT here from mono-debug-debugger.h.
6879 2006-01-21 Martin Baulig <martin@ximian.com>
6881 * Makefile.am: Don't install mono-debug-debugger.h.
6883 2006-01-21 Martin Baulig <martin@ximian.com>
6885 * mono-debug-debugger.h: Enforce the private status of this header
6886 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
6887 Moved some stuff from mono-debugger-jit-wrapper.h here.
6889 2006-01-20 Raja R Harinath <rharinath@novell.com>
6891 * class.c (mono_class_from_typeref): Add a sanity test to help
6892 catch lack of assembly load/search hooks.
6894 2006-01-19 Zoltan Varga <vargaz@gmail.com>
6896 * marshal.c (emit_struct_conv): Relax the fields with same offset
6897 check even more. Fixes #77230.
6899 2006-01-18 Martin Baulig <martin@ximian.com>
6901 * loader.c (find_method_in_class): Added `gboolean is_inflated'
6902 argument; if false, we compare the uninstantiated signatures.
6903 (method_from_memberref): Compare the uninstantiated signatures;
6906 2006-01-18 Robert Jordan <robertj@gmx.net>
6908 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
6909 Clear the weak link. Fixes bug #77170.
6911 * gc.c (mono_gchandle_free):
6912 Reflect *-gc.c changes (tiny optimization).
6914 2006-01-18 Zoltan Varga <vargaz@gmail.com>
6916 * metadata.c (mono_metadata_signature_dup): Applied patch from
6917 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
6920 2006-01-17 Zoltan Varga <vargaz@gmail.com>
6922 * marshal.c (emit_struct_conv): Allow fields with the same offset when
6923 marshalling from native to managed code. Fixes #77230.
6925 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6927 * threadpool.c: fix problem (Mac only) when more than one asynchronous
6928 connect. Fixes bug #77020.
6930 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6932 * class.c: fixed id assignement for nested interfaces (bug #77275).
6933 Added also better info for --print-vtable debugging.
6935 2006-01-12 Martin Baulig <martin@ximian.com>
6937 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
6938 interfaces on-the-fly; fixes #76625.
6941 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
6942 don't need that anymore.
6944 2006-01-12 Miguel de Icaza <miguel@novell.com>
6947 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
6948 To avoid initing the nested_classes when not needed I turned the
6949 PeerCredData as a toplevel internal class, as it has to be shared
6952 Fixes the CASA issue.
6954 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
6956 * domain.c: Accessors for MonoJitInfo
6958 * profiler-private.h: Add jitinfo to the end jit hook
6960 * profiler.[ch]: Define new hooks, called after jitting which give
6961 the MonoJitInfo that was compiled
6963 2006-01-10 Martin Baulig <martin@ximian.com>
6965 * class.c (mono_class_setup_events): Add support for generic
6966 classes; fixes #76440.
6968 2006-01-06 Raja R Harinath <rharinath@novell.com>
6971 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
6972 on passed-in method.
6974 2006-01-03 Zoltan Varga <vargaz@gmail.com>
6976 * object.c (mono_runtime_invoke_array): Add Nullable support.
6978 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
6980 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
6982 * file-io.c: Don't consider sockets as directory and avoid an endless
6983 loop. Fix bug #76966.
6985 2006-01-03 Zoltan Varga <vargaz@gmail.com>
6987 * object.c (mono_nullable_init): New helper function.
6988 (mono_nullable_box): Ditto.
6990 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
6992 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
6994 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
6996 2006-01-02 Zoltan Varga <vargaz@gmail.com>
6998 * class.c (mono_class_is_assignable_from): Make T assignable to
7001 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
7003 * appdomain.c: Bump corlib version to 46.
7004 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
7005 serialization purpose) and changed ves_icall_System_Reflection_
7006 Assembly_get_code_base signature to accept a boolean (to escape, or
7007 not, the assembly code base).
7009 2005-12-23 Dick Porter <dick@ximian.com>
7013 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
7014 CreateEvent icall now returns "created" boolean parameter.
7016 2005-12-22 Zoltan Varga <vargaz@gmail.com>
7018 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
7021 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
7022 when attr_klass is an interface. Fixes #77045.
7024 2005-12-20 Zoltan Varga <vargaz@gmail.com>
7026 * marshal.c (emit_struct_conv): Fix previous patch.
7028 * marshal.c (emit_struct_conv): Add a check for fields with the same
7031 2005-12-20 Raja R Harinath <rharinath@novell.com>
7033 Fix regression in Mono.C5.
7034 * class.c (mono_class_create_generic): If 'klass' is an interface
7035 set up the interface offsets.
7036 (mono_class_is_assignable_from): Don't throw away generic arguments.
7038 2005-12-19 Raja R Harinath <rharinath@novell.com>
7040 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
7043 2005-12-15 Raja R Harinath <rharinath@novell.com>
7045 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
7047 (do_mono_metadata_parse_generic_class): Don't pass the current
7048 generic context when parsing the type being instantiated: it
7049 cannot use it, anyway.
7051 * loader.c (method_from_memberref): Don't inflate a signature if
7052 it doesn't contain any type parameters.
7054 2005-12-15 Zoltan Varga <vargaz@gmail.com>
7056 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
7058 2005-12-14 Martin Baulig <martin@ximian.com>
7061 (mono_type_get_name_recurse): Don't return null for type
7062 parameters and open generic classes.
7063 (mono_class_setup_methods): Don't exclude generic instances.
7064 (mono_get_unique_iid): Use different IDs for different
7065 instantiations of the same generic type.
7066 (mono_class_setup_vtable): Only use setup_generic_vtable() for
7067 open generic instances; create a normal vtable for closed generic
7069 (mono_class_setup_vtable_general): We're now also called for
7070 closed generic instances.
7073 (mono_reflection_bind_generic_parameters): Correctly use
7074 mono_metadata_lookup_generic_inst() everywhere.
7076 2005-12-14 Zoltan Varga <vargaz@gmail.com>
7078 * object.c (mono_class_create_runtime_vtable): Call
7079 mono_class_setup_vtable ().
7081 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
7083 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
7086 * loader.c (mono_loader_set_error_type_load): Print the type load
7087 warnings to the console so they are more visible to the user.
7088 (mono_loader_set_error_method_load): Ditto.
7090 * reflection.c (ensure_runtime_vtable): Revert the last change as it
7093 * reflection.c (ensure_runtime_vtable): Fix build.
7095 * reflection.c (ensure_runtime_vtable): Disable an optimization which
7096 doesn't work in all cases.
7098 2005-12-13 Zoltan Varga <vargaz@gmail.com>
7100 * object.c (mono_array_new_full): Treat a single dimensional array
7101 with 0 lower bounds as an szarray. Fixes #76973.
7103 * reflection.c (custom_attr_visible): Really fix this.
7105 2005-12-12 Zoltan Varga <vargaz@gmail.com>
7107 * reflection.c (custom_attr_visible): Allow nested public attributes
7110 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
7113 2005-12-12 Raja R Harinath <harinath@gmail.com>
7115 * class.c (set_generic_param_owner): Delete.
7116 (mono_class_create_from_typedef): Don't set ->owner field of
7117 generic parameters to "param containers" of enclosing classes.
7118 * reflection.c (mono_reflection_initialize_generic_parameter):
7121 2005-12-11 Zoltan Varga <vargaz@gmail.com>
7123 * reflection.c (custom_attr_visible): Fix build.
7125 2005-12-10 Zoltan Varga <vargaz@gmail.com>
7127 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
7130 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
7131 handling of null parameter defaults.
7133 2005-12-09 Raja R Harinath <rharinath@novell.com>
7135 * class.c (mono_class_from_generic_parameter): Don't set
7136 klass->generic_container.
7137 (my_mono_class_from_generic_parameter): Likewise.
7139 2005-12-07 Zoltan Varga <vargaz@gmail.com>
7141 * reflection.c (load_public_key): Fix a warning.
7142 (method_encode_code): Fix unaligned accesses.
7144 2005-12-07 Martin Baulig <martin@ximian.com>
7146 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
7149 (write_generic_param_entry): Encode our custom attrs.
7151 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
7153 2005-12-07 Martin Baulig <martin@ximian.com>
7155 * reflection.c (encode_new_constraint): Removed; we don't use the
7156 `NewConstraintAttribute' anymore.
7158 2005-12-06 Zoltan Varga <vargaz@gmail.com>
7160 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
7161 not fire a TypeResolve event when Assembly.GetType () is called.
7163 2005-12-05 Ben Maurer <bmaurer@ximian.com>
7165 Beginning of support for nullable types in the runtime. Parts of
7166 this patch are from Martin.
7168 * appdomain.c (MONO_CORLIB_VERSION): Bump
7170 * domain.c (mono_init_internal): get the nullable type
7172 * class.c (mono_class_is_nullable): New method
7173 (mono_class_get_nullable_param): New mehod
7174 (mono_class_create_generic): In types T? set cast_class to T
7176 * class-internals.h (MonoDefaults): new nullable default class
7177 (mono_class_get_nullable_param, mono_class_get_nullable_param):
7180 2005-12-05 Raja R Harinath <rharinath@novell.com>
7182 * metadata.c (select_container): New. Refactor code to select the
7183 appropriate GenericContainer given the type of generic parameter
7185 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
7186 not a MonoGenericContext. Use select_container. Update parameters.
7187 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
7189 (unwrap_arrays): Remove duplicate tests.
7190 (find_generic_param): Rename from 'has_same_context'. Now walks a
7191 generic instantiated class to find any arguments that are generic
7193 (mono_type_create_from_typespec_full): Use find_generic_param to
7194 avoid evicting some generic instantiations from the typespec
7197 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
7199 * reflection.c: fixed writing of doubles on ARM FPA.
7201 2005-12-02 Robert Jordan <robertj@gmx.net>
7203 * icall.c: Fixed EventInfo.ReflectedType (#76829).
7205 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7207 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
7208 least on SUSE 10 they are not the same (on debian, they are just the
7211 2005-12-01 Raja R Harinath <rharinath@novell.com>
7213 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
7214 DeclaringType for VARs and MVARs.
7215 * class.c (set_generic_param_owner): Fix initialization of owner
7218 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7220 * icall.c: fixed Enum.ToObject() to correctly convert the values.
7222 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7224 * threadpool.c: workaround for a bug that shows up on the Mac:
7225 select()+connect() on a blocking socket is not like it should
7226 be, so we proceed to connect() in that case, wasting the I/O
7227 threadpool thread until connect succeedes. Fixes bug #75436.
7229 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7231 * threadpool.c: fix typo when setting file descriptor states.
7233 2005-11-28 Raja R Harinath <rharinath@novell.com>
7235 * class-internals.h (MonoGenericContainer.is_signature): Remove.
7236 * metadata.c (mono_metadata_parse_method_signature_full): Don't
7237 create a temporary signature container.
7238 (mono_metadata_parse_generic_param): Update to changes.
7239 (mono_type_create_from_typespec_full): Update to changes.
7240 * loader.c (method_from_memberref): Don't use a
7241 MonoGenericContainer while parsing a memberref signature.
7242 (method_from_methodspec): Remove dead-store of the 'container'
7243 variable. It's overwritten before use.
7245 * metadata.c (mono_type_create_from_typespec_full): Make debugging
7247 (mono_metadata_parse_generic_param): Likewise.
7248 * loader.c (find_method_in_class): Does not need a
7249 MonoGenericContainer. Use 'mono_method_signature' rather than
7250 'mono_method_signature_full'.
7251 (find_method, mono_get_method_constrained, method_from_memberref):
7254 * metadata.c (mono_type_create_from_typespec_full): Ensure that
7255 owner-less generic-parameters are never evicted from the typespec
7258 * loader.c (method_from_memberref): Don't use the current context
7259 when parsing signatures.
7260 (method_from_methodspec, mono_get_method_from_token): Update to changes.
7262 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
7263 side-effects in g_assert.
7264 * loader.c (mono_get_method_from_token): Resolve klass earlier so
7265 that we don't potentially lose information.
7267 2005-11-26 Dick Porter <dick@ximian.com>
7270 * threads.c: icalls to implement basic (ie, not named)
7271 System.Threading.Semaphore.
7273 2005-11-24 Dick Porter <dick@ximian.com>
7276 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
7277 Use GetProcessId() if it's available.
7279 2005-11-23 Zoltan Varga <vargaz@gmail.com>
7281 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
7283 2005-11-23 Raja R Harinath <rharinath@novell.com>
7284 Ankit Jain <jankit@novell.com>
7286 * loader.c (mono_get_method_from_token): Initialize 'method' field
7287 of all generic parameters before parsing the signature. Remove
7288 code that "fixed"-up MVAR references.
7290 2005-11-23 Ankit Jain <jankit@novell.com>
7292 * metadata.c (mono_metadata_has_generic_params):
7293 (mono_metadata_load_generic_param_constraints):
7294 (mono_metadata_load_generic_params): Move duplicate code ...
7295 (mono_metadata_get_generic_param_row): ... here. Returns the
7296 first row-id in GenericParam table for a given owner (token).
7297 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
7300 2005-11-23 Raja R Harinath <rharinath@novell.com>
7301 Ankit Jain <jankit@novell.com>
7303 * metadata.c (mono_metadata_class_equal): Pass signature_only when
7305 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
7306 type->data.generic_param only if the type is an MVAR.
7307 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
7308 leak owner-less VARs and MVARs into managed space.
7310 2005-11-21 Martin Baulig <martin@ximian.com>
7313 (MonoMethod): Moved the `generic_container' here from
7314 `MonoMethodNormal' since we now also need it for
7315 `MonoMethodPInvoke';
7316 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
7317 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
7318 an union containing both `MonoMethodNormal' and
7319 `MonoMethodPInvoke'.
7322 (mono_get_method_from_token): Allow implementing generic methods
7326 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
7329 2005-11-17 Dick Porter <dick@ximian.com>
7333 * process.c: Split the Process Start_internal icall into
7334 ShellExecuteEx_internal and CreateProcess_internal, which are
7335 called depending on whether UseShellExecute is true. Fixes bug
7338 * appdomain.c (MONO_CORLIB_VERSION): Incremented
7340 2005-11-17 Zoltan Varga <vargaz@gmail.com>
7342 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
7343 'msize' parameters, use the information in 'mspec' instead.
7344 (emit_object_to_ptr_conv): Ditto.
7346 * marshal.c (emit_struct_conv): Handle explicit layout structs with
7347 fields out of order. Fixes #76733.
7349 2005-11-17 Ankit Jain <jankit@novell.com>
7351 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
7353 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
7355 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
7358 2005-11-16 Zoltan Varga <vargaz@gmail.com>
7360 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
7361 for types with non-auto layout. Fixes #76717.
7363 2005-11-16 Ankit Jain <jankit@novell.com>
7365 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
7366 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
7367 if generic_context is null.
7368 (mono_metadata_generic_param_equal): param->owner can be null.
7369 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
7372 2005-11-16 Zoltan Varga <vargaz@gmail.com>
7374 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
7377 2005-11-15 Martin Baulig <martin@ximian.com>
7379 * object.c (set_value): Use mono_class_from_mono_type() instead of
7380 the hack for generic instances; fixes #76136.
7382 2005-11-15 Zoltan Varga <vargaz@gmail.com>
7384 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
7387 * image.c (load_metadata_ptrs): Initialize the new fields.
7389 * reflection.c (create_dynamic_mono_image): Ditto.
7391 * reflection.c (build_compressed_metadata): Use the new fields.
7393 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
7396 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
7399 2005-11-15 Ankit Jain <jankit@novell.com>
7400 Raja R Harinath <harinath@gmail.com>
7402 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
7403 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
7404 new per-generic_container cache if the cached MonoType's context matches
7405 the current context.
7406 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
7407 to the expected context.
7408 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
7410 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7412 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
7413 we changed the signature of an icall.
7414 * icall.c: Modify to mono_double_ParseImpl return true/false
7415 depending on the success, instead of throwing the exception. This will
7416 help us in Double.TryParse methods.
7418 2005-11-14 Zoltan Varga <vargaz@gmail.com>
7420 * marshal.c (emit_marshal_object): Throw an exception when
7421 marshalling 'object' instead of crashing. Fixes #76696.
7423 2005-11-11 Zoltan Varga <vargaz@gmail.com>
7425 * class-internals.h: Add prototype for mono_type_get_full_name ().
7427 2005-11-11 Dick Porter <dick@ximian.com>
7429 * threads.c (mono_thread_manage): Make sure the main thread has
7430 abandoned all its mutexes when cleaning up. Fixes bug 74680.
7432 2005-11-11 Zoltan Varga <vargaz@gmail.com>
7434 * loader.c (mono_loader_set_error_type_load): Log a warning to the
7435 console about the missing type.
7436 (mono_loader_set_error_method_load): Ditto.
7438 2005-11-09 Miguel de Icaza <miguel@novell.com>
7440 * mono-config.c (mono_get_config_dir): Set the system defaults if
7443 * assembly.c (mono_set_dirs): New API entry point to set the
7444 assembly and the config directory in one call
7446 2005-11-09 Zoltan Varga <vargaz@gmail.com>
7448 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
7449 the ftnptr was created from a delegate in a domain other than the
7450 current domain. Fixes #75377.
7452 * exception.h exception.c: Add mono_get_exception_not_supported ().
7454 2005-11-08 Martin Baulig <martin@ximian.com>
7456 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
7458 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
7460 * security-manager.h: Added definitions to deal with strongname key
7461 pairs bigger (and smaller) than 1024 bits.
7462 * reflection.c: Remove hardcoded strongname size (128 bytes) and
7463 adjust wrt the public key length being used.
7465 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
7467 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
7468 Windows build (r51396-51397).
7470 2005-11-03 Martin Baulig <martin@ximian.com>
7472 * class.c (mono_class_setup_vtable_general): Also add generic
7473 methods to the vtable; fixes #76581.
7475 2005-11-01 Miguel de Icaza <miguel@novell.com>
7477 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
7478 sure that we lookup GetString method from the System.Text.Encoding
7479 class, not the derived class or we get an empty method.
7483 2005-10-25 Miguel de Icaza <miguel@novell.com>
7485 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
7486 if it has been previously set (embedders).
7488 Make mono_set_rootdir available also on Unix.
7490 005-10-24 Robert Jordan <robertj@gmx.net>
7492 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
7494 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
7496 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
7497 only calls which are made to native code use this flag.
7499 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
7501 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
7503 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7504 Add support for FieldBuilders.
7506 2005-10-29 Martin Baulig <martin@ximian.com>
7509 (mono_debug_using_mono_debugger): New public method; returns
7510 whether we're running inside the debugger.
7512 2005-10-27 Zoltan Varga <vargaz@gmail.com>
7514 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
7515 for Method/Constructor/FieldBuilders.
7517 2005-10-26 Zoltan Varga <vargaz@gmail.com>
7519 * reflection.c (module_add_cattrs): Save custom attributes for global methods
7522 2005-10-26 Martin Baulig <martin@ximian.com>
7524 * mono-debug-debugger.c
7525 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
7527 2005-10-24 Raja R Harinath <harinath@gmail.com>
7529 * icall.c (base64_to_byte_array): Don't pass an out-of-range
7532 2005-10-21 Zoltan Varga <vargaz@gmail.com>
7534 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
7535 when passing valuetypes byref. Fixes #76502.
7537 2005-10-19 Jackson Harper <jackson@ximian.com>
7539 * profiler.c: Don't put a . in front of types that are not in a
7542 2005-10-18 Zoltan Varga <vargaz@gmail.com>
7544 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
7546 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
7548 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
7550 (mono_marshal_get_ldflda_wrapper): Fix a warning.
7552 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7554 * assembly.c metadata-internals.h icall.c: Define an additional
7555 parameter for mono_assembly_name_parse_full, so we can avoid creating
7556 S.R.AssemblyName.Version when no version info wasn't passed.
7558 2005-10-09 Miguel de Icaza <miguel@novell.com>
7560 * class.c (mono_type_get_full_name): Reimplement method that was
7563 * image.c: Some docs
7565 2005-10-10 Zoltan Varga <vargaz@gmail.com>
7567 * profiler.c (output_newobj_profile): Fix printing of Total memory
7570 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
7572 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
7574 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
7576 * threads.c: remove debug output.
7578 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
7580 * threads.c (mono_thread_manage): Fix crashes if more than 64
7581 threads need to be aborted. Hopefully fixes #75899.
7583 * assembly.c (mono_stringify_assembly_name): New helper function.
7585 * class.c: Use mono_stringify_assembly_name instead of the similar
7588 * assembly.h assembly.c: Add support for calling a postload search
7589 hook if an assembly cannot be loaded.
7591 * appdomain.c: Register new search hooks which call the AssemblyResolve
7592 events in AppDomain. Fixes #75231
7594 2005-10-07 Martin Baulig <martin@ximian.com>
7596 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
7597 methods without debug info.
7599 2005-10-07 Zoltan Varga <vargaz@gmail.com>
7601 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
7604 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7606 * file-io.c: now that we return symlinks, use lstat and, when the file
7607 is a symbolic link, stat, to get the file attributes. Also avoid the
7608 conversion to/from utf16/external.
7610 2005-10-06 Zoltan Varga <vargaz@gmail.com>
7612 * class.c (mono_class_layout_fields): Compute klass->has_references
7613 correctly if an embedded valuetype is not yet initialized. Fixes
7616 2005-10-04 Martin Baulig <martin@ximian.com>
7619 (mono_metadata_load_generic_param_constraints): New public
7620 function; splitted the constraints loading out from
7621 mono_metadata_load_generic_params().
7623 * class.c (mono_class_create_from_typedef): Call
7624 mono_metadata_load_generic_param_constraints() after setting up
7625 the type and creating our parent; fixes #75329.
7627 2005-10-04 Martin Baulig <martin@ximian.com>
7629 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
7630 non-dynamic parent classes.
7632 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
7634 * file-io.c : win32 build fix (ETXTBSY seems not found).
7636 2005-10-04 Martin Baulig <martin@ximian.com>
7639 (mono_image_get_methodspec_token): Make the cache actually work;
7642 2005-10-04 Martin Baulig <martin@ximian.com>
7644 * class.c (mono_class_name_from_token): Removed the unneccessary
7645 `MonoGenericContext *' argument.
7647 2005-10-04 Martin Baulig <martin@ximian.com>
7650 (method_from_methodspec): Make the caching work again; fixes the
7651 performance regression from #76262.
7653 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7657 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
7658 GetFileSystemEntries that performs the same work but without going
7659 into io-layer, locking, etc.
7661 2005-09-30 Zoltan Varga <vargaz@gmail.com>
7663 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
7664 ThreadState_Stopped as well. Fixes #76047.
7666 2005-09-29 Martin Baulig <martin@ximian.com>
7669 (inflate_generic_context): If the new context has a `gmethod', set
7670 its `container' that that gmethod's `container'.
7673 (mono_metadata_parse_generic_param): Simplify things;
7674 `generic_container = generic_context->container;' is just fine.
7676 * loader.c (method_from_methodspec): Code cleanups.
7678 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
7680 * decimal.c: fix warning (and let gcc generate correct
7681 code on ARM with optimizations).
7683 2005-09-28 Martin Baulig <martin@ximian.com>
7686 (method_from_memberref): Added `MonoGenericContext *class_context'
7687 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
7688 (method_from_methodspec): If we're a memberref, use the enclosing
7689 context when parsing its parent. Fixes #76262; see gtest-206.cs.
7691 2005-09-28 Martin Baulig <martin@ximian.com>
7693 * object.c (mono_runtime_invoke_array): Added support for
7694 MONO_TYPE_GENERICINST; fixes #75917.
7696 2005-09-27 Martin Baulig <martin@ximian.com>
7698 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
7699 `k->byval_arg.type' to determine the actual type.
7701 * loader.c (method_from_methodspec): Removed some hacks.
7703 2005-09-27 Ben Maurer <bmaurer@ximian.com>
7705 * class-internals.h (mono_field_is_deleted): Do the test for
7706 rtspecialname before we check the actual name of the field. This
7707 prevents us from dereferencing a pointer into the string table,
7708 saving us from accessing a few pages
7710 * *.c: Replace the use of {Enter,Leave}CriticalSection with
7711 macros. This will allow a deadlock debugger to easily be plugged
7714 2005-09-27 Martin Baulig <martin@ximian.com>
7716 * loader.c (method_from_methodspec): Create a "signature"
7717 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
7719 2005-09-27 Martin Baulig <martin@ximian.com>
7722 (inflate_generic_class): Correctly set the new context's
7726 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
7727 instead of a `MonoGenericContext *'.
7728 (mono_method_signature_full): Take a `MonoGenericContainer *'
7729 instead of a `MonoGenericContext *'.
7732 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
7733 instead of a `MonoGenericContext *'.
7734 (mono_metadata_parse_method_signature_full): Likewise.
7736 2005-09-26 Martin Baulig <martin@ximian.com>
7739 (mono_class_from_generic_parameter): Set `klass->generic_container'
7740 (mono_class_from_generic_parameter): Likewise.
7741 (mono_bounded_array_class_get): We inherit the generic container
7742 from the element class.
7745 (find_method, find_method_in_class): Take a `MonoGenericContext *'
7746 argument rather than computing it here.
7747 (method_from_memberref): Correctly set the generic context before
7748 parsing the signature. Fixes #75681.
7750 2005-09-26 Zoltan Varga <vargaz@gmail.com>
7752 * object.c (mono_class_has_special_static_fields): Fix warnings.
7754 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
7756 * assembly.c: Add parse_public_key function, to
7757 par the public keys. Also added mono_assembly_name_parse_full,
7758 to define it the parsed key should be freed or not.
7759 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
7760 to parse a long format assembly name.
7761 * metadata-internals.h: Keep mono_assembly_name_parse_full as
7762 private, since calling it to preserve the key requires
7763 freeing it manually.
7765 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
7767 * locales.c : removed HAVE_ICU part.
7769 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
7771 * object.c (mono_class_create_runtime_vtable): Avoid calling
7772 field_is_special_static if the klass has no special static fields.
7774 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
7775 (MonoCachedClassInfo): Likewise.
7777 * object.c (mono_class_has_special_static_fields): New helper function.
7779 2005-09-23 Zoltan Varga <vargaz@gmail.com>
7781 * class.c (mono_class_create_from_typedef): Don't call
7782 interfaces_from_typedef_full for enums.
7783 (mono_class_create_from_typedef): Compute the base types of enums directly
7784 without calling mono_class_setup_fields ().
7785 (mono_class_find_enum_basetype): New helper function.
7787 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
7788 one place inside the string heap.
7790 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
7792 * class.c: locking fixes, code cleanups, some docs added.
7793 Allocate some data structures in the image mempool.
7795 2005-09-23 Zoltan Varga <vargaz@gmail.com>
7797 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
7800 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
7802 * class-internals.h, class.c, reflection.c: reduce memory taken by
7805 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
7807 * metadata.c, metadata.h, loader.h: documentation updates, code and
7810 2005-09-23 Zoltan Varga <vargaz@gmail.com>
7812 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
7815 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
7816 page faults caused by the runtime while reading metadata.
7818 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7820 * socket-io.c: the field names were changed 3 months ago and no one
7821 realized until bug #76077 got filed!
7823 2005-09-20 Martin Baulig <martin@ximian.com>
7825 * icall.c (assembly_icalls): Removed some unused debugger icalls.
7827 2005-09-20 Martin Baulig <martin@ximian.com>
7829 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
7830 write the rank into the class entry.
7832 2005-09-20 Martin Baulig <martin@ximian.com>
7834 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
7836 2005-09-19 Zoltan Varga <vargaz@gmail.com>
7838 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7840 * icall.c (custom_attrs_defined_internal): New icall.
7842 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
7844 (mono_custom_attrs_construct_by_type): New helper function.
7846 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
7848 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
7849 terminate the resulting string. Fixes #76123.
7851 2005-09-16 Martin Baulig <martin@ximian.com>
7854 (mono_debug_add_method): Ignore inflated methods for the moment.
7856 2005-09-14 Martin Baulig <martin@ximian.com>
7858 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
7860 2005-09-13 Zoltan Varga <vargaz@gmail.com>
7862 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
7863 return a success/failure indication.
7864 (mono_metadata_interfaces_from_typedef_full): Ditto.
7865 (get_constraints): Ditto.
7867 2005-09-12 Zoltan Varga <vargaz@gmail.com>
7869 * marshal.c (emit_marshal_array): Fix handling of null arrays.
7871 * marshal.c (emit_marshal_array): Add support for returning string
7872 arrays from delegates. Fixes #76063.
7874 * marshal.c: Use the emit_ldloc/stloc macros where possible.
7876 2005-09-11 Zoltan Varga <vargaz@gmail.com>
7878 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
7881 2005-09-09 Zoltan Varga <vargaz@gmail.com>
7883 * reflection.c icall.c: Fix after mono_get_exception_type_load
7886 * assembly.c (mono_assembly_get_assemblyref): New helper function.
7887 (mono_assembly_load_reference): Use the new helper.
7889 * class-internals.h (MonoLoaderError): New structure containing
7890 information about type loading errors.
7892 * class-internals.h loader.c: Add APIs to store per-thread loader
7895 * loader.c class.c: Set the loader error if needed.
7897 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
7899 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
7901 * decimal.c: fixed to handle the broken ARM fp format.
7903 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
7905 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
7908 2005-09-06 Martin Baulig <martin@ximian.com>
7910 * domain.c (supported_runtimes): Added v2.0.50727.
7912 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
7914 * culture-info.h: reduce the size of some structures.
7916 2005-09-05 Martin Baulig <martin@ximian.com>
7918 Reflect latest API changes in the August CTP.
7921 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
7922 ("MonoType.HasGenericArguments"): Removed.
7923 ("MonoMethod.BindGenericParameters"): Renamed to
7924 "MakeGenericMethod".
7925 ("MethodBuilder.BindGenericParameters"): Renamed to
7926 "MakeGenericMethod".
7928 2005-09-05 Martin Baulig <martin@ximian.com>
7930 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
7932 2005-09-05 Martin Baulig <martin@ximian.com>
7934 Applying a patch from Michal Moskal <malekith@nemerle.org>.
7936 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
7937 generic_container is non-NULL.
7939 2005-09-05 Martin Baulig <martin@ximian.com>
7941 Applying a patch from Michal Moskal <malekith@nemerle.org>.
7943 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
7945 2005-08-29 Michal Moskal <malekith@nemerle.org>
7947 * reflection.c (encode_locals,
7948 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
7949 for large generic types.
7951 2005-09-05 Martin Baulig <martin@ximian.com>
7953 Applying a patch from Michal Moskal <malekith@nemerle.org>.
7955 * class.c (mono_dup_array_type): New public method.
7956 (mono_metadata_signature_deep_dup): New public method.
7957 (dup_type): Correctly duplicate array and function types.
7959 2005-09-05 Martin Baulig <martin@ximian.com>
7961 Applying a patch from Michal Moskal <malekith@nemerle.org>.
7963 * reflection.c (get_default_param_value_blobs): Handle generic types
7964 and generic methods.
7966 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
7968 * class.c: Fixed error reporting (method/class were inversed) for
7969 inheritance demands.
7970 * security-manager.c|h: Added the AppDomain when calling the managed
7971 System.Security.SecurityManager.InheritanceDemand method.
7973 2005-09-01 Raja R Harinath <rharinath@novell.com>
7975 * reflection.c (encode_marshal_blob): 'marshaltype' and
7976 'marshaltyperef' are alternate sources for the custom marshaler
7979 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
7981 * class.c: fix creation of array classes with rank == 1
7982 (patch by Ankit Jain <jankit@novell.com>).
7984 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
7986 * object.c: fix check for creating the bound data for arrays vs
7989 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7991 * object.c: configuration file name is now based on the executable name,
7992 not the image name. Fixes bug #75931.
7994 2005-08-29 Zoltan Varga <vargaz@gmail.com>
7996 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
7997 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
7999 2005-08-25 Zoltan Varga <vargaz@gmail.com>
8001 * rand.c: Use wincrypt.h instead of WinCrypt.h.
8003 2005-08-24 Ankit Jain <jankit@novell.com>
8004 Raja R Harinath <rharinath@novell.com>
8006 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
8007 called by it recursively.
8008 (mono_class_init): Remove special case in pending_init handling, since it's
8009 superseded by the fix to mono_class_from_typeref.
8011 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
8013 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
8014 BROKEN_THREAD_START stuff.
8016 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
8018 * class-internals.h object.c: Add a new kind of trampoline called a delegate
8021 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
8023 * object.c (mono_delegate_ctor): Replace the original function address with
8024 a delegate trampoline.
8026 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
8028 * icall.c: add boolean argument to base64_to_byte_array and
8029 InternalFromBase64String to control whether a whitespace-only string
8030 is allowed (or should casue a FormatException to be thrown). We need
8031 this as the behavior has changed between MS.NET 1.x and 2.0, and we
8032 to match the MS behaviour in both profiles.
8033 * appdomain.c: Bump corlib version.
8035 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8037 This patch implements a big portion of publisher policy
8038 support, used to bind assembly versions and redirect
8039 one assembly from version A to version B.
8042 New GSList loaded_assembly_bindings, for storing the cached
8044 (assembly_binding_maps_name): New static function for checking if a
8045 assembly binding information maps an assembly name.
8046 (mono_assembly_binding_info_free): New function for freeing
8047 assembly binding information resources.
8048 (get_publisher_policy_info): New static function for retrieving
8049 assembly binding information from a MonoImage.
8050 (compare_versions): New static function for comparing an assembly
8051 binding information data and the version of an assembly name.
8052 (check_policy_versions): New static function for checking if an
8053 assembly binding info mapping an assembly name is valid for it.
8054 (mono_assembly_load_publisher_policy): New static function for
8055 loading the 'policy.major.minor.MyAssembly' image for an assembly
8056 with an assembly name 'aname'.
8057 (mono_assembly_bind_version): New static function for updating
8058 assembly redirection.
8059 (mono_assembly_apply_binding): New static function for applying
8061 (search_binding_loaded): New static function for searching
8062 loaded assembly binding infos in the cache domain.
8063 (mono_assembly_load_full): Don't apply assembly binding for
8064 reflection only assemblies.
8066 * metadata-internals.h: Add MonoAssemblyBindingInfo,
8067 which contains information about assembly binding. Also
8068 declare signature for mono_config_parse_publisher_policy ()
8069 function, used to retrieve pub policy info.
8072 (publisher_policy_start): New static function used to parse publisher
8073 policy config files.
8074 (publisher_policy_parser): New static MonoParseHandler containing
8075 the functions used when parsing config files.
8076 (mono_config_parse_publisher_policy): New function for parsing
8077 publisher policy files.
8079 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
8081 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
8083 * marshal.c (mono_delegate_free_ftnptr): Ditto.
8085 * object.c (mono_get_addr_from_ftnptr): New helper function.
8087 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
8089 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8091 2005-08-19 Dick Porter <dick@ximian.com>
8093 * threads.c, threads.h, appdomain.c, appdomain.h,
8094 profiler-private.h, monitor.c, object.c, object-internals.h,
8095 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
8096 store the thread ID, so it can hold a 64 bit value if needed.
8098 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
8100 * reflection.c (mono_reflection_create_dynamic_method): Store the
8101 handle class into the method references as well so ldtoken works in
8104 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
8107 2005-08-19 Ankit Jain <jankit@novell.com>
8110 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
8111 here rather than using the method signature of a arbitrary function
8112 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
8114 Hack done with Harinath.
8116 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8118 * threadpool.c: disable printing stack traces when we get a exception
8119 in a threadpool thread. I need to do more testing to figure out which
8120 cases actually print this. Fixes bug #75828.
8122 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8124 * icall.c: there might be ignored whitespace after the last '='. This
8125 fixes length computation and bug #75840.
8127 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
8129 * assembly.c (mono_assembly_load_full): Consider .exe extension as
8132 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
8135 * reflection.c (create_custom_attr_data): Ditto.
8137 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
8139 * locales.c, culture-info.h : removed RegionLCIDMap.
8140 * culture-info-tables.h : regenerated.
8142 2005-08-16 Martin Baulig <martin@ximian.com>
8144 * class.c (mono_type_get_name_recurse): Small fix.
8146 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
8148 * locales.c : indentation fixie.
8150 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
8152 * object-internals.h,
8156 icall.c : added RegionInfo table support.
8157 * culture-info-table.h : regenerated for region support.
8159 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
8161 * reflection.c (resolve_object): handle all kinds of MonoMethod
8162 including generic ones
8164 2005-08-12 Ankit Jain <jankit@novell.com>
8166 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
8167 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
8169 2005-09-12 Lluis Sanchez <lluis@ximian.com>
8171 * process.c: Don't close a thread handle when it's NULL. This is a
8172 workaround for bug #75733.
8174 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
8176 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
8178 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
8180 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
8182 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8184 * threadpool.c: if a work item in the thread pool has a callback that
8185 catches a exception, don't propagate it after invoking the callback.
8188 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
8190 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
8192 * class-internals.h (MonoCachedClassInfo): Add some new fields.
8194 * class.c (mono_class_init): Load field info lazily in the AOT case.
8196 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
8198 2005-08-03 Ankit Jain <jankit@novell.com>
8201 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
8202 PInvoke calling convention is 0.
8204 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
8206 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
8207 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
8209 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
8211 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
8212 to handle threads not started by the GC (patch by Michael Meeks
8213 <michael.meeks@novell.com>).
8215 2005-07-31 Kamil Skalski <nazgul@omega.pl>
8217 * reflection.c: Make buffer used in emitting types larger for some
8218 big generic types (patch by Michal Moskal).
8220 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
8222 * mono-debug.c: Fix some (not all) alignment problems.
8224 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8226 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
8227 Invoke mono_image_load_from_data_full passing the refonly
8231 (mono_assembly_open_from_bundle): Add the refonly argument,
8232 in order to pass it to other methods it calls to.
8233 (do_mono_assembly_open): Add the refonly argument, in order
8234 to pass it to other methods it calls to.
8235 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
8236 the refonly parameter to it.
8238 * image.c: Add loaded_images_refonly_hash and
8239 loaded_images_refonly_guid_hash to cache the reflection
8241 (mono_images_init): Initialize the hash tables used for
8242 caching the reflection only images.
8243 (load_modules): Invoke mono_image_open_full passing the refonly
8244 parameter to load the modules the correct way.
8245 (build_guid_table): Add the refonly argument, to re-build the
8247 (do_mono_image_open): Added the refonly argument, in order to
8248 define it for the loaded image.
8249 (mono_image_loaded_full): New function, which receives an
8250 additional parameter to look for the image in the refonly or
8251 non-refonly section.
8252 (mono_image_loaded): Updated, using mono_image_loaded_full.
8253 (mono_image_loaded_by_guid_full): The same case that happens
8254 with mono_image_loaded_full.
8255 (mono_image_loaded_by_guid): Likewise.
8256 (register_image): Use the ref_only variable inside MonoImage
8257 to decide in which hash table store the current image.
8258 (mono_image_open_from_data_full): Rename
8259 mono_image_open_from_data to mono_image_open_from_data_full,
8260 adding the refonly argument, to define the ref_only variable
8262 (mono_image_open_from_data): Return
8263 mono_image_open_from_data_full.
8264 (mono_image_open_full): Rename mono_image_open to
8265 mono_image_open_full, receiving the new refonly argument,
8266 to pass it to inner methods.
8267 (mono_pe_file_open): Update this function, to open
8268 a MonoImage as a non-refonly image.
8269 (mono_image_close): Use the refonly variable inside
8270 MonoImage to remove the image from the correct caches.
8272 * image.h: Add the signatures of mono_image_open_full,
8273 mono_image_open_from_data_full, mono_image_loaded_full,
8274 mono_image_loaded_by_guid_full.
8276 * metadata-internals.h: Add the ref_only field to
8279 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8281 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
8282 Fix the last behavior, which used to load the assemblies and
8283 extract MonoReflectionAssemblyName information, instead of
8284 extract it from the metadata tables. Needed for Reflection
8287 2005-07-29 Martin Baulig <martin@ximian.com>
8289 * mono-debug-debugger.c
8290 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
8294 (mono_debug_address_from_il_offset): Check whether we have
8295 debugging support before attempting to take the lock.
8296 (mono_debug_source_location_from_address): Likewise.
8297 (mono_debug_source_location_from_il_offset): Likewise.
8298 (mono_debug_il_offset_from_address): Likewise.
8299 (mono_debug_address_from_il_offset): Likewise.
8301 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
8303 * class.c (mono_class_from_name_case): Add support for dynamic images.
8306 * object.c (mono_class_compute_gc_descriptor): Add a workaround
8309 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
8311 * reflection.c (mono_method_get_object): Fix warning.
8313 2005-07-28 Martin Baulig <martin@ximian.com>
8316 (mono_debug_add_wrapper): Also write the wrapper type.
8318 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
8320 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
8322 * class.c (mono_class_init): Avoid reading nested classes if the AOT
8323 data indicates the class has none.
8325 2005-07-26 Ben Maurer <bmaurer@ximian.com>
8327 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
8328 loader lock with the debugger lock. Prevents deadlocks for beagle.
8330 Beagle can now run on an smp box for a weekend without any
8333 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
8335 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
8336 in a module. Fixes #75629.
8338 2005-07-26 Martin Baulig <martin@ximian.com>
8340 * mono-debug.c (mono_debug_add_wrapper): New static method.
8341 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
8342 interncall or a wrapper.
8344 * mono-debug.h (MonoDebugWrapperData): New public typedef.
8345 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
8346 (MONO_DEBUGGER_VERSION): Bump to 51.
8348 * mono-debug-debugger.c
8349 (mono_debugger_add_type): Removed this empty function.
8350 (mono_debugger_add_method): Likewise.
8352 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
8354 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
8355 before accessing method->slot.
8357 2005-07-21 Jb Evain <jbevain@gmail.com>
8359 * reflection.c (method_encode_clauses/class): Handle filters clauses.
8362 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
8364 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
8367 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
8369 * image.h image.c: Add mono_image_get_guid () API function.
8371 2005-07-19 Ben Maurer <bmaurer@ximian.com>
8373 There were issues when multiple threads tried to load
8374 assemblies. A deadlock was created between assemblies_mutex and
8375 mono_domain_assemblies_lock. This fixes the issue by making the
8376 assembly ref counting be lock free. See bug 75586.
8378 * image.c (mono_image_close): The add ref function here was using
8379 Interlocked operations while the unref was using a mutex and a
8380 --. I don't think this was ever a bug that would be exposed in a
8381 non-pendantic way (ie, by an embedder doing a ref on one thread
8382 and an unref on another), but for the sake of correctness, this is
8385 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
8386 (mono_assembly_load_reference): Call mono_assembly_addref rather
8387 than touching the refcount ourselves.
8388 (mono_assembly_close): Use InterlockedDecrement to unref the
8389 assembly. Don't acquire the lock unless it is actually needed.
8391 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
8393 * class.c (mono_class_layout_fields): Fix calculation of has_references
8396 2005-07-12 Martin Baulig <martin@ximian.com>
8398 Applying a patch from Michal Moskal <malekith@nemerle.org>.
8401 (mono_type_hash): Provide better hashing for generic instances.
8402 (mono_generic_inst_hash): Improve hashing.
8403 (mono_generic_class_hash): Likewise.
8405 * reflection.c (mymono_metadata_type_hash): Improve hashing for
8408 2005-07-12 Martin Baulig <martin@ximian.com>
8410 * reflection.c (mono_reflection_create_runtime_class): Remove the
8411 hack for generic type definitions and non-`Run' assemblies.
8412 (mono_reflection_bind_generic_parameters): Also use
8413 `klass->wastypebuilder' to check for TypeBuilders.
8415 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
8417 * class.c (mono_class_layout_fields): Fix calculation of has_references
8420 * class.c (inflate_generic_class): Fix a leak.
8421 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
8424 2005-07-11 Martin Baulig <martin@ximian.com>
8426 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
8429 2005-07-11 Martin Baulig <martin@ximian.com>
8431 * loader.c (find_method): Also lookup in
8432 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
8434 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8436 * appdomain.c (mono_domain_unload): Don't free the error message
8437 before passing it to mono_get_exception_...
8439 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
8441 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
8443 * threads.c: try to better guess an available RT signal (bug #75387).
8445 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8447 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
8450 2005-07-07 Martin Baulig <martin@ximian.com>
8452 * class.c (mono_type_get_name_full): Return NULL for
8453 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
8456 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8458 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
8459 exit the appdomain as well being aborted.
8461 * threadpool.c: Create all threadpool threads inside the root appdomain, and
8462 change back to the root domain after calling managed code. This enables
8463 appdomains using threadpools to be unloaded.
8465 2005-07-07 Martin Baulig <martin@ximian.com>
8468 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
8469 into `MonoDynamicGenericClass' since we only need it for dynamic
8472 * reflection.c (mono_class_bind_generic_parameters): We don't need
8473 to compute the `parent' here.
8475 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
8477 * culture-info-table.h : regenerated.
8479 2005-07-06 Martin Baulig <martin@ximian.com>
8482 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
8484 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
8486 2005-07-06 Martin Baulig <martin@ximian.com>
8488 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
8489 we're doing a signature-only comparision; fixes #74945.
8491 2005-07-06 Martin Baulig <martin@ximian.com>
8493 * class-internals.h (MonoGenericClass): Moved some things out into
8494 a new `MonoInflatedGenericClass' type.
8495 (MonoInflatedGenericClass): New type; the `klass' of a
8496 `MonoGenericClass' is now computed lazyly in
8497 mono_get_inflated_generic_class().
8499 * class.c (mono_get_inflated_generic_class): New public function.
8500 (mono_class_inflate_generic_method): Removed the unused
8501 `MonoClass *' argument.
8502 (setup_generic_vtable): Don't call mono_get_inflated_method() on
8504 (mono_class_create_generic): Make this static and merge it with
8505 mono_class_create_generic_2(); we're now called automatically from
8506 mono_get_inflated_generic_class().
8508 * loader.c (mono_method_signature): Call
8509 mono_get_inflated_method() here.
8511 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
8513 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
8514 type of fields with RVA.
8516 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
8517 for this pseudo class.
8518 (my_mono_class_from_generic_parameter): Likewise.
8519 (mono_class_init): Allow interfaces to have cctors.
8521 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
8523 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
8524 lazily for AOT methods.
8526 2005-07-05 Martin Baulig <martin@ximian.com>
8528 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
8529 returns FALSE for a successful match, not TRUE.
8531 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
8533 * loader.c (mono_method_get_index): Optimize this a bit.
8535 2005-07-04 Martin Baulig <martin@ximian.com>
8538 (class_compute_field_layout): Move the check for generic type
8539 definitions into mono_class_layout_fields(). Fixes #74684.
8540 (mono_class_from_generic_parameter): Correctly compute
8541 `klass->parent'; fixes #75457.
8543 * reflection.c (register_assembly, register_module): Make sure
8544 `domain->rejobject_hash' is already created.
8546 2005-07-02 Martin Baulig <martin@ximian.com>
8549 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
8550 `MonoDynamicGenericClass'.
8552 2005-07-01 Lluis Sanchez <lluis@ximian.com>
8554 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
8555 returned by a field getter is null, since null is a valid value.
8557 2005-07-01 Martin Baulig <martin@ximian.com>
8559 * reflection.c (mono_reflection_generic_class_initialize): Update
8560 the `dgclass->fields [i].parent' to the correct class.
8561 (mono_image_get_fieldref_token): Use the declaring type, not the
8564 2005-07-01 Martin Baulig <martin@ximian.com>
8566 * loader.c (find_method): Also look in the interfaces; fixes #75429.
8568 2005-06-30 Ben Maurer <bmaurer@ximian.com>
8570 * threads.c (thread_cleanup): assert that thread != NULL
8571 (wait_for_tids_or_state_change): We were using the wrong variable
8572 when accessing wait->threads. `i' was always out of the bounds of
8575 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8577 * loader.c: map user32 and kernel32 to libMonoSupportW
8579 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
8581 * appdomain.c (unload_thread_main): Mark this as WINAPI.
8583 2005-06-28 Martin Baulig <martin@ximian.com>
8585 * loader.c (method_from_methodspec): Fix #75334.
8587 2005-06-28 Martin Baulig <martin@ximian.com>
8589 Fix #74953 - Arrays now implement the generic IList<T> interface
8590 on the 2.0 platform.
8592 * class-internals.h (MonoDefaults): Added `generic_array_class'.
8594 * reflection.c (mono_class_bind_generic_parameters): New public
8595 function; similar to mono_reflection_bind_generic_parameters(),
8596 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
8598 * domain.c (mono_init_internal): Try to initialize.
8599 `mono_defaults.generic_array_class' here; this'll only succeed if
8600 we're using the 2.0 corlib.
8603 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
8604 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
8605 (mono_lookup_internal_call): Added support for nested classes.
8608 (mono_get_method_from_token): Set `result->signature->pinvoke' if
8609 we're an interncall and have generic arguments.
8612 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
8613 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
8614 instance of System.Array.InternalArray<T> for arrays, so they
8615 implement the generic IList<T> interface.
8617 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
8619 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
8620 (chastamar@yahoo.com). Fixes #75374.
8622 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
8624 * culture-info-table.h: regenerated.
8626 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8628 * icall.c: handle spaces correctly for base64 strings.
8630 2005-06-26 Ben Maurer <bmaurer@ximian.com>
8632 * *.c: Kill some warnings.
8634 2005-06-23 Duncan Mak <duncan@novell.com>
8636 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
8637 that this builds on Solaris 10 (x86).
8639 2005-06-23 Martin Baulig <martin@ximian.com>
8642 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
8643 generic type definitions.
8645 2005-06-23 Martin Baulig <martin@ximian.com>
8649 * metadata.c (mono_class_get_overrides): Renamed to
8650 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
8651 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
8652 pass it to mono_get_method_full().
8654 2005-06-22 Ben Maurer <bmaurer@ximian.com>
8656 * reflection.c (mono_reflection_create_runtime_class): take the
8657 mono_domain_lock in this method. Prevents deadlocks
8659 2005-06-22 Martin Baulig <martin@ximian.com>
8661 * loader.c (method_from_methodspec): Fix #75330.
8663 2005-06-22 Martin Baulig <martin@ximian.com>
8665 * reflection.c (type_get_qualified_name): Use
8666 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
8667 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
8668 argument; use it if we don't have an assembly name.
8670 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
8672 * object.c: In mono_message_init, set "copy out" flag for in
8673 parameters with the [Out] flag.
8675 2005-06-21 Martin Baulig <martin@ximian.com>
8678 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
8681 2005-06-21 Martin Baulig <martin@ximian.com>
8683 * class.c (mono_class_init): Don't initialize `class->fields' for
8684 generic instances since they're initialized again in
8685 compute_field_layout().
8686 (compute_field_layout): Set the field's `generic_info' here; fix
8689 2005-06-21 Martin Baulig <martin@ximian.com>
8692 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
8694 * metadata.c (mono_metadata_generic_method_equal): Also
8695 distinguish the `generic_class'; fixes #75334.
8697 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8701 * domain-internals.h:
8702 * reflection.c: 'domain_assemblies' field is now protected by its own
8703 lock. Don't call into managed code to run the AssemblyLoad event if we
8704 now there are no registered delegates for it.
8706 2005-06-20 Martin Baulig <martin@ximian.com>
8708 * class.c (mono_class_is_assignable_from): Use a custom version of
8709 mono_class_has_parent() to make things work for generic instances;
8712 2005-06-20 Martin Baulig <martin@ximian.com>
8714 * loader.c (method_from_methodspec): Apply a patch from
8715 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
8717 2005-06-20 Martin Baulig <martin@ximian.com>
8719 * class.c (mono_class_init): Reverted Zoltan's last change; it
8722 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
8724 * threads.c (wait_for_tids_or_state_change): Add missing locking.
8726 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8728 * socket-io.c: fix the index in the socket array for writable/error
8729 sockets. Fixes bug #75306.
8731 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
8733 * class.c (mono_class_init): Allow interfaces to have static ctors.
8735 2005-06-17 Martin Baulig <martin@ximian.com>
8737 * loader.c (method_from_methodspec): Use `context->container' when
8738 parsing the `gmethod->inst'.
8740 2005-06-17 Martin Baulig <martin@ximian.com>
8742 * class.c (mono_type_get_name_recurse): Don't add the assembly
8743 name for type arguments.
8745 2005-06-15 Martin Baulig <martin@ximian.com>
8747 * reflection.c (mono_image_get_inflated_method_token): Encode
8748 correct klass; fixes #75260.
8750 2005-06-13 Michal Moskal <malekith@nemerle.org>
8752 * icall.c: Make GetCorrespondingMethod/Constructor take
8753 MonoReflectionMethod method not MonoMethod. Removed
8754 MonoType.GetCorrespondingField, and make
8755 MonoGenericType.GetCorrespondingField take name not
8758 2005-06-13 Michal Moskal <malekith@nemerle.org>
8760 * reflection.c (field_encode_signature, encode_locals):
8761 Make sizes of buffers for types larger (for big generic types).
8762 (create_generic_typespec,
8763 mono_reflection_sighelper_get_signature_local,
8764 mono_reflection_sighelper_get_signature_field):
8765 Add asserts for too small buffers.
8767 2005-06-15 Martin Baulig <martin@ximian.com>
8769 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
8770 if our parent is not a dynamic type.
8772 2005-06-15 Martin Baulig <martin@ximian.com>
8774 * class-internals.h (MonoTypeNameFormat): New enum.
8777 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
8778 (mono_type_get_full_name): Removed.
8779 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
8780 argument instead of the boolean's.
8782 * icall.c (ves_icall_System_MonoType_getFullName):
8783 Added `gboolean assembly_qualified'.
8786 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
8788 * reflection.c (mono_reflection_parse_type): Parse the new type
8791 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8793 * icall.c: no need to convert from utf16 to utf8 and then back again
8794 after the call to GetLogicalDrives.
8796 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8798 * icall.c: frombase64. Fix problems exposed by new tests.
8800 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8802 * icall.c: added internal calls for converting char [] and strings in
8803 base64 into byte [].
8805 2005-06-10 Martin Baulig <martin@ximian.com>
8807 * class.c (mono_class_create_generic_2): Read the nested classes
8808 from the metadata rather than from `gklass->nested_classes' since
8809 `gklass' might not be initialized yet.
8811 2005-06-09 Duncan Mak <duncan@novell.com>
8813 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
8814 all public headers. Fixes #74919.
8816 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
8818 * domain.c: The key for proxy_vtable_hash is now a pointer
8819 array. Added new GHashFunc and GCompareFunc functions for this.
8821 * class.h: The list of interfaces in MonoRemoteClass is known in
8822 advance and can't grow (we create a new MonoRemoteClass if needed),
8823 so now the interface array can be allocated together with
8826 * object.c: Added a new method create_remote_class_key.
8827 Fixed mono_remote_class so it does not depend on
8828 mono_upgrade_remote_class.
8829 Removed extend_interface_array.
8830 Added new method clone_remote_class(), which makes a copy of a remote
8831 class and adds a new interface or class to it.
8832 mono_upgrade_remote_class() now creates a new remote class (or gets
8833 it from the cache) if an vtable upgrade is needed. In this way
8834 we make sure that other objects sharing the same remote class
8835 don't get the new vtable with unwanted interfaces.
8837 * object-internals.h:
8838 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
8840 * marshal.c: Track changes in mono_upgrade_remote_class().
8842 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
8843 * icall.c: Add runtime methods for obtaining members of inflated
8844 class, which were created from supplied non-inflated members. It
8845 is used in internal Get{Method,Constructor,Field} methods in
8848 2005-06-09 Martin Baulig <martin@ximian.com>
8851 (mono_reflection_bind_generic_method_parameters): Fix #75169.
8853 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8854 * reflection.c (mono_image_basic_init): Define
8855 Version in MonoDynamicAssembly.
8857 2005-06-08 Martin Baulig <martin@ximian.com>
8862 (mono_method_signature_full): New public method; takes a
8863 `MonoGenericContext *'.
8864 (find_method): Use mono_method_signature_full() and pass the
8865 klass'es context to it.
8867 * class.c (mono_class_is_inflated_method): Use
8868 mono_method_signature_full() and pass the context to it.
8870 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
8872 * object.c: add proper locking in mono_remote_class_vtable(),
8873 fixes possible memory corruption.
8875 2005-06-08 Michael Meeks <michael.meeks@novell.com>
8877 * marshal.c (mono_remoting_marshal_init): set
8878 initialized after initialization.
8880 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
8884 2005-06-06 Michael Meeks <michael.meeks@novell.com>
8886 * object.c (extend_interface_array): fix really silly
8887 memory corrupting / comparison bug.
8889 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8891 * reflection.c: Functions added to support the creation
8892 of CustomAttributeData, which includes Attribute data
8893 used by ReflectionOnly methods.
8895 * reflection.h: mono_reflection_get_custom_attrs_data and
8896 mono_custom_attrs_data_construct added (functions exposed).
8898 * icall.c: Added mono_reflection_get_custom_attrs_data
8901 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
8903 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
8906 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
8908 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
8910 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
8911 dynamic DllImportAttribute.
8913 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
8914 dynamic DllImportAttribute.
8916 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
8919 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8921 * threads.c: avoid segfault when an unstarted thread is aborted.
8923 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
8925 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
8926 Returns the name and version of the runtime for reporting.
8928 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8930 * appdomain.c: bump corlib version.
8931 * object-internals.h: new field in MonoReflectionAssembly.
8933 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8935 * object-internals.h: Carlos forgot to add this field.
8937 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
8939 * icall.c: Added create_version to create instances
8940 of Version of MonoReflectionAssemblyName. This change helps
8941 the AssemblyName tests to keep running fine.
8943 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
8945 * object.c (mono_method_return_message_restore): A somehow less
8946 intrusive fix for #75138.
8948 2005-06-03 Raja R Harinath <rharinath@novell.com>
8950 * object.c (mono_method_return_message_restore): Fix computation
8951 of expected number of out args.
8953 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
8955 * reflection.c (mono_image_get_method_info): Fix the case when the
8958 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
8960 * object.c: Added missing null check in
8961 mono_method_return_message_restore.
8963 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
8965 * reflection.c (mono_image_get_method_info): Handle the case when
8968 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
8970 * object.c: When creating the vtable for a proxy, take into account
8971 all inherited interfaces, not only the ones registered in
8972 iclass->interfaces. This fixs bug #74996.
8973 Also, in mono_method_return_message_restore, verify that the array
8974 of out args has the expected lengh.
8976 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8978 * socket-io.c: update the timeout in Poll when the call is interrupte.
8980 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8982 * socket-io.c: support abort/suspend in Select_internal after last
8985 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8987 * threadpool.c: remove warning.
8989 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8992 * socket-io.[ch]: Select_internal uses poll() now when available, thus
8993 removing the 1024 limit from select(). Runtime part of the fix for
8996 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8998 * socket-io.c: when resolving the addresses for the same
8999 host returned by gethostname(), get the local IPs from the interface
9000 list. Loopback addresses are discarded if the are interfaces up with
9001 non-loopback ones. Fixes bug #63265.
9003 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
9005 * appdomain.c, verify.c, object-internals.h, reflection.c:
9006 bumped corlib number to 36, and added new extra_flags field
9007 to ReflectionMethodBuilder and friends. Fixes #75060.
9009 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
9011 * gc.c: register a new weak link only if the object is non-null
9014 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
9016 * culture-info.h : short time pattern too.
9018 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
9020 * culture-info.h : expand long time pattern string length.
9022 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
9024 * culture-info-table.h : update (more French date format; #72788).
9026 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
9028 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
9029 the method is static. Fixes #75029.
9031 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
9033 * reflection.c: Update the table_idx field of method builders after
9034 saving the module, since it can change. This is a workaround for
9037 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
9039 * culture-info-table.h : update (additional French date format).
9041 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
9043 * icall.c (ves_icall_type_Equals): Revert last change.
9045 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
9047 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
9049 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
9051 * class-internals.h: Added executioncontext_class field to
9052 MonoDefaults structure.
9053 * domain.c: Cache System.Threading.ExecutionContext class in
9055 * object.c: Capture the ExecutionContext for asynchroneous calls in
9056 mono_async_result_new.
9057 * object-internals.h: Added execution_context and original_context
9058 fields to MonoAsyncResult. Added execution_context to MonoThread.
9059 * security-manager.c|.h: Added mono_get_context_capture_method to
9060 return the capture method (if required by the security manager or by
9061 the framework version used).
9062 * threadpool.c: Apply capture (if present) ExecutionContext in
9063 mono_async_invoke and revert to original context after it completes.
9065 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
9067 * culture-info-table.h : updated (real hacky solution for zh-CHT).
9069 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
9071 * culture-info-table.h : zh-CHT related workaround.
9073 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
9075 * marshal.c (emit_marshal_custom): Add some error checking and call the
9076 methods in the ICustomMarshaler interface. Fixes #74875.
9078 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
9079 native->managed wrappers.
9081 2005-05-12 Martin Baulig <martin@ximian.com>
9083 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
9084 here and use the loader lock.
9086 * mono-debug.c: Properly lock when the debugger is not attached.
9087 (mono_debug_init): Release the initial lock if we're not running
9090 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
9092 * marshal.c (emit_marshal_custom): Pass through NULL values without
9093 calling the custom marshalling routines.
9095 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
9096 conversion in structures. Fixes #74882.
9098 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
9100 * culture-info-table.h : zh-* cultures were missing.
9102 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
9104 * threads.c: Added a new event background_change_event which is signaled
9105 when a thread changes its background mode.
9106 Moved here several checks previously done in managed code. The checks
9107 require the thread lock, and using the thread lock in managed code
9108 can result in deadlocks.
9109 Merged Start_internal and Thread_internal into a single method. Now
9110 Thread_internal does all work of creating and starting a thread.
9111 Added icalls for setting and getting the state of the object. Moved from
9112 managed code to avoid locking there.
9113 Added wait_for_tids_or_state_change() which is called instad of
9114 wait_for_tids when waiting for non-backround threads to end. This method
9115 will return if one of the threads ends or the background_change_event
9117 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
9118 the background mode. This method signals the background_change_event
9121 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
9122 removed Start_internal.
9124 2005-05-11 Martin Baulig <martin@ximian.com>
9126 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
9127 to order of some fields to get proper alignment on 64-bit machines.
9129 2005-05-11 Martin Baulig <martin@ximian.com>
9131 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
9132 changes as they're broken and completely fuck up the debugger.
9134 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
9136 2005-05-10 Martin Baulig <martin@ximian.com>
9138 * reflection.c (mono_reflection_generic_class_initialize): Don't
9139 call mono_class_setup_parent() here.
9141 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9143 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
9144 send/receive timeout use an integer in milliseconds. We were using a
9147 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9150 (internal_get_cultures): reserve the first slot of the array for the
9151 InvariantCulture, which will be filled in managed code.
9153 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
9155 * reflection.c (mono_image_fill_module_table): Initialize the
9156 GENERATION field as well.
9158 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9160 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
9161 Monitor.Enter on the object.
9163 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
9165 * threads.c: Enable the wait for running threads when exiting.
9166 * icall.c: Suspend all threads before exiting.
9168 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
9170 * assembly.c (mono_assembly_load_reference): Fix warning.
9172 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9174 * threadpool.c: changed the default number of threads per cpu. From now
9175 on, the default will be 20 + (5 * number of cpus) instead of 50.
9177 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
9179 * loader.c (mono_method_get_signature_full): Add locking here.
9181 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
9183 * appdomain.c: Moved methods for parsing and freeing assembly
9184 names to assembly.c.
9185 * assembly.c, domain-internals.h: Created public methods for parsing
9186 assembly names. Fixed mono_assembly_load_with_partial_name:
9187 it now finds the best match, taking into account the version,
9188 token and culture specified in the partial name. Also return
9189 the latest version if no version information is specified.
9191 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
9193 * threadpool.c: replace check for SocketAsyncCall class.
9195 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9197 * threadpool-internals.h:
9198 * Makefile.am: added threadpool-internals.h
9200 * threadpool.c: call mono_unhandled_exception on exceptions not handled
9201 that happen in threadpool threads (tested on MS).
9202 (mono_thread_pool_remove_socket): new function that dispatch any pending
9203 AIO call on a socket that is closing. By now only epoll really needs it,
9204 as select/poll wake up when the socket closes.
9207 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
9209 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
9211 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
9213 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
9215 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
9217 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
9219 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
9220 has an abort request, convert it into a suspend request.
9222 2005-04-30 Ben Maurer <bmaurer@ximian.com>
9224 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
9225 warning for the usage of `UnmanagedFunctionPointerAttribute' which
9226 is not supported yet.
9228 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9230 * image.c: register assemblies loaded from data (bundles) in the loaded
9231 assemblies hash. Fixes bug #74772.
9233 2005-04-29 Martin Baulig <martin@ximian.com>
9235 * class.c (mono_type_get_name_recurse): Update to the new naming
9236 schema from the latest .NET 2.x beta2.
9237 (mono_class_setup_vtable_general): If we're a generic instance,
9238 copy the vtable from our generic type definition and inflate all
9241 * loader.c (find_method): Update to the new naming schema from the
9242 latest .NET 2.x beta2.
9244 2005-04-29 Raja R Harinath <harinath@gmail.com>
9246 * class.c (mono_class_init): Add a mono_loader_unlock to the
9249 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
9251 * icall.c (ves_icall_System_Environment_Exit): Remove the
9252 suspend_all_other_threads () call for the time being, since it can hang.
9254 * threads.c (mono_thread_manage): Similarly, disable the waiting for
9255 the background threads to exit, since it can also hang.
9257 * class.c (mono_class_init): Applied patch from Ankit Jain
9258 (radical@gmail.com). Avoid pending init errors when a field refers
9259 to a nested class using a typeref. Fixes #74734.
9261 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
9262 this for dynamic modules.
9264 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9266 * threads.c: don't wait for threads that are in the process of aborting
9267 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
9268 and waiting for background threads to finish. This makes xsp and
9269 mod-mono-server exit without random length delays and/or hangs.
9271 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9273 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
9275 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
9277 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
9278 dynamic types to prevent infinite loops. Fixes #74727.
9280 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
9281 ..._is_assignable_to.
9283 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
9285 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
9287 2005-04-25 Martin Baulig <martin@ximian.com>
9289 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
9292 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
9294 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
9296 * reflection.c (build_compressed_metadata): Set metadata header
9299 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
9301 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
9302 number into an integral and a decimal part. Fixes #70473.
9304 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
9306 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
9308 * culture-info-table.h : reflected the latest locale-builder output.
9310 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9312 * threadpool.c: check for SuspendRequested too when deciding if
9313 mono_thread_interruption_checkpoint should be called.
9315 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9317 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
9318 * threads.c: remove interruption_mutex and use Interlocked instead. When
9319 suspending all the threads, wait for all the suspended events at once.
9320 If we're shutting down and get an APC that is going to be queued,
9321 call mono_thread_execute_interruption immediately, as the thread might
9322 be sleeping on a pthread condition or mutex.
9324 * icall.c: call mono_runtime_set_shutting_down before suspending the
9327 Fixes bug #74693. And now xsp is happier when exiting.
9329 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
9331 * loader.c (mono_stack_walk): Fix #74690.
9333 2005-04-22 Martin Baulig <martin@ximian.com>
9335 * mono-debug.h (MonoDebugMethodJitInfo): Added
9336 `MonoDebugMethodJitInfo *jit'.
9338 * mono-debug.c (mono_debug_read_method): Cache the
9339 MonoDebugMethodJitInfo in `address->jit'.
9340 (mono_debug_free_method_jit_info): New public method.
9342 2005-04-22 Martin Baulig <martin@ximian.com>
9344 * class.c (mono_class_is_assignable_from): Disallow
9345 type parameter -> interface.
9347 2005-04-21 Dick Porter <dick@ximian.com>
9349 * threads.c (mono_thread_create): Turn an assertion into an error.
9351 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
9353 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
9355 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
9356 Fix some gcc 4.0 warnings.
9358 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
9360 * file-io.c: fix alt dir separator char on unix systems
9361 and cleanup (fixes bug #71214).
9363 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
9365 * marshal.c: Use CALLVIRT instead of CALL when dispatching
9366 a call to a remote domain, since the method may be an
9367 interface method in the client domain. This fixes bug #74192.
9369 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9371 * threadpool.c: recv/send are now performed before going back to managed
9372 code to save one transition.
9374 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9376 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
9378 * metadata/threadpool.c: removed hack to workaround the bug above.
9382 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
9384 * reflection.c reflection.h: Fix handling of parameter defaults in
9385 dynamic methods. Also fixes handling of parameter attributes.
9388 * mono-debug.c (mono_debug_close_image): Fix warning.
9390 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9392 * socket-io.h: replaced old unused field with new 'blocking'.
9393 * threadpool.c: restore socket blocking state on windows(tm).
9395 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
9397 * icall.c: don't return the codebase in the AssemblyName[] returned by
9398 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
9399 * object-internals.h: Removed FIXME (fields were presents) and fixed
9400 versioncompat declaration.
9402 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9404 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
9405 not closed, so don't cleanup when it happens.
9407 2005-04-13 Chris Toshok <toshok@ximian.com>
9409 * mono-debug-debugger.h: change prototype for
9410 mono_debugger_lookup_type.
9412 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
9413 this function, although it should probably be named
9414 mono_debugger_init_type.
9416 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9418 * threadpool.c: fix non-AIO case.
9420 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
9422 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
9423 the built-in profiler to measure just JIT compilation times.
9425 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9427 * threadpool.c: the epollfd might be closed by another thread at
9428 any time, so ignore EBADF at treat it as a "we're closing" sign.
9430 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9432 * threadpool.c: release the semaphores with a count equals to the number
9433 of working threads in both IO and regular pools. Fixed typo that messed
9434 up the count of IO pool threads. Don't initialize the pipe handles if
9437 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9439 * threadpool.c: some systems don't like a NULL when deleting the socket
9442 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9444 * threadpool.c: fix semaphore allocation.
9446 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9448 * threadpool.c: added epoll() based implementation for asynchronous IO
9449 that is used instead of the default poll() when available.
9450 It can be disabled by setting MONO_DISABLE_AIO.
9452 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9454 * threadpool.c: windows needs 'closesocket' and instead of returning
9455 0 when the stream is closed while in select, it returns -1. Fixes bug
9458 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
9460 * class.c (class_compute_field_layout): Fix the regression caused by
9463 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9465 * threadpool.c: separate pool for socket async. IO.
9466 * threadpool.h: mono_max_worker_threads is not a global any more.
9468 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
9470 * class.c (class_compute_field_layout): Fix #74549.
9472 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9474 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
9475 use 2 connected sockets instead.
9477 2005-04-08 Miguel de Icaza <miguel@novell.com>
9479 * mono-config.c: Add new entry point for mkbundle
9480 mono_config_parse_memory.
9482 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9484 * threadpool.c: removed another unused function.
9486 2005-04-08 Ankit Jain <radical@corewars.org>
9488 * reflection.c (get_default_param_value_blobs): Add 'types'
9489 parameter to get the types encoded in the constant table.
9490 (mono_param_get_objects): Use the type from the constant table,
9491 not the type of the parameter, when creating default values.
9492 Handle null default values correctly.
9494 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9501 * socket-io.c: removed dead code for async IO.
9503 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9505 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
9507 * threadpool.c: intercept socket async. calls and pass them to a thread
9508 that is polling and dispatching the job items to the threadpool as
9509 socket become ready. Fixes bugs #71217, #71933.
9511 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
9512 between char and short/ushort arrays.
9514 * socket-io.c: remove dead code.
9516 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
9519 icall.c : removed InternalToUpper_Comp() and
9520 InternalToLower_Comp().
9522 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
9524 * char-conversions.h : The tables were incorrectly generated. Should
9525 be generated against invariant culture.
9527 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
9529 * object.c (mono_runtime_invoke_array): Fix return value when
9530 passing pre-created valuetype objects to ctors.
9532 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
9533 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
9536 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
9538 * domain.c: removed g_assert for runtimesecurityframe_class. This is
9539 only used with --security and hides the wrong corlib version error.
9541 2005-03-30 Joshua Tauberer <tauberer@for.net>
9543 * class.c: Changed mono_class_name_from_token so that types
9544 outside of a namespace don't have an initial period. Improved
9545 the g_warning message used in _mono_class_get when loading
9547 * assembly.c: In mono_assembly_load_reference, when an assembly
9548 can't be found, "No such file or directory" is misleading and
9549 unhelpful because a few paths were checked for the presence of
9550 the assembly. When that happens (ENOENT), display a nicer
9551 message indicating the directories that were searched. In all
9552 cases, the warning is made easier to read for non-hackers.
9554 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
9556 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
9558 * appdomain.h|domain.c: Removed inline from functions.
9559 * appdomain.c: Reduced warnings when compiling on windows.
9560 * icall.c: Fixed output_debug declaration to gunichar2*.
9561 * mono-config.c: Reduced warnings when compiling on windows.
9562 * rand.c: Added missing "windows.h". Added missing return value.
9563 * rawbuffer.c: Added missing winsock2.h for windows.
9564 * sysmath.h: Added mono-compiler.h header to allow/ease
9565 compilation with non-GCC compilers.
9566 * threads.c: Fixed declarations to compile with VS.NET C compiler.
9567 Removed cast warnings.
9569 Adapted from the work of J Lothian (for VC6).
9571 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
9573 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
9576 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
9578 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
9581 2005-03-27 Raja R Harinath <harinath@gmail.com>
9583 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
9584 has to be in $(exec_prefix). $(prefix) is for arch-independent
9585 stuff, and it would probably use $(prefix)/share rather than
9588 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9590 * console-io.c: added 2 includes that might be missing.
9592 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
9594 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
9597 * reflection.c (create_custom_attr): Allocate the params array using
9598 alloca so it gets GC tracking.
9600 2005-03-23 Chris Toshok <toshok@ximian.com>
9602 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
9605 2005-03-24 Raja R Harinath <rharinath@novell.com>
9607 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
9608 changes to pick up any changes in prefix, etc.
9610 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
9612 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
9614 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
9615 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
9617 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
9619 * class-internals.h object-internals.h class.c reflection.c: Extend the
9620 mono_lookup_dynamic_token () function to return the class of the
9623 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
9626 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
9628 * security-manager.c: Skip inheritance checks for intra-corlib
9629 class inheritance and method overrides. This skips a lot of checks
9630 and (anyway) permissions cannot work until corlib is loaded.
9632 2005-03-23 Martin Baulig <martin@ximian.com>
9634 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
9635 MONO_TYPE_GENERICINST.
9637 2005-03-23 Martin Baulig <martin@ximian.com>
9639 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
9641 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9643 * class.c: added locking comments to some functions.
9644 Cache the interface offsets arrays (saves about 20 KB
9645 of runtime memory in a typical app).
9646 Reduce the time overhead in mono_class_setup_supertypes ().
9648 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
9650 * icall.c: speedup and fix leaks in GetMethodsByName and
9651 GetPropertiesByName.
9653 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
9655 * reflection.c: some locking fixes.
9657 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
9659 * metadata.c: added missing break in case statement.
9661 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
9663 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
9664 typedbyref return values. Fixes #73941.
9666 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
9668 * security-manager.c|h: Added demandunmanaged method and
9669 suppressunmanagedcodesecurity class to MonoSecurityManager.
9670 Renamed aptc class to allowpartiallytrustedcallers.
9672 2005-03-17 Martin Baulig <martin@ximian.com>
9674 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
9676 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9678 * file-io.c: disabled file async. IO using aio_*. It uses the
9679 threadpool now. Workaround for bug #73718.
9681 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
9683 * assembly.h, mono-config.c: added code to deal with bundled configs
9684 for bundled assemblies.
9686 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
9688 * *.c, private.h: cleanup, removing old private.h header file.
9690 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
9692 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
9693 and throw_on_unmappable_char attributes.
9695 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
9697 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
9698 _ProcessName_internal.
9700 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
9702 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
9705 * icall.c threads.c threads-types.h: Remove slothash icalls as they
9708 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
9710 * object.c (compute_class_bitmap): Add support for generics. Fixes
9713 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
9715 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
9717 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9719 * filewatcher.c: commented out the code for windows watcher, as we don't
9720 use it (we use the managed implementation instead).
9722 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
9724 * object-internals.h (MonoThread): Remove 'unused1' field.
9726 * appdomain.c: Bump corlib version.
9728 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
9730 * reflection.c (mono_reflection_create_runtime_class): Remove the
9731 AssemblyBuilder.Save optimization since it causes too many problems.
9733 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
9735 * exception.c|h: Added mono_get_exception_reflection_type_load to
9736 create a ReflectionTypeLoadException object.
9737 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
9738 to return NULL is a InheritanceDemand fails during reflection. Updated
9739 ves_icall_System_Reflection_Assembly_GetTypes to throw a
9740 ReflectionTypeLoadException if an InheritanceDemand fails during
9741 reflection. Added icall mapping for GetLinkDemandSecurity.
9742 * security-manager.c|h: Added ves_icall_System_Security_
9743 SecurityManager_GetLinkDemandSecurity internal call to return the
9744 class and methods permissions set for a LinkDemand. Removed unused
9745 fields in MonoSecurityManager.
9747 2005-03-10 Martin Baulig <martin@ximian.com>
9749 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
9750 it's a generic instance.
9752 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
9754 * reflection.c (mono_get_object_from_blob): Applied patch from
9755 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
9757 * class.c (mono_class_is_assignable_from): Another try at fixing
9758 #73469 without breaking anything.
9760 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
9762 * class.c: (mono_class_is_assignable_from): Revert the last changes
9763 since they don't work with generics.
9765 * class.c (mono_class_is_assignable_from): Fix build bustage.
9767 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
9768 the managed IsAssignableFrom method. Fixes #73469.
9770 * reflection.c (mono_reflection_call_is_assignable_from): New helper
9773 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
9775 * object.c (mono_load_remote_field_new): Fix returning uninitialized
9776 memory when the remoting callback does not sets the out arguments.
9779 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
9782 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
9784 * object-internals.h (MonoStackFrame): Sync with managed object layout.
9786 * appdomain.c: Bump corlib version.
9788 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
9790 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
9793 * threads.c (mono_thread_attach): Detect threads which are not started
9794 by the GC pthread wrappers.
9796 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
9798 * icall.c: Added new icall for RNG.
9799 * rand.c|h: Added new icall to open the RNG. This allows to share a
9800 single handle on Linux to access /dev/urandom and fix #73183.
9802 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9804 * object.c: setting the new vtable in a transparent proxy object must
9805 not change the GC descriptor.
9807 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
9809 * object.c: fixed compilation without GCJ support.
9810 * reflection.c: for runtime-created types ensure klass->has_references
9811 is correct (bug #73215).
9813 2005-03-02 Martin Baulig <martin@ximian.com>
9815 * class.c (mono_class_is_assignable_from): Make this work if
9816 `oklass' is a generic instance; fixes #72831.
9818 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
9820 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
9823 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
9825 * marshal.c: Reorganize native->managed marshalling code to also use
9826 the emit_marshal_... functions.
9828 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
9830 * object.c: typed allocs have issues with bitmap sizes > 30,
9831 so check for max_set >= 30.
9833 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
9835 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
9836 managed code. Fixes #73012.
9838 * metadata.h (MonoMarshalSpec): Add elem_mult field.
9840 * metadata.c reflection.c: Load/Emit elem_mult as well.
9842 * metadata.h (MonoMarshalSpec): Add comment.
9844 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
9846 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
9847 num_elem to -1 if not given.
9849 * object-internals.h (MonoReflectionMarshal): Add has_size field.
9851 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
9854 2005-03-01 Marek Safar <marek.safar@seznam.cz>
9856 * null-gc.c (mono_gc_free_fixed): Was not compilable.
9858 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
9860 * reflection.c (encode_marshal_blob): Encode param_num field as well.
9862 * object-internals.h (MonoReflectionMarshal): Add param_num field.
9864 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
9866 * object.c: generalized the reference bitmap creation
9867 and added hooks for the new GC.
9868 * class-internals.c: removed the gc_bitmap field from MonoClass.
9870 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
9872 * domain.c: help the compiler to produce better code
9873 in mono_jit_info_table_find ().
9875 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
9877 * object.c: make all allocations look typed.
9879 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
9881 * socket-io.c: load Mono.Posix if it's not loaded already
9884 2005-02-24 Martin Baulig <martin@ximian.com>
9886 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
9887 * reflection.c (dup_type): Likewise.
9889 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
9891 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
9892 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
9894 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9896 * domain.c, threads.c, object-internals.h: make the critical thread
9897 local vars use the fast access mode (even when we're compiled in
9898 a lib). Provide accessors to be used by the jit during codegen.
9900 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
9902 * appdomain.c: Changed hook functios behavior to include
9903 support for the reflection only assemblies. Some icalls were changed
9904 to support the mentioned assemblies too. Signatures of static methods
9905 try_assembly_resolve and real_load now have an additional parameter:
9908 * assembly.c: General changes to mono_assembly_ methods to support
9909 reflection only api. Functions mono_assembly_open, mono_assembly_load,
9910 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
9911 suffix, to support an additional gbool parameter to specify whether
9912 the assembli is reflection only or not. Created some new hook functions
9913 to add support for reflection only assemblies. Signatures of static
9914 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
9915 have now an additional parameter: refonly.
9917 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
9918 indicating whether the assembly is reflection only or not.
9920 * exception.c: Add mono_get_exception_invalid_operation.
9922 * icall.c: Throw an InvalidOperationException when trying to invoke
9923 a property/method/event, or trying to set/get the value of a field.
9924 Also add an icall to retrieve the ref_only flag to the
9925 MonoReflectionAssembly.
9927 2005-02-23 Chris Toshok <toshok@ximian.com>
9929 Part of fix for #72827.
9930 * mono-debug.c (mono_debug_add_method): add lexical block data to
9931 the info we write. Kind of a hack at the moment - we copy the
9932 lexical block info from the MonoDebugMethodInfo to the
9933 MonoDebugMethodJitInfo here, before writing it.
9934 (mono_debug_read_method): read the lexical block info.
9936 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
9938 * debug-mono-symfile.h: add lexical block support.
9940 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
9943 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
9945 * loader.c (mono_lookup_pinvoke_call): Fix warning.
9947 * object.c (mono_runtime_free_method): Call mono_free_method () and
9948 put the TODOs there.
9950 * loader.c (mono_free_method): Free up most memory allocated for
9953 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9955 * reflection.c: properly flag a Type argument to a
9956 named custom attr value (bug #72248).
9958 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9960 * reflection.c: reduce code duplication in named custom
9963 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
9965 * reflection.c: properly encode custom attrs of type object
9968 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
9970 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
9972 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
9974 * socket-io.c: load System.dll if it's not loaded already
9975 (bug #72850 and #70477).
9977 2005-02-21 Martin Baulig <martin@ximian.com>
9979 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
9982 2005-02-21 Martin Baulig <martin@ximian.com>
9984 * reflection.c (mono_image_build_metadata): We also need to
9985 "fixup" the MethodImpl table after we computed the final method
9986 indices. Call fixup_methodimpl() to do that.
9987 (fixup_methodimpl): New private method.
9989 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
9991 * assembly.c: special case mscorlib.dll (bug#72536),
9992 patch from Carlos Alberto Cortez.
9994 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
9996 * threads-types.h threads.c: Fix build bustage.
9998 * threads.c: Use a union for long<->double conversions.
10000 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
10001 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
10003 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
10004 containing the checkpoint call with NOT_TAKEN.
10006 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
10007 checkpoint before pushing the arguments, so they won't have to be
10010 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10012 * domain.c, assembly.c, domain-internals.h: make some data
10013 const and relocation-free.
10015 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10017 * object.c, appdomain.c, class-internals.h: introduce the
10018 MonoClassRuntimeInfo structure to hold the info needed to
10019 use a class at runtime. Made mono_class_vtable() lock-free
10020 for all the appdomains.
10022 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
10024 * metadata-internals.h, image.c: introduce a per-image mempool to
10025 be used for memory that has the same lifetime as the image.
10027 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
10029 * domain.c: In mono_init_internal(), instead of selecting the first
10030 runtime version supported by an executable, get a list of all
10031 supported versions and select the one for which an mscorlib exists
10032 (since even if the runtime supports a given version, it doesn't mean
10033 that the framework for that version is installed).
10034 Modified get_runtimes_from_exe to support this behavior.
10035 In supported_runtimes, added information about additional system
10038 * assembly.c: Added support for more than one system assembly version
10039 per runtime version. Updated the assembly list.
10040 In mono_assembly_remap_version, removed the initial version check,
10041 since we don't know to which version we need to compare until we
10042 get the version set on which the assembly is based.
10043 Moved the code for loading corlib into the new method
10044 mono_assembly_load_corlib(), so it can be used by the initialization
10047 * domain-internals.h: Updated data structures and added declaration
10048 for mono_assembly_load_corlib.
10050 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
10052 * reflection.c (resolve_object): Fix the creation of the signature in
10053 the SignatureHelper case.
10055 * assembly.c (mono_assembly_remap_version): Fix binary search.
10057 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
10059 * class.c: Added inheritance check when a method is overloaded (from a
10060 virtual method or when implementing an interface) and when a class is
10061 inherited. Added functions to set a failure for a class and to
10062 retreive the exception from a failure.
10063 * class-internals.h: Added fields to MonoClass to keep the exception
10064 information status for inheritance (or other exceptions) to be thrown
10065 later (i.e. not at load time).
10066 * object.c: Throw the inheritance SecurityException when a type is to
10067 be created with either class or method inheritance violations.
10068 * reflection.c|h: Fix when getting declsec from a class. Removed
10069 unrequired code for class. Improved sanity in parameter naming.
10070 * security-manager.c|h: Added functions to check for class and method
10073 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
10075 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
10076 and has_finalize in dynamic types as well.
10078 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
10080 * culture-info-table.h : fixed currency format for en-GB (and so on).
10082 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
10084 * gc.c: ensure the GC handles never have 0 as a value.
10086 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
10088 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
10089 a pointer to a struct to unmanaged code. Fixes #72625.
10091 2005-02-16 Martin Baulig <martin@ximian.com>
10093 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
10095 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
10097 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
10099 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
10101 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
10103 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
10104 UnmanagedFunctionPointerAttribute, use it for determining calling convention
10107 * reflection.c (mono_custom_attrs_get_attr): New helper function.
10109 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
10111 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
10113 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
10114 changes to make the current context a field in MonoThread.
10116 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
10118 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
10121 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
10122 extracted from mono_marshal_get_native_wrapper.
10124 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
10125 to create wrappers around native functions.
10127 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
10128 delegates for arbitrary function pointers. Fixes #71472.
10130 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10132 * threads.c: cleaned up the code a little.
10134 2005-02-15 Martin Baulig <martin@ximian.com>
10136 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
10139 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
10140 allocate larger chunks if needed.
10142 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
10144 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
10147 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
10149 * domain.c: keep the domains in an array and ensure the domain ids
10150 are kept small, so they can be used as indexes to domain-specific data
10151 with a small memory overhead.
10153 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
10155 * icall.c: Handle byref types in Type icalls. Fixes #72544.
10157 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
10159 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
10161 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
10163 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
10165 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
10168 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
10170 2005-02-12 Ben Maurer <bmaurer@ximian.com>
10172 * domain-internals.h: add the hashtable here.
10174 * class-internals.h: Remove `info' from MonoMethod
10176 * domain.c: Add a new hashtable, jit_trampoline_hash
10178 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10180 * object.c: don't set the value of static fields
10183 2005-02-11 Martin Baulig <martin@ximian.com>
10185 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
10186 (mono_debug_add_method): Silently ignore the method if it's too big.
10187 (mono_debug_add_type): Likewise.
10189 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
10191 * threads.c, appdomain.c: remove #ifdefs from the code.
10193 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
10195 * metadata-internals.h: Added flags to MonoAssembly to cache the most
10196 common security informations. This allows us to stay in unmanaged code
10197 when doing LinkDemand and it's special cases (except for the first
10198 time for initialization). The flags a very much used with --security.
10199 * reflection.c|h: Added code to get declarative security attributes
10200 for LinkDemand and InheritanceDemand. This required to refactor the
10201 existing code for Demand.
10202 * security-manager.c|h: Added new method fields for the special cases
10205 2005-02-10 Martin Baulig <martin@ximian.com>
10207 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
10208 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
10210 2005-02-10 Martin Baulig <martin@ximian.com>
10212 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
10213 debugging code; this is almost a complete rewrite.
10215 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
10217 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10219 * domain.c, object.h: expose mono_string_equal () and
10220 mono_string_hash ().
10221 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
10222 it's implemented in managed code.
10224 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10226 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
10227 lo leak objects between appdomains.
10229 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10231 * assembly.c: old compilers compilation fix from
10232 robertj@gmx.net (Robert Jordan).
10234 2005-02-09 Ben Maurer <bmaurer@ximian.com>
10236 * class-internals.h: Little reminder for the future.
10238 * debug-helpers.c: Fix up wrapper_type_names
10240 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10242 * image.c, metadata-internals.h: when loading an image from a file,
10243 mmap all of it and use the same codepaths as when using a
10244 in-memory image: the code is simpler and we use less memory
10245 (both writable and readonly).
10247 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10249 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
10250 API to alloc runtime data structures that need to be tracked by the
10251 GC and contain pointers.
10252 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
10253 make the code more readable and eventually use a different GC.
10255 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
10257 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
10260 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
10262 * object.c: In release_type_locks(), don't release the cctor lock
10263 if it has already been released. This fixes a crash in the
10266 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10268 * gc.c, marshal.c, icall.c: register a delegate for finalization
10269 only when the native function pointer has been allocated for it.
10271 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10273 * object.c: cleaned up some code, allocate objects that are
10274 pointer free with the atomic malloc variant. Allocate memory
10275 for static data from the mempool if it's pointer-free.
10276 Allocate the bounds array at the end of the array data, when needed.
10277 * object-internals.h, object.h: move a private function in a private
10279 * class.c: handle missing case in tracking references in fields.
10281 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
10283 * class.c, class-internals.h: keep track if a type has
10284 reference fields in either the instance or static fields.
10286 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
10288 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
10289 and renamed to MonoRuntimeInfo. Added fields to store the expected
10290 framework assembly version. Changed mono_get_framework_version and
10291 mono_get_runtime_version for a single mono_get_runtime_info method.
10293 * assembly.c: Added method to remap system assembly versions to the
10294 current executing runtime version. Removed old mapping code.
10295 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
10297 * icall.c, reflection.c: Track api changes.
10299 2005-02-06 Miguel de Icaza <miguel@novell.com>
10301 * loader.c (method_from_memberref): Improve error reporting,
10302 produce the class name instead of the typeref/typedef index.
10304 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
10306 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
10308 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10310 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
10311 stdcall and charset name mangling. Reorganize the code and add
10312 some tracing stuff.
10314 2005-02-05 Ben Maurer <bmaurer@ximian.com>
10316 * monodiet.c: More iters!
10318 * marshal.c: Iter usage.
10320 * icall.c: Iter usage.
10322 * object.c: Use iters.
10324 * debug-helpers.c: More iters
10326 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10328 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
10331 2005-02-05 Ben Maurer <bmaurer@ximian.com>
10333 * mono-debug-debugger.c: use iters
10335 * class.c, class-internals.h: mono_class_setup_events is static
10338 * All callers: use iters
10340 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10342 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
10343 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10345 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
10347 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
10349 * marshal.h: Add prototypes for ldfld/stfld_remote.
10351 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
10352 this is called during startup.
10354 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10356 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
10357 MonoThreadsSync struct private in monitor.c. Changed the way
10358 MonoThreadsSync is allocated so it's faster and there is no
10359 need to keep track of it with a finalizer and it uses less memory.
10360 This also finally allows us to allocate mono objects as ptrfree when
10361 there are no reference fields.
10363 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
10365 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
10366 disappearing link to the GC interface and use them to simplify
10367 the gchandles code.
10369 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
10371 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
10372 stfld_remote which call mono_load/store_field_new. This allows methods
10373 calling ldfld/stfld wrappers to be AOTed.
10375 * console-io.c: Include sys/filio.h under solaris.
10377 * console-io.c: Include curses.h if needed correctly.
10379 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
10381 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
10382 method->klass as well.
10384 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
10386 * class.c (mono_class_init): Switch on lazy initialization of
10389 * class.c (mono_class_get_finalizer): Handle the case when the
10390 finalizer is inherited.
10392 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10394 * console-io.c: <curses.h> is needed by term.h on solaris.
10396 2005-02-03 Ben Maurer <bmaurer@ximian.com>
10398 * icall.c, class-internals.h, monodiet.c, class.c: Remove
10399 mono_class_setup_properties where possible. Remove this ftn from
10400 the header file, and make it static.
10402 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
10404 * loader.c: Add missing setup_... call.
10406 * class.c: Add missing setup_... calls.
10408 * class.c (mono_class_init): Switch on lazy initialization of
10409 the generic vtable.
10411 * class.c (mono_class_init): Fix generics broken by the recent changes.
10413 * monodiet.c (handle_type): Add missing setup_... calls.
10415 * class.c: Back out garbage in previous patch.
10417 * class.c: Add missing setup_... calls.
10419 * class.c (mono_class_get_method_from_name_flags): Avoid calling
10420 mono_class_setup_methods () if possible.
10422 * class-internals.h (MonoClass): Add 'has_cctor' flag.
10424 * class-internals.h (MonoCachedClassInfo): New structure.
10426 * class.c: Initialize properties and events fields of MonoClass lazily.
10428 * class.c: Add infrastructure for lazily initializing the methods and
10429 vtable fields of MonoClass. Not yet used.
10431 * class.c (mono_class_get_finalizer): New helper function.
10433 * class.c: Add infrastructure for loading some class related data from
10436 * object.c: Add infrastructure for initializing the vtable from data
10439 * gc.c (run_finalize): Use mono_class_get_finalizer ().
10441 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
10442 appropriate initialization function before accessing parts of the
10443 MonoClass structure.
10445 * marshal.c: Fix warnings.
10447 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
10449 * mono-debug-debugger.c (get_exception_message): Use
10450 mono_class_get_method_from_name_flags ().
10452 2005-02-02 Ben Maurer <bmaurer@ximian.com>
10454 * reflection.c, appdomain.c: Replace a few manual searches that
10455 Zoltan missed. (Paolo approved this part of my initial patch).
10457 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
10459 * profiler.c: disable recording statistical events at report time.
10461 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10463 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
10464 to byteswap arrays of enum values, too (bug #72080).
10466 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
10468 * appdomain.c (set_domain_search_path): Allow this to be called if
10469 domain->setup is not yet set.
10471 * loader.c (mono_method_get_index): New helper function.
10473 * loader.c reflection.c: Use mono_method_get_index ().
10475 * class.c (mono_class_get_method_from_name_flags): New helper method.
10477 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
10480 * class.c (mono_class_get_cctor): New helper method.
10482 * string-icalls.c object.c class.c marshal.c reflection.c: Use
10483 mono_class_get_method () to look up methods.
10485 2005-02-01 Miguel de Icaza <miguel@novell.com>
10487 * console-io.c: Fix the build, this should work on Windows.
10489 2005-01-31 Ben Maurer <bmaurer@ximian.com>
10491 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
10492 be set to null to keep things valid
10494 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10496 * icall.c: added Console 2.0 icalls.
10497 * Makefile.am: added console-io.[ch]
10498 * console-io.[ch]: internal calls for Console 2.0 API.
10500 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10502 * class.c: make sure we consider all the interfaces
10503 when calculating max_interface_id (bug found by
10504 Jeroen Frijters running ikvm).
10506 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
10508 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
10509 valuetype fields to null.
10511 * object.c (set_value): Ditto. Fixes #71669.
10513 2005-01-31 Martin Baulig <martin@ximian.com>
10515 * metadata.c (mono_metadata_has_generic_params): New public
10516 function; checks whether something is a generic method.
10518 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10520 * appdomain.c: fix infinite recursion when adding assemblies.
10522 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
10524 * object.c: Fix small typo to return all items for Environment.
10525 GetCommandLineArgs.
10527 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10529 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
10530 reflection.c: more domain and assembly-unload related fixes
10531 and memory leaks plugs.
10533 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
10535 * class.c loader.c security.c loader.h process.c threads.c mono-debug-debugger.c profiler.c marshal.c rand.cpedump.c: Fix 64 bit warnings.
10537 2005-01-29 Ben Maurer <bmaurer@ximian.com>
10539 * loader.c (mono_method_signature): Make this method lazy
10540 (mono_get_method_from_token): Don't computate the signature here.
10542 Doing this saves quite a bit of memory. I got 90 kb on starting up
10543 monodoc. It should also save some disk reads on startup.
10545 * *: MonoMethod->signature might be NULL now. You *MUST* use
10546 mono_method_signature.
10548 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
10550 * object.c (mono_runtime_get_main_args): Return an array from the
10551 current domain here. Fixes #71938.
10553 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10555 * monitor.c: formatting changes to comply with the
10556 mono coding style and remove #ifdefs from the code.
10558 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10560 * metadata.c, private.h: remove some unneeded data
10561 and use a more compact representation for table schemas.
10563 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10565 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
10566 to get a better distribution in hash tables.
10567 * *.c: use mono_aligned_addr_hash() where appropriate.
10568 * assembly.c: make var static.
10570 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
10572 * domain-internals.h: Put MonoJitInfo on a diet.
10574 * domain.c: Fix a warning.
10576 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10578 * gc.c: rework the gc handles code to reuse handles
10581 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
10583 * domain.c: fixed long standing bug in mono_string_equal() which
10584 was brought to light with the ldstr changes.
10586 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
10588 * reflection.c: Remove warning by adding missing include for marshal.h
10590 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
10592 * domain.c, object.c: change the ldstr_table to hold
10593 MonoString* as keys: makes the runtime isinterned lookup
10594 faster and simplifies memory management.
10596 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
10598 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
10599 possible to add imperative security checks before calling the icall.
10600 * reflection.c: Return security attributes on the original MonoMethod
10601 (and not the wrapped one). This fix permissions on icalls.
10603 2005-01-25 Dick Porter <dick@ximian.com>
10605 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
10606 the check for mktime() support actually test the mktime() return
10607 value. "Fixes" bug 71682, though the output is still different to
10610 2005-01-25 Martin Baulig <martin@ximian.com>
10612 * class.c (mono_class_is_assignable_from): Make this work for
10615 2005-01-24 Ben Maurer <bmaurer@ximian.com>
10617 * marshal.c (mono_string_utf8_to_builder)
10618 (mono_string_builder_to_utf16): We might not have ownership of the
10619 string. In thise case, we need to create a new buffer.
10621 * object-internals.h (mono_stringbuilder_capacity): sb->str might
10622 be null, in which case, use the default capacity.
10624 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
10626 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
10627 GC events to the profiler.
10629 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
10631 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
10632 if you don't want the GC to run.
10634 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
10636 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
10637 start providing a GC API and keeping different implementations in
10639 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
10641 2005-01-22 Ben Maurer <bmaurer@ximian.com>
10643 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
10644 mmap rather than allocating a huge buffer.
10645 (mono_debug_close_mono_symbol_file): Free the buffer allocated
10648 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
10650 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
10651 and CheckExecutionRights.
10652 * reflection.c|h: Keep the index of the declarative security to be
10653 used, instead of the pointer, when AOT compiler is used. Also add
10654 class initialization when requesting demands.
10655 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
10656 CheckExecutionRights. Both properties are now FALSE by default, and
10657 unmodifiable, unless the --security option is used.
10659 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10661 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
10662 reflection.c: properly refcount images and assemblies, many leaks fixed.
10664 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10666 * threadpool.c: increase the timeout for threads in the thread pool to
10667 10s. Fixes bug #67159.
10669 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
10671 * class-internals.h: Sun's compiler insists on explicit
10672 signed on bit fields to handle then correctly.
10674 2005-01-19 Miguel de Icaza <miguel@ximian.com>
10676 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
10677 Make the size of the array fit only the number of invalid path
10678 chars that we have.
10680 * class.c (_mono_class_get): Improve the error reporting when a
10681 class referenced is not found, to assist debugging.
10683 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
10685 * threads.c: fix off-by-one error.
10686 * domain.c: free data allocated in the domain.
10688 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
10690 * reflection.c (mono_method_body_get_object): Fill out exception info
10693 * object-internals.h: Add MonoReflectionExceptionHandlingClause
10696 2005-01-19 Martin Baulig <martin@ximian.com>
10698 * loader.c (mono_get_method_constrained): Make this work again.
10700 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
10702 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
10703 guint16 to match the managed side.
10705 * reflection.c (mono_reflection_body_get_object): Fill out local
10708 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
10711 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
10712 'local_var_sig_token'.
10714 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
10716 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
10719 * reflection.c (mono_method_body_get_object): Handle abstract and
10722 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
10724 * marshal.c, loader.c, class-internals.h, reflection.c:
10725 store the emthod data for a wrapper in an array instead of a list.
10727 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
10729 * marshal.c: change the code to allocate memory more
10730 conservatively for method wrappers.
10732 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10734 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
10735 fields from MonoClass to the marshal info structure where they belong.
10737 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
10739 * class.c, object.c, class-internals.h, marshal.c: rearrange
10740 some fields and tweak some types to lower memory usage.
10742 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
10744 * threads.c (signal_thread_state_change): Handle the case when the
10745 target thread is the current thread.
10747 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
10749 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
10750 emit_ptr_to_object_conv.
10752 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
10753 marshalling. Fixes #71352.
10755 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10757 * metadata.h, blob.h: move table enum to blob.h so it can be included
10759 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
10760 cut the size of MonoImage/MonoDynamicImage.
10762 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
10764 * profiler.c (mono_profiler_install_simple): Fix default arguments.
10766 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
10768 * reflection.c, reflection.h, icall.c: add a function to check
10769 if an attribute type is defined for a metadata object.
10771 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
10773 * object-internals.h: Added some needed fields from StringBuilder class.
10774 * marshal.c: Set the maxCapacity when creating a StringBuilder.
10776 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
10778 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
10779 threads before shutting down the runtime.
10781 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
10783 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10785 * object-internal.h, threads.c: implement stacksize and
10786 parameterized thread start functionality (requires
10787 matching corlib). Marked broken code for later removal.
10789 2005-01-12 Martin Baulig <martin@ximian.com>
10791 * class-internals.h (MonoGenericClass): Moved the `initialized'
10792 flag to MonoDynamicGenericClass, removed `init_pending'.
10793 (MonoGenericInst): Added `is_reference' flag.
10795 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
10797 * reflection.c (mono_image_create_pefile): Only set the pe_offset
10798 inside the MSDOS header. Fixes #71201.
10800 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
10802 (mono_domain_finalize): Ditto.
10804 2005-01-12 Martin Baulig <martin@ximian.com>
10806 * class.c (mono_get_shared_generic_class): Use the cache for
10807 non-dynamic generic classes.
10809 * class-internals.h (mono_class_create_generic_2): Removed
10810 function prototype, this function is now static inside class.c.
10812 * class.c (mono_class_create_generic_2): Made this static, only
10813 call it from mono_class_init() and mono_class_setup_parent().
10814 (collect_implemented_interfaces_aux): Call mono_class_init() on
10815 the interfaces we collect.
10816 (mono_class_setup_vtable): Call mono_class_init (class->parent).
10818 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
10820 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
10821 it a real thread handle.
10823 * domain-internals.h: Move exvar_offset from MonoJitInfo to
10824 MonoJitExceptionInfo, since each catch clause needs its own variable.
10826 2005-01-11 Dick Porter <dick@ximian.com>
10828 * image.c (mono_pe_file_open): New variant on mono_image_open()
10829 that does not set up the CLI metadata; used for FileVersionInfo so
10830 it can get the data for windows binaries too.
10832 * process.c (process_read_string_block): Don't read off the end of
10833 the StringTable block.
10835 These both fix bug 70766.
10837 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
10839 * gc.c: set some fields to NULL at GC cleanup time.
10840 * threads.c: if we quit the main thread, call exit ().
10842 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
10844 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
10846 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
10848 * threads.h, threads.c, object.c: added accessor and settor for
10849 main_thread. Handle it specially when exiting from it: wait
10850 for other foreground threads to exit.
10852 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
10854 * process.c, verify.c: remove some bloat.
10856 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
10858 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
10859 the calling convention to cdecl under win32.
10861 2005-01-08 Ben Maurer <bmaurer@ximian.com>
10863 * object.c (mono_object_get_size): New function to get the size of
10864 an object instance.
10866 * profiler.c (simple_allocation): Use above.
10868 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
10870 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
10871 ves_icall_System_AppDomain_getRootDomain (as it's not required to
10872 get an appdomain by it's id and we can't assume the root's id is 0).
10873 * domain-internals.h: Change the function prototype to match.
10874 * icall.c: Change the icall table for AppDomain.
10876 2005-01-08 Miguel de Icaza <miguel@ximian.com>
10878 * locales.c (string_invariant_compare_char): Only compute
10879 GUnicodeTypes in the case where we need them. Test for ordinality
10880 first and return if so.
10885 * FIXME: here we must use the information from c1type and c2type
10886 * to find out the proper collation, even on the InvariantCulture, the
10887 * sorting is not done by computing the unicode values, but their
10888 * actual sort order.
10891 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10893 * loader.c: for P/Invoke methods, allow the "Internal" shared
10894 library name to refer to the calling process symbol namespace.
10896 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
10898 * Makefile.am: Add the security manager to the build.
10899 * security-manager.c|h: New. Initialization of the security manager.
10901 2005-01-07 Dick Porter <dick@ximian.com>
10904 * monitor.c: Update thread state during Monitor and WaitHandle
10905 waits. Fixes bug 71031.
10907 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
10909 * reflection.c (property_encode_signature): Correctly handle when the
10910 property has no methods.
10912 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
10914 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
10916 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
10917 fields from mb, not rmb. Fixes #71017.
10919 * marshal.c (emit_ptr_to_str_conv): Add support for
10920 ByValTStr -> string conversion. Fixes #71015.
10922 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
10924 * mempool.c (mono_mempool_contains_addr): New helper function.
10926 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
10928 * metadata.c (mono_metadata_compute_size): Fix size calculation of
10929 HasSematics encoded fields.
10931 * metadata.c (mono_type_to_unmanaged): Improve error message for
10932 invalid string marshalling.
10934 * metadata.c: Fix warnings.
10936 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10938 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
10941 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
10943 * domain.c object.c domain-internals.h: Revert part of r38077 since the
10944 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
10947 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
10949 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
10950 so methods containing these can be AOTed.
10952 2005-01-03 Martin Baulig <martin@ximian.com>
10954 * loader.c (find_method): Removed the hack for generic instances.
10955 (method_from_memberref): If our parent is a generic instance, pass
10956 its generic type definition to find_method() and then inflate the
10958 (mono_get_method_constrained): Pass the generic type definition to
10959 find_method() and inflate the method later.
10961 * class-internals.h (MonoStats): Added `generic_class_count'.
10963 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
10964 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
10966 * reflection.c (mono_custom_attrs_from_params): Don't ignore
10967 generic type definitions.
10969 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
10971 * loader.c icall.c: Fix warnings.
10973 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
10975 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
10976 blittable types. Fixes #70864.
10978 2004-12-29 Martin Baulig <martin@ximian.com>
10981 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
10983 * reflection.c (mono_method_get_object): Create a
10984 "System.Reflection.MonoGenericMethod" for inflated methods; don't
10985 call mono_get_inflated_method().
10987 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
10989 2004-12-27 Martin Baulig <martin@ximian.com>
10991 * class-internals.h (MonoMethod): Added `is_inflated' flag.
10992 (MonoMethodInflated): Added `inflated' field.
10994 * class.c (mono_class_inflate_generic_method): Don't really
10995 inflate the method here; just set the `is_inflated' flag in the
10997 (mono_class_get_inflated_method): Actually inflate the method here
10998 if it's not already inflated; we use the MonoMethodInflated's new
10999 `inflated' field as a cache.
11001 2004-12-26 Martin Baulig <martin@ximian.com>
11004 (inflate_generic_class): Moved some code out of inflate_generic_type().
11005 (mono_class_inflate_generic_method): If we're already inflated,
11006 inflate the context and use the declaring method; ie. make sure
11007 the declaring method of an inflated method is always the generic
11009 (mono_class_create_from_typedef): Create
11010 `class->generic_container->context->gclass'.
11012 2004-12-24 Ben Maurer <bmaurer@ximian.com>
11014 * metadata-internals.h, marshal.c, reflection.c: More
11015 MonoGHashTable->GHashTable.
11017 * domain-internals.h, class.c: Change MonoGHashTable's into
11018 GHashTables for some cases where no gc stuff is used
11020 All users: update apis
11022 2004-12-23 Ben Maurer <bmaurer@ximian.com>
11024 * metadata.c (builtin_types): Make this `const'. Makes this get
11025 put into the shareable section.
11026 (mono_metadata_init): Casts to make gcc happy.
11028 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
11030 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
11032 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
11034 * icall.c: Added an internal call to retrieve the position and length
11035 of assembly-level declarative security attributes (RequestMinimum,
11036 RequestOptional and RequestRefuse). This is used by the Assembly class
11037 to re-create the corresponding permission sets.
11039 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11041 * marshal.c: fix the stelemref wrapper to be type correct
11044 2004-12-20 Ben Maurer <bmaurer@ximian.com>
11046 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
11047 to do key & 0x7fffffff. Hashtable already does this. It just
11048 results in longer code.
11050 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
11052 * appdomain.c: Bump corlib version.
11053 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
11054 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
11055 * reflection.c|h: Add functions to get declarative security infos
11056 (blob position and length) for assemblies, classes and methods.
11058 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
11060 * reflection.c: sort the constant table (bug #70693).
11062 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
11064 * object-internals.h, threads.c, domain.c: add accessors for
11065 the MonoThread and MonoDomain tls keys.
11067 2004-12-18 Martin Baulig <martin@ximian.com>
11069 * class.c (inflate_generic_type): If we're inflating a generic
11070 instance, set `ngclass->context->container = context->container';
11071 ie. the container we inflated into.
11073 * metadata.c (mono_metadata_parse_generic_param): Reflect above
11074 inflate_generic_type() changes.
11076 2004-12-17 Martin Baulig <martin@ximian.com>
11078 * class-internals.h
11079 (MonoGenericClass): Replaced `MonoType *generic_type' with
11080 `MonoClass *generic_class'. Removed `dynamic_info'; if
11081 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
11082 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
11084 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
11086 * exception.c (mono_exception_from_token): New helper function.
11088 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
11090 * assembly.c (mono_assembly_load_with_partial_name): Call
11091 mono_assembly_loaded before invoking the preload hooks. Fixes
11094 * object-internals.h (MonoThread): Change culture_info and
11095 ui_culture_info into an array.
11097 * threads.c: Cache culture info objects from more than one appdomain.
11099 * threads.c threads-types.h icall.c: Add icalls for manipulating the
11100 current UI culture.
11102 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
11104 * threads.h threads.c appdomain.c: Clear the culture_info field of
11105 all threads during unloading if they point to an object in the dying
11108 2004-12-13 Ben Maurer <bmaurer@ximian.com>
11110 * culture-info.h (TextInfoEntry): New struct
11111 * object-internals.h: sync with managed
11112 * locales.c: fill the `text_info_data' field
11113 * culture-info-tables.h: update
11115 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
11117 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
11120 2004-12-12 Ben Maurer <bmaurer@ximian.com>
11122 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
11123 (ves_icall_ModuleBuilder_getMethodToken): Ditto
11125 2004-12-12 Martin Baulig <martin@ximian.com>
11127 * mono-debug-debugger.c (write_type): If we're an enum and the
11128 builtin types have already been initialized, call mono_class_init().
11130 2004-12-11 Martin Baulig <martin@ximian.com>
11132 * metadata.c (mono_metadata_load_generic_params): Added
11133 `MonoGenericContainer *parent_container' argument; automatically
11134 compute `container->is_method'; pass the correct owner to
11137 * reflection.c (compare_genericparam): Sort the GenericParam table
11138 according to increasing owners.
11140 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11142 * profiler.c: allow disabling the default profiler.
11144 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
11146 * decimal.c, icall.c: allow disabling System.Decimal support.
11148 2004-12-09 Marek Safar <marek.safar@seznam.cz>
11150 * reflection.c: Add support for null attribute arguments.
11152 2004-12-09 Martin Baulig <martin@ximian.com>
11154 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
11155 names to get rid of compiler warnings.
11157 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11159 * marshal.c (mono_marshal_get_struct_to_ptr): Call
11160 mono_marshal_load_type_info (). Fixes #69625.
11161 (mono_marshal_get_ptr_to_struct): Likewise.
11163 2004-12-08 Martin Baulig <martin@ximian.com>
11165 * mono-debug.h: Bumped version number to 47.
11167 * mono-debug-debugger.c
11168 (mono_debugger_event_handler, mono_debugger_event): Take two
11169 guint64 arguments insteed of a gpointer and a guint32.
11171 2004-12-08 Martin Baulig <martin@ximian.com>
11173 * debug-mono-symfile.h
11174 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
11175 `address' to `native_offset'.
11177 2004-12-08 Martin Baulig <martin@ximian.com>
11179 * class.c (mono_class_create_from_typespec): Only inflate if we
11180 either have `context->gclass' or `context->gmethod'.
11182 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11184 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
11186 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
11188 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
11190 * reflection.c (mono_assembly_get_object): Remove the workaround put
11191 in for the release.
11193 * appdomain.c: Use the corlib_internal field from MonoAssembly.
11195 * appdomain.c: Bump corlib version.
11197 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
11198 be visible in other appdomains.
11200 2004-12-07 Ben Maurer <bmaurer@ximian.com>
11202 * threads.c: Interlocked inc and dec for longs were messed up,
11203 use a KISS based impl for this. Fixes 70234
11205 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
11207 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
11209 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11211 * icall.c: fix to follow policy not to allow struct
11212 arguments in icalls.
11214 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11216 * process.c: make the patch that handles spaces in file paths work
11217 on mono/windows too.
11219 2004-12-06 Martin Baulig <martin@ximian.com>
11221 * class.c (mono_class_create_generic): Call
11222 mono_class_setup_supertypes() if we're dynamic.
11223 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
11225 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
11227 * object-internals.h: Add new fields to MonoThread.
11229 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11231 * icall.c threads-types.h threads.c: Add new icalls.
11233 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
11235 * object-internals.h (MonoReflectionAssembly): Sync object layout with
11238 * appdomain.c: Bump corlib version.
11240 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
11241 internal assemblies. Fixes #69181.
11243 2004-12-05 Martin Baulig <martin@ximian.com>
11245 * class.c (mono_class_inflate_generic_signature): Make this a
11246 no-op if `context' is NULL or we don't have any type parameters;
11247 also copy `sentinelpos'.
11249 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
11251 * image.c: Add unbox_wrapper_cache.
11253 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
11255 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
11256 function generator.
11258 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
11261 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
11263 2004-12-04 Martin Baulig <martin@ximian.com>
11265 * loader.c (mono_method_get_signature_full): New public function;
11266 like mono_method_get_signature(), but with an additional
11267 `MonoGenericContext *' argument.
11269 * class.c (mono_class_inflate_generic_signature): Formerly known
11270 as inflate_generic_signature(); make this public.
11272 2004-12-04 Martin Baulig <martin@ximian.com>
11275 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
11276 instead of a `MonoGenericContainer *'.
11277 (mono_metadata_parse_array_full): Likewise.
11278 (mono_metadata_parse_signature_full): Likewise.
11279 (mono_metadata_parse_method_signature_full): Likewise.
11280 (mono_metadata_parse_generic_inst): Likewise.
11281 (mono_metadata_parse_generic_param): Likewise.
11282 (mono_metadata_parse_mh_full): Likewise.
11283 (mono_type_create_from_typespec_full): Likewise.
11285 2004-12-03 Martin Baulig <martin@ximian.com>
11287 * class-internals.h (MonoGenericContainer): Replaced the
11288 `MonoGenericContext * pointer with a `MonoGenericContext'
11289 structure and made it the first element.
11291 2004-12-03 Martin Baulig <martin@ximian.com>
11294 (inflate_generic_type): Set the `context->container' when creating
11295 a new MonoGenericContext.
11296 (mono_class_inflate_generic_method): Likewise.
11297 (mono_class_create_from_typespec): Just use `context->container'
11298 to get the container.
11300 * loader.c (method_from_methodspec): Set `context->parent' from
11301 `context->container' - and if that's a method container, use its
11302 parent. Also set the `context->container' when creating a new
11303 MonoGenericContext.
11304 (mono_get_method_from_token): Use just `context->container' to get
11307 * metadata.c (do_mono_metadata_parse_generic_class): Also set
11308 `gclass->context->container'.
11310 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
11311 the `context->container' when creating a new MonoGenericContext.
11313 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
11315 * reflection.c (compare_genericparam): Sort params with identical
11316 owner by their number. Fixes gen-111 on sparc.
11318 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
11320 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
11321 around the domain changes.
11323 * appdomain.c (mono_domain_unload): Handle the case when the thread
11324 calling Unload is itself being aborted during unloading. Fixes #70022.
11326 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
11328 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
11329 checkpoint_func as an icall so it gets a wrapper.
11330 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
11331 in the cross-appdomain wrappers too.
11333 * threads.c (mono_thread_has_appdomain_ref): Make this public.
11335 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
11337 * reflection.c: Fix some memory leaks.
11339 2004-12-02 Martin Baulig <martin@ximian.com>
11341 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
11343 * metadata.c (generic_class_cache): New static hashtable.
11344 (mono_metadata_lookup_generic_class): New public method.
11346 2004-12-02 Martin Baulig <martin@ximian.com>
11348 * class.c (mono_class_create_from_typedef): Call
11349 mono_class_setup_parent() and mono_class_create_mono_type() before
11350 parsing the interfaces.
11352 2004-12-02 Martin Baulig <martin@ximian.com>
11354 * metadata.c (generic_inst_cache): New static hashtable.
11355 (mono_metadata_lookup_generic_inst): New public function.
11356 (mono_metadata_inflate_generic_inst): New public function.
11357 (mono_metadata_parse_generic_inst): New public function.
11358 (do_mono_metadata_parse_generic_class): Use the new
11359 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
11360 since this'll also use the cache.
11362 * reflection.c (mono_reflection_bind_generic_method_parameters):
11363 Use mono_metadata_lookup_generic_inst() to use the new cache.
11365 * class.c (inflate_mono_type): Use
11366 mono_metadata_inflate_generic_inst() to inflate a generic
11367 instance; this'll also use the new cache.
11369 * loader.c (method_from_methodspec): Use
11370 mono_metadata_parse_generic_inst() and
11371 mono_metadata_inflate_generic_inst() rather than parsing it
11372 manually, so we can use the new cache.
11374 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
11376 * threads.c (wait_for_tids): Do not incorrectly free threads when
11377 the wait times out.
11379 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11381 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
11382 iter->args based on whether parameters are passed in registers (i.e.
11383 MONO_ARCH_REGPARMS is defined)
11385 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
11387 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
11388 the exception message. Fixes #70070.
11389 (method_from_methodspec): Fix warnings.
11391 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11393 * process.c: (complete_path) return the path quoted
11395 2004-12-01 Martin Baulig <martin@ximian.com>
11397 * class-internals.h (MonoGenericInst): New structure.
11398 (MonoGenericClass): Replaced `type_argc', `type_argv' and
11399 `is_open' with `MonoGenericInst *inst'.
11400 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
11401 `is_open' with `MonoGenericInst *inst'.
11403 2004-11-30 Martin Baulig <martin@ximian.com>
11405 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
11407 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
11408 to `generic_class_cache'.
11411 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
11412 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
11413 (mono_generic_inst_is_valuetype): Renamed to
11414 mono_generic_class_is_valuetype().
11416 * class-internals.h
11417 (MonoGenericInst): Renamed to MonoGenericClass.
11418 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
11419 (MonoClass): Renamed `generic_inst' to `generic_class'.
11420 (MonoGenericContext): Renamed `ginst' to `gclass'.
11422 * object-internals.h
11423 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
11425 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
11426 mono_reflection_generic_class_initialize().
11428 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
11429 now known as "System.Reflection.MonoGenericClass".
11430 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
11432 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
11434 * class-internals.h: Added a flag field to MonoClass to cache the
11435 declarative security attributes actions associated with the class.
11436 * domain-internals.h: Added booleans to MonoJitInfo to cache the
11437 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
11438 applicable to the JITted method.
11439 * reflection.c|h: Added functions to extract (as flags) which security
11440 actions are available (declaratively) for a method, class or assembly.
11441 * metadata.c|h: Added functions to search the declarative security
11442 table in the metadata.
11444 2004-11-29 Ben Maurer <bmaurer@ximian.com>
11446 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
11447 EXPORTEDTYPES are already in the class name cache, so there is no
11448 need to add extra code here to look at them. Just removes a bit of
11451 (ves_icall_System_Environment_get_TickCount): No need for #if
11452 WINDOWS. We already have the code in io-layer.
11454 2004-11-28 Martin Baulig <martin@ximian.com>
11457 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
11460 2004-11-27 Miguel de Icaza <miguel@ximian.com>
11462 * assembly.c (do_mono_assembly_open): Instead of having a
11463 conditional WITH_BUNDLE, incorporate support for bundles here, by
11464 having a global `bundles' variable holding a pointer to the actual
11467 (mono_register_bundled_assemblies): New API call used by the
11470 See mkbundle.1 for details.
11472 2004-11-27 Martin Baulig <martin@ximian.com>
11474 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
11475 the vtable for generic methods.
11477 2004-11-26 Martin Baulig <martin@ximian.com>
11480 (mono_metadata_generic_method_hash): New public function.
11481 (mono_metadata_generic_method_equal): Likewise.
11483 * class-internals.h
11484 (MonoGenericContainer): Added `GHashTable *method_hash'.
11486 * reflection.c (ReflectionMethodBuilder): Added
11487 `MonoGenericContainer *generic_container'.
11488 (reflection_methodbuilder_to_mono_method): Don't create a new
11489 MonoGenericContainer each time we're called.
11490 (mono_reflection_bind_generic_method_parameters): Use
11491 `container->method_hash' to cache the results so we don't create a
11492 different method if we're called several times with the same
11495 * loader.c (method_from_methodspec): Use the new
11496 `container->method_hash' here, too.
11498 2004-11-26 Martin Baulig <martin@ximian.com>
11500 * class.c (inflate_generic_signature): Correctly compute
11501 `res->has_type_parameters'.
11502 (mono_class_vtable): Use the `has_type_parameters' flag to
11503 determine whether we're a generic method.
11505 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
11507 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
11509 * object.c (mono_runtime_run_main): Fix a small memory leak.
11511 2004-11-25 Martin Baulig <martin@ximian.com>
11513 * class.c (set_generic_param_owner): Fixed the loop.
11515 2004-11-25 Martin Baulig <martin@ximian.com>
11517 * object.c (mono_class_vtable): Don't create any JIT wrappers for
11520 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
11522 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
11523 names. Fixes #69787.
11525 2004-11-24 Martin Baulig <martin@ximian.com>
11527 * class.c (mono_class_create_generic_2): If we don't have a
11528 `ginst->parent', inflate `gklass->parent' to get our parent.
11530 2004-11-24 Martin Baulig <martin@ximian.com>
11532 * reflection.c (compare_genericparam): Correctly sort the
11533 GenericParam table; fixes #69779.
11535 2004-11-23 Ben Maurer <bmaurer@ximian.com>
11537 * reflection.c: When writing a PE file, don't create a huge
11538 buffer in memory. Just write the arrays we have to the file.
11539 This reduces memory usage.
11541 * metadata-internals.h: MonoDynamicStream pefile is no longer used
11544 2004-11-17 Martin Baulig <martin@ximian.com>
11546 * class.c (mono_class_init): Don't setup `class->parent' for
11547 dynamic instances; moved this to mono_class_generic_2().
11548 (mono_class_create_generic): Also set `klass->inited' for dynamic
11550 (mono_class_create_generic_2): Don't do anything for dynamic
11551 generic instances. Set `klass->parent' here and also call
11552 mono_class_setup_parent() here.
11554 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
11555 `MonoType *parent' argument; set `ginst->parent' before calling
11556 mono_class_create_generic_2(), so we set the correct parent.
11558 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
11560 * reflection.c: allow getting attributes from ModuleBuilder
11563 2004-11-17 Martin Baulig <martin@ximian.com>
11565 * class.c (mono_class_create_from_typedef): If a type parameter is
11566 inherited from an outer class, set its owner to that class.
11568 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
11570 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
11571 for (int*) written size. This fixes bug #69592.
11573 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
11575 * icall.c: Added IsAuthenticodePresnet internal call.
11576 * image.c|h: New function that check a MonoImage for an Authenticode
11577 signature in the certificate PE data directory.
11578 * security.c|h: New internal call to ask the runtime if an
11579 Authenticode signature seems referenced in the PE header.
11581 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
11583 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
11585 * reflection.c (mono_image_create_pefile): Free the assembly streams
11586 after writing out the assembly file.
11588 * object.c (mono_runtime_run_main): Fix small memory leak.
11590 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
11591 property access modifiers. Fixes #69389.
11593 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11595 * domain.c, object.c, object-internals.h, domain-internals.h,
11596 object.h, marshal.c: keep dynamic code info per domain.
11598 2004-11-15 Martin Baulig <martin@ximian.com>
11600 * class.c (mono_type_get_name_recurse): Put type arguments in
11601 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
11604 2004-11-15 Martin Baulig <martin@ximian.com>
11606 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
11607 (mono_class_setup_vtable): When computing `the_cname' for a
11608 generic instance, don't include the namespace since we'd otherwise
11611 2004-11-15 Martin Baulig <martin@ximian.com>
11613 * class.c (mono_class_create_generic): Changed return type to void.
11614 (mono_class_create_generic_2): New public function; setup
11615 `class->method', `class->field' and `class->interfaces' here
11616 instead of in mono_class_init().
11618 * class.h (mono_class_create_generic): Moved to class-internals.h.
11620 2004-11-14 Ben Maurer <bmaurer@ximian.com>
11622 * reflection.c (mono_image_create_pefile): take a file HANDLE.
11623 rather than writing to memory, write to this file. Right now,
11624 we are just writting into a buffer, and copying that. However
11625 we can avoid the buffer later.
11627 (mono_dynamic_stream_reset): new function
11629 * icall.c, object-internals.h: update for the above.
11631 2004-11-13 Ben Maurer <bmaurer@ximian.com>
11633 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
11634 have been using gc'd memory. First it is slower, unlikely
11635 the comment in the source code said, secondly, it increases
11636 our footprint to do it in the gc.
11638 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
11639 the method so that it does not have to copy to managed code.
11641 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
11643 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
11645 2004-11-12 Martin Baulig <martin@localhost>
11647 * reflection.c (mono_image_create_token): Allow generic method
11648 definitions here, since they may appear in an `.override'; see
11649 gen-98/gen-99 for an example.
11651 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
11653 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
11656 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
11659 2004-11-11 Martin Baulig <martin@ximian.com>
11661 * class.c (mono_class_setup_vtable): In an explicit interface
11662 implementation, the method name now includes the arity.
11664 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
11666 * object.c (mono_array_full_copy): Fix warning.
11668 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
11670 * appdomain.c: Removed look_for_method_by_name(). Use the new method
11671 mono_class_get_method_from_name() instead.
11673 * class-internals.h: Added two new types of wrappers.
11674 Added MonoRemotingTarget enum. Added new trampoline function type, which
11675 takes an additional MonoRemotingTarget value as parameter, so it is
11676 possible to request a trampoline for a specific target.
11678 * class.c: Added new mono_class_get_method_from_name() method.
11680 * class.h: In MonoRemoteClass, we can have now to vtables, one for
11681 general remoting sinks and one specific for cross domain calls.
11683 * debug-helpers.c: Added new wrapper names.
11685 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
11688 * image.c: Porperly delete value objects form the remoting invoke hashtable.
11690 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
11691 with several other methods (mono_marshal_get_xappdomain_dispatch,
11692 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
11693 and others) can generate a fast remoting wrapper for cross domain calls.
11694 More information can be found in docs/remoting.
11695 Other changes: Removed mono_find_method_by_name, and used
11696 mono_class_get_method_from_name instead.
11697 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
11698 is stored in the remoting invoke hashtable.
11700 * marshal.h: published the new method for getting the xdomain wrapper,
11701 and also added a method for getting the adequate wrapper for a given
11704 * object-internals.h, object.c: Added a couple of methods for capying and
11706 Modified mono_install_remoting_trampoline, which takes the new remoting
11707 trampoline that has a remoting target as parameter.
11708 mono_class_proxy_vtable now also takes a remoting target as parameter, and
11709 will return the most suitable vtable for the target.
11710 Added mono_remote_class_vtable, which returns the vtable of a remote class
11711 (which can be the normal remoting vtable or the xdomain vtable).
11713 * threads.c: the xdomain invoke and dispatch wrappers must also be
11714 protected against interruptions.
11716 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11718 * icall.c: use memmove in BlockCopyInternal when the source and
11719 destination arrays are the same.
11721 2004-11-09 Martin Baulig <martin@ximian.com>
11723 * class-internals.h (MonoGenericContainer): Removed `method' and
11724 `signature', replaced them with `is_method' and `is_signature'
11725 flags. Added `context'.
11727 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
11728 instead of a `MonoGenericContainer *'.
11730 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
11731 for dynamic type parameters.
11732 (mono_metadata_load_generic_params): Setup `container->context'.
11734 * reflection.c (mono_reflection_setup_generic_class): Setup
11735 `tb->generic_container->context'.
11736 (do_mono_reflection_bind_generic_parameters): Use
11737 mono_class_inflate_generic_type() to correctly inflate types,
11738 rather than using our own hack just for MONO_TYPE_VAR.
11740 2004-11-09 Martin Baulig <martin@ximian.com>
11742 * class.c (mono_class_inflate_generic_method): Small fix; don't
11746 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
11747 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
11748 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
11749 (ves_icall_Type_BindGenericParameters): Likewise.
11750 (ves_icall_Type_get_IsGenericInstance): Likewise.
11751 (ves_icall_Type_GetGenericParameterPosition): Likewise.
11752 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
11753 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
11754 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
11756 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
11758 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
11759 assembly versions and public key tokens. Fixes #69113.
11761 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
11763 * metadata.c: fix bug introduced with the type cache changes
11766 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
11768 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
11769 the MonoClass pointer instead of the token in exception clauses.
11770 * reflection.c: updates for the above and make the code not depend
11771 on the structure of MonoExceptionClause.
11773 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
11775 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
11776 Add support for dynamic assemblies. Fixes #69114.
11778 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
11780 2004-11-07 Ben Maurer <bmaurer@ximian.com>
11782 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
11783 since most only those methods use it. the code member of
11784 MonoMethodPInvoke was dead, so that can be removed too. Also,
11785 remove inline_count (again, not used), and move slot so that it
11786 can share bits with some other flags. This saves 8 bytes in the
11787 structure and gives us about 50 kb back for mcs helloworld.cs
11789 * *.[ch]: Do naming changes for the above.
11791 * loader.c (mono_method_get_header): Lazily init the header
11793 (mono_get_method_from_token): don't init the header here
11794 (mono_free_method): the header may never be allocated
11796 Overall, this saves 150 kb of unmanaged allocations
11797 for mcs helloworld.cs. That accounts for 10% of the unmanaged
11800 * loader.c, loader.h (mono_method_get_header): new accessor.
11802 * *.[ch]: use the above method. Prepares us to lazily load
11805 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
11806 three warnings, which are actual bugs (see 69206).
11808 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
11809 unused. Saves a cool 4 bytes / method.
11811 2004-11-06 Ben Maurer <bmaurer@ximian.com>
11813 * metadata.c (builtin_types): Add types for System.Object here.
11814 (mono_metadata_parse_type_full): Cache MonoType*'s that are
11815 for a class or valuetype from klass->this_arg or klass->byval_arg.
11817 On mcs for a hello world, this gets us down from 21836 MonoType's
11820 (mono_metadata_free_type): Account for the above change.
11822 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
11824 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
11825 exception instead of asserting if name is null.
11826 (ves_icall_System_AppDomain_GetData): Ditto.
11828 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
11830 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
11833 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
11834 Return NULL when the domain does not have entry_assembly set.
11836 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
11837 Add a 'resource_modules' argument.
11838 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
11840 * reflection.c (mono_reflection_create_runtime_class): Move setting
11841 of wastypebuilder here, so mono_get_type_object () returns a MonoType
11844 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
11845 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
11846 Throw an ArgumentNullException if 'ptr' is null.
11848 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
11849 assemblies here. Fixes #69020.
11851 2004-11-05 Geoff Norton <gnorton@customerdna.com>
11853 * reflection.c (build_compressed_metadata): Fix the previous patch for
11854 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
11857 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
11859 * assembly.c (mono_assembly_names_equal): Allow a match if one of
11860 the cultures is false. Fixes #69090.
11862 * reflection.c (build_compressed_metadata): Fix invalid memory read
11863 detected by valgrind.
11865 * reflection.c (mono_reflection_get_type): Avoid triggering a
11866 TypeResolve multiple times for the same type. Fixes #65577.
11868 2004-11-04 Ben Maurer <bmaurer@ximian.com>
11870 * marshal.c: Avoid using ldftn to call managed functions. It is
11871 much slower than just a call.
11873 * reflection.c (mono_module_get_object): free the basename we
11874 allocate here from glib.
11876 * reflection.c (ensure_runtime_vtable): make sure to free
11877 overrides. Also, we were allocating an array of MonoMethod not an
11878 array of MonoMethod*.
11880 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
11882 * image.c (mono_image_close): free image->guid here.
11884 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
11886 * reflection.c: Fix some spec conformance issues with the PE file
11887 structures so mcs compiled apps run on the Net 2.0 beta.
11889 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
11891 * string-icalls.c (ves_icall_System_String_ctor_encoding):
11892 Implement this. Fixes #67264.
11894 * debug-helpers.h debug-helpers.c marshal.c: Move
11895 mono_find_method_by_name to debug-helpers.c.
11897 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
11899 * object.c (mono_release_type_locks): type_initialization_hash is
11902 * reflection.c object.c object-internals.h: Fix warnings.
11904 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
11905 without accessors. Fixes #61561.
11907 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
11908 application base from the root domain if not set. Fixes #65641.
11909 (mono_runtime_init): Fix warning.
11911 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11913 * appdomain.c: call mono_thread_pool_init.
11914 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
11915 of worker threads based on the number of CPUs and the environment
11916 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
11917 for non-windows (windows) systems.
11919 2004-10-27 Chris Toshok <toshok@ximian.com>
11921 * mono-debug-debugger.c (write_class): don't call mono_class_init
11922 here, as even with the check for (!klass->init_pending), we get
11923 into a situation where we're hitting cycles in class
11924 initialization. Fixes #68816.
11926 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
11928 * image.c: Avoid overwriting values in the loaded_images_hash when an
11929 assembly is loaded multiple times. Fixes #61152.
11931 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
11932 so multiple satellite assemblies for the same name can be loaded.
11935 * mono_domain_assembly_preload: Actually return the loaded assembly,
11938 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
11939 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
11941 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
11942 pending finalizers are not invoked after the appdomain has been
11943 unloaded. Fixes #67862.
11945 2004-10-22 Martin Baulig <martin@ximian.com>
11947 * mono-debug-debugger.c
11948 (mono_debugger_runtime_invoke): Don't box valuetypes.
11950 2004-10-22 Chris Toshok <toshok@ximian.com>
11952 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
11953 don't hide private methods.
11955 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
11957 * icall.c: Allows the runtime to "share" (when known) the public key
11958 token of an assembly. This avoid the need to recalculate the token
11959 (from the public key) in managed code.
11961 2004-10-21 Chris Toshok <toshok@ximian.com>
11963 * debug-helpers.c (append_class_name): argh, revert last patch.
11965 2004-10-21 Chris Toshok <toshok@ximian.com>
11967 * debug-helpers.c (append_class_name): use '+' as the delimiter,
11968 not '/', so that it matches what the debugger uses to look up
11971 2004-10-21 Martin Baulig <martin@ximian.com>
11973 * mono-debug-debugger.c (mono_debugger_throw_exception): New
11974 public method; this is called each time an exception is thrown and
11975 allows the debugger to use exception catch points.
11977 2004-10-21 Martin Baulig <martin@ximian.com>
11979 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
11980 the stack pointer and the exception object in some struct and pass
11981 that to the debugger.
11983 2004-10-21 Chris Toshok <toshok@ximian.com>
11985 * mono-debug-debugger.c (do_write_class): add instance/static
11986 event support. We don't expose "raise" or "other" yet.
11987 (event_is_static): new method.
11989 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
11991 * mono-debug-debugger.c
11992 (mono_debugger_handle_exception): Remove
11993 bogus return value for fussy compilers.
11995 2004-10-20 Martin Baulig <martin@ximian.com>
11997 * mono-debug-debugger.c
11998 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
11999 (mono_debugger_handled_exception): Likewise.
12001 2004-10-20 Martin Baulig <martin@ximian.com>
12003 * mono-debug-debugger.h (MonoDebuggerEvent): Added
12004 MONO_DEBUGGER_EVENT_EXCEPTION.
12006 * mono-debug-debugger.c (mono_debugger_handle_exception): New
12007 public function to send the debugger a notification for an
12008 exception and inform it about a catch/finally clause.
12010 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
12012 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
12013 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
12016 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
12018 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
12020 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
12021 marshalled as [In,Out]. Fixes #58325.
12023 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
12025 * reflection.c (mono_method_body_get_object): Implement some fields.
12027 2004-10-12 Martin Baulig <martin@ximian.com>
12029 * reflection.c (mono_reflection_bind_generic_parameters): Small
12030 fix, correctly retrieve our parent from a generic instance.
12032 2004-10-12 Martin Baulig <martin@ximian.com>
12034 * metadata.c (mono_metadata_generic_param_equal): We always have
12038 (mono_class_from_generic_parameter): We need to have an owner.
12039 (my_mono_class_from_generic_parameter): Likewise.
12041 * reflection.c (mono_reflection_setup_generic_class): Renamed to
12042 mono_reflection_create_generic_class() and added a new
12043 mono_reflection_setup_generic_class().
12044 (mono_reflection_initialize_generic_param): If we're a nested
12045 generic type and inherited from the containing class, set our
12046 owner to the outer class.
12048 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
12050 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
12052 * reflection.c (mono_method_body_get_object): New function to create
12053 a MethodBody object.
12055 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
12057 2004-10-11 Martin Baulig <martin@ximian.com>
12059 * metadata.c (_mono_metadata_type_equal): Renamed to
12060 do_mono_metadata_type_equal() and made static.
12062 2004-10-11 Martin Baulig <martin@ximian.com>
12064 * appdomain.c: Bump corlib version number to 28.
12066 2004-10-10 Martin Baulig <martin@ximian.com>
12068 * class-internals.h
12069 (MonoGenericInst): Added `MonoGenericContainer *container'.
12070 (MonoGenericMethod): Likewise.
12071 (MonoGenericContext): Likewise.
12072 (MonoGenericParam): Added `MonoGenericContainer *owner'.
12075 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
12076 (do_mono_metadata_parse_generic_inst): Likewise.
12077 (mono_metadata_parse_type_full): New public method. This is the actual
12078 mono_metadata_parse_type() implementation - with an additional
12079 `MonoGenericContainer *' argument.
12080 (mono_metadata_parse_array_full): Likewise.
12081 (mono_metadata_parse_signature_full): Likewise.
12082 (mono_metadata_parse_method_signature_full): Likewise.
12083 (mono_metadata_parse_mh_full): Likewise.
12084 (mono_type_create_from_typespec): Likewise.
12085 (mono_metadata_interfaces_from_typedef_full): New public method;
12086 this is similar to the other _full() methods, but we take a
12087 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
12088 (mono_metadata_parse_generic_param): Take an additional
12089 `MonoGenericContainer *' argument and lookup the MonoGenericParam
12090 from that container.
12091 (mono_metadata_generic_param_equal): New static method to compare
12092 two type parameters.
12093 (_mono_metadata_type_equal): New static method; takes an
12094 additional `gboolean signature_only' argument - if true, we don't
12095 compare the owners of generic parameters.
12096 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
12097 with a TRUE argument - do a signature-only comparision.
12099 * loader.c: Use the new _full() methods and pass the
12100 MonoGenericContainer to them.
12102 * object-internals.h (MonoReflectionTypeBuilder): Added
12103 `MonoGenericContainer *generic_container' field.
12104 (MonoReflectionMethodBuilder): Likewise.
12106 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
12108 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
12109 case initial images of dynamic assemblies.
12111 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
12113 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
12115 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
12116 length of event->other array.
12117 (typebuilder_setup_events): Ditto.
12119 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
12120 'assembly_by_name' and add an 'assemblies' list.
12122 * assembly.h assembly.c: Add a new search hook for determining whenever
12123 an assembly is already loaded. Use this instead of searching in the
12124 loaded_assemblies list.
12126 * domain.c appdomain.c: Implement the new search hook so loaded
12127 assemblies are now scoped by appdomain. Fixes #67727.
12129 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
12131 * threads.c (mono_thread_attach): Initialize synch_lock field so
12132 mono_thread_detach works again.
12134 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
12135 'lib' too. Fixes #63130.
12137 2004-10-06 Jackson Harper <jackson@ximian.com>
12139 * culture-info-tables.h: regenerated.
12141 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
12143 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
12144 implemented by other interfaces in the result. Fixes #65764.
12146 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12147 Handle unloadable modules without crashing.
12149 * image.c (load_modules): Revert the previous patch since modules must
12150 have a fixed index inside the array.
12152 * image.c (load_modules): Don't include native modules in the modules
12155 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
12157 * reflection.h: Add param_defaults field.
12159 * reflection.c: Add support for parameter defaults in dynamic methods.
12162 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
12163 an empty string when a type has no namespace. Fixes #64230.
12165 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
12167 * tabledefs.h: Added "internal" security actions to support non-CAS
12168 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
12169 Note: they do not seems to be used anymore in 2.0 (new metadata format)
12171 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
12173 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
12174 constructor of abstract class. Fixes #61689.
12176 2004-10-04 Martin Baulig <martin@ximian.com>
12178 * class-internals.h (MonoGenericContainer): New type.
12179 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
12180 `MonoGenericContainer *generic_container'.
12181 (MonoClass): Replaced `gen_params' and `num_gen_params' with
12182 `MonoGenericContainer *generic_container'.
12184 * metadata.c (mono_metadata_load_generic_params): Return a
12185 `MonoGenericContainer *' instead of a `MonoGenericParam *';
12186 removed the `num' argument.
12188 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
12190 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
12191 for dynamic images.
12193 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
12196 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
12198 * reflection.c: Save pe_kind and machine values into the generated
12201 * appdomain.c: Bump corlib version number.
12203 * object-internals.h: Reorganize layout of LocalBuilder.
12205 * class-internals.h class.c (mono_class_get_implemented_interfaces):
12206 New helper function.
12208 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
12209 created MonoType for dynamic types. Fixes #66180.
12211 2004-10-02 Ben Maurer <bmaurer@ximian.com>
12213 * threadpool.c: the ares hashtable needs a critical section around it.
12214 this prevents some nasty segfaults
12216 2004-10-02 Massimiliano Mantione <massi@ximian.com>
12218 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
12219 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
12222 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
12224 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
12226 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
12228 * image.c: Always canonicalize image file names, to avoid loading
12229 the same assembly twice when referenced using a relative path.
12231 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
12233 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
12235 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
12237 * marshal.c: Fix warnings.
12239 2004-09-29 Geoff Norton <gnorton@customerdna.com>
12241 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
12242 attempting to marshal the delegate_trampoline as the method_addr.
12243 This patch has a static hashtable of marshalled delegates so that
12244 we can map delegate_trampoline addresses back to delegates. This
12245 allows a delegate passed to managed code to be passed back into native
12248 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
12250 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
12252 * reflection.c (method_encode_code): Align method headers properly.
12255 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
12257 * marshal.c: In the runtime invoke wrapper, reset the abort
12258 exception if it is cached. This avoids the automatic rethrowal of
12259 the exception after the catch of the wrapper. Also check for pending
12260 interruptions before calling the managed method. This is done using
12261 the new method emit_thread_force_interrupt_checkpoint, since the
12262 normal checkpoint method is ignored when running the invoke wrapper.
12263 * object.c: If the abort exception is rethrown, set the abort_exc
12264 field of the thread, so it will be rethrown aftere every catch.
12265 * threadpool.c: Only run an interruption checkpoint if what has been
12266 requested is a stop of the thread (aborts will be ignored).
12267 * threads.c: By default, a thread will now never be interrumped while
12268 running the runtime invoke wrapper (this ensures that runtime_invoke
12269 will always return to the caller if an exception pointer is provided).
12270 There is a new special method mono_thread_force_interruption_checkpoint()
12271 to force an interruption checkpoint even if running a protected
12272 wrapper, which is used by the same runtime invoke wrapper to do a check
12275 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
12277 * object.c, object-internals.h: Implemented mono_release_type_locks,
12278 which releases the cctor locks held by a thread.
12279 * threads.c, threads.h: In thread_cleanup, release cctor locks held
12280 by a thread. Added mono_thread_exit() method to be used to safely stop
12283 2004-09-28 Raja R Harinath <rharinath@novell.com>
12285 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12286 Move null check before dereference. Avoid indexing beyond the end
12287 of the 'modules' array.
12289 2004-09-28 Raja R Harinath <rharinath@novell.com>
12291 * metadata-internals.h (MonoImage): Add module_count field.
12292 * image.c (load_modules): Set image->module_count.
12293 (mono_image_load_file_for_image): Use image->module_count.
12294 * reflection.c (mono_image_load_module): Append to image->modules array
12295 of dynamic assembly.
12296 (mono_module_get_object): Fix loop to actually increment index.
12297 Use image->module_count.
12298 * assembly.c (mono_assembly_load_references): Use image->module_count.
12299 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12302 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
12304 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
12305 Avoid assert on generic types.
12307 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
12309 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
12311 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
12313 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
12314 function to convert a MarshalSpec structure to its managed counterpart.
12316 * reflection.c: Fix warnings.
12318 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
12321 * icall.c (mono_create_icall_signature): Fix build.
12323 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
12325 * icall.c: Add MakePointType icall.
12327 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
12330 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12332 * threadpool.c: reuse allocated slots in the queue.
12334 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
12336 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
12338 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
12340 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
12343 * tabledefs.h: Add constants for pinvoke attributes BestFit and
12344 ThrowOnUnmappableChar.
12346 * icall.c (ves_icall_Type_GetPacking): New icall.
12348 2004-09-24 Martin Baulig <martin@ximian.com>
12350 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
12352 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12355 (mono_domain_set): allow setting a domain that is being unloaded.
12356 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
12359 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
12361 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
12362 the GetCustomAttributes icall.
12364 2004-09-23 Martin Baulig <martin@ximian.com>
12366 * object-internals.h (MonoReflectionGenericParam): Replaced
12367 'has_ctor_constraint', `has_reference_type' and `has_value_type'
12368 with `guint32 attrs'.
12370 2004-09-23 Martin Baulig <martin@ximian.com>
12372 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
12374 2004-09-23 Martin Baulig <martin@ximian.com>
12376 * object-internals.h (GenericParameterAttributes): New enum.
12378 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
12380 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
12382 * class.c (init_events): Fill out event->other field.
12384 * class.c: Fix warnings.
12386 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
12388 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12390 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
12391 walk which doesn't supply the IL offset.
12393 2004-09-22 Martin Baulig <martin@ximian.com>
12395 * reflection.c (mono_reflection_setup_internal_class): If we're
12396 System.ValueType, System.Object or System.Enum, set
12397 `klass->instance_size' and create the vtable.
12398 (mono_reflection_create_internal_class): If we're an enum type,
12399 get the base class from our current corlib.
12401 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
12403 * reflection.h (MonoResolveTokenError): New type.
12405 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
12408 * icall.c: Add an 'error' argument to the ResolveToken icalls.
12410 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
12412 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
12413 Support also calling constructors, but only for already allocated objects.
12415 2004-09-17 Geoff Norton <gnorton@customerdna.com>
12417 * reflection.c (type_get_qualified_name): If the klass is null
12418 return the typename to avoid a NullRefEx.
12419 (encode_cattr_value): Get the qualified name of the boxed type,
12420 not the underlying enumtype. Fixes #62984.
12422 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
12424 * marshal.c: Fix problems with previous checkin.
12426 2004-09-21 <vargaz@freemail.hu>
12428 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
12429 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
12431 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
12433 2004-09-21 Geoff Norton <gnorton@customerdna.com>
12435 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
12436 should only return a type for pointers, arrays, and passbyref types.
12439 2004-09-21 Martin Baulig <martin@ximian.com>
12441 * domain.c (mono_debugger_check_runtime_version): New public
12444 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
12446 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
12448 * reflection.c: Added missing sort to the declarative security
12449 attributes table. MS implementation stops seeing the attributes if the
12450 token number regress in the table (as shown by ildasm and permview).
12452 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
12454 * object-internals.h (MonoReflectionModule): Add 'token' field.
12456 * reflection.c (mono_reflection_get_token): Add support for Module
12458 (mono_module_get_object): Set 'token' field.
12459 (mono_module_file_get_object): Set 'token' field.
12461 * icall.c: Add new Assembly and Module icalls.
12463 * appdomain.c: Bump corlib version.
12465 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
12467 * loader.h loader.c class.h class.c: Add helper functions for obtaining
12468 tokens of metadata objects.
12470 * reflection.h reflection.c (mono_reflection_get_token): New function
12471 to obtain the token of a metadata object.
12473 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
12475 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
12477 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
12479 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
12481 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
12483 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
12484 * object-internals.h: Added 3 MonoArray* members to MonoReflection
12485 AssemblyBuilder to access the permissions set in the class lib.
12486 * reflection.c: Added security attributes encoding step in
12487 mono_image_build_metadata.
12488 * tabledefs.h: Added new security actions defined in 2.0:
12489 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
12491 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
12493 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
12496 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
12498 * locales.c: nullify the ICU_collator member of CompareInfo when it is
12499 finalized. There where random SIGSEVs at program termination, when
12500 an object being finalized was trying to do a string comparison and
12501 the current culture was already finalized.
12503 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12505 * threads.c: call thread_cleanup before finishing the thread if we get
12508 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
12510 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
12511 assemblies from the parent. Fixes #65665.
12513 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
12515 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
12518 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
12520 * reflection.h: add prototype for mono_get_dbnull_object
12521 * reflection.c: add prototypes for get_default_param_value_blobs
12522 and mono_get_object_from_blob for fussier compilers
12524 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
12526 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
12527 false deadlock checks in class initialization.
12529 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
12531 * image.c (mono_image_addref): Fix comment.
12533 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
12536 2004-09-12 Jambunathan K <kjambunathan@novell.com>
12538 * reflection.c (mono_param_get_objects): Modified to return
12539 ParameterInfo.DefaultValue object.
12541 (get_default_param_value_blobs):
12542 (mono_get_object_from_blob):
12543 (mono_get_dbnull_object): New helper routines.
12545 * object.c (mono_get_constant_value_from_blob): New helper routine
12546 carved out from get_default_field_value ()
12548 * object-internals.h (mono_get_constant_value_from_blob): Added
12549 function declaration.
12551 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
12553 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
12554 referenced assemblies. Fixes #62135.
12556 * exception.h exception.c (mono_get_exception_file_not_found2): New
12559 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
12561 * class.h class.c: Add mono_type_get_underlying_type ().
12563 2004-09-09 Geoff Norton <gnorton@customerndna.com>
12565 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
12566 Fix GetTypes() to support dynamically created assemblies.
12568 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
12570 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
12572 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
12575 * reflection.h reflection.c loader.c: Allow dynamic construction of
12576 pinvoke methods. Fixes #65571.
12578 * reflection.c (mono_reflection_get_type): Revert previous change since
12579 it causes regressions.
12581 2004-09-08 Martin Baulig <martin@ximian.com>
12583 * class.c (class_compute_field_layout): Don't call
12584 mono_class_layout_fields() for open generic instances.
12586 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
12587 * threads.c appdomain.c: fix typo in GC macro
12589 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12591 * threads.c: don't call mono_thread_detach() in start_wrapper(),
12592 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
12594 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
12596 * image.c (mono_image_close): Applied patch from
12597 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
12598 assembly is loaded multiple times from data.
12600 * image.c (mono_image_open): Fix warning.
12602 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12604 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
12605 once. Fixes #58334.
12607 * reflection.c (mono_reflection_create_runtime_class): Initialize
12608 klass->nested_classes. Fixes #61224.
12610 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12612 * threads.c: sched_yield() on exit, to allow threads to quit.
12614 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12616 * object.c (mono_unhandled_exception): Remove leftover debug code.
12618 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
12620 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
12622 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12624 * marshal.c (emit_marshal_array): Really null terminate string arrays.
12626 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
12628 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12630 * marshal.c (emit_marshal_array): Null terminate string arrays.
12632 * marshal.c (raise_auto_layout_exception): Fix warning.
12634 * reflection.c (mono_param_get_objects): Initialize the default value
12635 with DBNull.Value, not null. Fixes #62123.
12637 2004-09-01 Miguel de Icaza <miguel@ximian.com>
12639 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
12640 throw an exception with a cute explanation.
12642 2004-09-06 Dick Porter <dick@ximian.com>
12644 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
12645 Close the new process's thread handle, as we don't use it. The
12646 handle stays around forever otherwise.
12648 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12650 * object.c (arith_overflow): Fix warning.
12652 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
12653 calling conventions in method refs. Fixes #65352.
12655 * reflection.c: Fix warnings.
12657 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
12659 * icall.c: Add a new icall for Array.Clear
12661 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
12663 * object.c: When allocating an array, we have to throw
12664 an overflow exception if any of the lengths are < 0.
12666 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12668 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
12669 properly. Also move implementation of string array marshalling to
12670 managed code. Fixes #42316.
12672 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12674 * assembly.c: provide more information when loading an assembly fails.
12676 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12678 * filewatcher.c: don't expect the development fam package to be
12681 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
12683 * marshal.c: Make a copy of the signature cookie since it will be
12684 freed by the caller.
12686 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
12688 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
12690 * metadata.c (mono_metadata_free_marshal_spec): New function to free
12693 * marshal.c: More refactoring.
12695 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
12698 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
12700 * object.c: In mono_message_invoke, fill the output parameter array after
12701 calling the managed method (it was done before the call). This fixes
12704 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12706 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
12709 2004-09-02 Martin Baulig <martin@ximian.com>
12711 * class.c (mono_class_instance_size): Don't allow generic type
12712 definitions or open generic instances.
12713 (mono_class_array_element_size): If we're a value type, call
12714 mono_class_instance_size() on the original class.
12716 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
12717 handle generic instances.
12719 * mono-debug-debugger.c (write_type): Handle generic instances
12722 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12724 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
12725 the allocation request fails. Fixes #65089.
12727 * object.c (mono_runtime_free_method): Do not call mono_free_method.
12729 * object.c (mono_runtime_free_method): New function to free a dynamic
12732 * marshal.c (mono_delegate_free_ftnptr): New function to free the
12733 delegate trampoline.
12735 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
12736 with hasthis as dynamic,
12738 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
12740 * domain.c (mono_jit_info_table_remove): New function to remove an
12741 entry from the jit info table.
12743 * class-internals.h (MonoMethod): Add 'dynamic' field.
12745 * loader.c: Fix warnings.
12747 2004-09-01 Martin Baulig <martin@ximian.com>
12749 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
12750 instead of mono_debugger_lock() because the latter one is a no-op
12751 unless running in the debugger.
12753 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
12755 * class.c (class_compute_field_layout): Classes with auto-layout or
12756 reference fields are not blittable.
12758 2004-09-01 Dick Porter <dick@ximian.com>
12760 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
12761 mono_image_get_filename() to get the assembly location.
12764 * metadata.h: Fix compile warnings
12766 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
12768 * class.c (class_compute_field_layout): System.Object is blittable.
12770 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
12771 as in/out. Fixes #59909.
12773 2004-09-01 Martin Baulig <martin@ximian.com>
12775 * metadata.h (MONO_TYPE_ISREFERENCE): Call
12776 mono_metadata_generic_inst_is_valuetype() if we're a generic
12777 instance to check whether our underlying type is a reference type.
12779 2004-09-01 Martin Baulig <martin@ximian.com>
12781 * metadata.c (mono_type_size): If we're a generic instance, call
12782 mono_class_value_size() for value types.
12784 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
12786 * marshal.c: Implement more custom marshalling functionality. Fixes
12789 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12791 * mono-debug.c, debug-mono-symfile.c: add some locking love.
12793 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
12795 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
12797 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
12799 * icall.c: Fix some warnings.
12801 * threads.c (abort_appdomain_thread): Fix unref errors.
12802 (mono_thread_current): Fix THREAD_DEBUG define.
12804 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
12806 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
12808 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
12810 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
12812 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
12815 2004-08-28 Martin Baulig <martin@ximian.com>
12818 (mono_metadata_generic_inst_is_valuetype): New public function.
12820 * metadata.h (MONO_TYPE_ISSTRUCT): Call
12821 mono_metadata_generic_inst_is_valuetype() if we're a generic
12822 instance to check whether our underlying type is a valuetype.
12824 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
12826 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
12829 2004-08-25 Martin Baulig <martin@ximian.com>
12831 * loader.c (mono_get_method_from_token): Abstract methods can also
12832 be generic and thus have type parameters.
12834 * metadata-internals.h
12835 (MonoDynamicImage): Added `GPtrArray *gen_params'.
12837 * reflection.c (mono_image_get_generic_param_info): Don't create a
12838 metadata row, just add an entry to the `gen_params' array.
12839 (build_compressed_metadata): Sort the `gen_params' array and then
12840 actually create the metadata.
12842 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12844 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
12846 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
12848 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
12850 2004-08-24 Martin Baulig <martin@ximian.com>
12852 * class.cs (mono_class_is_subclass_of): Like an interface, a
12853 generic instance also derives from System.Object.
12855 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
12857 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
12858 custom modifiers to be in any order. Fixes #61990.
12860 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
12862 * object.c: Register mono_object_new_fast icall.
12864 * object.c (mono_class_get_allocation_ftn): Return to calling
12865 mono_object_new_fast, since it seems faster to compute the object
12866 size in unmanaged code than passing it as a parameter.
12868 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
12870 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
12871 this function with Boehm as the oom handler, so we don't have to check
12872 the result of GC_malloc.
12874 * object.c: Remove checks for oom.
12876 * object.h object.c (mono_class_get_allocation_ftn): New function to
12877 return the icall which can be used to allocate an instance of a given
12880 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
12882 * class-internals.h: Add 'enabled' field.
12884 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
12886 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
12888 2004-08-18 Jambunathan K <kjambunathan@novell.com>
12889 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
12892 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
12894 * appdomain.c: use the Tls function for appdomain too,
12895 at Zoltan's request. Actually return in mono_context_get
12897 * appdomain.c, profiler.c, threads.c: use __thread
12899 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
12901 * appdomain.c threads.c: Call GC_CreateThread on windows.
12903 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
12904 multiple libraries since this don't work on windows.
12906 2004-08-18 Martin Baulig <martin@ximian.com>
12908 * class-internals.h
12909 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
12912 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
12913 MonoMethodNormal since we also need it for abstract and interface
12917 (build_compressed_metadata): Sort the GenericParam table.
12918 (mono_image_create_token): Added `gboolean create_methodspec'
12919 argument; this is false when generating a MethodImpl token.
12920 (reflection_methodbuilder_to_mono_method): Abstract and interface
12921 methods may also have generic parameters.
12923 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
12925 * appdomain.c: thread local alloc
12927 2004-08-17 Martin Baulig <martin@ximian.com>
12929 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
12932 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
12935 * class.c (mono_type_get_full_name): New public function.
12936 (mono_type_get_name): Don't include the type arguments.
12938 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
12940 * Makefile.am: Build static versions of libmetadata and libmonoruntime
12941 for inclusion into the mono executable.
12943 2004-08-16 Martin Baulig <martin@ximian.com>
12945 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
12946 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
12948 2004-08-14 Martin Baulig <martin@ximian.com>
12950 * class.c (dup_type): Also copy the `byref' field.
12952 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
12954 * reflection.c (create_dynamic_mono_image): Revert the last change
12955 since it breaks bootstrap.
12957 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
12959 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
12961 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
12962 not free them with g_free.
12964 2004-08-11 Martin Baulig <martin@ximian.com>
12966 * reflection.c (mono_reflection_setup_internal_class): Also call
12967 mono_class_setup_mono_type() if we already have a `tb->type.type'.
12969 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
12971 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
12972 called during default (first) AppDomain creation. Keep track of
12973 Evidence when loading assemblies.
12975 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12977 * opcodes.c, opcodes.h: reduce runtime relocations.
12979 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
12981 * culture-info.h, locales.c: fixes and chages to sue the new
12982 optimized format of the locale data.
12983 * culture-info-tables.h: regenerated.
12985 2004-08-06 Geoff Norton <gnorton@customerdna.com>
12987 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
12989 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
12991 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
12992 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
12993 * domain-internals.h: icall declaration.
12994 * icall.c: icall registration.
12995 * object-internals.h: New fields in MonoAssembly for CAS.
12997 2004-08-05 Duncan Mak <duncan@ximian.com>
12999 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13002 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13004 * reflection.c: fix to deal with object[] arrays in custom ctors
13007 2004-08-05 Martin Baulig <martin@ximian.com>
13009 * class.c (mono_class_array_element_size): Added support for
13010 generic instances and correctly handle "recursive" types.
13012 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13014 * assembly.c: Fix warnings.
13016 2004-08-04 Martin Baulig <martin@ximian.com>
13019 (mono_type_get_name_recurse): Added `gboolean include_arity'
13020 argument specifying whether or not we should include the generic
13021 arity in the type name.
13022 (_mono_type_get_name): New static function.
13023 (mono_class_setup_vtable): If we're a generic instance, don't
13024 include the generic arity in the names of explicit method
13027 2004-08-03 Martin Baulig <martin@ximian.com>
13029 * class.c (mono_type_get_name_recurse): Enclose the generic type
13030 arguments in `<', '>'.
13032 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13034 * gc.c: make GC warning messages use the trace API, they are just
13035 noise to most of the users.
13037 2004-08-03 Martin Baulig <martin@ximian.com>
13039 * debug-mono-symfile.c (read_string): Correctly read the string.
13041 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13043 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
13045 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
13047 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
13049 2004-07-30 Martin Baulig <martin@ximian.com>
13051 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
13052 Reflect latest symbol writer changes.
13054 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13056 * object.c: always create an object if null is passed
13057 to Invoke() where a valuetype is expected.
13059 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
13061 * marshal.c (mono_marshal_init): make managed
13062 signatures match native ones better for 64bits.
13064 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13066 * appdomain.c: hack to build correctly the private bin path on windows.
13069 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
13071 * assembly.c: Load mscorlib from the correct framework directory
13072 (mono/<version>/mscorlib.dll).
13073 * appdomain.h: Added prototypes for new functions.
13074 * internals.h: Added some prototypes.
13075 * domain.c: When initializing the runtime, get from the executable and
13076 the configuration files the runtime version that the app supports.
13077 Added support methods for reading app.exe.config. Added list of versions
13078 supported by the JIT. Added two new methods: mono_init_from_assembly,
13079 which initializes the runtime and determines the required version from
13080 the provided exe file, and mono_init_version, which initializes
13081 the runtime using the provided version.
13082 * icall.c: Get machine.config from version-specific directory.
13083 * reflection.c: When generating an image, embed the version number
13084 of the current runtime.
13086 2004-07-28 Dick Porter <dick@ximian.com>
13089 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
13090 returned sockaddr size before creating the remote address object.
13091 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
13094 2004-07-28 Dick Porter <dick@ximian.com>
13096 * locales.c (string_invariant_compare_char): Fix invariant char
13097 compares between upper and lower cases. Fixes bug 61458.
13099 2004-07-27 Ben Maurer <bmaurer@ximain.com>
13101 * marshal.c: actually cache stelem.ref wrappers.
13103 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13105 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
13106 sections and remove the mono_cli_rva_map () function.
13108 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13110 * debug-mono-symfile.c: fix one more endianess issue, from a patch
13111 by Geoff Norton (<gnorton@customerdna.com>).
13113 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
13115 * class.c: fix class loads for pointer types (typeof(int) !=
13118 2004-07-27 Martin Baulig <martin@ximian.com>
13120 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
13121 reading the debugging information from an external ".mdb" file.
13123 2004-07-24 Martin Baulig <martin@ximian.com>
13125 * reflection.c (mono_image_get_type_info): Only write a class
13126 layout entry if we actually have a size or a packing size.
13128 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
13130 * reflection.c (type_get_fully_qualified_name):
13131 insert cast to get type checking of ?: with non-gcc compilers
13133 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
13135 * rand.c: use g_getenv for both lookups of
13138 2004-07-17 Martin Baulig <martin@ximian.com>
13140 * reflection.c (mono_reflection_bind_generic_method_parameters):
13141 Set `gmethod->reflection_info'.
13143 2004-07-17 Martin Baulig <martin@ximian.com>
13145 * class.c (mono_class_create_from_typedef): Insert the newly
13146 created class into the hash table before computing the interfaces
13147 since we could be called recursively.
13149 2004-07-16 Ben Maurer <bmaurer@ximain.com>
13151 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
13152 function to implement stelem.ref in managed code
13153 * class-internals.h, debug-helpers.c: a new wrapper type
13156 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
13158 * gc.c: allow GC handles to work even when no GC is compiled in.
13159 Fix part of bug #61134 (GetAddrOfPinnedObject).
13161 2004-07-13 Peter Williams <peter@newton.cx>
13163 * process.c (complete_path): Make sure we don't attempt to execute
13166 2004-07-12 Geoff Norton <gnorton@customerdna.com>
13168 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
13169 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
13170 and will add/subtract the hour if needed
13172 2004-07-12 Martin Baulig <martin@ximian.com>
13174 * reflection.c (mono_field_get_object): If we have
13175 `field->generic_info', take the attributes from
13176 `field->generic_info->generic_type'.
13178 2004-07-12 Martin Baulig <martin@ximian.com>
13180 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
13181 This function must be called before initializing the runtime.
13182 (mono_debug_init_1): New function; call this after initializing
13183 the runtime, but before loading the assembly. It tells the
13184 debugger to load corlib and the builtin types.
13186 * mono-debug-debugger.c: Did some larger changes in the debugging
13187 code; support recursive class declarations, make sure we actually
13190 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13192 * debug-helpers.c: undo my previous patch and fixed the real issue in
13193 ../mini/exceptions-x86.c
13195 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13197 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
13198 when no HOME env. variable was set and a NullRef was thrown in a .cctor
13199 called from other .cctors.
13201 2004-07-09 Miguel de Icaza <miguel@ximian.com>
13203 * loader.c: Removed the mono_loader_wine_init hack now that we are
13204 doing a managed version of Windows.Forms.
13206 2004-07-09 Ben Maurer <bmaurer@ximian.com>
13208 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
13209 threadpool.c, threads.c: remove static data from rootset.
13211 2004-07-09 Dick Porter <dick@ximian.com>
13213 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
13214 Don't do any more processing if the matched length was 0. It was
13215 increasing the size of the string before. Fixes bug 61167.
13217 2004-07-09 Dick Porter <dick@ximian.com>
13221 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13222 Add support for SO_PEERCRED if its available.
13224 2004-07-09 Peter Bartok <pbartok@novell.com>
13225 * loader.c: winelib.exe.so error message is now only displayed if
13226 MONO_DEBUG is set. To help us avoid questions when people are trying
13227 out the new Managed.Windows.Forms.
13229 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
13231 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
13232 for isinst and castclass wrappers.
13234 * class-internals.h icall.c: Move registration and lookup of JIT icalls
13235 to libmetadata from the JIT, so they could be used by the marshalling
13236 code and the interpreter.
13238 * marshal.c: Register marshalling related JIT icalls here instead of
13239 in mini.c. Use CEE_MONO_ICALL instead of the family of
13240 CEE_MONO_PROC<x> opcodes to call marshalling functions.
13242 * metadata.h: Remove unneeded marshalling conversions.
13244 * opcodes.c: Update for new opcodes.
13246 2004-07-08 Martin Baulig <martin@ximian.com>
13248 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
13249 (mono_debug_get_domain_data): Make this function static.
13251 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13253 * gc.c, object.h: add nice GC handle API for embedders.
13255 2004-07-06 Ben Maurer <bmaurer@ximian.com>
13257 * reflection.c: more changes for the new api
13259 * object.c: When we reflect on a field w/ a constant value, it
13260 will not have a memory location, so we must access metadata. Also,
13261 allow easier reading of strings so that we can read them from
13264 * class.c (mono_class_layout_fields): no need for literal fields here.
13266 * class-internals.h: api changes for const fields
13268 * icall.c (ves_icall_get_enum_info): use new apis for const fields
13270 2004-07-06 Martin Baulig <martin@ximian.com>
13272 * mono-debug.h: Increment version number to 44.
13274 * mono-debug.c (mono_debug_add_wrapper): The second argument is
13275 now a gpointer, rewrote this whole method.
13277 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
13278 function. Add information about the wrapper in a new "misc table".
13280 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
13281 for the new misc table.
13283 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
13285 * metadata-internals.h image.c: Add a cache for helper signatures.
13287 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
13289 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
13291 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
13292 delegates from a delegate. Fixes #61033.
13294 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
13295 marshalling of stringbuilder arrays. Fixes #59900.
13297 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
13299 * icall.c: Add EnumBuilder:setup_enum_type icall.
13301 2004-06-30 Ben Maurer <bmaurer@ximian.com>
13303 * icall.c: Added a new icall for the property version of
13304 OffsetOfStringData.
13306 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
13308 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
13309 it has a constant size across platforms.
13311 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
13314 2004-06-29 Martin Baulig <martin@ximian.com>
13316 * mono-debug.c (mono_debug_add_method): Protect the whole function
13317 in mono_debugger_lock(), not just parts of it.
13319 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13321 * reflection.c: make sure padding bytes in heaps are zeroed.
13323 2004-06-24 David Waite <mass@akuma.org>
13325 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
13326 image.c, loader.c, locales.c, marshal.c, metadata.c,
13327 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
13328 string-icalls.c, threads.c: change to C90-style comments from C99 /
13331 2004-06-24 Dick Porter <dick@ximian.com>
13334 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
13335 return createdNew. Fixes bug 60412.
13338 * icall.c: Add createdNew parameter to CreateMutex icall
13340 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13342 * reflection.c, object-internals.h: save default value in params.
13344 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13346 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
13347 no need to build a new path combining that with the application base.
13350 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13352 * reflection.c: fixed minor standard compliance issues.
13354 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
13356 * reflection.c: fixed issue with encoding some custom attributes
13357 (arrays in properties and fields, bug #60411).
13359 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13361 * reflection.c: fix start address when copying the public key token.
13363 2004-06-23 Martin Baulig <martin@ximian.com>
13365 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
13366 the `exc' object in a static object to put it into the GC's root set.
13368 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13370 * reflection.c: make mono_reflection_setup_internal_class ()
13371 callable a second time to setup a new parent class.
13373 2004-06-23 Dick Porter <dick@ximian.com>
13375 * threads.c: Check for WAIT_IO_COMPLETION return values.
13377 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
13379 * appdomain.c: Removed the g_free on the public key token. Now copy
13380 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
13381 * assembly.c: Added public key token string value when loading
13382 assemblies. Fix bug #60439.
13383 * icall.c: Added missing informations (like public key) in
13384 GetReferencedAssemblies. Fix #60519.
13385 * image.h: Changed definition for public key token from const char*
13386 public_tok_value to guchar public_key_token [17];
13387 * reflection.c: Updated for changes to public key token.
13389 2004-06-22 Lluis Sanchez Gual
13391 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
13392 for the field in base classes.
13394 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13396 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
13397 mark headers as not supported, they are installed only for use by the
13400 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
13402 * *.c, *.h: avoid namespace pollution in public headers.
13404 2004-06-21 Martin Baulig <martin@ximian.com>
13406 * exception.c (mono_get_exception_security): It's in
13407 "System.Security", not in "System".
13409 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
13410 the exception classes.
13412 2004-06-21 Martin Baulig <martin@ximian.com>
13414 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
13415 Protect the exception object from being finalized.
13417 2004-06-21 Martin Baulig <martin@ximian.com>
13419 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
13422 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
13424 * reflection.c: Load the assembly in mono_reflection_type_from_name,
13425 if it was not loaded before. Fix parts of #60439.
13427 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
13429 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
13430 code that was broken since Ben's change: wrappers are now
13431 dependent on the method signature only again.
13433 2004-06-21 Martin Baulig <martin@ximian.com>
13435 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
13436 added interface support.
13438 2004-06-21 Martin Baulig <martin@ximian.com>
13440 * class.c (mono_vtable_get_static_field_data): New public method.
13442 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
13444 * filewatcher.c : Windows build fix to be compliant with API changes.
13446 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13448 * class.h, class.c: more accessors.
13449 * metadata.h, metadata.c: prepare for hiding MonoType and
13450 MonoMethodSignature: people should use the accessors from now on
13451 outside of the tree.
13453 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13455 * *.c, *.h: more API cleanups.
13457 2004-06-18 Jackson Harper <jackson@ximian.com>
13459 * assembly.c: Trace loading assemblies.
13460 * loader.c: Trace loading native libraries.
13461 * mono-config.c: Trace loading config files.
13463 2004-06-18 Dick Porter <dick@ximian.com>
13465 * locales.c: Tell ICU the lengths of strings, it can cope with
13466 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
13468 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13470 * image.c: swapped name/filename;
13472 2004-06-18 Martin Baulig <martin@ximian.com>
13474 * mono-debug-debugger.c (write_class): Write the parent class at
13475 the end of the header.
13477 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
13479 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
13481 2004-06-17 Raja R Harinath <rharinath@novell.com>
13483 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
13484 (bundle_obj): New conditional define.
13485 (BUILT_SOURCES): Remove.
13486 ($(bundle_srcs)): Make parallel-make safe.
13487 (libmonoruntime_la_LIBADD): Make unconditional.
13488 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
13489 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
13491 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
13493 * culture-info-tables.h: It was inconsistent with the latest
13496 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
13498 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
13501 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
13504 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13506 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
13507 cleaned up public header threads.h.
13509 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13511 * Makefile.am, *.c, *.h: more API cleanups.
13513 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13515 * Makefile.am: removed monosn from compilation.
13516 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
13517 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
13518 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
13519 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
13520 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
13521 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
13523 2004-06-15 Jackson Harper <jackson@ximian.com>
13525 * assembly.c: Make locales lower case when searching the GAC for
13526 assemblies. gacutil will always make locales lowercase when
13527 installing so this effectively makes them case insensitive.
13529 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
13531 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
13532 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
13533 parameter which allows to choose whether the wait can be interrupted or
13534 not. Also added the method mono_monitor_enter(), which locks the monitor
13535 using an infinite wait and without allowing interruption.
13536 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
13538 * object.h: Added new fields in MonoThread. suspend_event holds the event
13539 used to susped/resume the thread. synch_lock is the lock object to use for
13540 modifying the thread state.
13541 * threads.c: Use the new synch_lock object for locking, instead of "this",
13542 which can generate deadlocks.
13543 Moved thread state change in Thread.Sleep and Thread.Join from managed
13544 to unmanaged code. This avoids a deadlock when the thread was suspended
13545 just after acquiring the thread lock.
13546 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
13547 Implemented Thread.Suspend using an event instead of ThreadSuspend,
13548 which is not fully implemented in the io-layer.
13549 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
13551 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
13553 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
13554 threads-types.h: more API cleanups.
13556 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13558 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
13559 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
13560 threadpool.c, threads.c: first pass at the exported API cleanup.
13562 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13564 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
13566 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13568 * icall.c: added internalGetHome.
13570 2004-06-14 Dick Porter <dick@ximian.com>
13572 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
13573 possible to return successfully when '.' or '..' were the only
13574 entries in a directory, but were skipped. The MonoIOStat was not
13575 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
13578 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13580 * reflection.c: make binaries run on .Net 1.1 by default.
13582 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13584 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
13586 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
13588 * marshal.c: keep track of struct size with explicit layout
13591 2004-06-12 Martin Baulig <martin@ximian.com>
13593 * mono-debug-debugger.c: Comment out a debugging g_message().
13595 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
13597 * reflection.c, reflection.h: do not free custom attrs that are cached.
13598 * icall.c: use braces to make code clearer.
13600 2004-06-11 Martin Baulig <martin@ximian.com>
13602 * class.h (MonoInflatedField): New type.
13603 (MonoClassField): Replaced `MonoType *generic_type' with
13604 `MonoInflatedField *generic_info'.
13607 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
13609 2004-06-11 Martin Baulig <martin@ximian.com>
13611 * reflection.c (mono_image_create_method_token): Correctly encode
13614 2004-06-11 Martin Baulig <martin@ximian.com>
13616 * metadata.c (mono_metadata_parse_method_signature): When parsing
13617 a MethodDef which has VarArgs, also set sentinelpos if we don't
13618 have any parameters.
13620 2004-06-11 Martin Baulig <martin@ximian.com>
13622 * verify.c (mono_method_verify): In CEE_CALL, use
13623 mono_method_get_signature() to get the method's signature, unless
13624 we're a PInvoke method.
13626 2004-06-10 Jackson Harper <jackson@ximian.com>
13628 * assembly.c: Use <path>/lib/mono/gac for the extra paths
13629 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
13630 logical name as the supplied path is just a prefix to the gac not
13631 the direct path to it.
13633 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
13635 * reflection.c: make the token for a created method match
13636 the token of the MethodBuilder it was created from
13637 (IKVM requires this behaviour now).
13639 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
13641 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
13642 reflection.c, socket-io.c: leak fixes.
13644 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13646 * icall.c: handle sentinel pos in vararg methods in position different
13649 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13651 * culture-info-tables.h: freshly generated.
13653 2004-06-09 Martin Baulig <martin@ximian.com>
13655 * loader.c (mono_get_method_constrained): Call `mono_class_init
13656 (constrained_class)'.
13658 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
13660 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
13661 any methods. Fixes #59629.
13663 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
13665 * culture-info-tables.h: reflecting locale-builder updates.
13667 2004-06-08 Dick Porter <dick@ximian.com>
13670 * locales.c: Fixed compile warnings, including a real bug in
13671 CompareInfo_internal_compare.
13673 2004-06-08 Dick Porter <dick@ximian.com>
13676 (ves_icall_System_Globalization_CompareInfo_internal_index):
13677 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
13678 Double-check the resuls of usearches, because ICU currently
13679 ignores most of the collator settings here. Fixes bug 59720.
13681 2004-06-08 Dick Porter <dick@ximian.com>
13684 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
13685 Fix memory leak and segfault-causing typo. No idea how this one
13686 lasted so long without being noticed.
13688 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
13690 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
13691 any methods. Fixes #59629.
13693 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13696 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
13697 own the critical section before). Removed dead code (that's done
13698 in the preload hook).
13700 (mono_assembly_load_with_partial_name): call the preload hook.
13702 2004-06-08 Martin Baulig <martin@ximian.com>
13704 * metadata.c (mono_metadata_signature_alloc): Default
13705 `sentinelpos' to -1.
13707 * reflection.c (mono_image_get_array_token): Likewise.
13709 2004-06-08 Martin Baulig <martin@ximian.com>
13711 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
13713 * metadata.c (mono_metadata_parse_method_signature): When parsing
13714 a MethodDef which has VarArgs, set sentinelpos.
13716 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
13717 `gint16' since we're using -1 for non-varargs methods.
13720 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
13721 (method_encode_signature): Added varargs support.
13722 (method_builder_encode_signature): Likewise.
13723 (mono_image_get_varargs_method_token): New static method.
13724 (mono_image_create_method_token): New public method; this is
13725 called via an icall instead of mono_image_create_token() when
13726 calling a varargs method.
13728 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
13730 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
13732 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
13734 * culture-info-tables.h : Reflecting the latest locale-builder that
13735 fixed empty array representation ({} to {0}).
13737 2004-06-07 Jackson Harper <jackson@ximian.com>
13739 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
13740 looking up extra gac paths. This allows MONO_GAC_PATH to act
13741 exactly like a prefix.
13743 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
13745 * reflection.c (mono_reflection_type_from_name): Make a copy of the
13746 type name before modifying it. Fixes #59405.
13748 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
13750 * culture-info.h: added fields for "all datetime patterns".
13751 * locales.c: ( ves_icall_System_Globalization_CultureInfo
13752 _construct_datetime_format ()): fill xxx_patterns fields.
13753 * object.h: added fields for "all datetime patterns" to
13754 MonoDateTimeFormatInfo.
13755 * culture-info-tables.h: reflecting locale-builder updates.
13757 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
13759 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
13760 the event has no add and remove methods. Fixes #59629.
13762 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
13764 * object.c: Fixed possible integer overflow when allocating large
13767 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
13769 * culture-info-tables.h: reflecting locale-builder updates.
13771 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
13773 * culture-info-tables.h: reflecting locale-builder updates.
13775 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
13777 * culture-info-tables.h: reflecting locale-builder updates.
13779 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
13781 * threads.c: Made Thread.Sleep abortable.
13783 2004-06-02 Martin Baulig <martin@ximian.com>
13785 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
13787 * debug-mono-symfile.h: Bumped symbol file version number to 37.
13789 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
13791 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
13793 2004-05-30 Jackson Harper <jackson@ximian.com>
13795 * reflection.c: Do not hardcode assembly versions or public key
13796 tokens anymore. All of this except the corlib section was dead
13799 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
13801 * object.c (mono_runtime_invoke_array): Automatically create boxed
13802 objects for byref valuetypes if needed. Fixes #59300.
13804 * object.c (mono_method_return_message_restore): Handle
13805 MONO_TYPE_OBJECT as well.
13807 2004-05-28 Jackson Harper <jackson@ximian.com>
13809 * reflection.c: The modified type encoding was causing build
13810 problems. Reverted for now.
13812 2004-05-28 Jackson Harper <jackson@ximian.com>
13814 * reflection.c/h: Take an assembly ref so that we dont create
13815 fully qualified names when encoding types in the same assembly as
13816 the custom attribute being emitted.
13817 * appdomain.c: Increment version number.
13819 2004-05-26 Duncan Mak <duncan@ximian.com>
13822 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13823 Set the full version number (major, minor, build, revision).
13825 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
13827 * marshal.c (emit_struct_conv): increment src/dst after blit
13828 (mono_marshal_get_managed_wrapper,
13829 mono_marshal_get_native_wrapper): make sure we have marshalling
13830 info before marshalling params (info computation affects
13833 * class.c (class_compute_field_layout): correctly deal with
13835 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
13836 value types (as per what windows dows by default)
13837 (mono_class_setup_mono_type): System.ValueType is blittable
13838 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
13841 * marshal.c (mono_marshal_load_type_info): flag types as
13842 non-blittable if the native layout doesn't match the managed
13845 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13847 * appdomain.c: don't add stuff in the private search path that is
13848 above the application base. If application base is not set, there's
13849 no private search path.
13851 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
13853 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
13854 byref struct arguments in native->managed marshalling.
13856 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
13858 * marshal.c (mono_marshal_get_runtime_invoke): correctly
13859 cache methods using signature (special case for methods
13860 that are value type or string class)
13862 * image.c (mono_image_close): clean up allocated GSList's
13863 in runtime_invoke_cache.
13865 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13867 * mono-config.c: set the correct path for mono_cfg_dir on windows when
13868 there's no MONO_CFG_DIR environment variable defined.
13870 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13872 * threads.c: windows version must be >= 0x0500 to include OpenThread.
13874 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
13876 * threadpool.c: Really wait for 500ms after the async call, even if the wait
13878 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
13879 before waiting for it, and call CloseHandle after the wait to unref it.
13880 This will make sure that handles are not disposed too early.
13882 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13887 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
13890 * object.c: se the application_base only for the domain that runs
13891 Main. Fixes bug #59216,
13893 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13896 * object.c: only the domain in which Main is run have
13897 SetupInformation.ConfigurationFile set, so moved a few lines from
13898 appdomain.c to object.c.
13900 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13902 * appdomain.c: we tried to load [name].(dll|exe), but according
13903 to bug #57710, we must also try [culture]/[name].(dll|exe) and
13904 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
13905 There's a test case attached to bug #58922.
13907 2004-05-27 Dick Porter <dick@ximian.com>
13910 * file-io.c: Implemented icalls for locking and unlocking regions
13912 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
13913 FALSE on error (fixes both compiler warning and real bug.)
13915 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
13917 * culture-info-tables.h: reflecting locale-builder updates.
13919 (Added missing ChangeLog entry for 05/26)
13921 2004-05-27 Jackson Harper <jackson@ximian.com>
13923 * locales.c: Fix some cut and paste errors.
13925 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13927 * mono-config.c: set the correct path for config. directory on windows.
13929 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
13931 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
13934 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
13936 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
13937 from pinvoke functions.
13939 * marshal.c (mono_ftnptr_to_delegate): Implement this.
13941 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
13943 * culture-info-tables.h: reflecting locale-builder updates.
13945 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
13947 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
13950 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
13952 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
13953 * icall.c: Modified icalls for RNG.
13954 * rand.c|h: Changed RNG interface to allow thread-safe usage under
13955 Windows (CryptoAPI).
13957 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
13959 * locales.c: Fix build.
13961 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
13963 * culture-info-tables.h: reflecting locale-builder updates.
13965 2004-05-25 Jackson Harper <jackson@ximian.com>
13967 * locales.c: When creating the current culture use the $LANGs
13968 specific culture. So DateTimeFormat and NumberFormat entries are created.
13970 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
13972 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
13973 a char array as parameter.
13975 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
13977 * image.c: In mono_image_open(), always use an absolute path name to
13978 look for already loaded images.
13980 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
13982 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
13983 missing in the windows build (like older cygwin include files).
13985 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
13987 * icall.c: Fixed check for possible integer overflow in Buffer_
13988 BlockCopy icall. Replaced comments style // by /* */.
13990 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
13992 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
13994 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
13995 check after MONO_VTADDR. Fixes pinvoke2.exe.
13997 * marshal.h marshal.c metadata.h: Add beginnings of support for
13998 ftnptr -> delegate marshalling.
14000 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
14002 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
14003 * threads.c: Fix warnings.
14005 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
14007 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
14008 * icall.c: Registered icalls for Suspend and Resume.
14009 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
14011 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
14012 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
14013 * process.c: Use WaitForSingleObjectEx.
14014 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
14016 * threads.c, threads.h: Make use of new Ex wait methods. Improved
14017 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
14018 for Suspend and Resume. Added new mono_thread_stop, used for stoping
14019 background threads. Added basic support for Abort in Windows.
14020 Start new threads using a managed delegate invoke wrapper. This wrapper
14021 has an interruption checkpoint that is needed since an interruption
14022 can be requested before the thread leaves the unmanaged code that starts
14024 * marshal.c: Added interruption checkpoint after every native call, and
14025 also before managed calls for wrappers called from unmanaged code to
14026 go into managed code.
14027 * object.h: Added new field in MonoThread to keep track of interruption
14030 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
14032 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
14035 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14042 * rand.c: getenv -> g_getenv (windows!)
14044 * process.c: complete_path is also used on non-windows platforms.
14046 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14048 * icall.c: new signature for Process_Start.
14050 * process.[ch]: new signature for Process_Start. If we're on windows
14051 and UseShellExecute is false, we have to search for the program by
14052 ourselves if we don't get a full path.
14054 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
14056 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
14057 marshalling and call CleanUpNativeData if needed. Fixes #58646.
14059 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14061 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
14064 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14066 * process.c: use double quotes to quote program name and arguments on
14067 windows. Fixes bug #58575.
14069 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14071 * file-io.c: don't return "." and ".." when using windows Find*File.
14073 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
14075 * marshal.c: Don't pass wrappers to message init because method
14076 addressed used to lookup metadata. part of remoting[2|3] fix.
14078 2004-05-15 Jackson Harper <jackson@ximian.com>
14080 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
14081 path is essentially the same as MONO_PATH except that it points to
14082 GACs instead of lib directories.
14083 * loader.h: The user gac is gone so we dont need function to
14085 * mono-config.c: user gac option is now gone.
14087 2004-05-15 Jackson Harper <jackson@ximian.com>
14089 * culture-info.h: Make defines more consistent, add calendar data
14090 to the culture info table.
14091 * culture-info-tables.h: Add basic calendar data. Basically
14092 everyone gets default gregorian until all the data is
14094 * locales.c: Use the new consistent defines. Set calendar data for
14095 culture info objects.
14096 * object.h: add a field for calendar data to CultureInfo
14098 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
14100 * image.c: image->runtime_invoke_cache is keyed on signatures now.
14101 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
14103 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
14104 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
14105 an extra param that is the pointer of the method to invoke. The IL for
14106 the invoke method is no longer specific to the method, but to the
14107 signature of the method. Thus, we can share the same code for multiple
14108 methods. This reduces the number of methods that have to be compiled.
14110 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
14112 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
14114 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14116 * icall.c: Optimize Buffer.BlockCopy.
14118 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14120 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
14121 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
14122 quote). Changed them to "MMMM yyyy".
14124 2004-05-12 Miguel de Icaza <miguel@ximian.com>
14127 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
14129 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
14131 * reflection.h: Updated after changes to managed structures.
14133 * appdomain.c: Bump corlib version.
14135 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14137 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
14140 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14142 * Makefile.am: link to ../os/libmonoos.la on windows.
14145 -If MONO_DEBUG, warn about non-existing directories in
14147 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
14148 compile time variable.
14149 -Removed init_default_path and call mono_set_rootdir from
14150 libmonoos.a instead (windows only).
14152 * assembly.h: declare mono_assembly_getrootdir().
14155 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
14157 * loader.c: s/getenv/g_getenv/
14159 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
14161 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
14163 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
14165 * metadata.h: Add new marshalling conversions.
14167 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
14170 * reflection.c (mono_reflection_get_type): Lookup the type in all
14171 modules of a multi-module assembly. Fixes #58291.
14173 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
14175 * threads.c: Before aborting a background, set the StopRequested
14176 state. This avoids throwing the Abort exception.
14177 In mono_thread_manage, don't continue with the shutdown until all
14178 aborted threads have actually stopped.
14180 2004-05-10 Jackson Harper <jackson@ximian.com>
14182 * locales.c: Remove the modifier from culture names.
14184 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14186 * Makefile.am: monosn is not installed any more. It has been deprecated
14189 2004-05-07 Jackson Harper <jackson@ximian.com>
14192 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
14193 Fix array construction, add bailout if the length is 0.
14195 2004-05-07 Dick Porter <dick@ximian.com>
14197 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
14198 machine doesn't have a DNS entry. Patch by Urs Muff
14199 (umuff@quark.com), fixes bug 57928.
14201 2004-05-06 Jackson Harper <jackson@ximian.com>
14203 * reflection.c: Handle null PublicTokens properly. alloc mem for
14204 assembly names culture so we dont crash when freeing it.
14206 2004-05-06 Jackson Harper <jackson@ximian.com>
14208 * assembly.c: Check the usergac when loading with partial names.
14210 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
14212 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
14213 does nothing for now (not required for Linux/Windows) but the class
14214 library can call it (and a newer or modified runtime could need it).
14215 * icall.c: Registred icall.
14217 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14219 * loader.c: prints a message on module loading error we set MONO_DEBUG
14220 environment variable.
14222 2004-05-05 Jackson Harper <jackson@ximian.com>
14224 * appdomain.c: Handle PublicKeyToken=null properly.
14226 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
14228 * environment.c|h: Added icall ves_icall_System_Environment_
14229 GetOSVersionString to get the current OS version as a string.
14230 * icall.c: Registred icall.
14232 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
14234 * object.c: in mono_object_get_virtual_method(), take into account that
14235 non-virtual methods don't have a slot in the vtable. Check needed when
14236 the object is a proxy.
14238 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
14240 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
14241 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
14243 * object.c (mono_class_compute_gc_descriptor): Fix warning.
14245 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
14246 passed when a valuetype is expected.
14248 * object.c (mono_unhandled_exception): Only set the exit code if the
14249 exception happens in the main thread. Fixes thread5.exe.
14251 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
14252 invalid names. Fixes #58047.
14254 2004-05-03 Jackson Harper <jackson@ximian.com>
14256 * assembly.c: This line was committed accidently and is unneeded.
14258 2004-05-03 Jackson Harper <jackson@ximian.com>
14260 * icall.c: Add new icall for Assembly::LoadWithPartialName
14261 * assembly.c/.h: new function that probes the GAC to load partial
14262 assembly names by Paolo Molaro.
14264 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14266 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
14267 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
14268 (type_get_fully_qualified_name): Added PublicKeyToken when building a
14271 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14273 * appdomain.c: fixed check for 'neutral' culture and removed warning.
14274 * reflection.c: fix bug when parsing a full type name and Version is not
14275 the last thing in the string.
14277 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
14279 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
14280 crashes when it is freed.
14282 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14284 * assembly.c: print the compat warning to stderr.
14286 2004-05-01 Miguel de Icaza <miguel@ximian.com>
14288 * assembly.c (mono_assembly_load_references): Add a compatibility
14289 hack to run old applications that might be still referencing the
14290 3300-based assemblies, only do this for System.xxx.
14292 2004-05-01 Jackson Harper <jackson@ximian.com>
14294 * appdomain.c: If the culture is neutral we set it to "".
14296 2004-04-29 Jackson Harper <jackson@ximian.com>
14298 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
14300 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
14302 * string-icalls.c: added low overhead function for copying chars
14303 * icall.c: added needed icall for the above function
14305 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14307 * icall.c: fix return value of get_global_assembly_cache. Implemented
14308 Environment.GetLogicalDrives.
14310 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
14312 * rand.c: try and talk to egd or prngd
14313 for random bytes if opening devices fail.
14315 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
14317 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
14318 alignment for the type using the native alignment of its members
14319 instead of using klass->min_align.
14321 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
14323 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14326 * socket-io.c: added check for sys/aio.h.
14328 2004-04-28 Dick Porter <dick@ximian.com>
14330 * threads.c: Don't abort a thread thats already aborting, when
14331 terminating everything.
14333 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14335 * icall.c: added 2 new async calls for Socket.
14337 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
14338 IO on *nix systems.
14340 * threadpool.c: removed unused variable.
14342 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
14344 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
14346 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
14348 * locales.c: put back string_invariant_tolower () and
14349 string_invariant_toupper ().
14351 2004-04-26 David Waite <mass@akuma.org>
14356 * unicode.h: remove comma from end of enumeration declarations
14358 2004-04-26 David Waite <mass@akuma.org>
14360 * debug-mono-symfile.h:
14363 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
14366 2004-04-26 Jackson Harper <jackson@ximian.com>
14368 * appdomain.c: Increment version number.
14370 2004-04-26 Jackson Harper <jackson@ximian.com>
14372 * appdomain.c: Set assembly references public token value when
14373 PublicKeyToken is specified, not the hash_value. Free public token
14374 values when free assembly name data. Previously the public key
14375 token was hex decoded, however we are using hex encoded public key
14376 tokens, so this is not neccasary.
14377 * assembly.c: Lookup assemblies in the gac if their public token
14378 value is set. Add function to allow enabling user gac
14379 lookups. Specify whether or not the assembly was loaded from the
14380 GAC. Compare full assembly names when checking the cache for
14381 assemblies (Temporarily disabled see comment in code). Remove
14382 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
14383 specifies trace-loader they get extra info to stdout on the
14384 loading of assemblies.
14385 * image.h: Add a field for an assembly references public token
14386 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
14387 whether an assembly has been loaded from the GAC.
14388 * image.c: Remove a corlib -> mscorlib name mapping.
14389 * loader.h: Add function to enable/disable the user gac.
14390 * mono-config.c: Check if the usergac is enabled in the config
14392 * icall.c: New icall to determine whether or not an assembly has
14393 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
14394 * tabldefs.h: Add constant for assemblyref flag that specifies a
14395 full public key is used instead of a public token.
14396 * reflection.c: Remove mscorlib -> corlib mappings. Set
14397 PublicTokenValue instead of hash value. This value is a hex
14398 string so it does not need to be expanded.
14400 2004-04-26 Martin Baulig <martin@ximian.com>
14402 * mono-debug-debugger.c (mono_debugger_initialize): Set
14403 `mono_debugger_initialized' before calling mono_debug_lock().
14405 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
14407 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
14408 InternalToUpper/InternalToLower.
14409 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
14410 removed invariant culture shortcut. This is now done in managed code.
14411 * locales.c: (string_invariant_toupper/tolower) removed.
14413 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14415 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
14416 Added Poll internal call.
14418 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
14419 call for Poll. Select was too heavy for polling a single socket.
14421 * threadpool.[ch]: added mono_threadpool_cleanup.
14422 * threads.c: use it. Don't use Thread_Abort on windows.
14424 2004-04-23 Martin Baulig <martin@ximian.com>
14426 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
14428 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
14430 * icall.c: Registred new icalls for key pair protection and added an
14431 icall for Environment.GetFolderPath on Windows.
14432 * security.c|h: Added new icalls for key pair protection.
14434 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14436 * socket-io.c: don't display the non-supported family warning for known
14437 families. Now this is not displayed on windows when checking support
14440 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14442 * class.c: don't display the layout warning for static fields.
14444 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
14446 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
14447 * locales.c, locales.h: Added new icalls for culture-specific
14448 Char.ToLower and Char.ToUpper.
14450 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14452 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
14455 2004-04-20 Martin Baulig <martin@ximian.com>
14457 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
14458 of the type name before passing it to mono_reflection_type_from_name().
14460 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
14462 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
14463 encodings here. Fixes #56965.
14465 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
14467 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14468 fix test on strstr result not that I can see anything that
14469 relies on the result.
14471 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
14473 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
14476 * marshal.c (mono_marshal_get_string_encoding): New helper function.
14478 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
14479 function to determine which marshalling to use for strings. Fixes
14482 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
14484 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
14486 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
14488 * icall.c: #include mono-config.h
14490 2004-04-15 Jackson Harper <jackson@ximian.com>
14492 * culture-info-tables.h: Fix date formats for en-US culture.
14494 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
14496 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
14497 ThreadPool.SetMinThreads.
14498 * threadpool.c: Implemented ThreadPool.GetMinThreads and
14499 ThreadPool.SetMinThreads.
14501 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14503 * mono-config.c: also load the .config file in the directory
14504 where the assembly was found.
14506 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14508 * assembly.c: load per-assembly config files.
14509 * icall.c: decrapified code to get the config dir and moved to
14511 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
14512 per-assembly config files. When doing a dll map lookup give precedence
14513 to the per-assembly data.
14515 2004-04-14 Martin Baulig <martin@ximian.com>
14517 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
14518 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
14519 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
14521 * mono-debugger-debugger.c: While the debugger is locked, remember
14522 whether the symbol tables have changes and send one single
14523 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
14525 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
14527 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
14529 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
14532 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
14533 account when marshalling string arrays. Fixes #56965.
14535 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
14537 * icall.c: Add new icalls mapping for security.
14538 * security.c|h: Add internal calls for WindowsIdentity,
14539 WindowsImpersonationContext and WindowsPrincipal.
14541 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
14543 * class.c: Added comment to ensure the System.MonoDummy class
14544 is removed when no longer necessary
14546 2004-04-13 Miguel de Icaza <miguel@ximian.com>
14548 * appdomain.c: Pass arguments to the bootstraping exceptions to
14549 minimize JITed methods at boot
14551 * metadata.c (mono_exception_from_name_two_strings): Allow for the
14552 second string to be null.
14554 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
14555 Change the protocol to minimize the JIT methods at startup. Now
14556 it Returns the internal codepage, if the value of "int_code_page"
14557 is 1 at entry, and we can not compute a suitable code page
14558 number, returns the code page as a string.
14560 2004-04-13 Jackson Harper <jackson@ximian.com>
14562 * culture-info-tables.h: Fix number of decimal digits for all
14565 2004-04-13 Jackson Harper <jackson@ximian.com>
14567 * icall.c: Clairfy out of sync error message. It is not always
14568 your corlib that is out of sync.
14570 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
14572 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
14573 properties when only the set accessor is overriden. Fixes #55874.
14575 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
14577 * assembly.c (mono_assembly_load_references): Make this thread safe.
14580 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
14582 * monosn.c: Add missing initialization calls.
14584 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
14587 ves_icall_System_Globalization_CultureInfo_construct_number_format
14588 Fix g_assert so it compiles on fussier compilers re int/ptr
14591 2004-04-08 Dick Porter <dick@ximian.com>
14594 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
14595 53992. Also rearrange the code so that the internal calls return
14596 an error value and exceptions are thrown from managed code.
14598 * icall.c: Add type info to the socket icalls.
14600 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14602 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
14605 2004-04-07 Martin Baulig <martin@ximian.com>
14607 * class.c (mono_class_from_generic_parameter): Don't default
14608 `klass->parent' to `mono_defaults.object_type'.
14610 2004-04-07 Martin Baulig <martin@ximian.com>
14612 * reflection.c (mono_reflection_initialize_generic_parameter): Set
14613 `param->pklass->reflection_info'.
14615 2004-04-07 Jackson Harper <jackson@ximian.com>
14617 * culture-info-tables.h: Fix date separator symbol.
14619 2004-04-07 Martin Baulig <martin@ximian.com>
14621 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
14622 from System.Type to System.MonoType.
14624 2004-04-07 Martin Baulig <martin@ximian.com>
14627 (MonoReflectionGenericParam): Added `has_reference_type' and
14628 `has_value_type' fields.
14630 * reflection.c (mono_image_get_generic_param_info): Encode the
14631 correct flags if we have the `class' or `struct' constraint.
14633 2004-04-07 Martin Baulig <martin@ximian.com>
14636 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
14638 2004-04-07 Jackson Harper <jackson@ximian.com>
14640 * appdomain.c: Revert extra patches, just wanted to bump the
14643 2004-04-07 Jackson Harper <jackson@ximian.com>
14645 * Makefile.am: Add culture-info private headers.
14646 * icall.c: Add new icalls for contructing locales.
14647 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
14648 * locales.h: Declare new culture info construction methods.
14649 * object.h: Add new fields used to avoid the CultureMap to
14651 * culture-info.h: Definition of structs used in the culture info
14653 * culture-info-tables.h: Autogenerated tables that contain culture
14654 info data. This file was generated with the locale-builder tool.
14655 * appdomain.c: Incement corlib version number.
14657 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
14659 * appdomain.c: (mono_runtime_init) move mono_thread_init
14660 to before mono_object_new calls so critical sections
14661 are initialized before use.
14663 2004-04-07 Martin Baulig <martin@ximian.com>
14666 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
14667 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
14668 (ves_icall_MonoGenericParam_initialize): Removed.
14669 (monogenericparam_icalls): Removed.
14670 (generictypeparambuilder_icalls): Added new table for
14671 System.Reflection.Emit.GenericTypeParameterBuilder.
14674 (mono_reflection_define_generic_parameter): Removed.
14675 (mono_reflection_initialize_generic_parameter): This is now called
14676 from GenericTypeParameterBuilder's .ctor.
14678 2004-04-06 Martin Baulig <martin@ximian.com>
14680 * class.c (mono_class_init): Don't inflate nested classes in a
14682 (mono_type_get_name_recurse): Include the generic arguments for
14683 generic instances and generic type declarations.
14684 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
14685 (_mono_class_get_instantiation_name): Removed.
14686 (mono_class_create_generic): Always use `gklass->name' as our name.
14688 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
14690 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
14691 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
14692 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
14693 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
14694 closed generic methods here.
14697 (mono_reflection_generic_inst_get_nested_types): Removed.
14698 (inflate_mono_method): Copy the generic parameters from the
14699 MonoMethodHeader into out MonoGenericMethod.
14701 2004-04-06 Martin Baulig <martin@ximian.com>
14704 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
14706 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
14708 * reflection.c (build_compressed_metadata): If we have any entries
14709 in the GenericParam, MethodSpec or GenericParamConstraint tables,
14710 set the header version to 1.1.
14712 2004-04-06 Martin Baulig <martin@ximian.com>
14714 * class.c (mono_class_init): If we're a generic instance,
14715 initialize our nested classes, too.
14716 (_mono_class_get_instantiation_name): Deal with the new `!%d'
14719 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14721 * process.c: quote the argument passed to the shell on windows.
14723 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
14725 * threads.c (mono_alloc_special_static_data): Allow this to be
14726 called during startup.
14728 2004-04-02 Martin Baulig <martin@ximian.com>
14731 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
14733 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
14735 * icall.c: Fix build.
14737 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
14739 * Makefile.am: Added security.c|h.
14740 * icall.c: Added icall for get_UserName;
14741 * security.c: New file for security related icalls. Added function
14742 get_UserName for System.Environment (fix #56144).
14743 * security.h: New. Header file for security.c
14745 2004-04-02 Dick Porter <dick@ximian.com>
14747 * icall.c: Deleted the icalls that were obsoleted some time ago
14748 by the ICU string code, and which were mixed into the icall
14749 rearranging. Fixes bug 55969.
14752 * string-icalls.c: Deleted the code that those icalls reference.
14754 2004-04-01 Martin Baulig <martin@ximian.com>
14756 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
14758 * class.c (mono_class_from_generic_parameter): Don't set
14759 TYPE_ATTRIBUTE_INTERFACE.
14760 (my_mono_class_from_generic_parameter): Likewise.
14762 2004-04-01 Martin Baulig <martin@ximian.com>
14764 * loader.c (find_method): Added an optional `MonoClass *ic'
14765 argument to search in a specific interface.
14766 (mono_get_method_constrained): New public function.
14768 2004-04-01 Martin Baulig <martin@ximian.com>
14770 * reflection.c (mono_image_get_generic_field_token): Use the
14771 `handleref' cache here.
14773 2004-04-01 Martin Baulig <martin@ximian.com>
14775 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
14777 * reflection.c (create_generic_typespec): Use the `typespec' hash
14778 here, not the `typeref' one.
14780 2004-04-01 Martin Baulig <martin@ximian.com>
14782 * class.c (mono_class_inflate_generic_type): Moved the
14783 functionality into a new static inflate_generic_type() which
14784 returns NULL if it didn't do anything. Only increment the
14785 `mono_stats.inflated_type_count' if we actually inflated
14787 (mono_class_get_full): Check the classes type to see whether we
14788 need to inflate it; also inflate MONO_TYPE_(M)VAR.
14790 2004-04-01 Jackson Harper <jackson@ximian.com>
14792 * reflection.c: Set culture for assembly references.
14794 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
14796 * reflection.[ch], icall.[ch], Fix support for pinning variables.
14798 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14801 (do_mono_assembly_open): the critical section also covers
14802 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
14804 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14807 (mono_manage_threads): abort the background threads when finishing.
14810 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14812 * gc.c: only close the done_event handle if there was no timeout.
14815 2004-03-30 Martin Baulig <martin@ximian.com>
14817 * icall.c (icall_entries): It's called "System.Activator", not
14818 "System.Activation".
14820 2004-03-30 Martin Baulig <martin@ximian.com>
14822 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
14823 (mono_class_create_from_typespec): Likewise.
14825 2004-03-30 Martin Baulig <martin@ximian.com>
14827 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
14828 `has_ctor_constraint' and `initialized'.
14830 2004-03-30 Martin Baulig <martin@ximian.com>
14832 * reflection.c (encode_new_constraint): New static function to add
14833 the constructor constraint attribute to a type parameter.
14834 (encode_constraints): Call encode_new_constraint() if necessary.
14837 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
14839 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
14841 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
14843 * reflection.c, icall.c: add support for pinning variables.
14845 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
14847 * marshal.c (mono_marshal_get_managed_wrapper):
14848 init bool local with zero rather than null.
14850 2004-03-29 Martin Baulig <martin@ximian.com>
14852 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
14853 the "official" behavior here.
14854 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
14856 2004-03-29 Martin Baulig <martin@ximian.com>
14858 * icall.c: Reflect latest API changes.
14860 2004-03-29 Martin Baulig <martin@ximian.com>
14862 * loader.c (mono_get_method_from_token): Also call
14863 mono_metadata_load_generic_params () for abstract and interface
14864 methods; replace the type arguments in the method signature with
14865 the ones which are loaded from the metadata.
14867 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
14869 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
14870 of the lock is not the current thread. MS.NET don't do it, in spite of
14871 what the documentation says. See bug #56157.
14873 2004-03-28 Martin Baulig <martin@ximian.com>
14875 * class.c (mono_class_init): Don't call init_properties() and
14876 init_events() for generic instances; set `prop->parent' when
14877 inflating properties.
14879 * reflection.c (mono_generic_inst_get_object): Call
14880 `mono_class_init (ginst->klass)'.
14881 (mono_type_get_object): Only create a MonoGenericInst if your
14882 generic type is a TypeBuilder.
14883 (do_mono_reflection_bind_generic_parameters): Only set
14884 `ginst->is_dynamic' if our generic type is a TypeBuilder.
14886 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
14888 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
14891 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14893 * icall.c: added Kill_internal icall.
14894 * process.[ch]: added Kill_internal icall.
14896 2004-03-25 Martin Baulig <martin@ximian.com>
14898 * class.h (MonoStats): Added `generic_instance_count',
14899 `inflated_method_count', `inflated_type_count' and
14900 `generics_metadata_size'.
14902 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14904 * reflection.c: no warnings now.
14906 2004-03-25 Martin Baulig <martin@ximian.com>
14908 * class.c (mono_class_get_full): New public function; does a
14909 mono_class_get(), but also takes a `MonoGenericContext *'.
14911 * loader.c (mono_field_from_memberref): Renamed to
14912 `field_from_memberref', made static and added `MonoGenericContext *'
14914 (mono_field_from_token): Added `MonoGenericInst *' argument.
14915 (method_from_memberef): Likewise.
14916 (mono_get_method_from_token): Likewise.
14917 (mono_get_method_full): New public function; does a
14918 mono_get_method(), but also takes a `MonoGenericContext *'.
14920 * verify.c (mono_method_verify): Get the method's generic context
14921 and pass it to mono_field_from_token(), mono_get_method_full() and
14922 mono_class_get_full().
14924 2004-03-25 Martin Baulig <martin@ximian.com>
14926 * class.c (mono_class_inflate_generic_type): Take a
14927 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
14928 `MonoGenericMethod *'.
14930 2004-03-25 Martin Baulig <martin@ximian.com>
14932 * loader.h (MonoMethodInflated): Store the MonoGenericContext
14933 instead of the MonoGenericMethod here.
14935 2004-03-25 Martin Baulig <martin@ximian.com>
14937 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
14938 each time we create a new MonoGenericInst, we also create a new
14939 context which points back to us.
14941 * class.c (inflate_method): Use `ginst->context' instead of
14942 creating a new context.
14944 * loader.c (method_from_memberref): Use
14945 `klass->generic_inst->context' instead of creating a new context.
14947 2004-03-25 Martin Baulig <martin@ximian.com>
14949 * class.h (MonoGenericContext): New struct.
14950 (MonoGenericMethod): Removed `generic_inst'.
14952 * class.c (mono_class_inflate_generic_method): Take a
14953 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
14955 2004-03-25 Martin Baulig <martin@ximian.com>
14957 * loader.h (MonoMethodInflated): New typedef.
14959 * metadata.h (MonoMethodSignature): Removed `gen_method', make
14960 `generic_param_count' consume just 30 bits, added `is_inflated'
14961 and `has_type_parameters' flags (one bit each).
14963 * class.c (mono_class_inflate_generic_method): Create a
14964 MonoMethodInflated instead of a MonoMethodNormal and set
14965 `is_inflated' in the method signature.
14967 * class.h (MonoGenericMethod): Removed `generic_method'.
14969 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
14971 * image.c: Make sure the name of a MonoImage is always an absolute path.
14972 This fixes bug #54415.
14974 2004-03-24 Martin Baulig <martin@ximian.com>
14976 * class.c (mono_class_setup_vtable): If we're a generic instance,
14977 use our generic type's vtable size.
14979 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
14981 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
14982 MONO_NO_UNLOAD env var as a temporary workaround for unloading
14985 2004-03-23 Martin Baulig <martin@ximian.com>
14987 * class.h (MonoDynamicGenericInst): Added `int count_events' and
14988 `MonoEvent *events'.
14990 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
14991 (typebuilder_icalls): Added "get_event_info"; calls
14992 mono_reflection_event_builder_get_event_info().
14994 * reflection.c (mono_reflection_generic_inst_initialize): Added
14995 `MonoArray *events'.
14996 (mono_reflection_event_builder_get_event_info): New function.
14998 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
15000 * object.h: add mono_type_initialization_init
15002 * object.c (mono_runtime_class_init):
15003 implement class constructor synchronization rules
15004 to cope with threading issues.
15005 add mono_type_initialization_init
15007 * appdomain.c (mono_runtime_init): call
15008 mono_type_initialization_init
15010 * class.h: removing initializing field from MonoVTable
15012 2004-03-23 Martin Baulig <martin@ximian.com>
15014 * class.c (my_mono_class_from_generic_parameter): Use
15015 `param->name' if it's not NULL.
15017 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
15019 * class.c: do not insert non-virtual methods in the vtable.
15020 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
15021 that means the method is non-virtual. This never would have
15024 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
15026 * profiler.c: Added lock for accessing coverage_hash.
15028 2004-03-22 Martin Baulig <martin@ximian.com>
15030 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
15031 `method->method->signature->generic_param_count != 0' to make it
15032 work for interface methods.
15034 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15036 * process.c: quote the string passed to the shell using g_shell_quote.
15038 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15041 (mono_threads_manage): don't remove the finalizer thread and self
15042 from the threads hash table so that mono_thread_manage can be called
15045 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15047 * process.c: quote the arguments when UseShellExecute is true. Fixes
15050 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15052 * threads.c: set mono_thread_detach as a cleanup routine for every
15053 thread. This way it's always executed upon thread termination, either
15054 aborted or finished normally. No more xsp hangs!
15056 2004-03-17 Martin Baulig <martin@ximian.com>
15058 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
15059 `int count_nested' and a `MonoType **nested'.
15061 * reflection.c (mono_reflection_bind_generic_parameters): Moved
15062 most of the functionality into a new static
15063 do_mono_reflection_bind_generic_parameters() and don't take a
15064 `MonoType *nested_in' argument any more. Don't compute nested
15066 (mono_reflection_generic_inst_get_nested_types): New public method
15067 to get nested types.
15069 * class.c (mono_class_create_generic): Set `klass->nested_in' if
15070 we're a nested class.
15072 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
15073 mono_reflection_generic_inst_get_nested_types() to compute the
15076 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15078 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
15079 descriptive error message under windows.
15081 2004-03-17 Martin Baulig <martin@ximian.com>
15083 * class.c (dup_type): Added `const MonoType *original' argument;
15084 copy the attrs from the original type.
15086 2004-03-17 Martin Baulig <martin@ximian.com>
15088 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
15089 `m->generic_inst_cache' here.
15091 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
15093 * exception.h exception.c: Add stack_overflow_exception.
15095 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15098 (overlapped_callback): call SetEvent *after* invoking the callback.
15099 No need to call CloseHandle.
15101 2004-03-16 Martin Baulig <martin@ximian.com>
15103 * reflection.c (mono_image_get_fieldref_token): Take a
15104 `MonoReflectionField *' instead of a `MonoClassField *' and a
15105 `MonoClass *'; store the `MonoReflectionField *' in the hash.
15107 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15109 * appdomain.c: don't add the culture to the filename we're looking for
15110 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
15112 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15114 * locales.c: don't ignore symbols when doing case insensitive compares.
15115 Thanks Dick! Fixes bug #54046.
15117 * threads.c: surround 'threads' usage with enter/leave in
15118 mono_thread_manage.
15120 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
15122 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
15123 implicitly marshalled as [Out]. Fixes #55450.
15125 (mono_marshal_get_runtime_invoke): Zero out the result if there is
15128 2004-03-16 Martin Baulig <martin@ximian.com>
15130 * class.c (mono_class_from_generic_parameter): Use the actual
15133 2004-03-16 Martin Baulig <martin@ximian.com>
15135 * reflection.c (type_get_signature_size): New static function.
15136 Compues the size of the type in a method signature.
15137 (method_get_signature_size): New static function; calls
15138 type_get_signature_size() to compute the actual size of the
15139 method's signature.
15140 (method_encode_signature): Use method_get_signature_size() to get
15141 the signature's size rather than using `nparams * 10'.
15143 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15145 * file-io.h: define here WapiOverlapped on windows. I don't want the
15146 regular OVERLAPPED one.
15149 * threadpool.c: somehow, BindIoCompletionCallback is not found.
15150 Disabling AIO on windows.
15152 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15154 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
15157 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15159 * appdomain.c: upgraded corlib version.
15161 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
15162 and BeginWrite. Allow opening files for asynchrnous operations.
15164 * file-io.h: new struct that maps FileStreamAsyncResult.
15165 * icall.c: added new icalls.
15166 * process.[ch]: support setting child process environment variables
15167 and use the SHELL or COMSPEC when UseShellExecute is true.
15169 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
15170 callback for async. IO is here and also BindHandle.
15172 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
15175 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
15177 * reflection.c (create_custom_attr): Allow len == 0.
15179 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
15180 computation on big-endian machines.
15182 2004-03-13 Martin Baulig <martin@ximian.com>
15184 * class.h (MonoGenericInst): Added `int count_ifaces'.
15186 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
15187 `ginst->count_ifaces' instead `klass->interface_count' since we
15188 may get called before the vtable is created.
15190 * loader.c (mono_method_get_param_names): If we're a generic
15191 instance, return and don't initialize the class.
15193 * reflection.c (mono_reflection_setup_generic_class): Don't call
15194 ensure_runtime_vtable().
15195 (mono_reflection_bind_generic_parameters): Set
15196 `ginst->count_ifaces'.
15198 2004-03-11 Jackson Harper <jackson@ximian.com>
15202 * unicode.h: Remove unused System.Char icalls.
15204 2004-03-11 Miguel de Icaza <miguel@ximian.com>
15206 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
15207 code when we P/Invoke the first library in Windows.Forms, instead
15208 of when we first open the assembly.
15210 * assembly.c: Drop the lookup from here.
15212 2004-03-10 Martin Baulig <martin@ximian.com>
15214 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
15215 class for properties, fields and events. Finally fixes #54945.
15217 2004-03-10 Martin Baulig <martin@ximian.com>
15219 * metadata.c (mono_metadata_class_equal): New static function;
15220 checks whether two generic instances or two generic parameters are
15222 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
15225 2004-03-10 Martin Baulig <martin@ximian.com>
15227 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
15229 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
15230 argument and write it into the `reflection_info' field.
15233 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
15234 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
15236 2004-03-09 Jackson Harper <jackson@ximian.com>
15238 * char-conversions.h: use 8 bits for numeric data its all we need
15239 * icall.c: numeric data is only 8 bits now.
15241 2004-03-09 Martin Baulig <martin@ximian.com>
15243 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
15245 * class.c (init_properties, init_events): Initialize the new
15248 * reflection.c (typebuilder_setup_properties): Likewise.
15249 (typebuilder_setup_events): Likewise.
15251 * reflection.h (MonoEventInfo): Replaced `parent with
15252 `declaring_type' and `reflected_type'.
15254 * icall.c (ves_icall_get_property_info): Distinguish between
15255 declaring and reflected type.
15256 (ves_icall_get_event_info): Likewise.
15258 2004-03-09 Martin Baulig <martin@ximian.com>
15260 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
15261 (ves_icall_Type_GetField): Correctly set field->klass.
15263 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
15265 * loader.h: Fix warning.
15267 2004-03-08 Miguel de Icaza <miguel@ximian.com>
15269 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
15270 library routine if present. Notice that it will still continue
15271 executing even if its missing, for those working on the Gtk#
15272 edition of Windows.Forms.
15274 * assembly.c (do_mono_assembly_open): If loading the
15275 System.Windows.Forms call mono_loader_wini_init.
15277 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
15279 * class.h: Added MonoRemoteClass struct.
15280 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
15281 function for MonoStrings.
15282 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
15283 Added internal call for getting the proxy type.
15284 * marshal.c: Get the type of transparent proxies from its remote_class.
15285 Added methods that generate the IL for type checks and casts:
15286 mono_marshal_get_isinst, mono_marshal_get_castclass,
15287 mono_marshal_get_proxy_cancast.
15288 * marshal.h: Declaration of the previous new methods.
15289 * object.c: Added new moethods for creating and updating MonoRemoteClass
15290 instances: mono_remote_class, mono_upgrade_remote_class,
15291 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
15292 * verify.c: FIx transparent_proxy_fields layout.
15293 * appdomain.c: Bump corlib version.
15295 2004-03-04 Jackson Harper <jackson@ximian.com>
15297 * icall.c: Add icall to access char conversion tables.
15298 * char-conversions.h: Character conversion tables.
15299 * Makefile.am: Add char-conversions.h private header file.
15301 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
15303 * appdomain.c (unload_thread_main): Increase unloading timeout to
15304 10 sec as a temporary workaround for Nant problems.
15306 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
15308 * gc.c: Add checks for GC_enable and GC_disable.
15310 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
15311 (jaak@zd.com.pl). Fix memory corruption in String.Replace
15314 2004-02-27 Martin Baulig <martin@ximian.com>
15316 * reflection.c (mono_reflection_bind_generic_parameters): Take a
15317 `MonoReflectionType *' instead of a `MonoType *'.
15319 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
15321 * gc.c (run_finalize): Avoid finalizing the object representing the
15323 (finalizer_thread): Fix warning.
15325 2004-02-25 Martin Baulig <martin@ximian.com>
15327 * class.c (_mono_class_get_instantiation_name): Added `int offset'
15328 argument for nested types.
15329 (mono_class_create_generic): Added support for nested generictypes.
15331 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
15334 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
15336 * reflection.c (method_encode_signature): Increase the minimum
15337 value of `size' from 10 to 11.
15338 (mono_reflection_bind_generic_parameters): Take `int type_argc'
15339 and `MonoType **types' arguments instead of the `MonoArray
15340 *types'; added `MonoType *nested_in'. Recursively instantiate
15343 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
15345 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
15346 stack_overflow_ex members which are used by exception handling.
15348 * appdomain.c (mono_runtime_init): Initialize the new members.
15350 * gc.c (mono_gc_enable): New helper function.
15351 * gc.c (mono_gc_disable): New helper function.
15353 2004-02-23 Martin Baulig <martin@ximian.com>
15355 * icall.c: I must have been really stupid - make it actually work
15358 2004-02-23 Martin Baulig <martin@ximian.com>
15360 * loader.c (method_from_memberref): Only inflate the method if
15361 it's in another klass.
15363 2004-02-23 Martin Baulig <martin@ximian.com>
15365 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
15366 (mono_class_init): If we're a generic instance and an interface,
15367 compute `class->interface_id'; also create `class->interfaces'
15368 here and inflate them.
15370 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
15372 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
15374 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
15376 2004-02-15 Miguel de Icaza <miguel@ximian.com>
15378 * reflection.c (method_encode_code): Improved the error message
15379 generated by the exception.
15381 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15383 * icall.c: Martin did not do what he said in the ChangeLog for
15384 2004-02-18, but put back the changes for properties and events.
15385 Commenting those changes out again and adding comment to bug #54518.
15387 * process.c: removed warning.
15389 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
15391 * marshal.c (emit_struct_conv): Print an error message instead of
15392 asserting when a type does not have the StructLayout attribute.
15394 2004-02-20 Martin Baulig <martin@ximian.com>
15396 * reflection.c (mono_type_get_object): Also use the cache for
15398 (mono_reflection_bind_generic_parameters): Always compute
15401 2004-02-20 Martin Baulig <martin@ximian.com>
15403 * class.h (MonoGenericMethod): Removed `klass'.
15405 * class.c (mono_class_inflate_generic_method): Added `MonoClass
15408 2004-02-20 Martin Baulig <martin@ximian.com>
15410 * reflection.c (method_encode_methodspec): Actually use the
15411 uninflated signature for the memberref.
15413 2004-02-20 Martin Baulig <martin@ximian.com>
15415 * class.h (MonoGenericMethod): Removed `declaring'.
15417 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
15418 is NULL, compute it here.
15420 2004-02-20 Martin Baulig <martin@ximian.com>
15422 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
15424 * metadata.c (mono_metadata_generic_inst_hash): New method.
15425 (mono_metadata_generic_inst_equal): New method.
15427 * reflection.c (mono_reflection_bind_generic_parameters): Use the
15428 `klass->image->generic_inst_cache' cache to avoid creating
15429 duplicate MonoGenericInst's.
15431 * class.c (mono_class_inflate_generic_type): Use the cache.
15433 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
15435 * object.c: fixed gc descriptor calculation for embedded valuetypes.
15437 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15439 * icall.c: added Socket.WSAIoctl icall.
15441 * socket-io.[ch]: implemented
15442 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
15444 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
15446 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
15448 2004-02-18 Urs C Muff <umuff@quark.com>
15450 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
15451 this work on PPC and other big-endian architectures.
15453 * debug-mono-symfile.h: Prepended the names of all the `guint32'
15454 fields with an underscore to make sure they're only accessed by
15455 the read32() macro.
15457 2004-02-18 Martin Baulig <martin@ximian.com>
15459 * icall.c: Put the klass->refclass changes back for methods and
15460 fields, but not for properties and events. We're currently not
15461 distinguishing between DeclaringType and ReflectedType for
15462 properties and events, that's what caused the regressions.
15464 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15467 (mono_async_result_new): the handle can be NULL.
15469 * threadpool.c: Use an event instead of a semaphore, don't initialize
15470 it until needed. This saves quite a few semaphores from being created
15471 when using the threadpool.
15473 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
15475 * object.c (mono_string_is_interned_lookup): Fix interning of long
15476 strings. Fixes #54473.
15478 * domain.c (ldstr_equal): Optimize if the two strings are equal.
15480 * icall.c: Revert the klass->refclass changes since they introduce
15481 regressions (bug #54518).
15483 2004-02-18 Martin Baulig <martin@ximian.com>
15485 * class.c (mono_class_init): If we're a generic instance and don't
15486 come from a TypeBuilder, inflate our members here.
15487 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
15488 (mono_class_create_generic): New public method.
15489 (mono_class_initialize_generic): Removed.
15490 (get_instantiation_name): Renamed to
15491 _mono_class_get_instantiation_name() and made it public.
15493 2004-02-18 Martin Baulig <martin@ximian.com>
15495 * class.c (mono_class_inflate_generic_type): Clear the new
15496 instance's `nginst->klass' when inflating a generic instance.
15497 (mono_class_is_subclass_of): Added (basic) support for generic
15500 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
15502 * appdomain.h, domain.c: use a MonoCodeManager instead of a
15503 MonoMempool to hold compiled native code.
15505 2004-02-17 Martin Baulig <martin@ximian.com>
15507 * class.h (MonoDynamicGenericInst): Added `count_properties' and
15510 * reflection.c (mono_reflection_generic_inst_initialize): Added
15511 `MonoArray *properties' argument.
15513 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
15515 2004-02-17 Martin Baulig <martin@ximian.com>
15517 * icall.c (ves_icall_Type_GetFields): Renamed to
15518 ves_icall_Type_GetFields_internal() and added a
15519 `MonoReflectionType *rtype' argument; pass it to
15520 mono_field_get_object() to set the field's "reflected" type.
15521 (ves_icall_Type_GetConstructors): Likewise.
15522 (ves_icall_Type_GetEvents): Likewise.
15523 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
15524 argument; pass it to mono_method_get_object() to set the method's
15527 2004-02-17 Martin Baulig <martin@ximian.com>
15529 * class.h (MonoDynamicGenericInst): New type.
15530 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
15532 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
15533 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
15534 (ves_icall_MonoGenericInst_GetFields): New interncall.
15536 * class.c (mono_class_from_generic): Don't call
15537 mono_class_initialize_generic() if this is a dynamic instance;
15538 ie. it's being created from a TypeBuilder.
15539 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
15540 `class->byval_arg.type'.
15542 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
15543 to `inflate_method' and made static.
15544 (mono_reflection_inflate_field): Removed.
15545 (mono_reflection_generic_inst_initialize): New public method.
15547 * reflection.h (MonoReflectionGenericInst): Removed `methods',
15548 `ctors' and `fields'; added `initialized'.
15550 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
15552 * debug-helpers.c (mono_method_full_name): Fix output for empty
15555 2004-02-12 Martin Baulig <martin@ximian.com>
15557 * class.h (MonoClassField): Added `MonoType *generic_type'.
15559 * reflection.c (mono_image_get_fieldref_token): Added support for
15560 instantiated generic types.
15561 (field_encode_inflated_field): Removed.
15562 (mono_image_get_inflated_field_token): Removed.
15563 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
15565 * reflection.h (MonoReflectionInflatedField): Removed.
15567 2004-02-12 Martin Baulig <martin@ximian.com>
15569 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
15570 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
15572 * reflection.c (mono_image_get_methodspec_token): Take a
15573 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
15574 (mono_image_create_token): Check whether we have a
15575 `method->signature->gen_method' and call
15576 mono_image_get_methodspec_token() if appropriate.
15577 (inflated_method_get_object): Removed.
15578 (mono_reflection_bind_generic_method_parameters): Return a
15579 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
15580 (mono_reflection_inflate_method_or_ctor): Likewise.
15582 * reflection.h (MonoReflectionInflatedMethod): Removed.
15584 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
15586 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
15587 for custom valuetype marshalling.
15589 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
15591 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15593 * icall.c: fixed WSAGetLastError_internal name.
15595 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
15597 * threads.c (mono_thread_attach): Allow this to be called multiple
15598 times for a thread.
15600 * threads.c (build_wait_tids): Do not wait for ourselves.
15602 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
15603 appdomain list is empty.
15605 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
15606 memory returned by mono_string_builder_to_utf16, since it points into
15607 managed memory. Thanks to Bernie Solomon for noticing this.
15609 * icall.c: Add AppDomainSetup icalls.
15611 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
15613 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
15616 * reflection.c (reflection_methodbuilder_to_mono_method): Save
15617 custom attributes to the method_aux struct. Also fix array indexes etc.
15619 * loader.c (mono_method_get_param_names): Make dynamic case work again.
15621 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
15623 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
15624 (both static and runtime) and reduce startup time.
15626 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
15628 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
15629 AsAny marshalling conversion instead of crashing.
15631 * marshal.c: Fix warnings.
15633 2004-02-09 Martin Baulig <martin@ximian.com>
15635 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
15637 * reflection.h (MonoReflectionInflatedMethod): Removed the
15638 `declaring' field, it's now in the unmanaged MonoGenericMethod.
15640 * reflection.c (method_encode_methodspec): Removed the `method'
15641 argument; we get it from `gmethod->declaring'.
15642 (inflated_method_get_object): Removed the `declaring' argument.
15644 2004-02-09 Martin Baulig <martin@ximian.com>
15646 * class.h (MonoGenericMethod): New type.
15647 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
15650 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
15651 a `MonoGenericMethod *gen_method' one.
15653 * class.c (mono_class_inflate_generic_type): Take an additional
15654 `MonoGenericMethod * argument. This is only non-NULL if we're
15655 inflating types for a generic method.
15656 (mono_class_inflate_generic_signature): Renamed to
15657 inflate_generic_signature() and made static; take a
15658 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15659 (inflate_generic_header): Take a `MonoGenericMethod *' argument
15660 instead of a `MonoGenericInst *' one.
15661 (mono_class_inflate_generic_method): Likewise.
15663 * reflection.c (encode_generic_method_sig): Take a
15664 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
15665 (method_encode_methodspec): Likewise.
15666 (inflated_method_get_object): Likewise.
15668 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
15669 field with a `MonoGenericMethod *gmethod' one.
15671 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
15673 * class.h (mono_class_has_parent): add parens to expansion
15676 2004-02-08 Martin Baulig <martin@ximian.com>
15678 * image.h (MonoImage): Removed `generics_cache'.
15680 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
15681 instead of a `MonoType *' argument; removed the `inflate_methods'
15682 argument. Don't inflate methods here.
15684 * loader.c (find_method): If it's a generic instance, call
15685 mono_class_init() on the `sclass->generic_inst->generic_type'.
15687 * metadata.c (mono_type_size): Make this work on uninitialized
15688 generic instances; call it on the `ginst->generic_type's class.
15690 * reflection.c (mono_reflection_bind_generic_parameters): Call
15691 mono_class_from_generic() to create the `ginst->klass'.
15693 2004-02-08 Martin Baulig <martin@ximian.com>
15695 * class.h (MonoClass): Changed type of `generic_inst' from
15696 `MonoType *' to `MonoGenericInst *'.
15698 2004-02-08 Martin Baulig <martin@ximian.com>
15700 * icall.c (ves_icall_Type_BindGenericParameters): Just call
15701 mono_type_get_object(), this is now creating a `MonoGenericInst'
15702 for MONO_TYPE_GENERICINST.
15703 (ves_icall_MonoGenericInst_GetParentType): Likewise.
15704 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
15706 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
15707 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
15708 (inflated_method_get_object): Added `MonoClass *refclass' argument.
15709 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
15710 and reflected type.
15712 * reflection.h (MonoReflectionInflatedMethod): Removed
15713 `declaring_type' and `reflected_type'.
15715 2004-02-08 Martin Baulig <martin@ximian.com>
15717 * class.h (MonoGenericInst): Added `MonoType *parent' and
15718 `MonoType **ifaces'.
15720 * reflection.h (MonoReflectionGenericInst): Removed `klass',
15721 `parent' and `interfaces'.
15723 * reflection.c (mono_reflection_bind_generic_parameters): Take a
15724 `MonoType *' argument and return a `MonoType *'.
15727 (ves_icall_MonoGenericInst_GetParentType): New interncall.
15728 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
15730 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
15732 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
15733 valuetype marshalling.
15735 2004-02-06 Martin Baulig <martin@ximian.com>
15738 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
15739 (my_mono_class_from_generic_parameter): Likewise.
15741 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
15743 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
15744 contents of the symbol files lazily.
15746 * object.h (MonoThread): Add 'name' and 'name_len' fields.
15748 * threads.h threads.c icall.c: New icalls for getting and setting the
15751 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
15753 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
15754 Raise an exception when the domain is not found.
15756 2004-02-03 Martin Baulig <martin@ximian.com>
15758 * reflection.c (mono_image_get_methodspec_token): Use the
15759 uninflated signature; fixes gen-33.
15761 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
15763 * gc.c threads.c: Make the finalizer thread a normal managed thread so
15764 the finalizer code can use thread functionality.
15766 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
15767 the finalizer thread.
15769 * threads.c: Make some functions more robust.
15771 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
15773 * metadata.h: Add new marshalling conventions.
15775 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
15776 stringbuilder marshalling. Fixes #53700.
15778 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
15780 * reflection.c (mono_image_get_type_info): Save declarative security
15783 * reflection.c (mono_image_get_field_info): Handle uninitialized
15784 unmanaged fields as well.
15786 * appdomain.c: Bump corlib version.
15788 2004-02-01 Martin Baulig <martin@ximian.com>
15790 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
15791 method type arguments.
15793 2004-01-30 Duncan Mak <duncan@ximian.com>
15795 * marshal.h: Add prototype for
15796 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
15798 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
15801 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
15803 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
15804 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
15806 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
15808 * marshal.c (mono_marshal_get_native_wrapper): Add support for
15809 custom marshalling of valuetypes.
15811 * marshal.c: Fix some warnings.
15813 2004-01-29 Martin Baulig <martin@ximian.com>
15815 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
15816 for generic method parameters.
15818 * reflection.c (method_encode_methodspec): Write the uninflated
15819 signature into the methodspec table.
15820 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
15821 is always the uninflated method.
15822 (reflection_methodbuilder_to_mono_method): Copy the generic
15823 parameters from the MethodBuilder into `header->gen_params'.
15825 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
15827 * class.c (mono_class_from_generic_parameter): Fix warning.
15829 2004-01-27 Martin Baulig <martin@ximian.com>
15831 * class.c (mono_class_from_generic_parameter): Don't create
15832 `klass->methods' here.
15834 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
15836 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
15837 extension since it does not work with libraries named lib<FOO>.dll.so.
15839 2004-01-25 Martin Baulig <martin@ximian.com>
15841 * class.c (mono_class_inflate_generic_type): Added support for
15842 MONO_TYPE_GENERICINST.
15844 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
15845 inflate methods on open constructed types.
15847 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15849 * object.c: fire ProcessExit event in the root AppDomain after running
15850 Main. Fixes bug #53299.
15852 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15854 * socket-io.c: include the new socket-wrappers.h header.
15855 Use the wrappers instead of the unix socket functions to make the code
15858 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
15860 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
15862 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
15865 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
15867 * reflection.c (mono_image_create_pefile): Handle the case when the
15868 entry point is not a MethodBuilder.
15870 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
15871 field to ReflectionMethod since it is not allways a builder.
15873 * reflection.c (type_get_fully_qualified_name): New helper function to
15874 return the fully qualified name of a type.
15876 * reflection.c (encode_marshal_blob): Always emit the fully qualified
15877 type name for custom marshallers.
15879 * reflection.c (mono_marshal_spec_from_builder): Ditto.
15881 * class.c (mono_class_setup_vtable): If a parent class already
15882 implements an interface, use the implementing methods from that class.
15885 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15887 * threadpool.c: just return instead of ExitThread to allow for thread
15890 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
15892 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
15893 when closing resource modules.
15895 * reflection.c (mono_image_create_pefile): Handle the case when the
15896 entry point is not a MethodBuilder.
15898 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
15899 field to ReflectionMethod since it is not allways a builder.
15901 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
15903 * marshal.c (mono_marshal_get_managed_wrapper):
15904 mono_marshal_alloc takes native int so CONV_I
15905 the arg for 64bits.
15907 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
15909 * reflection.c (fixup_cattrs): New function to fixup the methoddef
15910 tokens in the cattr table. Fixes #53108.
15912 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15914 * loader.c: don't trim ".dll" before looking up in the config file.
15915 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
15917 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
15919 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
15920 Return the module which contains the resource as well.
15921 (ves_icall_System_Reflection_Module_Close): New icall.
15923 * appdomain.c: Bump corlib version number.
15925 * image.c (mono_image_addref): New public function.
15927 * assembly.c: Call mono_image_addref.
15929 * reflection.c (mono_module_get_object): Increase reference count of
15932 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
15935 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
15936 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
15937 proper exceptions on DllImport problems.
15939 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
15941 * class.c, metadata.c: eliminate CSIZE macro.
15943 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
15945 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
15946 * object.h: Added async_callback field in MonoAsyncResult.
15947 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
15948 * verify.c: Added async_callback in MonoAsyncResult layout.
15950 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
15952 * reflection.c (mono_reflection_get_custom_attrs): Add support
15955 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
15957 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
15959 (mono_marshal_method_from_wrapper): Add null pointer check.
15961 2004-01-16 Martin Baulig <martin@ximian.com>
15963 * debug-mono-symfile.h: Set version number to 36 and reflect
15964 latest symbol writer changes.
15966 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
15968 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
15969 multi-dimensional arrays.
15970 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
15971 (mono_class_from_mono_type): Use bounded_array_class_get.
15973 * class.c (mono_bounded_array_class_get): New function which takes
15974 a 'bounded' bool argument to distinguish vectors from one dimensional
15977 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
15978 bounded_array_class_get if the array has bounds.
15980 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
15981 Search modules loaded using AssemblyBuilder:AddModule as well.
15983 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15985 * appdomain.c: increased corlib version.
15986 * filewatcher.c: removed g_print.
15988 (get_property_info): only allocate what is actually requested.
15989 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
15991 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15993 * Makefile.am: added filewatcher.[ch]
15994 * filewatcher.[ch]: FileSystemWatcher runtime support.
15995 * icall.c: added new FSW icalls.
15997 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
15999 * string-icalls.c: fix stringbuilder regression as suggested by
16000 Iain McCoy <iain@mccoy.id.au>.
16002 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
16004 * process.c (process_read_stringtable_block): Recognize '007f' as
16005 a language neutral stringtable block.
16007 2004-01-12 Patrik Torstensson
16009 * object.h (MonoStringBuilder) : Changed layout to support our
16010 new stringbuilder class.
16011 * marshal.c: Change marshalling to support the new layout of
16013 * appdomain.c: increased version number because new layout of
16016 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
16018 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
16019 assembly name as an string instead of an AssemblyName, since it is
16020 easier to extract info from it.
16022 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
16023 the culture subdirectories too. Fixes #52231.
16025 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16027 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
16028 It takes 2 new parameters with an optional name for the method to look
16029 for and case ignoring info.
16031 * threadpool.c: removed unused variable.
16033 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16035 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
16036 It takes 2 new parameters with an optional name for the property to look
16037 for and case ignoring info.
16040 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
16042 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
16045 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16048 * assembly.c: escape the uri before passing it to g_filename_from_uri.
16051 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
16053 * reflection.c: Add support for more than one unmanaged resource.
16055 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
16056 in field->def_value, as done in all other cases.
16058 * reflection.c (mono_reflection_get_custom_attrs): Add support for
16061 * reflection.c (mono_reflection_create_runtime_class): Remove
16062 errorneous assignment to klass->element_class, since it is already
16063 done in mono_reflection_setup_internal_class.
16065 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16067 * gc.c: added missing LeaveCriticalSection.
16068 * icall.c: indented a couple of lines.
16069 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
16070 if we call EndInvoke inside a callback. Fixes bug #52601.
16072 2004-01-07 Martin Baulig <martin@ximian.com>
16074 * mono-debug-debugger.h
16075 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
16077 2004-01-06 Miguel de Icaza <miguel@ximian.com>
16079 * appdomain.c: Use messages in NotImplementedException.
16081 * exception.c (mono_get_exception_not_implemented): Now this takes
16082 a message argument.
16084 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
16085 exception instead of g_asserting an aborting when something is not
16088 Add some inline docs.
16090 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
16092 * reflection.h: Update after changes to object layout.
16094 * reflection.c: Implement saving of unmanaged aka win32 resources.
16096 * appdomain.c: Bump version number.
16098 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
16099 Handle missing domains gracefully.
16101 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
16103 * file-io.c : On Windows, there are much more invalid_path_chars.
16105 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16107 * class.h, object.c: prepare for GetType () speedup.
16109 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
16111 * profiler.c: workaround for --profile null reference exception on
16112 cygwin. Patch by Patrik Torstensson.
16114 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
16116 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
16117 make work for unaligned access.
16119 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
16121 * class.c: small cleanup (class->fields [i] -> field).
16122 * image.c: check address of metadata is valid.
16124 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
16126 * assembly.h assembly.c (mono_assembly_loaded): New public function to
16127 search the list of loaded assemblies.
16129 * reflection.c (mono_reflection_type_from_name): Use
16130 mono_assembly_loaded instead of mono_image_loaded.
16132 * reflection.c: Fix warnings.
16134 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
16136 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
16137 is dynamic. This is needed since an assembly can contain both dynamic and
16138 non-dynamic images.
16140 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
16143 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
16145 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
16146 to store modules loaded using AddModule.
16148 * reflection.c (mono_image_fill_file_table): Generalize this so it works
16151 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
16153 * reflection.c (mono_image_fill_export_table_from_module): New function to
16154 fill out the EXPORTEDTYPES table from a module.
16156 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
16157 into a separate function. Also handle loaded non-dynamic modules.
16159 * reflection.c (mono_image_basic_init): Fix memory allocation.
16161 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16163 * assembly.c (mono_assembly_load_references): Make this public.
16165 2003-12-19 Martin Baulig <martin@ximian.com>
16167 * class.c (mono_class_initialize_generic): Made this static, take
16168 a `MonoGenericInst *' instead of a `MonoClass *'.
16169 (mono_class_from_generic): Call mono_class_initialize_generic()
16170 unless we're already initialized or being called from
16171 do_mono_metadata_parse_generic_inst().
16173 * class.h (MonoGenericInst): Added `initialized' and
16174 `init_pending' flags.
16176 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
16177 `mono_class_init (gklass)' or mono_class_initialize_generic()
16178 here; set `generic_inst->init_pending' while parsing the
16181 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
16183 * locales.c: include string.h for memxxx prototypes
16185 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
16187 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
16188 constructor when accessing literal fields.
16190 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
16192 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
16194 * reflection.c (assembly_add_resource_manifest): New function to fill
16195 the MANIFESTRESOURCE table.
16197 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
16199 * reflection.h: Update to changes in class layout.
16201 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
16202 Reenable call to mono_runtime_is_shutting_down ().
16204 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
16205 determine if the runtime is shutting down.
16207 2003-12-16 Jackson Harper <jackson@ximian.com>
16209 * icall.c: comment out call to mono_runtime_is_shutting_down to
16212 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
16214 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
16215 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
16217 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
16219 * reflection.c: move definition of swap_with_size
16220 to before its first call
16222 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
16224 * appdomain.c (mono_runtime_is_shutting_down): New public function.
16226 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
16229 * object.c: Fix warnings.
16231 * icall.c (ves_icall_Type_Get...): Only consider inherited static
16232 members if FlattenHierarchy is set.
16234 * reflection.c (mono_image_add_decl_security): New function to emit
16235 declarative security.
16237 * reflection.h reflection.c: Add support for declarative security.
16239 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16241 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
16243 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
16245 * appdomain.c verify.c: Moved corlib version checking into its own
16246 function in appdomain.c since it needs to create vtables etc.
16248 2003-12-13 Patrik Torstensson <p@rxc.se>
16250 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
16251 instead of unwrapped server.
16253 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
16255 * verify.c (check_corlib): Fix field index.
16257 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
16259 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
16262 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
16264 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
16265 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
16266 cope with sizeof(size_t) != sizeof(guint32).
16268 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16270 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
16271 in case of failure.
16273 2003-12-10 Mark Crichton <crichton@gimp.org>
16275 * icall.c: removed the GetNonZeroBytes. We now handle this case
16278 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
16280 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
16282 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
16285 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
16287 * verify.c (check_corlib): Handle the case when the version field is
16288 initialized by a static constructor.
16290 2003-12-08 Patrik Torstensson <p@rxc.se>
16292 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
16294 2003-12-08 Martin Baulig <martin@ximian.com>
16296 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
16297 a MonoReflectionGenericParameter, also take the parameter index
16298 and name as arguments.
16299 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
16300 (ves_icall_MonoGenericParam_initialize): New interncall.
16301 (ves_icall_Type_make_byref_type): New interncall.
16303 * reflection.h (MonoReflectionGenericParam): Derive from
16304 MonoReflectionType, not just from MonoObject. Added `refobj' and
16307 * reflection.c (mono_reflection_define_generic_parameter): Create
16308 and return a new MonoReflectionGenericParam; don't initialize the
16310 (mono_reflection_initialize_generic_parameter): New public method;
16311 initializes the constraints and creates the `param->pklass'.
16313 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
16315 * reflection.h reflection.c: Use the new fields 'num_types',
16316 'num_fields' and 'num_methods' to track the number of types etc.
16318 * verify.c (check_corlib): Check corlib version number.
16320 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
16322 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
16323 function works on all methods.
16325 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
16327 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
16328 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
16329 the custom_type_info flag of the transparent proxy.
16330 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
16331 objects that supports IRemotingTypeInfo.
16332 * object.h: Added custom_type_info field in transparent proxy.
16334 2003-12-06 Martin Baulig <martin@ximian.com>
16336 * class.c (mono_class_create_from_generic): Removed.
16337 (mono_class_from_generic): Check `ginst->klass' before doing
16338 anything else. This is important to fully support "recursive"
16341 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
16342 empty `generic_inst->klass' before doing anything else.
16344 2003-12-06 Dick Porter <dick@ximian.com>
16349 * locales.c: Use C structs to access class fields. Don't do a
16350 conversion between MonoString and UChar because both are
16351 platform-endian UTF-16. Compare now takes startindex and count
16352 parameters. Add a char overload for IndexOf. Speed up the
16353 invariant string IndexOf.
16355 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
16357 * Makefile.am (monosn_LDADD): Fix parallel build.
16359 2003-12-04 Martin Baulig <martin@ximian.com>
16362 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
16363 (ves_icall_Type_make_array_type): New interncall.
16365 2003-12-04 Martin Baulig <martin@ximian.com>
16367 * locales.c: also change it in the !HAVE_ICU case.
16369 2003-12-04 Dick Porter <dick@ximian.com>
16372 * locales.c: construct_compareinfo is now in CompareInfo, not
16375 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
16377 * image.c (mono_image_load_file_for_image): Cache loaded images in the
16378 image->files array.
16380 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
16383 * assembly.c (mono_assembly_load_references): Only load references
16386 * class.c (mono_class_from_name): Avoid linear search of the
16387 EXPORTEDTYPE table.
16389 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
16391 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
16393 * image.h (MonoImage): Add 'field_cache' field.
16395 * loader.c (mono_field_from_token): Cache field lookups.
16397 * reflection.c (mono_module_get_object): Fix name property.
16399 * icall.c (ves_icall_get_enum_info): Update after changes to
16400 mono_metadata_get_constant_index ().
16402 * icall.c: Get rid of get_type_info icall, use a separate icall for
16403 each type property to avoid needless memory allocations. Fixes #51514.
16405 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
16406 to avoid needless binary searches.
16408 * class.c (class_compute_field_layout): Move the initialization of
16409 field->def_value to mono_class_vtable ().
16411 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
16414 * object.c (mono_object_allocate): Make it inline.
16416 * object.c (mono_object_allocate_spec): Make it inline.
16418 2003-12-02 Dick Porter <dick@ximian.com>
16420 * locales.c (create_NumberFormat): NumberFormatInfo construction.
16421 Patch by Mohammad DAMT (mdamt@cdl2000.com).
16423 2003-12-01 Dick Porter <dick@ximian.com>
16425 * threads.c: Fix signature and call in CreateMutex and
16428 2003-12-01 Dick Porter <dick@ximian.com>
16431 * locales.c: Implement string compares and searching
16433 * object.h: Add extra Thread field
16435 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
16437 * reflection.c (fixup_method): Add support for MonoCMethod.
16439 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
16441 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
16443 * reflection.c (assembly_name_to_aname): Allow extra characters in
16444 assembly names. Fixes #51468.
16446 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
16448 * exception.c (mono_exception_from_name_domain): New helper function.
16450 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
16451 exception object in the correct domain.
16453 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
16454 formatting + make a copy a the input data.
16456 * loader.c (mono_get_method_from_token): Methods which contain
16457 native code do not have entries in the ImplMap.
16459 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
16460 Thanks to Gonzalo for spotting this.
16462 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
16463 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
16465 * assembly.h (mono_assembly_load_from): Split the second part of
16466 assembly loading into a new public function.
16468 * exception.h (mono_get_exception_bad_image_format): New function.
16470 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
16472 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16473 Enumerate all modules inside a dynamic assembly. Fixes #51293.
16475 * icall.c: Add new icall for creating dynamic methods.
16477 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
16479 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
16481 * reflection.c (mono_reflection_create_dynamic_method): New icall to
16482 create a dynamic method.
16484 * reflection.c (resolve_object): New helper function.
16486 * reflection.c: Generalize ReflectionMethodBuilder and the functions
16487 which manipulate it so they can also work on dynamic methods.
16489 * reflection.c (reflection_method_builder_to_mono_method): Avoid
16490 creating the MonoReflectionMethodAux structure if it is not needed.
16492 * reflection.h verify.c: Update after changes to object layout.
16494 * reflection.c (method_builder_encode_signature): Fix compilation on
16497 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
16499 * appdomain.h: Added support for context static fields. Added static_data
16500 field to MonoAppContext and renamed thread_static_fields to a more
16501 generic special_static_fields in MonoAppDomain, since it can now contain
16502 context static fields.
16503 * domain.c: Updated hashtable name.
16504 * object.c: Replaced field_is_thread_static() for a more generic
16505 field_is_special_static() which also checks for context static attribute.
16506 In mono_class_vtable(), added support for static context fields.
16507 * threads.c: Changed methods that manage thread static fields to more
16508 generic methods so they can be reused both for thread and context static
16510 * threads.h: Declared some new methods.
16512 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
16514 * reflection.h: Update after changes to the managed types.
16516 * reflection.c (encode_custom_modifiers): New helper function.
16518 * reflection.c (method_encode_signature): Emit custom modifiers.
16520 * reflection.c (field_encode_signature): Emit custom modifiers.
16522 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
16524 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
16526 * icall.c (ves_icall_System_ValueType_Equals): New optimized
16529 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
16532 * object.c (mono_field_get_value_object): New function.
16534 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
16537 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
16539 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
16540 return a preallocated out-of-memory exception instance.
16542 * object.c (out_of_memory): Use the new function.
16544 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
16545 flag is before the custom modifiers. Fixes #49802.
16547 2003-11-16 Martin Baulig <martin@ximian.com>
16549 * class.c (mono_class_is_open_constructed_type): Implemented the
16550 MONO_TYPE_GENERICINST case.
16552 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
16554 * assembly.c (mono_assembly_fill_assembly_name): New function to
16555 fill out the MonoAssemblyName structure.
16556 (mono_assembly_open): Use the new function.
16558 * icall.c (fill_reflection_assembly_name): New helper function.
16560 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
16563 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
16565 2003-11-15 Martin Baulig <martin@ximian.com>
16567 * class.c (mono_class_is_open_constructed_type): New public
16568 function; checks whether a type is an open constructed type,
16569 ie. whether it still contains type parameters.
16570 (mono_class_inflate_generic_type): If we're a type parameter and
16571 the inflated type is also a MONO_TYPE_(M)VAR, return the original
16574 * class.h (MonoGenericInst): Added `guint32 is_open'.
16576 * loader.c (method_from_methodspec): Check whether we're an open
16577 or closed constructed type and set `ginst->is_open'.
16579 * reflection.c (mono_reflection_bind_generic_parameters): Check
16580 whether we're an open or closed constructed type and set
16582 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
16583 from open constructed types.
16585 2003-11-15 Martin Baulig <martin@ximian.com>
16587 * reflection.c (mono_reflection_bind_generic_parameters): If we're
16588 a generic instance (instead of a generic type declaration) with
16589 unbound generic parameters, bind them to our actual types.
16591 2003-11-14 Martin Baulig <martin@ximian.com>
16593 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
16595 * reflection.c (mono_reflection_bind_generic_parameters): If we're
16596 an interface type, populate `res->interfaces' with instantiated
16597 versions of all the interfaces we inherit.
16599 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
16601 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
16602 when MONO_PATH is set but doesn't contain the install dir.
16604 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16607 (ves_icall_Type_GetInterfaces): don't return an interface twice when
16608 it's also implemented in base classes. Fixes bug #50927.
16610 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
16612 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
16613 if this method is called from a finalizer. Fixes #50913.
16615 2003-11-12 Miguel de Icaza <miguel@ximian.com>
16617 * threads.c: Implement VolatileRead/VolatileWrite
16619 * icall.c: Add new icalls for VolatileRead/VolatileWrite
16621 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16623 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
16624 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
16627 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
16628 from Peter Ross (pro@missioncriticalit.com).
16630 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
16632 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
16634 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16636 * assembly.c (mono_assembly_load_references): Disable check because it
16637 triggers on older corlibs which lots of people have.
16639 2003-11-12 Jackson Harper <jackson@ximian.com>
16641 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
16642 load corlib.dll if mscorlib.dll is not found.
16643 * assembly.h: Remove corlib name define.
16646 * image.c: Change corlib name to mscorlib.
16648 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
16650 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
16652 2003-11-11 Miguel de Icaza <miguel@ximian.com>
16654 * appdomain.h: Added loader_optimization here to sync with the C#
16655 code, and add disallow_binding_redirects field.
16657 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
16659 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
16661 * reflection.c (mono_image_build_metadata): Fix crash on modules
16664 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
16666 * icall.c (ves_icall_get_method_info): Return callingConvention as
16669 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
16670 namespaces from the EXPORTEDTYPE table as well.
16672 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
16673 from all modules inside the assembly.
16675 2003-11-11 Martin Baulig <martin@ximian.com>
16677 * reflection.c (mono_reflection_bind_generic_parameters): Make
16678 this work for interfaces.
16680 2003-11-11 Martin Baulig <martin@ximian.com>
16682 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
16684 2003-11-11 Martin Baulig <martin@ximian.com>
16686 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
16687 "MonoInflatedMethod" and "MonoInflatedCtor".
16689 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
16691 * reflection.c (resolution_scope_from_image): Use the assembly table
16692 from the manifest module, since other modules don't have it.
16694 * debug-helpers.c (mono_type_full_name): New helper function.
16696 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
16698 * image.c (mono_image_load_file_for_image): New public function which
16699 is a replacement for the load_file_for_image in class.c.
16701 * assembly.c (mono_assembly_load_module): A wrapper for the function
16702 above which does assembly association and reference loading too.
16704 * class.c (mono_class_from_name): Call mono_assembly_load_module.
16706 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16708 * appdomain.c: not all of the attributes for the full assembly name
16709 are required and the order doesn't matter. Fixes bug #50787.
16711 2003-11-10 Dick Porter <dick@ximian.com>
16713 * locales.c: Use platform-endian UTF16
16715 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
16717 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
16719 2003-11-10 Martin Baulig <martin@ximian.com>
16722 (mono_metadata_load_generic_params): Make this actually work.
16724 * reflection.c (mono_reflection_bind_generic_parameters): If our
16725 parent is a generic instance, pass all the `types' to it, no
16726 matter whether it has the same number of type parameters or not.
16728 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
16730 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
16732 * assembly.c (mono_assembly_load_references): Move the image<->assembly
16733 assignment code to this function so it gets called recursively for all
16736 * image.c (load_modules): Remove the assembly assignment since it is
16737 now done by mono_assembly_load_references.
16739 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16740 Add 'module' argument.
16741 (mono_module_get_types): New helper function.
16742 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
16744 2003-11-08 Martin Baulig <martin@ximian.com>
16746 * class.c (mono_class_inflate_generic_method): Interface method
16747 don't have a header.
16749 * reflection.c (mono_image_get_methodspec_token): Take an
16750 additional `MonoGenericInst *' argument instead of reading it from
16751 the header; this is necessary to support interfaces.
16752 (mono_image_create_token): Pass the `MonoGenericInst *' from the
16753 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
16754 (inflated_method_get_object): Take an additional `MonoGenericInst *'
16757 * reflection.h (MonoReflectionInflatedMethod): Added
16758 `MonoGenericInst *ginst'.
16760 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
16762 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
16764 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
16766 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
16768 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
16771 (reflection_methodbuilder_from_method_builder):
16772 (reflection_methodbuilder_from_ctor_builder): New helper functions to
16773 initialize a ReflectionMethodBuilder structure.
16774 (mono_image_get_methodbuilder_token):
16775 (mono_image_get_ctorbuilder_token): New functions to emit memberref
16776 tokens which point to types in another module inside the same assembly.
16778 * reflection.c: Use the new helper functions.
16780 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
16782 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
16783 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
16785 * reflection.c (resolution_scope_from_image): Emit a moduleref if
16788 * reflection.c (mono_image_build_metadata): Emit metadata only for the
16789 current module. Emit the manifest only for the main module.
16791 * reflection.c (mono_image_create_token): Add assertion when a
16792 memberref needs to be created.
16794 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
16796 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
16797 larger buffer for the custom attribute blob. Fixes #50637.
16799 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16801 * threadpool.c: notify listener on async processing handles after
16802 invoking the async callback. Thanks to Zoltan.
16804 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
16806 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
16807 avoid code duplication.
16809 * reflection.h (MonoDynamicImage): New type which is currently unused,
16810 but will be used through the ref.emit code in place of
16811 MonoDynamicAssembly.
16813 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
16816 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
16817 a MonoDynamicImage instead of just a MonoImage.
16819 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
16820 icalls to ModuleBuilder but keep their semantics, so they will work
16821 with moduleb->assemblyb. This will change later.
16823 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
16825 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
16828 * reflection.c (mono_image_build_metadata): Avoid creation of a default
16829 main module, since it is now done by the managed code.
16831 2003-11-03 Martin Baulig <martin@ximian.com>
16833 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
16834 `ginst->klass' here.
16835 (method_encode_methodspec): Don't use the `ginst->generic_method's
16836 klass if it's a generic instance, use `ginst->klass' in this case.
16838 2003-11-03 Martin Baulig <martin@ximian.com>
16840 * reflection.c (mono_image_get_generic_method_param_info):
16841 Removed, use mono_image_get_generic_param_info() instead.
16842 (mono_image_get_type_info): Write the GenericParam table before
16843 the Method table. This is neccessary because in the GenericParam
16844 table, type parameters of the class (ie. '!0' etc.) must come
16845 before the ones from its generic methods (ie. '!!0' etc).
16847 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
16849 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
16851 2003-11-02 Martin Baulig <martin@ximian.com>
16853 * reflection.c (create_generic_typespec): Take a
16854 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
16855 the generic parameters from it.
16857 2003-11-02 Martin Baulig <martin@ximian.com>
16859 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
16860 instead of a `MonoClassField *' since we just need the type.
16861 (create_generic_typespec): New static function. Creates a
16862 TypeSpec token for a generic type declaration.
16863 (mono_image_get_generic_field_token): New static function.
16864 (mono_image_create_token): If we're a FieldBuilder in a generic
16865 type declaration, call mono_image_get_generic_field_token() to get
16868 2003-11-02 Martin Baulig <martin@ximian.com>
16871 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
16872 `MonoReflectionGenericInst *declaring_type' and
16873 `MonoReflectionGenericInst *reflected_type' fields.
16875 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
16876 `MonoReflectionGenericInst *declaring_type' and a
16877 `MonoReflectionGenericInst *reflected_type' argument instead of a
16878 single `MonoReflectionGenericInst *type' one. Set
16879 `res->declaring_type' and `res->reflected_type' from them.
16880 (mono_reflection_inflate_field): Likewise.
16882 2003-11-02 Martin Baulig <martin@ximian.com>
16884 * class.c (mono_class_setup_vtable): Don't store generic methods
16887 2003-11-02 Martin Baulig <martin@ximian.com>
16889 * reflection.h (MonoReflectionGenericInst): Added
16890 `MonoReflectionType *declaring_type'.
16892 * reflection.c (mono_reflection_bind_generic_parameters): Use
16893 `if (tb->parent)' instead of `klass->parent'.
16895 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
16897 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
16898 with an empty ASSEMBLY table.
16900 * reflection.c (mono_image_build_metadata): Avoid using the same loop
16901 variable in the inner and outer loops.
16903 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
16905 * metadata.h (mono_metadata_make_token): Put parentheses around macro
16908 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
16910 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
16911 icalls. Instead, do everything in managed code. This is needed since
16912 it is hard to restore the original domain etc. in unmanaged code in the
16913 presence of undeniable exceptions.
16915 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
16916 New icalls to push and pop appdomain refs.
16918 2003-10-31 Martin Baulig <martin@ximian.com>
16920 * class.c (inflate_generic_type): Renamed to
16921 mono_class_inflate_generic_type() and made it public.
16923 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
16926 * loader.c (mono_field_from_memberref): Also set the retklass for
16929 * fielder.c (mono_image_get_inflated_field_token): New static
16930 method; creates a metadata token for an inflated field.
16931 (mono_image_create_token, fixup_method): Added support for
16932 "MonoInflatedField".
16933 (fieldbuilder_to_mono_class_field): New static function.
16934 (mono_reflection_inflate_field): New public function.
16937 (MonoReflectionGenericInst): Added `MonoArray *fields'.
16938 (MonoReflectionInflatedField): New typedef.
16940 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
16942 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
16943 for Solaris and other platforms without s6_addr16
16945 2003-10-30 Martin Baulig <martin@ximian.com>
16947 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
16948 argument instead of two.
16949 (mono_class_inflate_generic_signature): Likewise.
16950 (inflate_generic_header): Likewise.
16951 (mono_class_inflate_generic_method): Likewise. In addition, if
16952 `ginst->klass' is set, it becomes the new `method->klass'.
16954 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
16957 * reflection.c (encode_generic_method_sig): Write a 0xa as the
16958 first byte. [FIXME]
16959 (method_encode_methodspec): If we have generic parameters, create
16960 a MethodSpec instead of a MethodRef.
16961 (fixup_method): Added support for "MonoInflatedMethod" and
16962 "MonoInflatedCtor".
16963 (mono_image_create_token): Added support for "MonoInflatedMethod"
16964 and "MonoInflatedCtor".
16965 (inflated_method_get_object): New static function; returns a
16966 managed "System.Reflection.MonoInflatedMethod" object.
16967 (mono_reflection_bind_generic_method_parameters): Return a
16968 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
16969 (mono_reflection_inflate_method_or_ctor): Likewise.
16970 (mono_image_get_generic_method_param_info): Initialize unused
16972 (mono_image_get_generic_param_info): Likewise.
16974 * reflection.h (MonoReflectionInflatedMethod): New public
16975 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
16976 "S.R.MonoInflatedCtor" classes.
16978 * loader.c (method_from_memberref): If we're a TypeSpec and it
16979 resolves to a generic instance, inflate the method.
16981 2003-10-28 Dick Porter <dick@ximian.com>
16983 * object.c (mono_runtime_run_main): Convert command-line arguments
16984 into utf8, falling back to the user's locale encoding to do so.
16986 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
16988 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
16991 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
16993 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
16994 up icalls at method definition time. Partially fixes #33569.
16996 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
16998 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
16999 marshalling of arrays. Fixes #50116.
17001 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
17003 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
17004 points to a vtable in the dying appdomain.
17006 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
17007 listeners into unmanaged code inside the lock.
17009 * object.c (mono_class_vtable): Turn off typed allocation in non-root
17010 domains and add some comments.
17012 2003-10-25 Martin Baulig <martin@ximian.com>
17014 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
17016 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
17018 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
17019 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
17020 currently parsing. Create the generic class and store it in
17021 `generic_inst->klass' before parsing the type arguments. This is
17022 required to support "recursive" definitions; see mcs/tests/gen-23.cs
17024 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
17025 to support recursive typespec entries.
17027 * class.c (mono_class_setup_parent): If our parent is a generic
17028 instance, we may get called before it has its name set.
17029 (mono_class_from_generic): Splitted into
17030 mono_class_create_from_generic() and mono_class_initialize_generic().
17032 2003-10-25 Martin Baulig <martin@ximian.com>
17034 * icall.c (ves_icall_Type_BindGenericParameters): Return a
17035 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
17036 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
17037 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
17039 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
17040 (create_typespec): Likewise.
17041 (mono_reflection_bind_generic_parameters): Return a
17042 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
17043 (mono_reflection_inflate_method_or_ctor): New public function.
17045 * reflection.h (MonoReflectionGenericInst): New typedef.
17047 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
17049 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
17050 inside the domain lock. Fixes #49993.
17052 * object.c (mono_class_vtable): When typed allocation is used,
17053 allocate vtables in the GC heap instead of in the mempool, since the
17054 vtables contain GC descriptors which are used by the collector even
17055 after the domain owning the mempool is unloaded.
17057 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
17059 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
17060 reflect what it does. Also invalidate mempools instead of freeing
17061 them if a define is set.
17063 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
17066 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
17067 hold the finalizable objects in this domain.
17069 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
17072 * appdomain.c (mono_domain_set): New function to set the current
17073 appdomain, but only if it is not being unloaded.
17075 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
17076 appdomain which is being unloaded.
17078 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
17079 unloading of the root appdomain.
17081 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
17082 icall to execute a method in another appdomain. Intended as a
17083 replacement for InternalSetDomain, which can confuse the code
17084 generation in the JIT.
17086 * appdomain.c (mono_domain_is_unloading): New function to determine
17087 whenever an appdomain is unloading.
17089 * appdomain.c (mono_domain_unload): New function to correctly unload
17092 * assembly.c (mono_assembly_load_references): Check that an assembly
17093 does not references itself.
17095 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
17096 domain manually, it asks the finalizer thread to do it, then waits for
17097 the result. Also added a timeout.
17099 * icall.c: Register the new icalls.
17101 * threads.h threads.c: Export the mono_gc_stop_world and
17102 mono_gc_start_world functions.
17104 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
17105 function to fill out the mempool with 0x2a.
17107 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
17109 * reflection.h (MonoReflectionMethodAux): New structure to store
17110 information which is rarely used, thus is not in the MonoMethod
17113 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
17114 store the aux info.
17116 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
17117 and marshalling info into the aux structure.
17119 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
17120 from the aux structure.
17122 * loader.c (mono_method_get_param_names): Retrieve the param names from
17125 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
17127 * exception.h exception.c: Add AppDomainUnloadedException && fix
17130 2003-10-21 Dick Porter <dick@ximian.com>
17133 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
17134 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
17136 2003-10-21 Martin Baulig <martin@ximian.com>
17138 * reflection.c (mono_reflection_bind_generic_parameters):
17139 `klass->parent' is NULL for interfaces.
17141 2003-10-21 Martin Baulig <martin@ximian.com>
17143 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17145 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
17147 * exception.c (mono_exception_from_name_msg): New helper function for
17148 creating exceptions and initializing their message field.
17150 * exception.c: Simplify functions using the new helper.
17152 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
17155 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
17156 mono_raise_exception, since otherwise gcc doesn't generate the function
17157 epilog for raise_exception, confusing the stack unwinding in the JIT.
17160 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
17161 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
17164 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17166 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
17169 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
17171 * icall.c: Removed GetUninitializedObject method because
17172 AllocateUninitializedClassInstance does the same.
17174 2003-10-18 Martin Baulig <martin@ximian.com>
17176 * class.c (inflate_generic_signature): Renamed to
17177 mono_class_inflate_generic_signature() and made it public.
17178 (my_mono_class_from_generic_parameter): New static function; if we
17179 don't already have the generic parameter's MonoClass, create a
17180 very simple one which is just used internally in the runtime and
17181 not passed back to managed code.
17183 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
17185 * metadata.h (MonoMethodSignature): Moved the
17186 `MonoGenericParam *gen_params' to the MonoMethodHeader.
17187 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
17189 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
17190 ves_icall_MonoMethod_GetGenericArguments(); this is now an
17191 interncall on the MonoMethod class, not on MethodInfo.
17192 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
17193 calling mono_reflection_bind_generic_method_parameters() directly.
17195 * loader.c (mono_method_get_signature): If this is a MethodSpec;
17196 return the already computed `method->signature'.
17197 (method_from_methodspec): New static function to load a method
17198 from a MethodSpec entry.
17199 (mono_get_method_from_token): Call the new method_from_methodspec()
17200 for MethodSpec tokens.
17201 (mono_get_method_from_token): If we're a generic method, load the
17204 * reflection.c (mono_image_get_memberref_token): Allow
17205 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
17207 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
17208 (mono_image_create_token): First check whether it's a generic
17209 method (so we'd need to create a MethodSpec), then do the other
17211 (mono_reflection_bind_generic_method_parameters): Return a
17212 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
17213 called directly from the interncall.
17215 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
17217 * reflection.c (load_public_key): Move loading of the public key
17220 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
17222 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
17225 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
17226 culture, hash_alg and public_key. Fixes #49555.
17228 2003-10-17 Martin Baulig <martin@ximian.com>
17230 * class.h (MonoGenericInst): Moved this declaration here and added
17231 `MonoMethod *generic_method'.
17234 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
17235 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
17237 * metadata.c (mono_metadata_type_equal): Two types of
17238 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
17239 index; ie. don't compare the address of the `MonoGenericParam'
17241 (mono_metadata_load_generic_params): Removed the `MonoMethod
17244 * metadata.h (MonoGenericInst): Moved declaration to class.h.
17245 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
17247 * reflection.c (method_encode_signature): Encode the number of
17248 generic parameters.
17249 (encode_generic_method_sig): New static function.
17250 (method_encode_methodspec): New static function; creates an entry
17251 in the MethodSpec table for a generic method.
17252 (mono_image_get_methodspec_token): New static function.
17253 (mono_image_create_token): Call mono_image_get_methodspec_token()
17254 for generic methods.
17255 (mono_reflection_bind_generic_method_parameters): New public
17256 function. Instantiates a generic method.
17258 2003-10-16 Martin Baulig <martin@ximian.com>
17260 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
17261 *gen_params' here from MonoMethodHeader.
17263 * metadata.c (mono_metadata_parse_method_signature): If we have
17264 generic parameters, initialize `method->gen_params' and then set
17265 the correct `type->data.generic_param' in all the parameters.
17267 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
17269 * threads.c (mono_threads_get_default_stacksize): New function to
17270 return the default stacksize.
17272 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
17273 termination of the finalizer thread, since the previous method had
17274 race conditions. Fixes #49628.
17276 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
17277 as for the other managed threads.
17279 2003-10-16 Martin Baulig <martin@ximian.com>
17281 * class.c (inflate_generic_signature): Copy `generic_param_count'
17284 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
17287 * metadata.c (mono_metadata_parse_method_signature): Actually set
17288 the `method->generic_param_count' here.
17289 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
17291 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
17293 * object.h: Add a new field to TypedRef to simplify the implementation
17294 of the REFANY opcodes in the JIT.
17296 * icall.c: Make use of the new field.
17298 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
17301 2003-10-15 Martin Baulig <martin@ximian.com>
17303 * class.c (mono_class_from_gen_param): Renamed to
17304 mono_class_from_generic_parameter() and moved most of the
17305 functionality from mono_reflection_define_generic_parameter()
17306 here; ie. we create a "real" class here.
17307 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
17308 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
17309 previously been called.
17311 * class.h (MonoGenericParam): Moved the declaration of this struct
17312 here from metadata.h and added `MonoMethod *method'.
17314 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
17317 * loader.c (mono_get_method_from_token): If we have any generic
17318 parameters, call mono_metadata_load_generic_params() to read them
17319 from the MONO_TABLE_GENERICPAR.
17321 * metadata.c (mono_metadata_load_generic_params): Added
17322 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
17324 * metadata.h (MonoMethodSignature): Replaced
17325 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
17326 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
17328 * reflection.c (mono_reflection_define_generic_parameter): Moved
17329 most of the functionality into the new
17330 mono_class_from_generic_parameter(); set the `method' field if
17331 we're a method parameter.
17333 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
17335 * marshal.c (emit_struct_conv): if native size is 0
17338 2003-10-14 Martin Baulig <martin@ximian.com>
17340 * icall.c: The generics API has changed in the spec since it was
17341 added to System.Type; these modifications make it match the spec
17343 (ves_icall_Type_GetGenericParameters): Renamed to
17344 `ves_icall_Type_GetGenericArguments'.
17345 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
17346 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
17347 `ves_icall_MonoType_get_HasGenericArguments'.
17348 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
17349 `ves_icall_MonoType_get_IsGenericParameter'.
17350 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
17351 this is no interncall anymore.
17352 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
17353 `ves_icall_TypeBuilder_get_IsGenericParameter'.
17355 2003-10-14 Martin Baulig <martin@ximian.com>
17357 * reflection.c (mono_reflection_bind_generic_parameters): Also
17358 inflate generic methods if we're reading the class from IL.
17360 2003-10-13 Martin Baulig <martin@ximian.com>
17362 * reflection.c (mono_reflection_define_generic_parameter): This
17363 method isn't called directly from the icall anymore; take a
17364 `MonoReflectionAssemblyBuilder *' so we can use this for type and
17365 method generic parameters.
17366 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
17367 (method_builder_encode_signature): Encode generic parameters.
17368 (mono_image_get_method_info): Write generic params to the
17369 MONO_TABLE_GENERICPARAM table.
17371 * reflection.h (MonoReflectionMethodBuilder): Added
17372 `MonoArray *generic_params'.
17374 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
17376 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
17377 wrapper for mono_reflection_define_generic_parameter().
17378 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
17380 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
17382 * marshal.h: Add missing function to fix build.
17384 * marshal.c (mono_marshal_get_native_wrapper): Add support for
17385 the SetLastError pinvoke attribute.
17387 * marshal.c (mono_marshal_set_last_error): New helper function called
17388 by the generated code.
17390 * marshal.c (mono_mb_emit_branch): New helper function.
17392 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
17394 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
17395 classes as parameters and return values of delegates. Fixes #29256.
17397 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
17399 * locales.c: use gint32 in non HAVE_ICU case
17401 2003-10-11 Martin Baulig <martin@ximian.com>
17403 * mono-debug.c (mono_debug_add_method): Added a workaround for
17406 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
17408 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
17409 delegates passed to native code must use the STDCALL calling
17410 convention. Fixes #35987.
17412 2003-10-10 Martin Baulig <martin@ximian.com>
17414 * class.c (inflate_generic_type): If we're inflating for a generic
17415 type instance (and not for a generic method), return
17416 MONO_TYPE_MVAR unchanged.
17418 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17420 * string-icalls.c: Join ignores null strings in the source array.
17421 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
17422 * threads.c: GetAvailableTheads is slightly more accurate.
17424 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
17426 * threads.h threads.c : add mono_threads_set_default_stacksize
17427 and pass default to CreateThread calls.
17429 2003-10-09 Dick Porter <dick@ximian.com>
17433 * locales.c: Internal calls for constructing CultureInfo and
17434 related objects from libicu (if its available.)
17436 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
17438 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
17440 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17442 * threadpool.c: added an argument to async_invoke_thread that is the
17443 item to process, pass the MonoAsyncResult to the thread start function
17444 when creating a new thread. This way we don't need to acquire any lock
17445 when we're creating a new thread. Readded a semaphore for faster
17446 response times (instead of that Sleep i added).
17448 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
17450 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17451 get daylight change dates better on Windows, fix handling
17452 of platforms without tm_gmtoff.
17454 2003-10-06 Martin Baulig <martin@ximian.com>
17456 * class.c (inflate_generic_method): Renamed to
17457 mono_class_inflate_generic_method() and made public.
17458 (mono_class_init): Don't inflate the generic methods here.
17459 (mono_class_from_generic): Added `gboolean inflate_methods'
17460 argument. Inflate the methods here.
17462 * loader.c (mono_method_get_param_names): Ignore instances of
17463 generic types for the moment.
17465 * reflection.c (fixup_method): Added support for inflated methods.
17466 (mono_image_create_token): Use mono_image_get_methodref_token()
17467 for inflated methods.
17468 (mono_custom_attrs_from_param): Ignore instances of generic types
17470 (mono_reflection_bind_generic_parameters): New public function.
17471 Moved all the functionality from
17472 ves_icall_Type_BindGenericParameters() here and added support for
17474 (mono_reflection_define_generic_parameter): Initialize
17475 `klass->methods' here.
17477 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
17478 functionality into mono_reflection_define_generic_parameter().
17479 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
17480 TypeBuilder, return that TypeBuilder.
17482 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17484 * appdomain.c: removed mono_delegate_semaphore.
17487 (mono_thread_pool_add): moved hash table creation inside and the thread
17488 creation outside of the critical region.
17489 (mono_thread_pool_finish): removed obsolete code.
17490 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
17491 continue or exit the thread depending on the queue.
17493 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
17495 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
17496 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
17497 handle more bool marshalling options
17499 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
17501 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
17502 arrays of structs. Also add a more descriptive error message when
17503 a structure member is marshalled as LPArray.
17505 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
17507 * marshal.c (mono_marshal_get_native_wrapper): Add support for
17508 marshalling arrays of complex types. Fixes #29098. Also remove an
17509 usused and incomplete function.
17511 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
17513 * gc.c: report heap_size - free_bytes as total memory allocated
17516 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
17518 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
17519 fix timezone handling problems on Windows.
17521 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
17522 asserts when the year is outside the range handled by ms the functions.
17524 * class.c (setup_interface_offsets): If the class is an interface,
17525 fill out its interface_offsets slot.
17527 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17529 * threadpool.c: mark threadpool threads as background.
17531 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
17533 * decimal.c - define DECINLINE to nothing if not using GCC
17535 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
17537 * assembly.c: More refcount fixes.
17539 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17541 * string-icalls.c: if we're not trimming, return the same string.
17542 When not splitting, don't create a new string.
17544 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17547 (mono_image_open): increment the ref_count inside the critical section.
17549 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
17551 * image.c (mono_image_open): Fix reference counting bug.
17553 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
17555 * marshal.c (mono_marshal_type_size) struct alignment changed for
17556 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
17557 64bits. Avoid leak in mono_marshal_get_native_wrapper when
17558 mono_lookup_pinvoke_call throws.
17560 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
17562 * reflection.c (mono_reflection_parse_type): Fix #49114.
17564 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
17565 temporary workaround for cygwin header problem.
17567 * object.c (mono_object_isinst): Synchronize this with the code
17568 generated by the JIT for casts.
17570 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
17572 * reflection.c (encode_type): Fix #38332.
17574 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
17576 * marshal.c (mono_marshal_method_from_wrapper): New function to return
17577 the original method from the wrapper method.
17579 2003-09-25 Martin Baulig <martin@ximian.com>
17581 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
17582 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
17583 (ves_icall_Type_get_IsGenericInstance): New interncall.
17585 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
17587 * object.c: fix cast warning in big endian code.
17589 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
17591 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
17593 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17595 * assembly.c: don't call check_env from mono_assembly_load. It's
17596 already done once in mono_assemblies_init and may cause headaches when
17597 multiple threads are loading assemblies.
17599 2003-09-19 Martin Baulig <martin@ximian.com>
17601 * reflection.c (mono_reflection_define_generic_parameter): Don't
17602 allocate `klass->methods', set `klass->flags' to
17603 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
17605 2003-09-18 Martin Baulig <martin@ximian.com>
17607 * class.c (mono_class_init): Don't create `class->methods' if it's
17608 already initialized.
17610 * metadata.c (mono_metadata_load_generic_params): Make this
17613 * reflection.c (mono_reflection_define_generic_parameter): Set
17614 parent class and interfaces from the constraints.
17616 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
17617 to keep this struct in sync with the declaration in TypeBuilder.cs.
17619 2003-09-17 Martin Baulig <martin@ximian.com>
17621 * metadata.h (MonoType): Replaced the data's `int type_param'
17622 field with `MonoGenericParam *generic_param'.
17623 (MonoGenericParam): Added `MonoClass *klass'.
17625 * class.c (mono_class_from_gen_param): Removed the
17626 `MonoImage *image' and `int type_num' arguments.
17628 * metadata.c (mono_metadata_parse_generic_param): New static
17629 method; creates a MonoGenericParam which just contains the index.
17630 (do_mono_metadata_parse_type): Call
17631 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
17634 * reflection.c (mono_image_typedef_or_ref): Generic type
17635 parameters may be in the same assembly, but never use a typedef
17637 (mono_reflection_define_generic_parameter): We're now creating a
17638 "real" class for the type parameter; it's now safe to call
17639 mono_class_from_mono_type() on the class'es type, it'll do the
17642 2003-09-16 Martin Baulig <martin@ximian.com>
17644 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
17645 `symfile->range_entry_size' and `symfile->class_entry_size' here;
17646 the `symfile' data structure must be fully initialized before it
17647 gets added to the table.
17649 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
17651 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
17653 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
17654 class init trampolines.
17656 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
17658 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
17659 to the built-in profiler to turn off time and allocation profiling
17662 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
17664 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
17667 * debug-helpers.c (mono_method_full_name): Print the wrapper type
17668 in human readable form.
17670 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
17672 * reflection.c icall.c: Fixed warnings.
17674 * image.c (load_class_names): Use a temporary hash table to hold the
17675 namespaces in order to avoid doing many string comparisons.
17677 * image.h: Fix typo.
17679 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
17680 Pass NULL instead of g_direct_equal to the GHashTable constructor
17681 since the NULL case is short-circuited inside g_hash_table_lookup,
17682 leading to better performance.
17684 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
17685 obtain the first custom attribute for a given index. Depends on the
17686 CustomAttribute table being sorted by the parent field.
17688 * reflection.c (mono_custom_attrs_from_index): Use the new function
17689 for better performance.
17691 2003-09-07 Martin Baulig <martin@ximian.com>
17693 * class.c (mono_class_init): If we're a generic instance, inflate
17694 all our methods instead of loading them from the image.
17695 (mono_class_from_generic): Set `class->methods = gklass->methods'.
17697 2003-09-07 Martin Baulig <martin@ximian.com>
17699 * mono-debug-debugger.c: Added support for constructors.
17701 2003-09-06 Martin Baulig <martin@ximian.com>
17703 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
17706 * reflection.c (mono_reflection_setup_generic_class): Call
17707 ensure_runtime_vtable() to create the vtable.
17709 2003-09-05 Martin Baulig <martin@ximian.com>
17711 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
17714 2003-09-04 Martin Baulig <martin@ximian.com>
17716 * reflection.c (mono_reflection_define_generic_parameter): Generic
17717 parameters start with zero.
17719 2003-09-04 Martin Baulig <martin@ximian.com>
17721 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
17723 * reflection.h (MonoReflectionGenericParam): New typedef.
17724 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
17725 the generic parameters from the managed TypeBuilder.
17727 * reflection.c (mono_reflection_define_generic_parameter): New function.
17728 (mono_reflection_create_runtime_class): Encode generic parameters.
17729 (mono_reflection_setup_generic_class): New function; this is
17730 called after adding adding all generic params to the TypeBuilder.
17731 (encode_type): Added MONO_TYPE_VAR.
17733 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17735 * class.h class.c (mono_class_needs_cctor_run): Moved this method
17738 * assembly.h assembly.c: Moved the AOT loading code into an assembly
17741 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
17743 * reflection.h reflection.c class.h class.c: Delete duplicate
17744 definition of mono_type_get_name () from reflection.c and export the
17747 * class.c: Class loading fixes from Bernie Solomon
17748 (bernard@ugsolutions.com).
17750 * reflection.c: Endianness fixes from Bernie Solomon
17751 (bernard@ugsolutions.com).
17753 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
17755 * assembly.h assembly.c: Define a file format version for AOT
17758 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
17760 * appdomain.h (MonoJitInfo): New field to determine whenever the
17761 code is domain neutral.
17763 2003-08-31 Miguel de Icaza <miguel@ximian.com>
17765 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
17767 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
17769 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
17770 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
17771 Avoid caching the result since strings must be domain specific. Fixes
17774 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
17776 * marshal.c (mono_marshal_init): Make this callable multiple times
17777 since it is hard to find a correct place to call it.
17779 * object.c (mono_runtime_class_init): Execute static constructors in
17780 the correct appdomain.
17782 * image.c (build_guid_table): Handle the case when multiple images have
17785 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17787 * icall.c: added a couple of icalls for System.Web.
17789 2003-08-28 Martin Baulig <martin@ximian.com>
17791 * icall.c (ves_icall_Type_BindGenericParameters): Use
17792 `klass->generic_inst' instead of `&klass->byval_arg' in the
17793 mono_type_get_object() call. The returned type must be
17794 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
17796 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
17800 * object.c (mono_class_proxy_vtable): Make it thread safe.
17802 * pedump.c: Fix warning.
17804 * object.c appdomain.h: Get rid of metadata_section.
17805 It is no longer needed and it was causing deadlocks with domain->lock.
17807 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
17809 2003-08-26 Martin Baulig <martin@ximian.com>
17811 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
17813 2003-08-26 Martin Baulig <martin@ximian.com>
17815 * pedump.c (main): Call mono_metadata_init(),
17816 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
17817 and mono_loader_init().
17819 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
17821 * loader.h: Add missing include to fix build.
17823 * image.h: mono_image_load_references is no more.
17825 * assembly.c: Reworked assembly loading to make it really thread safe.
17826 After these changes, the assembly returned by mono_assembly_open is
17827 fully initialized, i.e. all its references assemblies are loaded.
17829 * assembly.c (mono_image_load_references): Renamed to
17830 mono_assembly_load_references, and made private, since clients no
17831 longer need to call it.
17833 * class.c: Removed calls to mono_assembly_load_references, since it was
17834 a source of deadlocks.
17836 * loader.h loader.c class.h class.c: Protect data structures using a
17837 new lock, the loader lock.
17839 * class.c (mono_class_setup_vtable): Create temporary hash tables and
17840 GPtrArrays only when needed.
17842 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
17843 into empty structures by mcs. Fixes pinvoke7.cs.
17845 * domain.c (mono_init): Call a new initialization function.
17847 * appdomain.c (mono_runtime_init): Call the new initializer function
17848 of the marshal module.
17850 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
17851 inserted into empty structures by mcs. Fixes pinvoke7.cs.
17853 * marshal.h marshal.c: Added locks around the wrapper caches to make
17854 this module thread safe.
17856 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
17857 this argument. Fixes pinvoke1.exe.
17859 2003-08-25 Lluis Sanchez <lluis@ximian.com>
17861 * object.h: Added call_type field to MonoMethodMessage and the corresponding
17862 enumeration of values. Removed fields to store remote call output values in
17863 MonoAsyncResult. Not needed any more.
17864 * object.c: Initialize call_type and async_result fields in mono_message_init.
17865 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
17866 dispatching the message.
17867 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
17868 async call to finish. To do it use a message with EndInvoke call type.
17870 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
17872 * loader.h loader.c (mono_method_hash_marhal_info): New function which
17873 determines whenever a method has marshalling info.
17875 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17877 * assembly.c: fix the build on windows.
17879 2003-08-22 Lluis Sanchez <lluis@ximian.com>
17881 * object.cs: Fixed bug #47785.
17883 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
17885 * string-icalls.c (StringReplace): If their are no occurances of
17886 the old string found return a reference to the supplied
17887 string. This saves some memory and matches MS behavoir.
17889 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17891 * socket-io.c: fixed compilation for systems that define AF_INET6
17892 and don't define SOL_IP/SOL_IPV6.
17894 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
17896 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
17897 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
17899 * rawbuffer.c rawbuffer.h: Make this module thread safe.
17901 * domain.c: Make this module thread safe.
17903 * domain.c (mono_init): Call new initialization function.
17905 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
17906 reference types too. Fixes #38812.
17908 * image.c (mono_image_init): Fixed warnings.
17910 * class.c (mono_class_from_typeref): Handle assembly load failure
17913 * appdomain.c (add_assemblies_to_domain): Handle the case when
17914 the references of an assembly are not yet loaded.
17916 * metadata.c image.c assembly.c: Moved initialization of global
17917 variables to a separate function called at startup since lazy
17918 initialization of these variables is not thread safe.
17920 * image.c assembly.c: Made this module thread safe by adding locks in
17921 the appropriate places.
17923 * domain.c (mono_init): Call the new initialization functions of the
17926 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
17928 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
17929 make a direct call. It is proxy's work to make the call asynchronous.
17930 mono_delegate_end_invoke(): If the targe is a proxy, just collect
17932 * object.cs: mono_method_call_message_new(): read AsyncResult and
17933 state object from parameters list, if this info is requested.
17934 * object.h: Added fields to store remote call output values in
17935 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
17937 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
17939 * object.h: add needed fields to MonoThread.
17940 * threads.c, threads.h: allow registering a function to cleanup data
17941 allocated per thread by the JIT.
17943 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17945 * loader.h: portability fix by Bernie Solomon
17946 * <bernard@ugsolutions.com>.
17948 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
17950 * reflection.h reflection.c (mono_param_get_objects): Changed this to
17951 return a MonoArray. This simplifies the code and also ensures that
17952 the cache allways contains an object reference as a value.
17954 * icall.c (ves_icall_get_parameter_info): Simplified using the new
17957 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17959 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
17960 fixes a problem with byte ordering when getting the address family for
17963 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
17965 * .cvsignore: Added monosn.
17967 * reflection.h reflection.c loader.c: Added support for parameter
17968 marshalling to dynamically created types. Fixes #47295.
17970 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17972 * rand.c: remove useless warnings.
17974 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17976 * class.c: implemented ldtoken for methods and fieldrefs.
17978 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17980 * threadpool.c: when mono_async_invoke was called, no one took care of
17981 monitoring the queue. So if the method invoked took some time and we
17982 got new async invoke requests after 500 ms (the thread created waited
17983 that long in WaitForSingleObject), the new async invoke was not called
17984 until the previous one finished.
17986 This is fixed now. Thanks to Totte for helping with it.
17988 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17990 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
17992 2003-08-11 Martin Baulig <martin@ximian.com>
17994 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
17996 2003-08-06 Martin Baulig <martin@ximian.com>
17998 * mono-debug-debugger.c: Added support for static fields,
17999 properties and methods.
18001 2003-08-06 Martin Baulig <martin@ximian.com>
18003 * mono-debug-debugger.c: Don't store the MonoString's vtable to
18004 make this work for applications with multiple application domains.
18006 2003-08-04 Martin Baulig <martin@ximian.com>
18008 * mono-debug-debugger.c: Completely reworked the type support; the
18009 most important thing is that we're now just using one single
18010 `MonoType' instance per type.
18012 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
18014 * mono-endian.h, mono-endian.c, icall.c: Added icall
18015 ves_icall_System_Double_AssertEndianity to assert double word endianity
18016 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
18018 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18020 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
18021 support, icalls and fixes.
18023 2003-07-31 Miguel de Icaza <miguel@ximian.com>
18025 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
18026 classes that are a punctuation character in .NET is not the same a
18029 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18031 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
18033 2003-07-29 Miguel de Icaza <miguel@ximian.com>
18035 * icall.c: Add new MemCopy internalcall.
18036 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
18037 Simplified code; It is not necessary to handle all the cases here,
18038 as the C# code takes care of it. Only handle the case of the name
18039 resource embedded into the assembly.
18041 Changed signature to return the data pointer and the size of the
18044 2003-07-26 Miguel de Icaza <miguel@ximian.com>
18046 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
18047 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
18049 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
18051 * socket-io.c: ignore EINTR error in select.
18053 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18055 * class.h, class.c: removed unused subclasses field in MonoClass.
18057 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
18059 * icall.c: improve fix of get_base_definition(). If the parent class
18060 doesn't have the mehod, look at the parent of the parent.
18061 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
18062 to check if a parameter is an in or out parameter
18063 (PARAM_ATTRIBUTE_IN is not set by default).
18064 mono_method_return_message_restore(): Use mono_class_value_size to
18065 get the size of a value type. mono_type_stack_size (parameterType)
18066 does not return the correct value if parameterType is byRef.
18067 mono_load_remote_field(), mono_load_remote_field_new(),
18068 mono_store_remote_field(), mono_store_remote_field_new():
18069 raise exception if the remote call returns an exception.
18071 2003-07-28 Martin Baulig <martin@ximian.com>
18073 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
18074 method. This is a wrapper around mono_runtime_invoke() which
18075 boxes the instance object if neccessary.
18077 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18079 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
18080 metadata.h, row-indexes.h, verify.c: first cut of generics support.
18082 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18084 * icall.c: disable mcs bug workaround.
18086 2003-07-21 Miguel de Icaza <miguel@ximian.com>
18088 * object.c (mono_runtime_class_init): Take the metadata_section
18089 mutex before obtaining the domain mutex.
18091 * appdomain.h: Added definition of metadata_section mutex here.
18093 * object.c: define metadata_mutex here.
18095 2003-07-24 Ravi Pratap <ravi@ximian.com>
18097 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
18100 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
18102 * reflection.c: Fix bug #46669
18104 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18109 * object.h: fill in the type name for TypeLoadException.
18111 2003-07-23 Ravi Pratap <ravi@ximian.com>
18113 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
18114 relationship between TypeBuilders while compiling corlib) and bug
18115 45993 (Array types returned from the runtime while compiling
18116 corlib were from the loaded corlib).
18118 2003-07-22 Martin Baulig <martin@ximian.com>
18120 * mono-debug-debugger.c: Reworked the type support a bit more;
18121 distinguish between types and classes.
18123 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
18125 * icall.c: add IsArrayImpl icall.
18127 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
18129 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
18130 initializing real_size only once. Also fix bug #46602.
18132 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
18134 * object.c: Renamed mono_metadata_section to metadata_section.
18136 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
18138 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
18139 empty array if the type is an array. Fixed.
18140 ves_icall_MonoMethod_get_base_definition: if the base method
18141 is abstract, get the MethodInfo from the list of methods of
18143 * reflection.c: ParameterInfo.PositionImpl should be zero-based
18144 and it was 1-based. Fixed in mono_param_get_objects.
18146 2003-07-20 Martin Baulig <martin@ximian.com>
18148 * mono-debug.h: Set version number to 31.
18149 (mono_debug_init): Added `MonoDomain *' argument.
18151 * mono-debug-debugger.c: Reworked the type support; explicitly
18152 tell the debugger about builtin types; pass the `klass' address to
18155 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
18157 * image.c: Allow new metadata tables to be loaded without a
18158 warning. Also update the warning message to give the new constant value.
18160 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18162 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
18163 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
18164 array type representation changes.
18166 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18168 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
18169 on Environment.Exit () call.
18171 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18173 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
18174 requires a matching corlib.
18176 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
18178 * Changelog: My editor decided to add a CR to each line. Sorry about that.
18179 Committed again without the CRs.
18181 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
18183 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
18184 getting it from the "this" socket instance. Did not work
18185 if the socket is a subclass of Socket.
18186 Also fixed bug #35371.
18188 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18190 * metadata.c: fixed size for TypedByRef.
18191 * loader.c: when searching for a method, consider the vararg amrker.
18192 * unicode.c, decimal.c: constify some arrays.
18194 2003-07-15 Dick Porter <dick@ximian.com>
18196 * socket-io.c: Fixed compilation for gcc < 3.2.
18198 Fixed compilation for machines that don't have AF_INET6 (thanks to
18199 Bernie Solomon <bernard@ugsolutions.com> for that part.)
18201 Fixed compile warnings.
18203 Fixed formatting and line endings.
18205 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
18208 * socket-io.c: Added IPv6 support.
18210 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
18212 * class.c (mono_class_is_assignable_from): New function to implement
18213 the is_assignable_from logic. Used by mono_object_isinst,
18214 Type::IsAssignableFrom () and the interpreter.
18216 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
18217 Object, even interfaces.
18219 * object.c (mono_object_isinst): Implement in terms of
18220 is_assignable_from.
18222 * icall.c (ves_icall_type_is_assignable_from): New icall.
18224 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
18226 * domain.c (foreach_domain): fix compiler warning.
18228 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
18230 * image.c (load_metadata_ptrs): use g_strndup because strndup is
18231 not available on all plattforms
18233 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
18235 * image.h image.c: Store the metadata version string in MonoImage.
18236 * icall.c: New icall to retrieve the image version.
18237 * reflection.c (create_dynamic_image): Fill in the image version field
18238 * reflection.c (build_compressed_metadata): Use the image version
18239 from the image structure.
18241 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18243 * appdomain.c: modified comment.
18244 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
18245 That will be its last iteration when mono_gc_cleanup is called from
18246 mono_runtime_cleanup and before the domain is unloaded.
18250 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
18252 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
18255 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18257 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
18258 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
18259 Bernie Solomon <bernard@ugsolutions.com>.
18261 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18263 * object.c, object.h: provide mono_object_new_fast() for faster
18264 allocation in some special cases.
18266 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18268 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
18269 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
18271 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18273 * threadpool.c: fix leaks.
18275 2003-07-01 Dick Porter <dick@ximian.com>
18277 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
18278 using MonoGHashTables. Fixes threadpool bug posted to list.
18280 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
18282 * image.h, image.c: added support to load an assembly from a byte array.
18283 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
18284 assembly bundle support.
18286 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
18288 * threadpool.c (mono_thread_pool_add): keep a reference to the
18289 AsyncResult to prevent GC
18291 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18293 * class.c: leak fix.
18295 2003-06-25 Dick Porter <dick@ximian.com>
18297 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
18298 for the async object, the WaitHandle object will close the handle.
18301 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18303 * class.c: in mono_array_class_get (), lookup from the hash with the
18304 same type we insert: this works around a bug in
18305 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
18306 lluis. The real fix will have to wait for after the release.
18308 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18310 * icall.c: fix memory leak when getting type members.
18312 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18314 * reflection.c: added more pubtoken special cases.
18316 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18318 * class.c: handle field offset correctly when class size
18319 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
18321 2003-06-20 Martin Baulig <martin@ximian.com>
18323 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
18326 2003-06-20 Martin Baulig <martin@ximian.com>
18328 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
18330 2003-06-20 Martin Baulig <martin@ximian.com>
18332 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
18333 just distinguish between variables in registers and variables at
18334 an offset relative to a register.
18336 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18338 * icall.c: #ifdef out latest changes until mcs is fixed.
18340 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18342 * icall.c: return members in metadata order.
18344 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18346 * icall.c: avoid infinite loop in GetTimeZoneData.
18348 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18350 * icall.c: added Marshal.Prelink/All icalls.
18352 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
18354 * object.c, object.h: fix warnings and do some overflow checking
18355 when creating arrays.
18357 2003-06-17 Dick Porter <dick@ximian.com>
18360 * file-io.c: File attributes need to be tweaked slightly when
18361 passed from the managed to the w32 world.
18363 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18364 * profiler.h profiler-private.h profiler.c: Rework last patch
18365 based on suggestion by Paolo.
18367 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18369 * profiler.h profiler-private.h profiler.c: Added infrastructure for
18370 instruction level coverage data collection.
18371 * profiler.h profiler.c (: Added new callback function which can be
18372 used by the profiler to limit which functions should have coverage
18374 * profiler.c (mono_profiler_load): Call g_module_build_path to
18375 generate the file name of the profiler library.
18377 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18379 * profiler.c, profiler.h, profiler-private.h: added basic block
18380 coverage profiling API.
18382 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
18384 * reflection.c (mono_reflection_create_runtime_class): Add support
18385 for events in dynamically generated code.
18387 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
18390 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18392 * icall.c: when getting timezone info, return reasonable values if we
18393 can't get the actual data.
18395 2003-06-14 Dick Porter <dick@ximian.com>
18397 * threads.c (start_wrapper): Remove the reference to the thread
18398 object in the TLS data, so the thread object can be finalized.
18399 This won't be reached if the thread threw an uncaught exception,
18400 so those thread handles will stay referenced :-( (This is due to
18401 missing support for scanning thread-specific data in the Boehm GC
18402 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
18404 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
18406 * reflection.c: ensure streams and tables are first allocated with
18407 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
18409 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18411 * icall.c: fixed GetElementType for byrefs (bug# 44792).
18413 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
18415 * reflection.c (mono_reflection_create_runtime_class): Add support for
18416 properties to dynamically created classes.
18417 * reflection.c: Fix a few places where non-MonoObjects were inserted
18418 into the tokens hashtable.
18420 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18422 * object.c: some support to handle out of memory exceptions.
18424 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
18426 * marshal.c (mono_marshal_get_native_wrapper): support reference
18429 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18431 * object.h, object.c: more portability stuff from Bernie Solomon.
18432 Unexport mono_object_allocate(). Added mono_object_unbox ().
18433 Set exitcode when an unhandled exception is thrown.
18435 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
18437 * marshal.c (mono_marshal_get_native_wrapper): use custom
18438 marshaler for return types.
18440 2003-06-10 Dick Porter <dick@ximian.com>
18442 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
18443 ip_mreq is available
18445 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18447 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
18448 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
18449 by Bernie Solomon <bernard@ugsolutions.com>.
18451 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
18453 * gc.c (mono_gc_init): Avoid error message on shutdown when
18454 GC_DONT_GC=1 is used.
18456 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
18457 New icall to return the GUID of a module.
18459 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18461 * class.c: ensure instance size always includes the parent's size
18462 even whem class size is set explicitly (fixes bug#44294).
18464 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18466 * profiler.h, profiler.c: made the simple profiler thread-safe,
18467 get more accurate timing info. Allow the loading of an
18468 externally-developed profiler module.
18470 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
18472 * marshal.c (mono_marshal_get_native_wrapper): improved
18473 class/byref arguments.
18474 (mono_marshal_get_native_wrapper): better string marshaling support.
18476 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18478 * class.c: ensure .pack and .size are handled correctly and
18479 simplified layout of static fields.
18481 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18484 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
18486 * loader.c (mono_lookup_pinvoke_call): look for modules in the
18487 current directory (fix bug 44008)
18489 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
18491 * marshal.c (mono_marshal_get_native_wrapper): started support for
18493 (mono_delegate_to_ftnptr): consider marshalling specifications
18495 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18497 * reflection.c, reflection.h: emit custom marshal info.
18499 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18501 * object.c: free the GError.
18502 * icall.c: added CloseEvent_internal.
18504 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
18507 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
18509 * loader.c (mono_method_get_signature): Add support for dynamic
18512 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18514 * reflection.c: fixed bug #43905.
18516 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18518 * class.c, domain.c, icall.c, metadata.h, object.h: support for
18519 handling TypedReference and ArgIterator.
18520 * loader.c, loader.h: added function to get signature at call site.
18522 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18524 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
18525 data readonly. Buglets and warning fixes. Some MethodSpec support.
18527 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18529 * class.h, class.c, object.c: remove relative numbering support.
18531 2003-05-26 Miguel de Icaza <miguel@ximian.com>
18533 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
18534 free the string, until we get a chance to fix Gtk#
18536 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18538 * marshal.c: revert last patch.
18540 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18542 * icall.c: updates for new mono_class_vtable() not calling
18543 the type constructor anymore.
18545 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18547 * object.h, object.c: separate vtable creation from type
18548 initialization. Make running the .cctor thread safe.
18550 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
18552 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
18554 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
18556 * loader.c (mono_get_method): consider calling convention
18558 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
18560 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
18561 to return the invisible global type for a module.
18563 * reflection.c (mono_image_build_metadata): Emit global fields too.
18565 2003-05-20 Peter Williams <peterw@ximian.com>
18567 * loader.c (mono_lookup_internal_call): Add a few newlines.
18569 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
18571 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
18574 * appdomain.c (set_domain_search_path): Recalculate search path when
18575 AppDomainSetup.PrivateBinPath changes.
18577 * object.c (mono_class_compute_gc_descriptor): It turns out some
18578 parts of the class libs (like System.Thread) holds pointers to
18579 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
18580 to treat native int a pointer type here.
18582 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
18584 * appdomain.h, domain.c: add hashtable for jump target resolution.
18586 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
18588 * reflection.h reflection.c icall.c: Added new icalls
18589 GetManifestResourceInfoInternal, GetModulesInternal and support
18592 2003-05-16 Dick Porter <dick@ximian.com>
18596 * file-io.c: Implement System.IO.MonoIO::GetTempPath
18598 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
18600 * object.c: mono_store_remote_field: little fix to previous patch.
18602 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18604 * class.c: add constructors to array classes.
18605 * icall.c: special case array construction for InternalInvoke (),
18607 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
18609 * class.h class.c reflection.c object.c: Added support for field
18610 defaults in dynamically generated classes.
18612 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18614 * reflection.c: properly encode charset for ddlimport.
18616 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18618 * threads.c: allow compiling without GC.
18620 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18622 * appdomain.h, object.c, object.h, threads.c, threads.h: added
18623 handling of thread static data.
18625 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18627 * reflection.h, reflection.c: added mono_custom_attrs_free ().
18629 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
18631 * class.c (mono_array_class_get): always set the serializable flags
18632 (mono_array_class_get): always set the SEALED attribute for array types
18634 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
18636 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
18637 attributes (fix for bug 42021).
18639 2003-05-12 Dick Porter <dick@ximian.com>
18641 * gc.c: Don't run finalizers when the finalizer thread is
18642 finishing up, because the default domain has already been
18645 2003-05-11 Miguel de Icaza <miguel@ximian.com>
18647 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
18648 value is null, we should throw an exception. This is slightly
18649 different than the other conventions used for the constructor.
18651 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18653 * socket-io.c: fixed windows build.
18655 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18657 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
18659 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
18661 * object.c (mono_string_new_wrapper): Compatibility fix for MS
18664 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
18666 * class.c (mono_class_layout_fields): Add experimental GC aware
18667 auto layout facility. Requires class library changes to work correctly.
18669 (mono_class_setup_vtable): Avoid overriding explicit interface
18670 method implementations. Fixes iface3.exe test.
18672 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
18674 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
18675 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
18677 * metadata.h: Add new type classification macro which determines
18678 whenever the type holds an object reference.
18680 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
18682 * marshal.c (mono_marshal_get_native_wrapper): cleanups
18684 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
18686 * gc.c (finalizer_thread): Work around a GC bug.
18688 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
18690 * marshal.c (emit_struct_conv): allow unions
18692 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
18694 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
18696 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
18698 2003-05-06 Martin Baulig <martin@ximian.com>
18700 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
18702 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18705 (Select_internal): allow NULLs, don't create arrays if not needed.
18706 Coupled with Socket.cs changes.
18709 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
18710 register a finalizer for it that will close the semaphore handle. This
18711 fixes the leak and make Lupus' test run with > 4080 loops.
18713 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
18715 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
18716 Jerome Laban (bug #42287)
18718 2003-05-02 Martin Baulig <martin@ximian.com>
18720 * debug-mono-symfile.h
18721 (MonoSymbolFile): Moved declaration into mono-debug.h.
18722 (MonoDebugMethodJitInfo): Likewise.
18723 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
18725 (_mono_debug_address_from_il_offset): Take a
18726 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
18729 (MonoDebugDomainData): New struct.
18730 (mono_debug_get_domain_data): New function.
18731 (mono_debug_add_method): Take an additional `MonoDomain *'
18733 (mono_debug_source_location_from_address): Likewise.
18734 (mono_debug_il_offset_from_address): Likewise.
18735 (mono_debug_address_from_il_offset): Likewise.
18737 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
18739 * reflection.c: one more check for null type in custom attrs.
18741 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18743 * reflection.c: avoid warning (comparison is always false due to limited
18744 range of data type).
18746 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18748 * icall.c: throw an exception in Type.GetField if the argument 'name'
18751 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
18753 * reflection.c: fixed handling of enums in named arguments to custom
18754 attributes (bug #42123).
18756 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18758 * reflection.c: use the right array element type and handle
18759 a null for a Type argument, too.
18761 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
18763 * reflection.c: handle arrays as arguments to custom attributes.
18765 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
18767 * reflection.c: handle a string value in a custom attr
18768 ctor that takes an object.
18770 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
18772 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
18775 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
18777 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
18779 2003-04-27 Martin Baulig <martin@ximian.com>
18781 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
18782 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
18783 MONO_DEBUGGER_EVENT_BREAKPOINT.
18784 (mono_breakpoint_trampoline_code): Removed.
18785 (mono_debugger_event_handler): The last argument is now a
18787 (mono_debugger_insert_breakpoint_full): Removed the
18788 `use_trampoline' argument.
18789 (mono_debugger_method_has_breakpoint): Likewise.
18790 (mono_debugger_trampoline_breakpoint_callback): Renamed to
18791 mono_debugger_breakpoint_callback(); take the method and
18792 breakpoint number as arguments.
18794 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18796 * metadata.c: fix off by one when loading parameters attributes.
18798 2003-04-24 Martin Baulig <martin@ximian.com>
18800 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
18802 2003-04-24 Martin Baulig <martin@ximian.com>
18804 * mono-debug-debugger.c: Moved all code which interacts with the
18805 Mono Debugger here.
18807 * debug-mono-symfile.c: This code now just deals with the symbol
18808 file itself, the debugger code is now in mono-debug-debugger.c.
18810 2003-04-23 Martin Baulig <martin@ximian.com>
18812 * mono-debug.c (mono_debug_source_location_from_il_offset):
18813 New method; like mono_debug_source_location_from_address(), but
18814 takes an IL offset instead of a machine address.
18816 2003-04-23 Martin Baulig <martin@ximian.com>
18818 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
18819 `line' field; this is now computed by the debugger.
18821 2003-04-23 Martin Baulig <martin@ximian.com>
18823 * mono-debug.[ch]: New files. This is the new debugging interface.
18825 * mono-debug-debugger.[ch]: New files. Moved all code which
18826 interacts with the Mono Debugger here.
18828 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
18830 * domain.c (mono_init): initialize mono_defaults.monitor_class
18832 2003-04-21 Miguel de Icaza <miguel@ximian.com>
18834 * reflection.c (method_encode_code): Add a spicy exception to help
18835 future compiler authors.
18837 2003-04-21 Martin Baulig <martin@ximian.com>
18840 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
18841 Make this work with relative pathnames; g_filename_to_uri() needs
18842 an absolute filename.
18844 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
18846 * icall.c: Track name changes in Object and ValueType.
18848 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
18850 * metadata.c (mono_type_stack_size): size should be a multiple of
18853 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18856 (internal_domain_finalize): moved into mono_domain_finalize. No need
18857 to create another thread because the finalizers will be run in the
18860 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
18861 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
18862 to be run (MS does this too).
18864 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
18866 * object.c (mono_class_compute_gc_descriptor): Update comment.
18868 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
18870 * image.h: Add synchronized wrapper cache.
18872 * image.c (do_mono_image_open): Initialize cache.
18874 * reflection.c (create_dynamic_mono_image): Initialize cache.
18876 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18878 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
18879 ves_icall_System_Buffer_ByteLengthInternal.
18881 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18883 * reflection.c: setup klass->nested_in earlier. Allow
18884 a dash in the assembly name.
18886 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
18888 * metadata.c (mono_type_to_unmanaged): dont access
18889 type->data.klass for MONO_TYPE_OBJECT
18890 (mono_type_to_unmanaged): consider System.Delegate class
18892 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
18894 * class.c: just setup supertypes in the proper place instead of
18895 initializing the full element class for arrays.
18897 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18899 * class.c: ensure the element class of arrays is initialized.
18900 Setup the supertype info for array classes, too.
18902 2003-04-14 Miguel de Icaza <miguel@ximian.com>
18904 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
18906 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18908 * Makefile.am: re-added -m option when running cygpath. This way,
18909 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
18911 * mono-config.c: same codepath for locating mono config file for WIN32
18913 * assembly.c: if mono_assembly_setrootdir is called, don't override
18916 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18918 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
18919 MONO_ASSEMBLIES variable.
18921 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18923 * icall.c: added Assembly::GetNamespaces() icall.
18925 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18927 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
18929 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
18931 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
18932 * object.c: fixed bug in the construction of vtable for proxies
18934 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
18936 * object.c (mono_array_new): Mark mono_array_new as an icall.
18938 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18940 * class.c: fixed test for public method when overriding interfaces.
18943 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18945 * appdomain.h, domain.c: added mono_domain_foreach() to
18946 be able to access the currently loaded appdomains.
18947 * object.c: make string interning work across sppdomains.
18948 Mark some functions for use as icalls.
18950 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
18952 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
18954 * reflection.h reflection.c: Allocate long living data using
18955 GC_MALLOC_ATOMIC so the collector does not need to scan it.
18957 * reflection.c: Double the allocation size in streams instead of
18958 increasing it, to prevent unneccesary copying on large assemblies.
18960 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
18961 creation if the assembly does not have the Run flag set.
18963 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18965 * class.h: avoid the C++ keywords in header files (Jerome Laban
18966 spotted and fixed this).
18968 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18971 (mono_unhandled_exception): fill in the arguments for the
18972 UnhandledException event. Only trigger that event for the default
18973 domain (as MS does).
18975 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
18977 * object.c: Improve typed allocation stuff based on suggestions from
18978 Paolo. Also turn it on if the GC library supports it.
18980 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
18982 * object.c object.h class.h: Added experimental typed allocation
18983 facility using the interfaces in gc_gcj.h.
18985 * os/gc_wrapper.h: Added new include files.
18987 2003-04-03 Martin Baulig <martin@ximian.com>
18989 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
18990 which is not yet enabled by default.
18992 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
18994 (mono_gc_lock, mono_gc_unlock): New static functions.
18996 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
18997 functions; stop/start the world for the garbage collector. This
18998 is using the windows API; we need to complete the SuspendThread()/
18999 ResumeThread() implementation in the io-layer to make this work on Unix.
19000 (mono_gc_push_all_stacks): New public function; tells the garbage
19001 collector about the stack pointers from all managed threads.
19003 2003-04-03 Martin Baulig <martin@ximian.com>
19005 * object.h (MonoThread): Added `gpointer stack_ptr'.
19007 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
19009 2003-04-03 Martin Baulig <martin@ximian.com>
19011 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
19013 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
19015 * reflection.c (typebuilder_setup_fields): Initialize field.first and
19018 2003-04-02 Miguel de Icaza <miguel@ximian.com>
19020 * loader.c (mono_lookup_internal_call): Report the corlib that is
19023 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
19025 * icall.c (ves_icall_type_GetTypeCode): fixed check for
19026 System.DBNull (it's class not valuetype).
19028 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19030 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
19031 if the array method was already assigned a token (fixes bug#40646).
19033 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
19035 * reflection.c (mono_reflection_get_type): Attempt type resolve even
19036 if no assembly is given.
19038 2003-04-01 Miguel de Icaza <miguel@ximian.com>
19040 * metadata.h: Added the new tables.
19042 * row-indexes.h: Added definitions for new tables.
19044 * metadata.c: Add schemas for new tables, and add support for
19045 computing the sizes of them.
19047 * class.c: Update for handling the new type cases.
19049 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
19051 * metadata.h (MONO_TYPE_IS_VOID): new macro
19053 2003-03-31 Martin Baulig <martin@ximian.com>
19055 * threads.h (MonoThreadCallbacks): Added `thread_created'.
19057 * threads.c (mono_thread_new_init): Call `thread_created' in the
19058 mono_thread_callbacks.
19060 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
19062 * loader.h: added marshalbyrefobject_class to mono_defaults
19063 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
19064 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
19065 generation of output parameters.
19066 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
19067 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
19068 contextbound and the target object belongs to the context of the caller.
19069 * object.h: added context and unwrapped_server variables in MonoRealProxy.
19070 * object.c: Implemented support for interfaces and abstract classes
19071 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
19072 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
19074 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
19076 * class.h class.c (mono_class_is_subclass_of): New function.
19078 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
19079 routines for most common case (calls from ArrayList::ToArray).
19081 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
19082 routine so programs which call Environment::Exit() can be profiled.
19084 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
19085 Added MONO_ARCH_SAVE_REGS.
19087 * icall.c (ves_icall_type_is_subtype_of): Use new function.
19089 2003-03-29 Miguel de Icaza <miguel@ximian.com>
19091 * blob.h: Add a couple of new MonoType types definitions.
19093 * tabledefs.h: Add a couple of new call convs.
19095 2003-03-27 Zoltan Varga <vargaz@freemail.h>
19097 * reflection.h (MonoReflectionDynamicAssembly): track changes in
19098 the layout of the class.
19100 * reflection.c (alloc_table): double the size on overflow to avoid
19101 unnecessary copying.
19103 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
19104 avoid filling out metadata tables and blobs. Also set mb->ilgen to
19105 null so it can be garbage collected.
19107 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
19109 * reflection.c (mono_reflection_get_type): Return the resolved type
19110 only if it is in the assembly we searched.
19112 * reflection.c (ensure_runtime_vtable): Initialize method slots.
19114 * class.c (mono_class_setup_vtable): Set the slot of the overriding
19117 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19120 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
19121 the right one is 'file:///blah', but MS allows it.
19123 (mono_assembly_open): allow 'file://blah'
19125 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
19127 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
19129 * socket-io.c: fixes bug #40310.
19131 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
19133 * reflection.c (mono_reflection_parse_type): handle deeply nested
19136 * reflection.c (mono_image_create_token): Use unique token values
19137 since they will be put into a hash table.
19139 * class.c (mono_class_setup_vtable): If a method occurs in more than
19140 one place in the vtable, and it gets overriden, then change the
19141 other occurances too.
19143 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
19144 object as return type.
19146 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
19148 * icall.c: Deleted "ToString" implementation for double and float
19149 because they are full implemented in managed code.
19151 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19153 * reflection.c, reflection.h: implemented and exported functions
19154 to retrieve info about custom attributes.
19156 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19158 * appdomain.c: moved Uri handling to assembly.c
19159 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
19160 work when using a file Uri in *nix and windows.
19162 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
19163 GetReferencedAssemblies.
19165 2003-03-18 Dick Porter <dick@ximian.com>
19167 * icall.c: Rename a couple of internal calls
19169 * threads.c: Set the thread state to Stopped when a thread exits.
19172 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
19174 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
19177 * object.c (mono_class_vtable): fix warning.
19179 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
19181 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
19183 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
19185 (method_encode_clauses): Create exception info structures in the right
19187 (mono_reflection_setup_internal_class): Initialize supertypes field.
19189 * class.c object.c: Handle interfaces which implement other interfaces
19192 * class.h class.c: Move the supertypes array initialization code into
19193 a separate function so it can be used for dynamic types too. Also call
19194 it earlier, in mono_class_init(), since it can be used before the
19195 type is initialized.
19197 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19201 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
19206 * object.c: remove warnings.
19208 2003-03-13 Martin Baulig <martin@ximian.com>
19210 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
19211 (MonoDebugLexicalBlockEntry): New types.
19213 * debug-mono-symfile.c
19214 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
19216 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19218 * process.c: ret can be any non-zero value accroding to MS doc.
19220 2003-03-07 Miguel de Icaza <miguel@ximian.com>
19222 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
19223 fixing a warning for a miss-used prototype, would have cause
19224 random memory corruption.
19226 2003-03-07 Martin Baulig <martin@ximian.com>
19228 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
19229 getting really annoying ....
19231 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
19233 * reflection.c (fixup_method): added support for array methods.
19235 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19237 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
19238 (pointed out by Michael Adams).
19240 2003-03-04 Dick Porter <dick@ximian.com>
19242 * icall.c: Temporarily reverted the Double and Single ToString()
19243 change, because it broke nunit.
19245 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
19247 * object.h, threads.h: make include files compatible with C++
19248 (patch by Jerome Laban <jlaban@wanadoo.fr>).
19250 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
19252 * icall.c: Erased ToString helper functions for Double and Single.
19253 Now, that implementations ar all in managed code (Double and Single
19256 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
19258 * appdomain.c: Added method for initializing the default context of
19259 a domain. Added internal call for getting the default context.
19260 * appdomain.h: Added context variable in MonoDomain struct.
19261 * domain.c: mono_domain_set also sets the default context of the domain
19262 * icall.c: Mapped internal method InternalGetDefaultContext.
19263 * object.c: mono_object_get_virtual_method returns always a remoting
19264 wrapper if the object is a transparent proxy.
19265 mono_runtime_invoke_array: when creating an object by calling the
19266 constructor, if the created object is a proxy, then the constructor should
19267 be called using the a remoting wrapper.
19269 2003-03-03 Dick Porter <dick@ximian.com>
19271 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
19272 variable so it compiles on solaris. Problem spotted by
19273 Christopher Taylor <ct@cs.clemson.edu>
19275 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19278 (get_info_from_assembly_name): don't leak value.
19281 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
19284 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
19286 * assembly.c: export mono_image_load_references ().
19287 * class.c: handle function pointers. mono_class_from_name() now
19288 supports nested type names directly.
19290 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
19292 * reflection.h reflection.c: Encode already created dynamic methods
19293 and fields correctly as a DEF instead of a REF.
19295 * reflection.c: Get rid of the force_ref argument to
19296 mono_image_typedef_or_ref since it was wrong in the first place.
19298 * string-icalls.c: add error checking to string constructors according
19301 * reflection.c: Emit types in the order their TypeBuilders were
19302 created. Previously, a new table index was assigned to each type before
19303 the tables were emitted. This was wrong because the signature blob
19304 might already refer to a type by its original table index.
19306 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
19308 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
19311 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19313 * Makefile.am: make assemblies dir have \ instead of / on windows.
19315 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
19317 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
19318 iterate over the NESTEDCLASS table using a linear search since the
19319 table is not guaranteed to be sorted by the secondary key.
19321 * class.c (mono_class_create_from_typedef): fixed up call to
19322 mono_metadata_nesting_typedef.
19324 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
19326 * marshal.c (mono_string_to_byvalstr): clear the memory as
19327 suggested by Jerome Laban <jlaban@wanadoo.fr>
19329 2003-02-26 Dick Porter <dick@ximian.com>
19331 * process.c: Cope with padding in .rsrc blocks
19333 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
19335 * metadata.h: reverted the filter_len change, it breaks reflection
19337 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
19339 * metadata.h: added a new field to store the filter_len
19342 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19344 * reflection.c: handle custom attributes for types and members
19345 created with Reflection.Emit (bug#38422).
19347 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
19349 * reflection.c: define RTSpecialName automatically for constructors for
19350 compatibility with MS.NET.
19352 * reflection.c (mono_reflection_create_runtime_class): initialize
19353 nested_in field of dynamically created classes.
19355 2003-02-22 Martin Baulig <martin@ximian.com>
19357 * debug-mono-symfile.h: Incremented version number.
19359 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
19361 * object.h icall.c process.c: fix warnings.
19363 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
19365 * appdomain.h appdomain.c:
19366 (mono_domain_try_type_resolve): split the
19367 name_or_tb argument into a name and a tb argument.
19368 (mono_domain_has_type_resolve): new function to check whenever the
19369 application has registered a TypeResolve event handler.
19371 * icall.c reflection.h reflection.c: move the type resolve logic into
19372 mono_reflection_get_type () so it will be invoked when
19373 Assembly::GetType () is called.
19376 (mono_reflection_get_type): renamed to get_type_internal.
19377 (mono_reflection_get_type): fixed type name generation so it works
19378 for nested types too.
19379 (mono_reflection_get_type): call has_type_resolve () to avoid the
19380 costly type name generation if there is no resolve event handler.
19382 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19384 * class.c, image.c: load exported types from file references.
19386 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
19388 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
19389 used to cache the managed methods used to create proxies and make
19390 remote invocation of methods.
19391 * class.h: Added in MonoVTable a flag to indicate that a class needs
19392 to be remotely created.
19393 * object.c: Modified the method mono_class_vtable(). It now initializes
19394 the remote flag of the vtable. Modified mono_object_new_specific(),
19395 so now it checks the remote flag.
19396 * icall.c: Added a couple of internal methods, one for enabling instance
19397 creation interception for a type, and one for creating objects bypassing
19400 2003-02-18 Martin Baulig <martin@ximian.com>
19402 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
19403 New interncall to get a method's metadata token.
19405 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
19406 New interncall for the debugger.
19408 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
19410 * class.c (mono_class_setup_vtable): allocate supertype array
19412 2003-02-18 Martin Baulig <martin@ximian.com>
19414 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
19416 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19419 (assembly_name_to_aname): jump over unknown properties (i've found
19420 something like: 'type, assembly, version=xxx, custom=null, public...',
19421 so now will ignore custom=null and still get the rest of the values).
19423 2003-02-17 Dick Porter <dick@ximian.com>
19425 * threads.c: Have Thread.Start() wait for a semaphore to signal
19426 that the thread has set up all its local data. This fixes bug
19427 34323, where Abort() raced the new thread's TLS data.
19429 Also removes the handle_store() call from start_wrapper, because
19430 threads are now always created suspended and there is no longer a
19431 race between the parent and child threads to store the info.
19433 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
19435 * image.c: explain the #- heap issue in a message, hopefully
19436 avoiding FAQs on mono-list.
19438 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19441 (GetEntryAssembly): if the domain has not invoked
19442 AppDomain.ExecuteAssembly yet, return the assembly of the default
19445 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
19447 * class.c (mono_ldtoken): make it work in dynamic assemblies.
19449 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
19451 * metadata.c, reflection.c: simple speedup to type hash
19454 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
19456 * image.c, image.h, class.c, assembly.c: move module loading
19457 to MonoImage. When loading metadata, consider alignemnet from
19458 the start of metadata, not from the metadata address in memory.
19460 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
19462 * reflection.c (mono_reflection_get_custom_attrs): Added support for
19463 AssemblyBuilder objects. Factored out custom attribute creation into
19464 a separate function.
19465 (create_custom_attr): new function to create custom attributes.
19467 2003-02-12 Miguel de Icaza <miguel@ximian.com>
19469 * Makefile.am: Got tired of typing the full pathname to pedump.
19470 Until there is another option, am installing this.
19472 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
19474 * class.c (class_compute_field_layout): always set field->parent
19475 (mono_ldtoken): use mono_defaults.fieldhandle_class;
19477 2003-02-11 Dick Porter <dick@ximian.com>
19480 * monitor.c: Rewrote Monitor, making lock much faster and
19481 Pulse/Wait work as specified. Also uses much fewer handles, and only
19482 creates them as needed.
19484 * exception.c: Added SynchronizationLockException
19486 * threads.c: Deleted old Monitor implementation. The new one is
19489 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19491 * class.c: handled TypedReference type code. Set the correct size for
19492 class data. Setup interface_offsets for interface classes, too.
19494 2003-02-09 Martin Baulig <martin@ximian.com>
19496 * debug-mono-symfile.h: Reflect latest symbol writer changes.
19498 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
19500 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
19501 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
19502 * object.c: fixed mono_object_get_virtual_method () for interfaces.
19503 * verify.c: check for code that runs after the end of the method.
19505 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
19507 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
19508 "System.Math::Round2".
19509 * sysmath.h: Added Floor, Round and Round2 definitions.
19510 * sysmath.c: Modified certain functions that were not 100% compliant
19511 with MS.NET (math precision) and added the implementation of Floor,
19514 2003-02-07 Martin Baulig <martin@ximian.com>
19516 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
19518 2003-02-07 Martin Baulig <martin@ximian.com>
19520 * debug-mono-symfile.c: Reflected latest symwriter changes.
19521 (mono_debug_create_mono_symbol_file): Removed.
19522 (mono_debug_open_mono_symbol_file): Take an argument which
19523 specifies whether to create a dynamic symbol file.
19525 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
19527 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
19529 2003-02-05 Martin Baulig <martin@ximian.com>
19531 * reflection.c (mono_image_build_metadata): Make this public,
19532 protect it against being called multiple times, don't create
19533 resources and don't build the compressed metadata here.
19534 (mono_image_create_pefile): Do this here.
19537 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
19539 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19541 * socket-io.c: fixed bug #36322.
19543 2003-02-06 Piers Haken <piersh@friskit.com>
19547 * debug-mono-symfile.c:
19553 * socket-io.c: warning cleanups
19555 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
19557 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
19558 function. works like remoting invoke, but does a check for the Proxy first.
19560 2003-02-05 Miguel de Icaza <miguel@ximian.com>
19562 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
19564 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
19566 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
19568 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
19569 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
19571 * object.c (mono_store_remote_field_new): used by the new jit
19572 instead of mono_store_remote_field
19573 (mono_load_remote_field_new): used by the new jit
19574 instead of mono_load_remote_field
19576 2003-02-05 Patrik Torstensson
19578 * appdomain.c: changed unload to take the domain id instead
19581 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
19584 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19586 * appdomain.c: don't look for assemblies in ApplicationBase if
19587 PrivateBinPathProbe is set.
19589 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19591 * object.c: make the first argument in main_args contain the absolute
19592 path to the assembly. Fixes bug #37511.
19594 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19596 * icall.c: get correct UTC offset for countries not using daylight
19597 time saving. Fixes bug #30030.
19599 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19601 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
19602 and 1 are the family).
19604 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
19606 * icall.c (ves_icall_InternalExecute): removed wrong assertion
19608 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
19610 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
19612 * reflection.c: added support for SignatureHelper tokens, which is
19613 needed by the Calli opcode.
19615 * reflection.h: track changes to SignatureHelper class.
19617 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
19619 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19621 * appdomain.c: fixed loading assemblies from PrivateBinPath.
19623 2003-02-03 Patrik Torstensson
19624 * appdomain.[c|h], domain.c :
19625 - Added support for getting a domain via domain id
19626 - Support for setting and getting domain from System.AppDomain
19627 (used in cross appdomain channel)
19628 - Added support for get/set for a MonoAppContext on a thread
19629 (Context class in System.Runtime.Remoting.Contexts),
19630 - Removed hack in Get/SetData and ExecuteAssembly.
19632 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
19633 the managed world to get control when a proxy is created.
19635 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
19637 2003-02-03 Miguel de Icaza <miguel@ximian.com>
19640 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
19641 Populate the codebase field as well.
19643 2003-02-02 Martin Baulig <martin@ximian.com>
19645 * debug-mono-symfile.c
19646 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
19647 (mono_debug_symfile_add_method): Allow interncalls.
19649 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19651 * icall.c: throw parse exception if strtod fails or the string is empty.
19653 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
19655 * marshal.c: handle object type separately from defined
19658 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
19660 * marshal.c: handle NATIVE_LPSTR for strings when it's
19661 explicitly specified.
19663 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
19665 * reflection.c, reflection.h, icall.c: setup the reflection
19666 handle cache for ModuleBuilders and AssemblyBuilders.
19668 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
19670 * reflection.c (reflection_methodbuilder_to_mono_method): set
19673 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19675 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
19677 2003-01-29 Dick Porter <dick@ximian.com>
19679 * threads.c: No need for the fake_thread kludge now that Thread
19680 doesn't run a class constructor
19682 2003-01-29 Dick Porter <dick@ximian.com>
19684 * threads.c: Use g_direct_hash instead of the rather bogus
19687 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
19689 * marshal.c (mono_marshal_get_native_wrapper): add check for null
19690 (fix pinvoke12.exe)
19691 (mono_marshal_get_struct_to_ptr): generate valid IL code
19692 (mono_marshal_get_ptr_to_struct): generate valid IL code
19693 (*): correctly set sig->pinvoke, we need to memdup the signature
19696 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19698 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
19699 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
19701 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
19703 * profiler.c: provide more callers information.
19705 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
19707 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
19709 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
19711 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
19713 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19715 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
19716 exception instead of going into an infinite loop on dates which it
19719 * string-icalls.c (ves_icall_System_String_get_Chars): raise
19720 out-of-range exception if needed.
19722 * class.c (mono_class_setup_vtable): allow a virtual method to provide
19723 an implementation for an interface method and to override an inherited
19724 method at the same time.
19725 Imagine a scenario when a virtual method is used to override a
19726 virtual abstract method in a parent class, and this same method
19727 provides an implementation for an method inherited from an interface.
19728 In this case, the interface resolution code will set im->slot, which
19729 means that the virtual method override pass will skip this method
19730 which means a pointer to the abstract method inherited from the parent
19731 will remain in the vtable of this non-abstract class.
19733 * class.c: (mono_class_setup_vtable): continue search for a real
19734 method if only an abstract method is found.
19736 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
19738 * reflection.c: add size to encoding for ByValStr and ByValArray
19739 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
19741 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19743 * class.c (mono_class_setup_vtable): pass the override info as an
19746 * class.c (mono_class_setup_vtable): set the slot of overriding methods
19749 * reflection.c (ensure_runtime_vtable); add support for method
19752 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19754 * reflection.c (resolution_scope_from_image): Hack to work to work with
19755 dynamic assemblies.
19757 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
19758 added a 'force_ref' argument to force this function to allways return
19759 a TypeRef. This is needed by mono_image_get_memberref_token ().
19761 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19763 * reflection.c (mono_image_get_type_info): interfaces really don't have
19766 * reflection.c (mono_image_basic_init): fill out missing fields of
19769 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
19770 dynamic assemblies. This is required so dynamic assemblies show up in
19771 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
19772 Type::GetType() etc. This is consistent with MS behaviour.
19774 * image.c image.h reflection.c: add newly created classes to the name
19775 cache so mono_class_get () will find them.
19777 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
19779 First part of changes to get IKVM.NET running under mono.
19781 * appdomain.h, appdomain.c: added new function
19782 mono_domain_try_type_resolve() which will emit TypeResolve events.
19783 This function will call AppDomain::DoTypeResolve to do the actual work.
19785 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
19786 moved existing code dealing with dynamic tokens to a new function
19787 called mono_reflection_lookup_dynamic_token (). This function will
19788 raise TypeResolve events when appropriate. Since reflection.c is not
19789 part of libmetadata, a new hook function called
19790 mono_lookup_dynamic_token() is added to class.c which will call this.
19792 * assembly.h assembly.c: make the invoke_load_hook function public,
19793 so it can be called for dynamic assemblies.
19795 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
19797 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
19800 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
19801 MonoGHashTable, since it contains pointers to objects which the GC
19804 * assembly.c (search_loaded): remove unused variable.
19806 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
19808 * object.c: fixed issue exposed by gcc-generated IL programs
19809 that use RVA data for pointers.
19811 2003-01-25 Martin Baulig <martin@ximian.com>
19813 * threads.c (start_wrapper): Moved the initialization of
19814 `start_func' above the mono_new_thread_init() call to which we
19815 pass it as argument.
19817 2003-01-24 Martin Baulig <martin@ximian.com>
19819 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
19820 the MonoThread pointer.
19822 2003-01-21 Miguel de Icaza <miguel@ximian.com>
19824 * icall.c: Rename `PowImpl' to Pow.
19826 2003-01-23 Dick Porter <dick@ximian.com>
19828 * threads.c (start_wrapper): Create a Thread object if needed, so
19829 the Main() thread can do the class initialisation in a subthread
19830 that has been set up to allow managed code execution.
19832 Pass the thread ID instead of the MonoThread pointer to the thread
19833 start and attach callbacks. This change is required, because the
19834 jit thread start callback must be called _before_ the Thread
19835 object can be created.
19837 (mono_thread_init): Removed much object creation code that is no
19838 longer needed. No managed code is called from here now.
19840 * object.c (mono_runtime_exec_managed_code): Create a subthread
19841 for Main, and call back to the runtime to use it.
19842 Set the exit code when Main exits.
19844 * gc.c: Make sure domain finalisation happens in a subthread.
19845 Re-enable threaded GC, fixing bug 31333 (again).
19847 * environment.c: System.Environment internall calls (so far just
19848 ExitCode is here, the others are still in icall.c)
19850 * appdomain.c (mono_runtime_cleanup): All threads running managed
19851 code should have finished before mono_runtime_cleanup() is
19852 reached, so no need to clean up threads.
19854 2003-01-22 Martin Baulig <martin@ximian.com>
19856 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
19857 `gpointer func' arguments.
19858 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
19859 but added `MonoThread *thread' argument.
19860 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
19862 * threads.c (mono_new_thread_init): Added `gpointer func' argument
19863 and pass it to the mono_thread_start_cb callback.
19864 (mono_install_thread_callbacks): New public function to install a
19865 set of callbacks which are set by the debugger.
19866 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
19868 2003-01-22 Martin Baulig <martin@ximian.com>
19870 * Makefile.am: Install debug-mono-symfile.h.
19872 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
19874 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
19876 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
19878 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
19879 * class.c (mono_ptr_class_get): correctly set access levels of pointers
19880 (mono_array_class_get): correctly set access levels of arrays
19882 2003-01-20 Patrik Torstensson
19883 * image.h (MonoAssemblyName): changed major, minor, build, revision
19884 from signed to unsigned.
19886 2003-01-20 sean kasun <skasun@azstarnet.com>
19888 * reflection.c (load_cattr_value): Now this handles
19889 MONO_TYPE_SZARRAY. Fixes bug #35629
19891 2003-01-20 Miguel de Icaza <miguel@ximian.com>
19893 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
19896 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19898 * decimal.c: fixed bug #26056.
19900 2003-01-17 Martin Baulig <martin@ximian.com>
19902 * gc.c: Raise an ExecutionEngineException instead of using g_error().
19904 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19907 (mono_get_exception_type_initialization): new function.
19909 * object.c: throw a TypeInitializationException when an exception is
19910 thrown invoking the class constructor.
19912 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19914 * reflection.c: fixed attribute reading.
19916 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19919 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
19920 provided, look for the type in the calling assembly and then in
19921 mscorlib; if the assembly name is provided, only try that one.
19923 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
19925 * object.c: register the vtable before there is a chance it's
19926 queried again recursively.
19928 2003-01-13 Duncan Mak <duncan@ximian.com>
19930 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
19933 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
19935 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
19937 2003-01-11 Martin Baulig <martin@ximian.com>
19939 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
19940 this to 20 for the release.
19942 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
19944 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
19946 * loader.c (mono_method_get_marshal_info): bug fix
19948 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
19949 structures with explicit layout
19951 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
19953 * profiler.c: made the output more readable (and sorted).
19954 Added caller information for the allocation profiler.
19956 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
19958 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
19960 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19962 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
19963 to get value types.
19965 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
19967 * object.c, profiler.h, profiler.c, profiler-private.h:
19968 Added object allocation profiler.
19970 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
19972 * reflection.h, reflection.c: handle global methods.
19973 Compress blob entries.
19975 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
19977 * marshal.c: fix compilation.
19979 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
19981 * loader.c (mono_method_get_marshal_info): impl.
19983 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
19985 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19987 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
19988 for reference types.
19990 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
19992 * loader.c: fixed off by one error in loaded parameter names.
19994 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
19996 * marshal.c (mono_marshal_get_icall_wrapper): like
19997 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
19998 instead of a MonoMethod.
20000 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20002 * decimal.c: fixed bug #36537.
20004 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
20006 * marshal.c: throw a missing method exception if a
20007 P/Invoke method is not found.
20009 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20011 * icall.c: allow a null this for constructors.
20013 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20015 * icall.c: raise the proper exceptions if the arguments to the
20016 internal Invoke are incorrect.
20018 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
20020 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
20022 2003-01-03 Martin Baulig <martin@ximian.com>
20024 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20026 2002-12-31 Martin Baulig <martin@ximian.com>
20028 * debug-mono-symfile.c: Completely rewrote the type section.
20029 Instead of using individual malloc()ed fields, we use one big
20030 continuous memory area and offsets into this area.
20031 See the comments in the source code for details.
20033 2002-12-30 Martin Baulig <martin@ximian.com>
20035 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
20037 2002-12-30 Martin Baulig <martin@ximian.com>
20039 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
20040 line number table in this data blob instead of using an external
20043 2002-12-28 Martin Baulig <martin@ximian.com>
20045 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
20047 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
20049 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
20050 as a boxed return type.
20052 2002-12-21 Miguel de Icaza <miguel@ximian.com>
20055 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
20056 g_build_filename to properly get separators on the filename created.
20058 * object.h: Small change, introduce MonoMarshalByRefObject to
20059 track the layout of that structure in the C# universe as we make
20062 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
20064 * object.c: removed assert to allow static fields on interfaces.
20065 * loader.c: a TypeSpec may be used for any type, not just arrays.
20067 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
20069 * class.c, class.h: added mono_class_array_element_size ().
20070 Ignore static methods in interfaces.
20072 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20074 * threads.c: fixed the build under cygwin.
20076 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
20078 * reflection.c: handle nullref constants. Allocate keys for
20079 reflection handles with the GC.
20081 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20083 * threads.c, threads.h: added mono_thread_get_abort_signal()
20084 to get a suitable signal for thread abort.
20086 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
20088 * metadata.c: fix handling of ExportedType table.
20090 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20092 * icall.c: added WriteWindowsDebugString internal call.
20094 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20096 * reflection.h: added fields to match C# implementation.
20098 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20100 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
20102 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
20104 * gc.h, gc-internal.h: Rename header for GC internal calls to
20105 gc-internal.h from gc.h as to not clash with Boehm GC having its
20106 header installed as <gc.h> in outside include paths.
20107 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
20108 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
20110 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20112 * icall.c: assign minor, build and revision in FillName.
20114 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
20116 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
20117 Added support for running code generated by Reflection.Emit.
20119 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20121 * appdomain.c: check for NULL argument in LoadFrom.
20123 2002-12-10 Dick Porter <dick@ximian.com>
20125 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
20127 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20129 * appdomain.c: fix buglet when building exe file name. Handle full
20130 assembly name (needed after latest changes to AssemblyName).
20132 (mono_image_close): free some hashtables.
20134 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
20136 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
20137 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
20138 on some systems (redhat 7.3)
20140 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
20142 * threads.c: delete the critical section of a sync block,
20143 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
20145 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
20147 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
20149 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20151 * appdomain.[ch]: handle the assembly preload event to try loading the
20152 assemblies using the paths we have in the current domain.
20154 * assembly.[ch]: created an assembly preload hook that is called to try
20155 loading the assembly by other means that the ones provided here.
20157 * domain.c: initialize the domain search path.
20159 From now on, assemblies (TODO: except corlib and System) are loaded
20160 according to these rules when using mono_assembly_load ():
20162 1. It tries to load the assembly from the ApplicationBase
20163 of the current domain appending .dll and .exe (TODO: have to
20164 try loading from name/name.dll and name/name.exe).
20166 2. It tries the search path specified in PrivateBinPath for the
20167 current domain (if any).
20169 3. Previous behavior.
20171 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
20173 * icall.c: implemented GetInterfaceMap() related icall.
20174 * domain.c, loader.h: load MethodInfo in mono_defaults.
20176 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
20178 * gc.c: disable the finalizer thread for now, untill all the issues
20179 with it are resolved.
20181 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
20183 * string-icalls.c: handle embedded nulls in string ctor when the
20184 length is specified.
20186 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
20188 * class.c: look for explicit interface implementation in parent
20191 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
20193 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
20195 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
20197 * gc.c: protect handles with a critical section.
20199 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20202 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
20203 parameters. If no assembly specified, try getting the type from all
20204 the assemblies in the current domain, else, load the assembly and get
20207 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20209 * marshal.c: applied patch from Aleksey Demakov that fixes
20210 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
20212 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20214 * icall.c: fixed get_location.
20216 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
20218 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
20219 declarations to make it work with older gcc.
20221 * loader.c (mono_get_method): set signature->pinvoke for native calls
20223 2002-11-20 Dick Porter <dick@ximian.com>
20225 * threads.c (mono_thread_init): Set the main thread's handle
20227 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
20229 * gc.c: allow compilation without GC support. Changed to match the
20232 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
20234 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
20236 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
20238 * reflection.c: set a public key token on the core assemblies.
20240 2002-11-18 Dick Porter <dick@ximian.com>
20242 * threads.c: Split out some thread initialisation so that other
20243 files can set the start callback function.
20245 * gc.c: Run finalisers in a separate thread, to avoid stack
20246 overflow. Fixes bug 31333.
20248 * appdomain.c: Set up GC finalisation thread.
20252 * domain.c: Use gc.h macros for GC_malloc
20254 2002-11-15 Dick Porter <dick@ximian.com>
20258 * appdomain.c: Removed mono_runtime_init_with_attach(),
20259 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
20260 merging the extra parameter with the existing function. Removed
20261 unneeded code in mono_thread_attach().
20263 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
20265 * image.c (mono_image_loaded_by_guid): a method to get loaded
20267 (load_metadata_ptrs): we store the guid as string.
20269 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
20271 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
20273 * metadata.c (mono_guid_to_string): imported method form Zoltan
20274 Varga (slightly modified)
20276 * assembly.c (mono_assembly_open): load precompiled code
20278 * loader.h (MonoMethod): we store the method token for use in the
20281 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20283 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
20284 the hook function called when an assembly is loaded.
20286 * domain.c: Modified file.
20287 (mono_domain_assembly_load): removed hash table insertion of assemblies.
20291 2002-11-07 Miguel de Icaza <miguel@ximian.com>
20293 * reflection.c: Map PEFileKind to the value expected by the WinNT
20296 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20298 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
20299 Read until the buffer is filled completely.
20301 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20303 * icall.c: implemented MonoType.InternalGetEvent ().
20305 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20307 * appdomain.c: implemented InitAppDomainSetup. Delayed
20308 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
20309 the entry_assembly.
20311 * assembly.c: base_dir is now an absolute path ending with
20314 * icall.c: modified get_location according to the above changes.
20316 * object.c: init AppDomain.SetupInformation for the default domain after
20317 we have the entry assembly.
20319 * domain.c: when unloading a domain, setup = NULL.
20321 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
20323 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
20325 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
20327 * object.h, object.c: introduced mono_object_get_virtual_method ()
20328 to lookup the method invoked on an object when a callvirt is done on
20330 * icall.c: make MethodInfo::Invoke() always do a virtual call.
20332 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20334 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
20335 current domain when loaded an assembly and failed to load it.
20337 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
20339 2002-10-31 Dick Porter <dick@ximian.com>
20343 * file-io.c: Return the error status in a parameter, as the
20344 GetLastError() value has long since been blown away if we try and
20345 look it up in a subsequent internal call invocation. Delete the
20346 GetLastError() internal call, because it's useless.
20348 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
20350 * class.[ch]: added cast_class to fix bug 29517
20352 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
20354 * marshal.c: create valid IL code in the filter clause:
20355 the new JIT is less forgiving:-)
20357 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20359 * icall.c: removed get_property internal call.
20361 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
20363 * appdomain.h domain.c: Added an ID to appdomains.
20365 * threads.c threads.h icall.c: Implement icall
20366 Thread:GetDomainID(), and remove unused icall
20367 CurrentThreadDomain_internal.
20369 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20371 * icall.c: Don't recurse through the base types in GetConstructor.
20374 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
20376 * mempool.h, mempool.c: added mono_mempool_empty() and
20377 mono_mempool_stats().
20379 2002-10-23 Dick Porter <dick@ximian.com>
20383 * icall.c: Added MonoIO.GetFileType internal call
20385 2002-10-17 Dick Porter <dick@ximian.com>
20387 * appdomain.c (mono_runtime_cleanup): Don't signal the async
20388 delegate semaphore before waiting for all threads to finish,
20389 because new threads can also call async delegates. Fixes bug
20392 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
20393 of 3 seconds, in case another async job is queued. (This part is
20394 needed because the bug fix reintroduced the 3s exit lag.) This
20395 makes the mono_runtime_shutdown flag superfluous.
20397 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
20399 * reflection.c: include ehader size in method section headers.
20400 Really check for suplicated modules entries.
20402 2002-10-17 Martin Baulig <martin@gnome.org>
20404 * debug-mono-symfile.c: Added back support for locals.
20406 2002-10-14 Martin Baulig <martin@gnome.org>
20408 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
20411 2002-10-14 Martin Baulig <martin@gnome.org>
20413 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
20414 mono_class_get() instead of looking in the class cache.
20416 2002-10-13 Martin Baulig <martin@gnome.org>
20418 * debug-mono-symfile.c: Set version number to 28, include the
20419 signature in method names.
20421 2002-10-13 Martin Baulig <martin@gnome.org>
20423 * debug-mono-symfile.h: Set version number to 27.
20425 2002-10-11 Martin Baulig <martin@gnome.org>
20427 * gc.c: Don't register/unregister NULL pointers as disappearing links.
20429 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20431 * metadata.c, metadata.h: added helper function to allocate signatures.
20433 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20435 * icall.c: added internal call to get the location of machine.config.
20437 2002-10-08 Martin Baulig <martin@gnome.org>
20439 * debug-mono-symfile.c: Ignore classes with a pending init for the
20442 2002-10-03 Dick Porter <dick@ximian.com>
20444 * threads.c: Freebsd pthread_t is a pointer
20446 2002-10-03 Dick Porter <dick@ximian.com>
20448 * socket-io.c: Implemented GetHostName_internal
20450 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20453 (mono_config_parse_file): don't leak the text.
20455 2002-10-02 Martin Baulig <martin@gnome.org>
20457 * debug-mono-symfile.c: Added support for methods.
20459 2002-10-01 Martin Baulig <martin@gnome.org>
20461 * debug-mono-symfile.c: Don't emit methods and line numbers for
20462 the dynamic symbol file, just write the type table. We can easily
20463 have an external helper program which creates a symbol file for an
20466 2002-10-01 Dick Porter <dick@ximian.com>
20468 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
20469 Only add the handle to the cleanup array when we're about to
20470 launch the thread. Bug 31425 deadlocked when the test was run on
20473 2002-10-01 Martin Baulig <martin@gnome.org>
20475 * debug-mono-symfile.c: Added support for properties.
20477 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20479 * reflection.c: unaligned store fix from Mark Crichton
20480 <crichton@gimp.org>.
20482 2002-09-27 Martin Baulig <martin@gnome.org>
20484 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
20487 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
20489 * assembly.h, assembly.c: use a sane API to hook into the assembly
20490 loading process instead of a useless special-purpouse hack
20491 (ngen needs a hook, too, for example).
20493 2002-09-27 Dick Porter <dick@ximian.com>
20495 * threads.c (mono_thread_init): Call GetCurrentProcess() so
20496 io-layer can set up some process handle info. Not needed on w32,
20497 but doesn't hurt either.
20499 * process.c: Pass the program name in the second parameter to
20500 CreateProcess, so the path is searched. Include the working
20501 directory. Implemented process name, process enumeration, and some
20502 process detail internal calls.
20504 * icall.c: Added internal calls for process lookup, and some
20507 2002-09-26 Martin Baulig <martin@gnome.org>
20509 * assembly.c (mono_install_open_assembly_hook): New global
20510 function to install a function to be invoked each time a new
20511 assembly is loaded.
20512 (mono_assembly_open): Run this callback function if set.
20514 * debug-mono-symfile.c: Put back line numbers for the dynamic
20515 symbol file and also record the .il file as source file. This
20516 allows us to install the temporary symbol file as `file.dbg' just
20517 like a compiler-generated one.
20519 2002-09-26 Nick Zigarovich <nick@chemlab.org>
20521 * Corrected typo in gc.c (BOHEM vs BOEHM).
20523 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20525 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
20526 GetProperties. Also avoid calling g_slist_length in GetProperties and
20529 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
20531 * reflection.c: avoid unaligned stores (bug spotted by
20532 Mark Crichton <crichton@gimp.org>).
20534 2002-09-25 Martin Baulig <martin@gnome.org>
20536 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
20537 instead of guint64 for addresses and added prologue/epilogue info.
20539 2002-09-25 Martin Baulig <martin@gnome.org>
20541 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
20542 store line number info. For the dynamic symbol file, we only need
20543 to provide the JIT generated dynamic line number info for the dynamic
20546 2002-09-25 Martin Baulig <martin@gnome.org>
20548 * debug-mono-symfile.h: Incremented version number.
20550 2002-09-24 Martin Baulig <martin@gnome.org>
20552 * class.c (mono_debugger_class_init_func): New global function
20554 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
20557 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
20558 function. This is called via the mono_debugger_class_init_func
20559 hook to add all types to the dynamic type table.
20560 (ves_icall_MonoDebugger_GetType): New interncall to get a class
20561 from its metadata token.
20563 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
20564 New interncall for the debugger.
20566 2002-09-24 Nick Drochak <ndrochak@gol.com>
20568 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
20569 before using it in case it is null.
20571 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
20573 * metadata.c: allow custom modifiers in local var signatures
20574 (bug spotted by Zoltan Varga).
20576 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
20578 * class.c: deal with the <Module> class that may have a NULL vtable.
20579 Eliminate warnings.
20581 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20583 * image.c, image.h: more strong name helpers.
20584 * monosn.c: more work: convert pem keys to cryptoapi format.
20586 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
20588 * string-icalls.c: speedup IndexOf.
20590 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20592 * icall.c: updates from Zoltan.2.Varga@nokia.com.
20594 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
20596 * icall.c: cleanup: use mono_object_domain ().
20598 2002-09-23 Martin Baulig <martin@gnome.org>
20600 * debug-mono-symfile.c: Improved type support.
20602 2002-09-22 Martin Baulig <martin@gnome.org>
20604 * debug-mono-symfile.c: Added support for reference types and strings.
20606 2002-09-22 Martin Baulig <martin@gnome.org>
20608 * debug-mono-symfile.c: Started to work on the type table.
20610 2002-09-21 Martin Baulig <martin@gnome.org>
20612 * debug-mono-symfile.c: Largely reworked the symbol table format.
20613 The symbol table is now incrementally updated each time a new
20614 method is added. We're now also using our own magic and version
20615 so that you don't need to recompile all your classes if the
20616 dynamic table changes.
20617 (mono_debug_update_mono_symbol_file): Removed.
20618 (mono_debug_symfile_add_method): New function to add a method.
20620 2002-09-21 Martin Baulig <martin@gnome.org>
20623 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
20626 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
20627 New interncall to get a method from its metadata token.
20629 2002-09-21 Martin Baulig <martin@gnome.org>
20631 * debug-mono-symfile.c: Create type table.
20633 2002-09-20 Martin Baulig <martin@gnome.org>
20635 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
20637 2002-09-20 Martin Baulig <martin@gnome.org>
20639 * debug-mono-symfile.c: Provide information about params and locals.
20641 2002-09-20 Martin Baulig <martin@gnome.org>
20643 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
20646 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
20647 interncall to get a method from its metadata token.
20649 2002-09-20 Martin Baulig <martin@gnome.org>
20651 * debug-mono-symfile.c: Added a few checks for method->header
20652 being non-NULL. This should never happen, but for the moment
20653 let's use a g_warning() rather than a g_assert().
20655 2002-09-19 Mark Crichton <crichton@gimp.org>
20657 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
20658 even if support for it isn't present. Added an #ifdef to fix this.
20660 * socket-io.c: Added checks back for Solaris support.
20662 2002-09-19 Martin Baulig <martin@gnome.org>
20664 * debug-mono-symfile.c (read_string, write_string): Reflect latest
20665 changes in the symbol file format.
20667 2002-09-18 Martin Baulig <martin@gnome.org>
20669 * debug-mono-symfile.c: Set version number to 21.
20671 2002-09-18 Dick Porter <dick@ximian.com>
20673 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
20674 on netbsd. Fixes bug 30051.
20676 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20679 (set_version_from_string): little fix.
20681 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20683 * monosn.c, Makefile.am: added strong name utility.
20684 * reflection.h, reflection.c: implemented delayed signing,
20685 locale, version and hash id assembly attributes.
20687 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
20689 * loader.c, metadata.c: load param attributes in signatures.
20691 2002-09-16 Martin Baulig <martin@gnome.org>
20693 * debug-mono-symfile.c: Added string table with all method names.
20695 2002-09-14 Martin Baulig <martin@gnome.org>
20697 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
20698 fast method lookup.
20700 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20702 * reflection.c: record the public key token of referenced assemblies.
20704 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
20706 * image.c, image.h: added functions to get the strong name and the
20707 public key of an assembly.
20708 * pedump.c: use them.
20710 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
20712 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
20714 2002-09-12 Miguel de Icaza <miguel@ximian.com>
20716 * marshal.c (mono_marshal_get_managed_wrapper): Added
20719 2002-09-11 Martin Baulig <martin@gnome.org>
20721 * gc.c: Call GC_unregister_disappearing_link() on all links when
20722 finalizing them, this is necessary to aviod a crash in boehm's
20725 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
20727 * gc.c: handle GetTarget for finalized objects spotted and fixed by
20730 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
20732 * icall.c: implemented MonoType::Module.
20733 * reflection.c, reflection.h: mono_module_get_object () from
20734 Tomi Pakarinen <tomi.pakarinen@welho.com>.
20736 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
20738 * icall.c: ignore overridden methods in GetMethods ().
20739 Fix for FieldInfo::SetValue().
20740 * object.c: handle float/double in runtime invoke.
20742 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
20744 * object.c: allow a constructor to be called again on an object.
20746 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20748 * class.h, class.c: move field layout code to it's own function and
20749 export it. Get an interface id earlier. Move fields in MonoClass
20750 so they are more cache friendly and align the bitfields.
20751 * loader.c: temporary handle get_param_names() for a runtime method.
20752 * reflection.c, reflection.h: more code to handle runtime creation of
20755 2002-09-09 Martin Baulig <martin@gnome.org>
20757 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
20758 signature with the pinvoke field being set for the actual call.
20760 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
20762 * icall.c: removed some unused icalls. Start of map of glib charsets
20763 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
20765 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
20767 * debug-helpers.c: break infinite loop (found and fixed by
20768 Holger Arnold <harnold@gmx.de>).
20770 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
20772 * icall.c: target may be null in create_delegate.
20774 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
20776 * marshal.c: handle a boolean return type.
20778 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
20780 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
20782 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
20784 * gc.c: fix weakreferences.
20786 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
20788 * icall.c: added icall to get default codepage.
20790 2002-09-03 Dick Porter <dick@ximian.com>
20793 * threads.c: Use MonoThread instead of MonoObject where
20796 Store running thread objects in a hash table, so that we have all
20797 the info to hand when waiting for them to finish
20798 (means we don't need OpenThread() any more, so mingw builds should
20799 be fully functional again.)
20802 * object.h: Added thread ID to MonoThread
20804 2002-09-03 Martin Baulig <martin@gnome.org>
20806 * icall.c (System.Reflection.Assembly::get_location): New interncall.
20808 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20810 * icall.c: fixed leak in get_temp_path. Thanks lupus.
20812 2002-09-03 Martin Baulig <martin@gnome.org>
20814 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
20815 argument to store the end address of the disassembled instruction.
20817 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
20818 here from debug-symfile.h.
20819 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
20820 JIT into this struct.
20821 (MonoSymbolFile): Added `char *image_file' field.
20822 (MonoDebugGetMethodFunc): Removed.
20823 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
20824 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
20825 (mono_debug_find_method): New method.
20827 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
20828 create a full symbol file.
20829 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
20830 and static symbol files.
20831 (mono_debug_find_method): The symbol file keeps an internal method hash,
20832 call this to get a MonoDebugMethodInfo from a MonoMethod.
20834 * debug-symfile.[ch]: Removed.
20836 2002-08-29 Miguel de Icaza <miguel@ximian.com>
20838 * image.c (do_mono_image_open): Remove linker version check.
20840 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
20842 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
20843 wrappers for instance methods.
20845 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20847 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
20849 2002-08-28 Dick Porter <dick@ximian.com>
20851 * Makefile.am: Export HOST_CC for w32 builds
20853 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
20855 * file-io.c process.c: MonoString are null terminated, no
20856 need for mono_string_to_utf16() anymore.
20858 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
20860 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
20862 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
20864 * icall.c, reflection.h: speedup System.MonoType.
20866 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
20868 * reflection.c: allow null as the value of a string argument in
20869 custom attributes constructors.
20871 2002-08-27 Martin Baulig <martin@gnome.org>
20873 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
20874 `trampoline_address' field.
20876 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
20878 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
20879 check (fixes bug #29486)
20881 2002-08-27 Martin Baulig <martin@gnome.org>
20883 * debug-mono-symfile.c: Changed the file format in a way that allows us
20884 open it read-only and to use a specially malloced area for all the
20885 dynamic data. We can now also generate a symbol file on-the-fly if we're
20886 debugging IL code and there is no MCS generated symbol file for it.
20888 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
20890 * object.c: added a define for a good string and array
20891 creation speedup (not enabled by default because we need to deal with
20894 2002-08-26 Martin Baulig <martin@gnome.org>
20896 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
20897 function to create a dynamic symbol file. This is used by the
20898 debugger to create a symbol file for IL code on-the-fly.
20900 2002-08-26 Martin Baulig <martin@gnome.org>
20902 * loader.c (mono_lookup_pinvoke_call): Include the error message
20903 from g_module_error() in the error message.
20905 2002-08-24 Martin Baulig <martin@gnome.org>
20907 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
20908 function to update the symbol file. The symbol file is mmap()ed
20909 writable, but private. This allows us to install the symbol file
20910 together with the assembly.
20912 2002-08-24 Martin Baulig <martin@gnome.org>
20914 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
20915 but they can read the new symbol file format which mcs is now creating.
20917 * debug-symfile.c (mono_debug_find_source_location): Moved to
20918 debug-mono-symfile.c; this is now operating on the new symbol file.
20920 2002-08-23 Martin Baulig <martin@gnome.org>
20922 * debug-helpers.c (mono_method_desc_from_method): New function to get
20923 a MonoMethodDesc from a MonoMethod.
20925 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
20927 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
20928 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
20930 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
20932 * string-icalls.[ch]: make helper methods static.
20934 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20936 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
20937 types to it and to SetValueInternal.
20939 * object.c: Moved handle_enum label to its proper place. This was the
20942 This time i compiled mcs and gtk-sharp and they both work.
20944 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20946 * icall.c: reverted partially my previous patch until
20947 object.c:set_value handles enums correcly.
20949 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20952 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
20953 (ves_icall_System_Environment_get_MachineName): removed warning when
20954 compiling under cygwin.
20956 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
20958 * object.c: fixed field_get_value() for reference types.
20960 2002-08-22 Dick Porter <dick@ximian.com>
20962 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
20963 Don't free a buffer while it's still needed. Patch from Jonathan
20964 Liger <Jonathan.liger@wanadoo.fr>
20966 2002-08-21 Miguel de Icaza <miguel@ximian.com>
20968 * icall.c (ves_icall_System_Environment_get_Platform): Add new
20971 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
20973 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
20974 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
20976 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
20977 we call unmanaged code which throws exceptions.
20979 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
20981 * appdomain.h: added per-domain entry_assembly.
20982 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
20984 * icall.c: Assembly::GetEntryAssembly icall.
20985 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
20986 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
20988 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
20990 * appdomain.h, gc.c: added mono_domain_finalize ().
20992 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20995 (mono_print_unhandled_exception): changed g_warning by g_printerr
20996 because g_log has a 1024 characters limit (yeah, i got a big stack
20997 trace). Don't print exception name, that should be in ToString
21000 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21002 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
21003 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
21005 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21008 (mono_print_unhandled_exception): after previous commit, i realized
21009 that MS calls ToString on the exception. I changed this function to
21010 do that. This way we get stack_trace for free.
21012 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21015 (mono_print_unhandled_exception): invoke Message property instead of
21016 getting 'message' field from Exception. Don't allocate memory for
21017 'trace' and 'message' if not needed.
21019 2002-08-18 Dick Porter <dick@ximian.com>
21021 * unicode.c: Fix asserts to match Encoder.cs checks
21023 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21025 * marshal.c: fix unaligned store issue and a few wrong
21026 opcode argument types.
21028 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21030 * icall.c: added GetUninitializedObjectInternal internal call.
21032 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
21034 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
21035 to the right domain.
21037 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
21039 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
21041 * class.c (class_compute_field_layout): set blittable to false for Strings
21043 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
21045 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21047 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
21048 first chunk of code to create types at runtime. Code to
21049 handle ReflectedType/DeclaringType. Make reflection handles
21052 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
21054 * class.c: set correct name in arrays.
21056 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
21058 * appdomain.c (mono_domain_transfer_object): make it work with
21059 valuetypes. bug fixes.
21061 2002-08-12 Dick Porter <dick@ximian.com>
21063 * object.h: Rename some parameters to avoid c++ keywords (Patch
21064 from Joseph Wenninger <kde@jowenn.at>)
21066 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
21068 * icall.c: added icall to implement Assembly.GetFile*.
21070 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21072 * reflection.h, reflection.c: code to embed managed resources.
21074 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21076 * class.c: move all the type size stuff into
21077 class_compute_field_layout().
21079 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21081 * class.c: ensure enums have always the correct instance size.
21082 * unicode.c: remove wrong assert.
21084 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21086 * assembly.c: fix mem corruption issue.
21087 * image.h, image.c: added mono_image_get_resource () to access
21089 * icall.c: implemented Assembly.EntryPoint property and some
21090 Managed Resources related internalcalls.
21093 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21095 * image.c, image.h: impemented mono_image_get_entry_point ().
21096 * appdomain.c: use mono_image_get_entry_point.
21098 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21100 * reflection.c: support the object type argument when loading
21103 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
21105 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
21106 String as return type.
21108 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
21110 * reflection.c: fix encoding of named args for custom attrs to match
21111 the ms implementation. Read them back when instantiating custom
21114 2002-08-02 Radek Doulik <rodo@ximian.com>
21116 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
21117 by Dietmar as quick fix
21118 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
21119 16 as stack size, used on more places as quick fix before Dietmar
21120 will fix it properly
21122 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
21124 * object.h, object.c: added accessors for fields and properties.
21126 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
21128 * class.c, class.h: made mono_class_get_field_from_name ()
21129 loop on parent types.
21130 Added mono_class_get_property_from_name ().
21132 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21134 * class.c, class.h: move the code to setup the type vtable in its own
21135 function so that it can be reused also for types created at runtime.
21136 Eliminate the "class" identifier from the header file.
21137 * reflection.c: setup the vtable for enums so that we can create
21138 objects for use in SetConstant ().
21140 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
21142 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
21143 instead of the delegate itself as this pointer (bug #28383)
21145 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
21147 * marshal.c (mono_marshal_get_managed_wrapper): added return type
21150 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21152 * loader.c: don't set the pinvoke bit on icalls.
21154 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
21156 * debug-helpers.c (mono_method_full_name): only print a number to
21157 indicate wrapper type (so that the output is more readable in traces).
21159 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
21161 * class.c (mono_class_init): include method override patch from Paolo
21163 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
21165 * icall.c: fixed GetTypeCode().
21167 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
21169 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
21170 use real delegate invoke function to make it work with multicast
21171 delegates (fix bug# 28291).
21173 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21175 * object.c: load constant strings.
21177 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21179 * reflection.c: no magic numbers.
21180 * tabledefs.h: security action enum.
21182 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21184 * assembly.c: fix possible memory corruption.
21186 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21188 * reflection.h, reflection.c: added support for linking resources.
21189 * verify.c: check we have an updated corlib.
21191 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
21193 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
21195 (mono_marshal_string_array): null terminate unmanaged string arrays.
21196 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
21198 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21200 * icall.c: Type.GetType () can now return also types from the
21203 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21205 * loader.h, loader.c: stack walking support.
21206 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
21207 GetCallingAssembly.
21209 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
21211 * marshal.c: added optimisations for blittable types
21213 * class.c (mono_array_class_get): do not set blittable attribute on arrays
21214 (mono_class_setup_mono_type): set blittable attribute for single
21217 * marshal.c (mono_string_utf8_to_builder): impl.
21218 (mono_string_builder_to_utf8): impl.
21219 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
21221 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
21223 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
21224 (mono_marshal_get_managed_wrapper): impl. byref types
21226 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21229 (search_method): don't display debug message.
21231 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
21233 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
21235 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
21237 * appdomain.c: set the missing filename when throwing exception.
21239 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
21241 * metadata.c (mono_type_size): code cleanup
21242 (mono_type_stack_size): removed some test code
21244 2002-07-21 Miguel de Icaza <miguel@ximian.com>
21246 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
21247 mono_get_exception_file_not_found now.
21249 * exception.c (mono_exception_from_name_two_strings): New version
21250 that will call a constructor with two string arguments.
21251 (mono_get_exception_file_not_found): New helper routine, used to
21252 report file-not-found errors.
21254 2002-07-20 Dick Porter <dick@ximian.com>
21257 * process.c: Pass file handles to CreateProcess
21261 * file-io.c: Implemented CreatePipe
21263 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
21265 * metadata.c (mono_get_param_info): set alignment for value types
21267 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
21269 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
21270 Constify mono_domain_assembly_open().
21271 * loader.c: handle null namespace in icalls.
21273 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
21275 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
21276 (emit_str_to_ptr_conv): marshal object as structs
21278 * metadata.c (mono_type_to_unmanaged): marshal object as structs
21280 * marshal.c (mono_marshal_get_runtime_invoke): support value types
21282 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
21284 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
21285 (mono_marshal_get_native_wrapper): we an now return value types
21287 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21289 * verify.c: more checks implemented.
21291 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
21293 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
21295 (mono_marshal_get_native_wrapper): allow byref arguments
21296 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
21297 impl. PtrToStringXXX methods
21298 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
21299 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
21300 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
21301 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
21302 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
21304 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21306 * reflection.c: fix buglet in parsing an assembly name.
21308 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
21310 * marshal.c (emit_ptr_to_str_conv): first impl.
21312 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21314 * object.c, class.h: cache the vtable in the class as suggested by
21315 vargaz@freemail.hu (Zoltan Varga).
21317 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21319 * class.h, loader.c: added mono_field_from_token().
21320 * verify.c: first cut of type checking code.
21322 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
21324 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
21326 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
21328 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
21330 (mono_marshal_get_remoting_invoke): impl.
21331 (mono_delegate_begin_invoke): impl.
21332 (mono_mb_emit_save_args): impl.
21333 (mono_delegate_end_invoke): impl.
21334 (mono_marshal_get_delegate_begin_invoke):
21335 (mono_marshal_get_delegate_end_invoke):
21336 (mono_marshal_get_delegate_invoke): generate a special name for
21337 those methods (including the signature) and associate them whith
21338 the delegate class.
21340 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
21343 (mono_reflection_type_from_name): now it has a MonoImage parameter
21344 which is used as the default image to search the type in. If the image
21345 is NULL or getting the type from it fails, it defaults to corlib.
21347 * icall.c: changed 1 call to mono_reflection_type_from_name to match
21350 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21352 * reflection.c: update the parameter table index.
21354 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21356 * domain.c: don't include the mark byte in the string hash.
21358 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21360 * icall.cs: icall for Type.GetTypeCode ().
21361 * verify: a couple of fixes and disabled local initialization checks.
21363 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
21365 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
21367 * debug-helpers.c (mono_method_full_name): print the type of the
21370 * metadata.c (mono_signature_hash): a hash function for signatures
21371 (mono_signature_hash): better hash algorithm
21373 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
21375 * debug-helpers.c (mono_method_full_name): this can now generate
21376 method names with signatures
21378 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
21379 method dont have this pointers.
21381 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
21383 * reflection.c: fixup typebuilder tokens.
21384 * image.c: fix buglet.
21385 * marshal.h: remove whitespace.
21386 * metadata.h, metadata.c: reinstate code that was removed.
21387 * verify.c: handle catch directives and fix another couple of bugs.
21389 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
21391 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
21392 (mono_marshal_get_native_wrapper): make it comp. with the old code
21393 (mono_marshal_get_native_wrapper): support boolean
21394 (mono_marshal_get_managed_wrapper): support more types
21396 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
21398 * class.c (class_compute_field_layout): compute class->blittable attribute.
21400 2002-07-09 Dick Porter <dick@ximian.com>
21402 * threads.c: Make the thread cleaning up cope with threads that
21405 2002-07-08 Radek Doulik <rodo@ximian.com>
21407 * reflection.c (method_encode_code): use non-translated values to
21408 compute finally_start, this fixes exception handling on ppc, yay!
21410 * decimal.h (struct signscale): fix endianess
21412 2002-07-07 Radek Doulik <rodo@ximian.com>
21414 * reflection.c: swap box_val and not val
21416 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
21418 * reflection.c, reflection.h: handle full assembly info in type name.
21419 Handle Type arguments when loading custom attributes.
21420 * icall.c: updated to use new mono_reflection_type_from_name () method.
21422 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21425 (method_from_memberref): also print assembly name when method not found.
21427 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21430 (ves_icall_TypeGetProperties): fixed bug #27473.
21432 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21434 * reflection.c: display image name and token when cannot find the
21435 .ctor for an attribute.
21437 2002-07-05 Martin Baulig <martin@gnome.org>
21439 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21441 2002-07-04 Dick Porter <dick@ximian.com>
21443 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
21444 compile on mingw. This will cause mingw builds to not wait for
21445 subthreads to terminate after the main thread does. I've lodged a
21446 bug with the mingw developers for them to wrap OpenThread().
21448 2002-07-03 Dick Porter <dick@ximian.com>
21450 * threads.c: Store thread IDs instead of handles, because
21451 GetCurrentThread() returns a pseudohandle and therefore stores
21452 useless values. mono_thread_cleanup() continues checking the
21453 array of threads until it is empty, to cope with subthreads
21454 spawning new threads after the main thread has finished.
21458 * profiler-private.h: Pass the thread ID to thread profiler
21459 functions, instead of a handle
21461 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21463 * verify.c: fixes to make it more usable.
21464 * pedump.c: added --verify code to verify IL code in an assembly.
21466 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21468 * reflection.c: turn errors into warnings to allow compiling corlib.
21470 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
21472 * reflection.c: add special cases to compile corlib.
21474 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21476 * reflection.c: handle properties with only a set method.
21478 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21480 * opcodes.h: add enum with opcodes in opval order.
21482 2002-07-01 Dick Porter <dick@ximian.com>
21485 * object.c (mono_runtime_run_main): Removed unneeded argument
21487 2002-06-28 Martin Baulig <martin@gnome.org>
21489 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
21491 2002-06-27 Dick Porter <dick@ximian.com>
21493 * threads.c: Store the handle in both the parent thread and in the
21494 subthread, to minimise the time between starting a new thread and
21497 2002-06-26 Dick Porter <dick@ximian.com>
21499 * appdomain.c (mono_runtime_cleanup): Close the socket library
21500 after all the threads have finished, not before
21502 2002-06-26 Martin Baulig <martin@gnome.org>
21504 * debug-symfile.c (mono_debug_find_source_location): Added
21505 `guint32 *line_number' argument. If it's not NULL, store the line number
21506 there and return the file name without the line number.
21508 2002-06-25 Dick Porter <dick@ximian.com>
21512 * process.c: Process forking and other support functions
21514 2002-06-25 Dick Porter <dick@ximian.com>
21516 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
21517 things dont happen when the image is closed.
21518 (mono_image_lookup_resource): Walk the resource section looking
21519 for a particular entry
21521 * cil-coff.h: PE resource section decoding
21523 2002-06-25 Dick Porter <dick@ximian.com>
21527 (mono_assembly_foreach): Accessor functions to walk the list of
21529 (mono_assembly_set_main):
21530 (mono_assembly_get_main): Process methods need to know which
21531 assembly is the "main" one
21533 * object.c (mono_runtime_run_main): Record the main assembly
21535 * debug-helpers.c: Fix typo
21537 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
21539 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
21540 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
21542 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21544 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
21546 2002-06-21 Miguel de Icaza <miguel@ximian.com>
21548 * image.c (do_mono_image_open): Initialize reference count,
21549 otherwise we leak the MonoImage.
21551 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21553 * reflection.c: small tweak to handle self-hosting.
21555 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
21557 * reflection.c: fix type name parse code.
21559 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21561 * reflection.c: break out of the loop.
21562 * image.c: special case corlib.
21564 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21566 * reflection.c: add all the custom attrs at the end to ensure the
21567 ctors have been properly initialized when the attributes are defined
21568 in the current assembly.
21570 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21572 * reflection.c: handle correctly multiple-nested types.
21574 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
21576 * row-indexes.h: fix typos.
21577 * reflection.c: adjust for typos and fix method_def_or_ref
21578 encoding in MethodImpl table.
21580 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21582 * reflection.c: fix entry point patching (thanks Serge!).
21584 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
21586 * verify.c: add check for System.Exception
21588 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
21590 * image.c, class.c: minifix for code just c&p'ed.
21591 * reflection.c: warning fix.
21592 * object.h, loader.h, domain.c: load also StringBuilder.
21594 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
21596 * marshal.h, marshal.c: some support code to handle complex marshaling.
21598 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21600 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
21601 Better signatures with vtable error dump.
21603 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
21605 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
21607 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
21609 * icall.c (ves_icall_Type_GetField): impl.
21611 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21613 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
21614 to retrieve a marshal description blob for a field or param.
21616 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
21618 * reflection.h, reflection.c: change order of nested type emission
21619 to avoid table corruption. The NestedTypes table is sorted.
21620 * icall.c: change order of GetConstructor results to workaround mcs bug.
21622 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21624 * reflection.h, reflection.c: handle field and param marshal
21627 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
21629 * icall.c, marshal.c marshal.h: more Marshal class implementation.
21631 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21633 * reflection.c: fix call convention.
21635 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21637 * reflection.h, reflection.c: mono_image_get_memberref_token()
21638 takes a type instead of a class, now. Added
21639 mono_image_get_array_token() to create tokens for the special
21640 multi-dim array methods.
21642 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21644 * assembly.c: handle modules (no assembly table). Split
21645 loading references in its own function.
21646 * class.c: handle moduleref resolution scope.
21647 * image.c, image.h: cache module name in image.
21649 2002-06-07 Martin Baulig <martin@gnome.org>
21651 * reflection.c (mono_image_get_type_info): Only add a class layout entry
21652 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
21654 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21656 * icall.c: more signature fixes that used uint instead of int.
21658 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21660 * reflection.c: fixed signature of field refs.
21662 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21664 * class.c, reflection.c: handle typerefs of nested types
21665 (both on read and when writing files).
21667 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
21669 * icall.c: fix method signatures that tried to workaround the previous
21672 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
21674 * debug-helpers.c: fix typo.
21676 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
21678 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
21679 rewrote the PE/COFF writing code (our programs are understood by the
21682 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
21684 * gc.c, gc.h, icall.c: weakreference support.
21686 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
21688 * Makefile.am, mono-config.c: use $(sysconfdir).
21690 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
21692 * icall.c: changed default precision of Double.ToString() to 15.
21693 Fixed memory leak. Unified with Single.ToString.
21695 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
21697 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
21699 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
21701 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
21702 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
21703 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
21706 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21708 * debug-symfile.c, sysmath.c: yet more compilation fixes.
21710 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
21712 * reflection.c, socket-io.c: more compilation fixes.
21714 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21716 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
21717 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
21718 unicode.c: warning and compiler compatibility fixes.
21720 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
21722 * class.h, metadata.c: fixed warnings/compilation errors.
21724 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
21726 * Makefile.am, mono-config.c, mono-config.h: configuration file
21728 * loader.c, loader.h: make Dll mapping configurable at runtime in the
21729 config file. Export methods to insert and lookup mappings.
21731 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
21733 * reflection.c: handle types and boxed objects in custom attr
21736 2002-05-30 Martin Baulig <martin@gnome.org>
21739 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
21741 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
21743 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
21744 to lookup the implmap row for a P/Invoke method.
21745 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
21746 P/Invoke method from the runtime on an as needed basis.
21748 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
21750 * metadata.c (mono_metadata_parse_signature): impl.
21752 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
21754 * class.c: handle .pack directive.
21756 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
21758 * object.c: initialize static fields with RVA data.
21760 2002-05-25 Martin Baulig <martin@gnome.org>
21763 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
21765 2002-05-24 Martin Baulig <martin@gnome.org>
21768 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
21769 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
21770 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
21772 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
21774 * object.c: special case string ctros in invoke.
21775 * gc.c: silly whitespace changes.
21777 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
21779 * threadpool.[ch]: impl. a threadpool that can
21780 be used by mint and mono.
21782 2002-05-22 Martin Baulig <martin@gnome.org>
21784 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
21785 The first argument is now a `MonoReflectionModuleBuilder *', the return
21786 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
21787 `methods' field to get the method builder. The `token' argument is the
21790 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
21791 invalid characters instead of g_assert_not_reached()ing. This seems
21792 to be the behaviour of mscorlib.
21794 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
21796 * object.c (mono_runtime_invoke_array): applied patch from Rachel
21797 Hestilow to fix bug #25104
21799 2002-05-21 Martin Baulig <martin@gnome.org>
21801 * debug-symfile.c (mono_debug_find_source_location): New function.
21802 Looks up an IL offset in the line number table and returns the source
21803 location as a string.
21805 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21808 (mono_double_ToStringImpl): changed %f by %g until we have something
21811 2002-05-21 Nick Drochak <ndrochak@gol.com>
21813 * icall.c : Use different name for Math.Pow's icall. Needed to check
21814 parameters first in C#.
21816 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
21818 * icall.c, reflection.h: added icall to get info about an event.
21820 2002-05-20 Radek Doulik <rodo@ximian.com>
21822 * object.c (mono_value_box): don't use memcpy for boxing on BIG
21824 (mono_value_box): don't use memcpy for small sizes on
21825 architectures with unaligned access
21827 2002-05-20 Martin Baulig <martin@gnome.org>
21829 * reflection.c (mono_reflection_setup_internal_class): Don't crash
21830 if `tb->parent == NULL'.
21831 (mono_reflection_create_internal_class): New function. This is
21832 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
21835 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
21838 2002-05-19 Martin Baulig <martin@gnome.org>
21840 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
21841 argument to get the length, don't default to the array length.
21843 2002-05-18 Miguel de Icaza <miguel@ximian.com>
21845 * assembly.c (mono_assembly_setrootdir): New function used to
21846 override the MONO_ASSEMBLIES directory.
21848 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
21850 * icall.c: ValueType_GetHashCode() initialize local var.
21852 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
21854 * reflection.c: sort custom attributes table.
21856 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
21858 * reflection.c: support named args in custom attributes (write support).
21860 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
21862 * reflection.c: fix finally position calculation.
21864 2002-05-15 Radek Doulik <rodo@ximian.com>
21866 * reflection.c: fixed endianess at many places
21868 * icall.c (ves_icall_InitializeArray): comment out debug msg
21870 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
21872 * object.c (mono_unhandled_exception): new function to handle
21873 unhandled exceptions.
21874 (mono_unhandled_exception): call the UnhandledException event.
21875 (mono_runtime_delegate_invoke): impl.
21877 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
21879 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
21880 returns the RVA, not the direct pointer to the data. Handle the case
21881 when the class size is fixed.
21883 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
21885 * reflection.c: fix some endianess issues.
21887 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
21889 * object.c (mono_runtime_invoke): is now able to catch exceptions.
21891 * threads.c (mono_thread_init): added a callback which is invoked
21894 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
21896 * icall.c: make GetHashCode return non-negative values.
21898 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
21900 * object.c, icall.c, gc.c: revert to address-based hashcode.
21902 2002-05-13 Miguel de Icaza <miguel@ximian.com>
21904 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
21906 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
21908 * icall.c, class.c: special case <Module>.
21910 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
21912 * icall.c: fix bug in GetNow().
21914 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
21916 * object.c (mono_runtime_class_init): make sure that we call all
21917 static class constructors.
21919 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
21921 * reflection.c: sort methodsemantics table.
21923 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
21925 * reflection.h, reflection.c: honour init locals setting.
21927 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
21929 * icall.c: copied Double ToStringImpl for Single ToStringImpl
21931 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
21933 * reflection.c: support ContructorBuilders in attribute blob creation.
21935 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
21937 * reflection.c: some changes to build a binary that can be run
21938 directly in windows.
21940 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
21942 * loader.c: print a big message when an icall can't be found.
21944 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21946 * string-icalls.c: fix bug 24248.
21948 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
21950 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
21951 icall.c, reflection.h: separate assembly loading by pathname and by
21952 assembly name. Use the MONO_PATH env var to search for assemblies.
21954 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
21956 * assembly.c, image.h: add some support for assemblies
21957 with multiple modules.
21958 * class.c, class.h: export mono_class_from_typeref().
21959 * loader.c: remove duplicated code and use mono_class_from_typeref(),
21962 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
21964 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
21965 documentation says (the ECMA one is correct).
21967 2002-05-02 Dick Porter <dick@ximian.com>
21969 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
21970 Don't name the synchronisation mutex.
21972 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
21975 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
21976 Make the prototypes match.
21977 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
21981 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
21982 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
21983 all systems have tm.tm_zone, so use strftime() with %Z to print
21984 the timezone abreviation into a temp string.
21986 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
21987 rather than mono_array_addr() on a MonoString on Big Endian
21990 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
21992 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
21995 2002-04-30 Dick Porter <dick@ximian.com>
21997 * socket-io.c: Cope with SOCKET being an integer rather than a
22000 * threads.c: Added Thread_free_internal, to deal with thread
22001 handle cleanup. Moved calls to handle_store() and handle_remove()
22002 to start_wrapper(), so each can only be called once. Allocate
22003 synchronisation blocks with GC_malloc(), and use GC finalisation
22004 to close the handles.
22006 * icall.c: added System.Threading.Thread::Thread_free_internal
22008 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22010 * icall.c: support Environment.Exit, CommandLineArgs().
22012 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
22014 * object.c, object.h: added mono_runtime_run_main () and
22015 mono_runtime_get_main_args () for use in System.Environment.
22017 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
22019 * gc.c: fix thinko, enable actual finalization since the jit is now
22022 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22024 * gc.c, object.c: take into account that an object may be offset wrt the address
22025 returned by GC_malloc().
22027 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
22029 * image.c: handle files without entries in the assembly table (modules).
22031 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
22033 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
22034 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
22035 allowed to be null when it's System.Object class setup.
22037 2002-04-27 Martin Baulig <martin@gnome.org>
22039 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
22040 if `tb->parent == NULL' rather than crashing.
22042 2002-04-28 Nick Drochak <ndrochak@gol.com>
22044 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
22045 calling acos() where asin() should have been called.
22047 2002-04-26 Martin Baulig <martin@gnome.org>
22049 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
22050 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
22051 there's a subdirectory called `System', but we don't want to read that
22052 subdirectory as an assembly.
22054 2002-04-25 Martin Baulig <martin@gnome.org>
22056 * debug-symfile.c: Reflect latest MonoString changes.
22058 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
22060 * rand.c, rand.h: instance method icalls need to have an explicit
22061 this pointer as first argument in the C implementation.
22063 2002-04-25 Nick Drochak <ndrochak@gol.com>
22065 * icall.c: Fix typo in map for GetNonZeroBytes
22067 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
22069 * string-icalls.c : String does now passes unit tests without any
22070 errors, the following changes has been made:
22072 Implemented replace methods.
22073 Renaming of methods to (try) follow the standard.
22074 Fixed compare ordinal
22075 Made all memory allocated directly to function instead of via icall function.
22076 Small performance fix in is_in_array function
22078 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
22080 c (mono_string_Internal_ctor_charp_int_int):
22081 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
22082 sindex < 0, throw ArgumentOutOfRangeException instead of
22083 ArgumentNullException.
22085 Added new check for length == 0, however
22086 I need to make it return String.Empty from the C code.
22088 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
22089 that calculate the length for us here.
22091 (mono_string_Internal_ctor_sbytep_int_int): Replaced
22092 mono_string_new_utf16 with mono_string_new, since value is utf8.
22094 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22096 * object.c: register the object for finalization if needed.
22097 Allocate one more char in the string for the terminating 0 char.
22099 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
22101 * class.c, class.h, image.c: check if a type implemenst a destructor.
22102 Use the proper key for array class lookups.
22103 * icall.c: register the icalls in the System.GC class.
22104 * gc.c, gc.h: GC-related functions and icalls.
22106 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22110 * unicode.c: free some strings gotten from mono_string_to_utf8 and
22111 changed a couple of free () by g_free ().
22113 * decimal.c: one-liner in the comments for decimal2string ().
22115 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
22117 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
22119 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
22121 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
22122 * object.c (mono_runtime_invoke_array) : handle null in params
22124 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
22126 * string-icalls.c: fixed bug in split (one off bug)
22128 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
22130 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
22131 * icalls.c: added String::Equals as internal method
22133 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
22135 * threads.c: fixed bug in the double interlocked functions
22137 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
22139 * threads.c: implemented all of the new interlocked icalls.
22140 * string-icalls.c: fix a bug in insert.
22141 * icalls.c: added the icalls for interlocked, removed old string functions.
22143 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22145 * loader.c: fix off-by-one error when reading argument names.
22147 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22149 * profiler.c: win32 counter implementation (untested).
22150 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
22151 (the latter needs testing and more complete impl. from win32 folks).
22153 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
22155 * object.c: mono_array_new_full workaround mono_array_class_get
22158 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22160 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
22161 * object.h (mono_string_chars): Changed casting type.
22163 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22165 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
22166 method signatures to use gunichar2 instead of gint16.
22168 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
22170 * object.h, object.c: domain-specific versions of mono_object_new and
22173 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
22175 * object.c: changed String layout
22177 * string-icalls.c (mono_string_Internal_ctor_chara): added
22178 internal string constructors.
22180 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
22182 * threads.c: pass 'this' to the thread start routine.
22184 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22186 * string-icalls.c: fix IndexOf and LastIndexOf. Now
22187 InternalCompareStr don't call twice mono_string_cmp_char for the last
22188 character. Improved performance in mono_string_cmp_char.
22190 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
22192 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
22193 code into its own library: libmonoruntime.
22195 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
22197 * object.h, object.c: changed array format so that szarrays do not
22198 require a bounds structure.
22199 * icall.c, appdomain.c: support for new szarray format.
22201 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
22203 * metadata.c: compare also the retuns type when comparing signatures:
22204 we didn't do this as an optimization since really overloaded methods
22205 must differ also in the arguments, but this doesn't work with
22206 low-level IL code (or when using explicit conversion operators: see
22207 bug#23498 for an example).
22209 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
22211 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
22213 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
22215 * icall.c: make MonoType::GetElementType its own icall.
22217 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
22219 * icall.c: remove MonoMethod_get_Name().
22220 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
22223 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22225 * string-icalls.c: optimized a few methods.
22227 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
22229 * icall.c: added all new string internal calls
22230 * string-icalls.c: added, new string internal call implementation.
22231 * object.c: added mono_string_new_size for allocating a string a size
22233 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
22235 * object.c (mono_object_isinst): use the same code as in the
22236 optimized x86 version.
22238 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
22240 * profiler.c: TSC-based timer code (faster and more accurate).
22241 Not hooked up in configure, yet (set USE_X86TSC to 1).
22243 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
22245 * profiler.c, profiler.h: track time spent compiling methods.
22246 * threads.c: track thread creation/destruction.
22248 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
22250 * profiler.c, profiler.h, profiler-private.h: profiling interface
22251 and sample implementation. Moved here so that it can be used also by
22254 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
22256 * reflection.c, reflection.h: keep types and other handles separate in
22257 the hash tables for referred tokens. Add guid for modules.
22259 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
22261 * assembly.c: fix bugs found with valgrind.
22262 * metadata.h, metadata.c: added mono_metadata_guid_heap().
22264 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
22266 * threads: added icall support for getting current domain for
22269 2002-04-13 Martin Baulig <martin@gnome.org>
22271 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
22272 (MonoDebugVarInfo): Added `index' field for register based addresses.
22273 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
22274 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
22275 `MonoDebugVarInfo *params' and `guint32 this_offset' with
22276 `MonoDebugVarInfo *this_var'.
22278 * debug-symfile.c (relocate_variable): New static function to write
22279 a location description for a local variable or method parameter.
22281 2002-04-12 Martin Baulig <martin@gnome.org>
22283 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
22284 stack offset and begin/end scope address of a local variable.
22285 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
22286 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
22287 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
22289 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
22290 Added new relocation types for start/end scope of a local variable.
22292 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
22294 * object.h: add mono_object_domain() macro.
22295 * reflection.c: handle typespecs.
22296 * icall.c: MonoMethod::get_Name() implementation.
22298 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22300 * icall.c: String::GetHashCode() icall implementation.
22302 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22304 * icall.c: String::IndexOfAny icall.
22305 * object.c, object.h: make array->max_length more useful.
22306 Intrduced mono_object_class() and mono_string_length() macros.
22308 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22310 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
22311 instead of g_unichar_isdigit.
22313 2002-04-11 Nick Drochak <ndrochak@gol.com>
22315 * icall.c: Implement a simple Double.ToString().
22317 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
22319 * appdomain.h: only io-layer.h is supposed to be included.
22320 * icall.c: explicitly import environ. Fix warning.
22322 2002-04-10 Nick Drochak <ndrochak@gol.com>
22324 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
22325 return true even if it's not Daylight Savings time.
22326 Only return false for the case where the function isn't
22327 implemented for a plaform (read Windows).
22329 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
22331 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
22334 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
22336 * mempool.c (mono_mempool_alloc): only use g_malloc when
22337 absolutely necessary.
22339 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
22341 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
22343 * class.c (mono_class_vtable): use domain mempool to allocate vtable
22344 (mono_class_proxy_vtable): use domain mempool
22346 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
22348 * appdomain.h, appdomain.c: split initialization that requires the
22349 execution engine support into mono_runtime_init().
22351 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
22353 * class.c (mono_class_init): don't include vtable inside MonoClass
22354 to save some memory, gather some statistics.
22355 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
22357 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22359 * icall.c: internalcall implementation for ValueType.Equals().
22361 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
22363 * object.c (mono_message_init): moved
22364 (mono_runtime_exec_main): new arch. independent impl.
22365 (mono_runtime_invoke_array): new method - like
22366 mono_runtime_invoke, but you can pass an array of objects.
22367 (mono_remoting_invoke): new arch. independent impl.
22368 (mono_message_invoke): new arch. independent impl.
22369 (mono_runtime_class_init): new arch. independent impl.
22370 (mono_runtime_object_init): new arch. independent impl.
22372 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
22374 * metadata.c, object.c, reflection.c: documented the exported
22377 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
22379 * icall.c: simpler code to pass the assembly builder data to corlib.
22380 Implement GetNestedTypes() internalcall.
22382 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
22384 * class.c: warn if a type can't be loaded.
22386 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
22388 * image.h: typedef MonoImageOpenStatus
22389 * types.h: removed unused file
22391 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
22393 * icall.c: Enum_ToObject accepts enum value arguments.
22395 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
22397 * class.c: move initialization of properties, events and nested
22398 classes, so that they happen for interfaces, too.
22400 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
22402 * icall.c: cleanup some ugly casts in Array_SetValue*.
22404 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
22406 * icall.c: the values array fro enums is of the correct type, now.
22407 Implement (correctly) getFullName instead of assQualifiedName for
22409 * reflection.h, reflection.c: added mono_type_get_name ().
22411 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
22413 * assembly.c, image.h: for each MonoImage, record from wich assembly
22415 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
22416 Make Type.Assembly work.
22418 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
22420 * debug-symfile.h: use char* instead of gpointer to avoid
22423 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
22425 * icall.c (ves_icall_InternalExecute): impl. FielSetter
22426 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
22428 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
22430 * icall.c (mono_message_init): impl. (code cleanup)
22431 (ves_icall_InternalExecute): impl. FieldGetter
22433 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
22434 defined we call all (non-static)methods through the vtable.
22436 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
22438 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
22439 finalizer even though the memory is still referenced (and the chunk of
22440 memory is not freed).
22442 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
22444 * assembly.c: fix brokeness.
22446 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
22448 * class.c: kill some warnings. Check explicit interface method
22449 implementation also without considering the namespace.
22450 Load also literal strings in static class data.
22452 2002-03-29 Miguel de Icaza <miguel@ximian.com>
22454 * assembly.c (default_assembly_name_resolver): Kill memory leak.
22455 (default_assembly_name_resolver): Make the resolver take the
22456 "base" directory where the assembly was originally defined, so we
22457 can load DLLs that are in the same directory as the assembly that
22458 is being referenced.
22460 2002-03-28 Dick Porter <dick@ximian.com>
22466 * unicode.c: Warning cleanups
22468 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
22470 * object.h, reflection.h: use the correct type instead of MonoObject.
22472 2002-03-28 Martin Baulig <martin@gnome.org>
22474 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
22475 (mono_debug_update_symbol_file): Initialize classes if necessary.
22477 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22479 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
22480 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
22482 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
22484 * assembly.h: fix function prototype.
22485 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
22486 * mono-endian.h: use const cast.
22488 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
22490 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
22492 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
22494 * loader.c: don't assert when a typeref can't be loaded, give
22495 a chance to the runtime to trow an exception instead.
22496 * loader.h: fix warning.
22498 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
22500 * class.c (mono_class_proxy_vtable): added proxy support
22502 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
22504 * icall.c: removed last of PAL calls, added System.Environment
22505 * file-io.h, file-io.c: MonoIO implementation
22506 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
22508 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
22510 * appdomain.c: do not use the byte marker in ldstr table lookup.
22511 * debug-helpers.c: allow two ':' to separate class and method name.
22512 * object.c: allocate arrays bounds with the GC, too.
22513 * verify: add a few more checks.
22515 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
22517 * reflection.c: output also literal strings. Allocate parameter data
22518 with GC_malloc() (thanks, Martin, for catching this!).
22520 2002-03-26 Martin Baulig <martin@gnome.org>
22522 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
22523 include the `this' offset in the `param_offsets'.
22525 2002-03-25 Martin Baulig <martin@gnome.org>
22527 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
22528 mono_debug_get_class() function to get the classes. Added new
22529 relocation types for arrays and strings.
22530 (mono_debug_get_class): New static function to search in all
22531 referenced assemblies for a metadata token.
22533 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
22535 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
22537 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
22538 hold gc-allocated objects. Make the string heap a stream like the
22539 others. Removed duplicated code when writing stream info.
22540 Added asserts to catch possible buffer overflows. Set the sorted map
22541 for tables that need sorting. Added some documentation.
22543 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
22545 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
22546 for interned strings and vtables.
22548 2002-03-24 Martin Baulig <martin@gnome.org>
22550 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
22551 it in the array since it was created with g_slist_prepend().
22553 2002-03-24 Martin Baulig <martin@gnome.org>
22555 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
22556 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
22557 (mono_debug_method_from_token): Renamed to
22558 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
22559 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
22561 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
22564 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
22566 2002-03-24 Martin Baulig <martin@gnome.org>
22568 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
22569 (mono_debug_method_from_token): New func.
22571 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
22572 New interncall, calls mono_debug_local_type_from_signature().
22573 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
22574 calls mono_debug_method_from_token().
22576 2002-03-23 Martin Baulig <martin@gnome.org>
22578 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
22579 specifies the number of bytes to be converted, not the array size.
22580 Return the number of chars, not the number of bytes.
22581 (ves_icall_iconv_get_chars): The `byteCount' argument
22582 specifies the number of bytes to be converted, not the array size.
22584 2002-03-23 Martin Baulig <martin@gnome.org>
22586 * reflection.h (MonoReflectionSigHelper): New type.
22588 * reflection.c (mono_reflection_sighelper_get_signature_local),
22589 (mono_reflection_sighelper_get_signature_local): New functions.
22591 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
22592 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
22595 2002-03-23 Martin Baulig <martin@gnome.org>
22597 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
22598 is_writeable is set.
22599 (mono_raw_buffer_update): New function to write the modified map
22602 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
22604 * debug-symfile.c (mono_debug_update_symbol_file): Call
22605 mono_raw_buffer_update() when done writing.
22607 2002-03-23 Martin Baulig <martin@gnome.org>
22609 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
22611 * debug-symfile.c: Added support for arguments and local variables.
22613 2002-03-23 Dick Porter <dick@ximian.com>
22615 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
22616 protected by ifdefs, hence breaking the w32 build.
22618 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22620 * object.c: implement is_interned() the right way.
22622 2002-03-21 Martin Baulig <martin@gnome.org>
22624 * debug-symfile.[ch]: New files to handle debugging information
22625 files. There's also support to dynamically update these symbol
22626 files to include machine dependent information.
22628 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
22630 * threads.c (mono_thread_create): new function to create thread
22633 2002-03-20 Martin Baulig <martin@gnome.org>
22635 * icall.c (ves_icall_InternalInvoke): Create a new object if the
22636 method is a constructor.
22637 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
22638 points to ves_icall_InternalInvoke().
22640 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
22642 * file-io.c: Flush shouldn't throw exceptions.
22644 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
22646 * file-io.c: FileStream flush support; FileSetLength now
22647 restores file pointer.
22649 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
22651 * class.c: set image for pointer classes.
22653 2002/03/19 Nick Drochak <ndrochak@gol.com>
22655 * sysmath.c: Forgot one.
22657 2002-03-18 Miguel de Icaza <miguel@ximian.com>
22659 * sysmath.c: Avoid redefining existing names.
22661 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
22663 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
22664 handled by runtime as icall rather than dllimport from libm.so
22665 * file-io.c, file-io.h: fixed handle argument type.
22667 2002-03-18 Dick Porter <dick@ximian.com>
22669 * reflection.c (mono_image_get_type_info): rename interface to
22670 iface, because of "#define interface struct" on windows.
22672 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
22674 * class.c, class.h: rename and export mono_ptr_class_get().
22675 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
22676 * reflection.c, reflection.h, icall.c: better/saner type name
22677 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
22680 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
22682 * class.c (mono_class_init): removed hardcoded GHC_SLOT
22684 * icall.c (ves_icall_InternalInvoke): impl.
22686 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
22688 * reflection.c: output the interface map table, too.
22690 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
22692 * class.c (class_compute_field_layout): separate computation of
22693 static field layout
22695 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
22697 * icall.c: added System.Buffer support.
22698 * file-io.c: moved file icalls from PAL to FileStream.
22700 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
22702 * icall.c (ves_icall_System_Object_GetHashCode): impl.
22704 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
22706 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
22708 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
22710 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
22712 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
22714 * debug-helpers.{c,h}: moved here from monograph some useful functions
22715 to locate a method by name/signature in a class or image. Included
22716 also a small and flexible IL disassembler.
22718 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
22720 * reflection.c: fixup tokens in methods with small header size, too.
22722 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
22724 * object.c (mono_string_to_utf8): remove assert(!error), instead
22727 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
22729 * icall.c: update to the new mono_Array_class_get interface.
22731 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
22733 * appdomain.c, object.c: Boehm-GC enable.
22734 * icall.c: make get_data_chunk() support split data requests.
22735 Ensure a class is initialized in more cases. Return only the first
22736 property found in GetProperties() or the compiler gets confused.
22737 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
22738 * reflection.h, reflection.c: add fixup mechanism for field and method
22739 tokens. Initialize assembly->typeref in a single place. Output
22740 properties after events. Support custom attributes for events, too.
22741 Typo fix for paramter custom attrs.
22743 2002-03-07 Martin Baulig <martin@gnome.org>
22745 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
22747 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
22749 * class.c (mono_array_class_get): fix. for multi. dim. arrays
22751 2002-03-06 Martin Baulig <martin@gnome.org>
22753 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
22754 non-zero lower bounds. See testcases #F10-#F13.
22756 2002-03-05 Martin Baulig <martin@gnome.org>
22758 * exception.c (mono_get_exception_argument_out_of_range): New exception.
22760 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
22761 ves_icall_System_Array_GetValue(), only calculate the absolute array position
22763 (ves_icall_System_Array_SetValue): Likewise.
22764 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
22765 as argument and does the actual work. This function is used when copying a
22766 multi-dimensional array.
22767 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
22768 now do all the widening conversions of value types.
22769 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
22771 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
22773 * class.c: remove some magic numbers and use the smbolic names,
22774 instead. Added init_events() to load event info at class init time.
22775 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
22776 and mono_metadata_methods_from_event().
22777 * reflection.h, reflection.c: added support for writing out the evnets
22778 related information.
22780 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
22782 * reflection.h, icall.c: use a different method (GetInterfaces)
22783 to gather interface info and add isbyref, isprimitive and
22784 ispointer to the ves_icall_get_type_info() return value.
22786 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
22788 * class.h: stared adding support for events.
22789 * icall.c: split find_members implementation. Added debug icall to get
22790 the address of an object.
22791 * reflection.c: handle TypeBuilders in mono_type_get_object().
22793 2002-03-01 Martin Baulig <martin@gnome.org>
22795 * icall.c (ves_icall_System_Array_GetLength): This must throw an
22796 ArgumentOutOfRangeException(), not an ArgumentException().
22797 (ves_icall_System_Array_GetLowerBound): Likewise.
22798 (ves_icall_System_Array_GetValue): Improved argument checking.
22799 (ves_icall_System_Array_SetValue): Improved argument checking.
22801 2002-03-01 Martin Baulig <martin@gnome.org>
22803 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
22804 called with invalid arguments rather than just dying with g_assert().
22805 (ves_icall_System_Array_SetValue): Likewise.
22806 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
22807 raise a NotImplementedException instead.
22808 (ves_icall_System_Array_GetLength): Added argument checking.
22809 (ves_icall_System_Array_GetLowerBound): Added argument checking.
22811 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
22813 * object.h (mono_assert): new macros mono_assert and
22814 mono_assert_not_reached
22816 2002-02-28 Martin Baulig <martin@gnome.org>
22818 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
22819 and "System::String::IsInterned" to "System::String::_IsInterned".
22821 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
22823 * icall.c: remove hacks for typebuilder. Added icall to create a
22824 modified type from a tybebuilder.
22825 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
22826 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
22827 to create a backing MonoClass for a TypeBuilder.
22829 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
22831 * class.c, class.h: more refactoring of class init.
22832 Export mono_class_setup_mono_type() and mono_class_setup_parent().
22834 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
22836 * marshal.c, marshal.h: start of marshaling interface.
22838 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
22840 * icall.c: fix order in assembly qualified name icall.
22842 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
22844 * class.c: do not free str, since we store it in the hash table.
22845 * reflection.h: add label field to MonoILExceptionInfo.
22846 * reflection.c: handle references to more than one assembly. Handle
22847 case when there isn't a module created in the assembly.
22849 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
22851 * class.c: Fix typo. Start refactoring of class init code.
22853 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
22855 * appdomain.c: exit with 1 on error.
22856 * class.c: we already have the name in MonoClassField.
22857 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
22858 MonoStreamHeader instead of an offset of image->raw_metadata.
22860 2002-02-26 Miguel de Icaza <miguel@ximian.com>
22862 * appdomain.c (mono_init): Be even more descriptive about the error.
22864 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
22866 * appdomain.c: give the user an informative message when corlib can't
22869 2002-02-26 Martin Baulig <martin@gnome.org>
22871 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
22872 New icall to get the time zone data.
22874 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
22876 * reflection.c: set virtual and raw size of section correctly.
22877 * threads.c: transfer domain information to newly created threads.
22879 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
22881 * class.c: when instancing a class in a domain, load the default
22882 vaules for static fields from the constant table. Fix System.Enum to
22884 * icall.c: implement Object::GetType() internalcall. Implemented
22885 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
22886 Fixed checking of binding flags in find_members().
22887 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
22888 * reflection.c: handle enumerations when writing to the constant
22889 table. Use a different object cache for types.
22892 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
22894 * object.c (mono_object_isinst): fix for arrays
22896 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
22898 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
22900 * object.c: don't use mprotect () and fix intern pool hash table
22901 lookup for big endian systems.
22903 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
22905 * icall.c: change type_is_subtype_of () signature.
22907 2002-02-21 Mark Crichton <crichton@gimp.org>
22909 * rand.c, rand.h: Added random number generator for
22910 System.Security.Cryptography classes.
22912 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
22914 * icall.c: Added System.Security.Cryptography calls.
22916 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
22918 * class.c, icall.c, metadata.c: better support for pointer types.
22919 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
22920 * reflection.c: Add support for getting custom attrs for properties
22921 and simplify some code.
22923 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
22925 * icall.c: change getToken () and add custom attribute GetBlob()helper
22927 * reflection.h: add custom attrs array to the reflection builder structures.
22928 * reflection.c: encode and emit custom attributes for all the relevant
22929 reflection objects. Cache fieldref and methodref tokens. Change
22930 mono_image_create_token() interface to take a MonoDynamicAssembly.
22931 More complete custom attributes decoder. Load custom attributes for
22932 Assembly, Field, Method and Constructor objects, too. Make the
22933 returned array an Attribute[] one, not object[]. Added
22934 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
22935 custom attribute constructor.
22937 2002-02-20 Dick Porter <dick@ximian.com>
22941 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
22942 problem code out for now).
22944 2002-02-19 Radek Doulik <rodo@ximian.com>
22946 * object.c (mono_ldstr): use hash table to avoid multiple swapping
22948 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
22950 * icall.c: register the GetCustomAttributes method.
22951 * object.c, object.h: add mono_string_new_len ().
22952 * reflection.h, reflection.c: added mono_runtime_invoke(),
22953 mono_install_runtime_invoke(). Added
22954 mono_reflection_get_custom_attrs () to load custom attributes and
22955 create the attribute objects.
22957 2002-02-19 Dick Porter <dick@ximian.com>
22958 * threads-dummy-types.c:
22959 * threads-dummy-types.h:
22962 * threads-pthread-types.c:
22963 * threads-pthread-types.h:
22964 * threads-pthread.c:
22965 * threads-pthread.h: Deleted obsolete files
22967 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
22969 * class.c (mono_class_vtable): runtime init the class when we
22970 allocate static class data.
22972 * icall.c (ves_icall_System_Array_SetValue): check for null values.
22974 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
22975 and String - but we will need generic marshalling support in the
22977 (mono_init): set the domain name in a ms compatible way
22979 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
22982 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
22984 * object.c (mono_array_clone): use alloca() instead of g_malloc
22987 * appdomain.c (mono_domain_unload): impl.
22989 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
22991 * appdomain.c, object.c: fix intern pool implementation.
22992 * class.c: fix alignment code.
22994 2002-02-16 Radek Doulik <rodo@ximian.com>
22996 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
22997 and s2 > s1, just copy lower bytes to be compatible with little
22998 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
22999 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
23001 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
23002 force big_endian to be 1 for big endian machines
23003 (ves_icall_iconv_new_decoder): ditto
23005 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
23007 * socket-io.c (convert_sockopt_level_and_name): If the system
23008 doesn't define SOL_IP or SOL_TCP, get them by hand using
23009 getprotobyname() and caching the values (because this could be a
23011 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
23012 Use the appropriate struct when the system does support it. Ie,
23013 not all systems have struct ip_mreqn so use struct ip_mreq when
23016 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
23018 * reflection.c: handle finally clauses.
23020 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
23022 * socket-io.c: use g_snprintf() instead of snprintf.
23024 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
23026 * reflection.c (mono_param_get_objects): Cast second argument to
23027 mono_method_get_param_names to a const char** to silence the
23030 * appdomain.c (mono_domain_assembly_open): Put parens around the
23031 truth statement in the for-loop.
23033 * unicode.c (iconv_convert): Got rid of a compiler warning about
23034 int i being unused when the system has a new iconv.
23035 (iconv_get_length): Same.
23037 * image.c (load_class_names): Cast the second argument to
23038 g_hash_table_insert() to char* to hush compiler warnings about the
23040 (mono_image_open): Same here.
23042 * socket-io.c: Don't conditionally include sys/filio.h or
23043 sys/sockio.h here anymore since we now get them from
23044 io-layer/io-layer.h
23045 (inet_pton): If the system doesn't support inet_aton, implement
23046 using inet_addr and also #define INADDR_NONE if it isn't defined
23049 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
23051 * metadata.c, metadata.h: added function to get packing and size info
23053 * reflection.h, reflection.c: handle field RVA data. Save info about
23054 the table layout if needed. Assign typedef indexes to all the types
23055 before dumping the info about them to avoid forward reference problems.
23057 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
23059 * socket-io.c (convert_sockopt_level_and_name): ifdef
23060 SO_ACCEPTCONN because it is not defined on my system (old debian)
23062 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
23064 * opcode.c: use stddef.h to get NULL.
23066 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
23068 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
23069 for FIONBIO, FIONREAD and SIOCATMARK.
23070 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
23071 define INADDR_NONE and besides, inet_addr() is deprecated and
23072 should not be used. Use inet_pton() instead - it also has the
23073 added bonus that it can easily handle IPv6 addresses as well.
23074 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
23076 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
23078 * decimal.c: remove _MSC_VER conditional.
23080 2002-02-13 Dick Porter <dick@ximian.com>
23083 * icall.c: Internal calls for Blocking, Select, Shutdown,
23084 GetSocketOption and SetSocketOption
23086 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23088 * assembly.cs: better resolver: use it instead of some kludgy
23091 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
23093 * reflection.c: the best way to speed-up the compiler is to avoid
23096 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
23098 * class.c (mono_class_vtable): changed the object layout
23099 (obj->vtable->class).
23100 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
23102 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
23104 * assembly.c: look for assemblies in the assembly dir, too.
23106 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23108 * class.c: fix thinko in mono_class_from_type().
23110 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
23112 * exception.h, exception.c: added TypeLoadException.
23113 * object.h, object.c: added mono_array_clone ().
23114 * icall.c: handle throwOnError in AssemblyGetType().
23115 Added Array.Clone().
23116 * opcode.h, opcode.c: use a single value for the opcode val.
23117 Compile fix for non-gcc compilers.
23119 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
23121 * opcodes.c, opcodes.h: export interesting info about opcodes.
23123 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
23125 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
23128 * class.c (class_compute_field_layout): set element_class for enums
23129 (mono_class_create_from_typedef): set element_class for normal classes
23131 * icall.c (ves_icall_System_Enum_get_value): impl.
23133 * class.c (mono_class_create_from_typedef): do not set valuetype
23134 flag for System.ValueType and System.Enum
23136 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
23138 * unicode.c (iconv_convert): fix big endian problem.
23140 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
23142 * class.c: add asserts if we are ever going to scribble over memory.
23143 * socket-io.c: not all systems have AF_IRDA defined.
23145 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
23147 * class.c (class_compute_field_layout): do not consider static
23148 fields to compute alignment
23150 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
23152 * appdomain.c (mono_appdomain_get): impl.
23153 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
23155 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
23157 * icall.c: ignore "file://" prefix when loading an assembly.
23159 2002-01-23 Dick Porter <dick@ximian.com>
23163 * Makefile.am: Added socket support
23165 2002-01-23 Miguel de Icaza <miguel@ximian.com>
23167 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
23168 code back. This should return the assemblies that are loaded by
23169 the runtime on behalf of an application domain.
23171 The current implementation is still broken, it just returns every
23172 assembly loaded, but until we get real applications domain this
23175 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
23177 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
23180 2002-01-23 Miguel de Icaza <miguel@ximian.com>
23182 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
23183 the mono_class_from_name lookup.
23184 (ves_icall_get_parameter_info): ditto.
23185 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
23187 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
23189 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
23191 * class.c: load also nested classes on class init.
23192 System.ValueType instance methods gets passed boxed
23193 values, unless methods in derived classed that get a pointer to the
23195 * icall.c: use better name parsing code in GetType().
23196 * image.c, image.h: add mono_image_loaded ().
23197 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
23198 * reflection.c, reflection.h: added mono_reflection_parse_type().
23200 2002-01-22 Veronica De Santis <veron78@interfree.it>
23202 * icall.c : Added mapping of internal calls for Manual and Auto reset events
23203 * threads.c : Added the implementation of internal calls for events
23204 * threads.h : Added prototypes of internal calls for events
23206 2002-01-21 Radek Doulik <rodo@ximian.com>
23208 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
23210 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
23212 * class.c (mono_class_init): set min_align to 1 (instead of 0)
23213 (mono_class_value_size): use min_align
23215 2002-01-20 Dick Porter <dick@ximian.com>
23218 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
23219 so it compiles on w32.
23221 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
23223 * metadata.c (mono_type_stack_size): impl.
23225 * class.c (mono_class_get_field): impl. memberref token
23227 2002-01-16 Veronica De Santis <veron78@@interfree.it>
23229 * icall.h : Added the internal calls mapping for CreateMutex_internal
23230 and ReleaseMutex_internal.
23231 * threads.h : Added the prototype of mutexes internal calls.
23232 * threads.c : Added the implementations of mutexes internal calls.
23234 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
23236 * metaparse.h: removed unused file.
23237 * reflection.c, reflection.h: added stream_data_align () function
23238 to align data in streams and keep stream aligned. Add support for
23239 exception support in method headers.
23241 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
23243 * unicode.c: make iconv_convert () return the number of bytess written
23244 in the output buffer.
23246 2002-01-15 Dick Porter <dick@ximian.com>
23247 * threads.c: Make the runtime's idea of infinite timeouts coincide
23248 with the class library's
23250 Fix a particularly egregious bug in mono_thread_cleanup(). That
23251 code was so utterly bogus it must have been written on a Monday.
23253 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
23255 * reflection.h: add subtypes field to TypeBuilder.
23256 * reflection.c: encode constants for literal fields.
23257 Handle subtypes. Fix user string token (and add a zero byte)
23260 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
23262 * class.c (mono_class_init): bug fix: assign slot numbers for
23265 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
23267 * reflection.c: don't try to output a code RVA for abstract methods.
23268 Small fixes for method header format. Output parameter info to the
23269 ParamDef table. Save method overriding info to MethodImpl table.
23270 Fix property support. Allow typedef.extends to be a type in the
23272 * verify.c: fix off-by-one error.
23274 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
23276 * class.c: fix mono_class_from_mono_type () for szarray types.
23277 Remove unused cache check in mono_class_from_type_spec().
23278 * icall.c: *type_from_name () functions handle simple arrays and byref.
23279 * reflection.c: handle byref and szarray types. Handle methods without
23280 body (gets P/Invoke compilation working). Handle types and fields in
23282 * reflection.h: add rank to MonoTypeInfo.
23284 2002-01-10 Dick Porter <dick@ximian.com>
23286 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
23289 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
23291 * icall.c: initialize class in type_from_handle ().
23292 Loop also in parent classes for get_method ().
23293 * reflection.c: properly encode class and valuetype types.
23294 Start on encoding TypeBuilder types. Handle fieldrefs.
23295 Use correct length when registering a user string.
23296 Handle ConstructorBuilder and MonoMethod in get_token ().
23297 Make mono_type_get_object () aware of cached types.
23298 * object.c: back out change to mono_string_new ().
23300 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
23301 * object.c: mono_string_new should return a NULL when the string
23302 passed in is NULL -- not try to deference it.
23304 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
23306 * icall.c: hack to make IsSubType work for TypeBuilders.
23307 * reflection.c: emit constructors before methods.
23308 Retrieve param names in mono_param_get_objects().
23310 2002/01/05 Nick Drochak <ndrochak@gol.com>
23312 * Makefile.am: fix list of headers and sources so automake 1.5
23313 doesn't complain. Removed \# at end of list.
23315 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
23317 * reflection.c: get token for a method ref. Set return type of
23318 constructor to void.
23319 * loader.c: debug message.
23320 * class.c: typo fix.
23322 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
23324 * icall.c: fix array init with rank > 1. FindMembers
23325 loops in parent class as well.
23326 * image.c: do not insert nested types in name cache.
23327 * reflection.c: warning fix.
23328 * reflection.h: add override method (for interface impl).
23330 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
23332 * metadata.c: fix customattr decoding.
23334 2001-12-21 Miguel de Icaza <miguel@ximian.com>
23336 * rawbuffer.cs: Added native Win32 implementation, avoids using
23337 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
23339 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
23341 * class.c: make the low-level routines handle the cache.
23343 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
23345 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
23347 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
23349 * class.c: fix mono_array_element_size() for objects.
23350 * class.h, class.c: add properties to MonoClass and load them
23352 * icall.c: check with isinst() when assigning a value to an array
23353 instead of requiring the classes to match exactly.
23354 Implemented icall for System.Type::GetType().
23355 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
23356 enums. Handle bindingflags when looking for methods and fields.
23357 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
23358 and mono_metadata_methods_from_property().
23359 * reflection.h, reflection.c: added structures for propreties,
23360 parameters and enums. Implemented mono_property_get_object() and
23361 mono_param_get_objects().
23363 2001-12-18 Dick Porter <dick@ximian.com>
23365 * file-io.c: Use mono_string_to_utf16() instead of
23366 mono_string_chars()
23368 * object.c: Added mono_string_to_utf16(), which copies the non
23369 NULL-terminated MonoString into a new double-null-terminated
23372 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
23374 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
23376 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
23378 * file-io.c: raise exceptions if handle is invalid.
23380 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
23382 * assembly.c: yet another check for mscorlib.
23383 * class.c, class.h: load nesting info for classes.
23384 * icall.c: many new functions to support the Reflection classes.
23385 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
23386 * reflection.h, reflection.c: mono_image_create_token(),
23387 mono_assembly_get_object(), mono_type_get_object(),
23388 mono_method_get_object(), mono_field_get_object(): methods to return
23389 objects that parallel the C representation of assemblies, types,
23392 2001-12-11 Dick Porter <dick@ximian.com>
23395 * file-io.c: Internal calls for file IO.
23397 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
23399 * tabledefs.h: missing FileAttributes.
23400 * verify.h, verify.c: use is_valid_string () to simplify and check for
23401 valid strings more correctly. Fix warnings and speeling.
23402 Check more tables: Filed, File, ModuleRef, StandAloneSig.
23403 Check code: branches, maxstack, method calls.
23405 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
23407 * object.c (mono_object_allocate): removed static, so that the jit
23408 can allocate value types.
23410 * icall.c (ves_icall_System_DateTime_GetNow): impl.
23412 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23414 * class.c: init enum types right away and register the
23415 token->MonoClass map in mono_class_create_from_typedef ().
23416 * verify.h, verify.c: first cut of the verifier.
23417 * pedump.c: add --verify switch to verify metadata tables.
23418 * tabledefs.h: add some missing enums.
23420 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
23422 * class.c (mono_install_runtime_class_init): impl.
23423 (mono_class_init): renamed mono_class_metadata_init to
23424 mono_class_init, also removed the metadata_inited flag
23426 * object.c (mono_object_isinst): use faster algorithm
23428 2001-11-30 Radek Doulik <rodo@ximian.com>
23430 * mono-endian.h: reverted last change
23431 added function prototypes
23433 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
23434 add mono-endian.c back
23436 * mono-endian.c: returned back, as Paolo pointed out, it's needed
23437 for unaligned access, I've mistaked it with endianess. I am
23439 (mono_read16): fix reverted endianess
23440 (mono_read64): ditto
23441 (mono_read32): ditto
23443 2001-11-30 Dick Porter <dick@ximian.com>
23445 * exception.c: Implement mono_exception_from_name()
23447 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23449 * metadata.h, metadata.c: remove params_size and locals_size and their
23450 calculation from the metadata code: they are only usefult to the
23453 2001-11-29 Radek Doulik <rodo@ximian.com>
23455 * object.c (mono_ldstr): swap bytes here, it's probably not the
23456 best place, but works for me now, I'll redo it once I know mono
23457 better, also note that I add PROT_WRITE and don't reset back, also
23458 note that it's only affects big endians, so x86 should be OK
23460 * mono-endian.h (read16): use just glib macros for both endians
23462 * mono-endian.c: removed as glib macros are used in in
23463 mono-endian.h so we don't need to care about endianess for read
23464 macros as glib does that for us already
23466 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
23468 * class.h, class.h: take minimum alignment into consideration so
23469 that the fields of a class remain aligned also when in an array.
23471 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23473 * loader.h, loader.c: add mono_method_get_param_names().
23474 * class.c: 0-init class fields.
23476 2001-11-26 Dick Porter <dick@ximian.com>
23480 * threads.c: New file that handles System.Threading on all platforms
23483 * object.h: Remove the synchronisation struct from MonoObject,
23484 replace it with a pointer that gets initialised on demand
23486 * Makefile.am: Replace all the system-specific threading code with
23487 a single file that uses the new wrapper library
23489 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
23491 * class.c, class.h: add mono_install_trampoline() so that the runtime
23492 can register a function to create a trampoline: removes the ugly
23493 requirement that a runtime needed to export arch_create_jit_trampoline.
23494 * object.h, object.c: added mono_install_handler() so that the runtime
23495 can install an handler for exceptions generated in C code (with
23496 mono_raise_exception()). Added C struct for System.Delegate.
23497 * pedump.c: removed arch_create_jit_trampoline.
23498 * reflection.c: some cleanups to allow registering user strings and
23499 later getting a token for methodrefs and fieldrefs before the assembly
23501 * row-indexes.h: updates and fixes from the new ECMA specs.
23503 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
23505 * class.h, class.c: add enum_basetype field to MonoClass.
23506 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
23507 to get index in the constant table reated to a field, param or
23509 * reflection.h, reflection.c: handle constructors. Set public-key and
23510 version number of the built assembly to 0.
23511 * row-indexes.h: update from new ECMA spec.
23513 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23515 * class.h, class.c: add a max_interface_id to MonoClass.
23516 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
23517 since it's used to do that. Added mono_type_type_from_obj().
23518 Make GetType() return NULL instead of segfaulting if the type was not
23519 found. Handle simple arrays in assQualifiedName.
23520 * object.h: add a struct to represent an Exception.
23521 * reflection.c: output call convention in method signature.
23522 Add code to support P/Invoke methods and fixed offsets for fields.
23524 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
23526 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
23528 * icall.c: use mono_array_addr instead of array->vector: fixes the
23529 reflection image writing.
23530 * reflection.c: init call convention byte to 0 in method signature.
23531 Encode the property signature. Don't output property-related methods
23532 twice. Really process the properties for a type (don't cast a field to
23533 a property, my mom always told me that).
23534 Fix 64 bit issues in pointer alignment in a different and more
23537 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
23539 * loader.h: Removed type class from MonoDefaults, added monotype
23541 * loader.c: Loaded MonoType, removed loading of Type
23543 * icall.c (my_mono_new_object): Now returns a System.MonoType,
23544 and fills in System.Type._impl with a RuntimeTypeHandle rather
23545 than the actual MonoClass *
23547 (ves_icall_type_from_handle): change from type_class to
23550 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
23553 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
23556 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
23558 (ves_icall_System_Reflection_Assembly_GetType): implemented
23560 (ves_icall_System_MonoType_assQualifiedName): implemented
23562 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
23564 2001-11-09 Miguel de Icaza <miguel@ximian.com>
23566 * assembly.c (mono_assembly_open): Implement a cache for the
23569 (mono_assembly_close): only destroy the assembly when the last
23572 2001-11-09 Dick Porter <dick@ximian.com>
23574 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
23576 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
23578 * class.c (mono_class_metadata_init): bug fix: compute the right slot
23580 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
23582 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
23583 from Martin Weindel.
23584 * object.h: add mono_string_chars ().
23586 2001-11-07 Miguel de Icaza <miguel@ximian.com>
23588 * reflection.c (build_compressed_metadata): Eliminates warnings
23589 and uses 64-bit clean code.
23591 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
23592 (mono_type_equal): Change signature to eliminate warnings.
23594 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
23596 * icall.c, loader.c: remove the internalcall array constructors.
23597 Changes to match the new MonoArray structure.
23598 * object.h, object.c: an array object doesn't allocate an extra
23599 vector. Add mono_array_new_full () to create jagged arrays easily.
23601 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
23603 * metadata.h, metadata.c: add mono_metadata_field_info () to
23604 retreive all the info about a field from vairous tables.
23605 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
23606 * class.h, class.c: augment MonoClassField with more info.
23607 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
23608 policy and load a field's RVA if needed.
23610 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
23612 * class.c (mono_class_metadata_init): create a trampoline for all
23613 virtual functions instead of actually compiling them.
23615 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
23617 * class.h, class.c: include name in MonoClassField.
23618 * class.c: fix fundamental type of System.Object and System.String.
23619 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
23621 * icall.c: remove internalcalls for the Reflection stuff that is now
23623 * loader.c: mono_field_from_memberref () implementation.
23624 * mono-endian.c: thinko (s/struct/union/g).
23625 * object.c, object.h: make the mono_string_* prototypes actually use
23626 MonoString instead of MonoObject.
23627 * reflection.c, reflection.h: updates for changes in the reflection
23628 code in corlib: we use C structures that map to the actual C# classes.
23629 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
23630 fat method header if needed and use the info from the ILGenerator for
23631 methods. Handle fields in types. Misc fixes.
23633 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
23635 * class.c (mono_class_metadata_init): bug fix: always allocate
23636 space for static class data
23638 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
23640 * class.c (mono_compute_relative_numbering): use relative
23641 numbering to support fast runtime type checks.
23643 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
23645 * class.c (mono_class_create_from_typeref): added debugging output
23646 to print class name when MonoDummy is returned instead of real class
23648 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
23650 * class.c (mono_class_metadata_init): interface offset table now
23651 contains pointers into the vtable - this is more efficient for the jit
23653 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
23655 * class.c (mono_class_metadata_init): use a temporary vtable (the
23656 old algorithm only worked for the interpreter, but not for the jit)
23658 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
23660 * loader.c (method_from_memberref): use mono_class_get to get the
23661 class of an array instead of using System.Array directly.
23662 (mono_get_method): also add MEMBERREF methods to the method cache
23663 which usefull for arrays.
23665 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
23667 * pedump.c (arch_compile_method): added to compute vtable entry
23669 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
23670 number of interfaces.
23672 * class.h: merged MonoArrayClass into MonoClass
23674 * class.c (mono_class_create_from_typedef): compute the vtable size and
23675 allocate space to include the vtable inside MonoClass
23676 (mono_class_metadata_init): initialize the vtable
23678 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
23680 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
23681 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
23682 * image.c: endian fixes by Laurent Rioux.
23683 * object.h, object.c: rename MonoStringObject to MonoString and
23684 MonoArrayObject to MonoArray. Change some function names to conform to
23685 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
23686 guint16* as first argument, so don't use char*.
23687 Provide macros to do the interesting things on arrays in a portable way.
23688 * threads-pthread.c: updates for the API changes and #include <sched.h>
23689 (required for sched_yield()).
23690 * icall.c: updates for the API changes above.
23691 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
23692 platforms that need them.
23694 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
23696 * class.c: set the correct type for all the fundamental
23697 type when loading the class.
23699 2001-10-05 Dick Porter <dick@ximian.com>
23701 * threads-pthread.c (pthread_mutex_timedlock): Simple
23702 compatibility version for C libraries that lack this call.
23704 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23706 * class.c: MonoTypes stored in MonoClass are stored as
23707 fundamental MonoTypes when the class represents a
23708 fundamental type (System.Int32, ...).
23709 The TypeHandle return by ldtoken is a MonoType*.
23710 * icall.c: ves_icall_get_data_chunk () write out all the
23711 PE/COFF stuff. Implement ves_icall_define_method (),
23712 ves_icall_set_method_body (), ves_icall_type_from_handle ().
23713 * image.c: properly skip unknown streams.
23714 * loader.h, loader.c: add type_class to mono_defaults.
23715 * metadata.c, metadata.h: export compute_size () as
23716 mono_metadata_compute_size () with a better interface.
23717 Typo and C&P fixes.
23718 * pedump.c: don't try to print the entry point RVA if there is no entry point.
23719 * reflection.c, reflection.h: many cleanups, fixes, output method
23720 signatures and headers, typedef and typeref info, compress the metadata
23721 tables, output all the heap streams, cli header etc.
23722 * row-indexes.h: typo fixes.
23724 2001-10-04 Dick Porter <dick@ximian.com>
23726 * object.h: Add a synchronisation mutex struct to MonoObject
23728 * object.c (mono_new_object): Initialise the object
23729 synchronisation mutexes
23731 * icall.c: System.Threading.Monitor internal calls
23733 * threads-pthread.h:
23734 * threads-pthread.c: System.Threading.Monitor internal calls
23736 * threads-types.h: New file, includes the system-specific thread
23739 * threads-pthread-types.h:
23740 * threads-pthread-types.c: New files, handle pthread-specific
23741 synchronisation types
23743 * threads-dummy-types.h:
23744 * threads-dummy-types.c: New files of dummy support for
23745 thread-specific types
23749 * pedump.c: include mono-endian.h not endian.h
23751 * Makefile.am: More threads files.
23752 Name mono-endian.h not endian.h
23754 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
23756 * Makefile.am, reflection.h, reflection.c: move here the reflection related
23757 stuff and implement a few more bits.
23758 * icall.c: a field needs to be dereferenced twice. Do not use the same
23759 name for two variables in the same scope.
23760 * image.c, image.h: cleanups.
23762 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
23764 * class.c (mono_class_metadata_init): bug fix: compute the right size
23766 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
23768 * icall.c: implemented some of the Reflection internalcalls.
23769 * image.c, image.h: start writing out the PE/COFF image.
23770 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
23771 that does the reverse than decode_blob_size ().
23772 * object.c: use mono_metadata_encode_value (). Move here
23773 temporary implementation of mono_string_to_utf8 ().
23774 * rawbuffer.c: make malloc_map static.
23776 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23778 * metadata.c: fix type comparison for arrays.
23779 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
23780 Added a couple of new classes to monodefaults.
23781 * icall.c: added a couple of Reflection-related internalcalls.
23782 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
23783 Added a byval_arg MonoType to MonoClass.
23785 2001-09-28 Dick Porter <dick@ximian.com>
23788 * threads-pthread.h:
23789 * threads-pthread.c: Implemented internal calls for
23790 LocalDataStoreSlot operations. Applied mutexes around all shared
23791 data. Reworked the thread creation and Start() operations to
23792 avoid a race condition.
23795 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
23797 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
23799 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
23801 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
23803 * class.c, loader.c: warn and return NULL instead of erroring out.
23804 * icall.c: added System.AppDomain::getCurDomain().
23805 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
23807 2001-09-25 Dick Porter <dick@ximian.com>
23809 * threads-pthread.h:
23810 * threads-pthread.c: Implemented timed thread joining and added
23811 System.Threading.Thread::Join_internal internal call
23813 * icall.c: Added System.Threading.Thread::Join_internal internal call
23816 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
23818 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
23820 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
23821 mono_string_intern () to implement the semantics of the ldstr opcode
23822 and the interning of System.Strings.
23823 * icall.c: provide hooks to make String::IsIntern and String::Intern
23826 2001-09-23 Dick Porter <dick@ximian.com>
23829 * threads-dummy.h: New files of dummy threading routines
23831 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
23832 support code based on system specifics
23834 Rename PTHREAD_LIBS to THREAD_LIBS
23836 2001-09-23 Dick Porter <dick@ximian.com>
23838 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
23839 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
23841 (mono_thread_init): Set up a Thread object instance to return when
23842 the main thread calls Thread.CurrentThread
23843 (mono_thread_cleanup): Wait for all subthreads to exit
23845 * icall.c: New internal calls for System.Threading.Thread::Sleep
23846 (including Schedule) and CurrentThread
23848 * threads.h: New file, to insulate thread-specific stuff from the
23851 2001-09-21 Dick Porter <dick@ximian.com>
23853 * threads-pthread.h:
23854 * threads-pthread.c: New file, for handling pthreads-style
23855 threading support. Start() now starts a new thread and executes
23856 the ThreadStart delegate instance.
23858 * icall.c: Added the internalcall for
23859 System.Threading.Thread::Start_internal
23861 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
23863 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
23865 * loader.c: work around the different signatures for delegates
23866 constructors csc generates in compiled code vs the ones compiled in mscorlib.
23868 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
23870 * class.h, class.c: add mono_class_get_field_from_name ().
23871 * *: Fix C comments and other ANSI C issues.
23873 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
23875 * endian.h, assembly.c: fix some endianness issues.
23877 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
23879 * loader.h, load.c: add delegate_class to mono_defaults.
23880 Handle runtime provided methods in mono_get_method ().
23882 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
23884 * loader.c (mono_get_method): use pinvoke for internal call
23886 * icall.c: use pinvoke for internal call
23888 * loader.c (method_from_memberref): set the method name
23890 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
23892 * metadata.c: help the compiler generate better code for
23893 mono_class_from_mono_type ().
23895 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
23897 * class.c (mono_class_metadata_init): delayed computing of the
23898 class size to mono_class_metadata_init ()
23900 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
23902 * class.c, class.h: add an interfaces member to MonoClass.
23903 * image.c, image.h: add assembly_name field to MonoImage
23904 from the assembly table.
23905 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
23907 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
23909 * class.c: Handle Array in mono_class_from_mono_type ().
23910 * metadata.c, pedump.c: some endian fixes.
23912 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
23914 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
23915 * metadata.c: fix small problem introduced with the latest commit.
23917 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
23919 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
23920 We don't need a MonoMetadata pointer anymore to compare signatures in
23921 mono_metadata_signature_equal (), update callers.
23922 Reduced memory usage an number of allocations for MonoMethodHeader and
23923 MonoMethodSignature.
23925 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
23927 * metadata.c: added compare for szarray.
23929 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
23931 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
23932 and add a couple more types to it and mono_defaults. Give an hint on
23933 classes that need implementing in our corlib and are referenced
23936 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
23938 * class.h, class.c: keep track if a class is also an Enum.
23939 * loader.c: Implement a couple more types for use in libffi
23940 marshalling. Gives better diagnostics when failing to dlopen
23941 a library. Set method->klass for P/Invoke methods, too.
23943 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
23945 * class.c, class.h: add a MonoType this_arg to MonoClass that
23946 represents a pointer to an object of the class' type that
23947 can be used by the interpreter and later the type cache.
23948 Add best guess alignment info for valuetype objects.
23950 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
23952 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
23953 into MonoType: one less level of indirection and allocation and
23954 simplifies quite a bit of code. Added cache for MonoTypes that are
23955 used frequently, so that we don't need to allocate them all the time.
23957 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
23959 * class.c (mono_class_create_from_typedef): System.Enum is also a
23960 value type, although it does not derive from System.ValueType
23961 (maybe a bug in the ms compiler?)
23963 * metadata.c (mono_type_size): return the right size for value types
23965 * loader.c (mono_get_method): only initialize method header if not abstract
23967 * class.c (mono_class_from_mono_type): use mono_default values.
23969 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
23971 * *: use MonoClass pointers instead of <type_tokens>
23973 * class.h: new flag: metadata_inited.
23975 * class.c (mono_class_metadata_init): impl.
23976 (mono_class_instance_size): impl.
23977 (mono_class_data_size): impl.
23979 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
23981 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
23982 MonoClass now has the name and name_space fields.
23983 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
23984 mono_get_method () takes and optional MonoClass as argument.
23985 Removed mono_typedef_from_name() and added mono_class_token_from_name()
23986 instead that takes advantage of a map from class names to typedef
23987 tokens in MonoImage.
23989 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
23991 * metadata.c: zero is not a valid alignment boundary.
23992 Merge MONO_TYPE_VOID in default decoding code.
23994 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
23996 * image.h: merged MonoMetadata into MonoImage
23998 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
23999 identify the type of elements.
24001 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
24003 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
24004 * cil-coff.h: split MonoMSDOSHeader and add size info.
24005 * image.c: add some consistency checks.
24006 * metadata.c: fix row size computation: one programmer
24007 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
24008 add explanation for the locator routine.
24009 Fix decoding of size in method header.
24011 2001-08-20 Miguel de Icaza <miguel@ximian.com>
24013 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
24014 (g_concat_dir_and_file): Bring g_concat_dir_and_file
24015 function from gnome-libs. This uses the right path separator
24016 based on the OS, and also works around a bug in some systems where
24017 a double slash is not allowed.
24018 (default_assembly_name_resolver): Use g_concat_dir_and_file
24019 (mono_assembly_open): ditto.
24021 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
24023 * metadata.c (mono_metadata_signature_equal): impl.
24025 * *: void is now a realy MonoType (instead of using NULL)
24027 * metadata.c (do_mono_metadata_parse_type): use
24028 mono_metadata_parse_type to parse void value.
24030 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
24032 * metadata.c, metadata.h: in the signature and method header store
24033 only the space required for holding the loca vars and incoming arguments.
24035 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
24037 * metadata.c (do_mono_metadata_parse_type): treat void like any
24038 other type (instead of assigning NULL);
24040 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
24042 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
24044 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
24046 * image.c (do_mono_image_open): added a cache for arrays.
24048 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24050 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
24051 decode a single column from a row in a metadata table and changes
24052 to take advantage of it in the typedef locator (gives a nice speed up).
24053 Store offset info for function params.
24055 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
24057 * image.h (MONO_IMAGE_IS_CORLIB): removed
24059 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
24061 * assembly.c: how could mono_assembly_close () had ever worked?
24062 * metadata.c, metadata.h: provide offset info for local vars.
24063 Implement mono_type_size () to take care of alignment as well
24064 as size (it was mono_field_type_size in cli/class.c before).
24066 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
24068 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
24070 * assembly.h (CORLIB_NAME): set to corlib.dll
24072 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
24074 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
24076 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
24077 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
24078 tokentype.h: massive namespace cleanup.
24080 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
24082 * metadata.h, metadata.c: decode exception clauses when parsing method header.
24084 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
24086 * metadata.c (mono_metadata_free_type): added check for type !=
24087 NULL (void) before calling mono_metadata_free_type()
24089 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
24091 * metadata.h, row_indexes.h: added header with enumerations to use
24092 to index in the columns from tables in metadata and to decode coded
24093 tokens: we should start using this instead of embedding magic numbers
24096 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
24098 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
24099 Move metadata_t info from cli_image_info_t to MonoImage, where
24100 it's easily accessible. Changed all the uses accordingly.
24101 Added the method and class caches to MonoImage.
24102 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
24103 and mono_metadata_decode_value () signature to be more consistent
24104 with the other parse functions (and simplify code). Taken advantage
24105 of zero-length array allocation with GCC. Removed reduntant (and
24106 wrong) MonoFieldType struct and use MonoParam instead. Changed
24107 mono_metadata_parse_field_type () to use common code for parsing.
24108 Added mono_metadata_typedef_from_field () and
24109 mono_metadata_typedef_from_method () to lookup a typedef index from a
24110 field or method token.
24111 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
24113 2001-07-23 Miguel de Icaza <miguel@ximian.com>
24115 * metadata.c (mono_metadata_parse_field_type): Implement.
24116 (do_mono_metadata_parse_type): Split engine from
24117 mono_metadata_parse_type, so that we can create smaller structures
24118 for things that just have one pointer to the MonoType (look at
24121 2001-07-20 Miguel de Icaza <miguel@ximian.com>
24123 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
24124 as Jan Gray found out, it is incorrect.
24126 2001-07-18 Miguel de Icaza <miguel@ximian.com>
24128 * assembly.c: Implement asssembly loading. This loads an image
24129 and loads all the referenced assemblies. Come to think of it, we
24130 could always do lazy loading of the assemblies.
24132 * image.c (mono_image_open): Keep loaded images in a hashtable.
24134 * image.h (MonoImage): Add reference count.
24136 2001-07-17 Miguel de Icaza <miguel@ximian.com>
24138 * assembly.c (mono_assembly_open): Keep track of the file name in
24139 case the assembly has no ASSEMBLY table.
24141 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
24144 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
24146 * metadata.c, metadata.h: decode local vars in method header
24147 parse function. Change callers accordingly.
24149 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
24151 * metadata.h, cil-coff.h: protect against multiple inclusion.
24152 Added some new structures to hold information decoded from metadata:
24153 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
24154 and relevant decoding/free functions.
24155 * metadata.c: implement decoding functions. Add warning for out of bounds
24156 index in mono_metadata_locate(). Implement mono_get_method () to retreive
24157 all the info about a method signature and invocation. Remove check on
24158 uninitialized local var in parse_mh() and fix memory leak.
24160 2001-07-12 Miguel de Icaza <miguel@ximian.com>
24162 * metadata.h: More macros.
24164 * tokentype.h: New file.
24166 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
24168 * assembly.c: added a consistency check and initialize
24169 some structures with g_new0().
24170 * metadata.c: fixed a couple more bugs in table size computation
24171 and add other checks for out-of bound access to metadata.
24173 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
24175 * metatada.c: fix bugs computing table sizes. Spew a
24176 warning when index in string heap is out of bounds.
24178 2001-07-04 Miguel de Icaza <miguel@ximian.com>
24180 * metadata.h: Add a couple of macros to manipulate tokens.
24182 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
24184 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
24185 cli_section_tables).
24187 2001-07-01 Miguel de Icaza <miguel@ximian.com>
24189 * metadata.c (mono_metadata_user_string): New function, provides
24190 access to the UserString heap.
24192 2001-06-27 Miguel de Icaza <miguel@ximian.com>
24194 * metadata.c: Add inline documentation.
24196 2001-06-26 Miguel de Icaza <miguel@ximian.com>
24198 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
24201 2001-06-22 Miguel de Icaza <miguel@ximian.com>
24203 * typeattr.h: New file, TypeAttribute flags.
24205 2001-06-21 Miguel de Icaza <miguel@ximian.com>
24207 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
24208 mono_assembly_ensure_section): Section loading code.
24209 (load_section_tables): Load the sections.
24211 * mono/metadata/metadata.c (mono_metadata_locate_token,
24212 mono_metadata_locate): Functions to locate the information
24213 definition given a token or a table and an index.
24214 (mono_metadata_compute_table_bases): New.
24215 (compute_size): New function to compute the sizes of the various
24218 * mono/metadata/metadata.h: Finish listing the different index
24221 * mono/metadata/pedump.c: Improve to dump new information.
24223 2001-06-19 Miguel de Icaza <miguel@ximian.com>
24225 * mono/metadata/metadata.c: Entered all the tables matching
24228 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2