2009-09-25 Rolf Bjarne Kvinge <RKvinge@novell.com>
[mono.git] / mono / metadata / ChangeLog
bloba825c2ea0a02fca23770875620960624f207517f
1 2009-09-25  Rolf Bjarne Kvinge  <RKvinge@novell.com>
3         * appdomain.c|h: Add a mono_domain_try_unload method which is
4         equivalent to mono_domain_unload, except that it returns an exception
5         instead of throwing it. Make mono_domain_unload use the
6         mono_domain_try_unload method to avoid code-duplication.
8 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
10         * debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
11         a problem.
13 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
15         * marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
16         aborting when a conversion is not implemented.
18 2009-09-23  Miguel de Icaza  <miguel@novell.com>
20         * verify.c: when comparing culture strings, use g_ascii_strcmp
22         * assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
23         when comparing public key tokens to use memcmp on 16 bytes.   I do
24         not believe this ever worked as advertised in the past.
26         The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
27         which would have always failed earlier.
29 2009-06-25  Miguel de Icaza  <miguel@novell.com>
31         * gc.c: Raise a NullArgumentException if the object passed is
32         null.
34 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
36         * image.c (mono_image_close): Atomically decrement the reference count and
37         remove the image from the hash tables, to prevent another thread from seeing a
38         dying MonoImage. Fixes #541194.
40 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
42         * threadpool.c: actually use the minimum number of 'completion ports'
43         (for us is just a potential worker thread).
45 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
47         * threadpool.c: remove ares_htable. It does not make sense any more
48         since the same objects are now stored in GC-tracked arrays while they are
49         in the queue.
51 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
53         * threadpool.c: increase the minimum length of the queues to 128.
54         Remove warning.
56 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
58         * marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
59         return the modified signature used by string ctors.
61 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
63         * marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
64         to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
65         method, to be used by full-aot.
67 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
69         Since the runtime supports lazy initialization of a type's vtable and this can cause a type
70         to fail, we need to ensure that the vtable is properly initialized at spots were the type must
71         be known to be good.
73         * class.c (mono_class_init): Fail array types if their element type fails initialization
74         as well.
76         * object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
77         initialization, additionally we request the element_type vtable to be initialized as well.
79         This is fine and should not increase the working set in any meaningful way since it's reasonable
80         to assume       that most code will create an array and eventually populate it, which will require the
81         type's vtable to be initialized.
83         * loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.
85 2009-09-17  Atsushi Enomoto  <atsushi@ximian.com>
87         * normalization-tables.h : regenerated.
89 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
91         * mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
92         a leb128 encoding can take up to 5 bytes.
94 2009-09-15  Rodrigo Kumpera  <rkumpera@novell.com>
96         * class.c (verify_class_overrides): Remove useless argument.
98         * class.c (mono_class_setup_vtable_general): Move the overrides check to happen
99         before interface enumeration as this is no longer required.
101 2009-09-15  Rodrigo Kumpera  <rkumpera@novell.com>
103         * class.c: New function mono_class_is_assignable_from_slow that is safe to be
104         used under mono_class_init context. This functions avoid any code path that
105         calls mono_class_init, which leads it to be slow as some things like the interface
106         bitmap are not available.
108         * class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
109         of it's own broken version. Fixes the verifier part of #538588.
111         * class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
112         API.
114 2009-09-15  Mark Probst  <mark.probst@gmail.com>
116         * class.c (mono_class_init): Always set an exception in a class if
117         vtable setup fails.  Fixes #538577.
119         * generic-sharing.c: Raise an exception if mono_class_vtable()
120         returns NULL.
122 2009-09-13  Zoltan Varga  <vargaz@gmail.com>
124         * marshal.c (mono_marshal_get_runtime_invoke): Don't share instance 
125         methods of vtypes, as they could be incorrectly shared with static methods
126         taking an IntPtr argument.
128 2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
130         * domain.c:
131         * object.c:
132         * class-internals.h: renamed waithandle_class to
133         manualresetevent_class.
134         * marshal.c: propagate the exception if a remoting BeginInvoke call
135         fails.
137 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
139         * object.c: Properly handle vtable failures.
141 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
143         * socket-io.c: Assert on vtable failure.
145         * mono-mlist.c: Assert on vtable failure.
147 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
149         * marshal.c: Assert on vtable failure.
151 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
153         * icall.c: Properly handle vtable failures.
155 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
157         * debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.
159 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
161         * cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.
163         * console-unix.c (do_console_cancel_event): Same.
165 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
167         * class-internals.h: Add mono_class_vtable_full function that allows control
168         if an exception should be raised or not.
170         * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
171         to do what its documentation say, that is to return NULL and set exception_type on
172         failure.
174         * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
175         and change the code to honor it.
177 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
179         * verify.c: Fix typo in error message.
181 2009-09-10  Sebastien Pouliot  <sebastien@ximian.com>
183         * security-core-clr.c: Fix default_platform_check so it can run
184         the runtime coreclr tests (without an infinite recursion when
185         throwing an exception).
187 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
189         object.c (mono_delegate_ctor_with_method): Guard against null method.
191 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
193         * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
194         that should be replaced with error handling later.
196 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
198         * marshal.c (mono_delegate_end_invoke): Fix warning.
200 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
202         * loader.c (mono_field_from_token): Properly handle invalid
203         dynamic tokens.
205 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
207         * pedump.c (verify_image_file): Skip types that can't be
208         decoded.
210 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
212         * verify.c: Look for recursive valuetypes only against the
213         type been initialized as this is a lot simpler and works.
215 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
217         * verify.c: Ensure that fields are properly loaded before
218         checking them.
220 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
222         * object.c (mono_object_get_virtual_method) : Call 
223           mono_cominterop_get_invoke if the object is a COM object.
225         Code is contributed under MIT/X11 license.
227 2009-09-09  Rodrigo Kumpera  <rkumpera@novell.com>
229         * verify.c: Check for recursive valuetype definitions.
231 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
233         Use inheritance-aware interface offsets. Inherited types use the same offsets
234         of their parents. This reduce offset duplication in case more than one type in
235         the inheritance tree explicitly implements the same interface.
237         This also removes a source of vtable bubbles found in #532409. An abstract type
238         isn't required to provide abstract methods to all interfaces it implements, which
239         resulted in a bubble with the previous scheme as the child would get a non-full
240         vtable from its parent. We fail all concrete types with vtable bubbles, so this
241         should be fixed.
243         This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
244         it's expected to not cause any significant increase beyond that.
246         * class.c (setup_interface_offsets): Compute super class iface offsets
247         first to force sharing.
249         * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
250         dumping only the relevant ones.
252         * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
253         methods a new slot regardless if they belong to an interface or not. This allows
254         an inherited type to override the iface method separately from the class one.
256 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
258         * threadpool.c: make the Sleep() alertable to prevent delays exiting
259         applications that take less than 2s to execute.
260         Bug #524984 fixed.
262 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
264         * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
266         * object.c (mono_get_runtime_callbacks): New helper function to return
267         the runtime callbacks.
269         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
270         mono_get_runtime_build_info () as the display name.
271         
272 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
274         * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
275         argument, since NEWARR expects a native int. Fixes #481559.
277 2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>
279         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
280         against broken SRE methods.
282 2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>
284         * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
285         a NULL variable. Abort early on failure.
287 2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>
289         * class.c (can_access_type): Fail visibility test for non nested
290         types with nested visibility.
292 2009-09-02  Sebastien Pouliot  <sebastien@ximian.com>
294         * assembly.c (parse_public_key): Avoid allocating (and not 
295         freeing) the public key array when it's not requested by the 
296         caller.
297         * threads.c (mono_thread_manage, mono_thread_create_internal, 
298         ves_icall_System_Threading_Thread_Thread_internal): Free 
299         allocated memory on error.
301 2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
303         * icall.c, icall-def.h: Remove some dead code from early SRE changes.
305 2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
307         * class.c (mono_class_setup_fields): Remove duplicated local variable
308         named gklass.
309         Rename gklass to gtd to reflect the fact that it points to the generic
310         type definition.
311         Remove the duplicated call to mono_class_setup_fields on gtd and move
312         the error check to the beginning.
314 2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
316         * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
317         Remove cruft of the previous patch.
319 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
321         * metadata-verify.c (verify_method_table): Check for abstract + final.
322         Fixes #534175.
324 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
326         * verify.c (verify_class_fields): Check for duplicate fields.
328 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
330         * metadata-verify.c: Verify the typeref table for duplicates.
332 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
334         This reverts r140936 and properly handles interfaces with static methods. The
335         right fix is to ensure vtables without bubles which is an easier to verify
336         constraint. We should avoid such special cases as of the reverted patch as those
337         only make the runtime more brittle.
339         * class.c (mono_class_setup_vtable_general): Revert previous change that handle
340         static methods on interfaces.
342         * class.c (setup_interface_offsets): Use the number of virtual methods when
343         calculating interface offsets instead of the number of methods. This way we
344         avoid bubles on the layout.
346 2009-08-31  Rodrigo Kumpera  <rkumpera@novell.com>
348         * metadata-verify.c (verify_metadata_header): Some very smart
349         obfuscators like to add extra stream headers. Ignore them.
351 2009-08-30  Zoltan Varga  <vargaz@gmail.com>
353         * class.c (mono_class_setup_vtable_general): Verify interfaces with static
354         methods correctly.
356 2009-08-29  Rodrigo Kumpera  <rkumpera@novell.com>
358         * metadata-verify.c: Verify for duplicated types.
360 2009-08-28  Rodrigo Kumpera  <rkumpera@novell.com>
362         * metadata-verify.c (verify_typedef_table): Verify for nested types
363         without an entry on the nested class table.
365 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
367         * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
368         <tom_hindle@sil.org>. Add locking around hash table accesses.
370 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
372         * verify.c (mono_verifier_verify_class): Verify all interface if
373         really are interfaces. Fixes #534184.
375 2009-08-27  Rodrigo Kumpera  <rkumpera@novell.com>
377         * pedump.c: Initialize all types during metadata validation so we report
378         errors only detected as part of class initialization.
380 2009-08-26  Rodrigo Kumpera  <rkumpera@novell.com>
382         * metadata-verify.c (verify_method_table): PInvoke requires method to
383         be static. Fixes #534189
385 2009-08-26  Zoltan Varga  <vargaz@gmail.com>
387         * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
388         being NULL.
390 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
392         * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
393         for holes or bad methods. Fixes #525314.
395 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
397         * class.c (setup_interface_offsets): Don't allocate slot
398         for the same interface multiple times. This creates bubbles
399         that waster space and make vtable verification harder.
401         The same interface get a slot multiple times since we need
402         to get the closure of all implemented interfaces, which means
403         the same interface is reported multiple times.
405 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
407         * verify.c (mono_verifier_verify_class): Don't check the fields
408         of generic instances since the context on which they got expanded
409         might lead to false positives.
411         Such thing happens when a generic type is inflated in the context
412         of a generic method and the inflated type of a field turns into a
413         generic method argument, which causes the checking code to think
414         it's an invalid class when it's not.
416 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
418         * verify.c (mono_type_is_valid_in_context): Verify if type
419         is NULL and remove duplicate test.
421 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
423         * verify.c (mono_verifier_verify_class): Check fields for
424         invalid generic arguments.
426 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
428         * class.c (verify_class_overrides): Verify if for static
429         and non virtual methods.
431 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
433         * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
434         Check for errors after retrieving the vtable.
436 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
438         * class.c (mono_class_setup_vtable_general): Verify
439         if method overrides are valid before processing them.
441 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
443         * marshal.c (mono_array_to_lparray): Fix minimal build with
444         cominterop disabled.
446         * marshal.c (mono_free_lparray): Same.
448 2009-08-21  Mark Probst  <mark.probst@gmail.com>
450         * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
451         the hash function for the ares_htable.
453 2009-08-20  Rodrigo Kumpera  <rkumpera@novell.com>
455         * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
456         bit for assembly flags. MS is ok with it but there is no spec anywhere
457         on its mean
459 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
461         * class.c (mono_class_create_from_typedef): Emit profiler events
462         in all cases.
464 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
466         * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
467         Release memory on failure.
469 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
471         * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
472         to the internal API.
474         * metadata.c (get_constraints): Use a single-linked table as we don't
475         traverse it backward. Fail and return FALSE if only of the contraint types
476         is not found.
478         * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
479         to mono_metadata_load_generic_param_constraints except for having a return value.
480         This has to be done since the later is part of the public API.
482         * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
483         and fail the type.
485         * loader.c (mono_get_method_from_token): Properly check the loading of constraints
486         and fail the method.
488 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
490         * metadata-verify.c (is_valid_method_header): Add work-around to deal
491         with MS broken behavior of emmitting EH section sizes without the
492         header size added.
494 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
496         * metadata.c (mono_type_create_from_typespec): Don't allocate image
497         memory until we're sure that we'll need it. This avoids leaking for
498         broken types or duplicated instantiation.
500 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
502         * metadata-verify.c (is_valid_method_header): Fix stupid formating
503         mistake.
505 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
507         * metadata-verify.c (is_valid_method_header): Fix number of clauses
508         and expected size calculation.
510 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
512         * class.c (mono_class_get_field_idx): Add fixme for broken
513         behavior for types with multiple fields with the same name.
514         I would rather fix it, but have no idea on how to generate
515         such artifact for testing.
517 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
519         * verify.c (verifier_load_field): We should allow references to
520         fields to be made using the generic type definition. It's up to
521         the loader system to fail invalid ops.
523         * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
524         are invalid.
526 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
528         * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
530         * metadata-internals.h: Fix declaration of 
531         mono_metadata_interfaces_from_typedef_full.
533         * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
534         heap_alloc_result parameter that controls if the result should be
535         g_malloc'd.
537         * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
538         array be g_malloc'd and properly document this public API function.
540 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
542         * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
543         remove METHOD_HEADER_TINY_FORMAT1.
545         * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
547         * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
549         Both spec and MS uses only 2 bits to enumerate the kind of header.
550         So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
551         is superfluous, only used for tiny headers with odd code lengths.
553         This change also make sure that mono doesn't wronly interpret bit 2
554         of fat header flags, which is currently reserved.
556 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
558         * metadata.c (do_mono_metadata_parse_type): Do error
559         checking for element types. Don't abort if presented
560         with a broken type kind.
562 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
564         * metadata.c (mono_metadata_parse_method_signature_full):
565         Gracefully fail bad vararg signatures.
567 2009-08-18  Christian Hergert  <chris@dronelabs.com>
569         * profiler.c:
570         * class.c: Fix warnings for uninitialized variables.
572 2009-08-18  Christian Hergert  <chris@dronelabs.com>
574         * icall.c: Fix _NSGetEnviron method declaration warning.
576 2009-08-18  Christian Hergert  <chris@dronelabs.com>
578         * icall.c:
579         * reflection.c: Make bitwise checks explicit.
581 2009-08-18  Christian Hergert  <chris@dronelabs.com>
583         * debug-helpers.c:
584         * marshal.c: Fix printf warnings.
586 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
588         * reflection.c (encode_cattr_value): Fix a warning.
590 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
592         * metadata.c (mono_metadata_parse_array_full): Fix memory leak
593         of array bounds.
595 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
597         * loader.c (mono_method_signature): Don't assert on broken
598         signature. Print a more useful error message.
600 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
602         * loader.c (mono_method_get_marshal_info): Assert if
603         signature is invalid. Bounds check stores to the
604         mspecs array;
606 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
608         * loader.c (field_from_memberref): Fix warning.
610 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
612         * loader.c (mono_method_get_param_names): Check if signature
613         is null. Don't store beyond the size of the name array.
615 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
617         * loader.c (mono_get_method_constrained): Check if signature
618         is null.
620 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
622         * loader.c (mono_loader_set_error_bad_image): Improve
623         error messages.
625 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
627         * loader.c (mono_get_method_full): Convert an assertion
628         into a loader error.
630 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
632         * class-internals.h, class.c: Better naming and documentation.
634 2009-08-17  Zoltan Varga  <vargaz@gmail.com>
636         * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
637         obj is NULL.
639 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
641         * loader.c (mono_method_get_signature_full): Fail gracefully if signature
642         parsing fails.
644 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
646         * loader.c (mono_loader_error_prepare_exception): Handle missing field
647         errors with no class set.
649         * loader.c (field_from_memberref): If the field signature is of the wrong
650         type fail with a MissingFieldException instead of a BadImageException as
651         this is the behavior observed on MS. 
653 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
655         * loader.c (field_from_memberref): Don't crash if either the field
656         signature or the typespec class are invalid.
658 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
660         * verify.c (verifier_load_field): Don't allow field related
661         ops to reference fields on generic type definition.
663 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
665         * metadata-verify.c: Add new warning level for errors specified
666         by ECMA 335 but that MS ignores.
668         * metadata-verify.c (verify_method_table): Make compiler controled
669         visibility + (rt)specialname error a warning as MS ignores this. Ignoring
670         this check is safe because the end result will only be some visibility
671         exceptions been thrown.
673 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
675         * verify.c (get_boxable_mono_type): Don't allow the
676         use of the generic type definition on boxed type positions.
678         Fixes #531237.
680 2009-08-14  Mark Probst  <mark.probst@gmail.com>
682         * threadpool.c: Make sure no cross-domain references remain in
683         ares_htable or the arrays that are thrown away when resizing.
685 2009-08-14  Mark Probst  <mark.probst@gmail.com>
687         * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
688         list of classes for which we have to unregister reflection_info
689         with the GC and which are not in the namespace cache.
691         * reflection.c (mono_reflection_initialize_generic_parameter): Add
692         the class to the list.
694 2009-08-14  Mark Probst  <mark.probst@gmail.com>
696         * domain.c (mono_domain_free): Unregister the GC roots in
697         MonoDomain.
699 2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>
701         * reflection.c (mono_reflection_type_get_handle): Fix typo.
703 2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>
705         * class.c: Add mono_class_get_field_from_name_full which does
706         the same as mono_class_get_field_from_name but does check field
707         signature as well.
709         * class-internals.h: Export mono_class_get_field_from_name_full as
710         part of the internal API.
712         * loader.c (field_from_memberref): Search fields by name and signature
713         as it's valid to have two fields with same name but different types.
715         Fixes #528055.
717 2009-08-10  Rodrigo Kumpera  <rkumpera@novell.com>
719         * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
721         * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
723         * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
724         System.Type.
726 2009-08-13  Zoltan Varga  <vargaz@gmail.com>
728         * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
730         * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
732 2009-08-12  Mark Probst  <mark.probst@gmail.com>
734         * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
735         to sgen-scan-object.h, which can be included and parameterized via
736         macros.
738         * Makefile.am: sgen-scan-object.h added.
740 2009-08-12  Mark Probst  <mark.probst@gmail.com>
742         * gc.c: #define GC_dont_gc if we're compiling with SGen.
744 2009-08-12  Mark Probst  <mark.probst@gmail.com>
746         * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
747         before clearing a domain in the GC.
749 2009-08-12  Mark Probst  <mark.probst@gmail.com>
751         * exception.c (mono_exception_from_name_domain): Actually create
752         the exception in the specified domain.
754         * appdomain.c (mono_domain_create_appdomain_internal): Create the
755         OutOfMemoryException a bit later so that the domain is inialized
756         "enough" that it works.
758 2009-08-12  Mark Probst  <mark.probst@gmail.com>
760         * threads.c (thread_cleanup): Clean up the cached_culture_info
761         array to prevent cross-domain references.
763 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
765         * metadata.c: more documentation for MonoType accessors.
767 2009-08-11  Raja R Harinath  <harinath@hurrynot.org>
769         Fix incorrect size definitions where the tail array isn't a list
770         of pointers
771         * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
772         define size.
773         * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
774         * metadata.h (MONO_SIZEOF_TYPE): Likewise.
775         * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
777 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
779         * reflection.h:
780         * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
782 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
784         * metadata.c:
785         * loader.c:
786         * metadata-internals.h:
787         * method-builder.c:
788         * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
790 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
792         * cominterop.c:
793         * metadata.c:
794         * metadata.h:
795         * loader.c:
796         * marshal.c:
797         * reflection.c: #define for sizeof in MonoType and
798         MonoMethodSignature.
800 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
802         * domain.c:
803         * domain-internals.h: add and use #define's instead of sizeof()
804         for MonoJitInfo and MonoJitInfoTable.
806 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
808         * object.c:
809         * class.h: use #define instead of sizeof() for MonoRemoteClass.
811 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
813         * metadata.c:
814         * metadata.h:
815         * object.c:
816         * class-internals.h:
817         * generic-sharing.c:
818         * marshal.c: use a #define instead of sizeof() for a few
819         structures that use a zero-length array.
821 2009-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
823         * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
824         to handle inflated generic methods.
826         * appdomain.c: Bump corlib version.
828         * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
829         instances.
831         * reflection.c (fixup_method): Same
833         * reflection.c (resolve_object): Same.
835         * reflection.c (inflate_method): Replace a g_assert_not_reached with a
836         g_error and a decent message.
838 2009-08-06  Massimiliano Mantione  <massi@ximian.com>
840         * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
841         from the object because it could not yet be available globally
842         (it happens if the profiler tries to create a gchandle on the
843         MonoThread object of a thread that is still registering itself
844         with the runtime).
846 2009-08-04  Rodrigo Kumpera  <rkumpera@novell.com>
848         * reflection.c (mono_generic_class_get_object): Initialized the
849         managed type arguments array.
851         * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
853         * appdomain.c: Bump corlib version.
855 2009-08-04  Zoltan Varga  <vargaz@gmail.com>
857         * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
858         #527902.
860 2009-08-03  Zoltan Varga  <vargaz@gmail.com>
862         * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
863         Avoid a crash if synch_cs is not set.
864         
865         * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
866         Handle the case when the handle is 0.
868         * appdomain.c: Bump corlib version.
870 2009-08-02  Zoltan Varga  <vargaz@gmail.com>
872         * reflection.c (mono_type_get_object): Fix a warning.
874 2009-08-01  Mark Probst  <mark.probst@gmail.com>
876         * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
877         descriptor here.  We assume it's already been computed.
879         * generic-sharing.c (instantiate_other_info): Compute the GC
880         descriptor for info type MONO_RGCTX_INFO_KLASS.
882 2009-08-01  Mark Probst  <mark.probst@gmail.com>
884         * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
885         type, so don't use MONO_OBJECT_SETREF to set a field.
887 2009-08-01  Mark Probst  <mark.probst@gmail.com>
889         * gc.c: We were missing one case where invoking a finalizer would
890         not reset the domain.  Also, in the finalizer thread loop, assert
891         that we're in the root domain.
893 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
895         * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
896         if the type is not an array.
898 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
900         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
901         method bound to the declaring type of the method. Raise an exception
902         if the type is not a generic param.
904 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
906         * class.c (print_unimplemented_interface_method_info): Print the
907         full type name.
909         * class.c (mono_class_setup_vtable_general): When dealing with a
910         generic instance first check if the generic type definition is
911         not broken.
913 2009-02-11 Tom Hindke <tom_hindle@sil.org>
915         * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
917         * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
919         * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
921         * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
923         * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
925         Code is contributed under MIT/X11 license
927 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
929         * verify.c: Fix naming of stelem and ldelem.
931 2009-07-30  Mark Probst  <mark.probst@gmail.com>
933         * generic-sharing.c: Replace the templates lock with the loader
934         lock because of very hard to resolve deadlock issues.
936 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
938         * icall.c (ves_icall_Type_GetMethodsByName): Use 
939         mono_class_get_vtable_size () instead of accessing klass->vtable_size
940         directly. Fixes #525338.
942         * class.c (mono_class_get_vtable_size): New helper function.
944         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
945         the field belongs to the type. Fixes #525733.
947 2009-07-30  Mark Probst  <mark.probst@gmail.com>
949         * sgen-gc.c: When we stop a thread and its stack top is not within
950         its allocated stack (because it's in an altstack signal handler),
951         restart it and stop it again, until it is.
953 2009-07-30  Mark Probst  <mark.probst@gmail.com>
955         * sgen-gc.c: Take a thread's stack top and registers from the
956         sigcontext in the suspend signal handler.
958         * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
959         stuff to sgen-archdep.h.
961         * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
962         caller, because have code in sgen-archdep.h to acquire that data.
964 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
966         * profiler.c, profiler.h, profiler-private.h:
967         Added support for keeping track of code chunks and buffers.
969 2009-07-29 Rodrigo Kumpera  <rkumpera@novell.com>
971         * metadata-verify.c: Fix endianness problems on decoding functions.
972         Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
974 2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
976         * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
977         schema for vectors and one dimension SZARRAY.
979 2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
981         * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
982         schema for vectors and one dimension SZARRAY.
984 2009-07-27  Mark Probst  <mark.probst@gmail.com>
986         * icall-def.h, thread-types.h, threads.c: New separate icalls for
987         Interlocked.(Compare)Exchange with object arguments, which invoke
988         write barriers.
990 2009-07-26  Miguel de Icaza  <miguel@novell.com>
992         * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
993         passed invalid arguments.   Fixes another crasher in the
994         Silverlight test suite.
996         * class.c (mono_class_array_element_size): Return 0 for the size
997         of the class;  This fixes the crasher exposed by :
999         typeof (void).MakeArrayType ();
1001         * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
1002         if there is no method to dereference.    Put all the code that
1003         depends on this inside the if (method) block.
1005         This fixes the crasher exposed by Microsoft's Silvelright CLR test
1006         suite  ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
1008         With this change, we pass the test.
1009         
1010         * reflection.c (mono_reflection_sighelper_get_signature_local):
1011         Only dereference the assembly if it has been set.    Fixes a
1012         crasher exposed by #525328
1014 2009-07-25  Mark Probst  <mark.probst@gmail.com>
1016         * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
1017         don't perform the store in mono_gc_wbarrier_generic_nostore().
1018         Remove the second argument (value), which is not needed.
1020 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
1022         * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
1023         the build.
1025         * boehm-gc.c: Ditto.
1026         
1027 2009-07-24  Mark Probst  <mark.probst@gmail.com>
1029         * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
1030         not perform the store itself.  Introduce
1031         mono_gc_wbarrier_generic_nostore(), which is the same as
1032         mono_gc_wbarrier_generic_store(), except it doesn't perform the
1033         store.
1035 2009-07-24  Mark Probst  <mark.probst@gmail.com>
1037         * icall.c (ves_icall_System_Array_SetGenericValueImpl):
1038         mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
1039         we still need the memcpy().
1041 2009-07-22  Mark Probst  <mark.probst@gmail.com>
1043         * sgen-gc.c: Align array bounds calculation to mono_array_size_t
1044         so that big arrays are handled correctly.  Always use
1045         safe_object_get_size() to calculate array object sizes, which
1046         takes bounds into account.
1048 2009-07-22  Mark Probst  <mark.probst@gmail.com>
1050         * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
1051         GC descriptor is computed before we use it.
1053 2009-07-22  Mark Probst  <mark.probst@gmail.com>
1055         * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
1056         write barrier if necessary.
1058 2009-07-22  Mark Probst  <mark.probst@gmail.com>
1060         * icall-def.h, icall.c, thread-types.h: New separate icall for
1061         VolatileWrite(object&,object) that uses a write barrier.
1063         * console-unix.c, file-io.c, icall.c, threads.c: Use write
1064         barriers in icalls which write to "ref" or "out" arguments.
1066 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
1068         * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
1069         handler in a separate icall, to reduce the size of the wrappers.
1071 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
1073         * metadata-verify.c (is_valid_typespec_blob): Fix error message.
1075 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
1077         * metadata-verify.c (parse_field): Allow byref field.
1079         * metadata-verify.c (parse_locals_signature): Allow byref locals.
1081         * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
1083 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
1085         * verify.c (do_cast): Fail for any non reference type that isn't boxed.
1086         Fixes #522784.
1088 2009-07-20  Robert Jordan  <robertj@gmx.net>
1090         * cominterop.c (cominterop_get_managed_wrapper_adjusted):
1091         Fix invalid IL in valuetype handling (STOBJ must push the
1092         corresponding class). Fixes bug #523149.
1094         Code is contributed under MIT/X11 license.
1096 2009-07-20  Geoff Norton  <gnorton@novell.com>
1098         * gc.c: Use proper semaphores where available on posix and darwin.
1100 2009-07-19  Geoff Norton  <gnorton@novell.com>
1102         * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
1104 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
1106         * refletion.c (is_sre_usertype): Change name to is_usertype and
1107         invert it's result so it returns true if the type is an user type
1108         and not the opposite.
1110         * reflection.c (is_*_type): Change all of those to use new macro
1111         check_corlib_type_cached that cached the type lookup so we don't
1112         need to do string comparisons all the type. Changed the signature
1113         to take a MonoClass instead.
1115         * reflection.c: Change mono_image_create_token and resolve_object
1116         to use is_sre_* functions.
1118 2009-07-18  Mark Probst  <mark.probst@gmail.com>
1120         * sgen-gc.c: Check for writes to the stack in the managed
1121         wbarrier as well.
1123 2009-07-18  Mark Probst  <mark.probst@gmail.com>
1125         * sgen-gc.c: When a thread is unregistered, don't free its remsets
1126         but put them on a list which is processed with the other thread's
1127         remsets.
1129 2009-07-18  Mark Probst  <mark.probst@gmail.com>
1131         * sgen-gc.c: Fix and enable the internal allocator instead of
1132         using malloc/free (which causes deadlocks).
1134 2009-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
1136         * refletion.c: Fix builds with SRE disabled by adding a minimal
1137         implementation of mono_reflection_type_get_handle.
1139 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
1141         * refletion.c: Make mono_reflection_type_get_handle non static.
1143         * object-internals.h: Export mono_reflection_type_get_handle.
1145         * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
1146         unmanaged handle using mono_reflection_type_get_handle.
1148 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
1150         * refletion.c: Replace all reads of MonoReflectionType::type with
1151         calls to mono_reflection_type_get_handle. Only the functions that
1152         deal with constructing TypeBuilder::type have not been changed
1153         because they have to deal with NULL values.
1155         This is a first step into supporting reflection types that don't
1156         map directly into their unmanaged counterpart.
1158 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
1160         * metadata-verify.c (parse_locals_signature): Don't complain
1161         on signature with zero locals since MS generates it and doesn't
1162         bother with.
1164 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
1166         * reflection.c (mono_image_get_array_token): Resolve return
1167         type using mono_reflection_type_get_handle.
1169         * reflection.c (mono_image_get_array_token): Resolve array method
1170         parent type using mono_reflection_type_get_handle.
1172 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
1174         * reflection.c (mono_image_basic_init): Applied patch from
1175         <Dax@daxxfiles.net>. Set the public key token from the assembly
1176         builder. Fixes #518909.
1178         * appdomain.c: Bump corlib version.
1180 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
1182         * class.c (mono_class_needs_cctor_run): Make this return false if
1183         the class has no cctor.
1185 2009-07-13  Mark Probst  <mark.probst@gmail.com>
1187         * sgen-gc.c: When the minor GC needs to allocate a new section,
1188         invoke the major GC afterwards.
1190 2009-07-14  Bill Holmes  <billholmes54@gmail.com>
1192         * process.c  (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
1193           Applying the window_style field to the SHELLEXECUTEINFO struct.
1195         Code is contributed under MIT/X11 license.
1197 2009-07-13  Mark Probst  <mark.probst@gmail.com>
1199         * sgen-gc.c: Fix the race condition in the unmanaged allocator by
1200         locking earlier.  Fix it in the managed allocator by making sure
1201         that no thread is stopped there before the GC runs.  If we do stop
1202         a thread there, we restart it and let it run a but, until it stops
1203         somewhere else.
1205         * gc-internal.h, gc.c: Function for getting the IP from a signal
1206         context via a function registered by mini.
1208 2009-07-11  Zoltan Varga  <vargaz@gmail.com>
1210         * object-internals.h (MonoIntPtr): New structure describing a boxed
1211         IntPtr.
1213         * object.c (mono_runtime_invoke_array): Handle ptr arguments and
1214         returns. Fixes #519953.
1216         * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
1218 2009-07-09  Mark Probst  <mark.probst@gmail.com>
1220         * class-internals.h, generic-sharing.c: New RGCTX info type for
1221         getting a remoting invoke with check wrapper.
1223 2009-07-07  Geoff Norton  <gnorton@novell.com>
1225         * icall-def.h: Fix the enable-minimal build.
1227 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
1229         * object-internals.h: Add MonoReflectionDerivedType.
1231         * reflection.c: Implement support for PointerType.
1232         Fixed tons of warnings.
1234 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
1236         * object-internals.h: Add MonoReflectionByRefType.
1238         * reflection.c: Implement support for ByRefType.
1240 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
1242         * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
1244         * object-internals.h: Add MonoReflectionArrayType and
1245         mono_reflection_create_unmanaged_type.
1247         * reflection.c: Implement support for ArrayType.
1249 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
1251         * metadata-verify.c (is_valid_method_header): Parse EH block
1252         flags correctly.
1254 2009-07-03  Mark Probst  <mark.probst@gmail.com>
1256         * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
1257         processing the disappearing links, and process disappearing links
1258         in a loop until no new objects are copied.
1260 2009-07-03  Mark Probst  <mark.probst@gmail.com>
1262         * object.c (handle_enum): Invoke the write barrier when copying
1263         value type instances.
1265         * sgen-gc.c: Register remsets for unmanaged write barriers only
1266         when the address written to is actually on the heap.  This makes
1267         set_value() in object.c work without requiring that the result be
1268         on the heap.
1270 2009-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
1272         The runtime wrappers are all bound to a given type that must
1273         exist in the same image. For regular images we use the <Module>
1274         type, which is required to exist for all images.
1276         The <Module> type can't be used for dynamic images because it
1277         might not exist at the time the wrapper is required, so we create
1278         a synthetic type to use instead.
1280         The current code works because of the 2 stage setup of MonoClass,
1281         but once this is gone it will no longer work.
1283         * icall-def.h: Add ModuleBuilder::set_wrappers_type.
1285         * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
1287         * object-internals.h: Export mono_image_set_wrappers_type icall
1288         as part of the internal API.
1290         * marshal.c (get_wrapper_target_class): If the image is dynamic,
1291         use MonoDynamicImage::wrappers_type instead of the <Module> type.
1293         reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
1294         image wrappers_type to the provided value.
1296 2009-07-01 Rodrigo Kumpera  <rkumpera@novell.com>
1298         * appdomain.c (deregister_reflection_info_roots): No need
1299         to use the image lock here.
1301 2009-07-02  Mark Probst  <mark.probst@gmail.com>
1303         * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
1305 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
1307         * threads.c: Store the thread start argument in a hash table instead of
1308         registering it as a root, as libgc doesn't support unregistering roots
1309         under windows, leading to 'too many root sets' errors when many threads
1310         are created.
1312         * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
1313         shutdown, they can still be referenced by the other dying objects.
1314         Fixes #514506.
1316 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
1318         * socket-io.c: DontLinger does not allow LingerOptions.
1320 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
1322         * metadata-verify.c: The spec doesn't mention that it's possible to add
1323         custom attribute to a generic parameter. Fixed.
1325 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
1327         * class.c (inflate_generic_type): Don't crash while trying to output a message
1328         on why we're aborting.
1330 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1332         * socket-io.c: DontLinger can take an int or a boolean too.
1334 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
1336         * gc.c: check for a null argument to SuppressFinalize () and
1337         ReRegisterForFinalize ().
1339 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
1341         * loader.c (method_from_methodspec): Call into the verifier to check
1342         the signature.
1344         * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
1346         * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
1347         part of the internal API.
1349 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1351         * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
1352         the signature.
1354         * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
1356         * verify-internals.h: Export mono_verifier_verify_typespec_signature as
1357         part of the internal API.
1359 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1361         * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
1362         the signature.
1364         * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
1365         blob verification.
1367         * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1368         part of the internal API.
1370 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1372         * metadata-verify.c: Use is_valid_blob_object to verify blob validity
1373         when doing basic verification. 
1375         This check must be done since the runtime peeks into signatures in much
1376         more places than it does decoding so it makes sense to ensure that all
1377         pointers to blob objects are well formed.
1379 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1381         * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
1382         Use proper overflow dectection. Fix usage of it.
1384 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1386         * loader.c (field_from_memberref): Call into the verifier to check
1387         the signature.
1389         * loader.c (mono_method_get_signature_full): Same.
1391         * loader.c (method_from_memberref): Same.
1393         * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
1395         * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1396         part of the internal API.
1398 2009-06-25  Mark Probst  <mark.probst@gmail.com>
1400         * threadpool.c (mono_thread_pool_add): If the domain is unloading
1401         or unloaded, still return an AsyncResult, but don't add it to the
1402         threadpool.
1404 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1406         * threads.c: fix missing colon when DEBUG is defined.
1408 2009-06-25  Mark Probst  <mark.probst@gmail.com>
1410         * threadpool.c: Don't add new calls to a threadpool if the domain
1411         of the call is unloading or unloaded.  When dequeuing a job, null
1412         the reference in the queue.
1414 2009-06-25  Mark Probst  <mark.probst@gmail.com>
1416         * sgen-gc.c (null_link_in_range): Add the dislink for the old
1417         generation if an object was moved.
1419 2009-06-25  Sylvain Dupont <duposyl@gmail.com>
1421         * cominterop.h cominterop.c marshal.c: Added support for marshalling out 
1422           parameters of type SAFEARRAY[VARIANT].
1424         * reflection.c (encode_marshal_blob): Properly generate element type
1425           (SafeArraySubType marshal attribute option).
1427         Code is contributed under MIT/X11 license.
1429 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
1431         * reflection.c: in mono_method_clear_object () really ensure all the
1432         objects are removed.
1434 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1436         * loader.c (mono_method_signature): Call into the verifier to check
1437         the method signature.
1439         * metadata-verify.c (verify_method_table): Move signature verification
1440         to verify_method_table_full.
1442         * metadata-verify.c: Add mono_verifier_verify_method_signature.
1444         * verify-internals.h: Export mono_verifier_verify_method_signature as
1445         part of the internal API.
1447 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1449         * loader.c (mono_method_get_header): Call into the verifier to
1450         check the method header.
1452         * metadata-verify.c: Add mono_verifier_verify_method_header.
1454         * verify-internals.h: Export mono_verifier_verify_method_header as
1455         part of the internal API.
1457 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1459         * class.c (mono_class_find_enum_basetype): Call into the verifier to
1460         check the field signature. Replace an assert with an explicit check.
1462         * class.c (mono_class_setup_fields): Call into the verifier to check
1463         the field signature.
1465         * metadata-verify.c: Add mono_verifier_verify_field_signature.
1467         * verify-internals.h: Export mono_verifier_verify_field_signature as
1468         part of the internal API.
1470 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1472         * class.c (mono_class_find_enum_basetype): Simplify this function
1473         by moving code outside of the loop and not decoding static fields.
1475 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1477         * metadata-verify.c (verify_typedef_table): Check the extends
1478         token here. Move to here a flags check from verify_typedef_table_full.
1480 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
1482         * metadata-verify.c (is_valid_method_header): Fix a warning.
1484         * metadata-internals.h (MonoImage): Remove the unused 
1485         static_rgctx_invoke_wrapper_cache.
1487         * image.c marshal.c: Ditto.
1489 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
1491         * image.c (do_mono_image_load): Enable table data verification.
1493 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
1495         * metadata-verify.c (is_valid_constant): Fix nullref check.
1497 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
1499         * metadata-verify.c (is_valid_constant): Fix string bounds check.
1501 2009-06-22  Mark Probst  <mark.probst@gmail.com>
1503         * sgen-gc.c: Managed allocation with pthreads TLS.
1505         * threads.c, threads-types.h: Functions for the JIT to tell the
1506         runtime whether it supports the MONO_TLS opcode.
1508 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
1510         * metadata-verify.c (verify_param_table): Fix a crash for assemblies
1511         without methods.
1513 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
1515         * metadata-verify.c (is_valid_constant): Fix the string length check.
1516         Use safe overflow checking. Add decent error messages.
1518 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
1520         * metadata-verify.c: Move remaininh blob checks to the offline
1521         verification path.
1523 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
1525         * metadata-verify.c: Move more blob checks to the offline verification
1526         path.
1528 2009-06-22  Bill Holmes  <billholmes54@gmail.com>
1530         * object-internals.h : Adding interrupt_on_stop field.
1532         * threads.c (mono_thread_request_interruption) : On Windows exit the
1533           thread if interrupt_on_stop is set.
1535         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
1536          Removing old interrupt logic and setting the interrupt_on_stop for the
1537          thread when calling accept.
1539         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
1540          setting the interrupt_on_stop for the thread when calling accept.
1542         Contributed under MIT/X11 license.
1544 2009-06-20  Martin Baulig  <martin@ximian.com>
1546         * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
1548 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
1550         * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
1551         running in no-exec mode.
1553 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1555         * metadata-verify.c (verify_method_table): Move header
1556         checking to verify_method_table_full.
1558         * metata-verify.c (mono_verifier_verify_full_table_data):
1559         Call verify_method_table_full.
1561 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1563         * metadata-verify.c (verify_field_table): Move signature
1564         checking to verify_field_table_full.
1566         * metata-verify.c (mono_verifier_verify_full_table_data):
1567         Call verify_field_table_full.
1569 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1571         * metadata-verify.c (verify_typedef_table): Move remaining
1572         stuff to verify_typedef_table_full.
1574 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1576         * metadata-verify.c: Kill is_corlib from VerifyContext.
1577         It is only used by the offline mode.
1578         So we better remove it from the runtime path.
1580 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1582         * metadata-verify.c: Add new mono_verifier_verify_full_table_data
1583         function that perform the offline metadata verification steps.
1585         * metadata-verify.c (verify_typedef_table): Move some checks to
1586         verify_typedef_table_full and make it been called by new function
1587         mono_verifier_verify_full_table_data.
1589         * pedump.c: Call mono_verifier_verify_full_table_data.
1591         * verify-internals.h: Export mono_verifier_verify_full_table_data as
1592         part of the internal API.
1594 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1596         * metadata-verify.c (typedef_is_system_object): Fix System.Object
1597         check.
1599         * metadata-verify.c (verify_implmap_table): Fix implmap invalid
1600         flags bits. SupportLastError was confused as bit 7 instead of 6.
1602         * metadata-verify.c (verify_implmap_table): Fix import scope verification
1603         to check against the module ref table instead of module.
1605         * metadata-verify.c (verify_implmap_table): Fix corlib check.
1607         * pedump.c: Call mono_image_load_names.
1609 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1611         * image.c: Extract mono_image_load_names from do_mono_image_load.
1613         * metadata-internals.h: Export mono_image_load_names as part of
1614         the internal API.
1615         
1616 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
1618         * metadata.c (mono_metadata_cleanup): Free the generic method cache
1619         first, as it could reference data in the other caches.
1621 2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>
1623         * metadata-verify.c: Finished with method header verification.
1625 2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>
1627         * metadata-verify.c: Added more header verification code.
1628         Now only EH clauses are missing.
1630 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
1632         * marshal.c (get_runtime_invoke_type): Don't share primitive types
1633         for return values.
1635 2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>
1637         * metadata-verify.c: Initial method header verification.
1639 2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>
1641         * metadata-verify.c (verify_import_table): The IAT contents
1642         might end been patched by the windows DL when running with
1643         coree enabled.
1645 2009-06-15 Rodrigo Kumpera  <rkumpera@novell.com>
1647         * class.c (mono_class_from_typeref): If the enclosing type is not
1648         found return null instead of crashing. Fixes #508487.
1650 2009-06-15  Atsushi Enomoto  <atsushi@ximian.com>
1652         * normalization-tables.h : updated to the latest unicode charcter
1653           data.
1654         * appdomain.c : bump corlib version.
1656 2009-06-14  Zoltan Varga  <vargaz@gmail.com>
1658         * class.c (mono_class_from_name): Fix support for assembly references
1659         in the EXPORTEDTYPE table. Fixes #511704.
1661 2009-06-13  Geoff Norton  <gnorton@novell.com>
1663         * domain.c: Ensure that mono_domain_assembly_open actually opens the
1664         assembly in the target domain.
1666 2009-06-12  Robert Jordan  <robertj@gmx.net>
1668         * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
1669         because "this" of the managed signature has become an
1670         ordinary parameter in the unmanaged signature.
1672 2009-06-12  Zoltan Varga  <vargaz@gmail.com>
1674         * class-internals.h (struct _MonoGenericContainer): Add an 'image'
1675         field for owner-less generic containers.
1677         * reflection.c (mono_reflection_initialize_generic_parameter): Set the
1678         image field of the owner-less generic containers created here.
1680         * metadata.c (mono_metadata_load_generic_params): Ditto, the
1681         contain is ownerless until the caller sets its owner.
1683         * metadata.c (type_in_image): Handle owner-less generic containers
1684         correctly.
1685         
1686 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
1688         * image.c (mono_image_close): Support debug_assembly_unload for
1689         dynamic images too.
1691 2009-06-11 Andrés G. Aragoneses  <aaragoneses@novell.com>
1693         * class.c: Fix some typos in comments.
1695 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
1697         * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
1699         * threads.c (mono_thread_execute_interruption): Avoid creating the
1700         abort exception object while holding the synch_cs lock.
1702 2009-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
1704         * metadata-verify.c: Verify basic cattr content.
1706 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
1708         * reflection.c (add_exported_type): Don't set the FORWARDER flag on
1709         nested types.
1710         
1711         * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
1712         support for nested types. Fixes #511704.
1714 2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
1716         * metadata-verify.c: Verify methodspec signatures.
1718 2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
1720         * metadata-verify.c: Verify typespec signatures.
1722 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
1724         * metadata.c (free_inflated_method): Call 
1725         mono_marshal_free_inflated_wrappers (), which was missed earlier.
1727 2009-06-08  Miguel de Icaza  <miguel@novell.com>
1729         * mono-config.c: Small change to report the PPC64/ILP32 model.
1731 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
1733         * metadata-verify.c (parse_type): Check szarray.
1735 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
1737         * metadata-verify.c (parse_type): Check fnptr.
1739 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
1741         * metadata-verify.c (parse_type): Check generic instances.
1743 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
1745         * metadata-verify.c (parse_type): Check array shape.
1747 2009-06-05  Robert Jordan  <robertj@gmx.net>
1749         * class.c (mono_class_create_from_typedef): Check only for
1750         mscorlib's System.Array.
1752 2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
1754         * metadata-verify.c (parse_type): Check pointer, class/valuetype
1755         and generic params. 
1757         * metadata-verify.c (parse_field): Check the signature.
1759 2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
1761         * metadata-verify.c: Implement locals signature check.
1763 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1765         * domain.c: Add .NET 4.0 Beta 1 version.
1767 2009-06-04  Bill Holmes  <billholmes54@gmail.com>
1769         * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
1770           For QueryInterface on CCWs consider the base class
1771           interfaces as well.
1773         Code is contributed under MIT/X11 license.
1775 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
1777         * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
1779         * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
1780         used.
1782         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
1783         adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
1785         * generic-sharing.c (inflate_other_data): Ditto.
1786         
1787 2009-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
1789         * metadata-verify.c: Implement property signature check.
1791 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1793         * sgen-gc.h: Register saving support for PPC.
1795 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1797         * sgen-gc.c: Fixed a pthread TLS screwup.
1799 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1801         * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
1802         supported.
1804 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1806         * sgen-gc.c: Disable TLA and managed allocation if the __thread
1807         keyword is not supported.
1809 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
1811         * marshal.c metadata.c: Applied patch from Ulrich Weigand 
1812         <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
1813         the inflated method is freed. Fixes #508389.
1815         The code is contributed under the MIT/X11 license.
1816         
1817 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
1819         * marshal.c (get_wrapper_target_class): New helper function.
1820         (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
1821         the <Module> class of the image. Fixes #509049.
1823 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1825         * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
1826         Check if the thread was interrupted and proccess it straight away.
1827         Makes abortion much more responsive.
1829 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1831         * threads.c (mono_thread_execute_interruption): Use atomic cas with
1832         MonoThread::interruption_requested to match it's counterpart.
1834         Fixes a hang in abort-stress-1 on a 2 core x86.
1836         * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
1837         Fix warning.
1839 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1841         Change MonoImage::name_cache to be protected by the image lock
1842         instead of the loader lock.
1844         * appdomain.c (deregister_reflection_info_roots): Protect access
1845         to name_cache.
1847         * class.c (mono_image_init_name_cache): Change from the loader lock
1848         to the image lock. Check if the cache wasn't already created.
1850         * class.c: Change from the loader to the image lock.
1852         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
1853         the code to hold the image lock while iterating over name_cache and
1854         not go into mono_array_new holding it.
1856         * metadata-internals.h: Add a comment about this change.
1858 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1860         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1861         Under the 2.0 profile raise the loader error.
1863         Fixes #508532.
1865 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1867         * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
1868         of ldind opcode for generic instances so we don't fail for direct wrappers.
1869         This only affect direct calls.
1871 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1873         * reflection.c (create_dynamic_mono_image): Fix warnings.
1875         * generic-sharing.c (other_info_equal): Ditto.
1876         
1877 2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
1879         * metadata-verify.c: Implement field signature check.
1881 2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
1883         * metadata-verify.c: Implement standalone signature check.
1885 2009-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
1887         * metadata-verify.c: Implement methodref signature check.
1889 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
1891         * object-internals.h (MonoRuntimeCallbacks): New structure containing
1892         callbacks supplied by the runtime.
1894         * object.c (mono_install_callbacks): New internal function to install
1895         the callbacks.
1897         * object.c (mono_create_ftnptr): Move the implementation of this to
1898         mini/.
1900         * object.c (mono_get_addr_from_ftnptr): Ditto.  
1902 2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
1904         * metadata-verify.c (parse_return_type): Proper byref check.
1905         * metadata-verify.c (is_valid_method_signature): Check for zero arity
1906         generic signatures and method params.
1908 2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
1910         * metadata-verify.c (decode_signature_header): Fix bounds check.
1912         * metadata-verify.c (parse_custom_mods): Check custom mods.
1914         * metadata-verify.c (parse_type): Do initial basic verification
1915         of valid values.
1916         
1917         * metadata-verify.c (is_valid_method_signature): Parse the generic
1918         param count.
1920 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
1922         * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
1923         discarded based on their most specific definition so we set the method_slots
1924         array before checking if the method is acceptable or not.
1926         Fixes #506757.
1928 2009-05-26  Mark Probst  <mark.probst@gmail.com>
1930         * icall.c: Free the old array when resizing a mono_ptr_array.
1932 2009-05-26  Mark Probst  <mark.probst@gmail.com>
1934         * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
1935         for the hashes whose keys are managed objects.
1937 2009-05-26  Mark Probst  <mark.probst@gmail.com>
1939         * object-internals.h, threads.c: Set the execution context on
1940         thread start here, not in corlib.
1942         * appdomain.c: Bump corlib version.
1944 2009-05-27  Martin Baulig  <martin@ximian.com>
1946         * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
1947         if `_mono_debug_using_mono_debugger' is set to make things work
1948         properly when embedding Mono.
1950 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1952         * class.c (mono_class_setup_fields): Don't mark simd types as having
1953         16 bytes alignment as the whole runtime doesn't support.
1955 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1957         * metadata-verify.c (safe_read): Use endian safe read macros.
1959 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
1961         * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
1962         it is read-only when using full aot.
1964 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
1966         * metadata-verify.c (is_valid_method_signature): Verify parts
1967         of the return type. Provide an error message in case of failure.
1969 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
1971         * metadata-verify.c (is_valid_method_signature): Verify the call conv.
1973 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
1975         * metadata-verify.c: Include the size prefix in the bounds check.
1977 2009-05-22  Miguel de Icaza  <miguel@novell.com>
1979         * icall.c: Remove warnings.
1981         * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
1982         prevent auto-detection based on GCC defines.
1984         Add PS3
1986         * metadata-verify.c: Do not include signal.h
1988         * generic-sharing.c, marshal.c: Add returns to avoid some warning
1989         messages.  Not sure why the g_assert_not_reached is not enough to
1990         quiet the compiler.
1991         
1993         * appdomain.c: Remove code that is not used when
1994         DISABLE_SHADOW_COPY is set.
1996         * image.c: use g_getenv
1998 2009-05-21  Miguel de Icaza  <miguel@novell.com>
2000         * reflection.c: Remove code that it not used with
2001         DISABLE_REFLECTION_EMIT is defined.
2003 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
2005         * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
2006         invoke wrappers.
2008 2009-05-20  Miguel de Icaza  <miguel@novell.com>
2010         * socket-io.c
2011         (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
2012         the ifdef here and instead put that on io-layer
2014 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
2016         * metadata-verify.c: Verify the generic param constraint table.
2018 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
2020         * metadata-verify.c (verify_generic_param_table): Fix
2021         thinko on the valid flags bits for generic params.
2023 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
2025         * metadata-verify.c: Verify the methodspec table.
2027 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
2029         * metadata-verify.c: Verify the generic param table.
2031 2009-05-19  Mark Probst  <mark.probst@gmail.com>
2033         * sgen-gc.c: Store and use the count with REMSET_VTYPE.
2035 2009-05-19  Mark Probst  <mark.probst@gmail.com>
2037         * sgen-gc.c: Use generation enum more consistently and use the
2038         correct generation in mono_gc_register_for_finalization().
2040 2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
2042         * metadata-verify.c: Verify the nested class table.
2044 2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
2046         * metadata-verify.c: Verify the manifest resource table.
2048 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
2050         * debug-helpers.c (dis_one): Add little-endian support for ldstr.
2052 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
2054         * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
2055         wrappers, this is now done in the JIT.
2056         
2057         * class.c (mono_set_generic_sharing_supported): New internal function.
2058         (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
2060 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2062         * metadata-verify.c: Verify the exported type table.
2064 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2066         * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
2068 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2070         * metadata-verify.c: Verify the file table.
2072 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2074         * metadata-verify.c (verify_assembly_table): Fix an error message.
2076         * metadata-verify.c: Verify the assemblyref table.
2078 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
2080         * metadata-verify.c (verify_assembly_table): Fix the valid
2081         bits mask for flags.
2083 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
2085         * debug-helpers.c (mono_method_full_name): Print generic parameters of
2086         generic methods as well.
2088 2009-05-15  Geoff Norton  <gnorton@novell.com>
2090         * gc.c: MachO/Darwin supports and uses semaphores fine for this 
2091         use-case and is significantly more performant than the wapi layer.
2093 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
2095         * metadata-verify.c: Verify the assembly table.
2097 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
2099         * metadata-verify.c: Fix rows limit check.
2101 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
2103         * metadata-verify.c: Verify the fieldrva table.
2105 2009-05-13  Mark Probst  <mark.probst@gmail.com>
2107         * sgen.c: Speed up weak links and finalizers by grouping them by
2108         generation.
2110 2009-05-13  Mark Probst  <mark.probst@gmail.com>
2112         * marshal.c (delegate_hash_table_add): When overwriting an entry,
2113         free the old GCHandle (only applies to SGen).
2115 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
2117         * loader.c (mono_get_method_from_token): Avoid the expensive call to
2118         mono_metadata_load_generic_params () for non-generic methods.
2120 2009-05-12  Mark Probst  <mark.probst@gmail.com>
2122         * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
2123         New function for returning a monitor's weak link if it has one.
2125         * sgen-gc.c: Remove an object's monitor's weak link (if it has
2126         one) when clearing a domain.  These can still be around because
2127         the object might not have been collected.
2129 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
2131         * gc.c: Fix a warning.
2133 2009-05-12  Kornél Pál  <kornelpal@gmail.com>
2135         * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
2136         prevous wait that resulted in a deadlock on Windows when initializing
2137         the runtime form DllMain. Also results in improved startup time.
2138         (finalizer_thread): Get rid of thread_started_event.
2139         * threads.c, threads-types.h (mono_thread_create_internal): Return the
2140         resulting MonoThread.
2142         Contributed under MIT/X11 license.
2144 2009-05-11 Rodrigo Kumpera  <rkumpera@novell.com>
2146         * metadata-verify.c: Verify the implmap table.
2147         Don't require that #US and #Strings be present.
2149 2009-05-11  Sebastien Pouliot  <sebastien@ximian.com>
2151         * security-core-clr.c: Delegate checks are done at creation time,
2152         not a invocation time. Fix exception for Telerik Silverlight demo
2154 2009-05-11  Mark Probst  <mark.probst@gmail.com>
2156         * sgen-gc.c (need_remove_object_for_domain): Remove the special
2157         case for the Thread class.
2159         * threads.c: Do clean-up of abort exception/state in
2160         thread_cleanup() instead of Thread.free_internal().  Also clean up
2161         current_appcontext.  The reason we have to do that is because
2162         those references might point into another domain and if that
2163         domain is unloaded before the thread is finalized, they point to
2164         invalid data.
2166 2009-05-10  Andreas Faerber  <andreas.faerber@web.de>
2168         * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
2169         stub signatures.
2170         
2171         Contributed unter MIT/X11 license.
2173 2009-05-09  Miguel de Icaza  <miguel@novell.com>
2175         * verify.c, metadata-verifier.c: Add support for disabling the
2176         verifier in some builds.
2178         [ Sorry, my previous commit accidentally commited some work in
2179         progress ]
2181 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
2183         * class.c (mono_class_setup_fields): Set class->field.first for
2184         generic instances.
2186 2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>
2188         * metadata-verify.c: Verify the typespec table.
2190 2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>
2192         * metadata-verify.c: Verify the module table.
2194 2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
2196         * metadata-verify.c: Verify the methodimpl table.
2198 2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
2200         * metadata-verify.c: Verify the property table.
2202 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
2204         * debug-helpers.c (mono_method_desc_match): Add support for generic
2205         glob patterns.
2207 2009-05-05 Rodrigo Kumpera  <rkumpera@novell.com>
2209         * metadata-verify.c: Verify the propertymap table.
2211 2009-05-04 Rodrigo Kumpera  <rkumpera@novell.com>
2213         * metadata-verify.c: Verify the event table.
2215         * metadata-verify.c (search_sorted_table): Fix offset
2216         calculation.
2218 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
2220         * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
2222 2009-05-01  Mark Probst  <mark.probst@gmail.com>
2224         * gc.c (mono_gc_run_finalize): Don't set the domain too late,
2225         because mono_delegate_free_ftnptr() needs it.
2227 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2229         * metadata-verify.c: Verify the eventmap table.
2231 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2233         * metadata-verify.c: Verify the standalonesig table.
2235 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2237         * metadata-verify.c: Verify the field layout table.
2239 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2241         * class.c (mono_type_get_name_recurse): Don't crash
2242         for ownerless generic params.
2244         * debug-helpers.c (mono_type_get_desc): Correct the format
2245         for ownerless generic params.
2247 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2249         * metadata-verify.c: Verify the class layout table.
2251 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
2253         * metadata-verify.c: Verify the decl security table.
2255 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2257         * domain.c (mono_domain_set_internal_with_options): Don't do
2258         anything if the old domain is the same as the old one.  Fixes
2259         #499326.
2261 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2263         * appdomain.c: Deregister the reflection_info roots when unloading
2264         a domain.
2266         * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
2267         memory allocated by a domain and frees its disappearing links.
2269         * boehm-gc.c, null-gc.c: Empty implementation of
2270         mono_gc_clear_domain().
2272 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2274         * appdomain.c (clear_cached_vtable): Free the static fields memory
2275         block.
2277 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2279         * gc.c: Set the correct domain when invoking finalizers.
2281         * appdomain.c: Set the correct domain when creating threads.
2283 2009-04-30  Mark Probst  <mark.probst@gmail.com>
2285         * sgen-gc.c: Fix skip size for vectors.
2287 2009-05-03  Martin Baulig  <martin@ximian.com>
2289         * mono-debug-debugger.c
2290         (mono_debugger_check_breakpoints): Check class init handlers even
2291         if we don't have any method load handers.
2293 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
2295         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid 
2296         returning refonly assemblies if refonly is FALSE. Fixes #499013.
2298 2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>
2300         * metadata-verify.c: Verify the field marshal table.
2302 2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>
2304         * metadata-verify.c: Verify the custom attribute table.
2306 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2308         * metadata-verify.c: Verify the constant table.
2310 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2312         * metadata-verify.c: Verify the memberef table.
2314 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2316         * metadata-verify.c (get_coded_index_token): Remove
2317         dead argument.
2319 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2321         * metadata-verify.c: Verify the interfaceimpl table.
2323 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2325         * verify.c: Improve error message.
2327         * debug-helpers.c (mono_type_get_desc): Harden the code that
2328         deals with VAR and MVAR.
2330 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
2332         * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes 
2333         part of #498692.
2335 2009-04-23 Tom Hindle <tom_hindle@sil.org>
2337         * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
2338         changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
2340 2009-04-28  Sebastien Pouliot  <sebastien@ximian.com>
2342         * security-core-clr.c: Avoid redundant checks for platform code, 
2343         e.g. check for method and for class (very common) and check
2344         for class and outer class (less common)...
2346 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
2348         * reflection.c: Avoid returning random cattrs for synthetic methods.
2349         Fixes #498545.
2351 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2353         * assembly.c: assemblies in the GAC should never be shadow-copied.
2355 2009-04-26  Mark Probst  <mark.probst@gmail.com>
2357         * domain.c, domain-internals.h: Disable
2358         track_resurrection_{objects,handles}_hash in MonoDomain if using
2359         SGen.
2361 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2363         * metadata-verify.c: Verify the param table.
2365 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2367         * metadata-verify.c (verify_typedef_table): Range check FieldList and
2368         MethodList.
2370         * metadata-verify.c (verify_method_table): Proper check the ParamList
2371         field.
2373 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2375         * metadata-verify.c (verify_method_table): Check for runtime
2376         implemented functions such as delegate .ctors. Remove spurious
2377         printf.
2378         
2379 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2381         * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
2383 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2385         Don't allocate MonoGenericInfo for ownerless generic params.
2386         * class-internals.h (MonoGenericParam::info): Move field to ...
2387         (MonoGenericParamFull): ... this.  New struct.
2388         (MonoGenericContainer::type_params): Change type to
2389         MonoGenericParamFull.
2390         (MonoGenericParam, MonoGenericContainer): Update accessors.
2391         * metadata.c (mono_metadata_parse_generic_param): Don't initialize
2392         'info' field for ownerless generic param.
2393         (mono_metadata_load_generic_params): Update to changes.
2394         * reflection.c (mono_reflection_create_generic_class): Likewise.
2395         (reflection_methodbuilder_to_mono_method): Likewise.
2396         (mono_reflection_initialize_generic_parameter): Likewise.
2398 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2400         Don't use MonoGenericParamInfo for ownerless generic params.
2401         * class.c (get_anon_gparam_class, set_anon_gparam_class): New.  Don't
2402         use ParamInfo class at all.
2403         (mono_class_from_generic_parameter): Use them.
2404         (make_generic_param_class): Fix a couple of instances where 'pinfo
2405         == NULL' wasn't handle.
2407 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2409         * class.c (make_generic_param_class): Carve out of ...
2410         (mono_class_from_generic_parameter): ... here.
2412 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2414         Simplify mono_class_from_generic_parameter
2415         * class-internals.h (MonoGenericParamInfo::token): New field.
2416         * metadata.c (mono_metadata_load_generic_params): Initialize it
2417         from metadata.
2418         * class.c (mono_class_from_generic_parameter): Use it instead of
2419         searching through metadata.
2421 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
2423         * metadata-verify.c: Add verification of the method table.
2425 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
2427         * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
2428         Delegate::Invoke optimization.
2430 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
2432         * appdomain.c (mono_domain_create_appdomain_internal): Free the
2433         string returned by get_shadow_assembly_location_base.
2435         * appdomain.c (get_shadow_assembly_location_base): Add a comment
2436         about caller's ownership.
2438 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
2440         * reflection.c: Add mono_reflection_cleanup_domain to cleanup
2441         reflection memory on domain unload.
2443         * domain.c (mono_domain_free): Don't free refobject_hash, let the
2444         reflection cleanup code do it.
2446         * domain-internals.h: Add mono_reflection_cleanup_domain.
2448         This fixes a memory leak for managed mirrors of reflection objects
2449         on domain unload. 
2451 2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>
2453         * metadata-verify.c: Implement more verification of the field table.
2455 2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>
2457         * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
2458         doesn't try to parse the input assembly, which can be broken.
2460 2009-04-23  Mark Probst  <mark.probst@gmail.com>
2462         * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
2463         sgen-gc.c: Implement track resurrection in weak GC handles in SGen
2464         by using the lowest bit in the link to store whether the link is
2465         tracked.  Move the track_resurrection hashes into boehm-gc.c.
2467 2009-04-22  Miguel de Icaza  <miguel@novell.com>
2469         * Makefile.am: Split the console support in platform specific code
2470         and put together a framework for making this easy in the future so
2471         that we can start splitting code instead of having a mess of PLATFORM_WIN32
2473 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
2475         * pedump.c: Fix a warning.
2477 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
2479         * verify.c (mono_delegate_type_equal): Compare valuetypes using
2480         mono_class_from_mono_type to avoid bad interactions with the dual representation
2481         of the generic type definition.
2483 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
2485         * verify.c (do_invoke_method): Use mono_class_from_mono_type to
2486         get the MonoClass for the call context type as it might be a generic
2487         instance.
2489         Fixes #491483.
2491 2009-04-21  Mark Probst  <mark.probst@gmail.com>
2493         * object-internals.h: The Thread object has no execution_context
2494         member anymore.
2496         * threads.c, threadpool.c, threads-types.h: Accessor functions for
2497         the execution context.
2499         * appdomain.c: Bump corlib version.
2501 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2503         * verify.c (do_newobj): Improve error message.
2505 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2507         * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
2508         is nested in the filter block.
2510         * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
2511         block is not fully nested.
2513         Fixes #495656.
2515 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2517         * verify.c (verify_type_compatibility_full): Compare MonoClass and
2518         not MonoType to check for equality of valuetypes as the generic type
2519         definition allows for two different encodings: the generic type definition
2520         class or a generic instance over the GTD arguments.
2522         Fixes #496175.
2524 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2526         * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
2528         * verify.c (do_initobj): Improve error message.
2530 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2532         * metadata-verify.c: Enable pe verification as the issue with #496453
2533         is that the authenticode data directory have a different unspecified
2534         format. Ignore it for now.
2536         * pedump.c: Run the metadata verifier together with the IL verifier.
2538         Fixes ##496453.
2540 2009-04-20  Rolf Bjarne Kvinge  <RKvinge@novell.com>
2542         * metadata-verify.c: Temporarily disable pe verification due to #496453.
2544 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
2546         * class.c (can_access_type): Check visibility against
2547         the element type for pointers and arrays.
2549         Fixes #496150.
2551 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
2553         * metadata-verify.c: Fix cli and table verification to use information
2554         from the MonoImage. A lot of duplicated code got killed.
2556 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
2559         This patch starts to integrate the metadata verifier with the runtime code.
2561         This patch causes major regression in functionality for the metadata verifier
2562         as cli and table verification are disabled since they require to be ported to
2563         use MonoImage information.
2565         * image.c (do_mono_image_load): Split the code in this function
2566         into mono_image_load_pe_data and mono_image_load_cli_data.
2567         Add     care_about_pecoff parameter to not load pecoff data.
2568         Call into the metadata verifier for pecoff and cli verification.
2570         * image.c (mono_image_open_raw): New function that doesn't perform
2571         any parsing of the image contents.
2572         
2573         The reason for the 3 new functions is to give pedump better control
2574         into the interaction with the verifier.
2576         * metadata-internals.h: Add new functions from image.c as part of the
2577         internal mono API.
2579         * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
2580         mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
2581         to make those functions work together with the runtime.
2583         * verify.c: Add mono_verifier_is_enabled_for_image function that returns
2584         true if the image needs to be verified.
2586         * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
2588         * pedump.c: Use new metadata verifier API.
2590 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
2592         * object.c (mono_install_vtable_trampoline): Make this receive a
2593         trampoline creation function instead of trampoline, allowing the JIT
2594         to use a different trampoline for each vtable.
2596 2009-04-18  Mark Probst  <mark.probst@gmail.com>
2598         * object.c (mono_raise_exception): Don't reset the thread abort
2599         exception state here.
2601 2009-04-18  Mark Probst  <mark.probst@gmail.com>
2603         * icall-def.h: New icall for getting the thread abort exception
2604         state for a thread.
2606         * object.c, thread.c, object-internals.h: A thread's abort
2607         exception state is now a GC handle.  To get the object it stands
2608         for, we must move it into the current app domain, if it's
2609         different than the one where it originated from.
2611         * appdomain.c: Bump corlib version.
2613         * domain.c, domain-internals.h: New function for setting the
2614         domain and migrate the thread abort exception or not.
2616 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2618         * metadata-verify.c: Add initial verification of the
2619         field table.
2621 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2623         * metadata-verify.c: Add a macro to conditionally enable
2624         dumping of verification information. Add  make_coded_token
2625         and search_sorted_table to enable search sorted tables
2626         by a given coded token.
2628 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2630         * metadata-verify.c: Add array mapping from table index
2631         to description offset. Add get_col_offset and get_col_size
2632         functions.
2634 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2636         * metadata-verify.c: Add remaining table descriptions offsets.
2637         Add remaining coded index descriptions.
2639 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2641         * metadata-verify.c: Fixed constant table description.
2642         Fixed calculation of HasCustomAttribute coded index size.
2643         Fixed calculation of size for many table indexes. 
2645 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2647         * pedump.c (dump_metadata): Dump table offset instead
2648         of useless pointer in memory.
2650 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2652         * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
2654 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2656         * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
2657         a missing of for interface types.
2659 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2661         * metadata-verify.c (verify_pe_optional_header): Add comment of why
2662         the code is commented.
2664         * metadata-verify.c (verify_resources_table): Remove spurious printf
2665         and don't fail if there are unmanaged resources. Gmcs generates a useless
2666         one     for all assemblies - I bet it's some MS compatibility junk.
2668 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2670         * metadata-verify.c (verify_typedef_table): Verify the extends field.
2672         * metadata-verify.c (mono_image_verify): Add a is_corlib.
2674         * verify-internals.h: Same.
2676         * pedump.c: Fix for mono_image_verify new signature.
2678 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2680         * metadata-verify.c (verify_typedef_table): Verify for some invalid
2681         flags combinations.
2683 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2685         * metadata-verify.c (verify_module_table): Ignore the generation field.
2687 2009-04-15  Martin Baulig  <martin@ximian.com>
2689         * debug-mono-symfile.c
2690         (mono_debug_symfile_lookup_location): Don't print a warning for
2691         unknown extended opcodes if they're within 0x40 and 0x7f.
2693 2009-04-15  Zoltan Varga  <vargaz@gmail.com>
2695         * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
2696         invoke signatures returning an enum. Fixes #494847.
2698 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
2700         * metadata-verify.c: Initial code to verify the typedef table.
2702 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
2704         * verify.c (mono_method_verify): Don't fail if an unconditional branch
2705         with non empty stack happens before the beginning of a try block.
2707         Fixes #494812.
2709 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
2711         * metadata-verify.c: Verify typename and typenamespace fields of
2712         the typeref table.
2714 2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
2716         * metadata-verify.c: Initial code to verify the typeref table.
2718 2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
2720         * verify.c (verify_delegate_compatibility): Fix error message.
2722 2009-04-14  Sebastien Pouliot  <sebastien@ximian.com>
2724         * security-core-clr.c: Fix typo
2726 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
2728         * marshal.c (delegate_hash_table_add): Make delegate_target_locations 
2729         a MonoGHashTable to keep its values alive.
2730         (emit_marshal_boolean): Fix a warning.
2732 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
2734         * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
2735         not have any interface configured for IPv4/IPv6.
2737 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
2739         * assembly.c: fix typo in error message.
2741 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
2743         * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
2744         allocating the location holding the this argument to prevent
2745         'too many root sets' errors.
2747         * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
2748         to mark fields as special static.
2749         (mono_field_static_get_value): Handle special static fields.
2750         (mono_field_static_set_value): Ditto.
2752         * class-internals.h (struct _MonoClassField): Document this.
2754 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
2756         * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
2757           the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
2758           case.  This will handle when managed code returns null to native code.
2760         Code is contributed under MIT/X11 license.
2762 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
2764         * object.c (build_imt_slots): Changing a free to a g_free to match
2765           the g_malloc0 in add_imt_builder_entry that allocated this memory.
2767         Code is contributed under MIT/X11 license.
2769 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
2771         * marshal.c (emit_marshal_boolean): Adding code to ensure that
2772           the correct TRUE value is passed through the marshaling layer.
2774         Code is contributed under MIT/X11 license.
2776 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
2778         * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
2779         correctly. Fixes #492330.
2780         
2781         * marshal.c: Fix the embedding of object pointers into JITted code in
2782         the native-to-managed wrappers by allocating some GC tracked memory, and
2783         embedding the address of that.
2785 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
2787         * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
2788         pointers into the vtable.
2790 2009-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
2792         * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
2794         * verify.c (verify_ldftn_delegate): Improve error message.
2796 2009-04-09  Raja R Harinath  <harinath@hurrynot.org>
2798         * reflection.c (my_mono_class_from_mono_type): Remove.
2800 2009-04-09  Raja R Harinath  <harinath@hurrynot.org>
2802         Prepare to reduce memory usage of owner-less generic parameters (1/n)
2803         * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
2804         and constraints fields into ...
2805         (MonoGenericParamInfo): ... this.
2806         (mono_generic_param_info, mono_generic_container_get_param_info):
2807         New accessors.
2808         * class.c, debug-helpers.c, icall.c: Update to changes.
2809         * metadata.c, reflection.c, verify.c: Likewise.
2811 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
2813         * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
2815         * marshal.c (get_runtime_invoke_type): Share enums with their base types.
2816         
2817         * marshal.c (get_runtime_invoke_type): Share pointers with ints and
2818         booleans with sbytes.
2820 2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
2822         * class.c (can_access_instantiation): Verify accesibility of element types
2823         for arrays and pointers.
2825         * class.c (can_access_type): Return true if the target class is VAR or MVAR.
2827         * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
2829         Fixes #493068.
2831 2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
2833         * verify.c (do_invoke_method): Improve error messages.
2835 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
2837         * verify.c:  Fixing the MSVC build.
2839         Code is contributed under MIT/X11 license.
2841 2009-04-08  Sebastien Pouliot  <sebastien@ximian.com>
2843         * security-core-clr.c: Simplify get_reflection_caller not to call
2844         mono_method_get_last_managed (another stack walk) and adjust the
2845         callers to handle a (should not happen) NULL return value.
2847 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2849         Add accessors to some MonoGenericParam fields
2850         * class-internals.h (mono_generic_param_owner): New accessor.
2851         (mono_generic_param_num): Likewise.
2852         (mono_type_get_generic_param_owner): New helper.
2853         (mono_type_get_generic_param_num): New helper.
2854         * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
2856 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2858         * class-internals.h (mono_generic_container_get_param): New wrapper.
2859         * class.c, icall.c, metadata.c, verify.c: Use it.
2861 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2863         Fix gtest-252.cs
2864         * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
2865         the standard case/loop.  In particular, don't complain about
2866         references to generic type definitions.
2868 2009-04-07  Zoltan Varga  <vargaz@gmail.com>
2870         * debug-helpers.c (dis_one): Decode string arguments.
2872 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
2874         * pedump.c (dump_verify_info): Dump type name correctly.
2876 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
2878         * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
2879         are larger than code size.
2881         This can happen in valid code if the try/catch block is not followed by any instruction
2882         and do a backward branch on the leave instruction.
2884         Fixes #492494.
2886 2009-04-06  Sebastien Pouliot  <sebastien@ximian.com>
2888         * security-core-clr.c: Fix typo while comparing second method names
2889         in can_avoid_corlib_reflection_delegate_optimization
2891 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
2893         * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
2895         Fixes #487738.
2897 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
2899         * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
2900         a MVAR using a class context.
2902         Fixes #490335.
2904 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
2906         * object.c (mono_class_compute_gc_descriptor): Make this non-static.
2908         * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
2910         * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
2911         functions supplied by the JIT for the SGEN GC.
2913         * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
2914         
2915 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
2917         monitor.c (mono_monitor_try_enter_internal):
2918         Added calls to profile monitor contentions.
2919         Also duplicated a small piece of code (the "get the monitor" logic)
2920         from the fast path to the slow path, and changed the relevant goto
2921         statements, so that monitor acquisition events can be emitted from the
2922         slow path (this is by Paolo Molaro).
2924 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
2926         * profiler.c, profiler.h, profiler-private.h:
2927         Added support for profiling monitor contentions.
2929 2009-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
2931         * metadata-verify.c: Verify the modules table.
2933 2009-04-02 Rodrigo Kumpera  <rkumpera@novell.com>
2935         * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
2936         using the context of the method been verifier and not of the method been called.
2938         * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
2939         safely inflate generic types. 
2941 2009-04-02  Sebastien Pouliot  <sebastien@ximian.com>
2943         * security-core-clr.c: Change the strategy for checking the 
2944         "reflection using delegates optimization" to avoid unneeded 
2945         attributes in multiple class libraries.
2947 2009-04-02  Mark Probst  <mark.probst@gmail.com>
2949         * sgen-gc.c: Remove object element in the disappearing link struct
2950         by storing the object pointer in the link.
2952 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
2954         * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
2956 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
2958         * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
2960         * verify.c (mono_method_verify): Do proper bounds checking of exception
2961         clause ranges.
2963 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
2965         * loader.c (mono_field_from_token): Don't crash if the field parent could
2966         not be decoded.
2968 2009-03-31  Mark Probst  <mark.probst@gmail.com>
2970         * sgen-gc.c: Execute critical finalizers after ordinary
2971         finalizers.
2973         * class-internals.h, domain.c: Add CriticalFinalizerObject to
2974         mono_defaults.
2976 2009-03-31 Jb Evain <jbevain@novell.com>
2978         * verify.c (do_ldstr): don't check if a string is in the user strings
2979         heap if the current image is dynamic.
2981 2009-03-31  Mark Probst  <mark.probst@gmail.com>
2983         * sgen-gc.c: Wait until the last finalizer has executed when
2984         returning from WaitForPendingFinalizers.
2986 2009-03-31  Martin Baulig  <martin@ximian.com>
2988         * mono-debug-debugger.h (MonoDebuggerEvent): Add
2989         `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
2990         `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
2991         (mono_debugger_event_create_appdomain): New function.
2992         (mono_debugger_event_unload_appdomain): New function.
2994         * appdomain.c (mono_domain_create_appdomain_internal): Call
2995         mono_debugger_event_create_appdomain().
2997 2009-03-31  Martin Baulig  <martin@ximian.com>
2999         * mono-debug-debugger.c
3000         (mono_debugger_register_class_init_callback): Also register the
3001         class init callback if the class is already initialized to make
3002         things work with shadow copied assemblies.
3004 2009-03-31  Sebastien Pouliot  <sebastien@ximian.com>
3006         * security-core-clr.c
3007         (mono_security_core_clr_ensure_reflection_access_field): Let 
3008         critical code access the field (just like we do for methods). Use
3009         check_field_access helper.
3010         (mono_security_core_clr_ensure_reflection_access_method): Use 
3011         check_field_access helper.
3013 2009-03-31  Mark Probst  <mark.probst@gmail.com>
3015         * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
3016         call the run-finalize function directly.
3018         * gc.c, gc-internal.h: Make run_finalize() non-static.
3020 2009-03-31  Mark Probst  <mark.probst@gmail.com>
3022         * sgen-gc.c: Use a separate struct for disappearing links.
3024 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
3026         * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
3027         * MaxIOVectorLength enabled, just ignore them.
3028         Fixes bug #349688.
3030 2009-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
3032         * metadata-verify.c: Fix eglib build.
3034 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
3036         * threads-types.h: Fix the win32 build.
3038 2009-03-28  Sebastien Pouliot  <sebastien@ximian.com>
3040         * class.c: move coreclr inheritance/override checks to 
3041         security-core.clr.c
3042         * security-core.clr.c|h: add code from class.c with additional
3043         documentation. Fix override check when the method is not critical.
3045 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
3047         * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
3048         (match_class): Ditto.
3050 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
3052         * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
3054         * metadata-verify.c: Implement table layout row size calculation. Verify
3055         the total size of the tables.
3057 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
3059         * metadata-verify.c: Verify heap sizes and size to decode row counts. 
3061 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
3063         * appdomain.c:
3064         * console-io.[ch]: added new mono_console_init() to make sure that
3065         file descriptors 0, 1 and 2 are opened.
3066         Bug #489019 fixed.
3068 2009-03-27  Sebastien Pouliot  <sebastien@ximian.com> 
3070         * appdomain.h: Export a new callback type and a new function to
3071         set this callback. This allow a mono host to provide it's own
3072         definition for "platform code".
3073         * metadata-internals.h: Add a core_clr_platform_code flag on 
3074         _MonoImage to (cache and) know if it is representing platform 
3075         code.
3076         * image.c (do_mono_image_open): Set core_clr_platform_code flag 
3077         on platform code images.
3078         * security-core-clr.c|h 
3079         (mono_security_set_core_clr_platform_callback): Allow the host
3080         to provide it's own platform check definition.
3081         (mono_security_core_clr_determine_platform_image): Detect if an 
3082         image is platform code (using the specified callback).
3083         (mono_security_core_clr_is_platform_image): Return cached value 
3084         for platform code.
3086 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
3088         * threads.c (mono_create_thread): New helper function to wrap CreateThread
3089         which has different parameter types for the 'tid' argument in windows and
3090         the io-layer.
3092         * appdomain.c attach.c threads.c: Use the new helper.
3094 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
3096         * metadata-verify.c: Verify valid table bits.
3098 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
3100         * metadata-verify.c (verify_metadata_header): Store size in the size field.
3102         * metadata-verify.c: Add initial table schema verification.
3104 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
3106         * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
3107         obtain the refclass argument needed by mono_param_get_objects (). Fixes
3108         #488383.
3110         * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
3112         * appdomain.c (MONO_CORLIB_VERSION): Bump this.
3114 2009-03-26  Sebastien Pouliot  <sebastien@ximian.com>
3116         * security-core-clr.c: Add/update documentation
3118 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
3120         * marshal.c (emit_marshal_object): Generate code to throw an exception
3121         instead of throwing it. Fixes #488670.
3123 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com>
3125         * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
3126         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
3127         an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
3128         and add a call to mono_security_core_clr_ensure_delegate_creation
3129         to do the extra checks required by CoreCLR.
3130         * security-core-clr.c|h: Add function to check delegate creation,
3131         both in the binding and accessibility, under CoreCLR.
3133 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com> 
3135         * reflection.c (mono_reflection_create_dynamic_method): when 
3136         coreclr is enabled make sure that every resolved object are
3137         checked (e.g. field and method access).
3138         * security-core-clr.c|h: Add function to check objects resolved
3139         when a dynamic method is created.
3141 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
3143         * metadata-verify.c: Cache directory rva translations.
3145         * metadata-verify.c: Add cli-header and streams verification.
3147 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
3149         * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
3150         the wrong offset (8 instead of 6).
3152 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
3154         * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
3155         methods, return the native function address itself. Fixes
3156         #487758.
3158 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
3160         * console-io.c: some of the values for control characters might not be
3161         present.
3163 2009-03-21  Sebastien Pouliot  <sebastien@ximian.com>
3165         * exception.c|h: Add helpers to create [Field|Method]AccessException
3166         * icall.c: Add required coreclr check calls for field reflection.
3167         Move the existing (method) check logic into security-core-clr.c
3168         * security-core-clr.c: Add functions to check if the access of a
3169         field or method is allowed when reflecting under coreclr. This is
3170         mostly done using a stack walk to find the "real" caller: i.e. the
3171         code that is calling the reflection
3173 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
3175         * gc-internal.h: Change location of gc_wrapper.h
3177 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com> 
3179         * class.c: Simplification to coreclr checks for overrides that
3180         makes it easier to set breakpoints.
3182 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com>
3184         * security-core-clr.c|h: (mono_security_core_clr_class_level, 
3185         mono_security_core_clr_method_level): Avoid potential 
3186         MonoCustomAttrInfo allocation for transparent assemblies (e.g. 
3187         user/application code) and make it easier to set breakpoints
3189 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
3191         * metadata-verify.c: Reject cli header tables that mono don't handle.
3193 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
3195         * pedump.c: Fix CLI header dumping.
3197 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
3199         * metadata-verify.c: More CLI header verification.
3201 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
3203         * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
3205 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
3207         * metadata-verify.c: Initial verification of the CLI header.
3209 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
3211         * metadata-verify.c (verify_resources_table): Fix verification of zero
3212         sized resource section and id entries count.
3214 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
3216         * icall.c: Handle user types in many Type icalls. Fixes #486303.
3218 2009-03-17  Jb Evain  <jbevain@novell.com>
3220         * profiler.c: call mono_gc_base_init from mono_profiler_load.
3222 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
3224         * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
3225         (mono_gc_make_descr_for_array): Ditto.
3227 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
3229         * verify.c (mono_verifier_is_class_full_trust): Add support for
3230         CoreCLR security mode where trusted assemblies are defined as
3231         "platform code".
3233 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
3235         * metadata-verify.c: Add minimal PECOFF resource verification.
3237 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
3239         * metadata-verify.c: Be less restrictive with some coff fields.
3241 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
3243         * verify.c (init_stack_with_value_at_exception_boundary): Init generic
3244         params as boxed values on stack. Fixes #485706.
3246 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3248         * console-io.c: the termios values may vary in different flavors of unix.
3250 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
3252         * console-io.[ch]: return the entire set of control characters when
3253         initializing the terminal.
3254         * appdomain.c: bump corlib version.
3256 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
3258         * mono-perfcounters.c: added support for in-process custom
3259         performance counters.
3261 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
3263         * metadata-verify.c: Small cleanup and add comment for IAT directory entry. 
3265 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
3267         * metadata-verify.c: Verify the data pointed by the import table. 
3269 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
3271         * metadata-verify.c (load_data_directories): Store data
3272         directory contents.
3274         * metadata-verify.c: Verify the import table. 
3276 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
3278         * metadata-verify.c: Verify data directories.
3280 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
3282         * metadata-verify.c: Check section header flags.
3284 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
3286         * appdomain.c: if the assembly name is a shadow-copied file, return
3287         TRUE from mono_is_shadow_copy_enabled but don't actually do anything
3288         in mono_make_shadow_copy.
3289         * icall.c: if the assembly name is a shadow-copied file, replace it
3290         with the original assembly path.
3292         Bug #484244 fixed. NUnit tests for corlib can be run without
3293         --noshadow now.
3295 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
3297         * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
3298         entries when the table is reallocated.
3300         * icall.c: Allocate the memory used by the mono_ptr_array macros using
3301         mono_gc_alloc_fixed () since it contains GC refs.
3303 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
3305         * reflection.c (ensure_complete_type): New helper function to call
3306         type resolve handlers for unfinished dynamic types.
3307         (resolve_object): Call it for MonoClassFields. Fixes #483852.
3309 2009-03-09  Zoltan Varga  <vargaz@gmail.com>
3311         * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
3312         #483247.
3314 2009-03-08 Rodrigo Kumpera  <rkumpera@novell.com>
3316         * appdomain.c (get_shadow_assembly_location): Fix memleak.
3318 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
3320         * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
3321         between GCHandles of type WeakTrackResurrection and the objects they
3322         point to.
3324         * gc.c: Partly implement the sematics of GCHandles of type 
3325         WeakTrackResurrection: these handles should only be cleared after the
3326         finalizer of the object they are pointing to has ran.
3328 2009-03-06  Mark Probst  <mark.probst@gmail.com>
3330         * icall.c: Partially revert r126631 because using the jump
3331         trampolines for generic shared methods makes it superfluous.
3333 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
3335         * threads.c (handle_store): Create the 'threads' hash table with the proper
3336         MONO_HASH_VALUE_GC type.
3338 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
3340         * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
3341         FIRST_GC_TRACKED.
3343         * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
3344         and LAST_GC_TRACKED as a GC root.
3346         * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
3348         * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
3349         the static data even if it consists of 1 reference.
3351         * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
3352         if there is a GC descriptor.
3354         * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
3355         instead of through the GC since they contain no object references.
3357 2009-03-05  Mark Probst  <mark.probst@gmail.com>
3359         * generic-sharing.c (instantiate_other_info): Always return a jump
3360         trampoline for method code.
3362 2009-03-05  Marek Habersack  <mhabersack@novell.com>
3364         * culture-info-tables.h: generated to include the en-tt culture.
3366 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
3368         * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
3369         capture the thread context.
3371         * object.c (mono_async_result_new): Cache the invoke wrappers to
3372         ExecutionContext::Capture.
3374 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
3376         * marshal.h: Add a prototype for what mono_compile_method returns
3377         for invoke wrappers.
3379         * gc.c: Use the new prototype declaration.
3381 2009-03-04  Geoff Norton  <gnorton@novell.com>
3383         * boehm-gc.c: Add some MONO_LOG tracing for the GC
3384         * gc-internal.h:
3385         * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
3387 2009-03-04  Martin Baulig  <martin@ximian.com>
3389         * mono-debug.h
3390         (mono_debugger_runtime_invoke): Removed.
3392         * mono-debug-debugger.c
3393         (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
3395 2009-03-02  Martin Baulig  <martin@ximian.com>
3397         * mono-debug.h
3398         (mono_debugger_unhandled_exception): Removed.
3399         (mono_debugger_handle_exception): Removed.
3400         (mono_debugger_throw_exception): Removed.
3402         * mono-debug.c
3403         (mono_debug_debugger_version): Bump to 5.
3405         * mono-debug-debugger.c: Moved the exception handling code to
3406         ../mini/debug-mini.c
3408 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
3410         * domain-internals.h (struct _MonoDomain): Add a separate lock for the
3411         finalize_objects_hash.
3413         * gc.c: Use the separate lock to access the finalize_objects_hash field.
3414         
3415         * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
3416         field.
3418         * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
3419         cache.
3421         * image.c (mono_image_close): Free it.
3422         
3423         * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
3424         allowing a creation of a wrapper which invokes its method using a CALLVIRT
3425         on the this argument.
3427         * gc.c (run_finalize): Optimize the calling of the finalizers.
3429 2009-03-03  Martin Baulig  <martin@ximian.com>
3431         * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
3432         of the `MonoGenericInst' changes.
3434 2009-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
3436         * icall.c (ves_icall_MonoType_GetGenericArguments): Use
3437         mono_array_class_get_cached to reduce locking contention. Extract
3438         a domain var.
3440         * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
3441         intermediary managed arrays. Use caching version of mono_array_new
3442         to allocate the result array.
3444         * icall.c (ves_icall_Type_GetEvents_internal): Same.    
3446         * icall.c (ves_icall_Type_GetNestedTypes): Same.        
3448         * locales.c (create_names_array_idx):  Use mono_array_new_cached
3449         to reduce locking contention.
3451 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
3452                 
3453         * object.c (mono_method_add_generic_virtual_invocation): Put back the
3454         thunk builder code for the non-interface case.
3456 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
3458         * object.c (get_generic_virtual_entries): New helper function to collect
3459         the virtual generic method instances which need to be added to an IMT
3460         thunk.
3461         (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
3462         Instead of creating a new IMT thunk, reset the vtable slot to the
3463         trampoline, the thunk will be created the next time the trampoline is called.
3464         (build_imt_slots): Add support for virtual generic methods in interfaces by
3465         adding to the IMT thunk all the methods registered using 
3466         mono_method_add_generic_virtual_invocation ().
3468         * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
3469         (struct _MonoIMTCheckItem): Ditto.
3471         * object.c (mono_method_add_generic_virtual_invocation): Take a
3472         MonoMethod argument instead of a MonoGenericInst. Fix the construction of
3473         the IMT thunk to include all items.
3474         
3475         * object.c (mono_class_create_runtime_vtable): Add a missing
3476         mono_loader_unlock ().
3478 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
3480         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3482         * object-internals.h (MonoReflectionEvent): Add cached_add_event.
3484 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
3486         * object-internals.h: Rename _MonoReflectionEvent to
3487         MonoReflectionMonoEvent so it reflects the right managed type.
3488         Add a MonoReflectionEvent that correctly represents System.EventInfo.
3490         * icall.c:
3491         * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
3492         type.
3494 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
3496         * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
3497         intermediary managed arrays. Use caching version of mono_array_new
3498         to allocate the result array.
3500 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
3502         * reflection.c: Use cached version of mono_array_new alongside
3503         the mono_reflection_get_custom_attrs_by_type call path.
3505 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
3507         * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
3508         intermediary managed arrays. Use caching version of mono_array_new
3509         to allocate the result array.
3511         * icall.c (ves_icall_Type_GetConstructors_internal): Same.
3513 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
3515         * icall.c: Add small implementation of a growable stack bound array.
3517         * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
3519         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
3520         intermediary managed arrays. Use caching version of mono_array_new
3521         to allocate the result array.
3523 2009-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
3525         * icall.c: New icall ves_icall_System_Enum_compare_value_to that
3526         helps Enum::CompareTo to be implemented without reboxing all enums
3527         to their underlying type.
3528 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
3530         * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
3531         since it acquires a global lock leading to scalability problems.
3533         * profiler.c: Make the stat profiler work with multiple appdomains, this
3534         currently only works when no appdomains are unloaded.
3536 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
3538         * appdomain.c: make the check to avoid copying when the assembly is
3539         already shadow copied actually work.
3541 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
3543         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3545         * object-internals.h (struct _MonoReflectionGenericClass): Sync with
3546         changes to the managed side.
3548 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
3550         * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
3551         classes + a separate lock for it, as it is used frequently at runtime, not
3552         just during metadata loading/JIT compilation.
3554         * class.c (mono_bounded_array_class_get): Use the separate cache + lock
3555         for szarrays.
3556         
3557         * object-internals.h (mono_class_from_name_cached): New macro to cache
3558         the results of the lookup locally without having to declare a static
3559         variable to hold it.
3560         (mono_class_get_field_from_name_cached): Ditto.
3561         (mono_array_class_get_cached): Ditto.
3563         * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
3564         the new macros.
3565         
3566         * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
3567         slower search in metadata.
3569         * pedump.c: Fix a warning.
3571 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
3573         * reflection.c (encode_locals): Add checks for user types.
3574         (method_encode_clauses): Ditto.
3575         (method_encode_code): Ditto.
3576         (mono_image_create_token): Ditto.
3578         * object-internals.h: Change the type of more fields from MonoReflectionType*
3579         to MonoObject*.
3581 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
3583         * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
3584         the a thread does not suspend within 100ms.
3586         * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
3587         in addition to StopRequested as well.
3589         * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
3591         * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
3592         search the method_hash before inserting a new entry, to avoid crashes when
3593         the same method is inserted multiple times, causing the old 
3594         MonoDebugMethodInfo structure to be freed by the value dtor function.
3596 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3598         * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
3599         SO_EXLUSIVEADDRUSE where available.
3601 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
3603         * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
3604         runtime invoke wrappers, this time it is string ctor wrappers, which
3605         pass a dummy string as 'this' instead of their obj argument. Fixes
3606         #478473.
3608 2009-02-21  Jb Evain  <jbevain@novell.com>
3610         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3611         only get create_culture once.
3613 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
3615         * reflection.c (mono_reflection_setup_internal_class): Move the user type
3616         check before the locking.
3617         
3618         * reflection.c (mono_reflection_setup_internal_class): Check for user types.
3619         (mono_reflection_create_runtime_class): Ditto.
3620         (mono_reflection_sighelper_get_signature_local): Ditto.
3621         (mono_reflection_sighelper_get_signature_field): Ditto.
3623         * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
3624         is a System.MonoType object or similar.
3625         (monotype_cast): New helper function to cast a MonoObject to a 
3626         MonoReflectionType object.
3628         * object-internals.h: Change MonoReflectionType* members in structures to
3629         MonoObject* members to force the usage of the monotype_cast () function.
3631         * reflection.c icall.c: Use monotype_cast () for accessing Type members of
3632         structures/arrays. This causes us to assert instead of crashing when 
3633         instances of user defined subclasses of System.Type are encountered.
3635 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3637         * cil-coff.h:
3638         * icall-def.h:
3639         * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
3640         win32 resource loaded from a PE file.
3642         * image.c: fix mono_image_lookup_resource.
3644 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3646         * icall-def.h:
3647         * threads-types.h:
3648         * threads.c: added internal call for WaitHandle.SignalAndWait.
3650 2009-02-19  Bill Holmes  <billholmes54@gmail.com>
3652         * cominterop.c : Adding cominterop_type_from_handle and 
3653           registering it as an icall.  Replacing all references
3654           to type_from_handle.
3656         Code is contributed under MIT/X11 license.
3658 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
3660         * Makefile.am: Add lock-tracer.h and lock-trace.c.
3662         * appdomain.c: Call the tracer init function.
3664         * domain-internals.h: Enable the tracer for the domain locks.
3666         * image.c: Enable the tracer for image locks.
3668         * loader.c: Enable the trace for the loader lock.
3670         * lock-tracer.h:
3671         * lock-tracer.c: Initial implementation of the lock trace utility.
3672         The tracer requires a compile time define to be enabled and a env var
3673         to be enabled at runtime.
3675 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
3677         * domain.c (mono_domain_code_foreach): Improve documentation.
3679 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
3681         * appdomain.c:
3682         * generic-sharing.c:
3683         * object.c:
3684         * reflection.c:  Adjust locking order to the new semantics where the loader lock
3685         comes first.
3687 2009-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
3689         * domain.c: Add mono_domain_code_* functions that perform locking
3690         around the domain codeman.
3692         * domain-internals.h: Export those functions.
3694         * object.c: Use new functions instead of acquiring the domain lock.
3696 2009-02-19  Zoltan Varga  <vargaz@gmail.com>
3698         * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
3699         delegate. Fixes #477396.
3701 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
3703         * reflection.c (create_custom_attr): Get rid of alloca.
3705 2009-02-18  Bill Holmes  <billholmes54@gmail.com>
3707         * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
3708           Adding exception handling for all CCW calls.
3710         Code is contributed under MIT/X11 license.
3712 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
3714         * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
3716         * marshal.c (emit_marshal_boolean): Add null checks to the new 
3717         native->managed marshalling code. Fixes #476247.
3719 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3721         * class.c (mono_class_get_vtable_entry): Move the addition of
3722         static rgctx invoke wrappers for vtable methods here, this simplifies
3723         a lot of code and causes fewer rgctx wrappers to be created.
3725         * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
3726         name of the statistics to begin with an uppercase.
3728 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
3730         * reflection.c: Revert previous change as it breaks the build.
3731         
3732 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
3734         * verify.c: Properly handle SZARRAY element type.
3736         Fixes #474271.
3738 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
3740         * reflection.c (mono_image_create_method_token): Correctly encode
3741         MethodDef MemberRefParent token.
3743         Fixes #472845.
3745 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3747         * image.c (mono_image_close): Delete the critical section before
3748         freeing the memory holding it.
3750 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3752         * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
3753         Fixes #476257.
3755 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3757         * pedump.c (main): Call mono_marshal_init so pedump
3758         doesn't crash.
3760 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3762         * loader.c (method_from_memberref): Properly fix #474271 and
3763         don't break the runtime bad.
3765 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3767         * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
3768         (mono_domain_alloc0): Ditto.
3770 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3772         * loader.c (method_from_memberref): Don't abort if the array
3773         method is not found. A regular loader failure is more informative
3774         and correct.
3776         Fixes #474271.
3778 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3780         *loader.c: Guard MonoImage::method_cache/methodref_cache
3781         using the image lock instead of the loader lock.
3783         * metadata.h: Add comments about which fields are protected by
3784         the image lock.
3786 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3788         * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
3790         * generic-sharing.c (mono_method_construct_object_context): Remove the
3791         wrapper_type == NONE assert, it is not needed.
3793 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
3795         * reflection.c (clear_cached_object): New helper function.
3796         (mono_method_clear_object): New function to clear the cached reflection
3797         objects for a dynamic method.
3799         * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
3800         Partly fixes # 463323.
3801         
3802 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
3804         * class.c:
3805         * loader.c:
3806         * reflection.c: Remove all explicit uses of MonoImage::property_hash.
3808 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
3810         * image.c: Add mono_image_property_(lookup,insert,remove) functions that
3811         take the image lock instead of the loader lock.
3813         * metadata-internals.h: Export new functions.
3815 2009-02-12  Miguel de Icaza  <miguel@novell.com>
3817         * domain.c (app_config_parse): Remove another use of stat that is
3818         not necessary as g_file_get_contents already does the presence
3819         check. 
3821 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
3823         * cominterop.c icall-def.h: Fix the DISABLE_COM build.
3825         * marshal.c: Move the bstr handling code to cominterop.c.
3827         * marshal.c: Remove some COM interop code missed previously.
3829 2009-02-12  Miguel de Icaza  <miguel@novell.com>
3831         More Paolo patches from the Wii port:
3832         
3833         * security.c: Remove ves_icall_System_Environment_get_UserName
3834         from here.
3836         * icall.c: And put ves_icall_System_Environment_get_UserName
3837         here. 
3839         * appdomain.c (mono_set_private_bin_path_from_config): Remove
3840         redundant call to stat that was only used to test for the file
3841         existence.   Patch from Paolo.
3843         * gc.c (run_finalize): If COM is disabled, do not link in
3844         mono_marshal_free_ccw.
3846         * generic-sharing.c: Use alloca.h here as well.
3848 2009-02-13 Rodrigo Kumpera  <rkumpera@novell.com>
3850         * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
3852 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
3854         * cominterop.c cominterop.h: New files.
3856         * marshal.c: Move the COM interop related code to cominterop.c. Make a few
3857         function/typedefs which are needed by cominterop.c global.
3859 2009-02-12  Mark Probst  <mark.probst@gmail.com>
3861         * generic-sharing.c: Don't take the loader lock to guard image
3862         mempool allocs.
3864 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3866         * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
3867         called without the loader lock which is required to guard MonoImage:tokens.
3869 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3871         * class.c:
3872         * metadata.c:
3873         * method-builder.c:
3874         * marshal.c:
3875         * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
3877 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3879         * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
3880         Rework the code to use regular mono_image_alloc/0.
3882         * loader.c: Rework the code to use regular mono_image_alloc/0.
3884         * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
3886 2009-02-12  Bill Holmes  <billholmes54@gmail.com>
3888         * object-internals.h : Fixing a typo in the 
3889           MonoReflectionComVisibleAttribute struct.
3891         * marshal.c (cominterop_com_visible): Check the implemented 
3892           interfaces for ComImport.
3894         * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls 
3895           assume that bools should be treated as VARIANTBOOLs.
3897         * marshal.c (emit_marshal_boolean): Adding cases for 
3898           MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
3900         * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to 
3901           emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
3903         * marshal.c (cominterop_get_ccw): For COM calls assume that bools
3904           should be treated as VARIANTBOOLs.    
3906         Code is contributed under MIT/X11 license.
3908 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3910         * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
3911         allocation with the image lock.
3913 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3915         This patch is the last of a series to remove explicit reference of MonoImage::mempool
3916         and use mono_image_alloc set of functions instead. This time we finish with reflection.c
3918         * object.c: Add mono_string_to_utf8_image.
3920         * object-internals.h: Export mono_string_to_utf8_image.
3922         * reflection.c: Rework all explicit references to the the image mempool to go thought
3923         the mono_image_alloc set of functions.
3925 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3927         This patch is the third of a series to remove explicit reference of MonoImage::mempool
3928         and use mono_image_alloc set of functions instead. This time we finish with marshal.c
3929         and generics-sharing.c.
3931         * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
3932         as first argument. Note that this function remains broken as it doesn't perform locking around the
3933         mempool allocation.
3935         * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
3937         * image.c: Add g_slist_append_image.
3939         * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
3940         the supplied image for allocation. Move code into mono_metadata_field_info_full.
3942         * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
3943         Fix all related code to do the same.
3945         * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
3947         * metadata-internals.h: Fix the signatures.
3949 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3951         This patch is the second of a series to remove explicit reference of MonoImage::mempool
3952         and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
3953         and similar to work using MonoImage.
3955         * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
3956         MonoMemPool.
3958         * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
3960         * class.c (mono_metadata_signature_deep_dup): Same.
3962         * class.c (inflate_generic_type): Same.
3964         * class.c (mono_class_inflate_generic_type_with_mempool): Same.
3966         * metadata.c (mono_metadata_signature_dup_full): Same.
3968         * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from 
3969         mono_metadata_signature_dup_full.
3971         * metadata.c (mono_metadata_type_dup): Same.
3973         * marshal.c: Pass the image to calls to mono_metadata_type_dup.
3975         * reflection.c: Same.
3977         * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
3979         * metadata-internals.h: Fix the signatures.
3981         * class-internals.h: Same.
3983 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
3985         This patch is the first of a series to remove explicit reference of MonoImage::mempool
3986         and use mono_image_alloc set of functions instead. 
3988         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
3989         Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
3990         of a MonoMemPool.
3992         * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
3994         * class.c (g_list_prepend_mempool): Removed.
3996         * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
3998         * image.c: Add g_list_prepend_image.
4000         * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
4002         * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
4005 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
4007         * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
4008         mono_image_unlock.
4010         * image.c (mono_image_init): Init the lock field.
4012         * image.c (mono_image_init): Cleanup the lock field.
4014         * image.c: Add mono_image_(un)lock functions.
4016 2009-02-11  Mark Probst  <mark.probst@gmail.com>
4018         * class.c, class-internals.h: mono_method_get_context_general()
4019         combines the functionality of mono_method_get_context() and
4020         mini_method_get_context().
4022         * generic-sharing.c, domain-internals.h:
4023         mono_method_construct_object_context() and
4024         mono_domain_lookup_shared_generic() moved from mini.
4026         * icall.c (ves_icall_InternalInvoke): Handle the case where the
4027         method doesn't have the correct instantiation because it's shared
4028         generic code.  Fixes #473999.
4030 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
4032         * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
4034         * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
4035         
4036 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
4038         * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
4040         * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
4042         * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
4043         and recheck the cache for dups after it.
4045         * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
4047         Fixes one of the deadlocks found in #473150.
4049 2009-02-11  Bill Holmes  <billholmes54@gmail.com>
4051         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
4052           For Win32, add additional break conditions for accept.
4054         Code is contributed under MIT/X11 license.
4056 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
4058         * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
4059         lazily initialize the native wrapper cache.
4060         (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
4061         cache, since they are different from the normal wrappers.
4063         * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
4065         * metadata-internals.h (struct _MonoImage): Add a new wrapper for
4066         AOT compiled native wrappers.
4068 2009-02-09  Geoff Norton  <gnorton@novell.com>
4070         * appdomain.h:
4071         * security-core-clr.c: Allow enabling core-clr from the embedding
4072         API.
4074 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4076         * socket-io.c: when requesting all the local ips, if there are no
4077         interfaces up and running, MS returns 127.0.0.1.
4079 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4081         * mono-perfcounters-def.h: processor time is an inverse time.
4082         Fixes bug #468625.
4084 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
4086         * socket-io.c: an empty host name returns the list of local IPs.
4087         Fixes bug #386637 part 1/2.
4089 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
4091         * verify.c (mono_class_interface_implements_interface): Call
4092         mono_class_setup_interfaces ().
4093         (merge_stacks): Ditto.
4095 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
4097         * class.c (mono_class_setup_interfaces): New function to lazily initalize
4098         klass->interfaces.
4099         (mono_generic_class_get_class): Don't initalize klass->interfaces.
4100         (mono_generic_class_get_class): Ditto.
4102 2009-02-06  U-QUACK\miguel  <miguel@quack>
4104         * icall-defs.h: Include also the Encrypt/Decrypt string methods as
4105         they live in security.c
4107         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
4108         another bit from Paolo's code.
4110 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
4112         * object.c (build_imt_slots): Add a small optimization to avoid inflating
4113         methods which will be discarded by add_imt_builder_entry ().
4115         * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
4116         need to be boxed.
4118         * loader.c: Add a statistics for the size of the memberref signature cache.
4119         
4120         * loader.c (find_cached_memberref_sig): New helper function.
4121         (cache_memberref_sig): Ditto.
4123         * loader.c: Cache the result of parsing memberref signatures, since otherwise
4124         they will be parsed again for every generic instantiation, leading to unbounded
4125         memory growth.
4127 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
4129         * loader.c (mono_get_method_from_token): Avoid creating class for the generic
4130         parameters of generic methods.
4132         * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
4133         after the original method is copied to the inflated method.
4134         (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
4136         * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
4137         field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
4139         * class.c metadata.c: Update after the changes above.
4141 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
4143         * metadata-verify.c: Simplified error handling and added
4144         section table validation.
4146 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
4148         * class-internals.h (MonoClassExt): New structure containing rarely used
4149         fields of MonoClass.
4150         (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
4151         through a new 'ext' field.
4153         * class.c (mono_class_alloc_ext): New helper function to allocate 
4154         class->ext.
4156         * class.c metadata.c reflection.c: Update after MonoClass structure changes.
4158 2009-02-05  Mark Probst  <mark.probst@gmail.com>
4160         * object.c (mono_object_get_virtual_method): Properly inflate
4161         generic methods.  Fixes #472692.
4163 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
4165         * class.c (mono_class_create_from_typedef): The CLR supports SystemF
4166         recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
4167         for the parent type, the created type must be ready to be used on a generic
4168         instantiation.
4169         We fill this_arg/byval_arg if the parent is a generic instance to make sure
4170         we won't have duplicated entries in generic_inst_cache.
4172         Fixes #469553.
4174 2009-02-05  Miguel De Icaza  <miguel@novell.com>
4176         * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
4177         replace with plain BSD per the comments on the bug MONO77637.
4179 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
4181         * class.c (mono_class_get_generic_class): New accessor function.
4182         (mono_class_get_generic_container): Ditto.
4184         * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
4185         fields, similar to the ones in MonoMethod.
4187         * class.c (mono_generic_class_get_class): Set klass->is_inflated.
4188         (mono_class_create_from_typedef): Set klass->is_generic if needed.
4190         * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
4191         
4192         * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
4193         the same information as element_class->byval_arg.
4195         * class.c reflection.c: Remove references to class->byval_arg.
4197         * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing 
4198         klass->enum_basetype directly.
4200         * verify.c metadata.c object.c icall.c reflection.c: Use 
4201         mono_class_enum_basetype () instead of accessing klass->enum_basetype 
4202         directly.
4204 2009-02-04  Miguel de Icaza  <miguel@novell.com>
4206         * icall-def.h: Remove internal calls for sockets when
4207         DISABLE_SOCKET is defined, file system writing features when the
4208         OS only support reading and not writing data and Policy support if
4209         the Policy is disabled.
4210         
4211         * image.c (do_mono_image_open): Apply Paolo's patches for using
4212         mono_file_map_ APIs here.
4214         * assembly.c: Add support for platforms to avoid prefix
4215         auto-detection. 
4217 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
4219         * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
4220         warning.
4222         * class.c (mono_class_inflate_generic_class): New helper function.
4224         * class.c: Use mono_class_inflate_generic_class in a few places. Add
4225         statistics for inflated methods/classes.
4227         * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
4229         * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
4230         the call is made from Delegate.CreateDelegate () for the invoke method of
4231         a delegate.
4233         * loader.c: Add a statistics for the memory occupied by inflated signatures.
4235         * metadata.c (mono_metadata_signature_size): New helper function.
4237         * class.c (mono_class_get_method_from_name_flags): Add an optimization for
4238         generic instances.
4240         * metadata.c (inflated_method_in_image): Avoid calling 
4241         mono_method_signature () if the method does not already have a signature.
4243 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
4245         * verify.c (is_compatible_boxed_valuetype): When checking if the boxed 
4246         valuetype is compatible with target type, check by inheritance as a
4247         VT is not really compatible with System.ValueType, for example.
4249         * verify.c (do_invoke_method): Improve error message.
4251         * verify.c (do_box_value): If boxing a nullable, use the type argument
4252         on stack instead.
4254         * verify.c (do_newobj): Improve error message.  
4256         Fixes #469549.
4258 2009-02-03  Miguel de Icaza  <miguel@novell.com>
4260         * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
4262 2009-02-03  Mark Probst  <mark.probst@gmail.com>
4264         * generic-sharing.c: Don't hold domain lock when calling
4265         instantiate_other_info().  Fixes #471958.
4267         * domain-internals.h, loader.c: Describe locking policy of domain
4268         lock vs loader lock.
4270 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
4272         * verify.c (mono_delegate_signature_equal): Make it possible to check
4273         first-arg-bound delegates to static method.
4275         * verify.c (verify_delegate_compatibility): Correctly verify delegates to
4276         static methods with the first arg bound.
4278         Fixes #469529.
4280 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
4282         * verify.c: Added stack_slot_full_name to provide decent and more meanfull
4283         errors.
4285         * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
4286         under strict mode. Any type, when boxed can be seen as a reference type.
4288         Fixes #469528.
4290 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
4292         * object.h: The lower bound of an array is a signed integer value.
4293         Introduce mono_array_lower_bound_t typedef. It should be used instead of
4294         gint32 as under MONO_BIG_ARRAYS it will be a gint64.
4296         * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
4297         calculate the upper bound.
4298         
4299         Fixes #471252.
4301 2009-02-02  Miguel de Icaza  <miguel@novell.com>
4303         From Paolo's work, refactored, cleared up:
4304         
4305         * threadpool.c, icall.c: ifdef code that requires a working socket
4306         stack.
4308         * metadata.c (mono_metadata_field_info): Do not attempt to return
4309         a value from a function declared as void.
4311         * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
4312         from the console stack.
4314         * assembly.c: use strrchr instead of rindex.
4316         * class.c, object.c, marshal.c, icall.c, reflection.c: include
4317         alloca.h on systems that have it.
4319         * environment.c: Avoid code that uses stuff from
4320         HAVE_SYS_UTSNAME_H
4321         
4322         * appdomain.c: Include sys/time.h.
4324         * console-io.c: include sys/ioctl.h if it is available.
4326 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
4328         * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
4330         * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
4331         the method builder.
4333         * marshal.c: Set mb->skip_visibility instead of setting it on the method
4334         after it was created and cached, as the later is not thread safe.
4335         
4336 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
4338         * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
4339         called while the debugging module is not initialized. Fixes #471669.
4341 2009-02-02 Rodrigo Kumpera  <rkumpera@novell.com>
4343         * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
4345         Fixes #471255.
4347 2009-02-02  Mark Probst  <mark.probst@gmail.com>
4349         * generic-sharing.c (lookup_or_register_other_info): Make sure the
4350         loader lock is not taken while the templates lock is held.  Fixes
4351         #471089.
4353 2009-02-02  Mark Probst  <mark.probst@gmail.com>
4355         * metadata.c (type_in_image): Added a check to fix a monodis
4356         crash.
4358 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
4360         * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
4361         nullable arguments.
4363         * object.c (mono_runtime_invoke_array): Ditto.
4364         
4365         * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
4366         freeing wrappers of dynamic methods.
4368         * loader.c (mono_free_method): Call it. Fixes #463323.
4369         
4370         * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
4371         methods taking vtype/byref arguments, to fix yet another bug caused by
4372         the sharing of runtime invoke wrappers. Partly fixes #471259.
4374 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
4376         * debug-mono-symfile.c (check_line): Return NULL instead of returning
4377         <first file in file table>:1 when the IL offset does not have an associated
4378         line number.
4380 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
4382         * mono-debug.c (mono_debug_lookup_locals): New function to return local
4383         variable info for a method.
4385         * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
4386         
4387 2009-01-30  Jb Evain  <jbevain@novell.com>
4389         * pedump.c: reuse code from monodis to make sure pedump honors
4390         MONO_PATH, which is needed to verify net_2_1 assemblies.
4392 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
4394         * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
4395         there is no line number info.
4397 2009-01-29  Raja R Harinath  <harinath@hurrynot.org>
4399         Avoid some MonoType allocations
4400         * reflection.c (mono_reflection_initialize_generic_parameter):
4401         Reuse MonoType from param->pklass rather than allocating one.
4402         (mono_dynamic_image_free): Update to changes.
4404 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
4406         Rearrange some code to improve consistency
4407         * reflection.c (mono_reflection_setup_generic_class): Move body ...
4408         (mono_reflection_initialize_generic_parameter): ... here.
4410 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
4412         * generic-sharing.c (has_constraints): Enable gshared for methods/classes
4413         with type constraints as an experiment.
4415         * boehm-gc.c (on_gc_notification): Update mono_stats.
4417 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
4419         Avoid some allocations
4420         * class-internals.h (_MonoGenericInst::type_argv): Convert from
4421         pointer to tail array to avoid extra allocation.
4422         * metadata.c (free_generic_inst): Update to changes.
4423         (mono_metadata_get_generic_inst): Likewise.  Use alloca instead of
4424         on-stack struct.
4426 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
4428         * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
4429         return TRUE if the two type objects are the same.
4431 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
4433         * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
4434         (mono_class_native_size): Use klass->marshal_info->min_align instead of
4435         klass->min_align, since klass->min_align contains the managed alignment,
4436         while the native alignment can be different, like for longs on x86.
4437         Fixes #469135.
4439         * class-internals.h (MonoMarshalType): Add a min_align field.
4441 2009-01-26 Rodrigo Kumpera  <rkumpera@novell.com>
4443         * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
4444         the 1.0 format.
4446 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
4448         * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
4449         some comments about the usage of the used_regs field.
4451         * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
4452         Fixes #469217.
4454 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
4456         * appdomain.c: return NULL instead of throwing FileNotFoundException
4457         when LoadAssembly() fails.
4459 2009-01-23  Mark Probst  <mark.probst@gmail.com>
4461         * metadata.c (mono_metadata_generic_param_equal): Only compare the
4462         image if the owner is NULL.  Fixes the AOT failures.
4464 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
4466         * metadata.c (mono_metadata_load_generic_params): Initialize the 
4467         MonoGenericParam structure using memset so the image field is initialized
4468         as well.
4470 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
4472         * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
4473         a plain store.
4475 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
4477         * class.c (mono_class_setup_vtable_general): In the generic instance
4478         optimization, set method->slot for abstract virtual methods. Fixes part of
4479         #467834.
4481 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
4483         * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
4484         which signals that the unloading has started but all appdomain services must
4485         remain operational.
4487         * appdomain.c (mono_domain_unload): The initial state for unloading now
4488         is unloading_start and we switch to unloading after the managed call to
4489         AppDomain::DomainUnload has finished.
4491         The new unloading state has to be created because managed code in the
4492         DomainUnload event can depend on things like the threadpool still working.
4493         The domain must remain fully functional while the event executes.
4495         This shown as an issue due to Process::WaitForExit, which waits for
4496         async reads of stdout and stderr to complete. Since those are processed
4497         in the threadpool the code deadlocks because the DomainUnload callback 
4498         waits for the async read finished event, which should have been set by a
4499         threadpool job but has been discarded due to the domain been in unload
4500         state.
4502 2009-01-21  Mark Probst  <mark.probst@gmail.com>
4504         * metadata.c (mono_metadata_generic_param_equal): Owner as well as
4505         image must match.
4507 2009-01-21  Mark Probst  <mark.probst@gmail.com>
4509         * reflection.c (resolve_object): For fields, inflate the class and
4510         then get the field in the inflated class.
4512 2009-01-20  Mark Probst  <mark.probst@gmail.com>
4514         * object-internals.h (struct _MonoException): Added a comment
4515         explaining the new use of trace_ips.
4517 2009-01-20  Mark Probst  <mark.probst@gmail.com>
4519         * generic-sharing.c (inflate_other_data): Inflate array methods
4520         correctly.
4522         * loader.c, class-internals.h: Rename search_in_array_class() to
4523         mono_method_search_in_array_class() and make it non-static.
4525 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
4527         * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
4528         Hopefully fixes #458168.
4530 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
4532         * object.c (mono_raise_exception): Remove call to InterlockedIncrement
4533         as it is performed elsewhere.
4535         Code is contributed under MIT/X11 license
4537 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
4539         * mono-perfcounters-def.h: Add counters for asp.net requests total and
4540         requests queued.
4541         * object.c (mono_raise_exception): Increment the exceptions total
4542         counter when an exception is thrown.
4543         * class-internals.h: Add a location for storing the total number of
4544         asp.net requests served.
4545         * mono-perfcounters.c: Implement update support for asp.net counters
4546         from the class libraries. Implement read support for asp.net counters
4547         and exceptions total counter.
4549 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
4551         * loader.c (search_in_array_class): Call mono_class_setup_methods () before
4552         accessing klass->methods. Fixes #467385.
4554 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
4556         * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
4557         for byval arguments without an [Out] attribute. Fixes #467212.
4559         * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com). 
4560         Fix compilation under android.
4561         
4562         * sgen-gc.c: Instead of scanning gray objects after all roots have been 
4563         processed, scan them directly after they are copied, to achieve better locality
4564         and cache usage.
4566         * socket-io.c: Applied patch from Koushik Dutta
4567         (koush@koushikdutta.com). Disable IPV6 when running under android.
4569 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
4571         * icall.c (ves_icall_InternalExecute): Add write barriers.
4573         * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
4574         the GC code.
4576         * sgen-gc.c: Implement write barriers in IL code.
4578 2009-01-17  Geoff Norton  <gnorton@novell.com>
4580         * image.c: Avoid trying to walk the reference table of dynamic assemblies.
4582 2009-01-17  Geoff Norton  <gnorton@novell.com>
4584         * image.c: When unloading the image->references table, there can be gaps
4585         in it.  Ensure that we iterate every entry to avoid leaking assembly references
4586         when unloading an appdomain.
4588 2009-01-16  Zoltan Varga  <vargaz@gmail.com>
4590         * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
4591         speed up ptr-in-nursery checks.
4593         * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
4594         threads_lock () to prevent deadlocks.
4596         * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
4597         does not need to be scanned during minor collections, since writes to it
4598         must use write barriers.
4600 2009-01-15 Rodrigo Kumpera  <rkumpera@novell.com>
4602         * metadata-verify.c: Add pe nt header verification.
4603         
4604 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
4606         * gc.c: Fix a few warnings when using SGEN.
4608 2009-01-14 Rodrigo Kumpera  <rkumpera@novell.com>
4610         * metadata-verify.c: Add pe optional header verification.
4612 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
4614         * sgen-gc.c: Add support for user defined marker functions, used by
4615         MonoGHashTable to avoid registering a GC root for every hash node.
4617 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
4619         * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
4620         non-pinned roots into separate hashes to avoid having to traverse them
4621         in functions which are only interested in one kind.
4623 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
4625         * metadata-verify.c: Add pe header machine field verification.
4626         
4627 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
4629         * metadata-verify.c: Add pe header size verification.
4631 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
4633         * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
4634         using the GC, they don't contain references.
4636         * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
4638 2009-01-13  Geoff Norton  <gnorton@novell.com>
4640         * appdomain.c|h: Expose mono_domain_unload to the embedding api so that 
4641         AppDomains created on the native side can be cleaned up on the native side.
4643 2009-01-13  Geoff Norton  <gnorton@novell.com>
4645         * appdomain.c: Ensure that we call mono_context_init for the embedding api
4646         as well as the managed api.
4648 2009-01-13  Geoff Norton  <gnorton@novell.com>
4650         * appdomain.h|c: New API for creating a MonoDomain in the embedding api
4651         with a MonoAppDomain initialized against it.
4653 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
4655         * reflection.c (MOVING_GC_REGISTER): Fix a warning.
4656         
4657         * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
4659         * marshal.c: Avoid setting the exception clauses after a method has been entered 
4660         into the wrapper caches. Fixes #465700.
4662         * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
4663         method builder.
4664         (mono_mb_create_method): Set the clauses from the method builder.
4666 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
4668         * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
4669         Patch from Makoto Kishimoto.
4671 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
4673         * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by 
4674         encoding them as ROOT_DESC_COMPLEX.
4675         (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
4677 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
4679         * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
4680         no longer point to the nursery.
4682         * sgen-gc.c: Add a few comments/FIXMEs.
4683         
4684         * sgen-gc.c: Implement scanning of the alloc_pinned objects.
4686         * marshal.c (mono_marshal_get_synchronized_wrapper): Make the 
4687         initialization of the various _method variables thread safe. Fixes
4688         #465377.
4690 2009-01-12  Mark Probst  <mark.probst@gmail.com>
4692         * domain.c, domain-internals.h: Remove the shared_generics_hash
4693         and its lookup functions.
4695 2009-01-12  Bill Holmes  <billholmes54@gmail.com>
4697         * socket-io.c:  Fixing the MSVC build. 
4699         Code is contributed under MIT/X11 license.
4701 2009-01-12 Rodrigo Kumpera  <rkumpera@novell.com>
4703         * metadata-verify.c: Add pe header watermark verification.
4705 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
4707         * metadata-verify.c: Add lfanew verification.
4709 2009-01-12  Jb Evain  <jbevain@novell.com>
4711         * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
4712         METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
4714 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
4716         * socket-io.c: Fix the build.
4718         * environment.c: Fix an #ifdef.
4720 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
4722         * threadpool.c (async_invoke_thread): Handle the wait function returning
4723         WAIT_IO_COMPLETION as well.
4724         (async_invoke_io_thread): Ditto.
4726 2009-01-09  Bill Holmes  <billholmes54@gmail.com>
4728         * threads.c: Fixing the Windows build.
4730         Code is contributed under MIT/X11 license.
4732 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
4734         * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
4735         interrupt a wait.
4736         (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
4737         the thread to wait again.
4739 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
4741         * metadata-verify.c: Initial skeleton of the metadata verifier.
4743         * pedump.c: Add support for the metadata verifier.
4745         * verify-internal.h: Export the whole assembly metadata verifier function.
4747 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
4749         * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
4751 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
4753         * Makefile.am: Upgrade dtrace-prelink.sh location.
4755 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
4757         * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
4758         well. Otherwise the shutdown deadlock that happens on unix will can happen
4759         as well.
4760         If the main thread code finishes too fast it's possible that the finalizer
4761         thread won't have executed yet, won't record itself as the finalizer thread
4762         and the shutdown sequence will wait on it forever.
4764 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
4766         * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
4767         with MSVC.
4769 2009-01-08  Miguel de Icaza  <miguel@novell.com>
4771         * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
4772         Robert Jordan for pointing this out.
4774 2009-01-08  Christian Prochnow  <cproch@seculogix.de>
4776         * icall.c
4777         * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
4778         ves_icall_System_IO_DriveInfo_GetDriveType.
4780 2009-01-07  Miguel de Icaza  <miguel@novell.com>
4782         * icall.c: Wrap calls to mono_strtod in CriticalSection
4783         invocations when using eglib, to work around #464316.
4785 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
4787         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
4788         return value of GetCurrentDirectory to never access unitialized memory.
4790 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
4792         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
4793         return value of GetCurrentDirectory and expand the buffer if needed.
4795         Fixes #459094.
4797 2009-10-07 Tom Hindle  <tom_hindle@sil.org>
4799         * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) : 
4800           Adding a call to mono_init_com_types.
4802         Code is contributed under MIT/X11 license.
4804 2009-01-07  Geoff Norton  <gnorton@novell.com>
4806         * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on 
4807         darwin.  Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
4808         ai_canonname can be null in some cases on darwin, where the runtime assumes it will 
4809         be the value of the ip buffer.
4811 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
4813         * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
4814         interfaces_packed here.
4816         Fixes part of #463294.
4818 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
4820         * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
4822         Fixes part of #463294.
4824 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
4826         * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
4827         is a boxed complex as well.
4829         Fixes part of #463294.
4831 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
4833         * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
4834         control if a methodspec should be created for the generic method definition from external assemblies.
4835         Caching of methodspec is done using the handleref hash table.
4837         Fixes #462592.
4839 2009-01-05 Rodrigo Kumpera  <rkumpera@novell.com>
4841         * loader.c (find_method): When searching the interfaces of a class
4842         check the transitive closure of implemented interfaces.
4844         Fixes #463303.
4846 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
4848         * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
4849         
4850 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
4852         * class.c (get_implicit_generic_array_interfaces): Extract valuetype
4853         interfaces calculation to fill_valuetype_array_derived_types.
4855         * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
4856         ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
4857         for example.
4859         * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
4860         interfaces for valuetypes if needed.    
4862         * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
4863         for their basetype as well. Types are array expanded if rank is > 0.
4865         Fixes #400716.
4867 2008-12-30  Bill Holmes  <billholmes54@gmail.com>
4869         * socket-io.h : Changing the signature of
4870           ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
4871           the blocking state.
4873         * icall-def.h :  Changing the signature of
4874           System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
4876         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
4877           For Windows only.  Avoid blocking when calling accept by
4878           querying for a connection via select.  The loop also queries
4879           the thread state every 1000 micro seconds for the thread
4880           stop state.  This will avoid the process hanging on shutdown
4881           when using a TcpChannel that is never connected to.
4883         Code is contributed under MIT/X11 license.
4885 2008-12-30  Marek Safar  <marek.safar@gmail.com>
4887         * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
4889 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
4891         * class.c (get_implicit_generic_array_interfaces): Extract common
4892         code to a helper function making it a lot easier on the eyes.
4894 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
4896         * class.c (get_implicit_generic_array_interfaces): If the internal
4897         enumerator is an interface inflate System.Object instead of itself.
4899         Fixes #461261.
4901 2008-12-24 Rodrigo Kumpera  <rkumpera@novell.com>
4903         * object.c (mono_runtime_invoke_array): Don't assert with
4904         byref nullable types.
4906         * marshal.c (mono_marshal_get_runtime_invoke): To handle
4907         byref nullables we unbox the object and store it on the
4908         stack. 
4909         We can't use the boxed object since it is the T of Nullable<T>
4910         and the boxed representation of a nullable it's underlying type
4911         or null.
4912         We could cheat and create a boxed nullable and use the same
4913         machinery of other byref VTs but this feels like a hack and
4914         using the stack has the bonus of reducing heap pressure.
4916         Fixes #461941.
4918 2008-12-23 Rodrigo Kumpera  <rkumpera@novell.com>
4920         * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
4921         return value.
4923         Fixes #461867.
4925 2008-12-19  Bill Holmes  <billholmes54@gmail.com>
4927         * icall-def.h : Adding an internal call definition for 
4928           System.Environment.internalBroadcastSettingChange.
4930         * icall.c : Adding a Windows only implementation to broadcast a 
4931           WM_SETTINGCHANGE when an environment variable has changed.
4933         Code is contributed under MIT/X11 license.
4935 2008-12-19  Mark Probst  <mark.probst@gmail.com>
4937         * class.c, class-internals.h: Made
4938         mono_class_has_parent_and_ignore_generics() non-static.
4940 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
4942         * image.c: deal with the mmap failing when loading an image.
4944 2008-12-17  Geoff Norton  <gnorton@novell.com>
4946         * threadpool.c: Ensure that the io_queue_lock is initialized
4947         in all circumstances, as we always attempt to cleanup against it.
4949 2008-12-17  Miguel de Icaza  <miguel@novell.com>
4951         * icall.c (ves_icall_System_Environment_get_Platform): For
4952         compatibility reasons for existing client code we will keep
4953         returning 4 for a while.   
4955         For how long will depend on the documentation being updated, and
4956         for us to give client code a chance to be updated.
4958         This reverts the original decison on #433108 since we did not
4959         catch roughly 33 instances of the broken code in our own source
4960         code base, we did not catch failures on the buildbots, and QA did
4961         not bring this as a problem.
4963         Only today I found some customer's code breaking due to our own
4964         class libraries not being fully updated and tracked it down to
4965         this change.  I am reverting it because if we could not even get
4966         our story straight in our own code base, how can we hope that our
4967         end user code be fixed?
4969         As of this morning, our Wiki page that documents how to detect
4970         Unix had not been fixed.    
4972 2008-12-16  Zoltan Varga  <vargaz@gmail.com>
4974         * metadata.c (inflated_method_in_image): Add a workaround for #458168.
4976         * class.c (mono_class_get_fields): Handle loading errors.
4978 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4980         * metadata.c (mono_type_stack_size_internal): If SIZEOF_REGISTER > SIZEOF_VOID_P then use SIZEOF_REGISTER as the size and alignment of the stack slots.
4981         
4982 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
4984         * mono-perfcounters.c: avoid warning.
4986 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
4988         * reflection.c (ensure_runtime_vtable): Work on generic instances and
4989         make sure all interfaces have MonoClass::interface_id set.
4991         * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
4992         method table is property set.
4994 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
4996         * class.c: New function mono_class_setup_interface_id that setup
4997         MonoClass::interface_id if needed.
4999         * class-internals.h: Export new function.
5001 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
5003         * class.c: Add code to sanity check the vtable after setup_vtable_general
5004         has done it's work.
5006 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
5008         * icall.c: make Assembly.GetExecutingAssembly work properly when
5009         reflection is used to invoke the method.
5010         Bug #321781 fixed.
5012 2008-12-11  Mark Probst  <mark.probst@gmail.com>
5014         * metadata/generic-sharing.c: Look for constraints in all type
5015         arguments, not just the first one.
5017 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
5019         * appdomain.c: return the correct CodeBase for an Assembly instance
5020         that was loaded from the shadow-copy directories.
5021         Bug #458190 fixed.
5023 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
5025         * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
5027         * sgen-gc.c (check_object): New debugging helper function.
5029         * object.c: Fix calls to mono_value_copy_array ().
5031 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
5033         * class.c (mono_class_setup_fields): If working on an inflated class
5034         first check if the generic definition did init with success.
5036         Fixes #445361.
5038 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
5040         pedump.c (main): Fix a warning.
5042 2008-12-10  Bill Holmes  <billholmes54@gmail.com>
5044         * object-internals.h : Adding a definition for 
5045           MonoReflectionComVisibleAttribute.
5047         * marshal.c (cominterop_com_visible) :  Method added to check the 
5048           ComVisible attribute of a class.
5050         * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :  
5051           cominterop_raise_hr_exception added to consolidate common code 
5052           to raise hr exceptions.
5054         * marshal.c (cominterop_can_support_dispatch) :  Method added to determine 
5055           if a managed class should support IDispatch.
5057         * marshal.c 
5058           (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :  
5059           Added additional checks for managed object when getting 
5060           an IDispatch interface.
5062         Code is contributed under MIT/X11 license.
5064 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
5066         pedump.c (main): Handle mono_get_method () returning NULL. 
5068 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
5070         * marshal.h: Fix a warning.
5072 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
5074         * marshal.c : Adding cominterop_release_all_rcws to release all
5075           runtime callable wrappers held by the runtime.
5077         * marshal.h : Adding declaration for cominterop_release_all_rcws.
5078           
5079         Code is contributed under MIT/X11 license.
5081 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
5083         * metadata.c (mono_image_alloc_lock): New helper function.
5084         (mono_image_alloc0_lock): Ditto.
5086         * metadata.c: Use the alloc_lock () helper functions for allocating
5087         memory from the image mempool.
5089 2008-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
5091         * class.c (mono_class_from_generic_parameter): Document it's
5092         locking behavior. Fix double checked locking here, we stored in
5093         param->pklass a partially initialized MonoClass and no membar was used.
5095 2008-12-05  Marek Habersack  <mhabersack@novell.com>
5097         * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
5098         (3) functions are present in the C library use them to do the
5099         job. If they are absent, make sure that the sum of int_part and
5100         dec_part is rounded before returning. This is necessary due to the
5101         division of dec_part by the power of 10 before the final addition
5102         is performed - if the result is not rounded in some cases it will
5103         yield invalid results.
5105 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
5107         * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
5108         wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR 
5109         instruction instead of a pointer constant.
5111 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
5113         * loader.c (mono_method_get_header): Do most of the work outside the
5114         loader lock, to avoid assembly load hook deadlocks.
5116         * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
5117         (mono_metadata_parse_type_full): Ditto.
5119 2008-12-02 Rodrigo Kumpera  <rkumpera@novell.com>
5121         * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
5122         Make the stack depth fixed. Ensure proper argument passing to the backtrace
5123         funtions. Finally, use a lock to produce well ordered output.
5125         The lock looks silly, as all calls to the corlib mempool should be guarded
5126         with the loader lock, but for some reason this fact doesn't help. 
5128         * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
5130 2008-12-02  Mark Probst  <mark.probst@gmail.com>
5132         * socket-io.c: 64 bit big-endian fixes.
5134 2008-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
5136         * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
5137         targets that require strict compatibility between the types.
5139         * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
5140         to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
5141         Kill the strict argument and create a new one valuetype_must_be_boxed.
5143         * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
5144         state that all valuetypes must be boxed.
5146         Fixes #448560.
5148 2008-11-29  Kornél Pál  <kornelpal@gmail.com>
5150         * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
5151         IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
5153         Contributed under MIT/X11 license.
5155 2008-11-28 Rodrigo Kumpera  <rkumpera@novell.com>
5157         * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
5158         the inflate_generic_type machinery should handle it.
5160         This avoids a crash when the field's flags is zero and it's type is
5161         a primitive.
5162         What happens is that mono_metadata_parse_type_full will see that opt_attrs
5163         is zero and will return one of the cached built-in primitive types. Since
5164         those types live in read-only memory, the code that copies it crashes.  
5166 2008-11-28  Mark Probst  <mark.probst@gmail.com>
5168         * object.c: Don't put function descriptors into generalized IMT
5169         thunks.
5171 2008-11-28  Mark Probst  <mark.probst@gmail.com>
5173         * class.c: Enable generic code sharing on PPC64.
5175 2008-11-27  Mark Probst  <mark.probst@gmail.com>
5177         * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
5178         from mini/mini.c.
5180         * generic-sharing.c: Allocate the method template slists from the
5181         image mempool so it doesn't leak.
5183 2008-11-27 Rodrigo Kumpera  <rkumpera@novell.com>
5185         * class.c (generic_array_methods): Release the linked list.
5187 2008-11-27  Mark Probst  <mark.probst@gmail.com>
5189         * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
5190         invocation to g_utf16_to_utf8().
5192 2008-11-26  Mark Probst  <mark.probst@gmail.com>
5194         * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
5195         arguments on big endian archs.
5197 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5199         * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
5200         the type name (test added in corlib).
5202 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
5204         * pedump.c: initialize perf. counters. Fixes a segv.
5206 2008-11-25  Martin Baulig  <martin@ximian.com>
5208         * mono-debug-debugger.c
5209         (mono_debugger_runtime_invoke): Return the exception object if an
5210         exception was thrown.  Visual Studio displays the exception object
5211         in the locals window.
5213 2008-11-24  Mark Probst  <mark.probst@gmail.com>
5215         * mini-trampolines.c (mono_delegate_trampoline): Don't return a
5216         ftnptr.
5218 2008-11-24  Mark Probst  <mark.probst@gmail.com>
5220         * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
5221         MONO_TYPE_U are sizeof (gpointer), too.
5223 2008-11-24  Mark Probst  <mark.probst@gmail.com>
5225         * marshal.c (mono_type_native_stack_size): Fixed size and
5226         alignment for reference types.
5228 2008-11-23  Mark Probst  <mark.probst@gmail.com>
5230         * class.c (mono_class_generic_sharing_enabled): Disable generic
5231         code sharing for PPC64.
5233 2008-11-21 Rodrigo Kumpera  <rkumpera@novell.com>
5235         * icall.c (mono_method_get_equivalent_method): Make sure
5236         method->klass->methods is inited before looping over it.
5238 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
5240         * object.c: when calling ExecuteAssembly in a newly created domain,
5241         the configuration file and application base are already set up.
5242         Bug #446353 take 2 fixed.
5244 2008-11-20  Zoltan Varga  <vargaz@gmail.com>
5246         * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
5247         Fixes #444715. Fix a warning.
5249 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
5251         * appdomain.c: write the full path of the assembly to the .ini file
5252         created when "shadow-copying"
5253         Bug #446353 fixed.
5255 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
5257         * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
5258         if signature==FALSE.
5260 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
5262         * marshal.h : Fix the cygwin build.
5263            marshal.c:12442: undefined reference to `_IID_IMarshal'
5264           
5265         Code is contributed under MIT/X11 license.
5267 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
5269         * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
5270           free threaded marshaler when QueryInterface is called on a COM callable
5271           wrapper requesting the IMarshal interface.
5272           
5273         Code is contributed under MIT/X11 license.
5275 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5277         * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
5279         * reflection.c (mono_type_get_object): Special case the very common
5280         void type.
5282         * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
5283         hold typeof(void).
5285 2008-11-13  Bill Holmes  <billholmes54@gmail.com>
5287         * process.h : Adding method declaration for
5288           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5289           
5290         * process.c : Adding implementation for
5291           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5292           
5293         * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
5294           to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
5296         Code is contributed under MIT/X11 license.
5298 2008-11-10  Rodrigo Kumpera  <rkumpera@novell.com>
5300         * appdomain.c (unload_thread_main): Clean up threadpool by
5301         calling mono_thread_pool_remove_domain_jobs.
5303         * domain-internals.h (struct _MonoDomain): Add new fields to
5304         help coordinate the cleanup of the threadpool.
5306         * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
5307         that cleans up the threadpool of all jobs associated with an appdomain.
5308         It does that by cleaning up the queues and making sure all active
5309         threads are accounted.
5311         * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
5312         unloaded or in the process of. Take this is such way that there is
5313         no race condition between another thread starting the unload and the
5314         current thread acknowledging it.
5316         * threadpool.c (async_invoke_thread): Same.
5318         * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
5319         firing the new thread.
5321         * threadpool.c (start_tpthread): Same.
5323         * theadpool.c (append_job): Increment threadpool_jobs before queueing.
5325         * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
5327 2008-11-06  Jonathan Chambers  <joncham@gmail.com>
5329         * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle): 
5330         Add support for DuplicateHandle.
5331         
5332         * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
5333         Add support for DuplicateHandle.
5334         
5335         * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
5336         Add support for DuplicateHandle.
5338         Code is contributed under MIT/X11 license.
5340 2008-11-06  Mark Probst  <mark.probst@gmail.com>
5342         * class-internals.h: Make min_align into a whole byte.
5344         * class.c: Set min_align for SIMD types to 16.
5346 2008-11-05  Geoff Norton  <gnorton@novell.com>
5348         * attach.c: Default the attacher to enabled for all cases including
5349         embedded.
5351 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5353         * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
5354         change r117650.
5356 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5358         * monitor.c, monitor.h: New function for querying offsets of
5359         members of MonoThreadsSync.
5361 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5363         * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
5364         to speed up this function and to avoid the boundless memory growth caused by
5365         the signature_dup () calls.
5367 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
5369         * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
5370         wrapper.
5372         * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
5373         by 1 bit.
5375         * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
5377 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5379         * appdomain.c:
5380         * domain-internals.h: made mono_set_private_bin_path_from_config()
5381         "internal".
5382         * object.c: call the above function after setting the configuration
5383         file path for the root domain.
5384         Fixes bug #314478.
5386 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5388         * assembly.c: when the assembly is loaded from an absolute path, end
5389         basedir with a directory separator.
5390         Bug #440781 fixed.
5392 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5394         * monitor.c (mono_monitor_get_fast_enter_method): If
5395         CompareExchange is not available, don't create the fastpath
5396         instead of asserting.  (The method is missing in the 1.1 profile.)
5398 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5400         * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
5402         * monitor.c, monitor.h: Code for generating Monitor.Enter and
5403         Monitor.Exit IL fastpaths.
5405 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5407         * class.c (mono_class_create_from_typedef): Added Vector2ul.
5409 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5411         * class.c (mono_class_create_from_typedef): Added Vector2l.
5413 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5415         * class.c (mono_class_create_from_typedef): Added Vector2d.
5417 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5419         * appdomain.c: translate \ into / for cache_path.
5420         * domain-internals.h: new mono_is_shadow_copy_enabled().
5421         * icall.c: (fill_reflection_assembly_name) do the same path
5422         manipulations that get_code_base does.
5423         (get_code_base) use mono_is_shadow_copy_enabled.
5425 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
5427         * appdomain.c: shadow-copied assemblies go to CachePath +
5428         ApplicationName when both are set. DynamicBase has nothing to do with
5429         shadow copies.
5430         Bug #406877 fixed.
5432 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
5434         * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
5435         STANDALONESIG table.
5437         * metadata-internals.h (struct _MonoDynamicImage): Add cache for
5438         standalone signatures.
5440         * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature 
5441         comparison code: instead of comparing the signatures using a custom
5442         equals function, transform them to a common signature and compare that. This
5443         works better with AOT.
5445 2008-10-25  Zoltan Varga  <vargaz@gmail.com>
5447         * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
5449         * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
5450         call for generic instances.
5451         (mono_class_setup_properties): Call setup_properties () before accessing
5452         gklass->properties.
5454         * class.c (mono_class_get_virtual_methods): New helper function to iterate
5455         over the virtual methods of a class using metadata if possible, avoiding the
5456         creation of MonoMethod's for non-virtual methods.
5457         
5458         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
5459         get_virtual_methods () to iterate over the virtual methods of classes.
5461 2008-10-25  Martin Baulig  <martin@ximian.com>
5463         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
5465 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5467         * class.c (mono_class_create_from_typedef): Added Vector4i.
5469 2008-10-24  Mark Probst  <mark.probst@gmail.com>
5471         * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
5472         ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
5473         special-casing applies to eliminate the call completely.
5475 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5477         * class.c (mono_class_create_from_typedef): Added Vector8s.
5479 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5481         * class.c (mono_class_create_from_typedef): Added Vector16sb.
5483 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5485         * icall.c: get rid of annoying warning.
5487 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5489         * threadpool.c: in 1.x, if you change the background status of the
5490         threadpool thread, it's not reset.
5491         Remove unnecessary calls to SetState.
5493 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5495         * threadpool.c: asynchronously create a set of idle threads upon first
5496         use of the threadpool. SetMinThreads will now start the appropriate
5497         number of idle threads if they are not already running. The default is
5498         1 threadpool thread per CPU. Increased the maximum number of threads
5499         per CPU to 10.
5501 2008-10-22  Martin Baulig  <martin@ximian.com>
5503         Revert r116521 from Zoltan, it breaks the debugger:
5505         * class.c (mono_class_get_virtual_methods): New helper function to iterate
5506         over the virtual methods of a class using metadata if possible, avoiding the
5507         creation of MonoMethod's for non-virtual methods.
5508         
5509         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
5510         get_virtual_methods () to iterate over the virtual methods of classes.
5512 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5514         * threads.c: when creating a threadpool thread, set its state to
5515         'background'.
5516         * threadpool.c: reset the background state of a threadpool thread
5517         after finishing each work item
5518         Bug #437888 fixed.
5520 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
5522         * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
5523         
5524         * class.c (mono_class_setup_vtable_general): Add an optimized version for
5525         generic instances which works by inflating the methods in the container
5526         class's vtable.
5528         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
5529         variant which doesn't make a copy if no inflation was done.
5530         (mono_class_setup_fields): Use it.
5532         * metadata.c (mono_metadata_get_shared_type): New helper function to
5533         return a shared instance of a given MonoType.
5535         * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
5536         a copy of most non-generic types.
5538 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
5540         * threadpool.c: remove one more GetSystemInfo () call.
5542 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
5544         * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
5545         use the code in mono-proclib.h to get processor information.
5547 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5549         * appdomain.c: fixed the logic that determines whether assemblies in a
5550         directory are "shadow-copied" or not. Bug #433483 fixed.
5552 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
5554         * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
5555         warning.
5557 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5559         * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
5560         returning a vtype.
5562         * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
5563         reflection.c: Use mono_field_get_name () for accessing a field's name.
5565         * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
5566         class.c
5568         * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
5569         field.
5571         * loader.c (find_method_in_class): Reenable the metadata optimization by
5572         not using it for generic instances.
5574         * class-internals.h (MonoFieldDefaultValue): Extract the rarely used 
5575         data/def_type fields from MonoClassField into a separate structure.
5576         (struct MonoClassField): Remove data/def_type fields.
5577         (struct _MonoClass): Add a 'field_def_values' array to store the default
5578         values/RVA for fields.
5580         * class.c reflection.c: Update after the changes.
5581         
5582         * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
5583         for accessing field->data.
5585         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
5587         * loader.c (find_method_in_class): Revert the last change for now as
5588         it breaks Mono.C5 unit tests.
5590         * class-internals.h (struct _MonoDynamicGenericClass): Add fields
5591         'field_generic_types' and 'field_objects' which contain the information
5592         previously stored in MonoInflatedField.
5593         (MonoInflatedField): Delete.
5594         (struct _MonoClassField): Delete 'generic_info' field.
5596         * reflection.c: Store the information which was previously in 
5597         field->generic_info in MonoDynamicGenericClass instead.
5599         * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
5600         MonoClassField changes.
5602 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
5604         * marshal.c, method-builder.c: get rid of wrapper_hash and instead
5605         store the value inside the data array of the MonoMethodWrapper.
5606         This saves memory, is faster and fixes the lifetime issues (methods
5607         were never removed from the hash previously). May also fix bug#436996.
5609 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5611         * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic 
5612         generic instances, compute the type from the generic definition instead of
5613         looking in field->generic_info.
5615         * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
5616         for inflated fields, the only user was get_fieldref_token () which no
5617         longer needs it.
5619         * class.c (mono_class_init): Revert the last change as it seems to cause
5620         crashes.
5622         * class-internals.h (struct _MonoClassField): Reorder fields to save 4
5623         bytes on 64 bit platforms.
5625         * object.c (mono_class_create_runtime_vtable): Fix a warning.
5626         
5627         * object.c (mono_class_create_runtime_vtable): Don't initalize
5628         field->data/field->def_type here, it is done lazily by 
5629         mono_class_get_field_default_value ().
5631         * icall.c (ves_icall_get_enum_info): Call 
5632         mono_class_get_field_default_value () instead of directly accessing
5633         field->data and field->def_type.
5635         * object.c (get_default_field_value): Ditto.
5637         * class.c (mono_field_get_data): Ditto.
5638         
5639         * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
5640         call for generic instances.
5642         * loader.c (find_method_in_class): If klass != from_class, then inflate
5643         the method with the context of from_class, since the caller assumes this.
5645 2008-10-20  Zoltan Varga  <vargaz@gmail.com>
5647         * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
5648         for accessing method->slot.
5650 2008-10-20  Cedric Vivier  <cedricv@neonux.com>
5652         * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
5654 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5656         * class.c (mono_method_get_vtable_index): Use
5657         mono_method_get_vtable_slot () for accessing method->slot.
5659         * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
5660         accessing klass->methods.
5662         * class.c (mono_method_get_vtable_slot): New helper function.
5663         (mono_class_get_vtable_entry): Ditto.
5664         (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
5665         accessing method->slot.
5667         * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
5668         method to get_inflated_method ().
5670         * class.c (mono_class_get_inflated_method): New helper method to obtain
5671         a method of an inflated class without calling setup_methods ().
5672         (mono_class_get_cctor): Use get_inflated_method.
5674         * generic-sharing.c (mono_class_get_method_generic): Ditto.
5675         
5676         * marshal.c image.c: Lazily create all the marshal caches.
5678         * image.c (mono_image_init): Move initialization of runtime_invoke
5679         caches to marshal.c.
5681         * marshal.c (get_cache): New helper function to lazily initialize a 
5682         wrapper cache.
5683         (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
5685         * debug-helpers.c (mono_method_full_name): Include generic arguments.
5687 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
5689         * loader.c: fixed check for interface type.
5691 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
5693         * appdomain.c: check for NULL setup before it's referenced.
5696 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
5698         * class.c: remove the unused old vtable setup code.
5700 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
5702         * class.c: don't depend on interface order in
5703         setup_interface_offsets (bug #435777).
5704         * reflection.c: sort the InterfaceImpl table (patch from
5705         Jb Evain  <jbevain@novell.com>).
5707 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
5709         * assembly.c (mono_assembly_open_full): Avoid loading images while holding
5710         the low level assemblies lock.
5712 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
5714         * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
5715         object.c, reflection.c, socket-io.c, threads.c: introduced
5716         mono_framework_version () to return the major framewrok version,
5717         changed the code that was using more complex patterns to use it.
5718         Return the correct value for PlatformID for OSX.
5720 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
5722         * icall-def.h, process.h, process.c: added an icall to get info about
5723         processes using mono-proclib.
5725 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
5727         * mono-perfcounters.c: use the mono-proclib functions to
5728         access process information.
5730 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
5732         * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
5733         monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
5734         reflection.c: remove rawbuffer usage: mmap support is more sanely
5735         provided by utils/mono-mmap.
5737 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
5739         * gc.c: use posix semaphores when possible so that
5740         mono_gc_finalize_notify() is signal safe.
5742 2008-10-11  Zoltan Varga  <vargaz@gmail.com>
5744         * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
5745         #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
5746         be #ifdef-ed out, the linker will remove the rest.
5748         * marshal.c: Implement DISABLE_COM.
5750         * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
5752 2008-10-11  Miguel de Icaza  <miguel@novell.com>
5754         * locales.c (string_invariant_compare_char): Optimization: do not
5755         call g_unichar_type unless we actually need the information.
5757 2008-10-10  Mark Probst  <mark.probst@gmail.com>
5759         * object.c, class-internals.h: Also create remoting trampolines
5760         for generic methods.  Pass the domain to the remoting trampoline
5761         creation function, too.
5763 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
5765         * class.c (mono_class_init): Fix+re-enable the finalize optimization.
5767 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5769         * class.c (mono_class_create_from_typedef): Vector4u was renamed to
5770         Vector4ui.
5772 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
5774         * assembly.c:
5775         * locales.c: remove the use of g_strdown. Fixes bug #322313.
5777 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
5779         * assembly.c: in mono_assembly_load_friends() take the assemblies lock
5780         for the least possible amount of time (extending the fix in r113458).
5782 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5784         * class.c (mono_class_create_from_typedef): Retrofit to new type names.
5786 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
5788         * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
5789         as possible simd intrinsic types.
5790         Optimized the test to check for the common prefix first.
5792 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
5794         * class.c: back out part of a broken optimization committed on
5795         May 23th (bug #433908).
5797 2008-10-09  Mark Probst  <mark.probst@gmail.com>
5799         * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
5800         Win32.  Should fix #432388 for most cases until we have the new
5801         profiler on Win32.
5803 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
5805         * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
5806         instead of using inst->id so the hash is stable for AOT.
5808 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
5810         * appdomain.c:
5811         * icall.c: create a .ini file for shadow-copied assemblies that
5812         contains the location of the original assembly. Use this to return the
5813         proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
5814         Also fix the number of '/' for windows when returning the CodeBase.
5815         Fixes bug #430920.
5817 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
5819         * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
5821         Code is contributed under MIT/X11 license.
5823 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
5825         * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
5826           if if the class vtable needs initialized.
5828         Code is contributed under MIT/X11 license.
5830 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
5832         * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) : 
5833           Adding default MonoMarshalSpecs for COM methods.  OBJECT->STRUCT,
5834           STRING->BSTR, and CLASS->INTERFACE.
5836         Code is contributed under MIT/X11 license.
5838 2008-10-07  Marek Habersack  <mhabersack@novell.com>
5840         * sysmath.h: changed the declaration of the
5841         ves_icall_System_Math_Round2 icall by adding an extra
5842         away_from_zero parameter.
5844         * sysmath.c (ves_icall_System_Math_Round2): added support for
5845         away from zero rounding. The icall now takes an extra boolean
5846         parameter to signal that away from zero operation is requested.
5848 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
5850         * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
5851         the delegate klass so it can work with full-aot.
5852         (mono_marshal_get_delegate_end_invoke): Ditto.
5853         (mono_marshal_get_delegate_invoke): Ditto.
5855 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
5857         * gc.c, attach.h, attach.c: remove a bad pattern:
5858         add_finalizer_callback () is not implemented correctly, it can't
5859         without adding more overhead to the finalizer loop and it's not
5860         even needed, since we know exactly what we need to call, so there is
5861         no need to do so through an expensive function pointer.
5863 2008-10-04  Zoltan Varga  <vargaz@gmail.com>
5865         * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
5866         for the no-gc case.
5867         * attach.c (mono_attach_init): Remove the #ifdef.
5869 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
5871         * attach.c (mono_attach_init): Don't use
5872         mono_gc_add_finalizer_thread_callback when compiling without GC.
5873         Fixes #432306.
5874         
5875         Code is contributed under MIT/X11 license.
5877 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
5879         * class.c (mono_class_create_from_typedef): Remove the 
5880         #ifndef DISABLE_SIMD stuff.
5882 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
5884         * class-internals.h (MonoClass): Added simd_type bit field.
5886         * class.c (mono_class_create_from_typedef): Check if type is a simd
5887         intrinsic.
5889 2008-10-03  Mark Probst  <mark.probst@gmail.com>
5891         * object.c (mono_method_add_generic_virtual_invocation): Only add
5892         instantiations to the thunk whose count is at least as large as
5893         the threshold.
5895 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
5897         * icall.c: changed the Type of the exception thrown when trying to
5898         invoke a constructor on an abstract class. Part of the fix for bug
5899         #324185.
5901 2008-10-02  Mark Probst  <mark.probst@gmail.com>
5903         * class.c, class-internals.h (mono_method_get_vtable_index): New
5904         function which returns the index into the vtable and properly
5905         handles inflated virtual generic methods.
5907 2008-10-01  Mark Probst  <mark.probst@gmail.com>
5909         * object.c, domain.c, object-internals.h, domain-internals.h:
5910         Generalize IMT thunk machinery to also handle thunks for virtual
5911         generic method invokes.  When a virtual generic method is invoked
5912         more than a number of times we insert it into the thunk so that it
5913         can be called without lookup in unmanaged code.
5915         * generic-sharing.c, class-internals.h: Fetching a
5916         MonoGenericInst* for a method from an (M)RGCTX.
5918 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
5920         * marshal.c (emit_marshal_string): Applied a variant of a patch by
5921         tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
5922         marshalling. Fixes #431304.
5924 2008-10-01  Bill Holmes  <billholmes54@gmail.com>
5926         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
5927           handle when ref is specified without In or Out.
5929         Code is contributed under MIT/X11 license.
5931 2008-09-30  Mark Probst  <mark.probst@gmail.com>
5933         * loader.c (mono_get_method_constrained): Don't expand method with
5934         the class's context, because it's already a method of that class.
5936 2008-09-30  Atsushi Enomoto  <atsushi@ximian.com>
5938         * attach.c : should be correct build fix.
5940 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
5942         * attach.c: Fix the previous change.
5944 2008-09-29  Atsushi Enomoto  <atsushi@ximian.com>
5946         * attach.c : quick w32 build fix.
5948 2008-09-27  Miguel de Icaza  <miguel@novell.com>
5950         * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
5951         crashes MonoDevelop: #430455.
5953 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
5955         * domain-internals.h (struct _MonoDomain): Move most fields used only by
5956         the JIT do MonoJitDomainInfo in ../mini/mini.h.
5958         * domain.c: Remove initialization/cleanup of the removed fields.
5960 2008-09-27  Mark Probst  <mark.probst@gmail.com>
5962         * class.c (mono_class_generic_sharing_enabled): Enable generic
5963         code sharing for PPC.
5965 2008-09-26  Bill Holmes  <billholmes54@gmail.com>
5967         * attach.c : Fixing the Windows builds.
5969         Code is contributed under MIT/X11 license.
5971 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
5973         * class.c (mono_class_generic_sharing_enabled): Experimentally change 
5974         the default generic sharing mode to 'all'.
5976 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5978         * generic-sharing.c, class-internals.h: New function for checking
5979         whether a method needs a static RGCTX invoke wrapper.  A few
5980         funtions moved from mini/generic-sharing.c.
5982         * icall.c: New function used.
5984 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5986         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
5987         Static RGCTX invoke wrapping applies to value type methods, too.
5989         * class.c (mono_class_setup_vtable_general): In generic-shared
5990         value types, wrap methods with a static RGCTX invoke wrapper.
5992 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
5994         * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
5995         osx build.
5997 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
5999         * gc.c (mono_gc_add_finalizer_thread_callback): New function to
6000         register a callback which is called when the finalizer thread is woken
6001         up.
6002         (finalizer_thread): Call the callback if it exists.
6004         * attach.h attach.c: New files, implementing the attach mechanism.
6006         * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
6007         
6008         * object.c (mono_object_get_virtual_method): Fix an assertion introduced
6009         by the previous change.
6011 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
6013         * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
6014         loader.c, marshal.c, metadata-internals.h, metadata.c,
6015         method-builder.c, object.c, reflection.c: introduced specific functions
6016         to allocate from the domain and image mempools and cleaned up most of
6017         the code to use them (still missing a few in reflection.c).
6018         Keep the loader bytes counter updated.
6020 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
6022         * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
6023         loader-related counters.
6025 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
6027         * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
6028         added more MS-compatible counters.
6030 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
6032         * class.c (mono_class_setup_fields): Call setup_fields before accessing
6033         class->blittable. Fixes #428217.
6035 2008-09-21  Zoltan Varga  <vargaz@gmail.com>
6037         * reflection.c (mono_image_get_field_on_inst_token): Call 
6038         field_encode_signature () since that handles custom modifiers too.
6039         Fixes #424663.
6041 2008-09-20  Zoltan Varga  <vargaz@gmail.com>
6043         * reflection.c (add_custom_modifiers): New helper function to merge custom
6044         modifiers stored in objects to a MonoType.
6045         (fieldref_encode_signature): Encode custom modifiers.
6046         (mono_image_get_generic_field_token): Call add_custom_modifiers ().
6047         (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
6049 2008-09-19  Kornél Pál  <kornelpal@gmail.com>
6051         * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
6052         calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
6053         64-bit IL only images because imports are not resolved for IL only images.
6054         Special thanks to Bill Holmes for finding this bug and testing the patch.
6055         Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
6057         Contributed under MIT/X11 license.
6059 2008-09-19  Miguel de Icaza  <miguel@novell.com>
6061         * mono-config.c (dllmap_start): Add support for the bits keyword
6062         on dllentry and dllmap to easily detect 32 vs 64 bit systems.
6064 2008-09-19  Mark Probst  <mark.probst@gmail.com>
6066         * reflection.c (inflate_mono_method): When the class the method is
6067         to be inflated for is itself not inflated, just return the method.
6069 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
6071         * mono-perfcounters.c: use more user friendly process instance names.
6073 2008-09-18  Bill Holmes  <billholmes54@gmail.com>
6075         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
6076           handle "[in] ref" and "[in][out] ref" cases.
6078         * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
6079           to mono_mb_create_method.  This was causing problems calling native to
6080           managed passing Variants by value.
6082         Code is contributed under MIT/X11 license.
6084 2008-09-18  Zoltan Varga  <vargaz@gmail.com>
6086         * class.c (can_access_internals): Call mono_assembly_load_friends ()
6087         before accessing the friend_assembly_names field.
6089         * assembly.c (mono_assembly_load_friends): Make this callable multiple
6090         times.
6091         (mono_assembly_load_from_full): Avoid calling load_friends (), it is
6092         called lazily when it is needed.
6094         * metadata-internals.h (struct _MonoAssembly): Add 
6095         'friend_assembly_names_inited' flag.
6097 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
6099         * mono-perfcounters-def.h: fix the types of a few counters.
6100         * mono-perfcounters.c: implemented the instance names getter
6101         and a few bugfixes.
6103 2008-09-18  Atsushi Enomoot  <atsushi@ximian.com>
6105         * culture-info-table.h : regenerated.
6107 2008-09-17  Robert Jordan  <robertj@gmx.net>
6109         * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
6110         context bound objects. Fixes #415577.
6112         Code is contributed under MIT/X11 license.
6114 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
6116         * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
6117         implementation (bug #423582).
6119 2008-09-16  Zoltan Varga  <vargaz@gmail.com>
6121         * object.c (mono_object_get_virtual_method): Handle the case method->slot
6122         is not set. Fixes #426309.
6124 2008-09-16  Jb Evain  <jbevain@novell.com>
6126         * class.c (mono_class_from_name): fix the exported type look up
6127         when the type is defined in a referenced assembly.
6129 2008-09-16  Jb Evain  <jbevain@novell.com>
6131         * reflection.c (mono_image_fill_export_table_from_type_forwarders):
6132         increment the next index counter on each iteration to make that work
6133         for more than one type forwarder. Unmanaged part to fix #422929.
6135 2008-09-15  Mark Probst  <mark.probst@gmail.com>
6137         * object-internals.h: enum ComInterfaceType in
6138         MonoInterfaceTypeAttribute is guint32, not guint16.
6140 2008-09-12  Mark Probst  <mark.probst@gmail.com>
6142         * cil-coff.h, image.c, reflection.c: Endianness fixes in image
6143         writing code.
6145 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6147         * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
6148         not gboolean.
6150 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6152         * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
6153         Endianness fixes for MonoSymbolFileOffsetTable.
6155 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
6157         * process.c (complete_path) : Removing quotes from the 
6158           input path.  The glib file routines do not handle file paths
6159           that have quotes around them.
6161         Code is contributed under MIT/X11 license.
6163 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
6165         * socket-io.h : Adding a comment to provide locations where 
6166           changes to MonoSocketAsyncResult need to be synced.
6168         Code is contributed under MIT/X11 license.
6170 2008-09-10  Zoltan Varga  <vargaz@gmail.com>
6172         * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out 
6173         parameters as well. Fixes #425001.
6175 2008-09-08  Miguel de Icaza  <miguel@novell.com>
6177         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
6178         windows build.
6180 2008-09-07  Miguel de Icaza  <miguel@novell.com>
6182         * console-io.c: Add support for tracking the window size if it
6183         changes.
6185         The setup is very simple: the TtySetup function will now return a
6186         pointer to a location in memory that tracks the current console
6187         size.  The managed code checks its current value every time its
6188         queried against the last value set, and updates accordingly.
6190         With this setup we can work with multiple consoles, and we do not
6191         require to poke into managed code from a signal handler.
6193         Additionally, the environment for COLUMNS and LINES is now handled
6194         in unmanaged code.
6196         (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
6198 2008-09-07  Mark Probst  <mark.probst@gmail.com>
6200         * marshal.c (mono_type_native_stack_size): Treat
6201         MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
6203 2008-09-04  Jb Evain  <jbevain@novell.com>
6205         * class.c (mono_class_is_assignable_from): fix assignability of nullables
6206         to nullables.
6208 2008-09-03 Rodrigo Kumpera  <rkumpera@novell.com>
6210         * verify.c (verify_type_compatibility_full): Revert change
6211         to allow converting a native int to unmanaged pointer be verifiable
6212         under non-strict mode.
6213         It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
6215         * verify.c: Added some TODOs.
6217 2008-09-02  Bill Holmes  <billholmes54@gmail.com>
6219         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
6220           ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
6221           Changed to use GlobalAlloc for the memory returned on Windows platforms.
6223         Code is contributed under MIT/X11 license.
6225 2008-09-02  Jb Evain  <jbevain@novell.com>
6227         * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
6229 2008-09-02 Rodrigo Kumpera  <rkumpera@novell.com>
6231         reflection.c (typebuilder_setup_fields): Handle classes with
6232         explicit size.
6234 2008-09-01 Rodrigo Kumpera  <rkumpera@novell.com>
6236         class.c (mono_class_setup_events): Add memory barrier due to
6237         double checked locking.
6238         
6239         class.c (mono_class_setup_properties): Same.
6241 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
6243         * class.c (mono_class_is_assignable_from): Fix the build.
6244         
6245         * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
6246         before accessing klass->interface_bitmap. Fixes #421744.
6248 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
6250         * appdomain.c (mono_runtime_set_no_exec): New internal function setting
6251         the runtime into no-exec mode, useful when running the AOT compiler.
6253         * appdomain.c gc.c object.c: Avoid executing managed code when running
6254         in no-exec mode.
6255         
6256         * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
6258         * reflection.c (_mono_reflection_get_type_from_info): Handle the 
6259         special case when the mono_assembly_loaded () returns NULL because the 
6260         search hook is not installed.
6262 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
6264         * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
6265         crashes in bstr marshalling on linux.
6267 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
6269         * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
6270         with more than one parameter.
6272 2008-08-24  Miguel de Icaza  <miguel@novell.com>
6274         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
6275         start/stop flow control as well when turning off ICANON (allows
6276         C-s and C-q to be read by Console.ReadKey).
6278 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
6280         * class.c (mono_class_init): Move the initialization of nested classes
6281         into mono_class_get_nested_types (). Fixes #418433.
6283         * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
6284         flag.
6286         * class.c reflection.c icall.c: Use mono_class_get_nested_types () for 
6287         iterating tough the nested classes of a class.
6289 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
6291         * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
6292         on arm.
6294 2008-08-22  Miguel de Icaza  <miguel@novell.com>
6296         * console-io.c (sigcont_handler): Support signal chaining for
6297         SIGCONT.
6299         (console_set_signal_handlers): Use best practices with sigaction,
6300         clear the structure before using it. 
6302 2008-08-22  Robert Jordan  <robertj@gmx.net>
6304         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
6305         Fix the Windows build.
6307 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
6309         * class.c (mono_class_generic_sharing_enabled): Make the default
6310         sharing mode 'corlib'.
6312 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
6314         * console-io.c (console_set_signal_handlers): Fix a warning.
6316         * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
6317         method normally, the JIT will take care of avoiding recursion.
6319 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
6321         * console-io.c : Fixing builds for platforms that do not have <termios.h>.
6323         Code is contributed under MIT/X11 license.
6325 2008-08-20  Miguel de Icaza  <miguel@novell.com>
6327         * console-io.c (sigcont_handler): We need to restore the entire
6328         termios state, not only the original settings, as things like echo
6329         can be controlled after this (Booish exposes this issue with its
6330         own ReadLine implementation).
6332         Additionally, we need to set the terminal back into keypad_xmit
6333         mode.
6334         
6335         (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
6336         string as a paramter as well.   Otherwise we get different
6337         keyboard sequences.
6339 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
6341         * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
6342         delegates with byref out parameter passing. Fixes #351520.
6344         * debug-helpers.c (mono_context_get_desc): New helper function to stringify
6345         a generic context.
6346         (mono_type_get_desc): Add the type arguments for GENERICINST.
6347         (mono_method_full_name): Stringify the class name using mono_type_full_name
6348         so it picks up generic arguments.
6350 2008-08-19  Gert Driesen  <drieseng@users.sourceforge.net>
6352         * console-io.c: Removed debug output.
6354 2008-08-19 Rodrigo Kumpera  <rkumpera@novell.com>
6356         reflection.c (mono_reflection_create_runtime_class): Alloc
6357         the nested classes linked list using the dynamic image mempool.
6358         Fixes leak in corlib compilation.
6360 2008-08-19  Miguel de Icaza  <miguel@novell.com>
6362         * console-io.c: Fix incredibly annoying behavior on the console
6363         after resuming execution after control-z.   This affected every
6364         console application.
6366 2008-08-18 Rodrigo Kumpera  <rkumpera@novell.com>
6368         * mempool-internals.h: Header for mono private mempool functions. The first
6369         two function are for allocating glib linked lists using pools.
6371         * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
6373         * Makefile.am: Added mempool-internals.h.
6375 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
6377         * domain.c (mono_domain_create): Call the JIT domain hook if installed.
6378         (mono_domain_free): Ditto.
6380         * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
6381         be used by the JIT to store its domain-specific information, instead of putting
6382         it directly into MonoDomain.
6384         * domain.c (mono_install_create_domain_hook): New helper function to install
6385         a hook which initializes domain->runtime_info.
6387         * domain.c (mono_install_free_domain_hook): Ditto.
6388         
6389 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
6391         * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
6392         asserting if the ares parameter is null.
6394         * mono-perfcounters.c: Fix warnings.
6396         * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
6397         is not needed, don't check for interruptions either.
6398         (mono_marshal_get_delegate_end_invoke): Ditto.
6400 2008-08-15  Marek Habersack  <mhabersack@novell.com>
6402         * mono-perfcounters.c (predef_readonly_counter): added support for
6403         reading the ASP.NET Requests Queued counter from another process.
6405 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
6407         * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
6408         MonoImage to simplify the AOT code.
6410 2008-08-10  Zoltan Varga  <vargaz@gmail.com>
6412         * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
6413         marshalling. Fixes #416078.
6415 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
6416         
6417         * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
6418         it is set, looking up the icall address is deferred to the JIT, since 
6419         in embedded scenarios, the icall might not be registered in the runtime
6420         doing the AOT compilation. Backported from the 2.0 branch.
6422 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
6424         * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
6425         Fixes #415621.
6427 2008-08-05  Marek Habersack  <mhabersack@novell.com>
6429         * Makefile.am: added support for cross-compilation.
6431 2008-08-04  Zoltan Varga  <vargaz@gmail.com>
6433         * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
6435 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
6437         * mono-perfcounters.c: jitted methods and jitted bytes counters.
6439 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
6441         * class-internals.h, icall-def.h, mono-perfcounters-def.h,
6442         mono-perfcounters.c: performance counters implementation.
6444 2008-07-31  Zoltan Varga  <vargaz@gmail.com>
6446         * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
6447         to gpointer, letting the AOT code decide what to store in it.
6449 2008-07-31  Bill Holmes  <billholmes54@gmail.com>
6451         * marshal.c (cominterop_get_native_wrapper) : Adding a call to 
6452           mono_class_setup_methods if the methods are not initialized.
6454         Code is contributed under MIT/X11 license.
6456 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
6458         * verify.c: Remove some debug code I commited by accident.
6460         * verify.c (mono_method_is_valid_in_context): Change the return value
6461         to make possible to distinguish between invalid and unverifiable.
6463         * verify.c (verifier_load_method): Don't return NULL for unverifiable
6464         methods.
6466 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
6468         * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
6469         constraints. Fixes regression in gtest-253.
6471 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
6473         * verify.c (mono_verifier_verify_class): Don't allow generic types
6474         with explicit layout.
6476         * verify.c (mono_method_verify): Check locals and argument types.
6478 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
6480         * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
6481         wait if the thread is in StopRequested state.
6483         * class.c (mono_class_from_name): Refactor the module searching code into
6484         a separate function so it can be reused in the AOT case too.
6486 2008-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
6488         * verify.c (mono_type_is_valid_in_context): Improve the error message.
6489         Check both the type and it's generic type definition for loader errors.
6490         
6491         * verify.c (mono_method_is_valid_in_context): Don't generate another
6492         error when a type errors occur, this leads to the wrong exception been
6493         thrown.
6495 2008-07-28  Dick Porter  <dick@ximian.com>
6497         * icall-def.h
6498         * process.c
6499         (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
6500         New internal calls to duplicate and close a process handle.
6502 2008-07-27  Andreas Färber  <andreas.faerber@web.de>
6504         * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
6506 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
6508         * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
6510 2008-07-27  Robert Jordan  <robertj@gmx.net>
6512         * class.c (mono_class_init): Don't compute class.has_finalize for
6513         valuetypes. Fixes #412477.
6515 2008-07-25 Rodrigo Kumpera  <rkumpera@novell.com>
6517         * verify.c: Implement constraint equivalence checking.
6518         This is required when a generic parameter is used as
6519         argument to a constrained one.
6521         Fixes #410637.
6523 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
6525         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6527         * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
6529         * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
6530         synch with managed object layout.
6532 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
6534         * verify.c (do_branch_op): Handle valuetypes and generic
6535         arguments properly.
6537         * verify.c (do_cmp_op): Same.
6539         Fixes #410383.
6541 2008-07-24  Mark Probst  <mark.probst@gmail.com>
6543         * generic-sharing.c: Fix memory leaks.
6545         * class.c, class-internals.h: Make
6546         mono_class_inflate_generic_type_with_mempool() non-static.
6548 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
6550         * pedump.c (dump_verify_info): Dump full class name.
6552 2008-07-24  Mark Probst  <mark.probst@gmail.com>
6554         * generic-sharing.c: Removed some old code that didn't do anything.
6556 2008-07-24  Massimiliano Mantione  <massi@ximian.com>
6557         * profiler.c: Added runtime_initialized_event,
6558         mono_profiler_install_runtime_initialized and
6559         mono_profiler_runtime_initialized. This new hook tells the profiler
6560         when the runtime is sufficiently initialized to be able to call
6561         mono_thread_attach on the root appdomain.
6562         * profiler.h, profiler-private.h: Likewise.
6564 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
6566         * verify.c (do_cast): Do boxing for generic arguments as well.
6568         * class.c (is_nesting_type): Drop generic instantiations before
6569         checking for nesting.
6571         * class.c (can_access_instantiation): Allow access to generic
6572         arguments.
6574 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
6576         * verify.c (verify_class_for_overlapping_reference_fields):
6577         On some cases, the field size might be zero, guard against that.
6578         Fix the explicit layout check to work as expected.
6580 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
6582         * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling 
6583         mono_thread_resume () during shutdown, since the thread we want to abort
6584         might be suspended.
6586 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
6588         * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a 
6589         warning.
6591         * debug-mono-symfile.c: Fix a warning.
6593         * mono-perfcounters.c (get_cpu_times): Fix a warning.
6595         * object.c (mono_class_vtable): Check if exception_type is set, and return
6596         NULL as defined by the function comments.
6598 2008-07-22  Mark Probst  <mark.probst@gmail.com>
6600         * mempool.c: Use malloc for every single mempool allocation if the
6601         configure option is set.  This makes it easier to track mempool
6602         allocations with tools like Valgrind.
6604 2008-07-22  Jb Evain  <jbevain@novell.com>
6606         * reflection.c (create_dynamic_mono_image): emit the same
6607         metadata version that SL2 does when creating a SL2 image.
6609 2008-07-21 Rodrigo Kumpera  <rkumpera@novell.com>
6611         * icall-def.h:
6612         * icall.c: New icall System.Enum:get_hashcode. This function
6613         avoids the overhead of boxing the enum to the underlying type.
6615 2008-07-21  Mark Probst  <mark.probst@gmail.com>
6617         * reflection.c (mono_method_get_object): Don't let static RGCTX
6618         invoke wrappers get into MonoReflectionMethods.
6620 2008-07-17 Rodrigo Kumpera  <rkumpera@novell.com>
6622         * object-internals.h:
6623         * object.c: New mono_runtime_class_init_full function
6624         that makes throwing the exception optinal.
6626         * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
6627         for the case where the exception object is supplied.
6629 2008-07-16  Kornél Pál  <kornelpal@gmail.com>
6631         * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
6632         old ld versions.
6634         Contributed under MIT/X11 license.
6636 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
6638         * string-icalls.c (ves_icall_System_String_InternalSplit):
6639         Optimize array allocation by caching the MonoClass of the
6640         array type.
6642         * icall.c (ves_icall_Type_GetMethodsByName): Same.
6644         * reflection.c (mono_param_get_objects): Same.
6646 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
6648         * icall-def.h:
6649         * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
6650         It inflates the given type using the class context.
6652 2008-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
6654         * object.c (mono_class_try_get_vtable): New function. Tries to fetch
6655         the vtable if it already exists.
6657         * object-internals.h: Add mono_class_try_get_vtable as part of the
6658         internal API.
6660         * reflection.c (mono_type_get_object): Use the MonoObject from the
6661         vtable when possible. Reduces locking contention on reflection heavy
6662         code.
6664 2008-07-15  Zoltan Varga  <vargaz@gmail.com>
6666         * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
6667         g_bit_nth_msf () since that macro is not implemented in eglib.
6669 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
6671         * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
6672         on platforms which do not support it.
6674 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
6676         * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
6678 2008-07-11  Martin Baulig  <martin@ximian.com>
6680         * mono-debug-debugger.h
6681         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
6683         * mono-debug-debugger.c
6684         (_mono_debugger_interruption_request): New global volatile variable.
6685         (mono_debugger_check_interruption): New public function.
6687         * threads.c
6688         (mono_thread_current_check_pending_interrupt): Call
6689         mono_debugger_check_interruption().
6690         (mono_thread_interruption_checkpoint_request): Likewise.
6692 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6694         * verify.c: Add more type checks for loaded types. Verify the result
6695         handle from ldtoken.
6697 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6699         * loader.c (field_from_memberref): Don't crash if the field
6700         wasn't found.
6702 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6704         * verify.c: Verify if type and method instantiations
6705         don't have invalid VAR or MVAR arguments.
6707 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6709         * verify.c: Fix double free of function pointer list.
6711 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6713         * object.c (mono_string_to_utf8): Comment the new code as it
6714         breaks under eglib.
6716 2008-07-08 Rodrigo Kumpera  <rkumpera@novell.com>
6718         * object.c (mono_string_to_utf8): Avoid allocating a temp array.
6720 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
6722         * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
6723           is not throw too many times.
6725         Code is contributed under MIT/X11 license.
6727 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
6729         * mono-debug.c (mono_debug_find_method): Allow this to be called even when
6730         debugging is turned off.
6732 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
6734         * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
6736 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6738         * class-internals.h, class.c: Added new generic sharing option:
6739         Share only stuff in System.Collections.Generic, which is now the
6740         default.
6742 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6744         * generic-sharing.c, class-internals.h: New function for getting a
6745         generic method in a generic class given the corresponding method
6746         for a different instantiation of the class.  Partly refactored
6747         from mini-trampolines.c.
6749         * class.c: Make sure generic methods have a class_inst if they are
6750         part of a generic class.
6752         * metadata.c (mono_type_stack_size_internal): Handle type
6753         variables.
6755 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6757         * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
6758         Signifies whether information on the this/vtable/mrgctx variable
6759         is available.
6761 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6763         * object.c, object-internals.h, icall.c: New function
6764         mono_delegate_ctor_with_method(), which does the same as
6765         mono_delegate_ctor(), but takes an explicit method argument
6766         instead of taking the method from the jit info.
6768         * marshal.c: When creating a delegate with an inflated method take
6769         the "this" argument as the target class for the castclass.
6771 2008-07-03  Mark Probst  <mark.probst@gmail.com>
6773         * domain.c (mono_jit_info_table_find): Fixed a bug that caused
6774         mono_jit_info_table_find() to perform very badly in some cases.
6776 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
6778         * icall.c (type_from_typename): Handle 'string'.
6780         * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
6781         wrappers into the wrapper_hash, since the key is not a MonoMethod.
6783 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
6785         * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
6787         * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
6788         number of available managed allocator types.
6790         * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
6791         (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
6793 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
6795         * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
6796         which is a low level lock protecting just the 'jit_code_hash' hash table.
6798         * domain.c: Initialize+cleanup jit_code_hash_lock.
6799         
6800 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
6802         * coree.c (mono_load_coree): Set coree_module_handle global variable only
6803         after initialization.
6805         * coree.h: Make MonoFixupExe internal.
6807         Contributed under MIT/X11 license.
6809 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
6811         * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
6812         because that is platform independent. Check NumberOfRvaAndSizes in PE32
6813         as well.
6814         (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
6815         image being loaded is a CLI image and _CorValidateImage gets called.
6817         * coree.h: Add MonoLoadImage.
6819         * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
6820         instead of LoadLibrary.
6822         Contributed under MIT/X11 license.
6824 2008-06-29 Rodrigo Kumpera  <rkumpera@novell.com>
6826         * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
6827         for any primitive type.
6829 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
6831         * object.c (mono_array_new_specific): Optimize this and the other allocation
6832         functions a bit.
6833         
6834         * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
6835         domains too if mono_dont_free_domains is set.
6837         * domain-internals.h (mono_dont_free_domains): New internal option controlling
6838         whenever to free appdomain data after it has been unloaded.
6840         * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
6841         
6842 2008-06-28  Zoltan Varga  <vargaz@gmail.com>
6844         * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
6845         (mono_method_get_equivalent_method): Fix a warning.
6847         * object.c (mono_message_init): Avoid looking up array types for each call.
6849 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
6851         * object.c (mono_message_invoke): Avoid looking up the object[] type for each
6852         call.
6854         * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
6855         even more.
6857         * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
6858         each iteration.
6860         * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
6861         fields of an enum.
6863 2008-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
6865         * object.c (mono_value_box): Fix boxing of nullables.
6867 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
6869         * assembly.c (mono_set_rootdir): Use __ImageBase instead of
6870         mono_module_handle that is defined by the linker; no initialization required.
6871         * coree.h: Remove mono_module_handle, add __ImageBase, update
6872         mono_image_open_from_module_handle.
6873         * coree.c (_CorValidateImage): Convert platform independent PE32 images to
6874         PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
6875         (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
6876         memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
6877         to 4 GB away from image base address. IA64 version is not tested but was very
6878         easy to implement and should work if we ever need it.
6879         * domain.c (mono_init_internal): Avoid system error message boxes.
6880         * image.c (mono_image_open_from_module_handle): Replace ref_count argument
6881         with has_entry_point. Handle do_mono_image_load fauilre correctly.
6882         (mono_image_open_full, mono_image_close): Use has_entry_point instead of
6883         coff_attributes that is a more reliable way to detect if _CorDllMain was called.
6884         * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
6886         Contributed under MIT/X11 license.
6888 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
6890         * class.c, class-internals.h: Export mono_class_get_generic_type_definition
6891         as part of the private mono API.
6892         
6893         * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
6894         Do proper argument checking for methods that belong to generic classes.
6895         Do proper type resolution for GMFH/2.
6896         Fixes #377324.
6897         
6898 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
6900         * verify.c (do_switch): Fix a memory corruption bug with
6901         the jump index is out of bound.
6903 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
6905         * verify.c: Disable debug code.
6907 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
6909         * reflection.c (mono_image_get_methodbuilder_token): Use
6910         mono_image_get_methodspec_token_for_generic_method_definition
6911         instead of mono_image_get_memberref_token. We cache more memberef
6912         entries now.
6914 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
6916         * verify.c: Inflate exception clause types.
6917         Fixes #402606.
6918         
6919 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
6921         * reflection.c (mono_image_get_methodbuilder_token): Don't leak
6922         name.
6924         * reflection.c (mono_image_get_ctorbuilder_token): Same.
6926         * reflection.c (mono_image_create_method_token): Same.
6928 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
6930         * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
6931         It does the same as mono_image_get_methodref_token but works on
6932         MethodBuilder.
6934         * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
6935         and always generate a methodspec. This follows the old behavior and fixes
6936         the regressions in System.Core. 
6938 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
6940         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where 
6941         don't event mono_class_get () succeeds. Fixes #402182.
6943 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
6945         * metadata-internals.h: Added MonoDynamicImage::methodspec
6946         hashtable to store methodspec tokens created for MethodBuilders.
6948         * reflection.c (mono_image_get_methodbuilder_token): Encode generic
6949         MethodBuilders as open instantiations if a methodspec was requested.
6951         * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
6953         * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
6955         * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
6957         Fixes bug #349190.
6959 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
6961         * loader.c (method_from_methodspec): Avoid crashing if the
6962         method lookup fails.
6964 2008-06-20  Dick Porter  <dick@ximian.com>
6966         * socket-io.c (get_socket_assembly): Cope with Moonlight network
6967         classes being in a different assembly.  Fixes bug 399184.
6969 2008-06-20  Zoltan Varga  <vargaz@gmail.com>
6971         * loader.c (mono_loader_init): Make this callable multiple times.
6972         (mono_dllmap_insert): Call mono_loader_init () so this works even before
6973         the runtime is initialized. Fixes #401755.
6975 2008-06-19  Dick Porter  <dick@ximian.com>
6977         * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
6978         Fixes bug 349688.
6980 2008-06-19  Dick Porter  <dick@ximian.com>
6982         * socket-io.c:
6983         * icall-def.h: Implement Socket generic Send() and Receive()
6984         methods.  Fixes bug 395168.
6986 2008-06-19  Kornél Pál  <kornelpal@gmail.com>
6988         * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
6990         Contributed under MIT/X11 license.
6992 2008-06-18  Martin Baulig  <martin@ximian.com>
6994         * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
6995         `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
6996         set to 80.0.  The debugger <-> runtime interface is now frozen as
6997         well.   
6999         * mono-debug.c
7000         (mono_debug_debugger_version): Bump to 4.
7002 2008-06-18  Martin Baulig  <martin@ximian.com>
7004         * debug-mono-symfile.c
7005         (load_symfile): Don't check the minor version.
7007         * debug-mono-symfile.h: Bump the version number to 50.0.
7009 2008-06-18  Martin Baulig  <martin@ximian.com>
7011         * debug-mono-symfile.c
7012         (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
7013         minimum required version.
7015 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
7017         * reflection.c (mono_custom_attrs_from_property): Fix support for
7018         retriveving cattrs of dynamic inflated generic types.
7020         * reflection.c (mono_custom_attrs_from_event): Same.
7022         * reflection.c (mono_custom_attrs_from_field): Same;
7024         * reflection.c (typebuilder_setup_events): Same cattrs of events.
7026         * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
7027         Moved to metadata.c.
7029         * metadata.c: New functions to retrive the equivalent field, event
7030         of property from the generic type definition.
7032         * metadata-internals.h: Added new functions from metadata.c.
7034 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
7036         * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
7037         to cached in a mempool is used.
7039         * metadata.c (free_generic_class): In some situations field generic_info type
7040         is not properly dup'ed and leads to double free'ing.
7042         Fixes #400643.
7044 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7046         * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
7047         this arguments (will be needed later for generic methods).
7048         Collect stats.
7050 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7052         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
7053         Create a static RGCTX invoke wrapper for methods which require it.
7055 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7057         * object.c, class-internals.h: New function for checking whether
7058         an individual field is special static.
7060 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
7062         * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
7063         linear search since the table is sorted.
7065         * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
7066         Fixes #324180.
7068 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
7070         * appdomain.c (unload_thread_main): Applied patch from Tim Howard 
7071         (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
7073         * gc.c (mono_domain_finalize): Allow an infinite timeout.
7075         * threads.c (mono_threads_abort_appdomain_threads): Ditto.
7076         
7077         * threads.c (mono_thread_request_interruption): Get rid of locking, use
7078         InterlockedCompareExchange to query and modify 
7079         thread->interruption_requested.
7081         * object-internals.h (struct _MonoThread): Change interruption_requested
7082         to a gint32 so it can be modified by atomic operations. Add 
7083         'critical_region_level' from the managed side, change small_id to a guint32,
7084         add new set of 'unused' fields.
7086         * appdomain.c: Bump corlib version.
7088 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
7090         * class.c (mono_class_from_name): Search modules as well. Fixes
7091         #322332.
7093 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7095         * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
7096         templates.  Templates are generalized with an additional type_argc
7097         argument.  RGCTX templates have type_argc==0, MRGCTX templates
7098         have type_argc>0.
7100         * domain-internals.h, domain.c: New hash table for looking up
7101         MRGCTXs.
7103         * metadata.c, metadata-internals.h: Rename hash and equal
7104         functions for MonoGenericInst's and make them public.
7106         * class-internals.h: New data structures for the MRGCTX.  Macros
7107         for distinguishing slots in the RGCTX and the MRGCTX.
7109 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7111         * object.c (mono_method_get_imt_slot): Put the same methods of
7112         different instantiations of the same generic interface in the same
7113         IMT slots, to make generic sharing simpler.
7115 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
7117         * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
7119         * metadata.c (mono_metadata_field_info_with_mempool): Added.
7120         This function works just like mono_metadata_field_info, but
7121         accept a mempool as argument to be used allocating memory.
7123         * marshal.c (mono_marshal_load_type_info): Use new function
7124         to load marshal data into image mempool.
7126 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
7128         * class.c (mono_class_inflate_generic_type_with_mempool):
7129         This function allows to inflate a generic type using
7130         a mempool.
7132         * class.c (inflate_generic_type): Take a mempool as argument
7133         and use it to do type dup'ing.
7135         * class.c (mono_class_setup_fields): Field type for generic
7136         generic classes are allocated from the image mempool.
7138         * metadata.c (free_generic_class): Inflated field type is
7139         now allocated in the image mempool.
7141 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
7143         * threads.c (thread_cleanup): Free MonoThread::name.
7145 2008-06-12  Marek Habersack  <mhabersack@novell.com>
7147         * appdomain.c (ensure_directory_exists): avoid unnecessary
7148         mkdir(2) calls when the shadow directory already exists.
7149         (mono_make_shadow_copy): copy also satellite assemblies from the
7150         private bin directories.
7152 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
7154         * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
7155         
7156         * threads.c (mono_thread_get_stack_bounds): Align the stack address to
7157         a page boundary. Fixes #396219.
7159 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7161         * marshal.c (mono_marshal_load_type_info): Add a memory barrier
7162         due to double-checked locking.
7164 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7166         * assembly.c (build_assembly_name): Release memory on failure.
7168         * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
7170 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7172         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
7173         memory on failure.
7175 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7177         * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
7178         memory on failure.
7180 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7182         * loader.c (field_from_memberref): Check if field signature type is equal
7183         to the non-inflated type of the field. Fixes #398980.
7185 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
7187         * assembly.c (mono_assembly_load_from_full): Call 
7188         mono_assembly_load_friends () outside the assemblies lock, since it can
7189         acquire the loader lock. Fixes #323696.
7191         * reflection.c (resolve_object): Inflate the inst with the context for
7192         FieldOnTypeBuilderInst. Fixes #399010.
7194 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7196         * reflection.c (mono_image_get_field_on_inst_token): Don't
7197         inflate the field to encode it's signature. If it's a
7198         VAR or MVAR it should stay that way in the signature.
7199         Fixes #399047.
7201 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7203         * reflection.c (resolve_object): Release memory of inflated types.
7205 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7207         * loader.c (mono_method_get_signature_full): Remove assert about
7208         loading a methodspec to a generic method. We have such methods, such as
7209         System.Threading.Interlocked::CompareExchange<T>.
7210         This assert was removed since it crashes the verifier when it checks
7211         methods calling CompareExchange<T>.
7213 2008-06-10  Marek Safar  <marek.safar@gmail.com>
7215         * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
7216         of Type array and not MonoType.
7218 2008-06-10  Marek Habersack  <mhabersack@novell.com>
7220         * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
7221         <lupus@ximian.com>
7223 2008-06-10  Martin Baulig  <martin@ximian.com>
7225         * debug-mono-symfile.h
7226         (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6.  There were no
7227         changes to the file format, but we were generating incorrect
7228         source file indices in the line number table due to a bug, which
7229         made backtraces report an incorrect source file.
7231 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
7233         * mono-debug.c: Moved mono_debug_free_method_jit_info from
7234         mini/debug-mini.c to here.
7236         * mono-debug.c (il_offset_from_address): Free memory from find_method.
7238         * mono-debug.h: Export mono_debug_free_method_jit_info, users should
7239         use it to release structs returned by mono_debug_find_method.
7241 2008-06-10  Zoltan Varga  <vargaz@gmail.com>
7243         * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
7244         since it needs to set method->slot for all interface methods.
7246 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
7248         * class-internals.h: Forgot to add.
7250 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
7252         * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
7254         * reflection.c (lookup_custom_attr): Added a MonoImage argument.
7255         Lookup the custom attributes from property_hash.
7257         * reflection.c (mono_save_custom_attrs): Save the custom attributes
7258         in property_hash. Allocate all data using the image mempool.
7260         * reflection.c: Removed dynamic_custom_attrs. Changed all checks
7261         for dynamic_custom_attrs to checks if the image is dynamic.
7263 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
7265         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
7266         assemblies array.
7267         
7268         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
7269         runtime functions while holding the domain assemblies lock.
7271 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
7273         * verify.c: Reapplied the last bit of the reverted changes.
7275 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
7277         * verify.c: Reapplied more of the reverted changes.
7279 2008-06-09  Martin Baulig  <martin@ximian.com>
7281         * debug-mono-symfile.c (load_symfile): Check the major version
7282         first; if it's wrong, don't print the minor version in the error message.
7284 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
7286         * appdomain.c (set_domain_search_path): Make this use the domain assemblies
7287         lock instead of the domain lock to avoid deadlocks, since the thread might
7288         already hold the loader lock.
7290         * threads.c (start_wrapper): Call mono_monitor_init_tls ().
7291         (mono_thread_attach): Ditto.
7293         * monitor.c: Use a TLS variable for holding the current thread id instead
7294         of calling pthread_self ().
7295         (mono_monitor_init_tls): New internal function to initialize the TLS
7296         variable.
7297         (mono_monitor_try_enter_internal): Put the owner == id check after the
7298         owner == 0 check.
7300         * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
7301         missed optimizations when using gcc-4.3.
7303 2008-06-08 Rodrigo Kumpera  <rkumpera@novell.com>
7305         * reflection.c (mono_dynamic_image_free): Free the memory
7306         used by MonoGenericParam in MonoDynamicImage::gen_param.
7308         * reflection.c (mono_reflection_setup_generic_class): Allocate
7309         container from mempool.
7311         * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
7312         container from mempool.
7314 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
7316         * threads.c (mono_set_pending_exception): New internal function to set the
7317         pending exception of the current thread.
7318         (mono_thread_get_and_clear_pending_exception): Check for 
7319         thread->pending_exception as well.
7321         * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
7323         * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
7324         it can trigger a collection.
7326 2008-06-06  Martin Baulig  <martin@ximian.com>
7328         Merged the `debugger-kahalo' branch.
7330         * mono-debug.h
7331         (MONO_DEBUGGER_VERSION): Bumped to 72.
7333         * debug-mono-symfile.h
7334         (MonoSymbolFileMethodIndexEntry): Removed.
7335         (MonoSymbolFileMethodEntry): New public typedef.
7336         (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
7337         (MonoSymbolFileSourceEntry): Remove everything except `index' and
7338         `data_offset'.
7339         (MonoSymbolFileMethodEntry): Removed.
7340         (MonoSymbolFileLexicalBlockEntry): Removed.
7341         (MonoSymbolFileLineNumberEntry): Removed.
7342         (MonoDebugLexicalBlockEntry): Removed.
7343         (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
7344         removed `num_il_offsets' and `il_offsets'.
7345         (MonoSymbolFile): Replace `version' with `major_version' and
7346         `minor_version'.
7347         (MONO_SYMBOL_FILE_VERSION): Replace with
7348         `MONO_SYMBOL_FILE_MAJOR_VERSION' and
7349         `MONO_SYMBOL_FILE_MINOR_VERSION'.
7351         * debug-mono-symfile.c
7352         (mono_debug_symfile_lookup_location): Add support for the new line
7353         number table format.
7355 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7357         * metadata.c (free_generic_class): Release the inflated
7358         MonoClass of dynamic generic classes if it's not a generic
7359         type definition.
7361 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7363         * verify.c: Reapplied more of the reverted changes.
7365 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7367         * reflection.c (lookup_custom_attr): Clean the cached flag or
7368         nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
7369         for SRE types.
7371 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7373         * verify.c: Reapplied a small part of the reverted changes.
7375 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
7377         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7379         * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was 
7380         previously in managed code.
7381         (mono_monitor_exit): Ditto.
7382         (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
7384         * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
7385         the managed definition.
7387 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
7389         * verify.c: Revert changes to see if it helps with weird buildbot crashes.
7391 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
7393         * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
7394         
7395         * monitor.c: Add some micro optimizations.
7397         * icall.c (type_from_typename): Handle 'bool'.
7399 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
7401         * verify.c: Implement constructor verification per P III 1.8.1.4.
7402         Fixes #396716.
7404 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
7406         * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
7407         holding the assemblies lock here too.
7409 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7411         * verify.c: Kill stack_top function.
7413 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7415         * verify.c: Kill stack_get function.
7417 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7419         * verify.c (mono_method_verify): Last change broke the build. Fixed.
7421 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7423         * verify.c (verify_type_compatibility_full): Make SZARRAY checks
7424         more reliable.
7426         * verify.c (mono_method_verify): Inflate params and locals to avoid
7427         mismatch when checking for compatibility.
7429 2008-06-05  Jonathan Chambers  <joncham@gmail.com>
7431         * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
7432         Length prefix should be size in bytes. Fix bug #339530.
7433         
7434         * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
7435         Length prefix should be size in bytes. Fix bug #339530.
7437         Code is contributed under MIT/X11 license.
7439 2008-06-05  Bill Holmes <billholmes54@gmail.com>
7441         * decimal.c:  Adding MSVC implementation to my_g_bit_nth_msf.
7443         Contributed under MIT/X11 license.
7445 2008-06-05  Martin Baulig  <martin@ximian.com>
7447         * mono-debug-debugger.c
7448         (mono_debugger_check_breakpoints): Reflect latest runtime changes.
7450 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
7452         * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
7453         while holding the assemblies lock to prevent deadlocks. Handle the case
7454         where the search hook returns NULL but the assembly was still loaded.
7455         Fixes #323696.
7457         * appdomain.c (set_domain_search_path): Acquire the domain lock since we
7458         modify domain state.
7460 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
7462         * boehm-gc.c: Add DTrace probes gc-{begin,end}.
7463         * Makefile.am (pedump_LDADD): Post-process object files and
7464         add dtrace-generated object file, if necessary.
7466         Code is contributed under MIT/X11 license.
7468 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
7470         * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
7472 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
7474         * class.c (mono_type_get_full): Add a work-around for generic type definitions.
7476 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7478         * threads.c: Try to free everything from the delayed free table
7479         when shutting down threads, and set the variable to NULL after the
7480         table is freed so that calling
7481         mono_thread_hazardous_try_free_all() when shutting down the root
7482         domain doesn't crash.
7484 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
7486         * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
7487         the caller if resulting type was inflated.
7489         * class.c (mono_class_create_from_typespec): Free the MonoType if it
7490         was inflated.
7492         * class.c (mono_type_get_full): Free the MonoType if it was inflated.
7495 2008-06-04  Zoltan Varga  <vargaz@gmail.com>
7497         * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
7498         class library tests.
7500         * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume 
7501         (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
7502         #396989.
7504 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7506         * domain.c, domain-internals.h: The JIT infos are now freed by the
7507         JIT info table code.  They are freed immediately if there only a
7508         single JIT info table in circulation.  If there is more, the free
7509         is delayed via a queue.
7511         * threads.c, threads-types.h: New hazard pointer function for
7512         freeing all freeable delayed items in one sitting.
7514 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7516         * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
7518         * reflection.c (typebuilder_setup_properties): Same.
7520         * reflection.c (typebuilder_setup_events): Same.
7522 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7524         * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
7525         and use it for allocating memory.
7527         * reflection.c (mono_marshal_spec_from_builder): Same.
7529         * reflection.c: Change code to use new signatures.
7531         * metadata.c (mono_metadata_type_dup): Add a FIXME note.
7533 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
7535         * decimal.c (rescale128): Put back one line which was accidently commented
7536         out.
7537         
7538         * decimal.c (rescale128): Disable the code added by the last patch, as it seems
7539         to cause crashes.
7541 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7543         * reflection.c (mono_reflection_generic_class_initialize): Name must
7544         be always malloc'ed so we can free it later on. Do this for field, property
7545         and event.
7547         * metadata.c (free_generic_class): Free field, property and event names.
7549 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7551         * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
7552         instead of g_memdup.
7554         * reflection.c (typebuilder_setup_fields): Same.
7556 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
7558         * decimal.c (rescale128): Optimize this function a bit more.
7560 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7562         * metadata.c (free_generic_class): Release some memory from
7563         SRE generic classes.
7565 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7567         * reflection.c (mono_image_get_generic_field_token): No reference
7568         to name is kept, free it.
7570         * reflection.c (mono_reflection_generic_class_initialize): Free
7571         more memory of the inflated field.
7573 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
7575         * decimal.c (mono_decimalDiv): Moved equality checks here from managed
7576         code.
7578 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
7580         * reflection.c (mono_dynamic_image_free): Release memory used by
7581         MonoDynamicImage::array_methods elements.
7583         * reflection.c (assembly_add_win32_resources): Release memory after
7584         encoding.
7586 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
7588         * decimal.c (log2_32): Use an optimized version for this function too.
7589         
7590         * decimal.c (log2_64): Fix this on 32 bit machines.
7592 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
7594         * class.c (mono_dup_array_type): Implement allocation using a mempool.
7596         * class.c (mono_metadata_signature_deep_dup): Same.
7598         * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
7599         a mempool.
7601         * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
7603         * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
7605         * metadata-internals.h: Added mono_metadata_signature_dup_full.
7607         * class-internals.h: Update signatures to take a MonoMemPool.
7609 2008-06-02  Dick Porter  <dick@ximian.com>
7611         * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage): 
7612         * icall-def.h: Add
7613         System.ComponentModel.Win32Exception.W32ErrorMessage, using the
7614         FormatMessage API to get the error text.  Fixes bug 321827.
7616 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
7618         * decimal.c: Add some micro optimizations to make decimal operations faster.
7620 2008-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
7622         * reflection.c (method_encode_clauses): Take a mempool
7623         as parameter and use it to allocate the clause array.
7625         * reflection.c (mono_image_get_field_on_inst_token): Free
7626         the inflated type after encoding it.
7628         * reflection.c (mono_dynamic_image_free): Free each element
7629         of MonoDynamicImage::gen_params.
7631         * reflection.c (reflection_methodbuilder_to_mono_method):
7632         Allocate the generic param array from the mempool.
7633         Allocate signature params from the mempool.
7635         * reflection.c (mono_reflection_generic_class_initialize):
7636         Free inflated fields after been used.
7638 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
7640         * icall.c: Reapply the memory leak fixes as they no
7641         longer make mono crash.
7643 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
7645         * reflection.c (mono_type_get_object): Don't store the suplied
7646         MonoType with type_hash. A caller which pass a type that
7647         was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
7648         might end with a pointer to freed memory.
7649         The solution is to use byval_arg or this_arg from the associated
7650         MonoClass of the supplied type.
7652 2008-05-29  Zoltan Varga  <vargaz@gmail.com>
7654         * icall.c: Revert the rest of the last change as it breaks the build too.
7656 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
7658         * icall.c: Revert a leak fix as it's breaking the build.
7660 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
7662         * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
7664 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
7666         * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
7668 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
7670         * icall.c: Fix some memory leaks.
7672 2008-05-29  Dick Porter  <dick@ximian.com>
7674         * threadpool.c (mono_thread_pool_remove_socket): Always remove the
7675         async socket operations from the pending list when a socket
7676         closes.  Leaving it until the threadpool services the event
7677         exposes a race condition when a socket descriptor is reused.
7678         Fixes bug 377589.
7680 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7682         * object.c: Fix negative index check for array alocation.
7684 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7686         * icall.c, marshal.c: Delegate wrappers should skip visibility.
7687         This check is performed by the verifier for IL created delegates
7688         and by Delegate::CreateDelegate for programatically created ones.
7689         Fixes #372406.
7691 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7693         * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
7694         Fix code to use mono_array_size_t instead of int.
7696         Based on patch by Luis F. Ortiz.
7697         Contributed under X11 license.
7698         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7700 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7702         * icall.c: Added ves_icall_System_Array_GetLongLength and
7703         ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
7704         arrays.
7706         * icall.h: Export both new functions.
7708         Based on patch by Luis F. Ortiz.
7709         Contributed under X11 license.
7710         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7712 2008-05-28  Martin Baulig  <martin@ximian.com>
7714         The debugger now requires exactly r103463.
7716         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
7717         This version is not supported by the debugger, wait for 72.
7719 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7721         * object.h: Changed array related functions to use
7722         mono_array_size_t instead of guint32. Forgot to commit this file.
7724         Patch by Luis F. Ortiz.
7725         Contributed under X11 license.
7726         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7729 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7731         * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
7732         don't define it. Use the number literal instead.
7734 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
7736         * icall.c: Changed array related functions to use
7737         mono_array_size_t instead of guint32.
7739         * icall.c (ves_icall_System_Array_GetLength): Check for length
7740         overflow under MONO_BIG_ARRAYS.
7742         Based on patch by Luis F. Ortiz.
7743         Contributed under X11 license.
7744         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7746 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
7748         * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
7750         Based on patch by Luis F. Ortiz.
7751         Contributed under X11 license.
7752         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7754 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
7756         * object.c, object.h: Changed array related functions to use
7757         mono_array_size_t instead of guint32.
7759         Patch by Luis F. Ortiz.
7760         Contributed under X11 license.
7761         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7763 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
7765         * object.h: Introduced mono_array_size_t typedef. This must be used
7766         in all places an array length is expected. This is 64bits wide if
7767         MONO_BIG_ARRAYS is enabled.
7769         Patch by Luis F. Ortiz.
7770         Contributed under X11 license.
7771         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7773 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
7775         * security-manager.c class.c: Set the class exception info by calling
7776         mono_class_set_failure ().
7778         * class.c (mono_class_get_exception_data): New accessor function.
7779         (mono_class_set_failure): Store exception_data in the property hash.
7781         * class-internals.h (struct _MonoClass): Store 'exception_data' outside
7782         the struct as a property.
7784         * loader.c (mono_get_method_full): Store the lookup result for method
7785         tokens in method_cache, the others in methodref_cache to decrease the memory
7786         usage of hash tables.
7788         * image.c (mono_image_close): Destroy method_cache and methodref_cache.
7789         (mono_image_init): method_cache is lazy inited now.
7791         * metadata-internals.h (struct _MonoImage): Change method_cache to
7792         a MonoValueHashTable, add a separate methodref_cache.
7794 2008-05-27  Eyal Alaluf <eyala@mainsoft.com>
7796         * number-formatter.h: Fix tables to avoid arithemtic overflow in
7797           Double.ToString as exposed by Bug #383531.
7799 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
7801         * number-formatter.h: Make some tables static.
7803         * class.c (mono_method_set_generic_container): New accessor function.
7804         (mono_method_get_generic_container): Ditto.
7806         * class-internals.h (struct _MonoMethod): Remove rarely used 
7807         'generic_container' field, store it in the property hash instead. Add 
7808         'is_generic' boolean field instead.
7810         * image.c (mono_image_init): Initialize property_hash.
7811         (mono_image_close): Destroy property_hash.
7813         * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
7814         hold rarely used fields of runtime structures belonging to this image.
7816         * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
7817         to get/set method->generic_container.
7819         * loader.c (mono_get_method_from_token): Avoid loading the method header for
7820         generic methods.
7822 2008-05-25  Zoltan Varga  <vargaz@gmail.com>
7824         * class.c (mono_class_inflate_generic_method_full): Don't increase
7825         mono_stats.inflated_method_count for methods found in the cache.
7827         * threads.c (mono_thread_request_interruption): Add a comment about 
7828         QueueUserAPC ().
7830 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
7832         * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
7833         interface_offsets_packed table.
7834         
7835         * class.c (mono_class_init): Remove some dead code.
7837         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
7838         mono_class_setup_vtable () when CAS is active to detect security problems.
7840 2008-05-23 Rodrigo Kumpera  <rkumpera@novell.com>
7842         * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
7844         * verify.c (mono_delegate_signature_equal): Don't compar number of generic
7845         parameters as it's irrelevant for delegate checking.
7847 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
7849         * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
7851         * class.c (mono_class_init): Control the creation of a generic vtable using
7852         a global which is true by default, but set to false by the runtime startup code.
7853         
7854         * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
7855         Disabled for now since it breaks the embedding API.
7856         Move the setup of class->methods for arrays to mono_class_setup_methods ().
7857         (mono_class_setup_methods): Add a memory barrier.
7859         * object.c (mono_class_create_runtime_vtable): Add code to handle the case
7860         when mono_class_init () doesn't compute the generic vtable.
7861         
7862 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
7863         * profiler.c: Added mono_profiler_install_statistical_call_chain,
7864         mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
7865         to support call chains (backtrace) in the stat profiler.
7866         * profiler.c, profiler-private.h: Likewise.
7868 2008-05-22  Mark Probst  <mark.probst@gmail.com>
7870         * generic-sharing.c: Init generic class when a method of it is
7871         requested via a runtime generic context.
7873 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
7875         * class.c (mono_class_init): Add a comment about trying to avoid calling this.
7877         * reflection.c (mono_type_get_object): Add a FIXME.
7879         * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
7881         * class.c (mono_class_get_method_by_index): New helper function, returning an
7882         entry in the class->methods array.
7884 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
7886         * class.c (mono_class_init): Only do the array optimization for szarrays. 
7887         Avoid creating a generic vtable for generic instances as well.
7888         (mono_class_get_method_from_name_flags): Don't search in the metadata for
7889         generic instances.
7891 2008-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
7893         * loader.c (mono_get_method_constrained): Inflate the signature
7894         with class context. Fix #325283.
7896 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
7898         * object.c (mono_class_create_runtime_vtable): Add a comment.
7900         * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
7901         where needed.
7902         (setup_interface_offsets): Handle the case when this is called twice for arrays.
7903         (mono_class_setup_vtable_general): Add an assert.
7904         (mono_class_init): Avoid creating a generic vtable for arrays.
7906         * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
7907         here, let mono_class_init () do that.
7909         * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
7910         interfaces in mscorlib.
7912         * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
7913         interfaces. Add some comments.
7914         (mono_class_init): Call mono_class_setup_methods () here since it is no
7915         longer called by mono_class_setup_vtable ().
7917         * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
7918         not set in class->vtable.
7919         (mono_class_create_runtime_vtable): Reenable the disabled code.
7921         * object.c (mono_class_create_runtime_vtable): Disable the last change for
7922         now as it causes some test failures.
7924         * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
7925         if using the vtable trampoline. Also remove some strange code which put the
7926         generic methods themselves into the vtable slots. Remove the AOT init_vtable
7927         stuff as it is no longer needed.
7929 2008-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
7931         * pedump.c: Give make --verify all option check code as well.
7932         Using --verify code won't check for metadata now.
7934 2008-05-19  Martin Baulig  <martin@ximian.com>
7936         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
7938         * mono-debug.c
7939         (_mono_debug_using_mono_debugger): New global variable; it's set
7940         directly by the debugger, so mono_debug_using_mono_debugger() also
7941         works after attaching.
7943 2008-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
7945         * object.c (mono_class_create_runtime_vtable): Use memory barriers
7946         as we do double checked locking on MonoClass::runtime_info and
7947         MonoClassRuntimeInfo::domain_vtables.
7949 2008-05-18  Zoltan Varga  <vargaz@gmail.com>
7951         * debug-helpers.c (print_field_value): Fix a warning.
7953 2008-05-16  Zoltan Varga  <vargaz@gmail.com>
7955         * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
7956         set in the AOT case.
7958 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
7960         * class.c (mono_class_setup_vtable_general): Use memory barriers
7961         as we do double checked locking on MonoClass::vtable.
7963 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
7965         * reflection.c (resolve_object): Inflate only if the generic context
7966         is not null. Fixes #389886.
7968 2008-05-15  Jonathan Chambers  <joncham@gmail.com>
7970         * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
7971         instead of g_free.
7973         Code is contributed under MIT/X11 license.
7975 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
7977         * class.c: Revert unrelated change.
7979 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
7981         * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
7982         a generic instantiation, use mono_class_from_mono_type instead of playing
7983         with MonoType directly.
7985 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
7987         * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
7988         checks must ignore generic instantiations, so mono_class_has_parent is not
7989         suitable. Fixes #390128.
7991 2008-05-14  Zoltan Varga  <vargaz@gmail.com>
7993         * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
7994         it to avoid registering tokens during metadata generation. Fixes #390023.
7996 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
7998         * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
7999         consistent.
8001         Contributed under MIT/X11 license.
8003 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
8005         * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
8006         even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
8007         to fixup the EXE image.
8008         (mono_cleanup): Use mono_close_exe_image.
8009         (mono_close_exe_image): New function.
8010         * image.c: Include "marshal.h".
8011         (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
8012         (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
8013         counting when the image is loaded outside of mono_image_open_full. Set status
8014         based on GetLastError.
8015         * coree.c: Include required headers. Add init_from_coree.
8016         (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
8017         mono_assembly_open only when the image has vtfixups. Set init_from_coree.
8018         (_CorExeMain): Set init_from_coree.
8019         (CorExitProcess): Only call ExitProcess for now.
8020         (CorBindToRuntimeEx): New stub implementation.
8021         (CorBindToRuntime): New function.
8022         (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
8023         (MonoFixupExe): ILONLY executables require no fixups.
8024         (mono_set_act_ctx): New function to set activation context.
8025         (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.  
8026         * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
8027         Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
8028         mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
8029         as MONO_INTERNAL.
8030         * domain-internals.h: Add mono_close_exe_image.
8032         Contributed under MIT/X11 license.
8034 2008-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
8036         * metadata.c (mono_metadata_compute_size): Correctly calculate field
8037         size for generic param and event tables. Fixes #388977.
8039 2008-05-13  Zoltan Varga  <vargaz@gmail.com>
8041         * loader.c (mono_method_signature): Use memory barriers because of the double
8042         checked locking pattern.
8044         * threads.c (remove_and_abort_threads): Stop and wait for threads which are
8045         aborting or aborted as well. Fixes #376391.
8046         
8047         * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
8048         existing runtime state in the Suspend handler during shutdown.
8050 2008-05-12  Zoltan Varga  <vargaz@gmail.com>
8052         * threads.c (mono_thread_request_interruption): Add some FIXMEs.
8054         * threads.c (mono_thread_suspend_all_other_threads): Add support for threads 
8055         which are starting up or shutting down.
8057         * threads.c (mono_threads_set_shutting_down): Don't return a value since
8058         this function never returns if the runtime is already shutting down.
8060         * icall.c (ves_icall_System_Environment_Exit): Update after 
8061         mono_threads_set_shutting_down () signature change.
8062         
8063 2008-05-09 Rodrigo Kumpera  <rkumpera@novell.com>
8065         * class.c: Added can_access_instantiation to verify if the instantiation
8066         is visible. Fix access check for nested types as they returned TRUE
8067         before doing type and generic instantiation visibility checks.
8069 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
8071         * reflection.c (mono_reflection_create_generic_class): The created type
8072         must have a different container from its TypeBuilder. Otherwise they
8073         will end sharing generic arguments, which is wrong.
8075         Due to the sharing, making a generic instance of the created type using
8076         the TypeBuider generic arguments resulted in the generic type definition
8077         been returned, which is wrong as well.
8079         As a bonus the code was leaking the type_params array. This memory should
8080         be allocated from the image mempool.
8082         This fixes bug #354047.
8084 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
8086         * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
8087         to here         as they are now used in assembly.c new code.
8088         Added a skipverification flag to MonoAssembly.
8089         New internal function mono_assembly_has_skip_verification.
8091         * assembly.c: New function mono_assembly_has_skip_verification. It checks
8092         if an assembly has a version 2.0 SkipVerification security attribute. Fixes
8093         part of #387274.
8095 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
8097         * object.c (mono_object_get_virtual_method): Inflate the resulting method if
8098         needed. Fixes #387034.
8100         * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
8102 2008-05-06  Miguel de Icaza  <miguel@novell.com>
8104         * assembly.c (mono_assembly_load_reference): Prevent crash while
8105         disassembling Silverlight 2.0 executables while we still do not
8106         have GACed libraries.
8108 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
8110         * reflection.c: Special case generic type definitions as well. Fixes #383444.
8112 2008-05-06  Zoltan Varga  <vargaz@gmail.com>
8114         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
8115         of the dynamic case. Fixes #387404.
8117 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
8119         *verify.c (mono_verifier_is_class_full_trust): If under
8120         verify_all and the verifier mode was not set, only
8121         gac and corlib types are fulltrust. This makes --verify-all
8122         usable to detect unverifiable code, which is the expected
8123         use case.
8125 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
8127         * verify.h: Ops, commited the header with debug
8128         enabled.
8130 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
8132         * verify.c (merge_stack): Use the new value on unverifiable
8133         stack merges.
8135         * verify.c (verify_type_compatibility_full): Comparison
8136         of nullable types can't use mono_class_is_assignable_from.
8138         * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
8139         that makes all verification errors be reported.
8141         * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
8142         mono_method_verify.
8144 2008-05-05  Robert Jordan  <robertj@gmx.net>
8146         * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
8147         support for value types. See #386415.
8149         * object.c: comments.
8151         Code is contributed under MIT/X11 license.
8153 2008-05-05  Martin Baulig  <martin@ximian.com>
8155         * debug-mono-symfile.h
8156         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
8157         for old pre-terrania symbol files.
8159 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
8161         * mono-config.c: Add ppc64 architecture.
8163         Code is contributed under MIT/X11 license.
8165 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
8167         * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
8168           PPC64 uses function descriptors as well.
8170         Code is contributed under MIT/X11 license.
8172 2008-05-04  Zoltan Varga  <vargaz@gmail.com>
8174         * object.c (compute_class_bitmap): Ignore literal static fields.
8176         * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
8177         var has an invalid format.
8178         (describe_ptr): Add some sanity checks for the vtable.
8179         (add_nursery_frag): Clear unused nursery fragments.
8180         (major_collection): Clear all remaining nursery fragments.
8182 2008-05-03  Robert Jordan  <robertj@gmx.net>
8184         * image.c, metadata-internals.h: add thunk_invoke_cache.
8186         * marshal.c, marshal.h: implement
8187         mono_marshal_get_thunk_invoke_wrapper ().
8189         * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
8191         Code is contributed under MIT/X11 license.
8193 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
8195         * verify.c (do_leave): Empty the stack.
8197 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
8199         * class.c (mono_class_is_assignable_from): Variance
8200         doesn't work between reference and value types. For example,
8201         given type C<T+>, C<int32> is not assignable to C<object>.
8202         Break the argument checking loop on first error. 
8204 2008-05-02  Atsushi Enomoto  <atsushi@ximian.com>
8206         * icall.c : base64_to_byte_array() needs some more strict
8207           check for sequence of '=' characters. Patch by Santa
8208           Marta (http://deee.g.hatena.ne.jp/santamarta).
8210           Contributed under MIT/X11 license.
8211           (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
8213 2008-05-02  Jonathan Chambers  <joncham@gmail.com>
8215         * domain.c: Disable LoadLibrary support to fix Win32 build.
8217         Code is contributed under MIT/X11 license.
8219 2008-05-02  Zoltan Varga  <vargaz@gmail.com>
8221         * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
8222         to help with cache behaviour.
8224 2008-05-01  Miguel de Icaza  <miguel@novell.com>
8226         * appdomain.c (mono_domain_from_appdomain): Add new accessor
8227         method. 
8229 2008-05-01  Zoltan Varga  <vargaz@gmail.com>
8231         * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
8233 2008-05-01  Dick Porter  <dick@ximian.com>
8235         * process.c (process_get_fileversion): Only pass 16 bits of
8236         language ID to VerLanguageName.  Fixes bug 381204.
8238 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
8240         * verify.c (mono_method_verify): Fix the comparison
8241         operator for code bounds check.
8243 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
8245         * verify.c (mono_method_verify): Check the bounds of
8246         all access of the code array.
8248 2008-04-29  Kornél Pál  <kornelpal@gmail.com>
8250         * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
8252 2008-04-28  Zoltan Varga  <vargaz@gmail.com>
8254         * image.c (mono_image_strong_name_position): Fix return value when the rva is
8255         not valid.
8257 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
8259         * loader.c (mono_get_method_from_token, mono_method_signature): Add
8260         support for METHOD_IMPL_ATTRIBUTE_NATIVE.
8261         * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
8262         fixup main EXE images when using mono.exe for mixed-mode assembly support.
8263         * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
8264         mono_runtime_load.
8265         * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
8266         runtime initialization from metadata.
8267         * assembly.c: Remove obsolete ceGetModuleFileNameA.
8268         (mono_set_rootdir): Use mono_get_module_file_name.
8269         (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
8270         handles.
8271         * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
8272         * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
8273         * image.c (mono_cli_rva_image_map): Use MonoImage instead of
8274         MonoCLIImageInfo. Add support for module handles.
8275         (load_cli_header): Update mono_cli_rva_image_map signature.
8276         (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
8277         (mono_image_strong_name_position): Use mono_cli_rva_image_map.
8278         (mono_image_rva_map): Add support for module handles.
8279         (mono_image_ensure_section_idx): Add support for module handles.
8280         (mono_image_close): Add support for module handles.
8281         (do_load_header): Add support for module handles.
8282         (mono_image_open_from_module_handle): New function for internal use.
8283         (mono_image_open_full): Load normal images using LoadLibrary on Windows.
8284         (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
8285         (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
8286         handles.
8287         (mono_image_fixup_vtable): New function for mixed-mode assembly support.
8288         * image.h: Add mono_image_fixup_vtable.
8289         * coree.c: New file for mscoree.dll functions and mixed-mode assembly
8290         support.
8291         * coree.h: New file.
8292         * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
8293         unsupported native code.
8294         (mono_marshal_set_callconv_from_modopt): New function splitted from
8295         mono_marshal_get_managed_wrapper.
8296         (mono_marshal_get_managed_wrapper): Use
8297         mono_marshal_set_callconv_from_modopt.
8298         (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
8299         * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
8300         * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
8301         that results in a deadlock when the runtime is loaded in _CorDllMain.
8302         * Makefile.am: Add coree.c and coree.h.
8304         Contributed under MIT/X11 license.
8306 2008-04-28  Mark Probst  <mark.probst@gmail.com>
8308         * generic-sharing.c: Search for type arguments in array element
8309         types as well.
8311 2008-04-28  Mark Probst  <mark.probst@gmail.com>
8313         * class-internals.h, generic-sharing.c: New, small runtime generic context.
8315         * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
8317         * object.c: Don't setup the RGCTX when the vtable is created,
8318         because we're setting it up lazily now.
8320 2008-04-26  Zoltan Varga  <vargaz@gmail.com>
8322         * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix 
8323         64 bit support.
8325 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
8327         * verify.c (verify_class_for_overlapping_reference_fields): 
8328         If class is under fulltrust allow reference types to overllap
8329         if they have the same RVA.
8331 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
8333         * pedump.c: Added new flag valid-only, that makes the verifier
8334         behaves just like --security=validil. It won't fail type load
8335         due to unverifiable restrictions.
8337 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
8339         * class-internals.h (struct MonoMethod): Added a verification_success
8340         field to cache verifier executions. Reduced MonoMethod:slot size by
8341         one bit.
8343 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
8345         * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
8346         instead of a 'vt' argument to save an indirection and to allow these to be used
8347         for valuetypes.
8348         (scan_vtype): New helper function to scan an area using a gc descriptor.
8349         (mono_gc_wbarrier_value_copy): Implement this.
8350         (handle_remset): Add support for REMSET_VTYPE.
8351         (find_in_remset_loc): Ditto.
8352         (mono_gc_base_init): Allow some debugging options to be controlled through the
8353         use of the MONO_GC_DEBUG env variable.
8354         (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
8355         (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
8357 2008-04-23  Martin Baulig  <martin@ximian.com>
8359         * domain.c (mono_domain_create): Move the call to
8360         mono_debug_domain_create() down, after allocating the domain id.
8362 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
8364         verify.c (verify_class_for_overlapping_reference_fields): Skip
8365         static fields while verifying for overlapping fields as they
8366         don't matter at all.
8368 2008-04-23  Marek Habersack  <mhabersack@novell.com>
8370         * domain-internals.h: added a declaration of
8371         mono_make_shadow_copy.
8373         * assembly.c (mono_assembly_open_full): shadow copying of
8374         assemblies moved to here, so that all the assemblies within the
8375         application domain's private binary directories can be
8376         processed. Fixes bug #380546
8378         * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
8379         mono_make_shadow_copy and made non-static. The decision whether
8380         to shadow-copy an assembly is made based on its location - it's
8381         copied if it's in one of the private application domain binary
8382         directories and its different to the target file in the shadow
8383         directory. Fixes bug #380546
8385 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
8387         * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
8389         * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
8390         types.
8392         * reflection.c (mono_image_create_token): Handle 
8393         Method/ConstructorOnTypeBuilderInst.
8394         (resolve_object): Ditto.
8395         (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
8396         so it can be called from resolve_object. Also handle the case when the inflated
8397         class already has its methods setup.
8399 2008-04-21  Martin Baulig  <martin@ximian.com>
8401         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
8403 2008-04-20  Geoff Norton  <gnorton@novell.com>
8405         * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
8406         pointer dereference.
8408 2008-04-15  Marek Habersack  <mhabersack@novell.com>
8410         * appdomain.c (try_load_from): if IOMAP is in effect, call the
8411         portability API to look up the assembly file. Fixes behavior in
8412         situations when the application has a bin/ directory, but the
8413         assembly search patch refers to Bin/ (and thus the requested file
8414         name is Bin/SomeLibrary.dll). Fixes bug #379888
8416 2008-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
8418         verify.c (mono_type_is_generic_argument): Extracted this check
8419         from a dozen places to here.
8421         verify.c: Fixed all issues related to boxing generic arguments
8422         and their constraints.
8424 2008-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
8426         verify.c (mono_class_interface_implements_interface): Fix win32 build.
8428 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
8430         * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
8431         isn't finished yet. Fixes #363447.
8433 2008-04-13  Zoltan Varga  <vargaz@gmail.com>
8435         * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
8436         Fixes #346419.
8438 2008-04-13  Jb Evain  <jbevain@novell.com>
8440         * domain.c: update the 2.1 profile versions.
8441         Merged from the Moonlight 2 branch.
8443 2008-04-12  Zoltan Varga  <vargaz@gmail.com>
8445         * assembly.c (mono_assembly_load_from_full): Do the check for loading other
8446         mscorlibs for the non-refonly case as well.
8448         * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
8449         in mono_assembly_load_from_full (). Fixes #378924.
8451 2008-04-11  Geoff Norton  <gnorton@novell.com>
8453         * icall.c: The global extern environ doesn't exist on Mac.  We
8454         need to call NSGetEnviron instead.
8456 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8458         verify.c: Add generic method constraint verification.
8460 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8462         class.c (mono_class_inflate_generic_method_full): Add a long
8463         explanation to the is_mb_open hack. Remove the FIXME.
8465 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8467         * verify.c (mono_method_verify): Mark all unknown opcodes
8468         as invalid. Mark jmp as unverifiable.
8470 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8472         * verify.c: Add code to do type constraint verification on class instances.
8474         * verify.c (mono_verifier_verify_class): Use the type constraint 
8475         verification code.
8477 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8479         * class.c (mono_class_get_field_default_value): Don't pass cindex
8480         as hint to mono_metadata_get_constant_index. The local is not initialized
8481         and should contain garbage most of the time. This could only work
8482         with a lot of luck.
8484 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
8486         * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
8488 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
8490         * class-internals.h: Add generic_param_token to MonoClass::sizes union.
8492         * class.c (mono_class_from_generic_parameter): Save the token of the
8493         generic param in MonoClass::sizes.generic_param_token.
8495         * reflection.c (mono_custom_attrs_from_class): If the class type is
8496         VAR or MVAR retrieve the attributes of the generic param.
8498 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
8500         * class.c (mono_class_init): Do class verification if the verifier
8501         is enabled.
8503 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
8505         * verify-internal.h: Added mono_verifier_verify_class.
8507         * verify.c: Added mono_verifier_verify_class. It checks for
8508         classes with explicit layout that have overlapping reference fields.
8510         * pedump.c: Init the verifier state prior to verification. Fixed
8511         command line arguments.
8513 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
8515         * Makefile.am: Added verify-internals.h, hopefully fix the build.
8517 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
8519         * verify-internals.h: Fix a warning.
8521 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
8523         * verify-internals.h: New header with the verifier configuration
8524         extracted from mini.c.
8526         * verify.c: Implemented the new functions exported by verify-internals.h.
8528 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
8530         * verify.c: Add proper verification of ckfinite.
8532 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
8534         * verify.c (do_conversion): Improved error message to something
8535         more meanfull.
8537         * verify.c (check_is_valid_type_for_field_ops): Fix to work
8538         with primitive types.
8540 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
8542         * verify.c: Added tail prefix checking. Marked icall
8543         as unverifible.
8545 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
8547         * verify.c: Fix the detection of branches to the middle
8548         of an instruction.
8550 2008-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
8552         * verify.c: Implemented verification of volatile. and
8553         unaligned. prefix. Check if a type is valid after retrieving it.
8555 2008-04-01  Dick Porter  <dick@ximian.com>
8557         * process.c (process_get_fileversion): If there's no string block,
8558         set the file language to en_US.  Fixes the other new part of bug
8559         374600.
8561 2008-03-29 Rodrigo Kumpera  <rkumpera@novell.com>
8563         * class.c: New functions mono_method_can_access_field_full and
8564         mono_method_can_access_method_full. They perform type visibility
8565         and type site check.
8567         * class-internal.h: Added exported functions.
8569         * verify.c: Use new functions to implement proper visibility checks.
8571 2008-03-29  Zoltan Varga  <vargaz@gmail.com>
8573         * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
8575 2008-03-28  Dick Porter  <dick@ximian.com>
8577         * process.c (process_get_fileversion): Use the first language ID
8578         we see, rather than insisting on an invariant language.  Fixes bug
8579         374600.
8581 2008-03-28  Zoltan Varga  <vargaz@gmail.com>
8583         * reflection.c (calc_section_size): Use add_stream_zero to align the size of
8584         the streams to fix reading of invalid memory later.
8586         * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
8587         to ease debugging.
8589 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
8591         * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
8592         (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
8594 2008-03-26  Massimiliano Mantione  <massi@ximian.com>
8595         * threads.h: Added MonoThreadManageCallback type and
8596         mono_thread_set_manage_callback prototype
8597         * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
8598         (used to store the mono_thread_manage callback).
8599         * threads.c: Added mono_thread_set_manage_callback, and handle
8600         "MonoThread->manage_callback" in build_wait_tids.
8602 2008-03-26  Dick Porter  <dick@ximian.com>
8604         * process.c (process_get_fileversion): Set FileVersionInfo strings
8605         to Empty when the resource doesn't have the particular info.
8606         Fixes bug 355717.
8608 2008-03-25 Rodrigo Kumpera  <rkumpera@novell.com>
8610         * verify.c (mono_method_verify): Proper prefix validation.
8612 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
8614         * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
8615         itself in a separate argument instead of throwing them. Fixes #373448.
8617         * appdomain.c: Bump corlib version.
8619 2008-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
8621         * verify.c: Implemented readonly prefix and verify controled mutability pointers.
8623 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
8625         * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
8626         version macros.
8628 2008-03-20  Mark Probst  <mark.probst@gmail.com>
8630         * generic-sharing.c, class-internals.h: Code for putting
8631         reflection types into the runtime generic context.
8633 2008-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
8635         * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
8636         Fixes #340662. 
8639 2008-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
8641         * verify.c (VerifyContext): Added instruction prefix data to the struct.
8643         * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
8645         * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
8647         * verify.c (do_cast): Let the result value keep the boxed status.
8649         * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
8651 2008-03-17  Jb Evain  <jbevain@novell.com>
8653         * reflection.c: when running on a 2.0 runtime, emit
8654         unconditionally the #~ header version as 2.0, and the
8655         CLI header version as 2.5, for symmetry's sake with csc.
8657 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
8659         * class.c: Remove the unused cache_interface_offsets stuff.
8661         * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
8662         profiler.c: Fix warnings.
8664 2008-03-16  Mark Probst  <mark.probst@gmail.com>
8666         * generic-sharing.c, class-internals.h: Support for putting
8667         methods into the runtime generic context.
8669 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
8671         * class.c (mono_class_setup_fields): Ignore calls made to this function for
8672         classes which are generic instances of not-yet finished typebuilders. Fixes
8673         #351172.
8675         * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
8677 2008-03-15  Zoltan Varga  <vargaz@gmail.com>
8679         * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
8681         * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
8682         field, replace it with a hash table in MonoDynamicImage.
8684         * reflection.c (inflate_mono_method): Access the generic definition object from
8685         image->generic_def_objects instead of imethod->reflection_info.
8687         * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto. 
8689         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
8690         
8691         * image.c (mono_image_close): Move the dynamic image freeing code to a separate
8692         function in reflection.c so it is easier to keep in sync with the dynamic image
8693         creation code.
8695         * reflection.c (mono_dynamic_image_free): New internal function, extracted from
8696         mono_image_close ().
8698 2008-03-15  Mark Probst  <mark.probst@gmail.com>
8700         * class.c (mono_class_generic_sharing_enabled): Disable generic
8701         sharing for all architectures except AMD64 and x86 to fix build.
8703 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
8705         * verify.c: Use the generic definition MonoGenericContext when available.
8706         Remove code for checking generics instance compatibility in favor of
8707         mono_class_is_assignable_from.
8709 2008-03-14  Mark Probst  <mark.probst@gmail.com>
8711         * marshal.c, marshal.h, metadata-internals.h, image.c,
8712         wrapper-types.h: New wrapper for invoking a shared static method
8713         without having to pass the runtime generic context argument.
8715 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
8717         * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
8719 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
8721         * reflection.c (mono_image_get_field_on_inst_token): Add caching.
8722         
8723         * reflection.c (mono_image_get_field_on_inst_token): New helper function to
8724         create a token from a FieldOnTypeBuilderInst.
8725         (mono_image_create_token): Handle FieldOnTypeBuilderInst.
8726         (resolve_object): Ditto.
8728         * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
8729         mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
8731 2008-03-14  Martin Baulig  <martin@ximian.com>
8733         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
8735         * debug-mono-symfile.h
8736         (MONO_SYMBOL_FILE_VERSION): Bump to 41.
8737         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
8739 2008-03-10  Martin Baulig  <martin@ximian.com>
8741         * debug-mono-symfile.h
8742         (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
8743         `lexical_block_table_offset'.
8744         (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
8745         `lexical_blocks'.
8746         (MonoSymbolFile): Added `version'.
8748         * mono-debug.h
8749         (MonoDebugLexicalBlockEntry): Removed.
8750         (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
8751         `lexical_blocks'.
8753         * mono-debug.c (mono_debug_add_method): Don't compute lexical
8754         blocks here; the debugger now does this internally.
8756 2008-02-27  Martin Baulig  <martin@ximian.com>
8758         * object.c (mono_runtime_exec_main): Call
8759         `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
8760         `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
8762 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
8764         * verify.c (verify_type_compatibility_full): Allow native int to be converted
8765         to native pointer in non-strict mode. Required to "(IntPtr)null" work.
8767 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
8769         * verify.c (verify_ldftn_delegate): Accept a sealed type when using
8770         ldftn with a virtual method.
8772 2008-03-13  Geoff Norton  <gnorton@novell.com>
8774         * decimal.c:  Only include memory.h if the platform has it.
8776 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
8778         * assembly.c, class.c, metadata-internals.h: make sure public key
8779         tokesns are compared in a case-insensitive way. Also, all
8780         the lookups in the GAC use a lowercase public key token
8781         (gaacutil already does the lowercasing on install). Fixes
8782         bug #369541.
8784 2008-03-11 Rodrigo Kumpera  <rkumpera@novell.com>
8786         * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
8787         and return value.
8789 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
8791         * image.c: when someone loads a mscorlib from a file, return the
8792         currently loaded mscorlib (fixes bug #369253).
8794 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
8796         * class.c: handle types with no parents by forcing them to have
8797         System.Object as a parent and marking them as broken (this currently
8798         allows the first part of bug #369173 to work as well, likely because
8799         we don't check for typeload exceptions everywhere yet).
8801 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
8803         * class.c: more complete check that types belong to corlib
8804         (fixes second part of bug #369173).
8806 2007-03-10  Bill Holmes  <billholmes54@gmail.com>
8808         * generic-sharing.c:  Including glib.h for the MSVC builds to define
8809           "inline" to "__inline" before including mono-membar.h.
8810           
8811         * mono-perfcounters.c:  Adding HAVE_SYS_TIME_H check for MSVC builds.
8812           Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for 
8813           MSVC builds.
8815         Contributed under MIT/X11 license.
8817 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
8819         * verify.c (do_invoke_method): Remove return type validation.
8821         * verify.c (do_ret): Do return type validation at return site instead of
8822         call site.
8824 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
8826         * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
8828         * verify.c: Some todos cleaned and improved a few error messages.
8830 2008-03-08  Zoltan Varga  <vargaz@gmail.com>
8832         * class.c (mono_class_setup_mono_type): Improve the test for corlib.
8834 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
8836         * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
8837         system types correctly.
8839         * exception.h exception.c (mono_exception_from_token_two_strings): New helper
8840         function.
8842 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
8844         * assembly.c (build_assembly_name): Fix a warning.
8846 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8848         * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
8849         the called function takes an object type argument. Fixes storing or
8850         valuetypes across remoting as well as reducing memory usage.
8851         * image.c, metadata-internals.h: remove now unused ldfld_remote and
8852         stfld_remote wrapper caches.
8854 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
8856         * icall.c (mono_lookup_internal_call): Update the exception message when an icall
8857         is not found.
8859         * reflection.c (mono_image_register_token): New helper function to save
8860         a token->object mapping.        
8862         * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
8863         managed code.
8865         * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
8866         one dimension arrays. Fixes #367670.
8867         (mono_reflection_get_type_internal): Ditto.
8869 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
8871         * marshal.c: mono_load_remote_field_new() always returns object.
8872         so use the proper signature (fixes bug #366445).
8874 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
8875         
8876         * class-internals.h (MonoMethod): Remove unused uses_this flag, 
8877         add an 'inline_failure' flag instead.
8879 2008-03-04  Mark Probst  <mark.probst@gmail.com>
8881         * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
8882         with a new structure, MonoGenericJitInfo, in the MonoJitInfo.  It
8883         contains the location of "this", used for exception handling.
8885 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
8887         * class.c (mono_class_layout_fields): Set the min alignment of small structs to
8888         their size on all platforms for perf reasons.
8890 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8892         * reflection.h: Move mono_reflection_is_valid_dynamic_token to
8893         object-internal.h
8895         * object-internal.h: Same.
8897 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8899         * reflection.h: Fix the build I just broke.
8901 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8903         * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
8904         Test if a token is valid, this remove explicit usage of 
8905         MonoDynamicImage::tokens from the verifier code.
8907         * reflection.h: Added mono_reflection_is_valid_dynamic_token.
8909         * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
8910         instead of direct access to MonoDynamicImage::tokens.
8912 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8914         * verify.c (token_bounds_check): Fix the build I just broke.
8916 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8918         * verify.c (token_bounds_check): Fix bounds check for dynamic images.
8920         * verify.c (verifier_load_method): Fixed the errors message.
8922         * verify.c (mono_method_verify): Fixed a debug message.
8924 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
8926         * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
8927         mono-perfcounters.h, class-internals.h: support for predefined
8928         writable counters, query of categories and counters, bugfixes.
8930 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
8932         * verify.c (do_refanytype): Verify the refanytype opcode.
8934         * verify.c (mono_method_verify): Use do_refanytype.
8936 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
8938         * verify.c (do_mkrefany): Verify the mkrefany opcode.
8940         * verify.c (mono_method_verify): Use do_mkrefany.
8942 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
8944         * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
8945         mono-perfcounters.c, mono-perfcounters.h: basic performance counter
8946         implementation.
8948 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
8950         * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
8951         the type load exception.
8953 2008-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
8955         * verify.c: Added a few FIXME for method signatures
8957         * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
8958         of mono_method_get_signature and get vararg call working. Removed unused
8959         checks for return value.
8961         * verify.c (do_refanyval): Verify the refanyval opcode.
8963         * verify.c (mono_method_verify): Implemented verification of arglist and
8964         use do_refanyval.
8966 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
8968         * class.c (mono_class_setup_methods): Move the check for synchronized methods on
8969         vtypes to marshal.c.
8971         * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
8972         it works for AOT as well.
8974 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
8976         * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
8977         with mono_msec_ticks () which is monotonic and doesn't cause bugs when
8978         the system time is adjusted.
8980 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
8982         * icall.c, icall-def.h: use the new time functions (fixes the
8983         non-monotonic behaviour of TickCount).
8985 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
8987         * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
8988         it breaks the build.
8989         
8990         * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
8991         cattr is not finished yet.
8993 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
8995         * verify.c: Proper token validation for field, method and type.
8997 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
8999         * loader.c (field_from_memberref): Generate a loader error if the type is not found.
9001         * loader.c (method_from_memberref): Generate type load error instead of method missing
9002         if the type is not found.
9004 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
9006         * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
9007         some of the conversions caused the generation of a marshal directive exception.
9009 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
9011         verify.c: Report which exception should be thrown by the JIT.
9012         Added a lot of FIXME notes.
9014 2008-02-22  Mark Probst  <mark.probst@gmail.com>
9016         * generic-sharing.c: Runtime generic context slots are not
9017         instantiated on init anymore.  Instead, provide function to do the
9018         instantiating on demand.
9020         * class-internals.h: Added vtable to runtime generic context.
9021         Macros for encoding direct and indirect slot offsets in one
9022         guint32.
9024 2008-02-21  Mark Probst  <mark.probst@gmail.com>
9026         * object.c, generic-sharing.c: Moved some generic sharing code
9027         from object.c to generic-sharing.c.
9029         * generic-sharing.c: Added support for extensible runtime generic
9030         context.
9032         * metadata-internals.h: Two new hash tables in MonoImage for
9033         extensible runtime generic context support.
9035         * domain.c: Unregister generic vtables upon domain unloading.
9037         * image.c: Destroy new hash tables upon image unloading.
9039         * metadata.c: Unregister generic subclasses upon image unloading.
9041         * class-internals.h: New data structure for runtime generic
9042         context template.  New fields in the runtime generic context for
9043         extensible part.
9045         * Makefile.am: Added generic-sharing.c.
9047 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
9049         icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
9050         there is a pending loader exception, raise it.
9052         icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
9053         same.
9055         icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): 
9056         same.
9058         Fixes #363450.
9060 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
9062         * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
9064         * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
9065         
9066         * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
9067         ref-only requests for compatibility with MS.
9069 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
9071         * reflection.c (mono_custom_attrs_from_method): Don't silently
9072         return an empty list for generic method instances.
9073         (mono_custom_attrs_from_param): Likewise.
9075 2008-02-20  Rodrigo Kumpera  <rkumpera@novell.com>
9076             Raja R Harinath  <harinath@hurrynot.org>
9078         Fix #354757
9079         * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
9080         * class.c (mono_class_inflate_generic_method_full): Initialize it
9081         when a fully-open method is instantiated.
9082         * metadata.c (inflated_method_equal, inflated_method_hash): Update
9083         to new field.
9084         * reflection.c (inflate_mono_method): Don't create a temporary context.
9086 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
9088         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
9089         Compute correct value, to prepare for imethod->reflection_info going away.
9091 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
9093         * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
9095 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
9097         * verify.c: Implement skip visibility flag.
9099 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
9101         * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
9102         which contains an extra field to tell the kind of exception that should be thrown.
9104         * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
9106 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
9108         * loader.c (mono_method_get_param_names): Initialize 'klass' after
9109         'method' is updated.
9111 2008-02-11  Zoltan Varga  <vargaz@gmail.com>
9113         * class.c (mono_class_layout_fields): Set class->min_align for classes using
9114         explicit layout as well. Fixes #360375.
9116 2008-02-11  Geoff Norton  <gnorton@novell.com>
9118         * loader.c: Guard and dereference against inflated generic methods
9120 2008-02-10  Gert Driesen  <drieseng@users.sourceforge.net>
9122         * class.c: Include Retargetable spec in assembly name.
9123         * assembly.c: Always include PublicKeyToken spec in assembly name
9124         (with value "null" if assembly is not signed), and include
9125         Retargetable spec.
9126         * icall-def.h: Added icall for Assembly.get_fullname.
9127         * icall.c: Added icall returning the fullname of an assembly.
9129 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
9131         * class.c (mono_class_setup_vtable_general): Add a missing call to
9132         mono_class_setup_methods () which is needed in the AOT case.
9134 2008-02-08 Rodrigo Kumpera  <rkumpera@novell.com>
9136         * verify.c (mono_type_get_stack_name): Added. Return the name for the
9137         stack type of the given MonoType.
9139         * verify.c (verify_type_compatibility_full): Handle the void type.
9141         * verify.c (is_compatible_boxed_valuetype): Changed to fit the
9142         way stack merging works.
9144         * verify.c (store_local): Improved verification message.
9146         * verify.c (do_branch_op): If the merging is invalid, the method
9147         is unverifiable and not invalid. Improved error message.
9149         * verify.c (merge_stacks): Properly merge a boxed valuetype and
9150         a reference type diferent than System.Object. Improved error
9151         message.
9153 2008-02-07 Rodrigo Kumpera  <rkumpera@novell.com>
9155         * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
9157         * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
9158         type of an enum even if the argument is byref.
9160         * verify.c: Replace all explicit uses of enumtype and enum_basetype
9161         to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
9163         * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
9165         *verify.c (verify_type_compatibility_full): Make enum types
9166         compatible with their base types.
9168         * verify.c (is_compatible_boxed_valuetype): Added. Check if both
9169         types are compatible for the special case of a boxed valuetype and
9170         System.Object.
9172         * verify.c (verify_stack_type_compatibility): The function
9173         is_compatible_boxed_valuetype was extracted from here.
9175         * verify.c (push_arg): Only set ctx->has_this_store if the method
9176         is not static.
9178         * verify.c (do_ldelem): Fixed a typo in an error message and added
9179         strict check for mixing int32 and native int as the array type
9180         and ldelem type.
9182         * verify.c (merge_stacks): Consider boxed valuetypes in the
9183         compatibility checks.
9185 2008-02-07  Massimiliano Mantione  <massi@ximian.com>
9186         * profiler.h: (MonoGCEvent): Added start-stop the world events.
9188 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
9189         *class.c: use_new_interface_vtable_code: renamed the env var to have
9190         a "MONO_" prefix, and fix the logic to enable it by default.
9192 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
9193         *class.c:
9194         mono_class_setup_vtable_general: rewrote the way in which interface
9195         methods are added to vtables. Makes bug-77127.exe pass, and hopefully
9196         makes the code more maintainable.
9197         For now the old code is still there, and can be activated setting
9198         the env var "USE_NEW_INTERFACE_VTABLE_CODE".
9200 2008-02-06 Rodrigo Kumpera  <rkumpera@novell.com>
9202         * verify.c: guarded some debug functions around and #ifdef.
9204         * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
9206 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
9208         * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
9209         changes for now since they seem to break too many things.
9211 2008-02-05  Mark Probst  <mark.probst@gmail.com>
9213         * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
9214         mono_marshal_find_nonzero_bit_offset): Added macro and function
9215         for finding the byte- and bit-offset of a bitfield within a
9216         struct.
9218 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
9220         * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
9221         (mono_marshal_get_struct_to_ptr): Ditto.
9223         * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of 
9224         cctor_signature.
9226 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
9228         * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
9229         between methods for non-corlib types.
9231 2008-02-02  Geoff Norton  <gnorton@novell.com>
9233         * loader.c (mono_method_get_param_names): Populate the parameter name for 
9234         generic parameters as well. (Fixes #342536)
9236 2008-01-31 Rodrigo Kumpera  <rkumpera@novell.com>
9238         * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
9240         * verify.c (do_invoke_method): Fix for calling with byref structs.
9242         * verify.c (do_cast): push a boxed value type based on the type token and not
9243         the type of stack.
9245 2008-01-31  William Holmes  <billholmes54@gmail.com>
9247         * process.c (process_module_string_read): Check the size returned form 
9248           VerQueryValue to avoid out of memory exception. 
9250 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
9252         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
9253         Handle properly modules which are not in the moduleref table. Fixes
9254         #356938.
9256 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
9258         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
9259         the dynamic case which is now in managed code.
9260         (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
9262         * marshal.c (mono_string_to_bstr): Fix a warning.
9263         (init_com_provider_ms): Ditto.
9265         * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
9267         * exception.c (mono_get_exception_out_of_memory): New helper function.
9269 2008-01-28  Jonathan Chambers  <joncham@gmail.com>
9271         * marshal.c: Add support for BSTR marshalling
9272         using other COM systems.
9274         Code is contributed under MIT/X11 license.
9276 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
9278         * object.c (mono_runtime_invoke_array): reverted previous
9279         commit as it breaks the build.
9281 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
9283         * object.c (mono_runtime_invoke_array): Verify arguments for
9284         invalid types. Fixes #348522.
9286 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
9288         * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
9289         non-final virtual calls using call. 
9291         * verify.c (do_invoke): fixed some TODOs.
9293         * verify.c (push_arg): set has_this_store for "ldarga 0".
9295 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
9297         * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
9298         which belong to an inflated class. Fixes #356531.
9300 2008-01-26  Robert Jordan  <robertj@gmx.net>
9302         * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
9303         which resort to FindFirstFile when a certain error condition
9304         (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
9305         Code is contributed under MIT/X11 license.
9307 2008-01-24  Jonathan Chambers  <joncham@gmail.com>
9309         * marshal.c (emit_marshal_string): Fix out string marshalling
9310         to use specified encoding. Fixes #323900.
9312         Code is contributed under MIT/X11 license.
9314 2008-01-24  Raja R Harinath  <harinath@hurrynot.org>
9316         * class.c (mono_class_inflate_generic_method_full): Don't modify
9317         iresult->context after cache check.
9319 2008-01-23  Zoltan Varga  <vargaz@gmail.com>
9321         * class.c (mono_class_inflate_generic_method_full): Change the
9322         struct assignments to memcpy for better visibility and add some comments.
9324 2008-01-23  Dick Porter  <dick@ximian.com>
9326         * threads.c (mono_threads_set_shutting_down): Simplify shutdown
9327         procedure, and make it work on windows.
9329 2008-01-22  Zoltan Varga  <vargaz@gmail.com>
9331         * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
9332         a MonoReflectionTypeBuilder since it is always of that type.
9334         * reflection.c (mono_type_get_object): Remove an unneccesary check.     
9336         * reflection.c (mono_generic_class_get_object): Simplify this a bit.
9338         * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
9339         
9340         * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
9342         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
9344         * reflection.c (mono_reflection_create_runtime_class): Remove already created
9345         instantiations from the type cache.
9347 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9349         * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
9351         * verify.c (do_unbox_value): push a controled mutability managed pointer.
9353 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9355         * verify.c (do_ldstr): added, verifies if the #US token is valid.
9357         * verify.c (mono_method_verify): removed old TODO
9359 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9361         * verify.c (do_newobj): add visibility check.
9363 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9365         * verify.c (do_load_function_ptr): add visibility check.
9367 2008-01-21  Massimiliano Mantione  <massi@ximian.com>
9368         *class.c:
9369         mono_generic_class_get_class: hook profiler events.
9370         mono_field_get_offset: added to support heap-shot in the new profiler.
9371         *class.h: exported mono_field_get_offset.
9372         * reflection.c:
9373         mono_reflection_setup_internal_class: hook profiler events.
9375 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
9377         * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
9378         argument here too and use it to avoid checking for pending exceptions if 
9379         possible.
9381 2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>
9383         * assembly.c (build_assembly_name): add arg for passing the assembly
9384         flags. Do not consider a PublicKey with value "null" valid.
9385         (mono_assembly_name_parse_full): added boolean argument that will be
9386         set if the assembly name contains a PublicKeyToken spec. Added support
9387         for the Retargetable spec for which only Yes or No are allowed as valid
9388         value. Consider assembly name invalid if Retargetable spec is set, but
9389         either version, culture or public key (token) are not specified.
9390         * metadata-internals.h: sync signature of mono_assembly_name_parse_full
9391         with implementation in assembly.c.
9392         * icall.c (fill_reflection_assembly_name): also copy assembly flags
9393         from MonoAssemblyName.
9394         (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
9395         introduced argument for mono_assembly_name_parse_full to know if the
9396         assembly name has a PublicKeyToken spec, and if it has instruct
9397         fill_reflection_assembly_name to use default value for keyToken (if
9398         PublicKeyToken is null).
9400 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
9402         * verify.c (mono_method_verify): fixed ovf ops with
9403         float values. They are unverifiable now.
9405 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
9407         * class.c (set_failure_from_loader_error): add BadImageException to the
9408         list of exceptions that can cause a type to fail to load.
9410         * class.c (mono_class_get_exception_for_failure): same.
9412 2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
9414         * verify.c (in_any_exception_block): added, check if offset
9415         is part of any exception handling clause.
9417         * verify.c (get_stack_type): added VAR and MVAR types.
9419         * verify.c (do_stobj): better error messages.
9421         * verify.c (do_cpobj): added, check cpobj.
9423         * verify.c (do_initobj): added, check initobj.
9425         * verify.c (do_sizeof): added, check sizeof.
9427         * verify.c (do_localloc): added, check localloc.
9429         * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
9431 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
9433         * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
9434         save_lmf/restore_lmf opcodes.
9436         * threads.c (mono_threads_install_notify_pending_exc): New function to
9437         install a callback notifying the JIT there is a pending exception on a thread.
9438         (mono_thread_request_interruption): Call the new callback.
9439         (mono_thread_get_and_clear_pending_exception): New function to return the
9440         exception pending on a thread.
9442         * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
9443         to turn off checking for pending exceptions.
9444         (mono_marshal_get_native_wrapper): Ditto.
9446 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
9448         * threads-types.h: Get rid of the unnecessary extern declarations.
9450 2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>
9452         * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
9453         return field from parent class if not private.
9454         (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
9455         returns fields from parent class if they are not private.
9456         (method_nonpublic): added function to determine if a given method
9457         should be considered non-public. Returns false for private methods
9458         on parent class, and internal methods from parent on the 1.0 profile.
9459         (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
9460         use method_nonpublic function to determine whether method should be
9461         returned.
9462         (property_accessor_public): use newly introduced method_nonpublic
9463         function to determine whether accessor is non-public. 
9464         (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
9465         event from parent class if not private. Only return static event if
9466         Static flag is set, and only return static event from parent class if
9467         FlattenHierarchy flag is set.
9468         (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
9469         include non-private events from parent class.
9471 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
9473         * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
9474         warning.
9476 2008-01-16  Wade Berrier <wberrier@novell.com>
9478         * security.c: Add assembly.h header to appease some warnings
9480 2008-01-16  Dick Porter  <dick@ximian.com>
9482         * process.c (process_module_string_read): Remove trailing null
9483         when saving string.
9485 2008-01-16  Mark Probst  <mark.probst@gmail.com>
9487         * class-internals.h: A new data structure describing the layout of
9488         a runtime generic context (MonoRuntimeGenericContextTemplate).
9490         * metadata-internals.h: Added a hash table to MonoDomain that maps
9491         from open generic classes to their runtime generic context
9492         templates.
9494         * object.c: Building of the runtime generic context, including
9495         proper handling of generic type arguments of superclasses.
9496         Building of the runtime generic context according to the template.
9498 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
9500         * class.c (mono_class_setup_fields): Set field.count for generic instances.
9501         Fixes #350856.
9503         * image.c (do_mono_image_open): Pass TRUE as last_exists to 
9504         mono_portability_find_file (). Fixes #325466.
9505         (mono_image_get_public_key): Fix a warning.
9507 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
9509         * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
9510         Fixes #353550.
9511         (mono_class_from_name_case): Ditto.
9513 2008-01-13  Eyal Alaluf <eyala@mainsoft.com>
9515         * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
9516           common storage for the tables used in the System/NumberFormatter class.
9518 2008-01-13  Zoltan Varga  <vargaz@gmail.com>
9520         * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
9522 2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
9524         * verify.c (get_boxable_mono_type): check if the token is valid.
9526         * verify.c (set_stack_value): changed to add an error if an
9527         invalid type is set on stack. Changed all callers due to signature change.
9529         * verify.c (do_stobj): implement stobj validation.
9531 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
9533         * reflection.c (reflection_methodbuilder_to_mono_method): No need to
9534         set container->is_method, it was set earlier.
9536         * metadata.c (type_in_image): Handle MVARs which belong to not finished
9537         generic methods.
9539         * reflection.c (mono_reflection_initialize_generic_parameter): Set
9540         is_method of the generic container to TRUE for methods.
9542 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
9544         * metadata.c (type_in_image): Handle type parameters properly.
9546         * class-internals.h (MonoGenericParam): Add an 'image' argument to track
9547         memory ownership of this structure.
9549 2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
9551         * verify.c (get_boxable_mono_type): make typedref types been just
9552         unverifiable. check for void type.
9554         * verify.c (do_unbox_any): added, verify opcode unbox.any.
9556         * verify.c (do_load_function_ptr): accept method spec tokens.
9558 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
9560         * marshal.c (mono_class_native_size): Always set *align even if this is called
9561         recursively.
9563 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
9565         * verify.c (mono_verify_corlib): Remove this as it was not used and was 
9566         out-of-date.
9568 2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
9570         * verify.c: removed some old unused tables. A huge bunch of small fixes
9571         to things found while testing the verifier with mono basic.
9573         * verify.c (dump_stack_value): dump null literal flag to.
9575         * verify.c (verify_type_compatibility_full): fix comparison
9576         for types that have a generic super type.
9578         * verify.c (verify_stack_type_compatibility): fix compatibility
9579         between null literals and reference types. fix compatibility between
9580         boxed valuetypes and object. fix corner case test for enums.
9582         * verify.c (do_cmp_op): proper verification of cgt.un in case
9583         of reference types.
9585         * verify.c (do_invoke_method): fix error message.
9587         * verify.c (do_store_indirect
9589         * verify.c (check_is_valid_type_for_field_ops): proper verification
9590         of managed pointers to valuetypes and boxed valuetypes. proper verification
9591         of null literals.
9593         * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
9594         allow token to be a reference type.
9596         * verify.c (do_cast): proper handling of boxes valuetypes.
9598         * verify.c (do_stelem): proper handling of storing a boxed valuetype
9599         in object[].
9601         * verify.c (mono_method_verify): pass the opcode to do_cmp_op
9602         to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
9603         fixed the decoding of unbox_any
9605 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
9607         * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
9609 2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
9611         * verify.c (do_newobj): do delegate verification.
9613         * verify.c (verify_delegate_compatibility): perform delegate
9614         verification.
9616         * verify.c (verify_ldftn_delegate): perform tests related to
9617         ldftn delegates.
9619         * verify.c (mono_delegate_signature_equal): perform the
9620         slightly diferent signature comparison required by delegates.
9622         * metadata.c (mono_metadata_type_equal_full): added and exported
9623         as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
9624         allows signature only comparison.
9626         * metadata-internal.h (mono_metadata_type_equal_full): added and exported
9627         as MONO_INTERNAL.
9629 2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
9631         * verify.c: added a bunch of stack_slot_* functions to
9632         make access to stack slot type easier. This is required to
9633         allow optional flags, like null literal, boxed value and
9634         this pointer.
9635         All access paths to IlStackDesc::stype have been changed 
9636         to use these new funcions.
9637         Removed a bunch of unused functions and cleared all warnings.
9638         This patch introduces the usage of the this pointer and 
9639         boxed value flags.
9641 2008-01-07  Zoltan Varga  <vargaz@gmail.com>
9643         * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
9645 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
9647         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
9648         match managed version.
9650         * appdomain.c: Bump corlib version.
9651         
9652         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
9653         argument.
9655 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
9657         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
9658         Set public key token to zero-length byte array if assembly is not
9659         strongnamed.
9661 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
9663         * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
9664         writing a vtype array elem.
9666 2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
9668         * assembly.c (build_assembly_name): return FALSE if length of token is
9669         not 16 (if not "null").
9670         (mono_assembly_name_parse_full): return FALSE if value of version,
9671         culture, token or key is 0.
9672         * icall.c (fill_reflection_assembly_name): add boolean arguments to
9673         specify whether public key and public key token must be set to default
9674         value (zero-length byte array) if not available. Set versioncompat to
9675         SameMachine. If public key is available or the default is set, then
9676         set PublicKey flag.
9677         (ves_icall_System_Reflection_Assembly_FillName): if no public key
9678         is available, use empty byte array as default value. On the 2.0
9679         profile, use default value for public key token if not set.
9680         (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
9681         profile, use default value for public key if not set. On the 2.0
9682         profile, use default value for public key token if not set.
9683         (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
9684         default values for public key and public key token.
9686 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
9688         * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
9689         field to keep it in synch with the managed object.
9691         * marshal.c (emit_marshal_object): Add support for byref marshalling of
9692         delegates. Fixes #351520.
9694         * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
9695         contains defined memory.
9696         
9697         * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
9699         * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
9700         
9701         * sgen-gc.c (check_consistency): New helper function to do a consistency check
9702         of the GC data structures.
9704         * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
9706         * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
9707         
9708         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
9709         barrier.
9710         (mono_array_clone_in_domain): Ditto.
9711         (mono_array_clone_in_domain): Ditto.
9713         * threads.c (start_wrapper): Register the thread start argument as a GC root.
9714         (cache_culture): Use a write barrier.
9716         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
9717         (ves_icall_get_property_info): Ditto.
9719         * object.h (MONO_STRUCT_SETREF): New macro.
9721         * class-internals.h (MonoStats): Add some GC statistics.
9723         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
9725 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
9727         * exception.c (mono_exception_from_name_two_strings):
9728         Break from loop after method is found.
9730 2008-01-04  Dick Porter  <dick@ximian.com>
9732         * process.c (process_module_string_read): Rename variable to
9733         reflect correct usage, after fixing bug 345972.
9735 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
9737         * verify.c (mono_type_create_fnptr_from_mono_method): 
9738         created a MonoType function pointer instance to be used during
9739         verification. The verifier releases this memory at end.
9741         * verify.c (mono_method_is_constructor): extracted repeated
9742         checks for constructor into a single class.
9744         * verify.c (do_push_field): use new extracted method
9745         for constructor check.
9747         * verify.c (do_newobj): same.
9749         * verify.c (do_ldftn): renamed to do_load_function_ptr
9750         and make it verify ldvirtftn too.
9752         * verify.c (mono_method_verify: proper verification
9753         of ldvirtftn. release created MonoMethod instances.
9755 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
9757         * verify.c (token_bounds_check): added.
9759         * verify.c (do_ldftn): added.
9761         * verify.c (mono_method_verify): proper verificartion of ldftn.
9763 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
9765         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
9766         than the table row count. It's the resposibility of the caller to
9767         make the bounds check and raise the correct error.
9769         * metadata.c (mono_metadata_decode_row_col): Same.
9771         * loader.c (mono_get_method_from_token): perform bounds check
9772         on token for methoddef table.
9774 2007-12-29  Miguel de Icaza  <miguel@novell.com>
9776         * icall.c
9777         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
9778         assert into a negative result, the managed code already coped with
9779         that.
9781         Some folks on Windows reported this error. 
9783 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
9785         * appdomain.c: Bump corlib version.
9786         * icall.c:
9787         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
9788         CultureInfo.CreateCulture to create CultureInfo for name.
9789         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
9790         create CultureInfo for name. Fixes bug #347174.
9792 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
9794         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
9795         flags.
9797         * verify.c (is_valid_branch_instruction): allow branching to the
9798         first instruction of the protected block.
9800         * verify.c (is_valid_cmp_branch_instruction): same.
9802         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
9803         avoid double initialization.
9805         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
9806         detect which cases the eval stack should just be copied.
9808         * verify.c (mono_method_verify): check if the eval stack
9809         is empty when entering a protected block.
9811 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
9813         * verify.c: added is_clause_in_range, is_clause_inside_range,
9814         is_clause_nested and verify_clause_relationship. They perform
9815         the verifications stated in P1 12.4.2.7.
9817         * verify.c (mono_method_verify): remove some unused variables,
9818         add the new exception clause checks, add instruction border
9819         checks for protected block start/end, improved some error 
9820         messages and fixed a bug in the way invalid instruction access
9821         is detected.
9823 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
9825         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
9826         from GC 7.0 if available.
9828         * object.c: Remove an unused define.
9829         
9830         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
9832         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
9834         * null-gc.c (mono_gc_make_descr_for_array): Implement.
9836         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
9838         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
9839         to take the same arguments as the other make_descr functions.
9841         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
9843         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
9844         directly.
9846         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
9847         mini.c.
9849         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
9850         call to boehm-gc.c.
9852         * boehm-gc.c (mono_gc_register_root): Fix a warning.
9854         * null-gc.c (mono_gc_register_root): Fix a warning.
9856         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
9858         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
9859         (mono_gc_base_init): Call GC_init ().
9861         * null-gc.c: Define mono_gc_register_root () as a no-op.
9863         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
9865 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
9867         * verify.c: add prototype for merge_stacks at top
9869         * verify.c (do_switch): added.
9871         * verify.c (merge_stacks): on some cases the stack merging
9872         was not happening properly. Unequal stack sizes at merge
9873         points should be invalid.
9875         * verify.c (mono_method_verify): added more debug info on stack state.
9876         verify switch properly.
9878 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
9880         * method-builder.h: New file, moved the mono_mb_ declarations here from 
9881         marshal.h.
9883         * boehm-gc.c marshal.c: Include method-builder.h.
9885         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
9887         * marshal.c: Remove some code which is now in method-builder.c.
9889 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
9891         * method-builder.c: New file, extraction of the method builder functionality 
9892         from marshal.c.
9894         * marshal.c: Move the mb functions into method-builder.c.
9896         * marshal.h marshal.c: Export some mono_mb_... functions.
9898         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
9900         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
9901         the caller.
9903         * class.c (mono_class_get_full): Check the token type in the dynamic case.
9905         * loader.c (mono_field_from_token): Ditto.      
9907         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
9908         type as well.
9909         
9910         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
9911         Fixes #342565.
9913         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
9914         a helper function for setting it.
9916         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
9918         
9919         * assembly.c: Significally simplify code now that referenced assemblies are 
9920         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
9922         * threads.h: Don't include  the internal threads-types.h header file. Fixes
9923         #349952.
9925 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
9927         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
9928         instructions that were target of branches or are at protected block boundaries.
9930         * verify.c (in_same_block): handle filter clauses.
9932         * verify.c (is_valid_branch_instruction): added. checks the target of
9933         instructions br or brtrue/false.
9935         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
9936         binary branch instructions such as beq and bge.
9938         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
9939         and made it pin the instruction as been part of the exception block.
9941         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
9942         of in_same_block.
9944         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
9945         of in_same_block.
9947         * verify.c (do_ret): ret from a protected block is unverifiable and
9948         not invalid.
9950         * verify.c (do_static_branch): verify br and br.s instructions.
9952         * verify.c (merge_stacks): add extra param to support detection
9953         of branches in the middle of instructions.
9954         
9955         * verify.c (mono_method_verify): verify branches and exception blocks
9956         that target the middle of instructions. Proper verification of br and br.s.
9958 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
9960         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
9961         skip_visibility field.
9962         (reflection_methodbuilder_from_dynamic_method): Ditto.
9964         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
9965         registrations. Fixes #348193.
9967         * threads.h: Move the internal mono_thread_get_pending_exception () to
9968         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
9970 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
9972         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
9973         icall registration. Fixes #348193.
9975         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
9976         for corlib classes into object. Fixes #349621.
9978 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
9980         * icall.c (property_accessor_nonpublic): new function to determine
9981         whether an accessor allows a property to be considered non-public.
9982         Returns false for private accessor(s) from parent class, and internal
9983         accessor(s) from parent on 2.0 profile (and higher).
9984         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
9985         to determine whether property should be included if NonPublic flag
9986         is set. Fixes bug #349078.
9988 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
9990         * verify.c (init_stack_with_value): added.
9992         * verify.c (mono_method_verify): extracted common
9993         code for exception initialization into init_stack_with_value.
9995         * verify.c (mono_method_verify): initialize the exception
9996         for handler clauses as well.
9998         * verify.c (mono_method_verify): fix the exception clause
9999         ordering rules, it should use handler end offset and not
10000         start offset.
10002 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
10004         * rawbuffer.c: remove useless warning.
10006 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
10008         * threads.h, threads-types.h: move functions to the correct header
10009         (fixes bug#349952).
10011 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
10013         * verify.c (mono_method_verify): proper verification
10014         of exception handling clauses ranges and fallthru in
10015         and out of protected blocks.
10017 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
10019         * verify.c (mono_method_verify): fixed compilation issue.
10021 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
10023         * verify.c (mono_method_verify): a printf slipped in, changed
10024         to use verifier debug macro.
10026 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
10028         * verify.c (is_correct_leave): check for filter clauses.
10030         * verify.c (do_filter): added.
10032         * verify.c (mono_method_verify): property verification of leave.
10035 2007-12-18  Mark Probst  <mark.probst@gmail.com>
10037         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
10038         Win32 build, until we figure out how to do the proper thing on
10039         Win32.
10041 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
10043         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
10044         by the previous patch.
10045         
10046         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
10047         the assembly resolve handler for refonly assemblies.
10049 2007-12-17  Mark Probst  <mark.probst@gmail.com>
10051         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
10052         Make sure only one thread is allowed to commence shutdown, and
10053         don't allow new threads to be started once shutdown is in
10054         progress.
10056 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
10058         * verify.c (is_correct_endfilter): added.
10060         * verify.c (is_unverifiable_endfilter): added.
10062         * verify.c (do_endfilter): added.
10064         * verify.c (mono_method_verify): property verification of endfilter
10065         and fixed a corner case or endfinally.
10067 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
10069         * verify.h: new flags to support fail fast of unverifiable code and
10070         do non-strict verification. Non-strict verification is required to
10071         have MS runtime compatibility. There are a huge amount of unverifiable
10072         code that it accepts as verifiable. The strict mode verifies the code
10073         as the specs says.
10074         Non-strict mode will be required in cases where code needs to be
10075         accepted as verifiable but fails under strict mode.
10077         * pedump.c: added support to fail fast and non-strict verification.
10079         * verify.c: added support for both fail fast and non-strict verification.
10081 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
10083         * verify.c (is_correct_endfinally): added.
10085         * verify.c (mono_method_verify): property verification of endfinally.
10087 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10089         * verify.c (in_any_block): check for filter clauses.
10091         * verify.c (is_correct_rethrow): added.
10093         * verify.c (mono_method_verify): property verification of rethrow.
10095         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
10097 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10099         * verify.c (do_throw): added.
10101         * verify.c (mono_method_verify): property verification of throw
10103 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
10105         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
10106         assemblies. Fixes #346425.
10108 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
10110         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
10111         FieldBuilders.
10113         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
10115         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
10116         prevent asserts when this is called with a token which might not be valid.
10118         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
10119         lookup_dynamic_token_class with valid_token == FALSE.
10121         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
10123         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
10125         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
10126         
10127 2007-12-10  Mark Probst  <mark.probst@gmail.com>
10129         * gc.c: Don't delay threadpool thread finalization unless Mono is
10130         shutting down.
10132 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10134         * threads.c: turn an assert into a non-fatal warning.
10136 2007-12-09  Robert Jordan  <robertj@gmx.net>
10138         * icall.c (GetVirtualMethod): Add missing argument validation.
10140 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
10142         * verify.c (do_cast): added.
10144         * verify.c (mono_method_verify): property verification of castclass and isinst.
10147 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
10149         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
10151         * verify.c (do_stelem): added.
10153         * verify.c (mono_method_verify): property verification of stelem.X.
10155 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10157         * class.c, class-internals.h: Introduce an environment variable
10158         (MONO_GENERIC_SHARING) through which the extent of generic code
10159         sharing can be controlled (share all classes, share only corlib
10160         classes, or share nothing).
10162         * object.c: Only create runtime generic context for classes for
10163         which sharing is enabled.
10165 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
10167         * verify.c (do_ldelem): refactor it to work with ldelem.any.
10169         * verify.c (mono_method_verify): property verification of ldelem.any.
10171 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
10173         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
10174         added ldelem.X opcodes.
10176         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
10178         * verify.c: proper verification of ldelem.X 
10180 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10182         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
10184 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
10186         * verify.c (mono_method_verify): null literal requires special handling,
10187         the value pushed on stack need to be flagged as so.
10189         * verify.c (do_ldelema): Verify ldelema properly.
10191 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
10193         * verify.c: Verify ldlen properly.
10195 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
10197         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
10198         to the target object's type. Fixes #346160.
10200 2007-12-05  Dick Porter  <dick@ximian.com>
10202         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
10203         Solaris needs the same workaround as BSD-derived systems.  Fixes
10204         bug 323524, patch by Burkhard Linke
10205         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
10207 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
10209         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
10210         handle to use when error dialog is shown; otherwise, update mask
10211         to show no error dialog when an error occurs.
10213 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
10215         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
10217         * class.c (mono_class_get_field_default_value): New helper function to initialize
10218         field->def_type and field->data.
10220 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
10222         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
10223         the general one.
10225         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
10227         * marshal.c: Avoid depending on delegate->method_info being set.
10229         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
10230         
10231         * object.c (mono_delegate_ctor): Set delegate->method.
10233         * object-internals.h (struct _MonoDelegate): Add 'method' field.
10235         * appdomain.c: Bump corlib version.
10237 2007-11-27  Raja R Harinath  <harinath@gmail.com>
10239         * metadata.c (mono_generic_inst_equal_full): Short-circuit
10240         equality check if we're comparing canonicalized MonoGenericInsts.
10242 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
10244         * class.c (generic_array_methods): Call mono_class_setup_methods () before
10245         accessing class->methods.
10247 2007-11-22  Dick Porter  <dick@ximian.com>
10249         * threads.c: Ensure that the synch_cs is set before trying to use
10250         it.
10252 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
10254         * profiler.c: r89126 broke the statistial profiler, unbreak.
10256 2007-11-22  Martin Baulig  <martin@ximian.com>
10258         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
10260         * mono-debug.c
10261         (mono_debug_debugger_version): Bump to 3.
10262         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
10263         -> mono_debugger_class_initialized().
10265         * mono-debug-debugger.c
10266         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
10268         * class.c
10269         (mono_debugger_start_class_init_func): Removed.
10270         (mono_debugger_class_loaded_methods_func): Added.
10271         (mono_class_setup_methods): Call it here.
10273 2007-11-22  Martin Baulig  <martin@ximian.com>
10275         * mono-debug.c
10276         (mono_debug_add_delegate_trampoline): New public method.
10277         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
10279         * mono-debug.h
10280         (MonoSymbolTable): Added `global_data_table'.
10281         (MonoDebuggerTypeKind): Removed.
10283 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
10285         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
10286         these methods.
10288         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10289         
10290 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
10292         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
10294 2007-11-20  Martin Baulig  <martin@ximian.com>
10296         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
10298         * mono-debug-debugger.c
10299         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
10300         (mono_debugger_remove_breakpoint): Likewise.
10301         (mono_debugger_check_breakpoints): Likewise.
10302         (mono_debugger_register_class_init_callback): New public method.
10303         (mono_debugger_remove_class_init_callback): Likewise.
10304         (mono_debugger_add_type): Likewise.
10306         * mono-debug-debugger.h
10307         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
10309 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
10311         * class.c: more interface implementations needed for the
10312         array enumerator (fixes bug #341112).
10314 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
10316         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
10317         fix ParamName of ArgumentNullExceptions.
10319 2007-11-17  Miguel de Icaza  <miguel@novell.com>
10321         * reflection.c (mono_reflection_encode_sighelper): Generate the
10322         modopts and modreqs.   I have a useless test that crashes monodis,
10323         but that shows the code working.
10325 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
10327         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
10328         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
10330 2007-11-15  Dick Porter  <dick@ximian.com>
10332         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
10333         When joining a thread, it's the thread that's calling Join that
10334         gets WaitSleepJoin state not the target.  Fixes the standalone
10335         test case in bug 334740, and hopefully the whole bug too.
10337 2007-11-15  Dick Porter  <dick@ximian.com>
10339         * process.c: Read file version info from the files pointed at by
10340         process modules, not the current process.  Fixes bug 315969.
10342         Use windows typedef names in some places to fix warnings on the
10343         windows build.
10345 2007-11-15  Mark Probst  <mark.probst@gmail.com>
10347         * image.c, metadata-internals.h: Added a generic_class_cache hash
10348         to MonoImage for looking up generic classes when sharing generics.
10350 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10352         * sgen-gc.c: warning cleanups.
10354 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
10356         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
10357         inherited properties.
10359 2007-11-14  Mark Probst  <mark.probst@gmail.com>
10361         * object.c, class-internals.h: Added more information to the
10362         runtime generic context.
10364 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
10366         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
10367         instead of just the target method. Generalize the abstract method handling to
10368         handle any non-static method.
10370         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10371         mono_marshal_get_delegate_invoke () signature change.
10373 2007-11-13  Mark Probst  <mark.probst@gmail.com>
10375         * class.c, class-internals.h: Made
10376         mono_type_get_basic_type_from_generic () public.  Fixed member
10377         access check for shared generics.
10379         * loader.c: Don't insert field into field cache if it's part of a
10380         non-inflated generic class.
10382         * domain.c, domain-internals.h: The generic sharing context is now
10383         part of the jit info data structure.  Added two accessor
10384         functions.
10386 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
10388         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
10389         the array Get/Set/Address methods, since the JIT inlines them.
10391         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
10393         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
10394         (mono_image_init): Initialize runtime_invoke_direct_cache.      
10396         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10397         mono_marshal_get_delegate_invoke signature change.
10399         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
10400         an additional argument. Add support for invoking abstract methods.
10402         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
10404         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
10406 2007-11-09  Mark Probst  <mark.probst@gmail.com>
10408         * class.c: Do field layout for open generic classes as well.
10410 2007-11-09  Mark Probst  <mark.probst@gmail.com>
10412         * gc.c, gc-internal.h: Don't finalize threadpool threads with
10413         other objects, because the threadpool is still around.  Put them
10414         in a list instead and after finalizing all other objects in the
10415         root domain shut down the thread pool and then finalize the
10416         threads.  Fixes bug #337383.
10418         * threads.c, thread-types.h: New mono_thread_create_internal()
10419         function for marking a thread with the threadpool flag before it
10420         started.  Set synch_cs to NULL after freeing it.
10422         * threadpool.c: Mark threadpool threads before they start.
10424 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10426         * reflection.h, reflection.c: don't export random functions
10427         and lazy load dbnull and missing objects.
10429 2007-11-07  Jonathan Chambers <joncham@gmail.com>
10431         * class.c: Initialize COM types if COM interfaces
10432         are present (not just COM classes).
10433         
10434         Code is contributed under MIT/X11 license.
10436 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
10437         * reflection.c:
10438         create_dynamic_mono_image: hook module profiler events (dynamic case).
10439         mono_image_basic_init: hook assembly profiler events (dynamic case).
10441 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
10442         * profiler.c:
10443         simple_appdomain_unload: completely terminate the profiler
10444         instead of only processing the statistical samples.
10445         simple_shutdown: make sure this is really called exactly once,
10446         even in multithreaded applications, and always listen to
10447         appdomain events.
10448         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
10449         here, the "[un]load" functions will do it.
10450         Fixes bugs #333791 and #325261.
10452 2007-11-07  Geoff Norton  <gnorton@novell.com>
10454         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
10455         rather than depend on __APPLE__.
10457 2007-11-07  Mark Probst  <mark.probst@gmail.com>
10459         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
10461 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
10463         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
10464         UTF16 MonoString. Fix the crash from bug #335488
10466 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
10468         * marshal.c: Correct (for non-Win32 OS) length != size in 
10469         mono_string_from_bstr. Fix #339530.
10471 2007-11-06  Geoff Norton  <gnorton@novell.com>
10473         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
10474         to succeed
10476 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
10478         * process.c: Added run-time GetProcessId API detection for Windows.
10480 2007-11-04  Miguel de Icaza  <miguel@novell.com>
10482         * reflection.c  (mono_param_get_objects): If a parameter has the
10483         attribute [System.Runtime.InteropServices.Optional] we should
10484         set the DefaultValue of the ParameterInfo to be
10485         System.Reflection.Missing instead of DBNull.
10487         See bug #339013.
10489         (mono_get_reflection_missing_object): New method,
10490         returns the System.Reflection.Missing.Value singleton instance.
10492 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
10494         * culture-info-table.h : regenerated.
10496 2007-11-02  Jonathan Chambers <joncham@gmail.com>
10498         * icall.c: Use GetEnvironmentStrings on windows
10499         so we are using the same environment block as 
10500         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
10501         #333740.
10502         
10503         Code is contributed under MIT/X11 license.
10505 2007-10-31  Martin Baulig  <martin@ximian.com>
10507         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
10509         * mono-debug-debugger.h
10510         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
10512 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
10514         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
10515         classes.
10517 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
10519         * culture-info-table.h : regenerated.
10521 2007-10-30  Robert Jordan  <robertj@gmx.net>
10523         * icall-def.h, icall.c:
10524         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
10526         Code is contributed under MIT/X11 license.
10528 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
10530         * class.c (mono_class_setup_vtable): Find the inflated methods in the
10531         inflated class instead of inflating them again.
10532         
10533         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
10534         dynamic case.
10536         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
10537         Call setup_supertypes () after klass->parent is set.
10538         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
10540         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
10541         for inflated instances of not yet created dynamic generic classes.
10542         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
10543         times from inflated_method.
10544         (methodbuilder_to_mono_method): Ditto.
10546 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
10548         * gc.c: code cleanup and removed old untested option of not creating the
10549         finalizer thread.
10551 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
10553         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
10554         creating a jump trampoline for dynamic methods.
10556 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
10558         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
10559         generic TypeBuilders when called from another method of the same type (bug #335131).
10562 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
10564         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
10565         doesn't seem to work perfectly.
10566         
10567         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
10568         called multiple times.
10569         (methodbuilder_to_mono_method): Ditto.
10570         (resolve_object): Inflate FieldBuilder's.
10572 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10574         * string-icalls.c, string-icalls.h, appdomain.c: patch from
10575         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
10576         RemoveEmptyEntries in the string.Split implementation (bug #322375).
10578 2007-10-26  Dick Porter  <dick@ximian.com>
10580         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
10581         Thread initialisation changes
10583 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
10585         * verify.c: fix compatibility check between arrays and System.Array
10587 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
10589         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
10590         too. Fixes #336999.
10592 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
10594         * object.c (mono_value_box): Use typed allocation here.
10596 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
10598         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
10599         trampoline instead of compiling the method right away.
10601         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
10603 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
10605         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
10606         related fields for dynamic classes. Fixes #334493.
10608 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
10610         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
10611         
10612         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
10614         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
10615         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
10617         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
10619         * reflection.c (create_generic_typespec): Initialize klass->generic_container
10620         if needed.
10621         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
10623 2007-10-18  Jonathan Chambers <joncham@gmail.com>
10625         * marshal.c: Use correct key when removing item
10626         from ccw_hash.
10627         
10628         Code is contributed under MIT/X11 license.
10630 2007-10-17  William Holmes  <billholmes54@gmail.com>
10632         *marshal.c: Adding a case to marshal booleans to U1
10634         Code is contributed under MIT/X11 license.
10636 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
10638         * class.c (mono_class_from_name): Search the modules compromising dynamic
10639         assemblies. Fixes #331601.
10641 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
10643         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
10644         exception if the type name contains an assembly component. Fixes #334203.
10646         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
10647         modules inside dynamic assemblies. Fixes #334200.
10648         
10649         * reflection.c: Set image->public_key and image->public_key_length;
10651         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
10652         fields.
10654         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
10655         
10656 2007-10-16  Mark Probst  <mark.probst@gmail.com>
10658         * metadata.c: Implemented correct comparing of generic classes.
10659         An inflated generic class can be equal to a non-inflated one if it
10660         is inflated with generic type variables as type arguments.  Fixes
10661         bug #333798.
10663 2007-10-15  Dick Porter  <dick@ximian.com>
10665         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
10666         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
10667         81646.
10669         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
10670         instead of a monitor lock.  This means that monitor_try_enter and
10671         co can set the thread state safely.
10672         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
10673         thread_interrupt_requested, so interrupt actually works.
10675         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
10676         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
10677         state accessor function
10679 2007-10-15  Martin Baulig  <martin@ximian.com>
10681         * mono-debug.h
10682         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
10683         the debugger with the current runtime.
10685 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
10687         * object.c, object-internals.h: added the ability to set a single
10688         trampoline for all the slots in a vtable.
10690 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10692         * marshal.c: deal with a possible race condition during multicast
10693         delegate invocation.
10695 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10697         * class.c: ensure value type methods don't have the synchronized
10698         flag set.
10700 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
10702         * string-icalls.c, string-icalls.h: reverted unapproved patch that
10703         breaks the build.
10705 2007-10-11  Joel Reed  <joelwreed@comcast.com>
10707         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
10708         to take an options parameter so that empty entries can be removed during
10709         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
10711 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10713         * marshal.c: make sure we don't store the signature from a dynamic
10714         method into the runtime invoke cache (bug #327189).
10716 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10718         * marshal.c: make sure the wrapper methods are properly initialized.
10720 2007-10-11  Mark Probst  <mark.probst@gmail.com>
10722         * metadata.c, metadata-internals.h: Generalized
10723         mono_type_stack_size() to mono_type_stack_size_internal() which
10724         takes an additional argument specifying whether it allows open
10725         types.
10727 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
10729         * verify.c (do_invoke_method): handle typedbyref params
10730         correctly and check for unverifiable return values.
10732         * verify.c (do_newobj): fix a warning.
10734 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
10736         * verify.c: don't tread typedbyref as allways unverifable,
10737         so uses, like (ld/st)loc.0 are valid. verify for the cases
10738         that it matters, like boxing related operations.
10740 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
10742         * verify.c: add verification of the newobj opcode. verification
10743         of delegate instantation still missing due ldftn and virldftn not
10744         pushing the function type on stack
10746 2007-10-08  Mark Probst  <mark.probst@gmail.com>
10748         * class-internals.h: Runtime generic context data structure
10749         definition.
10751         * object.c: Initialization of runtime generic context at runtime
10752         vtable creation time.
10754 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
10755         * class.c (mono_class_create_from_typedef,
10756         mono_class_from_generic_parameter, mono_ptr_class_get,
10757         mono_fnptr_class_get, mono_bounded_array_class_get)
10758         * domain.c (mono_domain_create, mono_domain_free)
10759         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
10760         * image.c (do_mono_image_load, mono_image_close):
10761         Hooked up load-unload profiler events.
10763 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10765         * domain.c: track statistics about the actual amount of native code
10766         allocated.
10768 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
10770         * class.c: the valuetype enumerators don't have the additional
10771         supertypes interfaces.
10773 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10775         * class.c: need more interfaces setup for the IEnumerator<T>
10776         object created for arrays (tests/ienumerator-interfaces.2.cs).
10778 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
10780         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
10782 2007-10-05  Alp Toker  <alp@atoker.com>
10784         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
10785         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
10786         #315863.
10788 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
10790         * verify.c (verify_type_compatibility_full): verification of
10791         compatibility improved, validates correctly non-strict checks between
10792         native int and I4 types different than (unsigned)int32.
10794         * verify.c (do_store_indirect): added, do all verification of
10795         ldind.X opcodes. 
10797         * verify.c (get_load_indirect_mono_type): renamed to
10798         get_indirect_op_mono_type, as it now returns the MonoType for 
10799         ldind.X and stind.X opcodes.
10801 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
10803         * reflection.c: Fix the encoding of generic type definition for
10804         TypeBuilders.
10806         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
10807         mono_image_typedef_or_ref but allows to specify if typespec lookups should
10808         be made. Typespec check is done prior to typeref cache lookup.
10810         * reflection.c (mono_image_typedef_or_ref): now just delegate to
10811         mono_image_typedef_or_ref_full.
10813         * reflection.c (encode_generic_class): encode the generic class
10814         directly instead of calling encode_type.
10816         * reflection.c (encode_type): encode the generic type definition
10817         MonoClass as a generic instantiation.
10819         * reflection.c (create_typespec): cache typespec tokens in
10820         the assembly->typespec cache. Don't create typespec for a generic
10821         instance MonoClass. Create typespec for the generic type defintion.
10823         * reflection.c (create_generic_typespec): encode the generic
10824         class directly instead of calling encode_type.
10826         * reflection.c (mono_image_create_token): encode the generic
10827         type definition not using a typespec for MonoType instances.
10830 2007-10-04  Raja R Harinath  <rharinath@novell.com>
10832         Fix #328812
10833         * class.c (mono_image_init_name_cache): Don't return nested
10834         'protected internal' classes.
10835         (mono_class_from_name_case): Likewise.
10837 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
10839         * icall-def.h, icall.c : get_bundled_machine_config() is now the
10840           common function used by both DefaultConfig in System.dll and
10841           InternalConfigurationHost in System.Configuration.dll.
10843 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10845         * class.c: automatically add to vectors only a few essential explicit
10846         generic interfaces. The rest of the interfaces that arrays should
10847         provide are currently implicitly added (but still not lazily, see the
10848         design in the discussion of bug#325495 for the details of what is
10849         needed for that). Additionally, implicit interfaces are assigned the
10850         same vtable slot as the explicit interfaces (as they are compatible):
10851         this enables huge memory savings since we don't need to instantiate
10852         as many memthods and as large vtables anymore. Also, Since
10853         GetEnumerator<T> returns an instance of a type that is required to
10854         support a similarly large set of interfaces as arrays, we add
10855         implicit interfaces and interface offset sharing support to those
10856         types, too. This change adds all the required interfaces so that
10857         the anonarray.cs test case in the bug report works (we don't add
10858         all the interfaces to arrays of arrays 3-level deep and more because
10859         of the memory requirements explained in the bug and since they are much
10860         less common: the lazy-loading support will enabled them to work, too).
10862 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
10864         * verify.c (merge_stacks): major clean up, all type compatibility
10865         checks are done by verify_type_compatibility. This fix my earlier lack
10866         of understanding of the CLR type system and merge_stacks no longer looks
10867         scary.
10869         * verify.c: fixed some bad spelling.
10871 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
10873         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
10874         a given stack slock.
10875         
10876         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
10877         verify_type_compatibility_full. This removed a near indentical function and fixed
10878         handling of Int32 and IntPtr across all opcodes.
10880 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
10882         * class.c: only vectors have the additional generic interfaces.
10884 2007-10-01  Jonathan Chambers <joncham@gmail.com>
10886         * mono-config.c: Use g_strcasecmp instead of
10887         strcasecmp like everywhere else to fix
10888         compilation with MSVC.
10889         
10890         Code is contributed under MIT/X11 license.
10892 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10894         * object.c, object-internals.h: refactored the IMT code to enable
10895         building a single slot at a time and lazily creating the IMT trampolines
10896         and thunks.
10898 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
10900         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
10902         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
10903         Fixes #328501.
10904         
10905 2007-09-29  Raja R Harinath  <harinath@gmail.com>
10907         * loader.c (method_from_methodspec): Rearrange to avoid
10908         un-necessary exposition.  Don't assert out if the method's
10909         declaring type is a generic type definition.
10911 2007-09-28  Martin Baulig  <martin@ximian.com>
10913         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
10915 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
10917         * class-internals.h: optimize field layout of MonoClass to
10918         requires less cachelines at runtime and save a few bytes on 64 bit
10919         systems.
10921 2007-09-28  Jb Evain  <jbevain@novell.com>
10923         * reflection.c: when encoding type names in custom attributes,
10924         if the type is a closed generic type, its generic arguments
10925         have to be serialized as AssemblyQualifiedName, so that when
10926         they are deserialized, it's possible to re-create them properly.
10927         Fixes #329450.
10930 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
10932         * object.c, class-internals.h: added delegate-creation counter.
10934 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
10936         * class.c: cleanup of the code that synthetizes interfaces for
10937         arrays in 2.0: saves quit a bit of corlib mempool memory.
10938         Code to fix bug #325495 ifdeffed out for now until the issues
10939         with memory usage and O(n^2) behaviour are fixed.
10941 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10943         * marshal.c: when possible, do not duplicate the name of the methods
10944         in the method builder and in the generated MonoMethod.
10946 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
10947         * verify.c: added support for type checking ldind_* opcodes.
10949 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
10951         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
10952         which is used to distinguish the fully open instantiation of a TypeBuilder
10953         with the rest. This temporary hack is required to restore the property that
10954         the fully open instantiation is the same type of the generic type definition.
10956         * class-internals.h (mono_generic_class_is_generic_type_definition):
10957         new function as part of the internal API.
10959         * class.c (inflate_generic_type): return NULL when the generic inst is
10960         fully open. The fully open generic type is now the same as the generic type
10961         definition for non TypeBuilder types.
10963         * class.c (mono_generic_class_get_class): removed assert since it is
10964         no longer valid, gklass->cached_class can point to the generic type definition.
10966         * class.c (mono_generic_class_is_generic_type_definition): new.
10968         * metadata.c (mono_generic_class_hash): added is_tb_open field
10969         to the hash calculation.
10971         * metadata.c (free_generic_class): if the generic class is associated
10972         with the generic type definition, its field will come from the mempool and
10973         must not be freed.
10975         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
10976         new, this function identifies the corner case of a TypeBuilder fully open
10977         instantiation.
10979         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
10980         for lookup. Set gclass->cached_class to be the container class in case of
10981         the fully open instantiation of non TypeBuilder types.
10983         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
10984         to compare generic classes.
10986         * reflection.c (method_encode_methodspec): remove assert that
10987         no longer is valid.
10989         * reflection.c (mono_reflection_generic_class_initialize): add
10990         an aditional assert to ensure the proper type is used.
10992 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
10994         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
10995         to enjoy it.
10997 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
10999         * verify.c (push_arg): Fixed support for ldarga
11000         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
11001         MonoType used as first arg in case of instance calls.
11003 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
11005         * verify.c: Support for verifying VAR and MVAR types, 
11007 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
11009         * icall.c (ves_icall_get_property_info): Set the reflected type of the
11010         accessors correctly.
11012 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11014         * threads.c: support OSX and other systems in
11015         mono_thread_get_stack_bounds (bug #328026).
11017 2007-09-25  Martin Baulig  <martin@ximian.com>
11019         * mono-debug.h
11020         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
11022 2007-09-24  Martin Baulig  <martin@ximian.com>
11024         * mono-debug.h
11025         (MonoDebugClassEntry): Moved the definition of this struct into
11026         mono-debug.c to make it private.
11028         * mono-debug.c
11029         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
11030         type table per symbol file, we don't need to store the symfile id
11031         any longer.
11033 2007-09-24  Martin Baulig  <martin@ximian.com>
11035         Create one type table per symbol file, since a `MonoClass *' gets
11036         invalid when its image is unloaded.
11038         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
11039         (MonoDebugHandle): Added `type_table'.
11041 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11043         * mempool.c, mempool.h: added mono_mempool_new_size () API
11044         to be able to specify a smaller initial size for the pool.
11045         Adjusted the code to slowly increase pool size before using
11046         the previous default size.
11047         * image.c: use a small initial size for image mempools.
11049 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
11051         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
11052         Fixes ##320990.
11054         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
11055         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
11057 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
11059         * metadata.c (mono_type_create_from_typespec): Remove an invalid
11060         free. Fixes #327438.
11062 2007-09-21  Raja R Harinath  <harinath@gmail.com>
11064         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
11065         generic instantiations, etc.
11066         <MONO_TYPE_ARRAY>: Likewise.
11068 2007-09-21  Martin Baulig  <martin@ximian.com>
11070         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
11071         these structs were never defined.
11072         (MonoDebugHandle): Removed the `_priv' field, it was never used.
11074 2007-09-21  Martin Baulig  <martin@ximian.com>
11076         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
11078 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
11080         * image.c: removed the guid hash tables: we can get the same info
11081         without the additional memory usage hit (partially fixes also bug #327052).
11083 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
11085         * profiler.h, profiler-private.h, profiler.c: add a new profiler
11086         event to handle unloading methods. After the event is called, the
11087         corresponding MonoMethod* must be considered invalid.
11088         * loader.c (mono_free_method): call the new mono_profiler_method_free
11089         event.
11091 2007-09-20  Mark Probst  <mark.probst@gmail.com>
11093         * domain-internals.h: New flag in MonoJitInfo which marks shared
11094         generic methods.  New hash table (shared_generics_hash) in
11095         MonoDomain to keep track of shared generic methods.  Prototypes
11096         for functions to register and lookup shared generic methods.
11098         * domain.c: Support for registering and looking up shared generic
11099         methods via a hash table (shared_generics_hash) in MonoDomain.
11101         * class-internals.h: New exception to signal failure of shared
11102         compilation of a generic method.  New counters for generics
11103         sharing in MonoStats.
11105 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11107         * image.c, metadata-internals.h: don't keep a file descriptor open
11108         for loaded assemblies (bug#325988).
11110 2007-09-19  Raja R Harinath  <rharinath@novell.com>
11112         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
11113         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
11114         use the corresponding datatypes.
11115         (type_in_image): Update to changes.
11116         (CleanForImageUserData): Simplify.
11117         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
11118         Avoid quadratic behaviour in handling the "stolen" list by
11119         separating the filter predicate out, and by prepending the stolen
11120         items rather than appending them.
11121         (steal_ginst_in_image): Likewise.
11122         (mono_metadata_clean_for_image): Update to changes.
11124 2007-09-19  Martin Baulig  <martin@ximian.com>
11126         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
11128 2007-09-19  Martin Baulig  <martin@ximian.com>
11130         * mono-debug.c (mono_debug_cleanup): Don't call
11131         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
11133 2007-09-19  Raja R Harinath  <harinath@gmail.com>
11135         Fix crash on 'make run-test' in mcs/errors
11136         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
11137         Avoid more potential allocations in mono_class_from_mono_type.
11138         (ginst_in_image): Update to changes.
11139         (gclass_in_image): Rearrange slightly.
11141 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
11143         * class.c (mono_class_init): Move the code that sets up class->methods to 
11144         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
11146         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
11147         canonical instance of an inflated generic signature.
11148         (mono_type_create_from_typespec): Remove an invalid free.
11150         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
11152 2007-09-18  Marek Habersack  <mhabersack@novell.com>
11154         * domain-internals.h: added a declaration of the
11155         mono_assembly_load_full_nosearch internal function.
11157         * assembly.c (mono_assembly_load_with_partial_name): use
11158         mono_try_assembly_resolve return value properly.
11159         (mono_assembly_load_full_nosearch): copied the function body from
11160         mono_assembly_load_full, without the code to invoke assembly
11161         search hooks.
11162         (mono_assembly_load_full): calls the above new function and if the
11163         assembly is not resolved, invokes the search hooks.
11165         * appdomain.c (mono_runtime_init): restore the global postload
11166         assembly search handlers.
11168 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
11170         * class.c (mono_class_init): Make sure class->methods and class->properties
11171         are never NULL in the generics case.
11173         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
11175 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
11177         * metadata.c (free_generic_class): Disable some code to fix the build.
11179         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
11181         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
11182         from the image mempool.
11184         * metadata.c (free_generic_class): Free more data from the inflated class.
11186         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
11188         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
11189         mempool.
11190         (mono_type_create_from_typespec): Ditto.
11192         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
11193         MonoImage to the caller.
11194         (mono_init_internal): Save the opened image in a global variable.
11195         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
11197         * reflection.c (resolve_object): Fix a leak.
11199         * metadata.c: Fix the freeing of data in the generics caches.
11200         
11201         * metadata.c (free_generic_inst): Comment this out to fix the build.
11202         (free_generic_class): Ditto.
11204         * metadata.c: Free cached generic methods, instantinations and classes when
11205         they are removed from the caches.
11206         (mono_metadata_free_type): Free the type itself.
11208         * class.c: Free the result of mono_class_inflate_generic_type () in a few
11209         places.
11211 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11213         * boehm-gc.c: restrict managed allocs to __thread supporting
11214         architectures.
11216 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
11218         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
11219         (mono_generic_class_get_class): Fix a leak.
11221         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
11222         mono_metadata_free_type ().
11223         (mono_metadata_inflate_generic_inst): Fix a leak.
11225 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11227         * mono-debug.c (free_header_data): Fix a leak missed earlier.
11229         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
11230         mempool.
11232         * mono-debug.c (mono_debug_close_image): Fix call to 
11233         g_hash_table_remove ().
11235 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11237         * icall-def.h: redirect all the string ctor to the managed
11238         CreateString () methods.
11239         * string-icalls.c, string-icalls.h: removed dead code for string
11240         ctors and icalls.
11242 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11244         * mono-debug.c: Fix memory leaks.
11246 2007-09-14  Jonathan Chambers <joncham@gmail.com>
11248         * threads-types.h: Implement mono_hazard_pointer_set and 
11249         mono_hazard_pointer_clear macros using do/while(0) to fix
11250         compilation with MSVC.
11251         
11252         Code is contributed under MIT/X11 license.
11254 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11256         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
11257         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
11259 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11261         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
11262         icalls.
11264 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11266         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
11267         managed-code allocated as well.
11269 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
11271         * class.c (mono_class_is_assignable_from): Add support for generic variance.
11273 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
11275         * boehm-gc.c: fixed the build after the AOT changes.
11277 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
11279         * wrapper-types.h: Add an ALLOC wrapper type.
11281         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
11282         reference managed allocator methods.
11284 2007-09-12  Marek Safar  <marek.safar@gmail.com>
11286         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
11287         of Type array and not MonoType, a fix suggested by Hari.
11288         
11289 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11291         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
11292         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
11293         
11294         Code is contributed under MIT/X11 license.
11296 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
11298         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
11300 2007-09-12  Marek Habersack  <mhabersack@novell.com>
11302         * image.c (do_mono_image_open): if assembly file fails to open and
11303         MONO_IOMAP is in effect, try to find the path in a
11304         case-insensitive way.
11306         * appdomain.c (mono_runtime_init): do not install postload hooks -
11307         tests show that MS.NET doesn't use anything of that sort to
11308         trigger the AppDomain.AssemblyResolve event.
11309         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
11310         made non-static.
11311         (mono_runtime_init): init portability helpers here.
11313         * assembly.c (mono_assembly_load_with_partial_name): if other   
11314         attempts fail, trigger the AppDomain.AssemblyResolve event handler
11315         to resolve the assembly.
11317         * domain-internals.h: added mono_try_assembly_resolve and marked
11318         it as internal.
11320 2007-09-11  Jb Evain  <jbevain@novell.com>
11322         * object-internals.h (MonoReflectionDynamicMethod): add
11323         a `MonoReflectionType *owner` field. The owner is used
11324         * reflection.c:
11325         (mono_reflection_create_dynamic_method): use the owner of the dynamic
11326         method as the class declaring the dynamic method.
11327         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
11328         dynamic method to the declaring type of the methodbuilder.
11330 2007-09-11  Mark Probst  <mark.probst@gmail.com>
11332         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
11333         rules for calling methods via reflection.
11335 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
11337         * reflection.c (resolve_object): Add support for MonoGenericClass. 
11338         Inflate MonoType's.
11340 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11342         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
11343         provide a managed method that does fast allocations without needing
11344         a managed->unmanaged transition. Boehm GC implementation currently
11345         enabled for ptrfree objects on sane architectures.
11347 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11349         * marshal.c, marshal.h: exported a couple of useful functions and
11350         added mono_mb_get_label () to easily handle backward branches.
11352 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
11354         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
11356 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
11358         * loader.c (find_method): Fixed the regression introduced while
11359         fixing bug #81466.
11361 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
11363         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
11364         well.
11365         
11366         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
11367         icall.c reflection.c: Pass a MonoGenericContext argument to 
11368         mono_lookup_dynamic_token ().
11370         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
11371         #82744.
11372         
11373 2007-09-09  Robert Jordan  <robertj@gmx.net>
11375         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
11376         for generic methods.
11378         * object.c (mono_object_get_virtual_method): Handle generic methods.
11379         Fixes bug #78882.
11381         Code is contributed under MIT/X11 license.
11383 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11385         * image.c: fix locking in mono_image_load_file_for_image ().
11387 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
11389         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
11390         used only as a cache: added an icall to fill it.
11392 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
11394         * reflection.h: exposed mono_reflection_free_type_info
11395         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
11396         since mono_reflection_bind_generic_parameters makes a copy of it.
11397         * reflection.c (free_type_info): subinfos should be freed.
11398         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
11399         made non static.
11400         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
11401         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
11402         this fixes #82695 and #81726.
11403    
11405 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
11407         * process.h, process.c:  added support for user profile/info in
11408           ProcessStartInfo. For now only Windows works.
11410 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11412         * metadata.c: consider the generic arguments when comparing
11413         signatures (bug #82614).
11415 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11417         * cil-coff.h, image.c: updated assembly loader to cope with the
11418         PE32+ 64 bit file format.
11420 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11422         * assembly.c, class.c, domain.c, loader.c: remove useless
11423         inclusion of cil-coff.h.
11425 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
11427         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
11428         if interface is marked with CoClassAttribute. 
11429    
11430         Code is contributed under MIT/X11 license.
11432 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11434         * sgen-gc.c: ensure no object from the to space is copied again or finalized
11435         if it's seen twice in major collections.
11437 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11439         * sgen-gc.c: big objects are not copied to the gray area, but they
11440         need to be considered for scanning, too, if they are brought alive
11441         by an object ready for finalizations or a survived one.
11443 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11445         * sgen-gc.c: properly account the number of disappearing links when
11446         they are nullified.
11448 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11450         * sgen-gc.c: share the code to scan the registered roots between the
11451         different types of collections.
11453 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
11455         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
11457 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
11459         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
11460         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
11462 2007-08-28  Mark Probst  <mark.probst@gmail.com>
11464         * security-manager.c (mono_security_manager_get_methods):
11465         LinkDemandSecurityException now has 2 arguments instead of 3.
11467 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
11469         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
11470         platforms which need it.
11472 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11474         * sgen-gc.c: unregister thread data structures with a pthread_key_t
11475         dtor.
11477 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11479         * threads.c: free the thread static data on thread exit.
11481 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
11483         * class.c: walk the hierarchy to find the generic definition for
11484         a class (fixes runtime part of bug #82498).
11486 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
11488         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
11489         ...
11491         * image.c (mono_image_close): Here. Hopefully fixes #82510.
11493 2007-08-24  Mark Probst  <mark.probst@gmail.com>
11495         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
11497 2007-08-24  Robert Jordan  <robertj@gmx.net>
11499         * appdomain.c: don't perform the ':'->';' substitution on Win32.
11501 2007-08-24  Jb Evain  <jbevain@novell.com>
11503         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
11504         for byref types.
11506 2007-08-24  Mark Probst  <mark.probst@gmail.com>
11508         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
11509         #82286.
11511 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
11513         * assembly.c: Fix a warning.
11514         
11515 2007-08-23  Marek Habersack  <mhabersack@novell.com>
11517         * appdomain.c: parse the <runtime> section looking for the probing
11518         element with the 'privatePath' attribute, which sets additional
11519         directories in which the runtime should look for assemblies.
11521 2007-08-23  Robert Jordan  <robertj@gmx.net>
11523         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
11524         Fixes #82499.
11526 2007-08-23  Martin Baulig  <martin@ximian.com>
11528         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
11529         _mono_debug_init_corlib() and remove it from the header file.
11531 2007-08-23  Martin Baulig  <martin@ximian.com>
11533         * mono-debug-debugger.c
11534         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
11535         don't notify the debugger about it.
11537         * mono-debug-debugger.h
11538         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
11540 2007-08-23  Robert Jordan  <robertj@gmx.net>
11542         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
11543         Code is contributed under MIT/X11 license.
11545 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11547         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
11549 2007-08-22  Martin Baulig  <martin@ximian.com>
11551         * mono-debug.c: Store debugging info on a per-domain basis and
11552         free it on domain unload.  Add support for unloading symbol files.
11554         * mono-debug.h
11555         (MonoDebugList): New typedef.
11556         (MonoSymbolTable):
11557         - add `data_tables and `type_table'.
11558         - replace 'symbol_files' and `num_symbol_files' with a
11559           `MonoDebugList *'.
11560         (mono_debug_data_table): Removed.
11561         (mono_debug_list_add): New public function.
11562         (mono_debug_list_remove): New public function.
11563         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
11564         (mono_debug_init_2_memory): Renamed into
11565         mono_debug_open_image_from_memory().
11566         (mono_debug_close_image): New public function.
11567         (mono_debug_domain_create): Likewise.
11568         (mono_debug_domain_unload): Likewise.
11569         (MONO_DEBUGGER_VERSION): Bump to 60.
11571         * mono-debug-debugger.h
11572         (MonoDebuggerEvent):
11573         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
11574         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
11575         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
11576         - rename `THREAD_CREATED' and `THREAD_EXITED' into
11577           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
11578         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
11579           meaning.
11580         (mono_debugger_add_symbol_file): Removed.
11581         (mono_debugger_add_type): Removed.
11582         (mono_debugger_lookup_type): Removed.
11583         (mono_debugger_lookup_assembly): Removed.
11585         * domain.c
11586         (mono_domain_create): Call mono_debug_domain_create().
11587         (mono_init_internal): Call mono_debug_init_corlib().
11589         * assembly.c
11590         (mono_assembly_close): Call mono_debug_close_image().
11592 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11594         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
11595         mmap call.
11597 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
11599         * sgen-gc.c: ensure section->pin_queue_end is initialized
11600         correctly when non pinning objects in the section have been found.
11602 2007-08-22  Marek Habersack  <mhabersack@novell.com>
11604         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
11605         containing a list of directories separated by ':'. MSDN docs say
11606         the directories should be separated with ';'. Part of a bugfix for
11607         bug #81446
11609 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
11611         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
11612         it should MonoType and not MonoClass.
11614 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
11616         * culture-info-table.h : regenerated.
11618 2007-08-20  William Holmes  <billholmes54@gmail.com>
11620         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
11621          to call ReplaceFile Kernel32 on windows or in io-layer.
11622         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
11623         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
11624          as an internal call.
11626         Code is contributed under MIT/X11 license.
11628 2007-08-20  Jb Evain  <jbevain@novell.com>
11630         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
11631         and MONO_EXCEPTION_FIELD_ACCESS.
11633         * debug-helpers.[c|h]: new mono_field_full_name function.
11635 2007-08-20  Mark Probst  <mark.probst@gmail.com>
11637         * class.c: Removed class_security_level() and moved it to
11638         security-core-clr.c.
11640         * security-core-clr.c, security-core-clr.h: class_security_level()
11641         is now public and renamed to mono_security_core_clr_class_level().
11642         It also looks for security attributes in the classes a class is
11643         nested in.
11645 2007-08-20  Mark Probst  <mark.probst@gmail.com>
11647         * security-core-clr.c, security-core-clr.h: CoreCLR security
11648         utility functions.
11650         * Makefile.am: Added security-core-clr.[ch].
11652         * security-manager.c, security-manager.h: Functions and enum for
11653         setting and getting the security mode.
11655         * class.c: CoreCLR security checks.
11657 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11659         * icall-def.h, process.c, process.h: implemented icall to get
11660         user/system processor times.
11662 2007-08-17  Mark Probst  <mark.probst@gmail.com>
11664         * domain.c, threads.c, class-internals.h, domain-internals.h: New
11665         reader-lock-free jit_info_table.
11667 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
11669         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
11671         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
11673         * object-internals.h (MonoException): Add missing _data member.
11675 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
11677         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
11678         checking that only methods with matching qname or fqname are picked
11679         from implemented interfaces.
11681 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
11683         * verify.c (do_newarr):added, do type verification of
11684         newarr ops, push the right value on the eval stack.
11685         * verify.c (mono_method_verify): use do_newarr
11688 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
11690         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
11691         factored the common code into get_boxable_mono_type, which
11692         is now using mono_type_get_full, this fixed byref related tests.
11694 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
11696         * class.c: added mono_type_get_full, this function has the same
11697         behavior of mono_class_get_full but the returned MonoType has
11698         all metadata of the associated token in case of a typespec token.
11699         * class.c: added mono_type_retrieve_from_typespec, used by 
11700         mono_type_get_full to retrieve the token type.
11701         * class.c (mono_class_create_from_typespec): changed to use
11702         mono_type_retrieve_from_typespec.
11703         * class.c (mono_ldtoken): changed to use mono_type_get_full
11704         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
11705         * class-internals.h: exported mono_type_get_full for internal use.
11707 2007-08-16  Jb Evain  <jbevain@novell.com>
11709         * domain.c (supported_runtimes): add entry for
11710         the 'moonlight' runtime version.
11712 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
11714         * verify.c (mono_method_verify): small typo sliped in.  
11716 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
11718         * verify.c (do_unbox_value): added, do type verification of
11719         unboxing ops
11720         * verify.c (mono_method_verify): use do_unbox_value
11723 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
11725         * verify.c (dump_stack_value): fixed typo, was printing string
11726         instead of object on stack.
11727         * verify.c (do_box_value): moved the byref check up as it leads
11728         to invalid code and should be done earlier.
11729         * verify.c: improved error messages for and ldobj
11731 2007-08-15  William Holmes  <billholmes54@gmail.com>
11733         * marshal.c (emit_marshal_custom): Omit the call to 
11734           marshal_native_to_managed when calling native to managed 
11735           and the argument is specified as an out argument.
11737         Code is contributed under MIT/X11 license.
11739 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
11741         * verify.c: fixed the type checks for generics, function pointers and vectors.
11742         Added type verification for ldobj and ldtoken. The verifier
11743         would segfault if header or signature of a method contained references
11744         to non-existant types.
11746 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
11748         * marshal.c (cominterop_get_ccw): Patch from
11749         Bill Holmes to no walk up interface hierarchy. 
11750         All parent methods should be present in the interface for COM.
11751    
11752         Code is contributed under MIT/X11 license.
11754 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
11756         * marshal.c (emit_marshal_com_interface): Patch from
11757         Bill Holmes to handle COM Interfaces as return values
11758         for native->managed calls.
11759    
11760         Code is contributed under MIT/X11 license.
11762 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
11764         * marshal.c (cominterop_get_idispatch_for_object): Implement
11765         for runtime callable wrappers.
11766    
11767         Code is contributed under MIT/X11 license.
11769 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
11771         * pedump.c (main): changed from mono_init to mono_init_from_assembly
11772         so 2.0 types are accessible
11775 2007-08-13  Miguel de Icaza  <miguel@novell.com>
11777         * domain.c (mono_init_internal): Call mono_assembly_load_friends
11778         once we load mscorlib.   Due to the order in which we initialize,
11779         the mono_assembly_load_full routine that loads mscorlib did not
11780         load friends.   We now load it once we load the
11781         mono_defaults.internals_visible_class class. 
11783         * assembly.c: Expose the mono_load_friend_assemblies method.
11785 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
11787         * verify.c: improved the handling of boxing, better
11788         type checking for unary ops and conversion. Fix bug
11789         regarding managed pointer compatibility checking
11791 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
11793         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
11795         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
11797 2007-08-09  Raja R Harinath  <rharinath@novell.com>
11799         * reflection.c (dup_type): Remove.
11800         * class.c (dup_type): Remove.
11801         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
11802         instead of the dodgy 'dup_type'.
11803         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
11804         handle the case where 'dup_type' needed the second argument.
11806 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
11808         * domain.c: Fix a warning.
11810 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
11812         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
11813         checking that methods with the same fqname are not overridden
11814         with a method from an ancestor.
11816 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
11818         * threads.c (free_thread_static_data_helper): Avoid a crash if
11819         thread->static_data is not yet set.
11821 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
11823         * marshal.c: Use correct image when emitting
11824         native wrapper for COM calls.
11825    
11826         Code is contributed under MIT/X11 license.
11828 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
11830         * icall-def.h, security.c, security.h :
11831           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
11833 2007-08-07  Martin Baulig  <martin@ximian.com>
11835         * mono-debug-debugger.h
11836         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
11838         * domain.c (mono_domain_free): Call
11839         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
11841 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
11843         * verify.c (check_underflow, check_overflow): error message now returns IL offset
11844         * verify.c (in_same_block): code should test if either offset is inside the clauses
11845         * verify.c (mono_method_verify): push the exception into the eval stack of exception
11846         and filter blocks
11848 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
11850         * image.c (mono_image_close): Fix a leak.
11852         * object.c (mono_runtime_invoke_array): Avoid using alloca.
11854         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
11856 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11858         * domain.c, threads.c, threads-types.h: fix memory retention issue
11859         with thread static variables not being cleared on domain unload.
11860         Reuse thread static slots after domain unload.
11862 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
11864         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
11865         nullable type.
11867         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
11868         now done in mono_runtime_invoke_array.
11870         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
11871         receiver is a nullable type.
11873         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
11874         generic parameter.
11876 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
11878         * marshal.c: Implement COM Objects as return type for 
11879         managed->unmanaged calls. Added Release calls for COM Object
11880         out/return values in managed->unmanaged calls.
11882         Code is contributed under MIT/X11 license.
11884 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
11886         * threads.h, threads-type.h: move the hazard pointer declarations
11887         to the private header.
11889 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11891         * file-io.c, appdomain.c: memory leak fixes.
11893 2007-08-02  Dick Porter  <dick@ximian.com>
11895         * socket-io.c
11896         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
11897         SO_REUSEADDR setting into io-layer/sockets.c.
11899 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
11901         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
11902         from Object when called on a generic parameter. Fixes #82211.
11904 2007-08-01  Dick Porter  <dick@ximian.com>
11906         * file-io.c (convert_share): Test FileShare values bit-by-bit.
11907         Fixes bug 79250 yet again.
11909 2007-07-30  Martin Baulig  <martin@ximian.com>
11911         Merged the `debugger-dublin' branch.
11913         * mono-debug.h
11914         (MonoDebugDataTable): New typedef.
11915         (MonoDebugMethodAddressList): New typedef.
11916         (MonoDebugWrapperData): Removed.
11917         (MonoDebugSymbolTable): Removed `current_data_table',
11918         `current_data_table_size', `current_data_table_offset'.
11919         (MonoDebugDataItemType): Moved into mono-debug.c.
11920         (MonoDebugMethodJitInfo): Remove `address'.
11921         (mono_debug_data_table): New global variable.
11922         (mono_debug_lookup_method_addresses): New public function.
11923         (mono_debug_find_method): Take a `MonoMethod *', not a
11924         `MonoDebugMethodInfo *'.
11926         * mono-debug.c: Drop support for the old symbol tables.
11928 2007-06-28  Martin Baulig  <martin@ximian.com>
11930         * mono-debug.c (mono_debug_debugger_version): New public variable.
11932 2007-07-31  William Holmes  <billholmes54@gmail.com>
11934         * metadata.c Changed mono_type_create_from_typespec to not insert
11935           the type into the hash map until after
11936           do_mono_metadata_parse_type has completed.
11937         Fixes Bug #82194
11938         Code is contributed under MIT/X11 license.
11940 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
11942         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
11943         generic parameter. Fixes #82211.
11945 2007-07-27  Jb Evain  <jbevain@novell.com>
11947         * pedump.c (dump_metadata, dump_metadata_header): dump
11948         versions contained in the metadata header.
11950 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11952         * threads.c: register small_id_table with the GC.
11954 2007-07-27  Mark Probst  <mark.probst@gmail.com>
11956         * threads.c, threads.h, class-internals.h, object-internals.h:
11957         Hazard pointers, to be used by lock-free parallel algorithms.
11959 2007-07-26  Dick Porter  <dick@ximian.com>
11961         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
11962         routine on non-windows platforms, as I've not managed to think of
11963         a non-kludgy way of doing this.  Finishes off bug 78739.
11965 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
11967         * object.c: properly setup interface_bitmap in proxy vtables.
11969 2007-07-25  Marek Habersack  <mhabersack@novell.com>
11971         * appdomain.c (get_shadow_assembly_location): do not use TickCount
11972         to create unique shadow copy target directories, use the domain's
11973         serial number instead. Each domain gets a unique target directory
11974         that way.
11976         * domain.c (mono_domain_create): added code to increment domain
11977         shadow copy serial number and cache the value in the current
11978         domain structure.
11980         * domain-internals.h (struct _MonoDomain): added a new field -
11981         shadow_serial to hold the serial number used in generation of
11982         shadow-copy directories. This is to make sure that the directory
11983         name is unique for each and every domain created. We avoid a race
11984         condition with overriding assemblies already in use by other app
11985         domains.
11987 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
11989         * class.c (mono_bounded_array_class_get): fixed memory leak when 
11990         binding generic parameters.
11992 2007-07-24  Raja R Harinath  <rharinath@novell.com>
11994         * metadata.c (do_mono_metadata_parse_generic_class): Use
11995         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
11996         error.
11998 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12000         * loader.c, class-internals.h, reflection.c: removed the per-method
12001         generics hashtable: we use the global one through the call of
12002         mono_class_inflate_generic_method ().
12004 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12006         * class.c, metadata.c, class-internals.h: introduce yet another
12007         generics global cache for inflated methods (fixes 98% of the perf
12008         issue in bug #81806).
12010 2007-07-23  Raja R Harinath  <rharinath@novell.com>
12012         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
12013         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
12014         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
12015         return a MonoGenericInst containing (a copy) of those types.
12016         (mono_metadata_inflate_generic_inst): Update to changes.
12017         (mono_metadata_parse_generic_inst): Likewise.
12018         (mono_get_shared_generic_inst): Likewise.
12019         * reflection.c (mono_class_bind_generic_parameters): Likewise.
12020         (mono_reflection_bind_generic_method_parameters): Likewise.
12021         * metadata-internals.h: Likewise.
12022         * icall.c (free_generic_context): Kill.
12023         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
12025         * reflection.c (reflection_methodbuilder_to_mono_method): Use
12026         mono_metadata_type_dup.
12027         * marshal.c (mono_mb_create_method): Likewise.
12029         * metadata.c (mono_metadata_type_dup): Rename from
12030         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
12031         MonoImage.  Handle a few more cases, esp. when no mempool is given.
12032         * marshal.c, metadata-internals.h: Update to changes.
12034 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
12036         * class.c: fixed a small leak for array classes and removed warning.
12038 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
12040         * loader.c (mono_method_get_param_token): Make this work on generic methods.
12041         Return 0x8000000 for return parameters. Fixes #82161.
12043 2007-07-21  Marek Habersack  <grendello@gmail.com>
12045         * appdomain.c (get_shadow_assembly_location): append the current
12046         ticks value to the path. Avoids overwriting the same assemblies by
12047         several threads at the same time.
12049 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
12050         and Raja R Harinath  <rharinath@novell.com>
12052         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12053         Simplify slightly.
12054         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
12055         property for testing if a method is a generic method definition.
12057 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
12059         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
12061 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12063         * verify.c: used function from private branch, reverted to the one in class.h 
12065 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12067         * verify.c: a typo slipped in and the code wont compile
12069 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12071         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
12072         disabled box instruction as it is doing the wrong thing
12073         improved stack dump messages, now it is easier to debug type related issues
12076 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
12078         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
12080 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12082         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
12083         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
12084         grouped with class and valuetype. This change will simply 
12085         the code as it should be handled just like unmanaged pointers.
12087 2007-07-19  Mark Probst  <mark.probst@gmail.com>
12089         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
12091 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
12093         * verify.c: several stack merge issues fixed, reference comparisons now
12094         check the type size. strict type check now works correctly.
12095         added more uses of IS_MANAGED_POINTER macro.
12096         fixed issues pointed by running the test suite against .net.
12097         
12099 2007-07-19  Mark Probst  <mark.probst@gmail.com>
12101         * class.c, loader.c, class-internals.h: Removed the
12102         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
12103         defines.
12105         * icall.c: Better error checking in some internal reflection
12106         methods.
12108 2007-07-18  William Holmes  <billholmes54@gmail.com>
12110         * filewatcher.c : removed unused variable 'filename' in 
12111           ves_icall_System_IO_FSW_SupportsFSW
12113 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
12115         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
12116         obsolete, removed.
12118 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
12120         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
12121         
12122         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
12124 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
12126         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
12127         Implement generics support.
12128         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12130         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
12131         type_args and method_args arguments.
12132         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
12133         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12134         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
12136 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
12138         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
12139           It adds a rootimage parameter to mono_reflection_get_type_internal,
12140           adds new function mono_reflection_get_type_with_rootimage and use
12141           the rootimage to resolve the types instead of the current image
12143 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
12145         * culture-info-table.h: Forgot to update after r78304.
12147 2007-07-13  Raja R Harinath  <rharinath@novell.com>
12149         * class.c (mono_class_is_open_constructed_type)
12150         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
12152 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
12154         * class.c (mono_bounded_array_class_get):  method fails if used with
12155         an incomplete TypeBuilder enum (no basetype field), fixed it by 
12156         avoiding calculating the size for such array as it cannot be instantiated.
12157         Fix bug #82015
12159 2007-07-12  Raja R Harinath  <rharinath@novell.com>
12161         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
12162         field.
12163         * metadata.c, reflection.c: Update to changes.
12165 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
12167         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
12168         mono_class_is_valid_enum, they are used to valide a enum when loading.
12169         * reflection.c: used new functions to throw TypeLoadException when and
12170         invalid enum is build with TypeBuilder. Fixes #82018
12171   
12172 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
12174         * object.c: forgot commit of mono_class_setup_methods () to access
12175         iface->methods.
12176         * object-internals.h: added a few more handy fields to
12177         MonoIMTCheckItem.
12179 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
12181         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
12182         iface->methods.
12184 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
12186         * class-internals.h, object-internals.h, object.c: IMT-based
12187         interface invocation core from Massimiliano Mantione
12188         (massi@ximian.com) with a reworked arch-specific interface,
12189         bsearch implementation and a few bugfixes and memory savings by me.
12191 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
12193         * class.c (mono_class_create_from_typedef): mono would segfault if 
12194         an enum did not have a __value field. It now throws a TypeLoadException
12195         for such cases. Fix bug #82022
12197 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
12199         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
12201 2007-07-09  Mark Probst  <mark.probst@gmail.com>
12203         * class.c (mono_class_init): If a class is already inited but has
12204         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
12206 2007-07-09  Mark Probst  <mark.probst@gmail.com>
12208         * class.c: Properly handle the case of an unimplemented interface
12209         method.  Fixes: 81673.
12211 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12213         * class-internals.h, object.c: cleanup patch from massi: use
12214         MonoVTable->interface_bitmap since the vtable interfaces offset array
12215         is going away.
12217 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
12219         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
12220         GetMDStreamVersion icall instead.
12222 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
12224         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
12225         not use mono_dl_build_path() with a full library name: makes
12226         fallbacks to libgaim and libfam work.
12228 2007-07-06  William Holmes  <billholmes54@gmail.com>
12230         * assembly.c: Added a continue statement in probe_for_partial_name when
12231          parse_assembly_directory_name fails.  Fixes : 82002
12233 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
12235         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
12236         and added a verification  for TYPEDBYREF.
12237         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
12238         make native int interchangeable with int32 and some small cleanup and formating.
12239         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
12240         handle byref of byref.
12241         * verify.c (push_local): handle byref of byref.
12242         * verify.c (do_binop): invalid mix of values is unverifiable
12243         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
12244         added visibility checks
12245         * verify.c (field related method): added visibility checks
12246         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
12248 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
12250         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
12251         string.
12253 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
12255         * profiler.c (mono_profiler_load): Fix an off-by-one error.
12257         * marshal.c (emit_marshal_string): When returning a string from managed code,
12258         allways make a copy even for unicode strings. Fixes #81990.
12260 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
12262         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
12263         of byref generic inst types (bug #81997).
12265 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
12267         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
12268         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
12270 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
12272         * marshal.c (emit_marshal_string): Add support for unicode strings in
12273         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
12275 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
12277         * verify.c: field load/store are now verified, missing only access checks now
12279 2007-06-28  Martin Baulig  <martin@ximian.com>
12281         * mono-debug.c (mono_debug_debugger_version): New public variable.
12283 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
12285         * locales.c: When constructing DateTimeFormat or NumberFormat for
12286         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
12287         MonoCultureInfo contructed from the current locale is always
12288         read-only and has UseUserOverride set to true. All MonoCultureInfo
12289         instances returned for GetCultures have both IsReadOnly and
12290         UseUserOverride set to true. Fixes part of bug #81930.
12292 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
12294        * icall-def.h: Update System.__ComObject icalls
12295        * marshal.c: Avoid managed transition (and object creation)
12296        when looking up COM interface in RCW.
12297        * marshal.h: Ditto.
12298        
12299        Code is contributed under MIT/X11 license.
12301 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
12303         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
12304         to avoid crashes during assembly unloading.
12306 2007-06-22  Raja R Harinath  <rharinath@novell.com>
12308         Fix MethodInfo.IsGenericMethodDefinition
12309         * reflection.c (mono_reflection_bind_generic_method_parameters):
12310         Rearrange code to ensure we always uses a generic method definition.
12311         * class.c (mono_class_inflate_generic_method_full): Set
12312         'generic_container' field only for generic method definitions.
12313         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
12314         Use presense of 'generic_container' field as indication of being a
12315         generic method definition.
12317 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
12319         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12321         * object-internals.h: Reflect changes in the layout of the managed Delegate
12322         class.
12323         
12324         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
12325         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
12326         runtime memory used by the dynamic method. Fixes #77146.
12328 2007-06-21  Dick Porter  <dick@ximian.com>
12330         * file-io.h: 
12331         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
12332         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
12333         81767.
12335 2007-06-21  Raja R Harinath  <rharinath@novell.com>
12337         * reflection.c (method_encode_methodspec): Add a tripwire.
12338         * class.c (inflate_generic_type): The fully open generic type is
12339         not the same as the generic type definition.
12341 2007-06-21  Martin Baulig  <martin@ximian.com>
12343         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
12345         * mono-debug-debugger.h
12346         (MonoDebuggerBreakpointInfo): Removed.
12347         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
12348         (mono_debugger_remove_breakpoint): Likewise.
12349         (mono_debugger_breakpoint_callback): Likewise.
12350         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
12352 2007-06-21  Raja R Harinath  <rharinath@novell.com>
12354         * metadata.c (mono_metadata_lookup_generic_class): The fully open
12355         generic type is not the same as the generic type definition.
12356         * class.c (mono_generic_class_get_class): Likewise.
12358 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
12360         * icall.c: The second argument to 
12361         System.Reflection.MethodBase.GetMethodFromHandleInternalType
12362         is a MonoType not a MonoClass.
12364 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
12366         * verify.c: support for function pointers in the verifier
12368 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
12370         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
12372 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
12374         * assembly.c: removed Mono.Data.SqliteClient from the list of
12375         forward-compatible assemblies as it breaks the ABI (bug #81899).
12377 2007-06-19  Raja R Harinath  <rharinath@novell.com>
12379         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
12380         lookup/update with the loader lock.
12381         * reflection.c (mono_class_bind_generic_parameters): No need to
12382         protect mono_metadata_lookup_* with the loader lock.
12383         * class.c (inflate_generic_type): Likewise.
12384         
12385         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
12386         on a generic instantiated type.
12388 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
12390         *verify.c: produce meanfull error messages on verification error
12391         *verify.c: fixed some cases of verification errors reported as validation errors
12392         *pedump.c: fixed the error name array, now it shows validation errors properly
12393         *verify.h: fixed the contant that should be used for verification errors
12395 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12397         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
12398         for bug #77596, 81858 and 80743 (generics data structures on domain
12399         unload).
12401 2007-06-15  Raja R Harinath  <rharinath@novell.com>
12403         Avoid allocating 'MonoGenericContext' on the heap.
12404         * class-internals (_MonoMethodInflated::context): Make field
12405         inline, not a pointer.
12406         * loader.c (method_from_methodspec): Allocate 'new_context' on the
12407         stack.  Use the context embedded within the inflated method as the
12408         hash key, rather than 'new_context'.
12409         * class.c (inflate_generic_context): Simplify.  Return a struct
12410         rather than allocating on the heap.
12411         (mono_class_inflate_generic_method_full): Update to changes.  Now,
12412         doesn't salt away a copy of the context -- simplifying the
12413         lifetime rules of a 'MonoGenericContext *'.
12414         (mono_method_get_context): Return pointer to embedded context.
12415         (setup_generic_array_ifaces): Allocate temporary context on stack.
12416         * reflection.c (inflate_mono_method): Likewise.
12417         (mono_reflection_bind_generic_method_parameters): Likewise.
12418         Use the context embedded within the inflated method as the hash key.
12420         Avoid a source of allocation of 'MonoGenericContext'.
12421         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
12422         and 'cached_context' fields into embedded 'MonoGenericContext' field.
12423         * class.c: Update to changes.
12424         (mono_generic_class_get_context): Simplify drastically.  Now just
12425         returns a pointer to the field.
12426         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
12427         argument as a const pointer.
12428         (mono_metadata_generic_context_equal): Likewise.
12429         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
12430         Update to changes.
12432 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
12434         * verify.c improved the handling of brtrue/brfalse, factored out common code
12436 2007-06-14  Raja R Harinath  <rharinath@novell.com>
12438         Kill MonoGenericMethod.
12439         * class-internals.h (MonoGenericContext::method_inst): Rename from
12440         'gmethod' and convert to a MonoGenericInst.
12441         (MonoGenericMethod): Remove.
12442         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
12443         * loader.c (method_from_methodspec): Update to changes.  Use a
12444         MonoGenericContext as the key to the hashtable.
12445         * metadata.c (mono_metadata_generic_context_equal): Rename from 
12446         'mono_metadata_generic_method_equal' and take MonoGenericContext.
12447         (mono_metadata_generic_context_hash): Likewise from
12448         'mono_metadata_generic_method_hash'.  Change hash function.
12449         (mono_metadata_load_generic_params): Update to changes.
12450         (mono_get_shared_generic_method): Remove.
12451         * metadata-internals.h (mono_get_shared_generic_method): Remove.
12452         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
12453         (inflate_generic_context): Likewise.
12454         (mono_class_inflate_generic_method_full): Likewise.
12455         (setup_generic_array_ifaces): Likewise.
12456         (mono_class_create_from_typespec): Likewise.
12457         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
12458         (method_encode_methodspec): Update callsite.
12459         (reflection_methodbuilder_to_mono_method): Update to changes.
12460         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
12461         MonoGenericContext as the key to the hashtable.
12462         (inflate_mono_method): Update to changes.
12464         * class-internals.h (MonoGenericMethod::container): Remove.
12465         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
12467 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
12469         * profiler-private.h, profiler.c, profiler.h: added API to profile
12470         exception events.
12472 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
12474         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
12476 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
12478         * verify.c: method invocation is now validated, now we verify parameter types on stack.
12479         Fixed overflow and underflow not aborting the verification process.
12481 2007-06-13  Mark Probst  <mark.probst@gmail.com>
12483         * class-internals.h (MonoStats): Added stats entries for dynamic
12484         code allocations.
12486 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
12488         * loader.c (mono_free_method): Free header->locals and header->clauses.
12490         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
12491         dynamic case.
12493         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
12495         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
12497 2007-06-12  Raja R Harinath  <rharinath@novell.com>
12499         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
12500         the tables.
12502 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
12504         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
12506 2007-06-11  Raja R Harinath  <harinath@gmail.com>
12508         MonoGenericMethod on a diet
12509         * class-internals.h (_MonoMethodInflated::reflection_info): Move
12510         here ...
12511         (_MonoGenericMethod::reflection_info): ... from here.
12512         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
12513         Update to changes.
12514         * reflection.c (inflate_mono_method): Likewise.
12515         (mono_reflection_bind_generic_method_parameters): Likewise.
12517 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
12519         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
12520         *verify.c: factored long ldarg forms to share code with short forms
12522 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
12524         *verify.c: fixed code formating factored some duplicate code
12525         into a new function
12527         *verify.h: fixed binary incompatibility introduced earlier
12529         *pedump.c: fixed formating
12531 2007-06-11  Raja R Harinath  <harinath@gmail.com>
12533         Fix assertion when disassembling Mono.C5.dll
12534         * loader.c (method_from_methodspec): Avoid inflating a method
12535         twice with the same context.  If the methodref is inflated, use
12536         the declaring method instead.
12538         * class.c (mono_class_from_generic_parameter): Fix case similar to
12539         bug #81830 handled below, but for method containers.
12541 2007-06-10  Raja R Harinath  <harinath@gmail.com>
12543         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
12544         get_shared_generic_class.  Directly inflate the instance.
12545         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
12546         (inflate_generic_class): Delete.
12547         (get_shared_generic_class): Delete.  Move setting of
12548         'cached_class' and 'cached_context' ...
12549         * metadata.c (mono_metadata_lookup_generic_class): ... here.
12551         * metadata.c (mono_metadata_lookup_generic_class): Change
12552         signature to take the components of a MonoGenericClass rather than
12553         an allocated MonoGenericClass.  Change semantics to be intern-like.
12554         * reflection.c (mono_class_bind_generic_parameters): Update to
12555         changes.  Make locking region tighter.
12556         * class.c (inflate_generic_class): Update to changes.
12557         (get_shared_generic_class): Likewise.
12558         * metadata-internals.h: Likewise.
12560         * reflection.c (mono_class_bind_generic_parameters): Take and
12561         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
12562         (mono_reflection_bind_generic_parameters): Use
12563         'mono_class_bind_generic_parameters' rather than duplicate the code.
12564         * class.c (mono_bounded_array_class_get): Update to changes.
12565         * object-internals.h: Likewise.
12567         * reflection.c (mono_class_bind_generic_parameters): Only support
12568         parameterizing generic type definitions.  Remove support for other
12569         open types.
12571 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
12573         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
12575         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
12576         in the dynamic case.
12578 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
12580         * threads.c: When cleaning up thread, reset the Background bit.
12581         Fixes bug #81720.
12583 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
12585        * metadata.c: Move variable declarations to top of scope.
12586        * verify.c: Move variable declarations to top of scope.
12588        Code is contributed under MIT/X11 license.
12590 2007-06-08  Raja R Harinath  <rharinath@novell.com>
12592         * reflection.c (mono_class_bind_generic_parameters): Replace
12593         open-coded loop with mono_metadata_inflate_generic_inst.
12595         * class.c (get_shared_generic_class): Don't call
12596         mono_get_shared_generic_inst.  Use the container's own
12597         'class_inst'.
12599         * metadata.c (mono_metadata_load_generic_params): Move
12600         initialization of 'context' field here from ...
12601         * class.c (mono_class_create_from_typedef): ... here, and ...
12602         * loader.c (mono_get_method_from_token): ... here.
12604         * class.c (get_shared_generic_class): Rename from
12605         mono_get_shared_generic_class and make static.
12606         (mono_get_shared_generic_inst): Move to metadata.c.
12607         * loader.c (mono_get_shared_generic_method): Likewise.
12608         * class-internals.h, metadata-internals.h: Update to changes.
12610         Fix #81830
12611         * class.c (mono_class_from_generic_parameter): Don't assume a
12612         generic container owner exists.  Generic containers from monodis
12613         don't have any.
12615 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
12617         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
12618         * verify.h: new typedefs to returns the non-verifiable status
12619         * verify.c: initial implementation of generics, stack merging and object compatibility check
12621 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12623         * class.c, image.c, class-internals.h (MonoImage): class_cache is
12624         a MonoInternalHashTable again (fixed bug in internal hash table
12625         code).
12627 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12629         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12630         MonoInternalHashTable again (fixed bug in internal hash table
12631         code).
12633 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12635         * class.c, image.c, class-internals.h, domain.c,
12636         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
12637         changes.  Have to figure out what makes them break the SWF
12638         regression.
12640 2007-06-04  Mark Probst  <mark.probst@gmail.com>
12642         * class.c, image.c, class-internals.h (MonoImage): class_cache is
12643         a MonoInternalHashTable now.
12645 2007-06-04  Mark Probst  <mark.probst@gmail.com>
12647         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12648         MonoInternalHashTable now.
12650 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
12652         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
12653         invoke_impl code.
12655         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
12657         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
12658         dependent trampoline.
12660         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12662         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
12664 2007-05-29  Robert Jordan  <robertj@gmx.net>
12666         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
12668 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
12670         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
12672 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
12674        * marshal.c: Fix interface lookup loops for
12675        cominterop_get_com_slot_for_method and 
12676        cominterop_get_method_interface. Only need to lookup
12677        if type is a class, else use interface type method is on.
12679        Code is contributed under MIT/X11 license.
12681 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
12683         * reflection.c: HasSecurity can be present even if no specially 
12684         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
12685         SecurityAttribute). Fix CAS regression tests on buildbot.
12687 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
12689        * appdomain.c: Add configure checks for header files.
12690        * image.c: Add configure checks for header files.
12691        * file-io.c: Add configure checks for header files.
12692        * debug-mono-symfile.c: Add configure checks for header files.
12693        * threadpool.c: Add configure checks for header files.
12694        * console-io.c: Add configure checks for header files.
12695        * profiler.c: Add configure checks for header files.
12696        * rawbuffer.c: Add configure checks for header files.
12697        * icall.c: Add configure checks for header files.
12698        * rand.c: Add configure checks for header files.
12699        * socket-io.c: Add configure checks for header files.
12701        Code is contributed under MIT/X11 license.
12703 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
12705         * reflection.c (mono_custom_attrs_from_builders): Remove the 
12706         assertion as it breaks the build.
12707         
12708         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
12710         * reflection.c (lookup_custom_attr): Make a copy here too.
12712         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
12713         dynamic images.
12715         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
12716         images.
12718         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
12719         info.
12721 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
12723         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
12724         (load_cattr_value): Ditto.
12726 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
12728         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
12730 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
12732         * threads.c: In "start_wrapper", set apartment_state to MTA if
12733         apartment_state is Unknown and we're running on 2.0 profile or
12734         higher.
12735         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
12736         to main method, then set apartment_state to Unknown on 1.0 profile,
12737         and MTA on 2.0 profile.
12739 2007-05-16  Jb Evain  <jb@nurv.fr>
12741         * class-internals.h (MonoDefaults): Add an attribute_class and
12742           customattribute_data_class.
12743         * domain.c (mono_init_internal): Populate them.
12744         * reflection.c: Use them to remove duplicates. Make a vew
12745         MonoClass variables `static'.
12747 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
12749         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
12750         step in implementing IMT, so that all isinst checks now can go
12751         through the bitmap.
12752         This was needed because vtables for TransparentProxy need to look
12753         like the vtable of the "target" class, so they need to point to
12754         its interface bitmap directly.
12756         * object.c: inside "mono_class_create_runtime_vtable" and
12757         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
12759 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
12761         * object-internals.h
12762           culture-info.h : added territory field in MonoCulture and
12763           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
12764         * locales.c : fill territory field above too.
12765         * culture-info-table.h : regenerated.
12767 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
12769         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
12770         Fixes #81599.
12772 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
12774         * object.c: Always initialize apartment, even if 
12775         there is no custom attributes on entry point.
12776         
12777         Code is contributed under MIT/X11 license.
12779 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
12781         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
12782         * metadata.c: If no encoding is set, check for unicode
12783         on class.
12784         
12785         Code is contributed under MIT/X11 license.
12787 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
12789         * threads.c: Handle if mono_thread_current returns NULL 
12790         
12791         Code is contributed under MIT/X11 license.
12793 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
12795         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
12796         in start_wrapper. Added mono_thread_init_apartment_state and
12797         mono_thread_cleanup_apartment_state.
12798         * object.c: Initialize thread apartment state on main thread
12799         by checking for STAThreadAttribute on entry point.
12800         * object-internals.h: Add apartment_state field to MonoThread.
12801         * threads-types.h: Add unmanaged definition of 
12802         System.Threading.ApartmentState, MonoThreadApartmentState.
12803         
12804         Code is contributed under MIT/X11 license.
12805         
12806 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
12808         * class.c: Fix windows build.
12809         * class-internals.h: Fix windows build.
12810         
12811         Code is contributed under MIT/X11 license.
12813 2007-05-08  Robert Jordan  <robertj@gmx.net>
12815         * process.c (CreateProcess_internal):
12816         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
12817         .CreateNoWindow was specified. Fixes #81496.
12819 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
12821         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
12822         step in implementing IMT, replaced it with two compact arrays
12823         (interfaces_packed and interface_offsets_packed) and a bitmap that
12824         is used for isinst checks (interface_bitmap).
12826         * class.c: (compare_interface_ids): compare function to pass to
12827         bsearch when looking for an interface with a given id.
12828         (mono_class_interface_offset): reimplemented using bsearch on
12829         interfaces_packed, getting the offset from interface_offsets_packed.
12830         (print_implemented_interfaces): utility debugging function.
12831         (setup_interface_offsets): reworked to initialize interfaces_packed,
12832         interface_offsets_packed and interface_bitmap.
12834         * object.c: replaced all accesses to "MonoClass.interface_offsets"
12835         with uses of interfaces_packed and interface_offsets_packed.
12837 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
12839         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
12840         mono_class_interface_offset prototype to wrap all accesses to
12841         "MonoClass.interface_offsets".
12843         * class.c: Implemented mono_class_interface_offset, and wrapped all
12844         accesses to "MonoClass.interface_offsets".
12846         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
12847         "MonoClass.interface_offsets".
12849 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
12851         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
12852         GetMethodFromHandle overloads (bug #78637).
12854 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12856         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
12857         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
12859 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
12861         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
12862         #81498.
12864         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
12865         gracefully.
12866         (mono_custom_attrs_from_index): Ditto.
12868         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
12869         Fixes #81501.
12871 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
12873         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
12874         is now allocated from a mempool.
12876 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
12878         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
12879         caller holds threads_lock, leading to deadlocks. Fixes #81476.
12881 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
12883         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
12884         mono_loader_clear_error () too late. Fixes #81463.
12886 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
12888         * culture-info-table.h : regenerated.
12890 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
12892         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
12893         is missing.
12895 2007-04-25  Dick Porter  <dick@ximian.com>
12897         * Makefile.am: Put the mingw enforced-optimisation back into the
12898         PLATFORM_WIN32 section.
12900 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
12902         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
12903         patch.
12905         * image.c (mono_image_load_module): New API function to load a module reference.
12907         * image.c (load_modules): Load modules lazily. Fixes #80812.
12909         * class.c (mono_class_from_typeref): Use mono_image_load_module.
12910         
12911         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
12913         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
12914         to mono_image_load_module_dynamic.
12916 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
12918         * marshal.c: Fix calling convention for CCW on non-windows
12919         platforms. STDCALL on windows, CDECL everywhere else to work 
12920         with XPCOM and MainWin COM.
12921         
12922         Code is contributed under MIT/X11 license.
12924 2007-04-23  Martin Baulig  <martin@ximian.com>
12926         Fix #80969.
12928         * loader.c
12929         (method_from_memberref): Added `gboolean *used_context' argument.
12930         (mono_get_method_from_token): Likewise.
12931         (mono_get_method_full): Don't insert the method in the cache when
12932         `used_context' is true.
12934 2007-04-23  Raja R Harinath  <rharinath@novell.com>
12936         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
12938         * reflection.c (mono_reflection_bind_generic_parameters): Don't
12939         create new MonoTypes for returned types.
12940         * class.c (mono_generic_class_get_class): Export mono-internal.
12941         * class-internals.h: Update to changes.
12943 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
12945         * threadpool.c, threadpool.h, icall-def.h: patch from
12946         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
12948 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
12950         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
12951         
12952         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
12954         * threads.c (mono_thread_get_stack_bounds): New helper function.
12956         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
12957         Correctly compute stack bounds when attaching. Fixes #81394.
12959 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
12961         * reflection.c: fix handling of doubles in custom attributes
12962         for the arm-fpa format (bug #81368).
12964 2007-04-18  Raja R Harinath  <rharinath@novell.com>
12966         * reflection.c (assembly_add_win32_resources): Mildly relax an
12967         bounds check to let the end pointer point just past the end of the
12968         allocated buffer.  (may fix #81384)
12970 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
12972         * culture-info-table.h : regenerated.
12974 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
12976         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
12977         the thread is aborted early.
12979 2007-04-05  Dick Porter  <dick@ximian.com>
12981         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
12982         FindFirstFile()/FindNextFile() to find entries.  This lets the
12983         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
12984         81038.
12986         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
12987         the parameters of
12988         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
12990 2007-04-04  Martin Baulig  <martin@ximian.com>
12992         * debug-helpers.c
12993         (mono_method_desc_full_match): Add support for nested classes.
12995 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
12997         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
12999 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
13001         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
13002         waiting for too many threads.
13004 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
13006         * environment.c: Fix return value check on uname so we can get the 
13007         executing version on Solaris operating systems.
13009 2007-03-28  Jb Evain  <jbevain@gmail.com>
13011         * class.c (mono_type_get_name_recurse): Complete the
13012         fix for the creation of assembly qualified names for
13013         pointer types. Fixes #81208.
13015 2007-03-27  Dick Porter  <dick@ximian.com>
13017         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
13018         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
13019         changed.
13021         * threads.c
13022         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
13023         the value of ReleaseMutex().
13025 2007-03-27  Dick Porter  <dick@ximian.com>
13027         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
13028         in little-endian order, not network endian, so must be converted
13029         to host endian here.  Fixes bug 80593.
13031 2007-03-22  Jb Evain  <jbevain@gmail.com>
13033         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
13034         qualified names for pointer types. Fixes #81208.
13036 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
13038         * marshal.c: Add support for PreserveSigAttribute. 
13039         
13040         Code is contributed under MIT/X11 license.
13042 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
13044         * process.c: Fix endianness issues. Fixes #81126.
13046         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
13047         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
13049         * image.c (mono_image_lookup_resource): Make this work on big-endian
13050         machines.Change API contract so the caller needs to free the return value.
13051         
13052         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
13053         API change.
13054         
13055 2007-03-14  Martin Baulig  <martin@ximian.com>
13057         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
13058         mono_type_get_desc() as well.
13060 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
13062         * icall.c:  Fix environ access in VS.  
13063         
13064 2007-03-13  Alp Toker  <alp@atoker.com>
13066         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
13067         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
13068         #63841.
13070 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
13072         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
13073         circular references among dynamic methods. Fixes #81091.
13075         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
13077 2007-03-09  Martin Baulig  <martin@ximian.com>
13079         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
13081 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
13083         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
13084         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
13085         
13086         Code is contributed under MIT/X11 license.
13087         
13088 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
13090         * loader.c: Reapply patch for bug #79424.
13092 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
13094         * metadata.c (mono_type_to_unmanaged): Only convert object to
13095         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
13097 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
13099         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
13100         (and incorrectly set) is_reference field from MonoGenericInst.
13102 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
13104         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
13105         a little earlier.
13107         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
13109         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
13111 2007-03-05  Miguel de Icaza  <miguel@novell.com>
13113         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
13114         FileOptions.1 value to mean "temporary", map that to
13115         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
13117         Fixes 80688
13119 2007-03-03  Marek Habersack  <mhabersack@novell.com>
13121         * appdomain.c: implement MS .Net style shadow copying. Copies of
13122         the assemblies are made in a subdirectory of the dynamic base
13123         directory, the assembly names are preserved.
13124         Copy .mdb and .config files along with the assemblies being shadowed.
13126 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
13128         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
13129         (emit_marshal_handleref): Ditto.
13131         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
13132         on Visual C++. Fixes #80671.
13134 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
13136         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
13137         for clone operations.
13139 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
13141         * marshal.c: Fix warnings.
13143 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
13145         * loader.c: allow case-insensitive matching of the dll name
13146         in dllmap handling when prefixed with "i:".
13148 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
13150         * threads.c: Fix #ifdef for dummy_apc function for VS.
13152 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
13154         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
13156 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
13157         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
13158         giving precedence to the methods with a fully qualified name
13159         (InterfaceName.MethodName) when building the interface sections
13160         of the vtable.
13162 2007-02-16  Dick Porter  <dick@ximian.com>
13164         * threadpool.c (append_job): Fix fast-path array handling, so it's
13165         less likely the array will grow exponentially when the load is
13166         heavy.
13168 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13170         * metadata-internals.h, loader.c: fix dllmap lookup order
13171         for non-function maps, too, and prepare for fallback code.
13173 2007-02-12  Robert Jordan  <robertj@gmx.net>
13175         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
13176         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
13177         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
13178         GlobalFree. Fixes a part of bug #77075.
13180 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
13182         * loader.c: implemented typedef parent in field memberref.
13184 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
13186         * marshal.c: Fix warnings and remember to call Release on
13187         IUnknown of RCW.
13188         
13189         Code is contributed under MIT/X11 license.
13191 2007-02-10  Miguel de Icaza  <miguel@novell.com>
13193         * class-internals.h: Add MonoHandleRef definition, and
13194         handleref_class to mono_defaults. 
13196         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
13197         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
13199         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
13200         (do nothing on this stage)
13201         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
13202         (emit_marshal_handleref): New method, used for argument handling
13203         of HandleRefs. 
13205 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
13207         * class.c (mono_class_setup_parent): Lazily init com types.
13208         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
13209         init com types.
13210         * object.c (mono_remote_class_vtable): Lazily init com types.
13211         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
13212         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
13213         * domain-internals.h: Expose mono_init_com_types.
13214         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
13215         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
13216         Add support for COM Callable Wrapper marshalling.
13217         * marshal.h: Add icall definitions.
13218         * gc.c: Handle freeing of CCWs in finalizer code.
13219         
13220         Code is contributed under MIT/X11 license.
13222 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
13224         * reflection.c: changed all the signature encoding code to use
13225         a variable-sized buffer.
13227 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13229         * marshal.c: locking fixes: never take the loader lock
13230         or other runtime locks when holding the marshal lock
13231         (fixes bug#80664).
13233 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
13235         * marshal.c: make the delegate function pointer mapping
13236         work for the moving GC.
13238 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
13240         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
13241         for bug #80618.
13243 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13245         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
13246         gmodule.
13248 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
13250         * threadpool.c: made the code moving-GC safe.
13252 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
13254         * assembly.c, boehm-gc.c, class-internals.h, class.c,
13255         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
13256         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
13257         warning cleanup.
13258         * reflection.c: warning cleanup, some threading and moving GC fixes.
13260 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
13262         * class.c, loader.c: create the needed Set/Get/Address array methods
13263         as well as the .ctors in mono_class_init (), fixes bug #80567.
13265 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
13267         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
13268         we doesn't decrease its alignment. Should fix the sparc build.
13270 2007-01-24  Dick Porter  <dick@ximian.com>
13272         * socket-io.c
13273         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
13274         Create the returned object if we need to ignore an unsupported
13275         socket option.  Fixes a segfault reported by Atsushi.
13277 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13279         * class.c, object.c: restrict GC-tracked fields to
13280         UIntPtr fields used inside corlib, so we provide better
13281         type info to the GC and also allow broken packing as in
13282         bug #80580.
13284 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
13286         * sgen-gc.c: removed duplicated function.
13288 2007-01-19  Miguel de Icaza  <miguel@novell.com>
13290         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
13291         value that means that the value is not supported, but that we
13292         should not return a failure, but instead report this as a
13293         successful operation.
13295 2007-01-19  Raja R Harinath  <rharinath@novell.com>
13297         Fix tests/bug79956.2.il
13298         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
13299         (mono_generic_class_get_class): If the generic definition in an
13300         enum, copy over other fields related to it.
13302 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
13304         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
13305         genericinst enums (bug #79215).
13307 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
13308         * class.c: Fix bug 80307.
13310 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
13312         * image.c: if the file table is not present, try to load
13313         all the modules, since we don't have info about them
13314         having or not metadata (bug #80517).
13315         * assembly.c: allow mono_assembly_load_references () to
13316         work for netmodules.
13318 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13320         * image.c, metadata-internals.h, object.c: execute module
13321         cctors when running on the 2 runtime if present (bug #80487).
13323 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13325         * icall.c: optimized InitializeArray() on bigendian.
13327 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
13329         * icall.c: fix for the broken ARM FPA double format.
13331 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13333         * icall.c: handle endian issues for r4 and r8 types, too, in
13334         the InitializeArray() icall.
13336 2007-01-15  Miguel de Icaza  <miguel@novell.com>
13338         * loader.c (mono_loader_error_prepare_exception): Clear the error
13339         once we have extracted the information from it, do this before we
13340         call into the JIT's class loading mechanisms.
13342         * object.c (mono_class_create_runtime_vtable): Do not clear the
13343         loader error before calling mono_class_get_exception_for_failure
13344         as the loader error is needed inside
13345         mono_class_get_exception_for_failure to throw the error (thinko).
13347         Fixes #80521
13348         
13349 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13351         * reflection.c: align fields rva data so it's faster to load at
13352         runtime.
13354 2007-01-12  Raja R Harinath  <rharinath@novell.com>
13356         Prepare to simplify GenericMethod handling.
13357         * class-internals.h (mono_method_get_context): New accessor function.
13358         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
13359         rather than directly accessing '->context' field.
13361         * class-internals.h (_MonoGenericParam.method): Move ...
13362         (_MonoGenericContainer): ... here.  Add into union with klass field.
13363         * class.c, icall.c, loader.c, metadata.c, reflection.c:
13364         Update to changes.
13366 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
13368         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
13369         the wrapper type enum and reduce relocations.
13371 2007-01-12  Raja R Harinath  <rharinath@novell.com>
13373         * reflection.c (inflate_mono_method): Reuse method instantiation
13374         from the generic method, if available.
13376 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13378         * marshal.c (emit_marshal_variant): Fix conv_arg
13379         type in last commit, based on whether parameter is byref.
13380         
13381 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13383         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
13384         marshalling.
13385         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
13386         MONO_TYPE_OBJECT back for VARIANT support.
13388 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13390         * marshal.c, marshal.h, icall-def.h: Implement 
13391         Marshal.ReAllocCoTaskMem.
13393 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
13395         * marshal.c: memory retention fixes: use the proper
13396         image cache for runtime_invoke method lookups.
13398 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13400         * mempool.c: added code to help debug mempool allocations.
13402 2007-01-11  Dick Porter  <dick@ximian.com>
13404         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
13405         support (experimenting with faking it with IP_MTU_DISCOVER for
13406         systems that don't have IP_DONTFRAGMENT.)
13407         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
13408         icall.
13410         * icall-def.h: new System.Net.Sockets.Disconnect icall.
13412         * socket-io.h: Add new fields to MonoSocketAsyncResult
13413         corresponding to the new ones in Socket.cs.
13415 2007-01-11  Raja R Harinath  <rharinath@novell.com>
13417         Fix IronPython regression mentioned in #80249
13418         * metadata.c (do_mono_metadata_parse_generic_class): Clear
13419         'cached_context' field, since it may have been initialized as a
13420         side-effect of metadata parsing.
13422         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
13423         (_MonoGenericClass.cached_class): Move here and rename from lone
13424         remaining field of ...
13425         (_MonoInflatedGenericClass): ... this.  Remove.
13426         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
13427         to changes.
13429         Fix mcs/tests/test-128.cs regression.
13430         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
13431         2007-01-10 change below.
13432         [MONO_TYPE_OBJECT]: Recurse into array case.
13434 2007-01-11  Raja R Harinath  <harinath@gmail.com>
13436         * class-internals.h (mono_get_inflated_generic_class): Remove.
13437         * class.c (mono_get_inflated_generic_class): Remove.
13438         (mono_generic_class_get_class): Rename from
13439         mono_class_create_generic.
13440         (mono_class_from_mono_type) [GENERICINST]: Use it.
13441         * reflection.c, metadata.c: Update to changes.  Use
13442         'mono_class_from_mono_type'.
13444 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
13446         * reflection.c: use passed type when encoding an array element
13447         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
13449 2007-01-09  Robert Jordan  <robertj@gmx.net>
13451         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
13452         result arguments (someDelegate.EndInvoke (unrelatedAres)).
13453         Fixes bug #80392.
13455 2007-01-09  Raja R Harinath  <rharinath@novell.com>
13457         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
13459         * object.c (set_value): Avoid aliasing between type->data.klass
13460         and type->data.generic_class.
13462         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
13464 2007-01-08  Raja R Harinath  <rharinath@novell.com>
13466         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
13467         between type->data.klass and type->data.generic_class.
13469 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
13471         * marshal.c: In MS.NET, StringBuilder objects are not copied by
13472         value in out parameters.
13474 2007-01-08  Raja R Harinath  <rharinath@novell.com>
13476         Simplify invariant for MonoGenericClass::klass field.
13477         * class.c (mono_class_create_generic): Verify 'klass' is null.
13478         * metadata.c (do_mono_metadata_parse_generic_class): Don't
13479         initialize 'klass' field.
13481 2007-01-05  Raja R Harinath  <rharinath@novell.com>
13483         Ongoing work to avoid redundant data and simplify invariants.
13484         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
13485         'generic_class', and change type to a GenericInst.
13486         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
13487         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
13489 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
13491         * class.c : skip io-layer under PLATFORM_WIN32.
13493 2007-01-03  Tor Lillqvist  <tml@novell.com>
13495         Fix #80305: In a bundled executable, look in the bundled exe
13496         assembly to determine the runtime version. Add the possibility to
13497         bundle also the machine.config file.
13498         
13499         * assembly.c (mono_assembly_open_from_bundle): Make
13500         non-static. Allow being called even if we have no bundled
13501         assemblies, and return NULL right away in that case.
13503         * domain-internals.h: Declare mono_assembly_open_from_bundle()
13504         here.
13506         * domain.c (app_config_parse): Take an assembly exe file name as
13507         parameter instead of a config file name. Check for a bundled
13508         config file for that assembly by calling
13509         mono_config_string_for_assembly_file() (see below) before looking
13510         for one in the file system.
13511         (get_runtimes_from_exe): Corrsponding change to call of
13512         app_config_parse().
13513         (get_runtimes_from_exe): Check for bundled assembly exe file first
13514         by calling mono_assembly_open_from_bundle(). If no bundled
13515         assembly exe file is found, call mono_image_open() as before to
13516         look it up in the file system.
13518         * mono-config.c: Add variable bundled_machinec_onfig.
13519         (mono_config_string_for_assembly_file): New function.
13520         (mono_config_for_assembly): Move code snippet that looks for a
13521         bundled assembly .config file into the above new function. Call
13522         it.
13523         (mono_register_machine_config, mono_get_machine_config): New
13524         functions to set and retrieve
13526         * assembly.h: Declare mono_register_machine_config().
13528         * mono-config.h: Declare mono_get_machine_config() and
13529         mono_config_string_for_assembly_file().
13531         * icall.c: No declaration of environ necessary on Win32. It is
13532         declared (as a macro expanding to a function call) in stdlib.h.
13533         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
13534         New internal mono function. Returns the value of
13535         mono_get_machine_config() as a Mono string.
13537         * icall-def.h: Add get_bundled_machine_config().
13539 2007-01-04  Raja R Harinath  <rharinath@novell.com>
13541         Remove redundant field
13542         * class-internals.h (_MonoGenericContext.container): Remove field.
13543         * loader.c (mono_method_get_signature_full): Don't parse a
13544         "container" for a signature parse when the signature is inflated
13545         immediately.
13546         (method_from_methodspec): Likewise, for a generic_inst.
13547         * class.c, metadata.c, reflection.c: Update to changes.
13549 2006-01-04  Raja R Harinath  <rharinath@novell.com>
13551         * class-internals.h (_MonoGenericClass): Rename 'context' field to
13552         'cached_context', and change semantics -- it starts off NULL, and
13553         is initialized on demand.
13554         * class.c (mono_generic_class_get_context): New accessor to
13555         replace 'context' field accesses.
13556         (mono_class_get_context): New helper.
13557         (*): Update to changes.
13558         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
13560 2007-01-03  Miguel de Icaza  <miguel@novell.com>
13562         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
13563         before the memcpy.   Fixes Marshal2 regression.
13565 2007-01-02  Jb Evain  <jbevain@gmail.com>
13567         * blob.h: add a MONO_TYPE_ENUM definition
13568         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
13569         fix the encoding of arrays of enums in custom attributes.
13571         Fixes #79666.
13573 2007-01-01  Miguel de Icaza  <miguel@novell.com>
13575         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
13576         string is null terminated, but only cut the string short if it
13577         overflows the buffer.   
13578         
13579         (mono_string_to_byvalstr): Also fix this routine.   The code here
13580         was not properly terminating a string (it was only terminated
13581         because of the previous catch-all memset). 
13583         I left the memset, because I do not know if applications expect
13584         the runtime to clear this region. 
13586         Fixes #79944.
13588         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13589         Clear the error before returning to unmanaged code to prevent the
13590         runtime from being confused later on (fixes  80420).
13591         (ves_icall_type_from_name): Always call mono_loader_clear_error
13592         after parsing a type that could have failed.
13593         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
13595         * loader.c (mono_loader_clear_error): Fix indentation.
13597 2006-12-28  Martin Baulig  <martin@ximian.com>
13599         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
13601 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
13603         * reflection.c: patch from Rolf Bjarne Kvinge to fix
13604         getting a token for an EnumBuilder.
13606 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
13608         * reflection.c: be more careful in case resource generation
13609         fails to create the data array.
13611 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
13613         * sgen-gc.c: write barrier for clone and fix unregister handles.
13615 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
13617         * reflection.c: some fixes needed in the generics code for the moving GC.
13619 2006-12-22  Robert Jordan  <robertj@gmx.net>
13621         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
13622         account. Fixes bug #80299.
13624 2006-12-21  Raja R Harinath  <rharinath@novell.com>
13626         Fix WaitHandle usage in delegates.
13627         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
13628         * object.c (mono_wait_handle_new): Use the property set method to
13629         initialize the handle.
13630         (mono_wait_handle_get_handle): New.
13631         * threadpool.c (mono_async_invoke): Use it.
13632         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
13633         Likewise.
13634         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
13636 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
13638         * marshal.c (emit_marshal): Call emit_marshal_variant and
13639         emit_marshal_com_interface when applicable.
13640         (emit_marshal_variant, emit_marshal_com_interface): Add
13641         methods for this case and remove if's from emit_marshal_object.
13642         
13643 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
13645         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
13647 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
13649         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
13650         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
13651         and GlobalFree on Windows. Remove FIXME.
13653 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
13655         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
13656         implementation for managed objects.
13658 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13660         * object.c: implemented code to be used for checking
13661         that no reference field overlaps with non-references.
13663 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13665         * threadpool.c: fix queue code to be compatible with the
13666         moving GC.
13668 2006-12-18  Miguel de Icaza  <miguel@novell.com>
13670         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
13671         in structures by throwing ArgumentNullException.
13673         (emit_marshal_safehandle): Also when they are null parameters.
13675         (emit_marshal_safehandle): Add support for ref
13676         SafeHandles parameters
13678 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13680         * profiler.c: updated to use the mono-dl API instead of
13681         gmodule.
13683 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13685         * profiler.c: updated to use the mono-dl dynamic loading
13686         API instead of gmodule.
13688 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
13690         * profiler.c: use readlink, older versions of glib don't have
13691         g_file_read_link ().
13693 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13695         * profiler.c: try to detect the path to mono if libc fails to provide
13696         a useful name (bug #80286).
13698 2006-12-16  Raja R Harinath  <rharinath@novell.com>
13700         Fix #80242
13701         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
13702         instance, use the generic type definition instead.
13703         (ves_icall_Type_GetNestedTypes): Likewise.
13704         * class.c (mono_class_create_generic): Always set the
13705         nested_classes of a generic instance to NULL, even if the generic
13706         type definition has nested types.
13708 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
13710         * marshal.c (mono_string_from_bstr): Revert previous Windows change
13711         and fix on Linux.
13712         
13713 2006-12-15  Miguel de Icaza  <miguel@novell.com>
13715         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
13716         my arguments were in the wrong order.   I also fixed the Windows
13717         version which seems to have had the same issue.
13719         (mono_free_bstr): On Unix, this is g_free.
13720         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
13721         conversions (for the tests in corlib to pass).
13723 2006-12-14  Miguel de Icaza  <miguel@novell.com>
13725         * marshal.c (emit_ptr_to_object_conv): For now, ignore
13726         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
13727         exception if a ref SafeHandle in a struct has changed).
13728         
13729         (emit_struct_conv): Do not perform layout checks for classes
13730         derived from SafeHandle, as those are specially handled. 
13732         (emit_object_to_ptr_conv): Add support for
13733         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
13735         (emit_marshal_safehandle): Implement conversion of return values
13736         of safehandles (MARSHAL_ACTION_CONV_RESULT).
13737         
13738         * threads.c: WaitHandle now is compiled with two different handles
13739         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
13740         for 2.0.
13741         
13742         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
13743         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
13744         these routines to cope with both kinds of fields.
13746 2006-12-12  Miguel de Icaza  <miguel@novell.com>
13748         * metadata.c (mono_type_to_unmanaged): Handle the case where
13749         type->data.klass is a SafeHandle, and in that case, return the
13750         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
13751         MONO_MARSHAL_CONV_SAFEHANDLE. 
13753 2006-12-11  Miguel de Icaza  <miguel@novell.com>
13755         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
13756         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
13757         calling emit_marshal_object.
13759         (emit_marshal_safehandle): Implement marshalling of
13760         SafeHandle parameters (no ref support yet).
13762         (MarshalAction): Document the defines as I implement
13763         them for SafeHandle.
13765         (emit_marshal_object): indentation police.
13767         * class-internals.h: Define MonoSafeHandle.
13768         Add safehandle_class to MonoDefaults type.
13770         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
13771         list of classes to check for fields. 
13773         * domain.c (mono_init_internal): Add SafeHandle to the list of
13774         mono_defaults loaded.
13776 2006-12-15  Raja R Harinath  <rharinath@novell.com>
13778         Fix #80253
13779         * reflection.c (mono_reflection_bind_generic_parameters): If the
13780         generic type definition is a type builder, ensure that it is fully
13781         initialized before instantiating it.  Kill some dead code.
13783 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
13785         * object.c: clear the loader_error () before loading
13786         more metadata stuff (bug #80258).
13788 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
13790         * icall.c, icall-defs.h: type modifiers icalls for
13791         parameters and properties.
13793 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
13795         * object.c, icall.c: fixed warnings.
13797 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
13799         * marshal.c: fixed a couple of leaks and coding style in a few places.
13801 2006-12-08  Dick Porter  <dick@ximian.com>
13803         * process.c: Cope with NULL ProcessStartInfo arguments on windows
13804         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
13805         80173.
13807 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
13809         * process.c: ProcessStartInfo may have only filename set and
13810         arguments can be NULL.
13812 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13814         * icall.c: fix leak found by Robert Jordan.
13816 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
13818         * marshal.c, marshal.h: generate managed method to access an element
13819         of a multi-dimensional array.
13821 2006-11-30  Paolo Molaro (lupus@ximian.com)
13823         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
13825 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13827         * icall.c: back out GetFields () fix until the serialization code is
13828         fixed to not depend on the incorrect behaviour.
13830 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
13832         * profiler.c: provide defaults if none are set.
13834 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13836         * Makefile.am, attrdefs.h: new public header file with
13837         constants for attributes for use by embedders.
13839 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
13841         * icall.c: GetFields () fix for bug #80064.
13843 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
13845         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
13846         removed long unused icalls.
13848 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
13849   
13850         * marshal.c: 
13851                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
13852                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
13853                 can be generated without a delegate class.
13854                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
13855         
13856         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
13858 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13860         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
13861         #80069.
13863 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13865         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
13866         icall-def.h: added icalls needed by System.GC.
13868 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
13870         * loader.c: ensure the class in catch clauses is handled
13871         correctly for generics methods (fixes bug#79980).
13873 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
13875         * monitor.h, monitor.c: added mono_locks_dump () function
13876         to help debug deadlocks involving managed locks.
13878 2006-11-13  Dick Porter  <dick@ximian.com>
13880         * file-io.c (get_file_attributes): If the file is a symlink try
13881         and get the stat data for the target, but also add the
13882         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
13883         the specs for the windows symlink support, but will probably have
13884         to be reworked when I have test data from a vista machine.  Fixes
13885         bug 79887.
13887 2006-11-13  Dick Porter  <dick@ximian.com>
13889         * gc.c (mono_domain_finalize): 
13890         * marshal.c (mono_delegate_begin_invoke): 
13891         * threadpool.c (socket_io_init, mono_thread_pool_init)
13892         (mono_thread_pool_finish): 
13893         * monitor.c (mono_monitor_try_enter_internal): 
13894         * threads.c (mono_thread_resume, mono_thread_init)
13895         (mono_thread_suspend_all_other_threads)
13896         (mono_thread_execute_interruption): 
13897         * appdomain.c (mono_domain_unload): Check for NULL error returns
13898         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
13899         75733.
13901 2006-11-11  Miguel de Icaza  <miguel@novell.com>
13903         * process.c
13904         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
13905         Only close the handle if the value of the handle is not
13906         INVALID_HANDLE_VALUE.  This just makes the process a bit more
13907         robust.
13909         Improvement for #75733, so that we do not run into this problem. 
13911         
13912         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
13913         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
13914         internal variables.  Fixes #79462 
13915         
13917 2006-11-09  Dick Porter  <dick@ximian.com>
13919         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
13920         Use poll() not select().  Fixes bug 79397.
13922 2006-11-09  Raja R Harinath  <rharinath@novell.com>
13924         Fix #79872
13925         * assembly.c (mono_assembly_load_from_full): Check that the given
13926         image has an assembly manifest.
13928 2006-11-09  Ankit Jain  <jankit@novell.com>
13930         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
13931         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
13932         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
13934 2006-11-07  Dick Porter  <dick@ximian.com>
13936         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
13937         Put the old resolver behaviour back for pre-2.0 profiles.
13939 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
13941         * threadpool.c: precise GC and locking fixes.
13943 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
13945         * class.c: don't load types that have an explicit unaligned
13946         managed reference. Provide better info in the TypeLoad exception.
13947         Part of the fix for bug #79744.
13948         * object.c: use the correct check for class type load issues.
13950 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
13952         * class.c: enforce alignment of fields with managed references
13953         even when Pack=1 is forced by the user (bug #77788).
13955 2006-11-03  Dick Porter  <dick@ximian.com>
13957         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
13958         If the address reverse lookup fails, return it as the hostname
13959         anyway.  Fixes bug 79721.
13961 2006-11-03  Dick Porter  <dick@ximian.com>
13963         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
13964         Fix build on Windows.
13966 2006-11-02  Dick Porter  <dick@ximian.com>
13968         * icall-def.h: 
13969         * object-internals.h: 
13970         * exception.c (mono_get_exception_thread_interrupted): 
13971         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
13972         Fixes bug 74525.
13974         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
13975         Check for pending Thread.Interrupt.
13977 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
13978         * loader.c: Fixed bug 79684.
13980 2006-10-27  Dick Porter  <dick@ximian.com>
13982         * file-io.c (get_file_attributes): Force symlinks to directories
13983         to be returned as a regular file.  Fixes bug 79733.
13984 2006-10-26  Dick Porter  <dick@ximian.com>
13986         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
13987         CreateFile to open a directory then we need to set the
13988         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
13990 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
13992         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
13993         friends.
13995 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
13997         * sgengc.c: small cleanup of timer code.
13999 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14001         * sgen-gc.c: fix some warnings and start adding support for
14002         complete object removal on domain unload.
14004 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
14006         * assembly.c: build_assembly_name should not consider a version
14007         number without build or revision number invalid. Fixes bug #79715.
14009 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
14011         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
14012         call kernel32 function OutputDebugString directly.
14013         
14014         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
14015         
14016 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
14018         * reflection.c: small cleanup, using a function to insert a MonoString
14019         in the string heap.
14021 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
14023         * reflection.c: moving GC fixes.
14025 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
14027         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
14028         all the objects with finalizers belonging to an unloading appdomain.
14030 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
14032         * sgen-gc.c: added ability to allocate even when the nursery is fully
14033         pinned and fixed a couple of bugs.
14035 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
14037         * threads.h: Revert the last change for now.
14039         * threads.h (mono_thread_get_pending_exception): Rename this to
14040         mono_thread_get_undeniable_exception ().
14042 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
14044         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
14045         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
14046         when fname does not refer to valid assembly. This result in a more
14047         meaningful error message.
14048         * exception.c: added mono_get_exception_bad_image_format2 which 
14049         constructs a BadImageFormatException using the ctor taking a custom
14050         message and the file name. Passing in a NULL msg results in a default
14051         message.
14052         * exception.h: define mono_get_exception_bad_image_format2 function.
14053         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
14054         when file name pointed to an invalid IL image. Use 
14055         mono_get_exception_file_not_found2 to construct FileNotFoundException,
14056         as this results in a more meaningful error message.
14058 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
14060         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
14061         #79465.
14063 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
14065         * metadata.c (mono_type_size): Change the align parameter to guint32 for
14066         consistency with the other _size functions.
14067         (mono_type_stack_size): Ditto.
14069         * class.c object.c icall.c: Fix warnings caused by the above change.
14071         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
14073         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
14075         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
14077 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
14079         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
14080         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
14081         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
14082         threadpool.h, threads-types.h: mark more internal functions.
14084 2006-10-11  Dick Porter  <dick@ximian.com>
14086         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
14087         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
14088         reproduce the bug even before applying the fix.)
14090 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
14092         * reflection.c: allow retrieving attributes for arguments in generic
14093         methods (bug #79241).
14095 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
14097         * debug-mono-symfile.c: properly check fopen () result (found by
14098         coverity).
14100 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
14102         * reflection.c: make error message clearer and fixed two
14103         issuelets found by Coverity.
14105 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
14107         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
14109 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
14111         * object-internals.h, gc-internal.h, profiler-private.h:
14112         mark internal functions.
14114 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14116         * reflection.c: put data in the text section.
14117         * icall.c: recognize more types in type_from_typename ().
14118         * process.c, marshal.c: added some GC FIXMEs.
14120 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14122         * loader.c: check for NULL before initializing.
14124 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
14126         * gc.c (finalizer_thread): Use a non-alertable wait here.
14128         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
14129         until the correct solution is found.
14131 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
14133         * reflection.c (mono_module_get_object): Avoid an assert when operating on
14134         modules with no metadata. Fixes #79596.
14136         * image.c (load_metadata_ptrs): Put back the error message when
14137         the #- heap is encountered since the support is not complete yet.
14139 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14141         * gc.c: do not allow the user to SuppressFinalize () a
14142         delegate because it would leak the trampoline if present.
14144 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
14146         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
14147         PropertyPtr table.
14149 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
14151         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
14153         * metadata.c (mono_metadata_get_param_attrs): Ditto.
14155         * row-indexes.h: Add definitions for *Ptr tables.
14157         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
14159         * metadata.c (mono_metadata_translate_token_index): New helper function to
14160         translate table indexes used in uncompressed metadata.
14161         (mono_metadata_decode_table_row): Ditto.
14162         (mono_metadata_decode_table_row_col): Ditto.
14164         * metadata.c: Add table schema for *Ptr tables.
14166         * class.c loader.c: Use the new helper function to access the affected metadata
14167         tables.
14168         
14169         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
14170         #38532.
14171         
14172 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
14174         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
14175         sequences which can be unbounded in size. Fixes #79583.
14177 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
14179         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
14180         static initialization.
14182         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
14184         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
14186         * domain.c (mono_domain_free): Free up type_init_exception_hash.
14188         * object.c (mono_runtime_class_init): Implement correct semantics when a static
14189         ctor fails, i.e. throw the same exception on subsequent accesses.
14190         
14191 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
14193         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
14194         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
14195         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
14196         Handle marshalling of interfaces and VARIANTs contained in structs.
14197         
14198         Code is contributed under MIT/X11 license.
14199         
14200 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
14202         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
14203         
14204         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
14205         mempool.
14207 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14209         * console-io.c: ignore previous SIGINT handler.
14211 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
14213         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
14214         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
14215         #79460, #79461, #79485.
14217         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
14219         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
14220         #79217.
14222 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
14224         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
14225         could be generated from it.
14227 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
14229         * rand.c: fix read loop to correctly handle EINTR.
14231 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14233         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
14234         internal calls are defined to keep methods closer to the declaring
14235         type and allow a significant reduction in runtime relocations and
14236         memory usage.
14238 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
14240         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
14241         exception message to have FileNotFoundException use the default
14242         assembly load error message. Fixes bug #79426.
14243         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
14245 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14247         * threadpool.c: (start_thread_or_queue) use the root domain when
14248         creating the thread instead of the async object one.
14250 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
14252         * class.c, object.c, class-internals.h, reflection.c:
14253         for arrays, store element_size inside MonoClass (speedup
14254         for array object creation).
14256 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
14258         * icall.c: fixed CodeBase to use the file name and not the module
14259         name (bug #79365).
14261 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14263         * mono-debug.c, mono-debug.h: export find_method as
14264         mono_debug_find_method ().
14266 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
14268         * debug-helpers.c, class-internals.h: added a few functions useful
14269         when debugging under gdb.
14271 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14273         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
14274         characters that need special handling.
14276 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
14278         * mono-config.c: make the os/cpu specification more flexible,
14279         allowing lists and negation.
14281 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
14283         * marshal.c: COM Interop fixes. Handle case where method->klass.
14284         is interface. Handle BSTR/MonoString when null. Use CDECL as 
14285         calling convention on non-windows platforms. This is for
14286         compatibility with XPCOM and MainWin COM.
14287         
14288         Code is contributed under MIT/X11 license.
14289         
14291 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
14293         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
14294         correctly. Fixes #79217.
14296         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
14298 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
14300         * mono-config.c: allow both an os and cpu attribute for dllmap
14301         and dllentry elemnets to enable a single config file to be used
14302         for multiple architectures.
14304 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
14306         * loader.c: MonoLoaderError was cleared too soon on load failure.
14307         Fixes bug #79424.
14309 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
14311         * icall.c: use the defining class vtable when accessing a
14312         static field, not a pobblibly derived class.
14314 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
14316         * icall.c string-icalls.c: Remove references to unicode.h.
14318         * unicode.h unicode.c Makefile.am: Remove these unused source files.
14320         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
14322         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
14323         indicating the image where custom marshaller types should be looked up.
14324         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
14325         custom marshallers, instead of corlib. Fixes #79425.
14327 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
14329         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
14331 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
14333         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
14334         Implement Environment.ProcessorCount.
14335         
14336         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
14337         Implement Environment.ProcessorCount.
14338         
14339         * icall.c: 
14340         Add Environment.ProcessorCount icall.
14341         
14342         Patch by Jason McFall.
14344 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14346         * assembly.c: don't append .exe/.dll when the filename already contains
14347         one of those extensions.
14349 2006-09-12  Martin Baulig  <martin@ximian.com>
14351         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
14352         to array interfaces.
14354 2006-09-11  Martin Baulig  <martin@ximian.com>
14356         * reflection.c (mono_image_build_metadata): Create the
14357         MethodImpl's after emitting all types and methods, so we don't
14358         need another fixup pass for them.
14360 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
14362         * class.c (mono_class_from_name_case): Fix regression introduced by the last
14363         change.
14365 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
14367         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
14368         unload.
14370 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
14372         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
14373         args is not set. Fixes #78926.
14375 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
14377         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
14379         * image.c (load_class_names): Move this to class.c, and rename it to 
14380         'mono_image_init_name_cache'.
14381         (load_modules): Fix a warning.
14383         * class.c icall.c image.c: Initialize image->name_cache lazily.
14385         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
14386         on its name using information in the AOT file.
14388         * class.c (mono_class_from_name): Use the new hook function.
14390 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
14392         * reflection.c (mono_param_get_objects): Handle enum default parameter values
14393         correctly.
14395         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
14396         Fixes #79289.
14397         
14398 2006-09-06  Martin Baulig  <martin@ximian.com>
14400         * icall.c (mono_lookup_internal_call): Small fix.
14402 2006-09-05  Raja R Harinath  <rharinath@novell.com>
14404         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
14405         double g_free.
14407 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
14409         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
14410         when --debug is specified.
14412 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
14414         * class.c (setup_generic_array_ifaces): Fix a warning.
14416 2006-09-04  Miguel de Icaza  <miguel@novell.com>
14418         * Temporarily remove the patch to assemly.c that checks the
14419         assembly versions as it breaks our gacutil.
14421 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
14423         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
14425         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
14426         a net 1.0 runtime.
14428         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
14429         created using the default ctor. Fixes #79152.
14430         (mono_string_builder_to_utf16): Ditto.
14432 2006-09-01  Martin Baulig  <martin@ximian.com>
14434         Fix handling of the generic array interfaces.
14436         * class-internals.h
14437         (MonoDefaults): Removed `generic_array_class' and added
14438         `generic_ilist' class.
14440         * class.c
14441         (mono_bounded_array_class_get): Add the new generic array interfaces.
14442         (setup_generic_array_ifaces): New static method; create vtable
14443         entries for each method in the generic array interfaces.
14445         * metadata.c
14446         (select_container): Allow "parent-less" generic methods.
14448         * marshal.c
14449         (mono_marshal_get_generic_array_helper): New public method.
14451         * icall.c
14452         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
14453         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
14454         moved the interncall into System.Array.
14456 2006-09-01  Raja R Harinath  <rharinath@novell.com>
14458         A few more cases of avoiding work on types with ->byref set.
14459         Has the real fix for #79238
14460         * icall.c (is_generic_parameter): New helper.
14461         (ves_icall_Type_GetGenericParameterPosition): Use it.
14462         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
14463         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
14464         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
14465         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
14466         reference types.
14467         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
14468         reference types.
14469         (ves_icall_Type_get_IsGenericInstance): Likewise.
14470         (ves_icall_Type_get_IsGenericType): Likewise.
14472 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
14474         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
14475         class if possible.
14477         * mempool.h (mono_mempool_get_allocated): New helper function.
14479         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
14480         change.
14482         * mempool.c: Fix warnings and the calculation of stats.
14484         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
14486         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
14488         * loader.c (mono_get_method_from_token): Update method_count stat.
14490         * class-internals.h (MonoStats): Add some stats.
14492 2006-08-31 Robert Jordan  <robertj@gmx.net>
14494         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
14495         with managed variants.
14496         All code is contributed under the MIT/X11 license.
14497         
14498 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
14500         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
14501         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
14503         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
14505         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
14506         with cycles in classes.
14508         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
14510         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
14511         missing a [MarshalAs] directive. Fixes #79203.
14513         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
14514         klass->marshal_info. Fixes #79217.
14516 2006-08-30  Martin Baulig  <martin@ximian.com>
14518         Committing a patch from Joachim Ante <joe@otee.dk>:
14519         Add support for binary data symbol stores.
14521         * debug-mono-symfile.c
14522         (mono_debug_open_mono_symbol_file): Renamed into
14523         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
14524         arguments.
14526         * mono-debug.c
14527         (mono_debug_open_image): Added `raw_contents' and `size' args.
14528         (mono_debug_init_2_memory): New public function.
14530 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
14532         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
14534 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14536         * appdomain.c: implement support for ShadowCopyFiles.
14538 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
14540         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
14541         when value is NULL (and should remove CID #51).
14543 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14545         * image.c: moved 2 functions to ../utils.
14547 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
14549         * gc.c: cope with the target object of a GC handle being NULL
14550         (bug #78877).
14552 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14554         * class.c: recursively check parent's explicit implementations
14555         of interface methods (fixes bug #79125).
14557 2006-08-19  Miguel de Icaza  <miguel@novell.com>
14559         * filewatcher.c: Avoid warnings when building, do not redefine
14560         constants that are defined.
14562         Remove warnings.
14564 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14566         * image.c: don't fail when the link points to an absolute path.
14568 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
14570         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
14571         Fix CID #3.
14573 2006-08-17  Miguel de Icaza  <miguel@novell.com>
14575         * image.c (full_path): A new method used to obtain the actual path
14576         of an assembly even in the presence of symbolic links.  
14578         This is necessary for the case where we are running a binary that
14579         has been GACed, but we are using the "published" path name
14580         ($prefix/mono/1.0/blah.exe) which happens to point to the real
14581         file in the GAC.
14583         This was the source of the failure for the `xsp' command with the
14584         recent AppDomain changes, as far as the runtime was concerned,
14585         there were two different assemblies: $prefix/mono/1.0/blah.exe and
14586         $prefix/mono/gac/blah/version/blah.exe.
14588         (do_mono_image_open): use full path
14590 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
14592         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
14594 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
14596         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
14597         domain_id is supplied. Fix CID #241 and corlib's unit tests.
14599 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
14601         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
14602         small structures. Fixes #78990.
14604 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
14606         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
14608         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
14610 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14612         * appdomain.c:
14613         * marshal.c: don't load all the assemblies from a domain into newly
14614         created ones. The new domains might have different rules and load
14615         assemblies from different locations. Fixes bug #76757.
14617         Patch by Lluis. Conflicts resolved by Brian Crowell.
14619 2006-08-16  Alp Toker  <alp@atoker.com>
14621         * socket-io.c: First half of the fix for #79084.
14622         Set sa_size to the length of the content, not that of the struct.
14623         Don't add NULL suffix to the content, this should be done in
14624         managed code if needed.
14626 2006-08-14  Raja R Harinath  <rharinath@novell.com>
14628         Fix part of #79012
14629         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
14630         mono_metadata_parse_type returns NULL.
14632 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
14634         * normalization-tables.h : new file for string normalization data.
14635         * locales.c, locales.h, icall.c :
14636           added load_normalization_resource() for string normalization,
14637           and icall as well.
14638         * Makefile.am : added normalization-tables.h to the sources.
14640 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
14642         * marshal.c: Add more helper functions to reduce code duplication and use them
14643         everywhere.
14645 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
14647         * marshal.c: Fix non-x86 stdcall warnings.
14648         
14649         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
14650         them everywhere.
14652 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
14654         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
14655         type check on multi-dimensional arrays. Fixes #79000.
14657 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
14659         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
14660         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
14661         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
14662         * class-internals.h: add is_com_object to class structure.
14663         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
14664         null checks to COM object marshalling. Fix .ctor call on RCW.
14665         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
14666         
14667         All code is contributed under the MIT/X11 license.
14669 2006-08-09  Dick Porter  <dick@ximian.com>
14671         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
14672         racing mono_monitor_allocator_lock() somewhere, so don't delete
14673         the critical section for now.  Found by running and exiting
14674         monodevelop.
14676 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
14678         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
14679         (ves_icall_System_ComObject_FindInterface): Ditto.
14680         (ves_icall_System_ComObject_CacheInterface): Ditto.
14682         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
14683         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
14685 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14687         * threadpool.c: treat pipes from process asynchronous reads as sockets
14688         when reading from them, so we get select/poll or epoll to wait for
14689         data.
14691 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
14693         * loader.c: Fix a typo (CID #233) in the null check.
14695 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
14697         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
14698         Hopefully fixes #78949.
14699         
14700         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
14701         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
14702         bytes. Fixes #78972.
14704 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14706         * filewatcher.c: we need to set errno here.
14708 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14710         * filewatcher.c: let Win32Exception get the error value.
14712 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14714         * filewatcher.c: translate errno into win32 errors for Win32Exception
14715         to know what happened.
14717 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
14719         * threadpool.c: Fix more warnings.
14721         * assembly.c (search_loaded): Fix warnings.
14723         * threadpool.c (mono_thread_pool_finish): Fix warnings.
14724         (mono_async_invoke): Ditto.
14726 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
14728         * object.c (mono_remote_class_vtable): Need to create proxy vtable
14729         entries for __ComObject type in addition to ComImport types.
14730         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
14731         about hash table.
14732         
14733         All code is contributed under the MIT/X11 license.
14735 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14737         * image.c: avoid tentative loading of modulerefs that contain
14738         no metadata (P/Invoke library names).
14740 2006-07-28  Dick Porter  <dick@ximian.com>
14742         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
14743         mono_loader_lock() somewhere, so don't delete the critical section
14744         for now.  Found by running and exiting monodevelop.
14746 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14748         * filewatcher.c: define the inotify syscalls when we're building on
14749         linux and have sys/syscall.h. The build system might not have support
14750         for inotify but the target system might have it.
14752 2006-07-26  Miguel de Icaza  <miguel@novell.com>
14754         * domain.c: Documentation updates.
14756         * loader.c (mono_free_method): Do not release the method
14757         information if we are being profiled, as profilers will use this
14758         information at shut down to present some data to the user.
14760         This is needed so that the profiler does not crash, as the
14761         profiler tends to keep MonoMethods around, and they might become
14762         invalid if we free these.
14764         (mono_get_method_constrained): Return the original CIL stream
14765         method as well, so verification can be performed against it.
14767 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14769         * filewatcher.[ch]: support for inotify file system watcher.
14770         * icall.c: add new internal calls for the inotify file system watcher.
14772 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14774         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
14775         #78888.
14777 2006-07-20  Dick Porter  <dick@ximian.com>
14779         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
14780         warning.
14782 2006-07-20  Dick Porter  <dick@ximian.com>
14784         * threads.c (start_wrapper): Do the thread cleanup while we still
14785         hold a reference to its object.  Fixes bug 78123.
14787 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
14789         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
14790         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
14791           "managed-to-managed".
14792         * icall.c: Redirect string constructors that take sbyte* to
14793           ves_icall_System_String_ctor_RedirectToCreateString.
14794         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
14795           to CreateString () methods with matching signature.
14796         * reflection.c: Use original security informations for
14797           MONO_WRAPPER_MANAGED_TO_MANAGED.
14798         * security-manager.c: Use original security informations for
14799           MONO_WRAPPER_MANAGED_TO_MANAGED.
14800         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
14801           that is a placeholder and only its address should be used.
14802         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
14803           that is a placeholder and only its address should be used.
14805 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
14807         Begin implementing COM Interop.
14808         * appdomain.c: Increment corlib version.
14809         * class.c: Set ComImport classes' parent to __ComObject.
14810         * loader.c: Mark cominterop methods as such.
14811         * domain.c: Add __ComObject class to MonoDefaults structure.
14812         * image.c: Add 2 hashtables to the image for COM Interop related methods
14813         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
14814         using the mempool allocator
14815         
14816         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
14817         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
14818         declaration for mono_metadata_type_dup_mp.
14819         
14820         * debug-helpers.c: Added strings for two additional wrapper types
14821         * object.c: Create proxy objects for ComImport classes
14822         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
14823         and added __ComObject class to MonoDefaults structure.
14824         
14825         * object-internals.h: Finish MonoRealProxy definition, and add definition of
14826         MonoComInteropProxy and MonoComObject.
14827         
14828         * marshal.c: Added support for COM Interop
14829         (signature_cominterop): Converts managed signature to corresponding
14830         unmanaged COM signature.
14831         (cominterop_get_function_pointer): gets unmanaged function pointer via
14832         COM object vtable
14833         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
14834         (cominterop_get_method_interface): returns interface type that method is defined on
14835         (mono_mb_emit_cominterop_call): emits native call to function pointer
14836         gotten from vtable
14837         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
14838         that matches signature of unmanaged function.
14839         (cominterop_get_native_wrapper): wrapper around adjusted method call.
14840         (cominterop_get_invoke): forwards call from proxy to __ComObject
14841         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
14842         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
14843         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
14844         
14845         * marshal.h: Added Marshal icall declarations.
14846         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
14847         so we can access them in finalizer
14848         
14849 2006-07-14  Dick Porter  <dick@ximian.com>
14851         * object.c (mono_type_initialization_cleanup): Fix a race
14852         condition by temporarily commenting out the critical section
14853         deletion.
14855 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
14857         * reflection.c (create_custom_attr): Fix some warnings.
14858         (create_custom_attr_data): Ditto.
14859         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
14860         types. Fixes #78855.
14862 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
14864         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
14866         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
14868 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
14870         * reflection.c (resolve_object): Add support for DynamicMethod.
14872         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
14873         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
14875 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
14877         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
14878         don't leak GPtrArray's pdata has we have no use (nor free) for it.
14880 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
14882         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
14883         Fixes #77888.
14885 2006-06-30  Raja R Harinath  <rharinath@novell.com>
14887         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
14888         slightly: remove a shadow local variable.
14890 2006-06-29  Raja R Harinath  <rharinath@novell.com>
14892         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
14893         definition that introduces the virtual function slot.
14894         Also fix Coverity #105.
14896 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
14898         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
14899         for dynamic assemblies. Fixes #78724.
14901 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
14903         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
14904         Fixes #78722.
14906 2006-06-21  Martin Baulig  <martin@ximian.com>
14908         * reflection.c
14909         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
14910         fixes #76484.
14912 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
14914         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
14916 2006-06-20  Raja R Harinath  <rharinath@novell.com>
14918         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
14919         nor TYPEREFs.
14920         * class.c (mono_class_create_from_typespec): Add 'context' argument.
14921         Inflate result if necessary.
14922         (mono_class_get_full): Remove old version.  Rename from
14923         'mono_class_get' and add 'context' argument.  Pass it to
14924         ..._create_from_typespec.
14925         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
14926         (mono_ldtoken): Revert change below.
14928 2006-06-20  Martin Baulig  <martin@ximian.com>
14930         * class.c (mono_ldtoken): Don't pass the generic context to
14931         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
14933 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
14935         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
14936         and later freeing it. Fixes #78638.
14938 2006-06-15  Miguel de Icaza  <miguel@novell.com>
14940         * icall.c (mono_class_get_throw): Revert over-zealous error
14941         throwing, the caller for mono_class_get_throw will cope with
14942         errors when classes are not properly initialized already.
14944         The code still copes with loader exceptions though.
14946         Fixes the regression in reftype1 and reftype3 from the CAS tests.
14947         
14948 2006-06-14  Miguel de Icaza  <miguel@novell.com>
14950         Fixes the `make run1' version of RuntimeAbort (to be commited,
14951         source is in Bugzilla).
14952         
14953         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
14954         FALSE on class loading failure instead of returning true.
14956         * class.c (mono_class_create_from_typedef): It is possible for
14957         mono_metadata_interfaces_from_typedef_full to fail if a class is
14958         not found, cope with this.
14959         
14961 2006-06-14  Dick Porter  <dick@ximian.com>
14963         * socket-io.c: 
14964         * process.c: Fix a bunch of signed/unsigned warnings from gcc
14965         4.1.1
14967 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
14969         * culture-info-table.h : oops, forgot to make it nsync with r61548.
14971 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
14973         * icall.c: Another fix for building mono in Visual Studio.
14975 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
14977         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
14978         
14979 2006-06-09  Martin Baulig  <martin@ximian.com>
14981         * debug-mono-symfile.c: Put this back and really fix it this
14982         time. Sorry for all the trouble.
14984 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
14986         * icall.c (mono_class_get_throw): Fix a warning.
14987         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
14988         ReflectionTypeLoadException if needed. Fixes #78606.
14990         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
14991         (mono_class_init): Ditto.
14993         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
14994         ref_only exceptions.
14995         (mono_loader_clear_error): Make this work even if there is no error.
14997 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
14999         * object-internals.h marshal.c marshal.h icall.c: Implement method 
15000         Marshal.GetComSlotForMethodInfo using internal call.
15002 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
15004         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
15005         a function for signalling it.
15007         * class.c (mono_class_from_typeref): Use the new kind of loader error when
15008         a referenced assembly is not found.
15010         * loader.c (mono_loader_error_prepare_exception): Add support for 
15011         LOADER_ERROR_ASSEMBLY. Fix formatting.
15013 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
15015         * domain.c appdomain.c class-internals.h marshal.c: Add support 
15016         for VARIANT marshalling on windows and increment corlib version
15017         since Variant struct was added.
15019 2006-06-03  Miguel de Icaza  <miguel@novell.com>
15021         * debug-mono-symfile.c: Revert Martin's previous patch which broke
15022         stack trace line information:
15024         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
15025         (Martin) when looking up B which is between A and C, return A not C.
15027         Bug is #78573.
15029         Thanks to Alexander Olk for tracking this down.
15031 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
15033         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
15034         
15035         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
15036         avoid clobbering its value.
15037         (mono_string_to_lpstr): Fix a warning on windows.
15039 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
15041         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
15043         * reflection.c loader.c: Removed references to 'dummy' flag.
15045         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
15047         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
15048         it gets GC tracking.
15050         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
15051         GC tracking.
15052         
15053         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
15055         * marshal.c threadpool.c: Update callers of mono_async_result_new.
15057         * appdomain.c: Bump corlib version.
15059 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
15061         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
15062         CEE_STIND_REF when working with object references.
15064 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
15066         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
15067         Fixes #78539.
15069 2006-05-30  Miguel de Icaza  <miguel@novell.com>
15071         * loader.c (method_from_memberref): Fix argument value for
15072         mono_loader_set_error_method_load (I was passing the MonoClass
15073         instead of the class name char *).
15075 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
15077         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
15078         CEE_STIND_REF when working with object references.
15080 2006-05-30  Martin Baulig  <martin@ximian.com>
15082         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
15083         mono_method_full_name() change and replace the ':' with a '.'
15084         here.
15086 2006-05-30  Martin Baulig  <martin@ximian.com>
15088         * debug-mono-symfile.c
15089         (mono_debug_symfile_lookup_location): Fix the algorithm:
15090         when looking up B which is between A and C, return A not C.
15092 2006-05-29  Martin Baulig  <martin@ximian.com>
15094         * mono-debug.h
15095         (MonoDebugMethodInfo): Make the typedef public.
15096         (MonoDebugSourceLocation): New public struct.
15098         * mono-debug.c
15099         (mono_debug_source_location_from_address): Removed.
15100         (mono_debug_source_location_from_il_offset): Removed.
15101         (mono_debug_il_offset_from_address): Removed.
15102         (mono_debug_address_from_il_offset): Removed.
15103         (mono_debug_lookup_method): New public function.
15104         (mono_debug_lookup_source_location): New public function; replaces
15105         the old mono_debug_source_location_from_*() functions; see the
15106         inline documentation.
15107         (mono_debug_free_source_location): New public function.
15108         (mono_debug_print_stack_frame): New public function; see the
15109         inline documentation.
15111         * debug-mono-symfile.c
15112         (mono_debug_find_source_location): Renamed into
15113         mono_debug_symfile_lookup_location(); only take a
15114         `MonoDebugMethodInfo *' and an `offset' argument; added inline
15115         documentation.
15116         (mono_debug_find_method): Renamed into
15117         mono_debug_symfile_lookup_method().
15119 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
15121         * assembly.c (mono_assembly_open_full): Dont overwrite the status
15122         returned by mono_image_open_full ().
15124         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
15125         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
15126         #78517.
15128         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
15129         #78518.
15131 2006-05-27  Miguel de Icaza  <miguel@novell.com>
15133         * class.c (mono_class_from_typeref): handle missing images
15134         earlier, deals with bug #78418.   Refactor code; 
15136         Fix a warning introduced in my previous commit (some stale code
15137         from before I revisited my patch).
15139         * class.c (mono_class_create_from_typedef): On failure, remove the
15140         class from the MonoImage->class_cache as the class is not
15141         initialized;   Fixes the leak pointed out by Paolo.
15143 2006-05-25  Dick Porter  <dick@ximian.com>
15145         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
15146         DeleteCriticalSections until I figure out which one may still be
15147         sometimes locked when mono_thread_cleanup is called.
15149 2006-05-24  Dick Porter  <dick@ximian.com>
15151         * threads.c (mono_thread_cleanup): Move the threading cleanup out
15152         of mono_thread_manage and back into its own function, so it can be
15153         called after the finalizer thread has finished.
15155         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
15157 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
15159         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
15160         Fixes #78495.
15162         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
15163         with non-blittable elements.
15164         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
15166 2006-05-24  Martin Baulig  <martin@ximian.com>
15168         * mono-debug-debugger.h (MonoDebuggerEvent): Added
15169         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
15171         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
15172         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
15173         `mono_debugger_event_handler' to NULL.
15175 2006-05-24  Martin Baulig  <martin@ximian.com>
15177         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
15179 2006-05-24  Martin Baulig  <martin@ximian.com>
15181         * mono-debug-debugger.h
15182         (mono_debugger_create_notification_function): Added
15183         `MonoCodeManager *' argument.
15185 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
15187         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
15189 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
15191         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
15192         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
15193         implementation.
15195 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
15197         * icall.c: precise GC support: objects can't be stored in unmanaged
15198         memory anymore, even if they are kept alive by other references: since
15199         they can move the GC needs to be able to always find them.
15201 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
15203         * object.c: precise GC support for static fields. Support
15204         for moving GCs: write barriers and pinned allocation for interned
15205         strings.
15207 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
15209         * domain.c, domain-internals.h: precise GC support for the MonoDomain
15210         structure.
15212 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
15214         * class.c, gc.c: sgen and precise GC updates.
15216 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
15218         * marshal.h, marshal.c: added write barrier wrapper and precise type
15219         fixes.
15221 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
15223         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
15224         support.
15226 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
15228         * reflection.c: precise and sgen GC updates.
15230 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
15232         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
15234 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
15236         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
15238 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
15240         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
15241         MONO_TYPE_OBJECT. Fixes #78462.
15243 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
15245         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
15246         and blittable types.
15248 2006-05-17  Miguel de Icaza  <miguel@novell.com>
15250         * class.c (mono_class_get_exception_for_failure): Implement parts
15251         of a TODO: if the loader error is set (instead of the class
15252         error), we return a Loader exception that can be properly thrown
15253         elsewhere.
15255         This was exposed by some Winforms 2.0 code that I tried to run
15256         (Atsushi pointed me to it).
15258 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
15260         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
15261         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
15262         
15263         * marshal.c (emit_marshal_vtype): Add limited support for 
15264         UnmanagedType.LPStruct. Fixes #78427.
15266         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
15267         Applied a patch from kangaroo to fix #77523.
15269 2006-05-17  Martin Baulig  <martin@ximian.com>
15271         * threads.c
15272         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
15273         (debugger_thread_created): Removed.
15274         (debugger_thread_exited): Removed.
15276 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
15278         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15280         * object-internals.h (MonoReflectionResource): Sync with managed version.
15282 2006-05-12  Wade Berrier <wberrier@novell.com>
15284         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
15286 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
15288         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
15289         functions try to allocate from the image mempool.
15291 2006-05-12  Dick Porter  <dick@ximian.com>
15293         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
15295 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
15297         * object.c: The FieldGetter and FieldSetter methods require the full
15298         name of the class, not only the name. Fixes bug #78277.
15300 2006-05-11  Miguel de Icaza  <miguel@novell.com>
15302         * loader.c (method_from_memberref): Do not pass the NULL klass to
15303         mono_loader_set_error_() methods.  Pass the non-NULL value
15304         (class). 
15306 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
15308         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
15309         (mono_assembly_close): Null out assembly->image->references after freeing it.
15311         * image.c (mono_image_close): Free image->references.
15312         
15313         * reflection.c (mono_image_basic_init): Fix a small memory leak.
15315 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
15317         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
15318         before checking if it's NULL (g_assert).
15320 2006-05-10  Martin Baulig  <martin@ximian.com>
15322         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
15323         I thought I already killed that two months ago, but now it somehow reappeared.
15325 2006-05-10  Martin Baulig  <martin@ximian.com>
15327         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
15329 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
15331         * reflection.c: Allocate memory for dynamically created methods in the image
15332         mempools.
15334 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
15336         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
15337         don't use the ad pointer before checking if it's NULL (g_assert).
15339 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
15341         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
15342         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
15344         * marshal.c: Allocate all signatures from mempools.
15346         * marshal.c: Allocate some more signatures from mempools.
15348 2006-05-09  Miguel de Icaza  <miguel@novell.com>
15350         * object.c (mono_load_remote_field): The code used to provide a
15351         temporary variable for returning results if the user did not
15352         provide a result pointer.  But our temporary variable was allocted
15353         on the satck.
15355         Fix calling code to always pass a result area.   Coverity ID 103.
15357 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
15359         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
15360         value, not the old. Fixes #78312.
15361         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
15363         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
15364         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
15365         per-image cache.
15367         * assembly.c (mono_assembly_close): Free image->references.
15369         * assembly.c (mono_assembly_names_equal): Fix a warning.
15370         (mono_assemblies_cleanup): Cleanup more global data.
15372         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
15374         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
15375         ptr_cache and image->modules.
15377         * image.c (mono_image_init): Allocate array_cache lazily.
15378         
15379 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15381         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
15382         behavior was changed recently and has bad side effects.
15384 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
15386         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
15387         
15388         * assembly.c (mono_assembly_close): Remove a debug printf.
15390         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
15392         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
15393         to also allow for temporary references between mono_image_open ()/close ().
15395         * domain.c (get_runtimes_from_exe): Add a FIXME.        
15397 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
15399         * marshal.c: Fix support for dynamic methods.
15401         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
15403         * marshal.c (mono_marshal_cleanup): New cleanup function.
15405         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
15406         image mempools.
15408         * class.c (mono_class_init): Fix leaking class->nested_classes.
15410         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
15412         * image.c (mono_image_init): Initialize the new cashes.
15414         * image.c (mono_image_close): Destroy the new cashes.
15416         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
15418         * mempool.c (mono_mempool_strdup): New helper function.
15420         * class-internals.h: Add prototype for mono_loader_unlock ().
15422         * domain.c (mono_jit_info_table_find): Fix a warning.
15423         (mono_debugger_check_runtime_version): Ditto.
15425         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
15426         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
15427         functions to these modules.
15429         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
15430         metadata modules.
15431         
15432         * marshal.c (mono_free_bstr): Fix a warning.
15434         * assembly.c (mono_assembly_open_full): Fix another small leak.
15436         * object.c: Fix some unload leaks in the remoting code.
15438         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
15439         function.
15441         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
15443         * reflection.c: Fix some unload leaks in dynamic assemblies.
15445 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
15447         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
15448         * marshal.h: Add BSTR support on Win32
15449         * icall.c: Add BSTR icalls
15450         * metadata.h: Add BSTR enums
15452 2006-04-28  Miguel de Icaza  <miguel@novell.com>
15454         Work to catch the crash from #76795 and turn it into an
15455         exception.   As I stubbed out pieces of the VisualBasic support,
15456         I found a number of places where the code was failing and I added
15457         checks to those places. 
15458         
15459         * metadata.c (do_mono_metadata_parse_generic_class): Make this
15460         function return a status code.  If we fail to parse the signature
15461         from mono_metadata_parse_generic_inst, return FALSE.
15463         * loader.c (mono_get_method_from_token): If we fail to load the
15464         method (mono_class_get) return NULL.   
15466         * (method_from_memberref): Return NULL if we are unable to parse
15467         the method signature
15469         (mono_loader_error_prepare_exception): Since we now use the
15470         loader_error flag internally to stop processing, and obtaining
15471         exceptions that might be thrown will walk this code path the
15472         proper way of going from a MonoLoaderError into a
15473         MonoException was convoluted.   This new routine encapsulates the
15474         process of turning the error into an exception and *clearing* the
15475         error afterwards.
15476         
15477 2006-04-27  Miguel de Icaza  <miguel@novell.com>
15479         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
15480         with missing assemblies), and to cope with:
15482                 * Missing fieldref from a non-existing assembly.
15483                 * Missing methodref from a non-existing assembly.
15485         The first batch of work to address *some* of the issues from 76661.
15486         
15487         * object.c (mono_class_create_runtime_vtable): If we fail to
15488         initialize the class raise the exception here. 
15490         * metadata.c (mono_class_get_overrides_full): If any methods fail
15491         to load return the failure to the caller.
15493         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
15494         flagging assemblies that failed to load.   
15496         Do not crash if we are unable to load the assembly.
15498         (mono_assembly_close): Do nothing with REFERENCE_MISSING
15499         assemblies. 
15501         * loader.c (mono_loader_set_error_type_load): Change the
15502         convention to always pass unallocated strings, so we make our own
15503         copies (I know our own code had duplicated strings before, but
15504         this keeps the normal conventions).
15505         (method_from_memberref): Call mono_loader_set_error_method_load
15506         for all possible failures of loading the class. 
15507         Remove assert, turn into a loader error.
15509         (mono_loader_error_to_exception): Move this routine from mini
15510         (mini_loader_error_to_exception) there was no need to have that in
15511         mini. 
15513         * class.c (mono_class_from_typeref): If we were not able to load
15514         the assembly with mono_assembly_load_reference, call the
15515         mono_loader_set_error_type_load to register the problem.
15517         (mono_class_setup_fields): If we fail to load the type from
15518         mono_metadata_parse_type_full, call mono_class_set_failure and
15519         break from the loop.
15521         If class->exception_type is set, we do not layout the fields as
15522         that might crash the runtime, and instead return (from breaking
15523         from the previous loop).
15525         (mono_class_setup_vtable): This now returns a boolean indicating
15526         whether the table was properly setup.   The decision is driven by
15527         mono_class_get_overrides_full which might run into non-existing
15528         methods. 
15529         
15530         (mono_class_init): Returns TRUE on success or FALSE if there was a
15531         problem in loading the type (incorrect assemblies, missing
15532         assemblies, methods, etc).
15534         When we call mono_class_setup_fields we also check for a potential
15535         error inside this call (either a class exception or a general
15536         loader exception).
15538         (mono_class_create_from_typedef): If the parent fails to load
15539         (calling mono_class_get_full) return NULL.
15540         
15541         ** Important **
15543         calls to mono_metadata_parse_type_full should be checked
15544         everywhere and set the mono_class_set_failure
15545         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
15547         The current patch checks the places where my manually constructed
15548         tests show the errors are showing up, but we should do it
15549         everywhere. 
15551         ** Important2 **
15553         mono_class_init return values should be tested everywhere, like
15554         the previous case this is something that we should audit
15555         everywhere and not only on the cases exposed by the tests I
15556         created. 
15558 2006-04-26  Miguel de Icaza  <miguel@novell.com>
15560         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
15561         boolean parameter and instead pass the information on `options'
15562         parameter (FileOptions).
15564         * icall.c: Register the new signature for MonoIO.Open.
15566         * debug-helpers.c (dis_one): Trying to understand how coverity
15567         works.  Fix Run 5, item 78.
15569 2006-04-26  Dick Porter  <dick@ximian.com>
15571         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
15572         dereference.
15574 2006-04-25  Martin Baulig  <martin@ximian.com>
15576         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
15578         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
15579         debugger_thread_created().
15580         (debugger_gc_push_all_stacks): Don't handle the main thread in any
15581         special way.
15582         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
15583         (mono_debugger_finalize_threads): New function; undo the effects
15584         of mono_debugger_init_threads().
15585         (mono_debugger_create_all_threads): Removed.
15587 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
15589         * image.c (mono_image_close): Tidy up trace messages.
15591         * assembly.c (mono_assembly_close): Ditto.
15593         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
15594         no longer references an already freed assembly. Fixes #78168.
15596 2006-04-21  Dick Porter  <dick@ximian.com>
15598         * threads.c (mono_thread_detach): Fix reference counting when
15599         detaching threads.
15601 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
15603         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
15604         #78155.
15606 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
15608         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
15609         (mono_type_to_stind): Ditto.
15611         * marshal.c: Use the new helper functions to simplify code.
15613         * image.c (mono_image_close): Add some code for help debug assembly unloading
15614         problems.
15616         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
15617         image mempool.
15619         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
15620         assembly was already loaded in another appdomain. Fixes #78083.
15622 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
15624         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
15625         referenced assemblies.
15626         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
15628         * domain.c (mono_domain_free): Add a trace message.
15630         * appdomain.c (add_assemblies_to_domain): Ditto.        
15632         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
15633         field.  
15635 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
15637         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
15639 2006-04-12  Martin Baulig  <martin@ximian.com>
15641         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
15642         `USE_INCLUDED_LIBGC'.   
15644 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
15646         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
15647         the patch contains ../ and a small directory name later. Hopefully fixes
15648         #78035.
15650 2006-04-10  Martin Baulig  <martin@ximian.com>
15652         Clean up the debugger's thread-handling code.
15654         The debugger's thread-handling code has been moved from
15655         ../mini/debug-debugger.c to threads.c.  We now iterate directly
15656         over the `threads' hash, keep track of exiting threads and also
15657         use proper locking.
15659         We can now debug XSP and XSP based applications with the debugger.
15661         * object-internals.h (MonoThread): Added `gpointer end_stack'.
15663         * threads.h
15664         (MonoThreadCallbacks): Removed; this was only used by the debugger.
15665         (mono_install_thread_callbacks): Likewise.      
15667         * threads.c (mono_thread_callbacks): Removed.
15668         (debugger_thread_created, debugger_thread_exited): New static functions.
15669         (start_wrapper): Call debugger_thread_created().
15670         (thread_cleanup): Call debugger_thread_exited().
15671         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
15672         (mono_debugger_init_threads): New public function.
15673         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
15674         iterate directly over the `threads' hash and also use proper locking.
15676         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
15678         * mono-debug-debugger.h
15679         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
15681 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
15683         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
15684         argument type=array. Fixes #78057.
15686 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
15688         * culture-info-table.h : regenerated. Fixed bug #69652.
15690 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
15692         * loader.c metadata.c: Reapply a variant r59116.
15693         
15694         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
15696         * class.c (mono_class_setup_interface_offsets): New internal function.
15698         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
15699         interfaces too. Fixes #77398.
15701         * reflection.c (encode_cattr_value): Add support for 
15702         parameter type=object, argument type=array.
15703         (load_cattr_value): Ditto. Fixes #77916.
15705         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
15706         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
15708         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
15709         a byval char array and CharSet is Ansi.
15711         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
15713 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
15715         * metadata.c: Add some locking comments.
15716         
15717         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
15718         mempool.
15719         (mono_metadata_free_method_signature): Don't free the signature itself.
15721         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
15723         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
15724         reference the same MonoImage.
15725         (mono_assembly_load_from_full): Add an assert.
15727 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
15729         * image.c (mono_image_close): Don't put the image we are about to free into the
15730         loaded_images_guid_hash.
15732         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
15733         to reduce code duplication.
15735         * marshal.c: Register the native functions called by this module as icalls, to
15736         somewhat centralize the creation of MonoMethodSignature's.
15738         * loader.c (mono_method_signature): Add a cache for method signatures.
15740         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
15741         the parameter attributes of a method.
15742         (mono_metadata_parse_method_signature_full): Refactored the computation of
15743         parameter attributes into a separate function. Also avoid one allocation in
15744         most cases.
15746         * assembly.c (mono_assembly_close): Ditto.
15748         * image.c (mono_image_close): Log trace messages with INFO level.
15750         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
15752         * image.c reflection.c: Correct reference counting of image modules.
15753         
15754         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
15755         of this function from the image mempool.
15756         
15757         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
15758         to allow more cached types to be used.
15760         * mono-debug.c (mono_debug_add_method): Appled patch from
15761         David S. Miller  <davem@sunset.davemloft.net>: Access 
15762         minfo->lexical_blocks[] entry elements using read32().
15764 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
15766         * loader.c (mono_free_method): No longer free the method header for non-dynamic
15767         methods as it is allocated from the mempool.
15769         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
15770         image mempool.
15772         * metadata-internals.h: Add comments describing the reference counting scheme
15773         used for MonoImage and MonoAssembly.
15775         * image.c assembly.c reflection.c: Rework reference counting of images and 
15776         assemblies so they are freed when the runtime is shut down. Free some 
15777         additional memory structures when an image is unloaded.
15778         
15779 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
15781         * class.c loader.c reflection.c: Allocate more data structures in
15782         the image mempool.
15784 2006-03-31  Miguel de Icaza  <miguel@novell.com>
15786         * icall.c
15787         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
15788         build on pre glib 2.4 systems.
15790 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
15792         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
15794         * icall.c: Fix some warnings.
15796 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
15798         * culture-info-table.h : regenerated.
15800 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
15802         * threads.c, object-internals.h, verify.c: changed the culture caching
15803         code to use a normal MonoArray for storage so the GC can keep track of
15804         them easily. Fixed bits of the cache logic, too and simplified the
15805         code.
15807 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
15809         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
15810         thread for non-Boehm GCs.
15812 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
15814         * domain.c, object.c, domain-internals.h: reduce the amount of memory
15815         needed to keep track of the data for static fields.
15817 2006-03-29  Raja R Harinath  <rharinath@novell.com>
15819         Fix #75172
15820         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
15821         for interface classes.  Use 'num_methods' instead.
15822         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
15823         before using '->vtable_size' field.
15825 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
15827         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
15828         doesn't contain managed pointers, so use a normal hashtable.
15830 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
15832         * reflection.c, class-internals.h, domain.c: fixed handling of types
15833         used as values for objects in custom attributes (bug #77915):
15835 2006-03-24  Martin Baulig  <martin@ximian.com>
15837         * class.c (mono_class_setup_fields): Added support for generic
15838         instances; fixes #77580.
15840 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15842         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
15844 2006-03-24  Dick Porter  <dick@ximian.com>
15846         * file-io.c (get_file_attributes): More stat macro breakage.
15847         Fixes bug 77759.
15849 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
15851         * profiler.c: added the file=filename option in the default profiler
15852         to output the profile data to filename.
15854 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15856         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
15857         bug #77877.
15859 2006-03-22  Martin Baulig  <martin@ximian.com>
15861         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
15862         allocated `MonoClassField *' in `fb->handle'.
15864 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
15866         * class.c, image.c, metadata-internals.h: implemented new mechanism to
15867         allocate interface ID to save memory and allow better ID reuse on
15868         appdomain unload. setup_generic_vtable () removal from Martin.
15870 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
15872         * object.h, appdomain.c, domain.c, exception.c, icall.c,
15873         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
15874         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
15875         write barriers for reference stores with managed objects accessed with
15876         C structures in the runtime and in embedding programs.
15878 2006-03-20  Raja R Harinath  <rharinath@novell.com>
15880         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
15881         'interface_id' and 'max_interface_id' fields of MonoClasses
15882         representing open generic types.
15884 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
15886         * object.h, object.c, icall.c: added functions to deal with
15887         storing valuetypes that contain references in managed objects.
15888         * reflection.c, string-icalls.c, threads.c, marshal.c: small
15889         fixes and comments around uses of mono_array_addr ().
15891 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
15893         * object.h, icall.c, monitor.c: object.GetHashCode ()
15894         implementation that supports the moving garbage collector.
15896 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
15898         * icall.c, threads-types.h, threads.c: implemented finalizer for
15899         LocalDataStoreSlot.
15901 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
15903         * metadata.c (mono_type_size): Add a fixme.
15904         (mono_type_stack_size): Ditto.
15906         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
15907         'type_forwarders' field.
15909         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
15910         attribute from net 2.0.
15912         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
15913         from class.c.
15915         * class.c (mono_class_setup_fields): Fix a warning.
15916         
15917         * class.c (mono_class_from_name): Add support for assemblyref entries
15918         in the EXPORTEDTYPE table.
15920         * reflection.c: Add support for handling type forwarders under net 2.0.
15922         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
15923         
15924 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
15926         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
15927         overwriting entries in ModuleBuild->types, also clean up the code
15928         a little. Fixes #77774.
15930 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
15932         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
15933         load friend assembly info when present.
15935 2006-03-14  Raja R Harinath  <rharinath@novell.com>
15937         Fix crasher on gtest-158.cs.
15938         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
15939         the return value if the MonoClass we want is yet in an
15940         inconsistent state.
15941         * class.c (mono_class_create_from_typedef): Add an comment
15942         explaining an order dependency between mono_class_setup_parent and
15943         mono_class_setup_mono_type.
15945 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
15947         * class.c: documentation updates and events bug fix.
15949 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
15951         * class.c: some cleanup, locking fixes.
15953 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15955         * class.c: fix the generics code to setup nested
15956         type info to the instantiated type (bug #77770).
15958 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
15960         * marshal.c: fixed a few type correctness issues.
15962 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15964         * loader.c: the Set/Get/Addrtess array methods should be public.
15966 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
15968         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
15969         
15970         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
15971         info->wrapper.
15973 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
15975         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
15977         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
15979         * mempool.c (mono_mempool_alloc): Speed this up a bit.
15980         (mono_mempool_alloc0): Ditto.
15982 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15984         * socket-io.c:
15985         (create_object_from_sockaddr): it was allocating 4 extra bytes
15986         for the AF_UNIX data. Fixes bug #77747.
15988 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
15990         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
15992 2006-03-09  Dick Porter  <dick@ximian.com>
15994         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
15995         Fixes bug 76966 again.
15997 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
15999         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
16000         names from r57532
16001         * appdomain.c: Bumped corlib version to 48 (due to r57532)
16003 2006-03-07  Martin Baulig  <martin@ximian.com>
16005         * object.c
16006         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
16008 2006-03-07  Martin Baulig  <martin@ximian.com>
16010         * class.c
16011         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
16012         regression introduced in r56970; see gtest-252.cs.
16014         * loader.c (mono_get_method_constrained): Correctly handle generic
16015         methods; see gtest-253.cs.
16017 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
16019         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
16021 2006-03-04  Martin Baulig  <martin@ximian.com>
16023         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
16024         compute the parent type at runtime, just like we're already doing
16025         it for interfaces.
16027         * reflection.c
16028         (mono_reflection_bind_generic_parameters): Don't compute the
16029         parent type anymore.
16031         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
16033 2006-03-04  Martin Baulig  <martin@ximian.com>
16035         * mono-debug-debugger.h
16036         (mono_debugger_create_notification_function): Allocate memory at
16037         runtime and return a pointer to it.
16039 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
16041         * assembly.c: Fix windows build.
16042         
16043         * assembly.c: Fix build.
16045         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
16047         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
16048         
16049 2006-03-03  Dick Porter  <dick@ximian.com>
16051         * process.c
16052         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
16053         Check parameters before dereferencing them.  Fixes Aaron's part of
16054         bug 77393.
16056 2006-03-03  Raja R Harinath  <rharinath@novell.com>
16058         Fix performance regression.
16059         * loader.c (find_method_in_class): Add 'from_class' argument.
16060         Rename 'klass' argument to 'in_class'.  The signature is compared
16061         against the method in 'in_class', and the corresponding method is
16062         returned from 'from_class'.
16063         (find_method): Walk both 'in_class' and 'from_class' in parallel.
16064         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
16065         type definition and generic instantiation in parallel.
16066         (mono_get_method_constrained): Update to changes.
16068 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16070         * threads.c: make sure the domain is correct, too when doing
16071         mono_thread_attach ().
16073 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
16075         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
16076         windows. Fixes #77683.
16078 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
16080         * object.h, *: introduced specific way to set elements of an array
16081         of references to be used as write barrier. Still need to audit the
16082         uses of mono_array_addr.
16084 2006-03-01  Miguel de Icaza  <miguel@novell.com>
16086         * object-internals.h: New field to cache the assmebly name, patch
16087         from Tambet Ingo (tambet@ximian.com)
16089 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
16091         * decimal.h, class-internals.h, metadata-internals.h,
16092         file-io.h: mark a few function declarations as internal, to
16093         reduce the number of PLT entries.
16095 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16097         * file-io.c: fix typo in warning message.
16099 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
16101         * loader.c: on unix, lookup the "*A" version of a function
16102         if charset is auto as a second option before failing.
16104 2006-02-28  Raja R Harinath  <rharinath@novell.com>
16106         * class.h (mono_class_inflate_generic_method): Revert to two
16107         argument version.
16108         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
16109         (mono_class_inflate_generic_method_full): Add.
16110         * class.c (mono_class_inflate_generic_method_full): Rename from
16111         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
16112         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
16113         * loader.c, reflection.c: Update to changes.
16115 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
16117         * icall.c: const fixes and small improvements.
16119 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16121         * threadpool.c: for asynchronous connect(), enable the same workaround
16122         for BSD 6 as for the Mac. Fixes bug #77637.
16124 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
16126         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
16127         formatted classes. Fixes #77524.
16129 2006-02-24  Raja R Harinath  <rharinath@novell.com>
16131         * class.c (inflate_generic_type): Add a couple more
16132         micro-optimizations.
16133         (inflate_generic_context): Don't use the 'gmethod' from
16134         'inflate_with'.
16135         (mono_class_inflate_generic_method): If the method has generic
16136         parameters, but the passed-in context doesn't have a 'gmethod',
16137         create one.  Use the possibly simplified generic instantiation
16138         from the declaring class instead of the one passed in.
16140 2006-02-24  Raja R Harinath  <harinath@gmail.com>
16142         Make generic method signature and method header handling lazy.
16143         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
16144         (inflate_generic_header): Likewise.
16145         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
16146         parameter to avoid inflating types.
16147         (mono_get_inflated_method): Empty out.
16148         * class.h (mono_class_inflate_generic_method): Update to changes.
16149         * loader.c (mono_get_method_from_token): Don't parse signature for
16150         generic methods, nor methods of generic classes.
16151         (mono_method_signature): Rename from 'mono_method_signature'.
16152         Inflate signature on demand.
16153         (mono_method_get_header): Inflate method header on demand.
16154         * reflection.c: Update to changes.
16156 2006-02-23  Raja R Harinath  <rharinath@novell.com>
16158         * metadata.c (mono_metadata_inflate_generic_inst): If the
16159         instantiation is closed, don't bother expanding it in the new
16160         context.
16161         * class.c (inflate_generic_class): If the generic instantiation
16162         doesn't change after inflation, return the argument itself.
16163         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
16164         Add bounds checks.
16165         (inflate_generic_context): If neither the generic class nor the
16166         generic method instantiations change, return the original context.
16167         * reflection.c (mono_method_get_object): Do
16168         'mono_get_inflated_method' before accessing the ->klass field.
16169         (inflate_mono_method): Don't create a MonoGenericMethod unless
16170         necessary.
16171         (inflate_method): Don't pass a constructed type as the declaring
16172         type of a methodbuilder.
16174 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
16176         * object.c: fix memory overwrite.
16178 2006-02-22  Dick Porter  <dick@ximian.com>
16180         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
16181         it doesn't work any more.
16182         (mono_threads_request_thread_dump): Fix unused variable warnings.
16184 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16186         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
16187         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
16188         the public header file.
16190 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
16192         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
16194 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16196         * class-internals.h, object.c: reduce the size of MonoVTable
16197         and store the interface_offsets array at negative offsets.
16199 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
16201         * metadata.c: tweak table descriptors data structures to reduce
16202         size and runtime relocations.
16204 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16206         * marshal.c: fix some types and opcodes to be type-safe
16207         in marshaling wrappers.
16209 2006-02-21  Ankit Jain  <jankit@novell.com>
16211         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
16213 2006-02-21  Raja R Harinath  <rharinath@novell.com>
16215         * metadata.c (get_constraints): Relax debugging checks for monodis.
16217 2006-02-21  Ankit Jain  <jankit@novell.com>
16219         * metadata.c (mono_metadata_load_generic_params): Move the code
16220         checking for ambiguous generic params from here to mono/dis/get.c
16221         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
16223 2006-02-21  Raja R Harinath  <harinath@gmail.com>
16225         Fix assertion triggered when compiling nemerle.
16226         * class.c (mono_get_shared_generic_inst): Rename from
16227         get_shared_inst and make non-static.
16228         * loader.c (mono_get_shared_generic_method): New.  Used to create
16229         the MonoGenericContext-equivalent of a MonoGenericContainer.
16230         (mono_get_method_from_token): Initialize the 'context' field of
16231         the created MonoGenericContainer.
16232         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
16233         * metadata.c (get_constraints): Add sanity check.
16234         * class-internals.h: Add new internal methods.
16236         * reflection.c (verify_safe_for_managed_space): New sanity check.
16237         Currently checks that owner-less generic parameters aren't allowed
16238         in managed space.
16239         (mono_type_get_object): Use it.
16240         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
16241         that are now in mono_type_get_object.
16242         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
16244 2006-02-19  Raja R Harinath  <harinath@gmail.com>
16246         * metadata.c (mono_type_create_from_typespec): Rename from
16247         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
16248         argument and caching of types in the generic container.
16249         (unwrap_arrays, find_generic_param): Remove.
16250         * metadata-internals.h: Update.
16251         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
16253 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
16255         * class.c (mono_class_get_exception_for_failure): Fix a warning.
16257         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
16258         return values. Fixes #77581.
16260         * class.c (mono_fnptr_class_get): Switch name and name_space.
16262         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
16263         classes and add support for [In, Out] attributes.
16264         (mono_marshal_free_asany): Ditto. Fixes #77524.
16266 2006-02-18  Raja R Harinath  <harinath@gmail.com>
16268         * class.c (mono_class_from_generic_parameter): Make more robust to
16269         incomplete MonoGenericContainers from monodis.
16271 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16273         * class-internals.h: added some more exception types.
16274         * class.c, metadata.c: added a few checks to handle missing
16275         types.
16277 2006-02-17  Raja R Harinath  <rharinath@novell.com>
16279         Use owner-less generic-params some more.
16280         * class.c (my_mono_class_from_generic_parameter): Remove.
16281         (mono_class_from_generic_parameter): Handle null image,
16282         param->name and param->owner.
16283         (mono_class_from_mono_type): Update.
16284         (mono_class_create_from_typespec): Remove 'container' parameter.
16285         If that parameter is non-null, the result is always inflated by
16286         'mono_class_get_full' anyway.
16287         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
16288         parameter.
16289         (mono_class_get_full): Update.
16291         * class.c (inflate_generic_type) [GENERICINST]: If the generic
16292         instance is not open, don't bother inflating.
16293         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
16294         parse metadata for inflated classes.
16295         (_mono_class_get): Change GenericContext* parameter to
16296         GenericContainer*.
16297         (mono_class_create_from_typespec): Likewise.  Simplify, and
16298         implement trivially.  All the cases are handled in
16299         mono_class_from_mono_type.  Don't inflate returned class.
16300         (mono_class_get_full): Delegate GENERICINST optimization to
16301         inflate_generic_type.
16302         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
16304 2006-02-16  Dick Porter  <dick@ximian.com>
16306         * socket-io.c (create_object_from_sockaddr): Fix typo.
16307         (create_sockaddr_from_object): Check array lengths before
16308         potentially accessing items off the end.
16309         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
16310         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
16311         (ves_icall_System_Net_Sockets_Socket_Send_internal)
16312         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
16313         length checks to avoid wraparound overflows.
16314         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
16315         contents of the array of sockets
16316         (hostent_to_IPHostEntry2)
16317         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
16318         Check return value of inet_ntop ().
16319         (addrinfo_to_IPHostEntry): Fix typo
16321 2006-02-16  Raja R Harinath  <rharinath@novell.com>
16323         Type metadata parsing doesn't use generic-instantiation information.
16324         * metadata.c (mono_metadata_parse_array_full): Change
16325         MonoGenericContext* parameter to MonoGenericContainer*.
16326         (mono_metadata_parse_type_full): Likewise.
16327         (mono_type_create_from_typespec_full): Likewise.
16328         (mono_metadata_parse_mh_full): Likewise.
16329         (mono_metadata_parse_generic_inst): Likewise.
16330         (do_mono_metadata_parse_generic_class): Likewise.
16331         (do_mono_metadata_parse_type): Likewise.
16332         * metadata-internals.h: Update to changes.
16333         * class.c (mono_class_find_enum_basetype): Likewise.
16334         (mono_class_setup_fields): Likewise.
16335         (mono_class_create_from_typespec): Likewise.
16336         * loader.c (method_from_methodspec): Likewise.
16337         (mono_get_method_from_token): Likewise.
16338         (mono_method_get_header): Likewise.
16340 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16342         * marshal.c: handle additional GENERICINST case (patch from
16343         Thong Nguyen <tum@veridicus.com>).
16344         Fix a few cases where LDIND_I/STIND_I was used for references.
16346 2006-02-16  Raja R Harinath  <rharinath@novell.com>
16348         * reflection.c (mono_reflection_get_token): Remove unused variable.
16350 2006-02-16  Martin Baulig  <martin@ximian.com>
16352         * reflection.c (mono_reflection_get_token): Add support for fields
16353         in instantiated generic types.
16355         * icall.c
16356         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
16358 2006-02-15  Martin Baulig  <martin@ximian.com>
16360         * icall.c
16361         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
16362         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
16363         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
16364         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
16366 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16368         * class.c, metadata.c, metadata.h, object.c, icall.c,
16369         marshal.c: changed mono_type_get_underlying_type () to do
16370         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
16371         Fixed handling of instantiated generic valuetypes (bug #75479).
16373 2006-02-15  Raja R Harinath  <rharinath@novell.com>
16375         * metadata.c (mono_metadata_decode_signed_value): Simplify.
16376         Delegate to mono_metadata_decode_value, and work on the returned value.
16378         * icall.c (ves_icall_MonoType_GetGenericArguments):
16379         Add consistency check here too.
16380         
16381 2006-02-15  Ankit Jain  <jankit@novell.com>
16383         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
16384         char/short etc.
16386 2006-02-15  Ankit Jain  <jankit@novell.com>
16388         * metadata.c (mono_metadata_decode_signed_value): New function to decode
16389         signed values, used only for representing lower bounds of arrays.
16390         (mono_metadata_parse_array_full): Use new
16391         mono_metadata_decode_signed_value to decode lower bounds.
16393 2006-02-14  Martin Baulig  <martin@ximian.com>
16395         * reflection.c
16396         (mono_reflection_get_token): Support "MonoGenericMethod" and
16397         "MonoGenericCMethod" and allow generic instances / methods.
16399 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
16401         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
16402         to obtain the terminal size using an ioctl.
16404         * object.c (mono_nullable_init): Revert this as nullable reference
16405         types are not valid.
16406         (mono_nullable_box): Ditto.
16408 2006-02-09  Dick Porter  <dick@ximian.com>
16410         * threads.c (mono_thread_detach): Drop a reference to the thread
16411         we're detaching.
16413 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
16415         * object.c (mono_nullable_init): Handle nullable reference types.
16416         (mono_nullable_box): Ditto. Fixes #77446.
16418 2006-02-07  Martin Baulig  <martin@ximian.com>
16420         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
16422 2006-02-07  Ankit Jain  <jankit@novell.com>
16424         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
16425         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
16426         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
16427         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
16428         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
16429         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
16431 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
16433         * class.c (mono_class_create_generic): Set type_token as well.
16435         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
16436         compatible with MS.
16438 2006-02-02  Martin Baulig  <martin@ximian.com>
16440         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
16441         has never been used so far.
16443 2006-02-02  Martin Baulig  <martin@ximian.com>
16445         * mono-debug-debugger.h: Changed comment at the top of this file;
16446         the header is not installed, but it's safe to #include it from
16447         within the JIT.
16449         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
16450         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
16452 2006-02-02  Martin Baulig  <martin@ximian.com>
16454         * mono-debug.h
16455         (MonoSymbolTable): Removed the `metadata_info' field.
16457         * mono-debug.c
16458         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
16460         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16461         (mono_debugger_add_builtin_types): Removed.
16462         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
16463         (mono_debugger_create_notification_function): We now operate on a
16464         pre-allocated area; take a `gpointer' and return `void'.
16466         * mono-debug-debugger.c
16467         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
16468         (mono_debugger_add_builtin_types): Removed.
16470 2006-02-02  Martin Baulig  <martin@ximian.com>
16472         * threads.c (mono_debugger_create_all_threads): New public method.
16474 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16476         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
16477         breaks on several platforms.
16479 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
16481         * assembly.c: the VS.NET build doesn't supply default values for
16482         MONO_ASSEMBLIES and MONO_CFG_DIR.
16484 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
16486         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
16487         helper function.
16489         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
16491         * loader.c (method_from_memberref): Fix a warning.
16493         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
16495         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
16496         with explicit layout. Fixes #77433.
16498 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
16500         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
16501         max_interface_id is initialized before using it. Fixes #77398.
16502         (ves_icall_Type_GetInterfaces): Ditto.
16504 2006-01-30  Raja R Harinath  <rharinath@novell.com>
16506         * metadata.c (mono_metadata_parse_method_signature_full): Don't
16507         allocate memory for parameter attributes when parsing memberref
16508         signatures.
16509         * loader.c (mono_loader_set_error_method_load): Don't warn.
16510         (method_from_memberref): Ensure MissingMethodException gets thrown
16511         if method is not found.  Make warning more informative.
16513 2006-01-29  Raja R Harinath  <harinath@gmail.com>
16515         Fix #77397
16516         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
16517         return true if is byref.
16518         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
16519         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
16520         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
16522 2006-01-27  Raja R Harinath  <rharinath@novell.com>
16524         Fix tests/find-method.2.il
16525         * loader.c (find_method, find_method_in_class): Remove is_inflated
16526         argument.  Revert 2006-01-18 change.
16527         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
16528         is generic, search for method in its generic definition.
16529         * class.c (mono_class_setup_vtable_general): Print generic
16530         arguments of generic types in debugging printf.
16532 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
16534         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
16536         * threads.c (mono_threads_request_thread_dump): New helper function.
16538 2006-01-25  Raja R Harinath  <rharinath@novell.com>
16540         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
16542 2006-01-25  Ankit Jain  <jankit@novell.com>
16544         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
16545         move definition to ..
16546         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
16547         
16548 2006-01-25  Ankit Jain  <jankit@novell.com>
16549             Raja R Harinath  <rharinath@novell.com>
16551         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
16552         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
16553         as necessary.
16555 2006-01-25  Martin Baulig  <martin@ximian.com>
16557         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
16558         `MonoDebuggerThread' into debug-debugger.c.
16560 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
16562         * profiler.c: fix printing of data.
16564 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
16566         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
16567           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
16569 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16571         * object.c: fix deadlock related to string interning.
16573 2006-01-23  Martin Baulig  <martin@ximian.com>
16575         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16577         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
16579 2006-01-23  Martin Baulig  <martin@ximian.com>
16581         * mono-debug.h: Moved the prototypes of some functions which are
16582         used by the JIT here from mono-debug-debugger.h.
16584 2006-01-21  Martin Baulig  <martin@ximian.com>
16586         * Makefile.am: Don't install mono-debug-debugger.h.
16588 2006-01-21  Martin Baulig  <martin@ximian.com>
16590         * mono-debug-debugger.h: Enforce the private status of this header
16591         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
16592         Moved some stuff from mono-debugger-jit-wrapper.h here.
16594 2006-01-20  Raja R Harinath  <rharinath@novell.com>
16596         * class.c (mono_class_from_typeref): Add a sanity test to help
16597         catch lack of assembly load/search hooks.
16599 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
16601         * marshal.c (emit_struct_conv): Relax the fields with same offset
16602         check even more. Fixes #77230.
16604 2006-01-18  Martin Baulig  <martin@ximian.com>
16606         * loader.c (find_method_in_class): Added `gboolean is_inflated'
16607         argument; if false, we compare the uninstantiated signatures.
16608         (method_from_memberref): Compare the uninstantiated signatures;
16609         fixes #76417.
16611 2006-01-18  Robert Jordan  <robertj@gmx.net>
16613         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
16614         Clear the weak link. Fixes bug #77170.
16616         * gc.c (mono_gchandle_free):
16617         Reflect *-gc.c changes (tiny optimization).
16619 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
16621         * metadata.c (mono_metadata_signature_dup): Applied patch from
16622         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
16623         Fixes #77288.
16625 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
16627         * marshal.c (emit_struct_conv): Allow fields with the same offset when
16628         marshalling from native to managed code. Fixes #77230.
16630 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16632         * threadpool.c: fix problem (Mac only) when more than one asynchronous
16633         connect. Fixes bug #77020.
16635 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16637         * class.c: fixed id assignement for nested interfaces (bug #77275).
16638         Added also better info for --print-vtable debugging.
16640 2006-01-12  Martin Baulig  <martin@ximian.com>
16642         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
16643         interfaces on-the-fly; fixes #76625.
16645         * class-internals.h
16646         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
16647         don't need that anymore.
16649 2006-01-12  Miguel de Icaza  <miguel@novell.com>
16651         * socket-io.c
16652         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
16653         To avoid initing the nested_classes when not needed I turned the
16654         PeerCredData as a toplevel internal class, as it has to be shared
16655         anyways. 
16657         Fixes the CASA issue.
16659 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
16661         * domain.c: Accessors for MonoJitInfo
16663         * profiler-private.h: Add jitinfo to the end jit hook
16665         * profiler.[ch]: Define new hooks, called after jitting which give
16666         the MonoJitInfo that was compiled
16668 2006-01-10  Martin Baulig  <martin@ximian.com>
16670         * class.c (mono_class_setup_events): Add support for generic
16671         classes; fixes #76440.
16673 2006-01-06  Raja R Harinath  <rharinath@novell.com>
16675         Fix #77160.
16676         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
16677         on passed-in method.
16679 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
16681         * object.c (mono_runtime_invoke_array): Add Nullable support.
16683         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
16685 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
16687         * file-io.c: Don't consider sockets as directory and avoid an endless
16688         loop. Fix bug #76966.
16690 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
16692         * object.c (mono_nullable_init): New helper function.
16693         (mono_nullable_box): Ditto.
16695         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
16697         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
16699         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
16700         
16701 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
16703         * class.c (mono_class_is_assignable_from): Make T assignable to 
16704         Nullable<T>.
16706 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
16708         * appdomain.c: Bump corlib version to 46.
16709         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
16710         serialization purpose) and changed ves_icall_System_Reflection_
16711         Assembly_get_code_base signature to accept a boolean (to escape, or 
16712         not, the assembly code base).
16714 2005-12-23  Dick Porter  <dick@ximian.com>
16716         * icall.c: 
16717         * threads-types.h: 
16718         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
16719         CreateEvent icall now returns "created" boolean parameter.
16721 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
16723         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
16724         #76967.
16726         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
16727         when attr_klass is an interface. Fixes #77045.
16729 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
16731         * marshal.c (emit_struct_conv): Fix previous patch.
16732         
16733         * marshal.c (emit_struct_conv): Add a check for fields with the same
16734         offset.
16736 2005-12-20  Raja R Harinath  <rharinath@novell.com>
16738         Fix regression in Mono.C5.
16739         * class.c (mono_class_create_generic): If 'klass' is an interface
16740         set up the interface offsets.
16741         (mono_class_is_assignable_from): Don't throw away generic arguments.
16743 2005-12-19  Raja R Harinath  <rharinath@novell.com>
16745         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
16746         type parameters.
16748 2005-12-15  Raja R Harinath  <rharinath@novell.com>
16750         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
16751         dead store.
16752         (do_mono_metadata_parse_generic_class): Don't pass the current
16753         generic context when parsing the type being instantiated: it
16754         cannot use it, anyway.
16756         * loader.c (method_from_memberref): Don't inflate a signature if
16757         it doesn't contain any type parameters.
16759 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
16761         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
16763 2005-12-14  Martin Baulig  <martin@ximian.com>
16765         * class.c
16766         (mono_type_get_name_recurse): Don't return null for type
16767         parameters and open generic classes.
16768         (mono_class_setup_methods): Don't exclude generic instances.
16769         (mono_get_unique_iid): Use different IDs for different
16770         instantiations of the same generic type.
16771         (mono_class_setup_vtable): Only use setup_generic_vtable() for
16772         open generic instances; create a normal vtable for closed generic
16773         instances.
16774         (mono_class_setup_vtable_general): We're now also called for
16775         closed generic instances.
16777         * reflection.c
16778         (mono_reflection_bind_generic_parameters): Correctly use
16779         mono_metadata_lookup_generic_inst() everywhere.
16781 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
16783         * object.c (mono_class_create_runtime_vtable): Call 
16784         mono_class_setup_vtable ().
16786         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
16787         function.
16788         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
16789         #76959.
16791         * loader.c (mono_loader_set_error_type_load): Print the type load
16792         warnings to the console so they are more visible to the user.
16793         (mono_loader_set_error_method_load): Ditto.
16795         * reflection.c (ensure_runtime_vtable): Revert the last change as it
16796         is still broken.
16797         
16798         * reflection.c (ensure_runtime_vtable): Fix build.
16800         * reflection.c (ensure_runtime_vtable): Disable an optimization which
16801         doesn't work in all cases.
16803 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
16805         * object.c (mono_array_new_full): Treat a single dimensional array
16806         with 0 lower bounds as an szarray. Fixes #76973.
16808         * reflection.c (custom_attr_visible): Really fix this.
16810 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
16812         * reflection.c (custom_attr_visible): Allow nested public attributes
16813         as well.
16815         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
16816         interface check.
16818 2005-12-12  Raja R Harinath  <harinath@gmail.com>
16820         * class.c (set_generic_param_owner): Delete.
16821         (mono_class_create_from_typedef): Don't set ->owner field of
16822         generic parameters to "param containers" of enclosing classes.
16823         * reflection.c (mono_reflection_initialize_generic_parameter):
16824         Likewise.
16826 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
16828         * reflection.c (custom_attr_visible): Fix build.
16830 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
16832         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
16833         private attributes.
16834         
16835         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
16836         handling of null parameter defaults.
16838 2005-12-09  Raja R Harinath  <rharinath@novell.com>
16840         * class.c (mono_class_from_generic_parameter): Don't set
16841         klass->generic_container.
16842         (my_mono_class_from_generic_parameter): Likewise.
16844 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
16846         * reflection.c (load_public_key): Fix a warning.
16847         (method_encode_code): Fix unaligned accesses.
16849 2005-12-07  Martin Baulig  <martin@ximian.com>
16851         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
16853         * reflection.c
16854         (write_generic_param_entry): Encode our custom attrs.
16856         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
16858 2005-12-07  Martin Baulig  <martin@ximian.com>
16860         * reflection.c (encode_new_constraint): Removed; we don't use the
16861         `NewConstraintAttribute' anymore.
16863 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
16865         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
16866         not fire a TypeResolve event when Assembly.GetType () is called.
16868 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
16870         Beginning of support for nullable types in the runtime. Parts of
16871         this patch are from Martin.
16873         * appdomain.c (MONO_CORLIB_VERSION): Bump
16875         * domain.c (mono_init_internal): get the nullable type
16877         * class.c (mono_class_is_nullable): New method
16878         (mono_class_get_nullable_param): New mehod
16879         (mono_class_create_generic): In types T? set cast_class to T
16881         * class-internals.h (MonoDefaults): new nullable default class
16882         (mono_class_get_nullable_param, mono_class_get_nullable_param):
16883         new methods.
16885 2005-12-05  Raja R Harinath  <rharinath@novell.com>
16887         * metadata.c (select_container): New.  Refactor code to select the
16888         appropriate GenericContainer given the type of generic parameter
16889         we are looking for.
16890         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
16891         not a MonoGenericContext.  Use select_container.  Update parameters.
16892         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
16893         and MONO_TYPE_MVAR.
16894         (unwrap_arrays): Remove duplicate tests.
16895         (find_generic_param): Rename from 'has_same_context'.  Now walks a
16896         generic instantiated class to find any arguments that are generic
16897         parameters.
16898         (mono_type_create_from_typespec_full): Use find_generic_param to
16899         avoid evicting some generic instantiations from the typespec
16900         cache.
16902 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
16904         * reflection.c: fixed writing of doubles on ARM FPA.
16906 2005-12-02  Robert Jordan  <robertj@gmx.net>
16908         * icall.c: Fixed EventInfo.ReflectedType (#76829).
16910 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16912         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
16913         least on SUSE 10 they are not the same (on debian, they are just the
16914         same thing).
16916 2005-12-01  Raja R Harinath  <rharinath@novell.com>
16918         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
16919         DeclaringType for VARs and MVARs.
16920         * class.c (set_generic_param_owner): Fix initialization of owner
16921         fields.
16923 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
16925         * icall.c: fixed Enum.ToObject() to correctly convert the values.
16927 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16929         * threadpool.c: workaround for a bug that shows up on the Mac:
16930         select()+connect() on a blocking socket is not like it should
16931         be, so we proceed to connect() in that case, wasting the I/O
16932         threadpool thread until connect succeedes. Fixes bug #75436.
16934 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16936         * threadpool.c: fix typo when setting file descriptor states.
16938 2005-11-28  Raja R Harinath  <rharinath@novell.com>
16940         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
16941         * metadata.c (mono_metadata_parse_method_signature_full): Don't
16942         create a temporary signature container.
16943         (mono_metadata_parse_generic_param): Update to changes.
16944         (mono_type_create_from_typespec_full): Update to changes.
16945         * loader.c (method_from_memberref): Don't use a
16946         MonoGenericContainer while parsing a memberref signature.
16947         (method_from_methodspec): Remove dead-store of the 'container'
16948         variable.  It's overwritten before use.
16950         * metadata.c (mono_type_create_from_typespec_full): Make debugging
16951         checks tighter.
16952         (mono_metadata_parse_generic_param): Likewise.
16953         * loader.c (find_method_in_class): Does not need a
16954         MonoGenericContainer.  Use 'mono_method_signature' rather than
16955         'mono_method_signature_full'.
16956         (find_method, mono_get_method_constrained, method_from_memberref):
16957         Update to changes.
16959         * metadata.c (mono_type_create_from_typespec_full): Ensure that
16960         owner-less generic-parameters are never evicted from the typespec
16961         cache.
16963         * loader.c (method_from_memberref): Don't use the current context
16964         when parsing signatures.
16965         (method_from_methodspec, mono_get_method_from_token): Update to changes.
16967         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
16968         side-effects in g_assert.
16969         * loader.c (mono_get_method_from_token): Resolve klass earlier so
16970         that we don't potentially lose information.
16972 2005-11-26  Dick Porter  <dick@ximian.com>
16974         * icall.c:
16975         * threads.c: icalls to implement basic (ie, not named)
16976         System.Threading.Semaphore.
16978 2005-11-24  Dick Porter  <dick@ximian.com>
16980         * process.c
16981         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
16982         Use GetProcessId() if it's available.
16984 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
16986         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
16988 2005-11-23  Raja R Harinath  <rharinath@novell.com>
16989             Ankit Jain  <jankit@novell.com>
16991         * loader.c (mono_get_method_from_token): Initialize 'method' field
16992         of all generic parameters before parsing the signature.  Remove
16993         code that "fixed"-up MVAR references.
16995 2005-11-23  Ankit Jain  <jankit@novell.com>
16997         * metadata.c (mono_metadata_has_generic_params):
16998         (mono_metadata_load_generic_param_constraints):
16999         (mono_metadata_load_generic_params): Move duplicate code ...
17000         (mono_metadata_get_generic_param_row): ... here. Returns the
17001         first row-id in GenericParam table for a given owner (token).
17002         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
17003         prototype.
17005 2005-11-23  Raja R Harinath  <rharinath@novell.com>
17006             Ankit Jain  <jankit@novell.com>
17008         * metadata.c (mono_metadata_class_equal): Pass signature_only when
17009         comparing VARs too.
17010         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
17011         type->data.generic_param only if the type is an MVAR.
17012         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
17013         leak owner-less VARs and MVARs into managed space.
17015 2005-11-21  Martin Baulig  <martin@ximian.com>
17017         * class-internals.h
17018         (MonoMethod): Moved the `generic_container' here from
17019         `MonoMethodNormal' since we now also need it for
17020         `MonoMethodPInvoke';
17021         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
17022         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
17023         an union containing both `MonoMethodNormal' and
17024         `MonoMethodPInvoke'.
17026         * loader.c
17027         (mono_get_method_from_token): Allow implementing generic methods
17028         as interncalls.
17030         * threads.c
17031         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
17032         icall.
17034 2005-11-17  Dick Porter  <dick@ximian.com>
17036         * icall.c: 
17037         * process.h: 
17038         * process.c: Split the Process Start_internal icall into
17039         ShellExecuteEx_internal and CreateProcess_internal, which are
17040         called depending on whether UseShellExecute is true.  Fixes bug
17041         76670.
17043         * appdomain.c (MONO_CORLIB_VERSION): Incremented
17045 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
17047         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
17048         'msize' parameters, use the information in 'mspec' instead.
17049         (emit_object_to_ptr_conv): Ditto.
17051         * marshal.c (emit_struct_conv): Handle explicit layout structs with
17052         fields out of order. Fixes #76733.
17054 2005-11-17  Ankit Jain  <jankit@novell.com>
17056         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
17058 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
17060         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
17061           bug #76575.
17063 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
17065         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
17066         for types with non-auto layout. Fixes #76717.
17068 2005-11-16  Ankit Jain  <jankit@novell.com>
17070         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
17071         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
17072         if generic_context is null.
17073           (mono_metadata_generic_param_equal): param->owner can be null.
17074           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
17075         null.
17077 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
17079         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
17080         the correct value.
17082 2005-11-15  Martin Baulig  <martin@ximian.com>
17084         * object.c (set_value): Use mono_class_from_mono_type() instead of
17085         the hack for generic instances; fixes #76136.
17087 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
17089         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
17090         fields.
17092         * image.c (load_metadata_ptrs): Initialize the new fields.
17094         * reflection.c (create_dynamic_mono_image): Ditto.
17096         * reflection.c (build_compressed_metadata): Use the new fields.
17098         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
17099         icall.
17101         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
17102         icall.
17103         
17104 2005-11-15  Ankit Jain  <jankit@novell.com>
17105             Raja R Harinath  <harinath@gmail.com>
17107         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
17108         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
17109         new per-generic_container cache if the cached MonoType's context matches
17110         the current context.
17111           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
17112         to the expected context.
17113           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
17115 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17117         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
17118         we changed the signature of an icall.
17119         * icall.c: Modify to mono_double_ParseImpl return true/false 
17120         depending on the success, instead of throwing the exception. This will
17121         help us in Double.TryParse methods.
17122         
17123 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
17125         * marshal.c (emit_marshal_object): Throw an exception when
17126         marshalling 'object' instead of crashing. Fixes #76696.
17128 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
17130         * class-internals.h: Add prototype for mono_type_get_full_name ().
17132 2005-11-11  Dick Porter  <dick@ximian.com>
17134         * threads.c (mono_thread_manage): Make sure the main thread has
17135         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
17137 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
17139         * loader.c (mono_loader_set_error_type_load): Log a warning to the
17140         console about the missing type.
17141         (mono_loader_set_error_method_load): Ditto.
17143 2005-11-09  Miguel de Icaza  <miguel@novell.com>
17145         * mono-config.c (mono_get_config_dir): Set the system defaults if
17146         none is specified.
17148         * assembly.c (mono_set_dirs): New API entry point to set the
17149         assembly and the config directory in one call
17151 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
17153         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
17154         the ftnptr was created from a delegate in a domain other than the
17155         current domain. Fixes #75377.
17157         * exception.h exception.c: Add mono_get_exception_not_supported ().
17159 2005-11-08  Martin Baulig  <martin@ximian.com>
17161         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
17163 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
17165         * security-manager.h: Added definitions to deal with strongname key 
17166         pairs bigger (and smaller) than 1024 bits.
17167         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
17168         adjust wrt the public key length being used.
17170 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
17172         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
17173           Windows build (r51396-51397).
17175 2005-11-03  Martin Baulig  <martin@ximian.com>
17177         * class.c (mono_class_setup_vtable_general): Also add generic
17178         methods to the vtable; fixes #76581.
17180 2005-11-01  Miguel de Icaza  <miguel@novell.com>
17182         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
17183         sure that we lookup GetString method from the System.Text.Encoding
17184         class, not the derived class or we get an empty method.
17186         Fixed class #76612.
17188 2005-10-25  Miguel de Icaza  <miguel@novell.com>
17190         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
17191         if it has been previously set (embedders). 
17193         Make mono_set_rootdir available also on Unix.
17195 005-10-24  Robert Jordan  <robertj@gmx.net>
17197         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
17199 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
17201         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
17202         only calls which are made to native code use this flag.
17204         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
17206 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
17208         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
17209         Add support for FieldBuilders.
17211 2005-10-29  Martin Baulig  <martin@ximian.com>
17213         * mono-debug.c
17214         (mono_debug_using_mono_debugger): New public method; returns
17215         whether we're running inside the debugger.
17217 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
17219         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
17220         for Method/Constructor/FieldBuilders.
17222 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
17224         * reflection.c (module_add_cattrs): Save custom attributes for global methods
17225         and fields as well.
17227 2005-10-26  Martin Baulig  <martin@ximian.com>
17229         * mono-debug-debugger.c
17230         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
17232 2005-10-24  Raja R Harinath  <harinath@gmail.com>
17234         * icall.c (base64_to_byte_array): Don't pass an out-of-range
17235         integer to isspace.
17237 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
17239         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
17240         when passing valuetypes byref. Fixes #76502.
17242 2005-10-19  Jackson Harper  <jackson@ximian.com>
17244         * profiler.c: Don't put a . in front of types that are not in a
17245         namespace.
17247 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
17249         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
17251 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
17253         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
17254         #76436.
17255         (mono_marshal_get_ldflda_wrapper): Fix a warning.
17257 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17259         * assembly.c metadata-internals.h icall.c: Define an additional
17260         parameter for mono_assembly_name_parse_full, so we can avoid creating
17261         S.R.AssemblyName.Version when no version info wasn't passed.
17262         
17263 2005-10-09  Miguel de Icaza  <miguel@novell.com>
17265         * class.c (mono_type_get_full_name): Reimplement method that was
17266         removed. 
17268         * image.c: Some docs
17270 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
17272         * profiler.c (output_newobj_profile): Fix printing of Total memory
17273         on x86.
17275 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
17277         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
17279 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
17281         * threads.c: remove debug output.
17283 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
17285         * threads.c (mono_thread_manage): Fix crashes if more than 64
17286         threads need to be aborted. Hopefully fixes #75899.
17288         * assembly.c (mono_stringify_assembly_name): New helper function.
17290         * class.c: Use mono_stringify_assembly_name instead of the similar
17291         static function.
17293         * assembly.h assembly.c: Add support for calling a postload search 
17294         hook if an assembly cannot be loaded.
17296         * appdomain.c: Register new search hooks which call the AssemblyResolve
17297         events in AppDomain. Fixes #75231
17299 2005-10-07  Martin Baulig  <martin@ximian.com>
17301         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
17302         methods without debug info.
17304 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
17306         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
17307         wrappers.
17309 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17311         * file-io.c: now that we return symlinks, use lstat and, when the file
17312         is a symbolic link, stat, to get the file attributes. Also avoid the
17313         conversion to/from utf16/external.
17315 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
17317         * class.c (mono_class_layout_fields): Compute klass->has_references
17318         correctly if an embedded valuetype is not yet initialized. Fixes
17319         #76331.
17321 2005-10-04  Martin Baulig  <martin@ximian.com>
17323         * metadata.c
17324         (mono_metadata_load_generic_param_constraints): New public
17325         function; splitted the constraints loading out from
17326         mono_metadata_load_generic_params().
17328         * class.c (mono_class_create_from_typedef): Call
17329         mono_metadata_load_generic_param_constraints() after setting up
17330         the type and creating our parent; fixes #75329.
17332 2005-10-04  Martin Baulig  <martin@ximian.com>
17334         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
17335         non-dynamic parent classes.
17337 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
17339         * file-io.c : win32 build fix (ETXTBSY seems not found).
17341 2005-10-04  Martin Baulig  <martin@ximian.com>
17343         * reflection.c
17344         (mono_image_get_methodspec_token): Make the cache actually work;
17345         fixes #75974.
17347 2005-10-04  Martin Baulig  <martin@ximian.com>
17349         * class.c (mono_class_name_from_token): Removed the unneccessary
17350         `MonoGenericContext *' argument.
17352 2005-10-04  Martin Baulig  <martin@ximian.com>
17354         * loader.c
17355         (method_from_methodspec): Make the caching work again; fixes the
17356         performance regression from #76262.
17358 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17360         * file-io.c:
17361         * file-io.h:
17362         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
17363         GetFileSystemEntries that performs the same work but without going
17364         into io-layer, locking, etc.
17366 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
17368         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
17369         ThreadState_Stopped as well. Fixes #76047.
17371 2005-09-29  Martin Baulig  <martin@ximian.com>
17373         * class.c
17374         (inflate_generic_context): If the new context has a `gmethod', set
17375         its `container' that that gmethod's `container'.
17377         * metadata.c
17378         (mono_metadata_parse_generic_param): Simplify things;
17379         `generic_container = generic_context->container;' is just fine.
17381         * loader.c (method_from_methodspec): Code cleanups.
17383 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17385         * decimal.c: fix warning (and let gcc generate correct
17386         code on ARM with optimizations).
17388 2005-09-28  Martin Baulig  <martin@ximian.com>
17390         * loader.c
17391         (method_from_memberref): Added `MonoGenericContext *class_context'
17392         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
17393         (method_from_methodspec): If we're a memberref, use the enclosing
17394         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
17396 2005-09-28  Martin Baulig  <martin@ximian.com>
17398         * object.c (mono_runtime_invoke_array): Added support for
17399         MONO_TYPE_GENERICINST; fixes #75917.
17401 2005-09-27  Martin Baulig  <martin@ximian.com>
17403         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
17404         `k->byval_arg.type' to determine the actual type.
17406         * loader.c (method_from_methodspec): Removed some hacks.
17408 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
17410         * class-internals.h (mono_field_is_deleted): Do the test for
17411         rtspecialname before we check the actual name of the field. This
17412         prevents us from dereferencing a pointer into the string table,
17413         saving us from accessing a few pages
17415         * *.c: Replace the use of {Enter,Leave}CriticalSection with
17416         macros. This will allow a deadlock debugger to easily be plugged
17417         in.
17419 2005-09-27  Martin Baulig  <martin@ximian.com>
17421         * loader.c (method_from_methodspec): Create a "signature"
17422         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
17424 2005-09-27  Martin Baulig  <martin@ximian.com>
17426         * class.c
17427         (inflate_generic_class): Correctly set the new context's
17428         container.
17430         * loader.c
17431         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
17432         instead of a `MonoGenericContext *'.
17433         (mono_method_signature_full): Take a `MonoGenericContainer *'
17434         instead of a `MonoGenericContext *'.
17436         * metadata.c
17437         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
17438         instead of a `MonoGenericContext *'.
17439         (mono_metadata_parse_method_signature_full): Likewise.
17441 2005-09-26  Martin Baulig  <martin@ximian.com>
17443         * class.c
17444         (mono_class_from_generic_parameter): Set `klass->generic_container'
17445         (mono_class_from_generic_parameter): Likewise.
17446         (mono_bounded_array_class_get): We inherit the generic container
17447         from the element class.
17449         * loader.c
17450         (find_method, find_method_in_class): Take a `MonoGenericContext *'
17451         argument rather than computing it here.
17452         (method_from_memberref): Correctly set the generic context before
17453         parsing the signature.  Fixes #75681.
17455 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
17457         * object.c (mono_class_has_special_static_fields): Fix warnings.
17459 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17461         * assembly.c: Add parse_public_key function, to
17462         par the public keys. Also added mono_assembly_name_parse_full,
17463         to define it the parsed key should be freed or not.
17464         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
17465         to parse a long format assembly name.
17466         * metadata-internals.h: Keep mono_assembly_name_parse_full as
17467         private, since calling it to preserve the key requires
17468         freeing it manually.
17469         
17470 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
17472         * locales.c : removed HAVE_ICU part.
17474 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
17476         * object.c (mono_class_create_runtime_vtable): Avoid calling 
17477         field_is_special_static if the klass has no special static fields.
17479         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
17480         (MonoCachedClassInfo): Likewise.
17482         * object.c (mono_class_has_special_static_fields): New helper function.
17484 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
17486         * class.c (mono_class_create_from_typedef): Don't call 
17487         interfaces_from_typedef_full for enums.
17488         (mono_class_create_from_typedef): Compute the base types of enums directly
17489         without calling mono_class_setup_fields ().
17490         (mono_class_find_enum_basetype): New helper function.
17492         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
17493         one place inside the string heap.
17494         
17495 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
17497         * class.c: locking fixes, code cleanups, some docs added.
17498         Allocate some data structures in the image mempool.
17500 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
17502         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17503         the example code.
17504         
17505 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
17507         * class-internals.h, class.c, reflection.c: reduce memory taken by
17508         MonoClass.
17510 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
17512         * metadata.c, metadata.h, loader.h: documentation updates, code and
17513         API cleanups.
17515 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
17517         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17518         the example code.
17520         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
17521         page faults caused by the runtime while reading metadata.
17523 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17525         * socket-io.c: the field names were changed 3 months ago and no one
17526         realized until bug #76077 got filed!
17528 2005-09-20  Martin Baulig  <martin@ximian.com>
17530         * icall.c (assembly_icalls): Removed some unused debugger icalls.
17532 2005-09-20  Martin Baulig  <martin@ximian.com>
17534         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
17535         write the rank into the class entry.
17537 2005-09-20  Martin Baulig  <martin@ximian.com>
17539         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
17541 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
17543         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17545         * icall.c (custom_attrs_defined_internal): New icall.
17547         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
17548         function.
17549         (mono_custom_attrs_construct_by_type): New helper function.
17551 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
17553         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
17554         terminate the resulting string. Fixes #76123.
17556 2005-09-16  Martin Baulig  <martin@ximian.com>
17558         * mono-debug.c
17559         (mono_debug_add_method): Ignore inflated methods for the moment.
17561 2005-09-14  Martin Baulig  <martin@ximian.com>
17563         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
17565 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
17567         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
17568         return a success/failure indication.
17569         (mono_metadata_interfaces_from_typedef_full): Ditto.
17570         (get_constraints): Ditto.
17572 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
17574         * marshal.c (emit_marshal_array): Fix handling of null arrays.
17575         
17576         * marshal.c (emit_marshal_array): Add support for returning string
17577         arrays from delegates. Fixes #76063.
17579         * marshal.c: Use the emit_ldloc/stloc macros where possible.
17581 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
17583         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
17584         icall.
17586 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
17588         * reflection.c icall.c: Fix after mono_get_exception_type_load
17589         signature change.
17591         * assembly.c (mono_assembly_get_assemblyref): New helper function.
17592         (mono_assembly_load_reference): Use the new helper.
17594         * class-internals.h (MonoLoaderError): New structure containing 
17595         information about type loading errors.
17597         * class-internals.h loader.c: Add APIs to store per-thread loader
17598         error information.
17600         * loader.c class.c: Set the loader error if needed.
17602         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
17604 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
17606         * decimal.c: fixed to handle the broken ARM fp format.
17608 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
17610         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
17611         broken.
17613 2005-09-06  Martin Baulig  <martin@ximian.com>
17615         * domain.c (supported_runtimes): Added v2.0.50727.
17617 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
17619         * culture-info.h: reduce the size of some structures.
17621 2005-09-05  Martin Baulig  <martin@ximian.com>
17623         Reflect latest API changes in the August CTP.
17625         * icall.c
17626         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
17627         ("MonoType.HasGenericArguments"): Removed.
17628         ("MonoMethod.BindGenericParameters"): Renamed to
17629         "MakeGenericMethod".
17630         ("MethodBuilder.BindGenericParameters"): Renamed to
17631         "MakeGenericMethod".    
17633 2005-09-05  Martin Baulig  <martin@ximian.com>
17635         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
17637 2005-09-05  Martin Baulig  <martin@ximian.com>
17639         Applying a patch from Michal Moskal <malekith@nemerle.org>.
17641         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
17642         generic_container is non-NULL.
17644 2005-09-05  Martin Baulig  <martin@ximian.com>
17646         Applying a patch from Michal Moskal <malekith@nemerle.org>.
17648         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
17650 2005-08-29  Michal Moskal  <malekith@nemerle.org>
17652         * reflection.c (encode_locals,
17653         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
17654         for large generic types.
17656 2005-09-05  Martin Baulig  <martin@ximian.com>
17658         Applying a patch from Michal Moskal <malekith@nemerle.org>.
17660         * class.c (mono_dup_array_type): New public method.
17661         (mono_metadata_signature_deep_dup): New public method.
17662         (dup_type): Correctly duplicate array and function types.
17664 2005-09-05  Martin Baulig  <martin@ximian.com>
17666         Applying a patch from Michal Moskal <malekith@nemerle.org>.
17668         * reflection.c (get_default_param_value_blobs): Handle generic types
17669         and generic methods.
17671 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
17673         * class.c: Fixed error reporting (method/class were inversed) for 
17674         inheritance demands.
17675         * security-manager.c|h: Added the AppDomain when calling the managed
17676         System.Security.SecurityManager.InheritanceDemand method.
17678 2005-09-01  Raja R Harinath  <rharinath@novell.com>
17680         * reflection.c (encode_marshal_blob): 'marshaltype' and
17681         'marshaltyperef' are alternate sources for the custom marshaler
17682         name.
17684 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
17686         * class.c: fix creation of array classes with rank == 1
17687         (patch by Ankit Jain <jankit@novell.com>).
17689 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
17691         * object.c: fix check for creating the bound data for arrays vs
17692         szarrays.
17694 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17696         * object.c: configuration file name is now based on the executable name,
17697         not the image name. Fixes bug #75931.
17699 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
17701         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
17702         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
17704 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
17706         * rand.c: Use wincrypt.h instead of WinCrypt.h.
17708 2005-08-24  Ankit Jain  <jankit@novell.com>
17709             Raja R Harinath  <rharinath@novell.com>
17711         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
17712           called by it recursively.
17713           (mono_class_init): Remove special case in pending_init handling, since it's
17714           superseded by the fix to mono_class_from_typeref.
17716 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
17718         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
17719         BROKEN_THREAD_START stuff.
17721 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
17723         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
17724         trampoline.
17726         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
17727         
17728         * object.c (mono_delegate_ctor): Replace the original function address with
17729         a delegate trampoline.
17731 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
17733         * icall.c: add boolean argument to base64_to_byte_array and 
17734         InternalFromBase64String to control whether a whitespace-only string
17735         is allowed (or should casue a FormatException to be thrown). We need
17736         this as the behavior has changed between MS.NET 1.x and 2.0, and we
17737         to match the MS behaviour in both profiles.
17738         * appdomain.c: Bump corlib version.
17740 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17742         This patch implements a big portion of publisher policy
17743         support, used to bind assembly versions and redirect
17744         one assembly from version A to version B.
17746         * assembly.c:
17747         New GSList loaded_assembly_bindings, for storing the cached
17748         assembly bindings.
17749         (assembly_binding_maps_name): New static function for checking if a 
17750         assembly binding information maps an assembly name.
17751         (mono_assembly_binding_info_free): New function for freeing
17752         assembly binding information resources.
17753         (get_publisher_policy_info): New static function for retrieving 
17754         assembly binding information from a MonoImage.
17755         (compare_versions): New static function for comparing an assembly
17756         binding information data and the version of an assembly name.
17757         (check_policy_versions): New static function for checking if an
17758         assembly binding info mapping an assembly name is valid for it.
17759         (mono_assembly_load_publisher_policy): New static function for
17760         loading the 'policy.major.minor.MyAssembly' image for an assembly
17761         with an assembly name 'aname'.
17762         (mono_assembly_bind_version): New static function for updating
17763         assembly redirection.
17764         (mono_assembly_apply_binding): New static function for applying
17765         assembly binding.
17766         (search_binding_loaded): New static function for searching 
17767         loaded assembly binding infos in the cache domain.
17768         (mono_assembly_load_full): Don't apply assembly binding for
17769         reflection only assemblies.
17771         * metadata-internals.h: Add MonoAssemblyBindingInfo,
17772         which contains information about assembly binding. Also
17773         declare signature for mono_config_parse_publisher_policy ()
17774         function, used to retrieve pub policy info.
17775         
17776         * mono-config.c:
17777         (publisher_policy_start): New static function used to parse publisher 
17778         policy config files.
17779         (publisher_policy_parser): New static MonoParseHandler containing 
17780         the functions used when parsing config files.
17781         (mono_config_parse_publisher_policy): New function for parsing
17782         publisher policy files.
17783         
17784 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
17786         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
17788         * marshal.c (mono_delegate_free_ftnptr): Ditto.
17790         * object.c (mono_get_addr_from_ftnptr): New helper function.
17792         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
17794         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17796 2005-08-19  Dick Porter  <dick@ximian.com>
17798         * threads.c, threads.h, appdomain.c, appdomain.h,
17799         profiler-private.h, monitor.c, object.c, object-internals.h,
17800         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
17801         store the thread ID, so it can hold a 64 bit value if needed.
17803 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
17805         * reflection.c (mono_reflection_create_dynamic_method): Store the
17806         handle class into the method references as well so ldtoken works in
17807         dynamic methods.
17809         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
17810         types.
17812 2005-08-19  Ankit Jain <jankit@novell.com>
17814         Fix #75847.
17815         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
17816           here rather than using the method signature of a arbitrary function
17817           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
17818           two arguments.
17819           Hack done with Harinath.
17821 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17823         * threadpool.c: disable printing stack traces when we get a exception
17824         in a threadpool thread. I need to do more testing to figure out which
17825         cases actually print this. Fixes bug #75828.
17827 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17829         * icall.c: there might be ignored whitespace after the last '='. This
17830         fixes length computation and bug #75840.
17832 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
17834         * assembly.c (mono_assembly_load_full): Consider .exe extension as
17835         well. Fixes #75809.
17837         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
17838         #75784.
17839         
17840         * reflection.c (create_custom_attr_data): Ditto.
17842 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
17844         * locales.c, culture-info.h : removed RegionLCIDMap.
17845         * culture-info-tables.h : regenerated.
17847 2005-08-16  Martin Baulig  <martin@ximian.com>
17849         * class.c (mono_type_get_name_recurse): Small fix.
17851 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
17853         * locales.c : indentation fixie.
17855 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
17857         * object-internals.h,
17858           locales.h,
17859           locales.c,
17860           culture-info.h,
17861           icall.c : added RegionInfo table support.
17862         * culture-info-table.h : regenerated for region support.
17864 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
17866         * reflection.c (resolve_object): handle all kinds of MonoMethod
17867         including generic ones
17869 2005-08-12  Ankit Jain <jankit@novell.com>
17871         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
17872           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
17874 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
17876         * process.c: Don't close a thread handle when it's NULL. This is a
17877         workaround for bug #75733.
17879 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
17881         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
17883 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
17885         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
17887 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17889         * threadpool.c: if a work item in the thread pool has a callback that
17890         catches a exception, don't propagate it after invoking the callback.
17891         Fixes bug #75336.
17893 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
17895         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
17897         * class-internals.h (MonoCachedClassInfo): Add some new fields.
17899         * class.c (mono_class_init): Load field info lazily in the AOT case.    
17901         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
17903 2005-08-03  Ankit Jain  <jankit@novell.com>
17905         Fix #75683.
17906         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
17907           PInvoke calling convention is 0.
17909 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
17911         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
17912         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
17914 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
17916         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
17917         to handle threads not started by the GC (patch by Michael Meeks
17918         <michael.meeks@novell.com>).
17920 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
17922         * reflection.c: Make buffer used in emitting types larger for some
17923         big generic types (patch by Michal Moskal).
17925 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
17927         * mono-debug.c: Fix some (not all) alignment problems.
17929 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17931         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
17932         Invoke mono_image_load_from_data_full passing the refonly
17933         parameter.
17935         * assembly.c
17936         (mono_assembly_open_from_bundle): Add the refonly argument, 
17937         in order to pass it to other methods it calls to.
17938         (do_mono_assembly_open): Add the refonly argument, in order 
17939         to pass it to other methods it calls to.
17940         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
17941         the refonly parameter to it.
17943         * image.c: Add loaded_images_refonly_hash and
17944         loaded_images_refonly_guid_hash to cache the reflection
17945         only loaded images.
17946         (mono_images_init): Initialize the hash tables used for
17947         caching the reflection only images.
17948         (load_modules): Invoke mono_image_open_full passing the refonly
17949         parameter to load the modules the correct way.
17950         (build_guid_table): Add the refonly argument, to re-build the 
17951         correct hash table.
17952         (do_mono_image_open): Added the refonly argument, in order to
17953         define it for the loaded image.
17954         (mono_image_loaded_full): New function, which receives an
17955         additional parameter to look for the image in the refonly or
17956         non-refonly section.
17957         (mono_image_loaded): Updated, using mono_image_loaded_full.
17958         (mono_image_loaded_by_guid_full): The same case that happens
17959         with mono_image_loaded_full.
17960         (mono_image_loaded_by_guid): Likewise.
17961         (register_image): Use the ref_only variable inside MonoImage
17962         to decide in which hash table store the current image.
17963         (mono_image_open_from_data_full): Rename
17964         mono_image_open_from_data to mono_image_open_from_data_full,
17965         adding the refonly argument, to define the ref_only variable 
17966         inside MonoImage.
17967         (mono_image_open_from_data): Return 
17968         mono_image_open_from_data_full.
17969         (mono_image_open_full): Rename mono_image_open to
17970         mono_image_open_full, receiving the new refonly argument,
17971         to pass it to inner methods.
17972         (mono_pe_file_open): Update this function, to open
17973         a MonoImage as a non-refonly image.
17974         (mono_image_close): Use the refonly variable inside
17975         MonoImage to remove the image from the correct caches.
17977         * image.h: Add the signatures of mono_image_open_full,
17978         mono_image_open_from_data_full, mono_image_loaded_full,
17979         mono_image_loaded_by_guid_full.
17981         * metadata-internals.h: Add the ref_only field to 
17982         MonoImage.
17983         
17984 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17986         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
17987         Fix the last behavior, which used to load the assemblies and
17988         extract MonoReflectionAssemblyName information, instead of
17989         extract it from the metadata tables. Needed for Reflection
17990         Only assemblies.
17991         
17992 2005-07-29  Martin Baulig  <martin@ximian.com>
17994         * mono-debug-debugger.c
17995         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
17996         not initialized.
17998         * mono-debug.c
17999         (mono_debug_address_from_il_offset): Check whether we have
18000         debugging support before attempting to take the lock.
18001         (mono_debug_source_location_from_address): Likewise.
18002         (mono_debug_source_location_from_il_offset): Likewise.
18003         (mono_debug_il_offset_from_address): Likewise.
18004         (mono_debug_address_from_il_offset): Likewise.
18006 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
18008         * class.c (mono_class_from_name_case): Add support for dynamic images.
18009         Fixes #75650.
18011         * object.c (mono_class_compute_gc_descriptor): Add a workaround
18012         for #75479.
18014 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
18015         
18016         * reflection.c (mono_method_get_object): Fix warning.
18018 2005-07-28  Martin Baulig  <martin@ximian.com>
18020         * mono-debug.c
18021         (mono_debug_add_wrapper): Also write the wrapper type.
18023 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
18025         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
18026         
18027         * class.c (mono_class_init): Avoid reading nested classes if the AOT
18028         data indicates the class has none.
18030 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
18032         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
18033         loader lock with the debugger lock. Prevents deadlocks for beagle.
18035         Beagle can now run on an smp box for a weekend without any
18036         issues. Woohoo!
18038 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
18040         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
18041         in a module. Fixes #75629.
18043 2005-07-26  Martin Baulig  <martin@ximian.com>
18045         * mono-debug.c (mono_debug_add_wrapper): New static method.
18046         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
18047         interncall or a wrapper.
18049         * mono-debug.h (MonoDebugWrapperData): New public typedef.
18050         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
18051         (MONO_DEBUGGER_VERSION): Bump to 51.
18053         * mono-debug-debugger.c
18054         (mono_debugger_add_type): Removed this empty function.
18055         (mono_debugger_add_method): Likewise.
18057 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
18059         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
18060         before accessing method->slot.
18062 2005-07-21  Jb Evain  <jbevain@gmail.com>
18064         * reflection.c (method_encode_clauses/class): Handle filters clauses.
18065         Fixes #75010.
18067 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
18069         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
18070         #75587.
18072 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
18074         * image.h image.c: Add mono_image_get_guid () API function.
18076 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
18078         There were issues when multiple threads tried to load
18079         assemblies. A deadlock was created between assemblies_mutex and
18080         mono_domain_assemblies_lock. This fixes the issue by making the
18081         assembly ref counting be lock free. See bug 75586.
18082         
18083         * image.c (mono_image_close): The add ref function here was using
18084         Interlocked operations while the unref was using a mutex and a
18085         --. I don't think this was ever a bug that would be exposed in a
18086         non-pendantic way (ie, by an embedder doing a ref on one thread
18087         and an unref on another), but for the sake of correctness, this is
18088         now Interlocked.
18090         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
18091         (mono_assembly_load_reference): Call mono_assembly_addref rather
18092         than touching the refcount ourselves.
18093         (mono_assembly_close): Use InterlockedDecrement to unref the
18094         assembly. Don't acquire the lock unless it is actually needed.
18096 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
18098         * class.c (mono_class_layout_fields): Fix calculation of has_references
18099         for generic types.
18101 2005-07-12  Martin Baulig  <martin@ximian.com>
18103         Applying a patch from Michal Moskal <malekith@nemerle.org>.
18105         * metadata.c
18106         (mono_type_hash): Provide better hashing for generic instances.
18107         (mono_generic_inst_hash): Improve hashing.
18108         (mono_generic_class_hash): Likewise.
18110         * reflection.c (mymono_metadata_type_hash): Improve hashing for
18111         generic instances.
18113 2005-07-12  Martin Baulig  <martin@ximian.com>
18115         * reflection.c (mono_reflection_create_runtime_class): Remove the
18116         hack for generic type definitions and non-`Run' assemblies.
18117         (mono_reflection_bind_generic_parameters): Also use
18118         `klass->wastypebuilder' to check for TypeBuilders.
18120 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
18122         * class.c (mono_class_layout_fields): Fix calculation of has_references
18123         for generic types.
18125         * class.c (inflate_generic_class): Fix a leak.
18126         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
18127         for generic types.
18129 2005-07-11  Martin Baulig  <martin@ximian.com>
18131         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
18132         on error.
18134 2005-07-11  Martin Baulig  <martin@ximian.com>
18136         * loader.c (find_method): Also lookup in
18137         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
18139 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
18141         * appdomain.c (mono_domain_unload): Don't free the error message
18142         before passing it to mono_get_exception_...
18144         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
18145         
18146 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
18148         * threads.c: try to better guess an available RT signal (bug #75387).
18150 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
18152         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
18153         and CACHE_OBJECT.
18155 2005-07-07  Martin Baulig  <martin@ximian.com>
18157         * class.c (mono_type_get_name_full): Return NULL for
18158         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
18159         fixes #75408.
18161 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
18163         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
18164         exit the appdomain as well being aborted.
18166         * threadpool.c: Create all threadpool threads inside the root appdomain, and
18167         change back to the root domain after calling managed code. This enables
18168         appdomains using threadpools to be unloaded.
18170 2005-07-07  Martin Baulig  <martin@ximian.com>
18172         * class-internals.h
18173         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
18174         into `MonoDynamicGenericClass' since we only need it for dynamic
18175         types.
18177         * reflection.c (mono_class_bind_generic_parameters): We don't need
18178         to compute the `parent' here.
18180 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
18182         * culture-info-table.h : regenerated.
18184 2005-07-06  Martin Baulig  <martin@ximian.com>
18186         * icall.c
18187         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
18189         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
18191 2005-07-06  Martin Baulig  <martin@ximian.com>
18193         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
18194         we're doing a signature-only comparision; fixes #74945.
18196 2005-07-06  Martin Baulig  <martin@ximian.com>
18198         * class-internals.h (MonoGenericClass): Moved some things out into
18199         a new `MonoInflatedGenericClass' type.  
18200         (MonoInflatedGenericClass): New type; the `klass' of a
18201         `MonoGenericClass' is now computed lazyly in
18202         mono_get_inflated_generic_class().      
18204         * class.c (mono_get_inflated_generic_class): New public function.
18205         (mono_class_inflate_generic_method): Removed the unused
18206         `MonoClass *' argument.
18207         (setup_generic_vtable): Don't call mono_get_inflated_method() on
18208         all the methods.
18209         (mono_class_create_generic): Make this static and merge it with
18210         mono_class_create_generic_2(); we're now called automatically from
18211         mono_get_inflated_generic_class().
18213         * loader.c (mono_method_signature): Call
18214         mono_get_inflated_method() here.
18216 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
18218         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
18219         type of fields with RVA.
18221         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
18222         for this pseudo class.
18223         (my_mono_class_from_generic_parameter): Likewise.
18224         (mono_class_init): Allow interfaces to have cctors.
18226 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
18228         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
18229         lazily for AOT methods.
18231 2005-07-05  Martin Baulig  <martin@ximian.com>
18233         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
18234         returns FALSE for a successful match, not TRUE.
18236 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
18238         * loader.c (mono_method_get_index): Optimize this a bit.
18240 2005-07-04  Martin Baulig  <martin@ximian.com>
18242         * class.c
18243         (class_compute_field_layout): Move the check for generic type
18244         definitions into mono_class_layout_fields().  Fixes #74684.
18245         (mono_class_from_generic_parameter): Correctly compute
18246         `klass->parent'; fixes #75457.
18248         * reflection.c (register_assembly, register_module): Make sure
18249         `domain->rejobject_hash' is already created.
18251 2005-07-02  Martin Baulig  <martin@ximian.com>
18253         * class-internals.h
18254         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
18255         `MonoDynamicGenericClass'.      
18257 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
18259         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
18260         returned by a field getter is null, since null is a valid value.
18262 2005-07-01  Martin Baulig  <martin@ximian.com>
18264         * reflection.c (mono_reflection_generic_class_initialize): Update
18265         the `dgclass->fields [i].parent' to the correct class.
18266         (mono_image_get_fieldref_token): Use the declaring type, not the
18267         reflected type.
18269 2005-07-01  Martin Baulig  <martin@ximian.com>
18271         * loader.c (find_method): Also look in the interfaces; fixes #75429.
18273 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
18275         * threads.c (thread_cleanup): assert that thread != NULL
18276         (wait_for_tids_or_state_change): We were using the wrong variable
18277         when accessing wait->threads. `i' was always out of the bounds of
18278         the array.
18280 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18282         * loader.c: map user32 and kernel32 to libMonoSupportW
18284 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
18286         * appdomain.c (unload_thread_main): Mark this as WINAPI.
18288 2005-06-28  Martin Baulig  <martin@ximian.com>
18290         * loader.c (method_from_methodspec): Fix #75334.
18292 2005-06-28  Martin Baulig  <martin@ximian.com>
18294         Fix #74953 - Arrays now implement the generic IList<T> interface
18295         on the 2.0 platform.
18297         * class-internals.h (MonoDefaults): Added `generic_array_class'.
18299         * reflection.c (mono_class_bind_generic_parameters): New public
18300         function; similar to mono_reflection_bind_generic_parameters(),
18301         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
18303         * domain.c (mono_init_internal): Try to initialize.
18304         `mono_defaults.generic_array_class' here; this'll only succeed if
18305         we're using the 2.0 corlib.
18307         * icall.c
18308         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
18309         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
18310         (mono_lookup_internal_call): Added support for nested classes.
18312         * loader.c
18313         (mono_get_method_from_token): Set `result->signature->pinvoke' if
18314         we're an interncall and have generic arguments.
18316         * class.c
18317         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
18318         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
18319         instance of System.Array.InternalArray<T> for arrays, so they
18320         implement the generic IList<T> interface.
18322 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
18324         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
18325         (chastamar@yahoo.com). Fixes #75374.    
18327 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
18329         * culture-info-table.h: regenerated.
18331 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18333         * icall.c: handle spaces correctly for base64 strings.
18335 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
18337         * *.c: Kill some warnings.
18339 2005-06-23  Duncan Mak  <duncan@novell.com>
18341         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
18342         that this builds on Solaris 10 (x86).
18344 2005-06-23  Martin Baulig  <martin@ximian.com>
18346         * class.c
18347         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
18348         generic type definitions.
18350 2005-06-23  Martin Baulig  <martin@ximian.com>
18352         Fix #75331.
18354         * metadata.c (mono_class_get_overrides): Renamed to
18355         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
18356         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
18357         pass it to mono_get_method_full().
18359 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
18361         * reflection.c (mono_reflection_create_runtime_class): take the
18362         mono_domain_lock in this method. Prevents deadlocks
18364 2005-06-22  Martin Baulig  <martin@ximian.com>
18366         * loader.c (method_from_methodspec): Fix #75330.
18368 2005-06-22  Martin Baulig  <martin@ximian.com>
18370         * reflection.c (type_get_qualified_name): Use
18371         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
18372         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
18373         argument; use it if we don't have an assembly name.
18375 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
18377         * object.c: In mono_message_init, set "copy out" flag for in
18378         parameters with the [Out] flag.
18380 2005-06-21  Martin Baulig  <martin@ximian.com>
18382         * class.c
18383         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
18384         and MONO_TYPE_PTR.
18386 2005-06-21  Martin Baulig  <martin@ximian.com>
18388         * class.c (mono_class_init): Don't initialize `class->fields' for
18389         generic instances since they're initialized again in
18390         compute_field_layout(). 
18391         (compute_field_layout): Set the field's `generic_info' here; fix
18392         #75320. 
18394 2005-06-21  Martin Baulig  <martin@ximian.com>
18396         * class-internals.h
18397         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
18399         * metadata.c (mono_metadata_generic_method_equal): Also
18400         distinguish the `generic_class'; fixes #75334.
18402 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18404         * domain.c:
18405         * appdomain.c:
18406         * domain-internals.h:
18407         * reflection.c: 'domain_assemblies' field is now protected by its own
18408         lock. Don't call into managed code to run the AssemblyLoad event if we
18409         now there are no registered delegates for it.
18411 2005-06-20  Martin Baulig  <martin@ximian.com>
18413         * class.c (mono_class_is_assignable_from): Use a custom version of
18414         mono_class_has_parent() to make things work for generic instances;
18415         fix #75300.
18417 2005-06-20  Martin Baulig  <martin@ximian.com>
18419         * loader.c (method_from_methodspec): Apply a patch from
18420         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
18422 2005-06-20  Martin Baulig  <martin@ximian.com>
18424         * class.c (mono_class_init): Reverted Zoltan's last change; it
18425         breaks generics.
18427 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
18429         * threads.c (wait_for_tids_or_state_change): Add missing locking.
18431 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18433         * socket-io.c: fix the index in the socket array for writable/error
18434         sockets. Fixes bug #75306.
18436 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
18438         * class.c (mono_class_init): Allow interfaces to have static ctors.
18440 2005-06-17  Martin Baulig  <martin@ximian.com>
18442         * loader.c (method_from_methodspec): Use `context->container' when
18443         parsing the `gmethod->inst'.
18445 2005-06-17  Martin Baulig  <martin@ximian.com>
18447         * class.c (mono_type_get_name_recurse): Don't add the assembly
18448         name for type arguments.
18450 2005-06-15  Martin Baulig  <martin@ximian.com>
18452         * reflection.c (mono_image_get_inflated_method_token): Encode
18453         correct klass; fixes #75260.
18455 2005-06-13 Michal Moskal <malekith@nemerle.org>
18457         * icall.c: Make GetCorrespondingMethod/Constructor take
18458         MonoReflectionMethod method not MonoMethod. Removed
18459         MonoType.GetCorrespondingField, and make
18460         MonoGenericType.GetCorrespondingField take name not
18461         MonoClassField.
18463 2005-06-13  Michal Moskal <malekith@nemerle.org>
18465         * reflection.c (field_encode_signature, encode_locals):
18466          Make sizes of buffers for types larger (for big generic types).
18467          (create_generic_typespec,
18468          mono_reflection_sighelper_get_signature_local,
18469          mono_reflection_sighelper_get_signature_field):
18470          Add asserts for too small buffers.
18472 2005-06-15  Martin Baulig  <martin@ximian.com>
18474         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
18475         if our parent is not a dynamic type.
18477 2005-06-15  Martin Baulig  <martin@ximian.com>
18479         * class-internals.h (MonoTypeNameFormat): New enum.
18481         * class.c
18482         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
18483         (mono_type_get_full_name): Removed.
18484         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
18485         argument instead of the boolean's.
18487         * icall.c (ves_icall_System_MonoType_getFullName):
18488         Added `gboolean assembly_qualified'.    
18490         * reflection.h
18491         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
18493         * reflection.c (mono_reflection_parse_type): Parse the new type
18494         name format.
18496 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18498         * icall.c: no need to convert from utf16 to utf8 and then back again
18499         after the call to GetLogicalDrives.
18501 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18503         * icall.c: frombase64. Fix problems exposed by new tests.
18505 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18507         * icall.c: added internal calls for converting char [] and strings in
18508         base64 into byte [].
18510 2005-06-10  Martin Baulig  <martin@ximian.com>
18512         * class.c (mono_class_create_generic_2): Read the nested classes
18513         from the metadata rather than from `gklass->nested_classes' since
18514         `gklass' might not be initialized yet.
18516 2005-06-09  Duncan Mak  <duncan@novell.com>
18518         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
18519         all public headers. Fixes #74919.
18521 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
18523         * domain.c: The key for proxy_vtable_hash is now a pointer
18524         array. Added new GHashFunc and GCompareFunc functions for this.
18526         * class.h: The list of interfaces in MonoRemoteClass is known in
18527         advance and can't grow (we create a new MonoRemoteClass if needed),
18528         so now the interface array can be allocated together with
18529         MonoRemoteClass.
18530         
18531         * object.c: Added a new method create_remote_class_key.
18532         Fixed mono_remote_class so it does not depend on
18533         mono_upgrade_remote_class.
18534         Removed extend_interface_array.
18535         Added new method clone_remote_class(), which makes a copy of a remote
18536         class and adds a new interface or class to it.
18537         mono_upgrade_remote_class() now creates a new remote class (or gets
18538         it from the cache) if an vtable upgrade is needed. In this way
18539         we make sure that other objects sharing the same remote class
18540         don't get the new vtable with unwanted interfaces.
18541         
18542         * object-internals.h:
18543         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
18544         
18545         * marshal.c: Track changes in mono_upgrade_remote_class().
18547 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
18548         * icall.c: Add runtime methods for obtaining members of inflated
18549         class, which were created from supplied non-inflated members. It
18550         is used in internal Get{Method,Constructor,Field} methods in
18551         System.Type
18553 2005-06-09  Martin Baulig  <martin@ximian.com>
18555         * reflection.c
18556         (mono_reflection_bind_generic_method_parameters): Fix #75169.
18558 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18559         * reflection.c (mono_image_basic_init): Define
18560         Version in MonoDynamicAssembly. 
18561         
18562 2005-06-08  Martin Baulig  <martin@ximian.com>
18564         Fix #75136.
18566         * loader.c
18567         (mono_method_signature_full): New public method; takes a
18568         `MonoGenericContext *'.
18569         (find_method): Use mono_method_signature_full() and pass the
18570         klass'es context to it.
18572         * class.c (mono_class_is_inflated_method): Use
18573         mono_method_signature_full() and pass the context to it.
18575 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
18577         * object.c: add proper locking in mono_remote_class_vtable(),
18578         fixes possible memory corruption.
18580 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
18582         * marshal.c (mono_remoting_marshal_init): set
18583         initialized after initialization.
18585 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
18587         * locales.c : hush.
18589 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
18591         * object.c (extend_interface_array): fix really silly
18592         memory corrupting / comparison bug.
18594 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18596         * reflection.c: Functions added to support the creation
18597         of CustomAttributeData, which includes Attribute data
18598         used by ReflectionOnly methods.
18600         * reflection.h:  mono_reflection_get_custom_attrs_data and
18601          mono_custom_attrs_data_construct added (functions exposed).
18603          * icall.c: Added mono_reflection_get_custom_attrs_data
18604          as icall.
18605         
18606 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
18608         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
18609         lupus's request.
18611 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
18613         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
18615         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
18616         dynamic DllImportAttribute.
18618         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
18619         dynamic DllImportAttribute.
18621         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
18622         Fixes #75162.
18624 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18626         * threads.c: avoid segfault when an unstarted thread is aborted.
18628 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
18630         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
18631         Returns the name and version of the runtime for reporting.
18633 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18635         * appdomain.c: bump corlib version.
18636         * object-internals.h: new field in MonoReflectionAssembly.
18638 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18640         * object-internals.h: Carlos forgot to add this field.
18642 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18644         * icall.c: Added create_version to create instances
18645         of Version of MonoReflectionAssemblyName. This change helps
18646         the AssemblyName tests to keep running fine.
18647         
18648 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
18649   
18650         * object.c (mono_method_return_message_restore): A somehow less
18651         intrusive fix for #75138.
18653 2005-06-03  Raja R Harinath  <rharinath@novell.com>
18655         * object.c (mono_method_return_message_restore): Fix computation
18656         of expected number of out args.
18658 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
18660         * reflection.c (mono_image_get_method_info): Fix the case when the
18661         charset is empty.
18663 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
18665         * object.c: Added missing null check in
18666           mono_method_return_message_restore.
18668 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
18670         * reflection.c (mono_image_get_method_info): Handle the case when
18671         dllentry is empty.
18673 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
18675         * object.c: When creating the vtable for a proxy, take into account
18676         all inherited interfaces, not only the ones registered in
18677         iclass->interfaces. This fixs bug #74996.
18678         Also, in mono_method_return_message_restore, verify that the array
18679         of out args has the expected lengh.
18681 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18683         * socket-io.c: update the timeout in Poll when the call is interrupte.
18685 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18687         * socket-io.c: support abort/suspend in Select_internal after last
18688         change.
18690 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18692         * threadpool.c: remove warning.
18694 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18696         * icall.c:
18697         * socket-io.[ch]: Select_internal uses poll() now when available, thus
18698         removing the 1024 limit from select(). Runtime part of the fix for
18699         bug #71203.
18701 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18703         * socket-io.c: when resolving the addresses for the same
18704         host returned by gethostname(), get the local IPs from the interface
18705         list. Loopback addresses are discarded if the are interfaces up with
18706         non-loopback ones. Fixes bug #63265.
18708 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
18710         * appdomain.c, verify.c, object-internals.h, reflection.c:
18711         bumped corlib number to 36, and added new extra_flags field
18712         to ReflectionMethodBuilder and friends.  Fixes #75060.
18714 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
18716         * gc.c: register a new weak link only if the object is non-null
18717         (fixes bug#75047).
18719 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
18721         * culture-info.h : short time pattern too.
18723 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
18725         * culture-info.h : expand long time pattern string length.
18727 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
18729         * culture-info-table.h : update (more French date format; #72788).
18731 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
18733         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
18734         the method is static. Fixes #75029.
18736 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
18738         * reflection.c: Update the table_idx field of method builders after
18739         saving the module, since it can change. This is a workaround for
18740         bug #74914. 
18742 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
18744         * culture-info-table.h : update (additional French date format).
18746 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
18748         * icall.c (ves_icall_type_Equals): Revert last change.
18749         
18750         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
18752         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
18754 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
18756         * class-internals.h: Added executioncontext_class field to 
18757         MonoDefaults structure.
18758         * domain.c: Cache System.Threading.ExecutionContext class in 
18759         mono_defaults.
18760         * object.c: Capture the ExecutionContext for asynchroneous calls in
18761          mono_async_result_new.
18762         * object-internals.h: Added execution_context and original_context 
18763         fields to MonoAsyncResult. Added execution_context to MonoThread.
18764         * security-manager.c|.h: Added mono_get_context_capture_method to 
18765         return the capture method (if required by the security manager or by
18766         the framework version used).
18767         * threadpool.c: Apply capture (if present) ExecutionContext in 
18768         mono_async_invoke and revert to original context after it completes.
18770 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
18772         * culture-info-table.h : updated (real hacky solution for zh-CHT).
18774 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
18776         * culture-info-table.h : zh-CHT related workaround.
18778 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
18780         * marshal.c (emit_marshal_custom): Add some error checking and call the
18781         methods in the ICustomMarshaler interface. Fixes #74875.
18782         
18783         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
18784         native->managed wrappers.
18786 2005-05-12  Martin Baulig  <martin@ximian.com>
18788         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
18789         here and use the loader lock.
18791         * mono-debug.c: Properly lock when the debugger is not attached.
18792         (mono_debug_init): Release the initial lock if we're not running
18793         in the debugger.
18795 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
18797         * marshal.c (emit_marshal_custom): Pass through NULL values without
18798         calling the custom marshalling routines.
18800         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
18801         conversion in structures. Fixes #74882.
18803 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
18805         * culture-info-table.h : zh-* cultures were missing.
18807 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
18809         * threads.c: Added a new event background_change_event which is signaled
18810         when a thread changes its background mode.
18811         Moved here several checks previously done in managed code. The checks
18812         require the thread lock, and using the thread lock in managed code
18813         can result in deadlocks.
18814         Merged Start_internal and Thread_internal into a single method. Now 
18815         Thread_internal does all work of creating and starting a thread.
18816         Added icalls for setting and getting the state of the object. Moved from
18817         managed code to avoid locking there.
18818         Added wait_for_tids_or_state_change() which is called instad of
18819         wait_for_tids when waiting for non-backround threads to end. This method
18820         will return if one of the threads ends or the background_change_event
18821         is signaled.
18822         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
18823         the background mode. This method signals the background_change_event
18824         event.
18825         * icall.c:
18826         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
18827         removed Start_internal.
18828         
18829 2005-05-11  Martin Baulig  <martin@ximian.com>
18831         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
18832         to order of some fields to get proper alignment on 64-bit machines.
18834 2005-05-11  Martin Baulig  <martin@ximian.com>
18836         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
18837         changes as they're broken and completely fuck up the debugger.
18839         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
18841 2005-05-10  Martin Baulig  <martin@ximian.com>
18843         * reflection.c (mono_reflection_generic_class_initialize): Don't
18844         call mono_class_setup_parent() here.
18846 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18848         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
18849         send/receive timeout use an integer in milliseconds. We were using a
18850         struct timeval.
18852 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18854         * locales.c:
18855         (internal_get_cultures): reserve the first slot of the array for the
18856         InvariantCulture, which will be filled in managed code.
18858 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
18860         * reflection.c (mono_image_fill_module_table): Initialize the
18861         GENERATION field as well.
18863 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18865         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
18866         Monitor.Enter on the object.
18868 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
18870         * threads.c: Enable the wait for running threads when exiting.
18871         * icall.c: Suspend all threads before exiting.
18873 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
18875         * assembly.c (mono_assembly_load_reference): Fix warning.
18877 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18879         * threadpool.c: changed the default number of threads per cpu. From now
18880         on, the default will be 20 + (5 * number of cpus) instead of 50.
18882 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
18884         * loader.c (mono_method_get_signature_full): Add locking here.
18886 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
18888         * appdomain.c: Moved methods for parsing and freeing assembly
18889         names to assembly.c.
18890         * assembly.c, domain-internals.h: Created public methods for parsing
18891         assembly names. Fixed mono_assembly_load_with_partial_name:
18892         it now finds the best match, taking into account the version,
18893         token and culture specified in the partial name. Also return
18894         the latest version if no version information is specified.
18896 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
18898         * threadpool.c: replace check for SocketAsyncCall class.
18900 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18902         * threadpool-internals.h:
18903         * Makefile.am: added threadpool-internals.h
18905         * threadpool.c: call mono_unhandled_exception on exceptions not handled
18906         that happen in threadpool threads (tested on MS).
18907         (mono_thread_pool_remove_socket): new function that dispatch any pending
18908         AIO call on a socket that is closing. By now only epoll really needs it,
18909         as select/poll wake up when the socket closes.
18912         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
18914 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
18916         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
18918 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
18920         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
18922 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
18924         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
18925         has an abort request, convert it into a suspend request.
18927 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
18929         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
18930         warning for the usage of `UnmanagedFunctionPointerAttribute' which
18931         is not supported yet.
18933 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18935         * image.c: register assemblies loaded from data (bundles) in the loaded
18936         assemblies hash. Fixes bug #74772.
18938 2005-04-29  Martin Baulig  <martin@ximian.com>
18940         * class.c (mono_type_get_name_recurse): Update to the new naming
18941         schema from the latest .NET 2.x beta2.
18942         (mono_class_setup_vtable_general): If we're a generic instance,
18943         copy the vtable from our generic type definition and inflate all
18944         the methods in it.
18946         * loader.c (find_method): Update to the new naming schema from the
18947         latest .NET 2.x beta2.
18949 2005-04-29  Raja R Harinath  <harinath@gmail.com>
18951         * class.c (mono_class_init): Add a mono_loader_unlock to the
18952         #74734 fix.
18954 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
18956         * icall.c (ves_icall_System_Environment_Exit): Remove the 
18957         suspend_all_other_threads () call for the time being, since it can hang.
18959         * threads.c (mono_thread_manage): Similarly, disable the waiting for
18960         the background threads to exit, since it can also hang.
18962         * class.c (mono_class_init): Applied patch from Ankit Jain 
18963         (radical@gmail.com). Avoid pending init errors when a field refers
18964         to a nested class using a typeref. Fixes #74734.
18966         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
18967         this for dynamic modules.
18969 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18971         * threads.c: don't wait for threads that are in the process of aborting
18972         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
18973         and waiting for background threads to finish. This makes xsp and
18974         mod-mono-server exit without random length delays and/or hangs.
18976 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18978         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
18980 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
18982         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
18983         dynamic types to prevent infinite loops. Fixes #74727.
18985         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
18986         ..._is_assignable_to.
18988 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
18990         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
18992 2005-04-25  Martin Baulig  <martin@ximian.com>
18994         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
18996         * domain.c
18997         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
18999         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
19001         * reflection.c (build_compressed_metadata): Set metadata header
19002         version to 2.0.
19004 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
19006         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
19007         number into an integral and a decimal part. Fixes #70473.
19009         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
19011 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
19013         * culture-info-table.h : reflected the latest locale-builder output.
19015 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19017         * threadpool.c: check for SuspendRequested too when deciding if
19018         mono_thread_interruption_checkpoint should be called.
19020 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19022         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
19023         * threads.c: remove interruption_mutex and use Interlocked instead. When
19024         suspending all the threads, wait for all the suspended events at once.
19025         If we're shutting down and get an APC that is going to be queued,
19026         call mono_thread_execute_interruption immediately, as the thread might
19027         be sleeping on a pthread condition or mutex.
19029         * icall.c: call mono_runtime_set_shutting_down before suspending the
19030         threads.
19032         Fixes bug #74693. And now xsp is happier when exiting.
19034 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
19036         * loader.c (mono_stack_walk): Fix #74690.
19038 2005-04-22  Martin Baulig  <martin@ximian.com>
19040         * mono-debug.h (MonoDebugMethodJitInfo): Added
19041         `MonoDebugMethodJitInfo *jit'.
19043         * mono-debug.c (mono_debug_read_method): Cache the
19044         MonoDebugMethodJitInfo in `address->jit'.
19045         (mono_debug_free_method_jit_info): New public method.
19047 2005-04-22  Martin Baulig  <martin@ximian.com>
19049         * class.c (mono_class_is_assignable_from): Disallow
19050         type parameter -> interface.
19052 2005-04-21  Dick Porter  <dick@ximian.com>
19054         * threads.c (mono_thread_create): Turn an assertion into an error.
19056 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
19058         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
19059         
19060         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
19061         Fix some gcc 4.0 warnings.
19063 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
19065         * file-io.c: fix alt dir separator char on unix systems
19066         and cleanup (fixes bug #71214).
19068 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
19070         * marshal.c: Use CALLVIRT instead of CALL when dispatching
19071         a call to a remote domain, since the method may be an
19072         interface method in the client domain. This fixes bug #74192.
19074 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19076         * threadpool.c: recv/send are now performed before going back to managed
19077         code to save one transition.
19079 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19081         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
19083         * metadata/threadpool.c: removed hack to workaround the bug above.
19085         Fixes bug #74618.
19087 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
19089         * reflection.c reflection.h: Fix handling of parameter defaults in
19090         dynamic methods. Also fixes handling of parameter attributes.
19091         Fixes #74609.
19093         * mono-debug.c (mono_debug_close_image): Fix warning.
19095 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19097         * socket-io.h: replaced old unused field with new 'blocking'.
19098         * threadpool.c: restore socket blocking state on windows(tm).
19100 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
19102         * icall.c: don't return the codebase in the AssemblyName[] returned by
19103         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
19104         * object-internals.h: Removed FIXME (fields were presents) and fixed
19105         versioncompat declaration.
19107 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19109         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
19110         not closed, so don't cleanup when it happens.
19112 2005-04-13  Chris Toshok  <toshok@ximian.com>
19114         * mono-debug-debugger.h: change prototype for
19115         mono_debugger_lookup_type.
19117         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
19118         this function, although it should probably be named
19119         mono_debugger_init_type.
19121 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19123         * threadpool.c: fix non-AIO case.
19125 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
19127         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
19128         the built-in profiler to measure just JIT compilation times.
19130 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19132         * threadpool.c: the epollfd might be closed by another thread at
19133         any time, so ignore EBADF at treat it as a "we're closing" sign.
19135 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19137         * threadpool.c: release the semaphores with a count equals to the number
19138         of working threads in both IO and regular pools. Fixed typo that messed
19139         up the count of IO pool threads. Don't initialize the pipe handles if
19140         we're using epoll.
19142 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19144         * threadpool.c: some systems don't like a NULL when deleting the socket
19145         from epoll.
19147 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19149         * threadpool.c: fix semaphore allocation.
19151 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19153         * threadpool.c: added epoll() based implementation for asynchronous IO
19154         that is used instead of the default poll() when available.
19155         It can be disabled by setting MONO_DISABLE_AIO.
19157 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19159         * threadpool.c: windows needs 'closesocket' and instead of returning
19160         0 when the stream is closed while in select, it returns -1. Fixes bug
19161         #74573.
19163 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
19165         * class.c (class_compute_field_layout): Fix the regression caused by
19166         the previous try.
19168 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19170         * threadpool.c: separate pool for socket async. IO.
19171         * threadpool.h: mono_max_worker_threads is not a global any more.
19173 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
19175         * class.c (class_compute_field_layout): Fix #74549.
19177 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19179         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
19180         use 2 connected sockets instead.
19182 2005-04-08  Miguel de Icaza  <miguel@novell.com>
19184         * mono-config.c: Add new entry point for mkbundle
19185         mono_config_parse_memory. 
19187 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19189         * threadpool.c: removed another unused function.
19191 2005-04-08  Ankit Jain  <radical@corewars.org>
19193         * reflection.c (get_default_param_value_blobs): Add 'types'
19194         parameter to get the types encoded in the constant table.
19195         (mono_param_get_objects): Use the type from the constant table,
19196         not the type of the parameter, when creating default values.
19197         Handle null default values correctly.
19199 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19201         * file-io.c:
19202         * file-io.h:
19203         * threadpool.c:
19204         * threadpool.h:
19205         * icall.c:
19206         * socket-io.c: removed dead code for async IO.
19208 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19210         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
19212         * threadpool.c: intercept socket async. calls and pass them to a thread
19213         that is polling and dispatching the job items to the threadpool as
19214         socket become ready. Fixes bugs #71217, #71933.
19216         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
19217         between char and short/ushort arrays.
19219         * socket-io.c: remove dead code.
19221 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
19223         * locales.c,
19224           icall.c : removed InternalToUpper_Comp() and
19225           InternalToLower_Comp().
19227 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
19229         * char-conversions.h : The tables were incorrectly generated. Should
19230           be generated against invariant culture.
19232 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
19234         * object.c (mono_runtime_invoke_array): Fix return value when 
19235         passing pre-created valuetype objects to ctors.
19237         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
19238         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
19239         Fixes #74338.
19241 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
19243         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
19244         only used with --security and hides the wrong corlib version error.
19246 2005-03-30  Joshua Tauberer  <tauberer@for.net>
19248         * class.c: Changed mono_class_name_from_token so that types
19249         outside of a namespace don't have an initial period.  Improved
19250         the g_warning message used in _mono_class_get when loading
19251         fails.
19252         * assembly.c: In mono_assembly_load_reference, when an assembly
19253         can't be found, "No such file or directory" is misleading and
19254         unhelpful because a few paths were checked for the presence of
19255         the assembly.  When that happens (ENOENT), display a nicer
19256         message indicating the directories that were searched.  In all
19257         cases, the warning is made easier to read for non-hackers.
19259 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
19261         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
19262         project/solution.
19263         * appdomain.h|domain.c: Removed inline from functions.
19264         * appdomain.c: Reduced warnings when compiling on windows.
19265         * icall.c: Fixed output_debug declaration to gunichar2*.
19266         * mono-config.c: Reduced warnings when compiling on windows.
19267         * rand.c: Added missing "windows.h". Added missing return value.
19268         * rawbuffer.c: Added missing winsock2.h for windows.
19269         * sysmath.h: Added mono-compiler.h header to allow/ease 
19270         compilation with non-GCC compilers.
19271         * threads.c: Fixed declarations to compile with VS.NET C compiler.
19272         Removed cast warnings.
19274         Adapted from the work of J Lothian (for VC6).
19276 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
19278         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
19279         from default_path.
19281 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
19283         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
19284         the 2.0 profile.
19286 2005-03-27  Raja R Harinath  <harinath@gmail.com>
19288         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
19289         has to be in $(exec_prefix).  $(prefix) is for arch-independent
19290         stuff, and it would probably use $(prefix)/share rather than
19291         $(prefix)/lib.
19293 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19295         * console-io.c: added 2 includes that might be missing.
19297 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
19299         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
19300         profile.
19302         * reflection.c (create_custom_attr): Allocate the params array using
19303         alloca so it gets GC tracking.
19305 2005-03-23  Chris Toshok  <toshok@ximian.com>
19307         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
19308         out some spew.
19310 2005-03-24  Raja R Harinath  <rharinath@novell.com>
19312         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
19313         changes to pick up any changes in prefix, etc.
19315 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
19317         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
19318         
19319         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
19320         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
19322 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
19324         * class-internals.h object-internals.h class.c reflection.c: Extend the
19325         mono_lookup_dynamic_token () function to return the class of the
19326         token as well. 
19328         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
19329         well. Fixes #73848.
19331 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
19333         * security-manager.c: Skip inheritance checks for intra-corlib
19334         class inheritance and method overrides. This skips a lot of checks
19335         and (anyway) permissions cannot work until corlib is loaded.
19337 2005-03-23  Martin Baulig  <martin@ximian.com>
19339         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
19340         MONO_TYPE_GENERICINST.  
19342 2005-03-23  Martin Baulig  <martin@ximian.com>
19344         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
19346 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19348         * class.c: added locking comments to some functions.
19349         Cache the interface offsets arrays (saves about 20 KB
19350         of runtime memory in a typical app).
19351         Reduce the time overhead in mono_class_setup_supertypes ().
19353 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
19355         * icall.c: speedup and fix leaks in GetMethodsByName and
19356         GetPropertiesByName.
19358 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19360         * reflection.c: some locking fixes.
19362 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19364         * metadata.c: added missing break in case statement.
19366 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
19368         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19369         typedbyref return values. Fixes #73941.
19371 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
19373         * security-manager.c|h: Added demandunmanaged method and 
19374         suppressunmanagedcodesecurity class to MonoSecurityManager.
19375         Renamed aptc class to allowpartiallytrustedcallers.
19377 2005-03-17  Martin Baulig  <martin@ximian.com>
19379         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
19381 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19383         * file-io.c: disabled file async. IO using aio_*. It uses the
19384         threadpool now. Workaround for bug #73718.
19386 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19388         * assembly.h, mono-config.c: added code to deal with bundled configs
19389         for bundled assemblies.
19391 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
19393         * *.c, private.h: cleanup, removing old private.h header file.
19395 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19397         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
19398         and throw_on_unmappable_char attributes.
19400 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
19402         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
19403         _ProcessName_internal.
19405 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
19407         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
19408         #73631.
19410         * icall.c threads.c threads-types.h: Remove slothash icalls as they
19411         are no longer used.
19413 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
19415         * object.c (compute_class_bitmap): Add support for generics. Fixes
19416         #73527.
19418 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
19420         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
19422 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19424         * filewatcher.c: commented out the code for windows watcher, as we don't
19425         use it (we use the managed implementation instead).
19427 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
19429         * object-internals.h (MonoThread): Remove 'unused1' field.
19431         * appdomain.c: Bump corlib version.
19433         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
19435         * reflection.c (mono_reflection_create_runtime_class): Remove the
19436         AssemblyBuilder.Save optimization since it causes too many problems.
19438 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
19440         * exception.c|h: Added mono_get_exception_reflection_type_load to
19441         create a ReflectionTypeLoadException object.
19442         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
19443         to return NULL is a InheritanceDemand fails during reflection. Updated
19444         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
19445         ReflectionTypeLoadException if an InheritanceDemand fails during 
19446         reflection. Added icall mapping for GetLinkDemandSecurity.
19447         * security-manager.c|h: Added ves_icall_System_Security_
19448         SecurityManager_GetLinkDemandSecurity internal call to return the
19449         class and methods permissions set for a LinkDemand. Removed unused
19450         fields in MonoSecurityManager.
19452 2005-03-10  Martin Baulig  <martin@ximian.com>
19454         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
19455         it's a generic instance.
19457 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
19459         * reflection.c (mono_get_object_from_blob): Applied patch from
19460         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
19462         * class.c (mono_class_is_assignable_from): Another try at fixing 
19463         #73469 without breaking anything.
19465 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
19467         * class.c: (mono_class_is_assignable_from): Revert the last changes
19468         since they don't work with generics.
19469         
19470         * class.c (mono_class_is_assignable_from): Fix build bustage.
19472         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
19473         the managed IsAssignableFrom method. Fixes #73469.
19475         * reflection.c (mono_reflection_call_is_assignable_from): New helper
19476         function.
19478 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
19480         * object.c (mono_load_remote_field_new): Fix returning uninitialized
19481         memory when the remoting callback does not sets the out arguments.
19482         Fixes #73007.
19484         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
19485         by mistake.
19487         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
19489         * object-internals.h (MonoStackFrame): Sync with managed object layout.
19491         * appdomain.c: Bump corlib version.
19493 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
19495         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
19496         function.
19498         * threads.c (mono_thread_attach): Detect threads which are not started
19499         by the GC pthread wrappers.
19501 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
19503         * icall.c: Added new icall for RNG.
19504         * rand.c|h: Added new icall to open the RNG. This allows to share a 
19505         single handle on Linux to access /dev/urandom and fix #73183.
19507 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
19509         * object.c: setting the new vtable in a transparent proxy object must
19510         not change the GC descriptor.
19512 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19514         * object.c: fixed compilation without GCJ support.
19515         * reflection.c: for runtime-created types ensure klass->has_references
19516         is correct (bug #73215).
19518 2005-03-02  Martin Baulig  <martin@ximian.com>
19520         * class.c (mono_class_is_assignable_from): Make this work if
19521         `oklass' is a generic instance; fixes #72831.
19523 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
19525         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
19526         with hasthis set.
19527         
19528         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
19530         * marshal.c: Reorganize native->managed marshalling code to also use
19531         the emit_marshal_... functions.
19533 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19535         * object.c: typed allocs have issues with bitmap sizes > 30,
19536         so check for max_set >= 30.
19538 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
19540         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
19541         managed code. Fixes #73012.
19543         * metadata.h (MonoMarshalSpec): Add elem_mult field.
19545         * metadata.c reflection.c: Load/Emit elem_mult as well.
19546         
19547         * metadata.h (MonoMarshalSpec): Add comment.
19549         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
19551         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
19552         num_elem to -1 if not given.
19554         * object-internals.h (MonoReflectionMarshal): Add has_size field.
19556         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
19557         given values.
19559 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
19561         * null-gc.c (mono_gc_free_fixed): Was not compilable.
19563 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
19565         * reflection.c (encode_marshal_blob): Encode param_num field as well.
19567         * object-internals.h (MonoReflectionMarshal): Add param_num field.
19569 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19571         * object.c: generalized the reference bitmap creation
19572         and added hooks for the new GC.
19573         * class-internals.c: removed the gc_bitmap field from MonoClass.
19575 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19577         * domain.c: help the compiler to produce better code
19578         in mono_jit_info_table_find ().
19580 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19582         * object.c: make all allocations look typed.
19584 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19586         * socket-io.c: load Mono.Posix if it's not loaded already
19587         (fixes bug#73033).
19589 2005-02-24  Martin Baulig  <martin@ximian.com>
19591         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
19592         * reflection.c (dup_type): Likewise.
19594 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
19596         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
19597         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
19599 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19601         * domain.c, threads.c, object-internals.h: make the critical thread
19602         local vars use the fast access mode (even when we're compiled in
19603         a lib). Provide accessors to be used by the jit during codegen.
19605 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
19607         * appdomain.c: Changed hook functios behavior to include
19608         support for the reflection only assemblies. Some icalls were changed
19609         to support the mentioned assemblies too. Signatures of static methods
19610         try_assembly_resolve and real_load now have an additional parameter:
19611         refonly.
19613         * assembly.c: General changes to mono_assembly_ methods to support
19614         reflection only api. Functions mono_assembly_open, mono_assembly_load,
19615         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
19616         suffix, to support an additional gbool parameter to specify whether
19617         the assembli is reflection only or not. Created some new hook functions 
19618         to add support for reflection only assemblies. Signatures of static 
19619         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
19620         have now an additional parameter: refonly.
19622         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
19623         indicating whether the assembly is reflection only or not.
19625         * exception.c: Add mono_get_exception_invalid_operation.
19627         * icall.c: Throw an InvalidOperationException when trying to invoke
19628         a property/method/event, or trying to set/get the value of a field.
19629         Also add an icall to retrieve the ref_only flag to the
19630         MonoReflectionAssembly.
19632 2005-02-23  Chris Toshok  <toshok@ximian.com>
19634         Part of fix for #72827.
19635         * mono-debug.c (mono_debug_add_method): add lexical block data to
19636         the info we write.  Kind of a hack at the moment - we copy the
19637         lexical block info from the MonoDebugMethodInfo to the
19638         MonoDebugMethodJitInfo here, before writing it.
19639         (mono_debug_read_method): read the lexical block info.
19641         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
19643         * debug-mono-symfile.h: add lexical block support.
19645         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
19646         support.
19648 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
19650         * loader.c (mono_lookup_pinvoke_call): Fix warning.
19652         * object.c (mono_runtime_free_method): Call mono_free_method () and
19653         put the TODOs there.
19655         * loader.c (mono_free_method): Free up most memory allocated for 
19656         dynamic methods.
19658 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
19660         * reflection.c: properly flag a Type argument to a
19661         named custom attr value (bug #72248).
19663 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19665         * reflection.c: reduce code duplication in named custom
19666         attribute encoding.
19668 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
19670         * reflection.c: properly encode custom attrs of type object
19671         (bug #72649).
19673 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
19675         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
19677 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
19679         * socket-io.c: load System.dll if it's not loaded already
19680         (bug #72850 and #70477).
19682 2005-02-21  Martin Baulig  <martin@ximian.com>
19684         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19685         generic instances.
19687 2005-02-21  Martin Baulig  <martin@ximian.com>
19689         * reflection.c (mono_image_build_metadata): We also need to
19690         "fixup" the MethodImpl table after we computed the final method
19691         indices.  Call fixup_methodimpl() to do that.
19692         (fixup_methodimpl): New private method.
19694 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19696         * assembly.c: special case mscorlib.dll (bug#72536),
19697         patch from Carlos Alberto Cortez.
19699 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
19701         * threads-types.h threads.c: Fix build bustage.
19703         * threads.c: Use a union for long<->double conversions.
19705         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
19706         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
19708         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
19709         containing the checkpoint call with NOT_TAKEN.
19710         
19711         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
19712         checkpoint before pushing the arguments, so they won't have to be
19713         spilled to stack.
19715 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19717         * domain.c, assembly.c, domain-internals.h: make some data
19718         const and relocation-free.
19720 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
19722         * object.c, appdomain.c, class-internals.h: introduce the
19723         MonoClassRuntimeInfo structure to hold the info needed to
19724         use a class at runtime. Made mono_class_vtable() lock-free
19725         for all the appdomains.
19727 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
19729         * metadata-internals.h, image.c: introduce a per-image mempool to
19730         be used for memory that has the same lifetime as the image.
19732 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
19734         * domain.c: In mono_init_internal(), instead of selecting the first
19735         runtime version supported by an executable, get a list of all
19736         supported versions and select the one for which an mscorlib exists
19737         (since even if the runtime supports a given version, it doesn't mean
19738         that the framework for that version is installed).
19739         Modified get_runtimes_from_exe to support this behavior.
19740         In supported_runtimes, added information about additional system
19741         assembly versions.
19742         
19743         * assembly.c: Added support for more than one system assembly version
19744         per runtime version. Updated the assembly list.
19745         In mono_assembly_remap_version, removed the initial version check,
19746         since we don't know to which version we need to compare until we
19747         get the version set on which the assembly is based.
19748         Moved the code for loading corlib into the new method
19749         mono_assembly_load_corlib(), so it can be used by the initialization
19750         code.
19751         
19752         * domain-internals.h: Updated data structures and added declaration
19753         for mono_assembly_load_corlib.
19755 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
19757         * reflection.c (resolve_object): Fix the creation of the signature in 
19758         the SignatureHelper case.
19760         * assembly.c (mono_assembly_remap_version): Fix binary search.
19761         
19762 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
19764         * class.c: Added inheritance check when a method is overloaded (from a
19765         virtual method or when implementing an interface) and when a class is
19766         inherited. Added functions to set a failure for a class and to 
19767         retreive the exception from a failure.
19768         * class-internals.h: Added fields to MonoClass to keep the exception
19769         information status for inheritance (or other exceptions) to be thrown
19770         later (i.e. not at load time).
19771         * object.c: Throw the inheritance SecurityException when a type is to 
19772         be created with either class or method inheritance violations.
19773         * reflection.c|h: Fix when getting declsec from a class. Removed 
19774         unrequired code for class. Improved sanity in parameter naming.
19775         * security-manager.c|h: Added functions to check for class and method
19776         inheritance.
19778 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
19780         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
19781         and has_finalize in dynamic types as well.
19783 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
19785         * culture-info-table.h : fixed currency format for en-GB (and so on).
19787 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
19789         * gc.c: ensure the GC handles never have 0 as a value.
19791 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
19793         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
19794         a pointer to a struct to unmanaged code. Fixes #72625.
19796 2005-02-16  Martin Baulig  <martin@ximian.com>
19798         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
19800 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
19802         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
19804 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
19806         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
19808         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
19809         UnmanagedFunctionPointerAttribute, use it for determining calling convention
19810         etc. Fixes #71471.
19812         * reflection.c (mono_custom_attrs_get_attr): New helper function.
19814         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
19816 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
19818         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
19819         changes to make the current context a field in MonoThread.
19821 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
19823         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
19824         the last change.
19825         
19826         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
19827         extracted from mono_marshal_get_native_wrapper.
19829         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
19830         to create wrappers around native functions.
19832         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
19833         delegates for arbitrary function pointers. Fixes #71472.
19835 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
19837         * threads.c: cleaned up the code a little.
19839 2005-02-15  Martin Baulig  <martin@ximian.com>
19841         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
19842         the data table.
19844         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
19845         allocate larger chunks if needed.
19847 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
19849         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
19850         in by mistake.
19852 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
19854         * domain.c: keep the domains in an array and ensure the domain ids
19855         are kept small, so they can be used as indexes to domain-specific data
19856         with a small memory overhead.
19858 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
19860         * icall.c: Handle byref types in Type icalls. Fixes #72544.
19862 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
19864         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
19866 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
19868         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
19870         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
19871         values.
19873         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
19874         
19875 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
19877         * domain-internals.h: add the hashtable here.
19879         * class-internals.h: Remove `info' from MonoMethod
19881         * domain.c: Add a new hashtable, jit_trampoline_hash
19883 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
19885         * object.c: don't set the value of static fields
19886         (fixes bug#72494).
19888 2005-02-11  Martin Baulig  <martin@ximian.com>
19890         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
19891         (mono_debug_add_method): Silently ignore the method if it's too big.
19892         (mono_debug_add_type): Likewise.
19894 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
19896         * threads.c, appdomain.c: remove #ifdefs from the code.
19898 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
19900         * metadata-internals.h: Added flags to MonoAssembly to cache the most
19901         common security informations. This allows us to stay in unmanaged code
19902         when doing LinkDemand and it's special cases (except for the first 
19903         time for initialization). The flags a very much used with --security.
19904         * reflection.c|h: Added code to get declarative security attributes 
19905         for LinkDemand and InheritanceDemand. This required to refactor the
19906         existing code for Demand.
19907         * security-manager.c|h: Added new method fields for the special cases
19908         of LinkDemand.
19910 2005-02-10  Martin Baulig  <martin@ximian.com>
19912         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
19913         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
19915 2005-02-10  Martin Baulig  <martin@ximian.com>
19917         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
19918         debugging code; this is almost a complete rewrite.
19920         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
19922 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19924         * domain.c, object.h: expose mono_string_equal () and 
19925         mono_string_hash ().
19926         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
19927         it's implemented in managed code.
19929 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19931         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
19932         lo leak objects between appdomains.
19934 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19936         * assembly.c: old compilers compilation fix from 
19937         robertj@gmx.net (Robert Jordan).
19939 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
19941         * class-internals.h: Little reminder for the future.
19943         * debug-helpers.c: Fix up wrapper_type_names
19945 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19947         * image.c, metadata-internals.h: when loading an image from a file,
19948         mmap all of it and use the same codepaths as when using a
19949         in-memory image: the code is simpler and we use less memory
19950         (both writable and readonly).
19952 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
19954         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
19955         API to alloc runtime data structures that need to be tracked by the
19956         GC and contain pointers.
19957         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
19958         make the code more readable and eventually use a different GC.
19960 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
19962         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
19963         for out arguments.
19964         
19965 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
19967         * object.c: In release_type_locks(), don't release the cctor lock
19968         if it has already been released. This fixes a crash in the
19969         thread5 test.
19971 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19973         * gc.c, marshal.c, icall.c: register a delegate for finalization
19974         only when the native function pointer has been allocated for it.
19976 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
19978         * object.c: cleaned up some code, allocate objects that are
19979         pointer free with the atomic malloc variant. Allocate memory
19980         for static data from the mempool if it's pointer-free.
19981         Allocate the bounds array at the end of the array data, when needed.
19982         * object-internals.h, object.h: move a private function in a private
19983         header.
19984         * class.c: handle missing case in tracking references in fields.
19986 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
19988         * class.c, class-internals.h: keep track if a type has
19989         reference fields in either the instance or static fields.
19991 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
19993         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
19994         and renamed to MonoRuntimeInfo. Added fields to store the expected
19995         framework assembly version. Changed mono_get_framework_version and
19996         mono_get_runtime_version for a single mono_get_runtime_info method.
19997         
19998         * assembly.c: Added method to remap system assembly versions to the
19999         current executing runtime version. Removed old mapping code.
20000         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
20001         
20002         * icall.c, reflection.c: Track api changes.
20004 2005-02-06  Miguel de Icaza  <miguel@novell.com>
20006         * loader.c (method_from_memberref): Improve error reporting,
20007         produce the class name instead of the typeref/typedef index. 
20009 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
20011         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
20013 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
20015         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
20016         stdcall and charset name mangling.  Reorganize the code and add
20017         some tracing stuff.
20019 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
20021         * monodiet.c: More iters!
20023         * marshal.c: Iter usage.
20025         * icall.c: Iter usage.
20027         * object.c: Use iters.
20029         * debug-helpers.c: More iters
20031 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
20033         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
20034         under win32.
20036 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
20038         * mono-debug-debugger.c: use iters
20040         * class.c, class-internals.h: mono_class_setup_events is static
20041         now
20043         * All callers: use iters
20045 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
20047         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
20048         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
20050 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
20052         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
20054         * marshal.h: Add prototypes for ldfld/stfld_remote.
20056         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
20057         this is called during startup.
20058         
20059 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
20061         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
20062         MonoThreadsSync struct private in monitor.c. Changed the way
20063         MonoThreadsSync is allocated so it's faster and there is no
20064         need to keep track of it with a finalizer and it uses less memory.
20065         This also finally allows us to allocate mono objects as ptrfree when
20066         there are no reference fields.
20068 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
20070         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
20071         disappearing link to the GC interface and use them to simplify
20072         the gchandles code.
20074 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
20076         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
20077         stfld_remote which call mono_load/store_field_new. This allows methods
20078         calling ldfld/stfld wrappers to be AOTed.
20080         * console-io.c: Include sys/filio.h under solaris.
20081         
20082         * console-io.c: Include curses.h if needed correctly.
20084 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
20085         
20086         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
20087         method->klass as well.
20089         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
20091         * class.c (mono_class_init): Switch on lazy initialization of 
20092         methods.
20094         * class.c (mono_class_get_finalizer): Handle the case when the 
20095         finalizer is inherited.
20097 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20099         * console-io.c: <curses.h> is needed by term.h on solaris.
20101 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
20103         * icall.c, class-internals.h, monodiet.c, class.c: Remove
20104         mono_class_setup_properties where possible. Remove this ftn from
20105         the header file, and make it static.
20107 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
20109         * loader.c: Add missing setup_... call.
20111         * class.c: Add missing setup_... calls.
20113         * class.c (mono_class_init): Switch on lazy initialization of 
20114         the generic vtable.
20115         
20116         * class.c (mono_class_init): Fix generics broken by the recent changes.
20118         * monodiet.c (handle_type): Add missing setup_... calls.
20120         * class.c: Back out garbage in previous patch.
20121         
20122         * class.c: Add missing setup_... calls.
20124         * class.c (mono_class_get_method_from_name_flags): Avoid calling
20125         mono_class_setup_methods () if possible.
20127         * class-internals.h (MonoClass): Add 'has_cctor' flag.
20129         * class-internals.h (MonoCachedClassInfo): New structure.
20131         * class.c: Initialize properties and events fields of MonoClass lazily.
20133         * class.c: Add infrastructure for lazily initializing the methods and
20134         vtable fields of MonoClass. Not yet used.
20136         * class.c (mono_class_get_finalizer): New helper function.
20138         * class.c: Add infrastructure for loading some class related data from
20139         an AOT file.
20141         * object.c: Add infrastructure for initializing the vtable from data
20142         in the AOT file.
20144         * gc.c (run_finalize): Use mono_class_get_finalizer ().
20146         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
20147         appropriate initialization function before accessing parts of the
20148         MonoClass structure.
20150         * marshal.c: Fix warnings.
20151         
20152         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
20154         * mono-debug-debugger.c (get_exception_message): Use 
20155         mono_class_get_method_from_name_flags ().
20157 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
20159         * reflection.c, appdomain.c: Replace a few manual searches that
20160         Zoltan missed. (Paolo approved this part of my initial patch).
20162 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
20164         * profiler.c: disable recording statistical events at report time.
20166 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20168         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
20169         to byteswap arrays of enum values, too (bug #72080).
20171 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
20173         * appdomain.c (set_domain_search_path): Allow this to be called if
20174         domain->setup is not yet set.
20176         * loader.c (mono_method_get_index): New helper function.
20178         * loader.c reflection.c: Use mono_method_get_index ().
20180         * class.c (mono_class_get_method_from_name_flags): New helper method.
20182         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
20183         this.
20185         * class.c (mono_class_get_cctor): New helper method.
20187         * string-icalls.c object.c class.c marshal.c reflection.c: Use
20188         mono_class_get_method () to look up methods.
20190 2005-02-01  Miguel de Icaza  <miguel@novell.com>
20192         * console-io.c: Fix the build, this should work on Windows.
20194 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
20196         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
20197         be set to null to keep things valid
20199 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20201         * icall.c: added Console 2.0 icalls.
20202         * Makefile.am: added console-io.[ch]
20203         * console-io.[ch]: internal calls for Console 2.0 API.
20205 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20207         * class.c: make sure we consider all the interfaces
20208         when calculating max_interface_id (bug found by
20209         Jeroen Frijters running ikvm).
20211 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
20213         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
20214         valuetype fields to null.
20216         * object.c (set_value): Ditto. Fixes #71669.    
20218 2005-01-31  Martin Baulig  <martin@ximian.com>
20220         * metadata.c (mono_metadata_has_generic_params): New public
20221         function; checks whether something is a generic method.
20223 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
20225         * appdomain.c: fix infinite recursion when adding assemblies.
20227 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
20229         * object.c: Fix small typo to return all items for Environment.
20230         GetCommandLineArgs.
20232 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20234         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
20235         reflection.c: more domain and assembly-unload related fixes
20236         and memory leaks plugs.
20238 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
20240         * 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.
20242 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
20244         * loader.c (mono_method_signature): Make this method lazy
20245         (mono_get_method_from_token): Don't computate the signature here.
20247         Doing this saves quite a bit of memory. I got 90 kb on starting up
20248         monodoc. It should also save some disk reads on startup.
20250         * *: MonoMethod->signature might be NULL now. You *MUST* use
20251         mono_method_signature.
20253 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
20255         * object.c (mono_runtime_get_main_args): Return an array from the
20256         current domain here. Fixes #71938.
20258 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20260         * monitor.c: formatting changes to comply with the
20261         mono coding style and remove #ifdefs from the code.
20263 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20265         * metadata.c, private.h: remove some unneeded data
20266         and use a more compact representation for table schemas.
20268 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
20270         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
20271         to get a better distribution in hash tables.
20272         * *.c: use mono_aligned_addr_hash() where appropriate.
20273         * assembly.c: make var static.
20275 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
20277         * domain-internals.h: Put MonoJitInfo on a diet.
20279         * domain.c: Fix a warning.
20281 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20283         * gc.c: rework the gc handles code to reuse handles
20284         when freed.
20286 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
20288         * domain.c: fixed long standing bug in mono_string_equal() which
20289         was brought to light with the ldstr changes.
20291 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
20293         * reflection.c: Remove warning by adding missing include for marshal.h
20295 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
20297         * domain.c, object.c: change the ldstr_table to hold
20298         MonoString* as keys: makes the runtime isinterned lookup
20299         faster and simplifies memory management.
20301 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
20303         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
20304         possible to add imperative security checks before calling the icall.
20305         * reflection.c: Return security attributes on the original MonoMethod
20306         (and not the wrapped one). This fix permissions on icalls.
20308 2005-01-25  Dick Porter  <dick@ximian.com>
20310         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
20311         the check for mktime() support actually test the mktime() return
20312         value.  "Fixes" bug 71682, though the output is still different to
20313         MS.
20315 2005-01-25  Martin Baulig  <martin@ximian.com>
20317         * class.c (mono_class_is_assignable_from): Make this work for
20318         generic instances.
20320 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
20322         * marshal.c (mono_string_utf8_to_builder)
20323         (mono_string_builder_to_utf16): We might not have ownership of the
20324         string. In thise case, we need to create a new buffer.
20326         * object-internals.h (mono_stringbuilder_capacity): sb->str might
20327         be null, in which case, use the default capacity.
20329 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20331         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
20332         GC events to the profiler.
20334 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20336         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
20337         if you don't want the GC to run.
20339 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
20341         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
20342         start providing a GC API and keeping different implementations in
20343         their own file.
20344         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
20346 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
20348         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
20349         mmap rather than allocating a huge buffer.
20350         (mono_debug_close_mono_symbol_file): Free the buffer allocated
20351         above.
20353 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
20355         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
20356         and CheckExecutionRights.
20357         * reflection.c|h: Keep the index of the declarative security to be 
20358         used, instead of the pointer, when AOT compiler is used. Also add 
20359         class initialization when requesting demands.
20360         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
20361         CheckExecutionRights. Both properties are now FALSE by default, and
20362         unmodifiable, unless the --security option is used.
20364 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20366         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
20367         reflection.c: properly refcount images and assemblies, many leaks fixed.
20369 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20371         * threadpool.c: increase the timeout for threads in the thread pool to
20372         10s.  Fixes bug #67159.
20374 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
20376         * class-internals.h: Sun's compiler insists on explicit
20377         signed on bit fields to handle then correctly.
20379 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
20381         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
20382         Make the size of the array fit only the number of invalid path
20383         chars that we have.
20385         * class.c (_mono_class_get): Improve the error reporting when a
20386         class referenced is not found, to assist debugging. 
20388 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
20390         * threads.c: fix off-by-one error.
20391         * domain.c: free data allocated in the domain.
20393 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
20395         * reflection.c (mono_method_body_get_object): Fill out exception info
20396         as well.
20398         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
20399         structure.
20400         
20401 2005-01-19  Martin Baulig  <martin@ximian.com>
20403         * loader.c (mono_get_method_constrained): Make this work again.
20405 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
20407         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
20408         guint16 to match the managed side.
20410         * reflection.c (mono_reflection_body_get_object): Fill out local
20411         variables array.
20413         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
20414         as well.
20416         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
20417         'local_var_sig_token'.
20419 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
20421         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
20422         System.Drawing.
20424         * reflection.c (mono_method_body_get_object): Handle abstract and
20425         runtime methods.
20427 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
20429         * marshal.c, loader.c, class-internals.h, reflection.c:
20430         store the emthod data for a wrapper in an array instead of a list.
20432 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
20434         * marshal.c: change the code to allocate memory more
20435         conservatively for method wrappers.
20437 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
20439         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
20440         fields from MonoClass to the marshal info structure where they belong.
20442 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20444         * class.c, object.c, class-internals.h, marshal.c: rearrange
20445         some fields and tweak some types to lower memory usage.
20447 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
20449         * threads.c (signal_thread_state_change): Handle the case when the
20450         target thread is the current thread.
20452         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
20454         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
20455         emit_ptr_to_object_conv. 
20457         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
20458         marshalling. Fixes #71352.
20460 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20462         * metadata.h, blob.h: move table enum to blob.h so it can be included
20463         in any header.
20464         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
20465         cut the size of MonoImage/MonoDynamicImage.
20467 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
20469         * profiler.c (mono_profiler_install_simple): Fix default arguments.
20471 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
20473         * reflection.c, reflection.h, icall.c: add a function to check
20474         if an attribute type is defined for a metadata object.
20476 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
20478         * object-internals.h: Added some needed fields from StringBuilder class.
20479         * marshal.c: Set the maxCapacity when creating a StringBuilder.
20481 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
20483         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
20484         threads before shutting down the runtime.
20486         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
20488 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20490         * object-internal.h, threads.c: implement stacksize and 
20491         parameterized thread start functionality (requires
20492         matching corlib). Marked broken code for later removal.
20494 2005-01-12  Martin Baulig  <martin@ximian.com>
20496         * class-internals.h (MonoGenericClass): Moved the `initialized'
20497         flag to MonoDynamicGenericClass, removed `init_pending'.
20498         (MonoGenericInst): Added `is_reference' flag.
20500 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
20502         * reflection.c (mono_image_create_pefile): Only set the pe_offset
20503         inside the MSDOS header. Fixes #71201.
20505         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
20506         gc thread.
20507         (mono_domain_finalize): Ditto.
20509 2005-01-12  Martin Baulig  <martin@ximian.com>
20511         * class.c (mono_get_shared_generic_class): Use the cache for
20512         non-dynamic generic classes.
20514         * class-internals.h (mono_class_create_generic_2): Removed
20515         function prototype, this function is now static inside class.c.
20517         * class.c (mono_class_create_generic_2): Made this static, only
20518         call it from mono_class_init() and mono_class_setup_parent().
20519         (collect_implemented_interfaces_aux): Call mono_class_init() on
20520         the interfaces we collect.
20521         (mono_class_setup_vtable): Call mono_class_init (class->parent).
20523 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
20525         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
20526         it a real thread handle.
20528         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
20529         MonoJitExceptionInfo, since each catch clause needs its own variable.
20530         
20531 2005-01-11  Dick Porter  <dick@ximian.com>
20533         * image.c (mono_pe_file_open): New variant on mono_image_open()
20534         that does not set up the CLI metadata; used for FileVersionInfo so
20535         it can get the data for windows binaries too.
20536         
20537         * process.c (process_read_string_block): Don't read off the end of
20538         the StringTable block.
20540         These both fix bug 70766.
20542 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
20544         * gc.c: set some fields to NULL at GC cleanup time.
20545         * threads.c: if we quit the main thread, call exit ().
20547 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
20549         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
20551 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
20553         * threads.h, threads.c, object.c: added accessor and settor for
20554         main_thread. Handle it specially when exiting from it: wait
20555         for other foreground threads to exit.
20557 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
20559         * process.c, verify.c: remove some bloat.
20561 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
20563         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
20564         the calling convention to cdecl under win32.
20566 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
20568         * object.c (mono_object_get_size): New function to get the size of
20569         an object instance.
20571         * profiler.c (simple_allocation): Use above.
20573 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
20575         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
20576         ves_icall_System_AppDomain_getRootDomain (as it's not required to
20577         get an appdomain by it's id and we can't assume the root's id is 0).
20578         * domain-internals.h: Change the function prototype to match.
20579         * icall.c: Change the icall table for AppDomain.
20581 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
20583         * locales.c (string_invariant_compare_char): Only compute
20584         GUnicodeTypes in the case where we need them.  Test for ordinality
20585         first and return if so.
20587         From the commit:
20589                 /*
20590                  * FIXME: here we must use the information from c1type and c2type
20591                  * to find out the proper collation, even on the InvariantCulture, the
20592                  * sorting is not done by computing the unicode values, but their
20593                  * actual sort order.
20594                  */
20596 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20598         * loader.c: for P/Invoke methods, allow the "Internal" shared
20599         library name to refer to the calling process symbol namespace.
20601 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
20603         * Makefile.am: Add the security manager to the build.
20604         * security-manager.c|h: New. Initialization of the security manager.
20606 2005-01-07  Dick Porter  <dick@ximian.com>
20608         * threads.c: 
20609         * monitor.c: Update thread state during Monitor and WaitHandle
20610         waits.  Fixes bug 71031.
20612 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
20614         * reflection.c (property_encode_signature): Correctly handle when the
20615         property has no methods.
20617 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
20619         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
20620         
20621         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
20622         fields from mb, not rmb. Fixes #71017.
20624         * marshal.c (emit_ptr_to_str_conv): Add support for 
20625         ByValTStr -> string conversion. Fixes #71015.
20627         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
20629         * mempool.c (mono_mempool_contains_addr): New helper function.
20631 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20633         * metadata.c (mono_metadata_compute_size): Fix size calculation of
20634         HasSematics encoded fields.
20635         
20636         * metadata.c (mono_type_to_unmanaged): Improve error message for 
20637         invalid string marshalling.
20639         * metadata.c: Fix warnings.
20640         
20641 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20643         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
20644         profiler support.
20646 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20648         * domain.c object.c domain-internals.h: Revert part of r38077 since the
20649         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
20650         tests.
20652 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
20654         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
20655         so methods containing these can be AOTed.
20657 2005-01-03  Martin Baulig  <martin@ximian.com>
20659         * loader.c (find_method): Removed the hack for generic instances.
20660         (method_from_memberref): If our parent is a generic instance, pass
20661         its generic type definition to find_method() and then inflate the
20662         method.
20663         (mono_get_method_constrained): Pass the generic type definition to
20664         find_method() and inflate the method later.
20666         * class-internals.h (MonoStats): Added `generic_class_count'.
20668         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
20669         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
20671         * reflection.c (mono_custom_attrs_from_params): Don't ignore
20672         generic type definitions.
20674 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
20676         * loader.c icall.c: Fix warnings.
20678 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
20680         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
20681         blittable types. Fixes #70864.
20683 2004-12-29  Martin Baulig  <martin@ximian.com>
20685         * icall.c
20686         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
20688         * reflection.c (mono_method_get_object): Create a
20689         "System.Reflection.MonoGenericMethod" for inflated methods; don't
20690         call mono_get_inflated_method().
20692         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
20694 2004-12-27  Martin Baulig  <martin@ximian.com>
20696         * class-internals.h (MonoMethod): Added `is_inflated' flag.
20697         (MonoMethodInflated): Added `inflated' field.
20699         * class.c (mono_class_inflate_generic_method): Don't really
20700         inflate the method here; just set the `is_inflated' flag in the
20701         MonoMethod.
20702         (mono_class_get_inflated_method): Actually inflate the method here
20703         if it's not already inflated; we use the MonoMethodInflated's new
20704         `inflated' field as a cache.
20706 2004-12-26  Martin Baulig  <martin@ximian.com>
20708         * class.c
20709         (inflate_generic_class): Moved some code out of inflate_generic_type().
20710         (mono_class_inflate_generic_method): If we're already inflated,
20711         inflate the context and use the declaring method; ie. make sure
20712         the declaring method of an inflated method is always the generic
20713         method definition.
20714         (mono_class_create_from_typedef): Create
20715         `class->generic_container->context->gclass'.
20717 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
20719         * metadata-internals.h, marshal.c, reflection.c: More
20720         MonoGHashTable->GHashTable.
20722         * domain-internals.h, class.c: Change MonoGHashTable's into
20723         GHashTables for some cases where no gc stuff is used
20725         All users: update apis
20727 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
20729         * metadata.c (builtin_types): Make this `const'. Makes this get
20730         put into the shareable section.
20731         (mono_metadata_init): Casts to make gcc happy.
20733 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
20735         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
20737 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
20739         * icall.c: Added an internal call to retrieve the position and length
20740         of assembly-level declarative security attributes (RequestMinimum, 
20741         RequestOptional and RequestRefuse). This is used by the Assembly class
20742         to re-create the corresponding permission sets.
20744 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
20746         * marshal.c: fix the stelemref wrapper to be type correct
20747         (and faster).
20749 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
20751         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
20752         to do key & 0x7fffffff. Hashtable already does this. It just
20753         results in longer code.
20755 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
20757         * appdomain.c: Bump corlib version.
20758         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
20759         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
20760         * reflection.c|h: Add functions to get declarative security infos
20761         (blob position and length) for assemblies, classes and methods.
20763 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
20765         * reflection.c: sort the constant table (bug #70693).
20767 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
20769         * object-internals.h, threads.c, domain.c: add accessors for
20770         the MonoThread and MonoDomain tls keys.
20772 2004-12-18  Martin Baulig  <martin@ximian.com>
20774         * class.c (inflate_generic_type): If we're inflating a generic
20775         instance, set `ngclass->context->container = context->container';
20776         ie. the container we inflated into.
20778         * metadata.c (mono_metadata_parse_generic_param): Reflect above
20779         inflate_generic_type() changes.
20781 2004-12-17  Martin Baulig  <martin@ximian.com>
20783         * class-internals.h
20784         (MonoGenericClass): Replaced `MonoType *generic_type' with
20785         `MonoClass *generic_class'.  Removed `dynamic_info'; if
20786         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
20787         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
20789 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
20791         * exception.c (mono_exception_from_token): New helper function.
20793 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
20795         * assembly.c (mono_assembly_load_with_partial_name): Call 
20796         mono_assembly_loaded before invoking the preload hooks. Fixes
20797         #70564.
20799         * object-internals.h (MonoThread): Change culture_info and 
20800         ui_culture_info into an array.
20802         * threads.c: Cache culture info objects from more than one appdomain.
20804         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
20805         current UI culture.
20807 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
20809         * threads.h threads.c appdomain.c: Clear the culture_info field of
20810         all threads during unloading if they point to an object in the dying
20811         appdomain.
20813 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
20815         * culture-info.h (TextInfoEntry): New struct
20816         * object-internals.h: sync with managed
20817         * locales.c: fill the `text_info_data' field
20818         * culture-info-tables.h: update
20820 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20822         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
20823         collector.
20825 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
20827         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
20828         (ves_icall_ModuleBuilder_getMethodToken): Ditto
20830 2004-12-12  Martin Baulig  <martin@ximian.com>
20832         * mono-debug-debugger.c (write_type): If we're an enum and the
20833         builtin types have already been initialized, call mono_class_init().
20835 2004-12-11  Martin Baulig  <martin@ximian.com>
20837         * metadata.c (mono_metadata_load_generic_params): Added
20838         `MonoGenericContainer *parent_container' argument; automatically
20839         compute `container->is_method'; pass the correct owner to
20840         get_constraints().      
20842         * reflection.c (compare_genericparam): Sort the GenericParam table
20843         according to increasing owners. 
20845 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
20847         * profiler.c: allow disabling the default profiler.
20849 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
20851         * decimal.c, icall.c: allow disabling System.Decimal support.
20853 2004-12-09  Marek Safar <marek.safar@seznam.cz>
20855         * reflection.c: Add support for null attribute arguments.
20857 2004-12-09  Martin Baulig  <martin@ximian.com>
20859         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
20860         names to get rid of compiler warnings.
20862 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
20864         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
20865         mono_marshal_load_type_info (). Fixes #69625.
20866         (mono_marshal_get_ptr_to_struct): Likewise.
20868 2004-12-08  Martin Baulig  <martin@ximian.com>
20870         * mono-debug.h: Bumped version number to 47.
20872         * mono-debug-debugger.c
20873         (mono_debugger_event_handler, mono_debugger_event): Take two
20874         guint64 arguments insteed of a gpointer and a guint32.  
20876 2004-12-08  Martin Baulig  <martin@ximian.com>
20878         * debug-mono-symfile.h
20879         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
20880         `address' to `native_offset'.
20882 2004-12-08  Martin Baulig  <martin@ximian.com>
20884         * class.c (mono_class_create_from_typespec): Only inflate if we
20885         either have `context->gclass' or `context->gmethod'.
20887 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
20889         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
20891         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
20893         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
20895         * reflection.c (mono_assembly_get_object): Remove the workaround put
20896         in for the release.
20897         
20898         * appdomain.c: Use the corlib_internal field from MonoAssembly.
20900         * appdomain.c: Bump corlib version.
20902         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
20903         be visible in other appdomains.
20905 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
20907         * threads.c: Interlocked inc and dec for longs were messed up,
20908         use a KISS based impl for this. Fixes 70234
20910 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
20912         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
20914 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
20916         * icall.c: fix to follow policy not to allow struct
20917         arguments in icalls.
20919 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20921         * process.c: make the patch that handles spaces in file paths work
20922         on mono/windows too.
20924 2004-12-06  Martin Baulig  <martin@ximian.com>
20926         * class.c (mono_class_create_generic): Call
20927         mono_class_setup_supertypes() if we're dynamic.
20928         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
20930 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
20932         * object-internals.h: Add new fields to MonoThread.
20934         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20936         * icall.c threads-types.h threads.c: Add new icalls.
20938         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
20940         * object-internals.h (MonoReflectionAssembly): Sync object layout with
20941         managed side.
20943         * appdomain.c: Bump corlib version.
20945         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
20946         internal assemblies. Fixes #69181.
20948 2004-12-05  Martin Baulig  <martin@ximian.com>
20950         * class.c (mono_class_inflate_generic_signature): Make this a
20951         no-op if `context' is NULL or we don't have any type parameters;
20952         also copy `sentinelpos'.        
20954 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
20956         * image.c: Add unbox_wrapper_cache.
20958         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
20960         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
20961         function generator.
20962         
20963         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
20964         Fixes #70173.
20966         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
20967         
20968 2004-12-04  Martin Baulig  <martin@ximian.com>
20970         * loader.c (mono_method_get_signature_full): New public function;
20971         like mono_method_get_signature(), but with an additional
20972         `MonoGenericContext *' argument.
20974         * class.c (mono_class_inflate_generic_signature): Formerly known
20975         as inflate_generic_signature(); make this public.
20977 2004-12-04  Martin Baulig  <martin@ximian.com>
20979         * metadata.c
20980         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
20981         instead of a `MonoGenericContainer *'.  
20982         (mono_metadata_parse_array_full): Likewise.
20983         (mono_metadata_parse_signature_full): Likewise.
20984         (mono_metadata_parse_method_signature_full): Likewise.
20985         (mono_metadata_parse_generic_inst): Likewise.
20986         (mono_metadata_parse_generic_param): Likewise.
20987         (mono_metadata_parse_mh_full): Likewise.
20988         (mono_type_create_from_typespec_full): Likewise.
20990 2004-12-03  Martin Baulig  <martin@ximian.com>
20992         * class-internals.h (MonoGenericContainer): Replaced the
20993         `MonoGenericContext * pointer with a `MonoGenericContext'
20994         structure and made it the first element.
20996 2004-12-03  Martin Baulig  <martin@ximian.com>
20998         * class.c
20999         (inflate_generic_type): Set the `context->container' when creating
21000         a new MonoGenericContext.
21001         (mono_class_inflate_generic_method): Likewise.
21002         (mono_class_create_from_typespec): Just use `context->container'
21003         to get the container.
21005         * loader.c (method_from_methodspec): Set `context->parent' from
21006         `context->container' - and if that's a method container, use its
21007         parent.  Also set the `context->container' when creating a new
21008         MonoGenericContext.
21009         (mono_get_method_from_token): Use just `context->container' to get
21010         the container.
21012         * metadata.c (do_mono_metadata_parse_generic_class): Also set
21013         `gclass->context->container'.
21015         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
21016         the `context->container' when creating a new MonoGenericContext.
21018 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
21020         * reflection.c (compare_genericparam): Sort params with identical
21021         owner by their number. Fixes gen-111 on sparc.
21023 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
21025         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
21026         around the domain changes.
21028         * appdomain.c (mono_domain_unload): Handle the case when the thread
21029         calling Unload is itself being aborted during unloading. Fixes #70022.
21031         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
21033         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
21034         checkpoint_func as an icall so it gets a wrapper.
21035         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
21036         in the cross-appdomain wrappers too.
21038         * threads.c (mono_thread_has_appdomain_ref): Make this public.
21040         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
21042         * reflection.c: Fix some memory leaks.
21043         
21044 2004-12-02  Martin Baulig  <martin@ximian.com>
21046         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
21048         * metadata.c (generic_class_cache): New static hashtable.
21049         (mono_metadata_lookup_generic_class): New public method.
21051 2004-12-02  Martin Baulig  <martin@ximian.com>
21053         * class.c (mono_class_create_from_typedef): Call
21054         mono_class_setup_parent() and mono_class_create_mono_type() before
21055         parsing the interfaces.
21057 2004-12-02  Martin Baulig  <martin@ximian.com>
21059         * metadata.c (generic_inst_cache): New static hashtable.
21060         (mono_metadata_lookup_generic_inst): New public function.
21061         (mono_metadata_inflate_generic_inst): New public function.
21062         (mono_metadata_parse_generic_inst): New public function.
21063         (do_mono_metadata_parse_generic_class): Use the new
21064         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
21065         since this'll also use the cache.
21067         * reflection.c (mono_reflection_bind_generic_method_parameters):
21068         Use mono_metadata_lookup_generic_inst() to use the new cache.
21070         * class.c (inflate_mono_type): Use
21071         mono_metadata_inflate_generic_inst() to inflate a generic
21072         instance; this'll also use the new cache.
21074         * loader.c (method_from_methodspec): Use
21075         mono_metadata_parse_generic_inst() and
21076         mono_metadata_inflate_generic_inst() rather than parsing it
21077         manually, so we can use the new cache.
21079 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
21081         * threads.c (wait_for_tids): Do not incorrectly free threads when 
21082         the wait times out.
21084 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21086         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
21087         iter->args based on whether parameters are passed in registers (i.e.
21088         MONO_ARCH_REGPARMS is defined)
21090 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
21092         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
21093         the exception message. Fixes #70070.
21094         (method_from_methodspec): Fix warnings.
21096 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21098         * process.c: (complete_path) return the path quoted
21100 2004-12-01  Martin Baulig  <martin@ximian.com>
21102         * class-internals.h (MonoGenericInst): New structure.
21103         (MonoGenericClass): Replaced `type_argc', `type_argv' and
21104         `is_open' with `MonoGenericInst *inst'.
21105         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
21106         `is_open' with `MonoGenericInst *inst'.
21108 2004-11-30  Martin Baulig  <martin@ximian.com>
21110         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
21112         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
21113         to `generic_class_cache'.
21115         * metadata.c
21116         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
21117         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
21118         (mono_generic_inst_is_valuetype): Renamed to
21119         mono_generic_class_is_valuetype().
21121         * class-internals.h
21122         (MonoGenericInst): Renamed to MonoGenericClass.
21123         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
21124         (MonoClass): Renamed `generic_inst' to `generic_class'.
21125         (MonoGenericContext): Renamed `ginst' to `gclass'.
21127         * object-internals.h
21128         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
21130         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
21131         mono_reflection_generic_class_initialize().
21133         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
21134         now known as "System.Reflection.MonoGenericClass".
21135         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
21137 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
21139         * class-internals.h: Added a flag field to MonoClass to cache the
21140         declarative security attributes actions associated with the class.
21141         * domain-internals.h: Added booleans to MonoJitInfo to cache the
21142         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
21143         applicable to the JITted method.
21144         * reflection.c|h: Added functions to extract (as flags) which security
21145         actions are available (declaratively) for a method, class or assembly.
21146         * metadata.c|h: Added functions to search the declarative security
21147         table in the metadata.
21148         
21149 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
21151         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
21152         EXPORTEDTYPES are already in the class name cache, so there is no
21153         need to add extra code here to look at them. Just removes a bit of
21154         cruft.
21156         (ves_icall_System_Environment_get_TickCount): No need for #if
21157         WINDOWS. We already have the code in io-layer.
21159 2004-11-28  Martin Baulig  <martin@ximian.com>
21161         * loader.c
21162         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
21163         Fixes gen-112.cs.
21165 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
21167         * assembly.c (do_mono_assembly_open): Instead of having a
21168         conditional WITH_BUNDLE, incorporate support for bundles here, by
21169         having a global `bundles' variable holding a pointer to the actual
21170         bundles. 
21172         (mono_register_bundled_assemblies): New API call used by the
21173         bundle code. 
21175         See mkbundle.1 for details.
21176         
21177 2004-11-27  Martin Baulig  <martin@ximian.com>
21179         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
21180         the vtable for generic methods.
21182 2004-11-26  Martin Baulig  <martin@ximian.com>
21184         * metadata.c
21185         (mono_metadata_generic_method_hash): New public function.
21186         (mono_metadata_generic_method_equal): Likewise.
21188         * class-internals.h
21189         (MonoGenericContainer): Added `GHashTable *method_hash'.
21191         * reflection.c (ReflectionMethodBuilder): Added
21192         `MonoGenericContainer *generic_container'.
21193         (reflection_methodbuilder_to_mono_method): Don't create a new
21194         MonoGenericContainer each time we're called.
21195         (mono_reflection_bind_generic_method_parameters): Use
21196         `container->method_hash' to cache the results so we don't create a
21197         different method if we're called several times with the same
21198         arguments.
21200         * loader.c (method_from_methodspec): Use the new
21201         `container->method_hash' here, too.
21203 2004-11-26  Martin Baulig  <martin@ximian.com>
21205         * class.c (inflate_generic_signature): Correctly compute
21206         `res->has_type_parameters'.
21207         (mono_class_vtable): Use the `has_type_parameters' flag to
21208         determine whether we're a generic method.
21210         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
21212 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
21214         * object.c (mono_runtime_run_main): Fix a small memory leak.
21216 2004-11-25  Martin Baulig  <martin@ximian.com>
21218         * class.c (set_generic_param_owner): Fixed the loop.
21220 2004-11-25  Martin Baulig  <martin@ximian.com>
21222         * object.c (mono_class_vtable): Don't create any JIT wrappers for
21223         generic methods.
21225 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
21227         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
21228         names. Fixes #69787.
21230 2004-11-24  Martin Baulig  <martin@ximian.com>
21232         * class.c (mono_class_create_generic_2): If we don't have a
21233         `ginst->parent', inflate `gklass->parent' to get our parent.
21235 2004-11-24  Martin Baulig  <martin@ximian.com>
21237         * reflection.c (compare_genericparam): Correctly sort the
21238         GenericParam table; fixes #69779.
21240 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
21242         * reflection.c: When writing a PE file, don't create a huge
21243         buffer in memory. Just write the arrays we have to the file.
21244         This reduces memory usage.
21246         * metadata-internals.h: MonoDynamicStream pefile is no longer used
21247         globally.
21249 2004-11-17  Martin Baulig  <martin@ximian.com>
21251         * class.c (mono_class_init): Don't setup `class->parent' for
21252         dynamic instances; moved this to mono_class_generic_2().
21253         (mono_class_create_generic): Also set `klass->inited' for dynamic
21254         generic instances.
21255         (mono_class_create_generic_2): Don't do anything for dynamic
21256         generic instances.  Set `klass->parent' here and also call
21257         mono_class_setup_parent() here. 
21259         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
21260         `MonoType *parent' argument; set `ginst->parent' before calling
21261         mono_class_create_generic_2(), so we set the correct parent.
21263 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
21265         * reflection.c: allow getting attributes from ModuleBuilder
21266         (used by ikvm).
21268 2004-11-17  Martin Baulig  <martin@ximian.com>
21270         * class.c (mono_class_create_from_typedef): If a type parameter is
21271         inherited from an outer class, set its owner to that class.
21273 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
21275         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
21276           for (int*) written size. This fixes bug #69592.
21278 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
21280         * icall.c: Added IsAuthenticodePresnet internal call.
21281         * image.c|h: New function that check a MonoImage for an Authenticode
21282         signature in the certificate PE data directory.
21283         * security.c|h: New internal call to ask the runtime if an 
21284         Authenticode signature seems referenced in the PE header.
21286 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
21288         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
21290         * reflection.c (mono_image_create_pefile): Free the assembly streams
21291         after writing out the assembly file.
21293         * object.c (mono_runtime_run_main): Fix small memory leak.
21295         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
21296         property access modifiers. Fixes #69389.
21298 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
21300         * domain.c, object.c, object-internals.h, domain-internals.h,
21301         object.h, marshal.c: keep dynamic code info per domain.
21303 2004-11-15  Martin Baulig  <martin@ximian.com>
21305         * class.c (mono_type_get_name_recurse): Put type arguments in
21306         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
21307         see bug #68387.
21309 2004-11-15  Martin Baulig  <martin@ximian.com>
21311         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
21312         (mono_class_setup_vtable): When computing `the_cname' for a
21313         generic instance, don't include the namespace since we'd otherwise
21314         add it twice.
21316 2004-11-15  Martin Baulig  <martin@ximian.com>
21318         * class.c (mono_class_create_generic): Changed return type to void.
21319         (mono_class_create_generic_2): New public function; setup
21320         `class->method', `class->field' and `class->interfaces' here
21321         instead of in mono_class_init().
21323         * class.h (mono_class_create_generic): Moved to class-internals.h.
21325 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
21327         * reflection.c (mono_image_create_pefile): take a file HANDLE.
21328         rather than writing to memory, write to this file. Right now,
21329         we are just writting into a buffer, and copying that. However
21330         we can avoid the buffer later.
21332         (mono_dynamic_stream_reset): new function
21334         * icall.c, object-internals.h: update for the above.
21336 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
21338         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
21339         have been using gc'd memory. First it is slower, unlikely
21340         the comment in the source code said, secondly, it increases
21341         our footprint to do it in the gc.
21343         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
21344         the method so that it does not have to copy to managed code.
21346 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
21348         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
21350 2004-11-12  Martin Baulig  <martin@localhost>
21352         * reflection.c (mono_image_create_token): Allow generic method
21353         definitions here, since they may appear in an `.override'; see
21354         gen-98/gen-99 for an example.
21356 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
21358         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
21359         #69365.
21361         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
21362         descriptive.
21364 2004-11-11  Martin Baulig  <martin@ximian.com>
21366         * class.c (mono_class_setup_vtable): In an explicit interface
21367         implementation, the method name now includes the arity.
21369 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
21371         * object.c (mono_array_full_copy): Fix warning.
21373 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
21375         * appdomain.c: Removed look_for_method_by_name(). Use the new method
21376         mono_class_get_method_from_name() instead.
21377         
21378         * class-internals.h: Added two new types of wrappers. 
21379         Added MonoRemotingTarget enum. Added new trampoline function type, which
21380         takes an additional MonoRemotingTarget value as parameter, so it is
21381         possible to request a trampoline for a specific target.
21382         
21383         * class.c: Added new mono_class_get_method_from_name() method.
21384         
21385         * class.h: In MonoRemoteClass, we can have now to vtables, one for
21386         general remoting sinks and one specific for cross domain calls.
21387         
21388         * debug-helpers.c: Added new wrapper names.
21389         
21390         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
21391         of a remote class.
21392         
21393         * image.c: Porperly delete value objects form the remoting invoke hashtable.
21394         
21395         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
21396         with several other methods (mono_marshal_get_xappdomain_dispatch,
21397         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
21398         and others) can generate a fast remoting wrapper for cross domain calls.
21399         More information can be found in docs/remoting.
21400         Other changes: Removed mono_find_method_by_name, and used
21401         mono_class_get_method_from_name instead.
21402         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
21403         is stored in the remoting invoke hashtable.
21404         
21405         * marshal.h: published the new method for getting the xdomain wrapper,
21406         and also added a method for getting the adequate wrapper for a given
21407         method and target.
21408         
21409         * object-internals.h, object.c: Added a couple of methods for capying and
21410         cloning arrays.
21411         Modified mono_install_remoting_trampoline, which takes the new remoting
21412         trampoline that has a remoting target as parameter.
21413         mono_class_proxy_vtable now also takes a remoting target as parameter, and
21414         will return the most suitable vtable for the target.
21415         Added mono_remote_class_vtable, which returns the vtable of a remote class
21416         (which can be the normal remoting vtable or the xdomain vtable).
21417         
21418         * threads.c: the xdomain invoke and dispatch wrappers must also be
21419         protected against interruptions.
21421 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21423         * icall.c: use memmove in BlockCopyInternal when the source and
21424         destination arrays are the same.
21426 2004-11-09  Martin Baulig  <martin@ximian.com>
21428         * class-internals.h (MonoGenericContainer): Removed `method' and
21429         `signature', replaced them with `is_method' and `is_signature'
21430         flags.  Added `context'.
21432         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
21433         instead of a `MonoGenericContainer *'.
21435         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
21436         for dynamic type parameters.
21437         (mono_metadata_load_generic_params): Setup `container->context'.
21439         * reflection.c (mono_reflection_setup_generic_class): Setup
21440         `tb->generic_container->context'.
21441         (do_mono_reflection_bind_generic_parameters): Use
21442         mono_class_inflate_generic_type() to correctly inflate types,
21443         rather than using our own hack just for MONO_TYPE_VAR.
21445 2004-11-09  Martin Baulig  <martin@ximian.com>
21447         * class.c (mono_class_inflate_generic_method): Small fix; don't
21448         crash here.
21450         * icall.c
21451         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
21452         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
21453         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
21454         (ves_icall_Type_BindGenericParameters): Likewise.
21455         (ves_icall_Type_get_IsGenericInstance): Likewise.
21456         (ves_icall_Type_GetGenericParameterPosition): Likewise.
21457         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
21458         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
21459         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
21461 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
21463         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
21464         assembly versions and public key tokens. Fixes #69113.
21466 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
21468         * metadata.c: fix bug introduced with the type cache changes
21469         on 2004-11-06.
21471 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
21473         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
21474         the MonoClass pointer instead of the token in exception clauses.
21475         * reflection.c: updates for the above and make the code not depend
21476         on the structure of MonoExceptionClause.
21478 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
21480         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
21481         Add support for dynamic assemblies. Fixes #69114.
21483         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
21485 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
21487         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
21488         since most only those methods use it. the code member of
21489         MonoMethodPInvoke was dead, so that can be removed too. Also,
21490         remove inline_count (again, not used), and move slot so that it
21491         can share bits with some other flags. This saves 8 bytes in the
21492         structure and gives us about 50 kb back for mcs helloworld.cs
21494         * *.[ch]: Do naming changes for the above.
21496         * loader.c (mono_method_get_header): Lazily init the header
21497         on first access.
21498         (mono_get_method_from_token): don't init the header here
21499         (mono_free_method): the header may never be allocated
21501         Overall, this saves 150 kb of unmanaged allocations
21502         for mcs helloworld.cs. That accounts for 10% of the unmanaged
21503         memory at runtime.
21504         
21505         * loader.c, loader.h (mono_method_get_header): new accessor.
21507         * *.[ch]: use the above method. Prepares us to lazily load
21508         the header.
21510         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
21511         three warnings, which are actual bugs (see 69206).
21513         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
21514         unused. Saves a cool 4 bytes / method.
21516 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
21518         * metadata.c (builtin_types): Add types for System.Object here.
21519         (mono_metadata_parse_type_full): Cache MonoType*'s that are
21520         for a class or valuetype from klass->this_arg or klass->byval_arg.
21522         On mcs for a hello world, this gets us down from 21836 MonoType's
21523         to 14560.
21525         (mono_metadata_free_type): Account for the above change.
21527 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
21529         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
21530         exception instead of asserting if name is null.
21531         (ves_icall_System_AppDomain_GetData): Ditto.
21533 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
21535         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
21536         EnumBuilder.
21538         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
21539         Return NULL when the domain does not have entry_assembly set.
21541         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
21542         Add a 'resource_modules' argument.
21543         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
21545         * reflection.c (mono_reflection_create_runtime_class): Move setting
21546         of wastypebuilder here, so mono_get_type_object () returns a MonoType
21547         for enums too.
21549         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
21550         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
21551         Throw an ArgumentNullException if 'ptr' is null.
21553         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
21554         assemblies here. Fixes #69020.
21556 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
21558         * reflection.c (build_compressed_metadata): Fix the previous patch for
21559         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
21560         the stack.
21562 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
21564         * assembly.c (mono_assembly_names_equal): Allow a match if one of
21565         the cultures is false. Fixes #69090.
21567         * reflection.c (build_compressed_metadata): Fix invalid memory read 
21568         detected by valgrind.
21569         
21570         * reflection.c (mono_reflection_get_type): Avoid triggering a 
21571         TypeResolve multiple times for the same type. Fixes #65577.
21573 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
21575         * marshal.c: Avoid using ldftn to call managed functions. It is
21576         much slower than just a call.
21578         * reflection.c (mono_module_get_object): free the basename we
21579         allocate here from glib.
21580         
21581         * reflection.c (ensure_runtime_vtable): make sure to free
21582         overrides.  Also, we were allocating an array of MonoMethod not an
21583         array of MonoMethod*.
21585         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
21587         * image.c (mono_image_close): free image->guid here.
21589 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
21591         * reflection.c: Fix some spec conformance issues with the PE file
21592         structures so mcs compiled apps run on the Net 2.0 beta.
21594 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
21596         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
21597         Implement this. Fixes #67264.
21599         * debug-helpers.h debug-helpers.c marshal.c: Move 
21600         mono_find_method_by_name to debug-helpers.c.
21602 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
21604         * object.c (mono_release_type_locks): type_initialization_hash is
21605         a GHashTable.
21607         * reflection.c object.c object-internals.h: Fix warnings.
21609         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
21610         without accessors. Fixes #61561.
21612         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
21613         application base from the root domain if not set. Fixes #65641.
21614         (mono_runtime_init): Fix warning.
21616 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21618         * appdomain.c: call mono_thread_pool_init.
21619         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
21620         of worker threads based on the number of CPUs and the environment
21621         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
21622         for non-windows (windows) systems.
21624 2004-10-27  Chris Toshok  <toshok@ximian.com>
21626         * mono-debug-debugger.c (write_class): don't call mono_class_init
21627         here, as even with the check for (!klass->init_pending), we get
21628         into a situation where we're hitting cycles in class
21629         initialization.  Fixes #68816.
21631 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
21633         * image.c: Avoid overwriting values in the loaded_images_hash when an
21634         assembly is loaded multiple times. Fixes #61152.
21636         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
21637         so multiple satellite assemblies for the same name can be loaded.
21638         Fixes #68259.
21640         * mono_domain_assembly_preload: Actually return the loaded assembly, 
21641         not NULL.
21643         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
21644         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
21646         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
21647         pending finalizers are not invoked after the appdomain has been 
21648         unloaded. Fixes #67862.
21650 2004-10-22  Martin Baulig  <martin@ximian.com>
21652         * mono-debug-debugger.c
21653         (mono_debugger_runtime_invoke): Don't box valuetypes.
21655 2004-10-22  Chris Toshok  <toshok@ximian.com>
21657         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
21658         don't hide private methods.
21660 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
21662         * icall.c: Allows the runtime to "share" (when known) the public key
21663         token of an assembly. This avoid the need to recalculate the token 
21664         (from the public key) in managed code.
21666 2004-10-21  Chris Toshok  <toshok@ximian.com>
21668         * debug-helpers.c (append_class_name): argh, revert last patch.
21669         
21670 2004-10-21  Chris Toshok  <toshok@ximian.com>
21672         * debug-helpers.c (append_class_name): use '+' as the delimiter,
21673         not '/', so that it matches what the debugger uses to look up
21674         methods.
21676 2004-10-21  Martin Baulig  <martin@ximian.com>
21678         * mono-debug-debugger.c (mono_debugger_throw_exception): New
21679         public method; this is called each time an exception is thrown and
21680         allows the debugger to use exception catch points.
21682 2004-10-21  Martin Baulig  <martin@ximian.com>
21684         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
21685         the stack pointer and the exception object in some struct and pass
21686         that to the debugger.
21688 2004-10-21  Chris Toshok  <toshok@ximian.com>
21690         * mono-debug-debugger.c (do_write_class): add instance/static
21691         event support.  We don't expose "raise" or "other" yet.
21692         (event_is_static): new method.
21694 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
21696         * mono-debug-debugger.c
21697         (mono_debugger_handle_exception): Remove
21698         bogus return value for fussy compilers.
21700 2004-10-20  Martin Baulig  <martin@ximian.com>
21702         * mono-debug-debugger.c
21703         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
21704         (mono_debugger_handled_exception): Likewise.
21706 2004-10-20  Martin Baulig  <martin@ximian.com>
21708         * mono-debug-debugger.h (MonoDebuggerEvent): Added
21709         MONO_DEBUGGER_EVENT_EXCEPTION.
21711         * mono-debug-debugger.c (mono_debugger_handle_exception): New
21712         public function to send the debugger a notification for an
21713         exception and inform it about a catch/finally clause.
21715 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
21717         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
21718         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
21719         fix 2.95 build. 
21721         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
21723 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
21725         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
21726         marshalled as [In,Out]. Fixes #58325.
21728 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
21730         * reflection.c (mono_method_body_get_object): Implement some fields.
21732 2004-10-12  Martin Baulig  <martin@ximian.com>
21734         * reflection.c (mono_reflection_bind_generic_parameters): Small
21735         fix, correctly retrieve our parent from a generic instance.
21737 2004-10-12  Martin Baulig  <martin@ximian.com>
21739         * metadata.c (mono_metadata_generic_param_equal): We always have
21740         an owner.
21742         * class.c
21743         (mono_class_from_generic_parameter): We need to have an owner.
21744         (my_mono_class_from_generic_parameter): Likewise.
21746         * reflection.c (mono_reflection_setup_generic_class): Renamed to
21747         mono_reflection_create_generic_class() and added a new
21748         mono_reflection_setup_generic_class().  
21749         (mono_reflection_initialize_generic_param): If we're a nested
21750         generic type and inherited from the containing class, set our
21751         owner to the outer class.
21753 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
21755         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
21757         * reflection.c (mono_method_body_get_object): New function to create
21758         a MethodBody object.
21760         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
21762 2004-10-11  Martin Baulig  <martin@ximian.com>
21764         * metadata.c (_mono_metadata_type_equal): Renamed to
21765         do_mono_metadata_type_equal() and made static.
21767 2004-10-11  Martin Baulig  <martin@ximian.com>
21769         * appdomain.c: Bump corlib version number to 28.
21771 2004-10-10  Martin Baulig  <martin@ximian.com>
21773         * class-internals.h
21774         (MonoGenericInst): Added `MonoGenericContainer *container'.
21775         (MonoGenericMethod): Likewise.
21776         (MonoGenericContext): Likewise.
21777         (MonoGenericParam): Added `MonoGenericContainer *owner'.
21779         * metadata.c
21780         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
21781         (do_mono_metadata_parse_generic_inst): Likewise.
21782         (mono_metadata_parse_type_full): New public method.  This is the actual
21783         mono_metadata_parse_type() implementation - with an additional
21784         `MonoGenericContainer *' argument.
21785         (mono_metadata_parse_array_full): Likewise.
21786         (mono_metadata_parse_signature_full): Likewise.
21787         (mono_metadata_parse_method_signature_full): Likewise.
21788         (mono_metadata_parse_mh_full): Likewise.
21789         (mono_type_create_from_typespec): Likewise.
21790         (mono_metadata_interfaces_from_typedef_full): New public method;
21791         this is similar to the other _full() methods, but we take a
21792         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
21793         (mono_metadata_parse_generic_param): Take an additional
21794         `MonoGenericContainer *' argument and lookup the MonoGenericParam
21795         from that container.
21796         (mono_metadata_generic_param_equal): New static method to compare
21797         two type parameters.
21798         (_mono_metadata_type_equal): New static method; takes an
21799         additional `gboolean signature_only' argument - if true, we don't
21800         compare the owners of generic parameters.
21801         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
21802         with a TRUE argument - do a signature-only comparision.
21804         * loader.c: Use the new _full() methods and pass the
21805         MonoGenericContainer to them.
21807         * object-internals.h (MonoReflectionTypeBuilder): Added
21808         `MonoGenericContainer *generic_container' field.
21809         (MonoReflectionMethodBuilder): Likewise.
21811 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
21813         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
21814         case initial images of dynamic assemblies.
21816         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
21818         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
21820         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
21821         length of event->other array.
21822         (typebuilder_setup_events): Ditto.
21824         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
21825         'assembly_by_name' and add an 'assemblies' list.
21827         * assembly.h assembly.c: Add a new search hook for determining whenever
21828         an assembly is already loaded. Use this instead of searching in the
21829         loaded_assemblies list.
21831         * domain.c appdomain.c: Implement the new search hook so loaded 
21832         assemblies are now scoped by appdomain. Fixes #67727.
21834 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
21836         * threads.c (mono_thread_attach): Initialize synch_lock field so
21837         mono_thread_detach works again.
21839         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
21840         'lib' too. Fixes #63130.
21842 2004-10-06  Jackson Harper  <jackson@ximian.com>
21844         * culture-info-tables.h: regenerated.
21846 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
21848         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
21849         implemented by other interfaces in the result. Fixes #65764.
21850         
21851         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
21852         Handle unloadable modules without crashing.
21854         * image.c (load_modules): Revert the previous patch since modules must
21855         have a fixed index inside the array.
21856         
21857         * image.c (load_modules): Don't include native modules in the modules
21858         array.
21860 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
21862         * reflection.h: Add param_defaults field.
21864         * reflection.c: Add support for parameter defaults in dynamic methods.
21865         Fixes #64595.
21867         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
21868         an empty string when a type has no namespace. Fixes #64230.
21870 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
21872         * tabledefs.h: Added "internal" security actions to support non-CAS
21873         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
21874         Note: they do not seems to be used anymore in 2.0 (new metadata format)
21876 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
21878         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
21879         constructor of abstract class. Fixes #61689.
21881 2004-10-04  Martin Baulig  <martin@ximian.com>
21883         * class-internals.h (MonoGenericContainer): New type.
21884         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
21885         `MonoGenericContainer *generic_container'.
21886         (MonoClass): Replaced `gen_params' and `num_gen_params' with
21887         `MonoGenericContainer *generic_container'.
21889         * metadata.c (mono_metadata_load_generic_params): Return a
21890         `MonoGenericContainer *' instead of a `MonoGenericParam *';
21891         removed the `num' argument.
21893 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
21895         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
21896         for dynamic images.
21898         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
21899         machine fields.
21901         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
21903         * reflection.c: Save pe_kind and machine values into the generated
21904         image file.
21906         * appdomain.c: Bump corlib version number.
21908         * object-internals.h: Reorganize layout of LocalBuilder.
21910         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
21911         New helper function.
21913         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
21914         created MonoType for dynamic types. Fixes #66180.
21916 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
21918         * threadpool.c: the ares hashtable needs a critical section around it.
21919         this prevents some nasty segfaults
21921 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
21923         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
21924         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
21925         bug 67324).
21926         
21927 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
21929         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
21930         
21931 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
21933         * image.c: Always canonicalize image file names, to avoid loading
21934         the same assembly twice when referenced using a relative path.
21936 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
21938         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
21940         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
21942         * marshal.c: Fix warnings.
21944 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
21946         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
21947         attempting to marshal the delegate_trampoline as the method_addr.
21948         This patch has a static hashtable of marshalled delegates so that 
21949         we can map delegate_trampoline addresses back to delegates.  This
21950         allows a delegate passed to managed code to be passed back into native
21951         code.  Fixes #67039
21953 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
21955         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
21957         * reflection.c (method_encode_code): Align method headers properly.
21958         Fixes #66025.
21960 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
21962         * marshal.c: In the runtime invoke wrapper, reset the abort
21963         exception if it is cached. This avoids the automatic rethrowal of 
21964         the exception after the catch of the wrapper. Also check for pending
21965         interruptions before calling the managed method. This is done using
21966         the new method emit_thread_force_interrupt_checkpoint, since the
21967         normal checkpoint method is ignored when running the invoke wrapper.
21968         * object.c: If the abort exception is rethrown, set the abort_exc
21969         field of the thread, so it will be rethrown aftere every catch.
21970         * threadpool.c: Only run an interruption checkpoint if what has been
21971         requested is a stop of the thread (aborts will be ignored).
21972         * threads.c: By default, a thread will now never be interrumped while
21973         running the runtime invoke wrapper (this ensures that runtime_invoke
21974         will always return to the caller if an exception pointer is provided).
21975         There is a new special method mono_thread_force_interruption_checkpoint()
21976         to force an interruption checkpoint even if running a protected
21977         wrapper, which is used by the same runtime invoke wrapper to do a check
21978         at a safe point.
21980 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
21982         * object.c, object-internals.h: Implemented mono_release_type_locks,
21983         which releases the cctor locks held by a thread.
21984         * threads.c, threads.h: In thread_cleanup, release cctor locks held
21985         by a thread. Added mono_thread_exit() method to be used to safely stop
21986         a thread.
21988 2004-09-28  Raja R Harinath  <rharinath@novell.com>
21990         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
21991         Move null check before dereference.  Avoid indexing beyond the end
21992         of the 'modules' array.
21994 2004-09-28  Raja R Harinath  <rharinath@novell.com>
21996         * metadata-internals.h (MonoImage): Add module_count field.
21997         * image.c (load_modules): Set image->module_count.
21998         (mono_image_load_file_for_image): Use image->module_count.
21999         * reflection.c (mono_image_load_module): Append to image->modules array 
22000         of dynamic assembly.
22001         (mono_module_get_object): Fix loop to actually increment index.
22002         Use image->module_count.
22003         * assembly.c (mono_assembly_load_references): Use image->module_count.
22004         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
22005         Likewise.
22007 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
22009         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
22010         Avoid assert on generic types.
22012 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
22014         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
22016         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
22018         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
22019         function to convert a MarshalSpec structure to its managed counterpart.
22021         * reflection.c: Fix warnings.
22022         
22023         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
22024         field.
22026         * icall.c (mono_create_icall_signature): Fix build.
22028 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
22030         * icall.c: Add MakePointType icall.
22032         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
22033         warnings.
22035 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22037         * threadpool.c: reuse allocated slots in the queue.
22039 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
22041         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
22043         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
22045         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
22046         previous change.
22048         * tabledefs.h: Add constants for pinvoke attributes BestFit and
22049         ThrowOnUnmappableChar.
22051         * icall.c (ves_icall_Type_GetPacking): New icall.
22053 2004-09-24  Martin Baulig  <martin@ximian.com>
22055         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
22057 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22059         * appdomain.c:
22060         (mono_domain_set): allow setting a domain that is being unloaded.
22061         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
22062         being unloaded.
22064 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
22066         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
22067         the GetCustomAttributes icall.
22069 2004-09-23  Martin Baulig  <martin@ximian.com>
22071         * object-internals.h (MonoReflectionGenericParam): Replaced
22072         'has_ctor_constraint', `has_reference_type' and `has_value_type'
22073         with `guint32 attrs'.
22075 2004-09-23  Martin Baulig  <martin@ximian.com>
22077         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
22079 2004-09-23  Martin Baulig  <martin@ximian.com>
22081         * object-internals.h (GenericParameterAttributes): New enum.
22083 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
22085         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
22086         
22087         * class.c (init_events): Fill out event->other field.
22089         * class.c: Fix warnings.
22091         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
22093 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
22095         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
22096         walk which doesn't supply the IL offset.
22098 2004-09-22  Martin Baulig  <martin@ximian.com>
22100         * reflection.c (mono_reflection_setup_internal_class): If we're
22101         System.ValueType, System.Object or System.Enum, set
22102         `klass->instance_size' and create the vtable.
22103         (mono_reflection_create_internal_class): If we're an enum type,
22104         get the base class from our current corlib.
22106 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
22108         * reflection.h (MonoResolveTokenError): New type.
22110         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
22111         icall.
22113         * icall.c: Add an 'error' argument to the ResolveToken icalls.
22115 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
22117         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
22118         Support also calling constructors, but only for already allocated objects.
22120 2004-09-17  Geoff Norton <gnorton@customerdna.com>
22122         * reflection.c (type_get_qualified_name): If the klass is null
22123         return the typename to avoid a NullRefEx.
22124         (encode_cattr_value): Get the qualified name of the boxed type,
22125         not the underlying enumtype.  Fixes #62984.
22127 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
22129         * marshal.c: Fix problems with previous checkin.
22131 2004-09-21    <vargaz@freemail.hu>
22133         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
22134         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
22136         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
22138 2004-09-21  Geoff Norton <gnorton@customerdna.com>
22140         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
22141         should only return a type for pointers, arrays, and passbyref types.
22142         Fixes bug #63841.
22144 2004-09-21  Martin Baulig  <martin@ximian.com>
22146         * domain.c (mono_debugger_check_runtime_version): New public
22147         function.
22149         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
22151 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
22153         * reflection.c: Added missing sort to the declarative security 
22154         attributes table. MS implementation stops seeing the attributes if the
22155         token number regress in the table (as shown by ildasm and permview).
22157 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
22159         * object-internals.h (MonoReflectionModule): Add 'token' field.
22160         
22161         * reflection.c (mono_reflection_get_token): Add support for Module
22162         and Assembly.
22163         (mono_module_get_object): Set 'token' field.
22164         (mono_module_file_get_object): Set 'token' field.
22166         * icall.c: Add new Assembly and Module icalls.
22168         * appdomain.c: Bump corlib version.
22170 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
22172         * loader.h loader.c class.h class.c: Add helper functions for obtaining
22173         tokens of metadata objects.
22175         * reflection.h reflection.c (mono_reflection_get_token): New function
22176         to obtain the token of a metadata object.
22178         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
22180 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
22182         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
22183         
22184         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
22186 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
22188         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
22189         * object-internals.h: Added 3 MonoArray* members to MonoReflection
22190         AssemblyBuilder to access the permissions set in the class lib.
22191         * reflection.c: Added security attributes encoding step in 
22192         mono_image_build_metadata.
22193         * tabledefs.h: Added new security actions defined in 2.0:
22194         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
22196 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
22198         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
22199         macro parameter.
22201 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
22203         * locales.c: nullify the ICU_collator member of CompareInfo when it is
22204           finalized. There where random SIGSEVs at program termination, when
22205           an object being finalized was trying to do a string comparison and
22206           the current culture was already finalized.
22208 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22210         * threads.c: call thread_cleanup before finishing the thread if we get
22211         there.
22213 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
22215         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
22216         assemblies from the parent. Fixes #65665.
22218 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
22220         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
22221         modifiers.
22223 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
22225         * reflection.h: add prototype for mono_get_dbnull_object
22226         * reflection.c: add prototypes for get_default_param_value_blobs 
22227         and mono_get_object_from_blob for fussier compilers
22229 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
22231         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
22232         false deadlock checks in class initialization.
22234 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
22236         * image.c (mono_image_addref): Fix comment.
22238         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
22239         possible.
22241 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
22243         * reflection.c (mono_param_get_objects): Modified to return
22244         ParameterInfo.DefaultValue object.
22246         (get_default_param_value_blobs):
22247         (mono_get_object_from_blob):
22248         (mono_get_dbnull_object): New helper routines. 
22250         * object.c (mono_get_constant_value_from_blob): New helper routine
22251         carved out from get_default_field_value ()
22253         * object-internals.h (mono_get_constant_value_from_blob): Added
22254         function declaration.
22256 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
22258         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
22259         referenced assemblies. Fixes #62135.
22261         * exception.h exception.c (mono_get_exception_file_not_found2): New
22262         helper function.
22264 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
22266         * class.h class.c: Add mono_type_get_underlying_type ().
22268 2004-09-09  Geoff Norton <gnorton@customerndna.com>
22270         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
22271         Fix GetTypes() to support dynamically created assemblies.
22273 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
22275         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
22276         
22277         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
22278         previous patch.
22280         * reflection.h reflection.c loader.c: Allow dynamic construction of
22281         pinvoke methods. Fixes #65571.
22282         
22283         * reflection.c (mono_reflection_get_type): Revert previous change since
22284         it causes regressions.
22286 2004-09-08  Martin Baulig  <martin@ximian.com>
22288         * class.c (class_compute_field_layout): Don't call
22289         mono_class_layout_fields() for open generic instances.
22291 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
22292         * threads.c appdomain.c: fix typo in GC macro
22294 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22296         * threads.c: don't call mono_thread_detach() in start_wrapper(),
22297         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
22299 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
22301         * image.c (mono_image_close): Applied patch from 
22302         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
22303         assembly is loaded multiple times from data.
22304         
22305         * image.c (mono_image_open): Fix warning.
22307 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
22309         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
22310         once. Fixes #58334.
22311         
22312         * reflection.c (mono_reflection_create_runtime_class): Initialize
22313         klass->nested_classes. Fixes #61224.
22315 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22317         * threads.c: sched_yield() on exit, to allow threads to quit.
22319 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
22321         * object.c (mono_unhandled_exception): Remove leftover debug code.
22323 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
22325         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
22327 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
22329         * marshal.c (emit_marshal_array): Really null terminate string arrays.
22330         
22331         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
22333 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
22335         * marshal.c (emit_marshal_array): Null terminate string arrays.
22336         
22337         * marshal.c (raise_auto_layout_exception): Fix warning.
22339         * reflection.c (mono_param_get_objects): Initialize the default value
22340         with DBNull.Value, not null. Fixes #62123.
22342 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
22344         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
22345         throw an exception with a cute explanation.
22347 2004-09-06  Dick Porter  <dick@ximian.com>
22349         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
22350         Close the new process's thread handle, as we don't use it.  The
22351         handle stays around forever otherwise.
22353 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
22355         * object.c (arith_overflow): Fix warning.
22357         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
22358         calling conventions in method refs. Fixes #65352.
22360         * reflection.c: Fix warnings.
22362 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
22364         * icall.c: Add a new icall for Array.Clear
22366 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
22368         * object.c: When allocating an array, we have to throw
22369         an overflow exception if any of the lengths are < 0.
22371 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
22373         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
22374         properly. Also move implementation of string array marshalling to 
22375         managed code. Fixes #42316.
22377 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22379         * assembly.c: provide more information when loading an assembly fails.
22381 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22383         * filewatcher.c: don't expect the development fam package to be
22384         installed.
22386 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
22388         * marshal.c: Make a copy of the signature cookie since it will be
22389         freed by the caller.
22390         
22391         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
22393         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
22395         * metadata.c (mono_metadata_free_marshal_spec): New function to free
22396         marshal specs.
22398         * marshal.c: More refactoring.
22399         
22400         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
22401         smaller functions.
22403 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
22405         * object.c: In mono_message_invoke, fill the output parameter array after
22406           calling the managed method (it was done before the call). This fixes
22407           bug #59299.
22409 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
22411         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
22412         as well.
22414 2004-09-02  Martin Baulig  <martin@ximian.com>
22416         * class.c (mono_class_instance_size): Don't allow generic type
22417         definitions or open generic instances.
22418         (mono_class_array_element_size): If we're a value type, call
22419         mono_class_instance_size() on the original class.
22421         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
22422         handle generic instances.
22424         * mono-debug-debugger.c (write_type): Handle generic instances
22425         like classes.
22427 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
22429         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
22430         the allocation request fails. Fixes #65089.
22432         * object.c (mono_runtime_free_method): Do not call mono_free_method.
22433         
22434         * object.c (mono_runtime_free_method): New function to free a dynamic
22435         method.
22437         * marshal.c (mono_delegate_free_ftnptr): New function to free the
22438         delegate trampoline.
22440         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
22441         with hasthis as dynamic,
22443         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
22445         * domain.c (mono_jit_info_table_remove): New function to remove an
22446         entry from the jit info table.
22448         * class-internals.h (MonoMethod): Add 'dynamic' field.
22450         * loader.c: Fix warnings.
22452 2004-09-01  Martin Baulig  <martin@ximian.com>
22454         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
22455         instead of mono_debugger_lock() because the latter one is a no-op
22456         unless running in the debugger.
22458 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
22460         * class.c (class_compute_field_layout): Classes with auto-layout or
22461         reference fields are not blittable.
22462         
22463 2004-09-01  Dick Porter  <dick@ximian.com>
22465         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
22466         mono_image_get_filename() to get the assembly location.
22468         * icall.c:
22469         * metadata.h: Fix compile warnings
22471 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
22473         * class.c (class_compute_field_layout): System.Object is blittable.
22475         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
22476         as in/out. Fixes #59909.
22478 2004-09-01  Martin Baulig  <martin@ximian.com>
22480         * metadata.h (MONO_TYPE_ISREFERENCE): Call
22481         mono_metadata_generic_inst_is_valuetype() if we're a generic
22482         instance to check whether our underlying type is a reference type.
22484 2004-09-01  Martin Baulig  <martin@ximian.com>
22486         * metadata.c (mono_type_size): If we're a generic instance, call
22487         mono_class_value_size() for value types.
22489 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
22491         * marshal.c: Implement more custom marshalling functionality. Fixes
22492         #64915.
22494 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22496         * mono-debug.c, debug-mono-symfile.c: add some locking love.
22498 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
22500         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
22502         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
22504         * icall.c: Fix some warnings.
22506         * threads.c (abort_appdomain_thread): Fix unref errors.
22507         (mono_thread_current): Fix THREAD_DEBUG define.
22509 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
22511         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
22513         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
22515 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
22517         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
22518         string arrays.
22520 2004-08-28  Martin Baulig  <martin@ximian.com>
22522         * metadata.c
22523         (mono_metadata_generic_inst_is_valuetype): New public function.
22525         * metadata.h (MONO_TYPE_ISSTRUCT): Call
22526         mono_metadata_generic_inst_is_valuetype() if we're a generic
22527         instance to check whether our underlying type is a valuetype.
22529 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
22531         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
22532         #63768.
22534 2004-08-25  Martin Baulig  <martin@ximian.com>
22536         * loader.c (mono_get_method_from_token): Abstract methods can also
22537         be generic and thus have type parameters.
22539         * metadata-internals.h
22540         (MonoDynamicImage): Added `GPtrArray *gen_params'.
22542         * reflection.c (mono_image_get_generic_param_info): Don't create a
22543         metadata row, just add an entry to the `gen_params' array.
22544         (build_compressed_metadata): Sort the `gen_params' array and then
22545         actually create the metadata.
22547 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22549         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
22551 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
22553         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
22555 2004-08-24  Martin Baulig  <martin@ximian.com>
22557         * class.cs (mono_class_is_subclass_of): Like an interface, a
22558         generic instance also derives from System.Object.
22560 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
22562         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
22563         custom modifiers to be in any order. Fixes #61990.
22565 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
22567         * object.c: Register mono_object_new_fast icall.
22568         
22569         * object.c (mono_class_get_allocation_ftn): Return to calling
22570         mono_object_new_fast, since it seems faster to compute the object 
22571         size in unmanaged code than passing it as a parameter.
22573         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
22575         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
22576         this function with Boehm as the oom handler, so we don't have to check
22577         the result of GC_malloc.
22579         * object.c: Remove checks for oom.
22581         * object.h object.c (mono_class_get_allocation_ftn): New function to
22582         return the icall which can be used to allocate an instance of a given
22583         class. 
22585         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
22587         * class-internals.h: Add 'enabled' field.
22589 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
22591         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
22593 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
22594         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
22595         value 0x0010.
22597 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
22599         * appdomain.c: use the Tls function for appdomain too,
22600         at Zoltan's request. Actually return in mono_context_get
22602         * appdomain.c, profiler.c, threads.c: use __thread
22604 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
22606         * appdomain.c threads.c: Call GC_CreateThread on windows.
22608         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
22609         multiple libraries since this don't work on windows.
22611 2004-08-18  Martin Baulig  <martin@ximian.com>
22613         * class-internals.h
22614         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
22615         MonoMethodHeader.
22617         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
22618         MonoMethodNormal since we also need it for abstract and interface
22619         methods.
22621         * reflection.c
22622         (build_compressed_metadata): Sort the GenericParam table.
22623         (mono_image_create_token): Added `gboolean create_methodspec'
22624         argument; this is false when generating a MethodImpl token.
22625         (reflection_methodbuilder_to_mono_method): Abstract and interface
22626         methods may also have generic parameters.
22628 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22630         * appdomain.c: thread local alloc
22632 2004-08-17  Martin Baulig  <martin@ximian.com>
22634         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
22636         * icall.c
22637         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
22638         argument.
22640         * class.c (mono_type_get_full_name): New public function.
22641         (mono_type_get_name): Don't include the type arguments.
22643 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
22645         * Makefile.am: Build static versions of libmetadata and libmonoruntime
22646         for inclusion into the mono executable.
22648 2004-08-16  Martin Baulig  <martin@ximian.com>
22650         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
22651         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
22653 2004-08-14  Martin Baulig  <martin@ximian.com>
22655         * class.c (dup_type): Also copy the `byref' field.
22657 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
22659         * reflection.c (create_dynamic_mono_image): Revert the last change 
22660         since it breaks bootstrap.
22662 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
22664         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
22666         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
22667         not free them with g_free.
22669 2004-08-11  Martin Baulig  <martin@ximian.com>
22671         * reflection.c (mono_reflection_setup_internal_class): Also call
22672         mono_class_setup_mono_type() if we already have a `tb->type.type'.
22674 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
22676         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
22677         called during default (first) AppDomain creation. Keep track of
22678         Evidence when loading assemblies.
22680 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22682         * opcodes.c, opcodes.h: reduce runtime relocations.
22684 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
22686         * culture-info.h, locales.c: fixes and chages to sue the new
22687         optimized format of the locale data.
22688         * culture-info-tables.h: regenerated.
22690 2004-08-06  Geoff Norton <gnorton@customerdna.com>
22691         
22692         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
22694 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
22696         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
22697         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
22698         * domain-internals.h: icall declaration.
22699         * icall.c: icall registration.
22700         * object-internals.h: New fields in MonoAssembly for CAS.
22702 2004-08-05  Duncan Mak  <duncan@ximian.com>
22704         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
22705         CEE_LDELEM_ANY.
22707 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
22709         * reflection.c: fix to deal with object[] arrays in custom ctors
22710         (bug #62550).
22712 2004-08-05  Martin Baulig  <martin@ximian.com>
22714         * class.c (mono_class_array_element_size): Added support for
22715         generic instances and correctly handle "recursive" types.
22717 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
22719         * assembly.c: Fix warnings.
22721 2004-08-04  Martin Baulig  <martin@ximian.com>
22723         * class.c
22724         (mono_type_get_name_recurse): Added `gboolean include_arity'
22725         argument specifying whether or not we should include the generic
22726         arity in the type name.
22727         (_mono_type_get_name): New static function.
22728         (mono_class_setup_vtable): If we're a generic instance, don't
22729         include the generic arity in the names of explicit method
22730         implementations.        
22732 2004-08-03  Martin Baulig  <martin@ximian.com>
22734         * class.c (mono_type_get_name_recurse): Enclose the generic type
22735         arguments in `<', '>'.
22737 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
22739         * gc.c: make GC warning messages use the trace API, they are just
22740         noise to most of the users.
22742 2004-08-03  Martin Baulig  <martin@ximian.com>
22744         * debug-mono-symfile.c (read_string): Correctly read the string.
22746 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
22748         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
22749         
22750         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
22751         icalls.
22752         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
22754 2004-07-30  Martin Baulig  <martin@ximian.com>
22756         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
22757         Reflect latest symbol writer changes.   
22759 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
22761         * object.c: always create an object if null is passed
22762         to Invoke() where a valuetype is expected.
22764 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
22766         * marshal.c (mono_marshal_init): make managed
22767         signatures match native ones better for 64bits.
22769 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22771         * appdomain.c: hack to build correctly the private bin path on windows.
22772         Fixes bug #61991.
22774 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
22776         * assembly.c: Load mscorlib from the correct framework directory
22777           (mono/<version>/mscorlib.dll).
22778         * appdomain.h: Added prototypes for new functions.
22779         * internals.h: Added some prototypes.
22780         * domain.c: When initializing the runtime, get from the executable and
22781           the configuration files the runtime version that the app supports.
22782           Added support methods for reading app.exe.config. Added list of versions
22783           supported by the JIT. Added two new methods: mono_init_from_assembly,
22784           which initializes the runtime and determines the required version from
22785           the provided exe file, and mono_init_version, which initializes
22786           the runtime using the provided version.
22787         * icall.c: Get machine.config from version-specific directory.
22788         * reflection.c: When generating an image, embed the version number
22789           of the current runtime.
22791 2004-07-28  Dick Porter  <dick@ximian.com>
22793         * socket-io.c
22794         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
22795         returned sockaddr size before creating the remote address object.
22796         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
22797         61608.
22799 2004-07-28  Dick Porter  <dick@ximian.com>
22801         * locales.c (string_invariant_compare_char): Fix invariant char
22802         compares between upper and lower cases.  Fixes bug 61458.
22804 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
22805         
22806         * marshal.c: actually cache stelem.ref wrappers.
22807         
22808 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
22810         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
22811         sections and remove the mono_cli_rva_map () function.
22813 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
22815         * debug-mono-symfile.c: fix one more endianess issue, from a patch
22816         by Geoff Norton (<gnorton@customerdna.com>).
22818 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
22820         * class.c: fix class loads for pointer types (typeof(int) !=
22821         typeof(int*)).
22823 2004-07-27  Martin Baulig  <martin@ximian.com>
22825         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
22826         reading the debugging information from an external ".mdb" file.
22828 2004-07-24  Martin Baulig  <martin@ximian.com>
22830         * reflection.c (mono_image_get_type_info): Only write a class
22831         layout entry if we actually have a size or a packing size.
22833 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
22835         * reflection.c (type_get_fully_qualified_name): 
22836         insert cast to get type checking of ?: with non-gcc compilers
22838 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
22840         * rand.c: use g_getenv for both lookups of
22841         MONO_EGD_SOCKET
22843 2004-07-17  Martin Baulig  <martin@ximian.com>
22845         * reflection.c (mono_reflection_bind_generic_method_parameters):
22846         Set `gmethod->reflection_info'.
22848 2004-07-17  Martin Baulig  <martin@ximian.com>
22850         * class.c (mono_class_create_from_typedef): Insert the newly
22851         created class into the hash table before computing the interfaces
22852         since we could be called recursively.
22854 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
22856         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
22857         function to implement stelem.ref in managed code
22858         * class-internals.h, debug-helpers.c: a new wrapper type
22859         for the above.
22861 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
22863         * gc.c: allow GC handles to work even when no GC is compiled in.
22864         Fix part of bug #61134 (GetAddrOfPinnedObject).
22866 2004-07-13  Peter Williams  <peter@newton.cx>
22868         * process.c (complete_path): Make sure we don't attempt to execute
22869         directories.
22871 2004-07-12  Geoff Norton <gnorton@customerdna.com>
22873         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
22874           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
22875           and will add/subtract the hour if needed
22877 2004-07-12  Martin Baulig  <martin@ximian.com>
22879         * reflection.c (mono_field_get_object): If we have
22880         `field->generic_info', take the attributes from
22881         `field->generic_info->generic_type'.    
22883 2004-07-12  Martin Baulig  <martin@ximian.com>
22885         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
22886         This function must be called before initializing the runtime.
22887         (mono_debug_init_1): New function; call this after initializing
22888         the runtime, but before loading the assembly.  It tells the
22889         debugger to load corlib and the builtin types.
22891         * mono-debug-debugger.c: Did some larger changes in the debugging
22892         code; support recursive class declarations, make sure we actually
22893         add all classes.
22895 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22897         * debug-helpers.c: undo my previous patch and fixed the real issue in
22898         ../mini/exceptions-x86.c
22900 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22902         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
22903         when no HOME env. variable was set and a NullRef was thrown in a .cctor
22904         called from other .cctors.
22906 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
22908         * loader.c: Removed the mono_loader_wine_init hack now that we are
22909         doing a managed version of Windows.Forms.
22911 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
22913         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
22914         threadpool.c, threads.c: remove static data from rootset.
22916 2004-07-09  Dick Porter  <dick@ximian.com>
22918         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
22919         Don't do any more processing if the matched length was 0.  It was
22920         increasing the size of the string before.  Fixes bug 61167.
22922 2004-07-09  Dick Porter  <dick@ximian.com>
22924         * socket-io.h:
22925         * socket-io.c
22926         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
22927         Add support for SO_PEERCRED if its available.
22929 2004-07-09  Peter Bartok <pbartok@novell.com>
22930         * loader.c: winelib.exe.so error message is now only displayed if
22931         MONO_DEBUG is set. To help us avoid questions when people are trying
22932         out the new Managed.Windows.Forms.
22934 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
22936         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
22937         for isinst and castclass wrappers.
22939         * class-internals.h icall.c: Move registration and lookup of JIT icalls
22940         to libmetadata from the JIT, so they could be used by the marshalling
22941         code and the interpreter.
22943         * marshal.c: Register marshalling related JIT icalls here instead of
22944         in mini.c. Use CEE_MONO_ICALL instead of the family of 
22945         CEE_MONO_PROC<x> opcodes to call marshalling functions.
22947         * metadata.h: Remove unneeded marshalling conversions.
22949         * opcodes.c: Update for new opcodes.
22950         
22951 2004-07-08  Martin Baulig  <martin@ximian.com>
22953         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
22954         (mono_debug_get_domain_data): Make this function static.
22956 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
22958         * gc.c, object.h: add nice GC handle API for embedders.
22960 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
22962         * reflection.c: more changes for the new api
22964         * object.c: When we reflect on a field w/ a constant value, it
22965         will not have a memory location, so we must access metadata. Also,
22966         allow easier reading of strings so that we can read them from
22967         the constant data.
22969         * class.c (mono_class_layout_fields): no need for literal fields here.
22971         * class-internals.h: api changes for const fields
22973         * icall.c (ves_icall_get_enum_info): use new apis for const fields
22975 2004-07-06  Martin Baulig  <martin@ximian.com>
22977         * mono-debug.h: Increment version number to 44.
22979         * mono-debug.c (mono_debug_add_wrapper): The second argument is
22980         now a gpointer, rewrote this whole method.
22982         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
22983         function.  Add information about the wrapper in a new "misc table".
22985         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
22986         for the new misc table.
22988 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
22990         * metadata-internals.h image.c: Add a cache for helper signatures.
22992         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
22994 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
22996         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
22997         delegates from a delegate. Fixes #61033.
22998         
22999         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
23000         marshalling of stringbuilder arrays. Fixes #59900.
23002 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
23004         * icall.c: Add EnumBuilder:setup_enum_type icall.
23006 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
23008         * icall.c: Added a new icall for the property version of
23009         OffsetOfStringData.
23011 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
23013         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
23014         it has a constant size across platforms.
23016         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
23017         stack trace.
23019 2004-06-29  Martin Baulig  <martin@ximian.com>
23021         * mono-debug.c (mono_debug_add_method): Protect the whole function
23022         in mono_debugger_lock(), not just parts of it.
23024 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
23026         * reflection.c: make sure padding bytes in heaps are zeroed.
23028 2004-06-24  David Waite  <mass@akuma.org>
23030         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
23031         image.c, loader.c, locales.c, marshal.c, metadata.c,
23032         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
23033         string-icalls.c, threads.c: change to C90-style comments from C99 /
23034         C++ -style
23036 2004-06-24  Dick Porter  <dick@ximian.com>
23038         * threads.c
23039         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
23040         return createdNew.  Fixes bug 60412.
23042         * threads-types.h: 
23043         * icall.c: Add createdNew parameter to CreateMutex icall
23045 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23047         * reflection.c, object-internals.h: save default value in params.
23049 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23051         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
23052         no need to build a new path combining that with the application base.
23053         Fixes bug #60442.
23055 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
23057         * reflection.c: fixed minor standard compliance issues.
23059 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
23061         * reflection.c: fixed issue with encoding some custom attributes
23062         (arrays in properties and fields, bug #60411).
23064 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23066         * reflection.c: fix start address when copying the public key token.
23068 2004-06-23  Martin Baulig  <martin@ximian.com>
23070         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
23071         the `exc' object in a static object to put it into the GC's root set.
23073 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
23075         * reflection.c: make mono_reflection_setup_internal_class ()
23076         callable a second time to setup a new parent class.
23078 2004-06-23  Dick Porter  <dick@ximian.com>
23080         * threads.c: Check for WAIT_IO_COMPLETION return values.
23082 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
23084         * appdomain.c: Removed the g_free on the public key token. Now copy 
23085         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
23086         * assembly.c: Added public key token string value when loading 
23087         assemblies. Fix bug #60439.
23088         * icall.c: Added missing informations (like public key) in 
23089         GetReferencedAssemblies. Fix #60519.
23090         * image.h: Changed definition for public key token from const char*
23091         public_tok_value to guchar public_key_token [17];
23092         * reflection.c: Updated for changes to public key token.
23094 2004-06-22  Lluis Sanchez Gual
23096         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
23097         for the field in base classes.
23099 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23101         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
23102         mark headers as not supported, they are installed only for use by the
23103         debugger.
23105 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
23107         * *.c, *.h: avoid namespace pollution in public headers.
23109 2004-06-21  Martin Baulig  <martin@ximian.com>
23111         * exception.c (mono_get_exception_security): It's in
23112         "System.Security", not in "System".
23114         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
23115         the exception classes.
23117 2004-06-21  Martin Baulig  <martin@ximian.com>
23119         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
23120         Protect the exception object from being finalized.
23122 2004-06-21  Martin Baulig  <martin@ximian.com>
23124         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
23125         public function.
23127 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
23129         * reflection.c: Load the assembly in mono_reflection_type_from_name,
23130         if it was not loaded before. Fix parts of #60439.
23132 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
23134         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
23135         code that was broken since Ben's change: wrappers are now
23136         dependent on the method signature only again.
23138 2004-06-21  Martin Baulig  <martin@ximian.com>
23140         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
23141         added interface support.
23143 2004-06-21  Martin Baulig  <martin@ximian.com>
23145         * class.c (mono_vtable_get_static_field_data): New public method.
23147 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
23149         * filewatcher.c : Windows build fix to be compliant with API changes.
23151 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23153         * class.h, class.c: more accessors.
23154         * metadata.h, metadata.c: prepare for hiding MonoType and
23155         MonoMethodSignature: people should use the accessors from now on
23156         outside of the tree.
23158 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23160         * *.c, *.h: more API cleanups.
23162 2004-06-18  Jackson Harper  <jackson@ximian.com>
23164         * assembly.c: Trace loading assemblies.
23165         * loader.c: Trace loading native libraries.
23166         * mono-config.c: Trace loading config files.
23167         
23168 2004-06-18  Dick Porter  <dick@ximian.com>
23170         * locales.c: Tell ICU the lengths of strings, it can cope with
23171         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
23173 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
23175         * image.c: swapped name/filename;
23177 2004-06-18  Martin Baulig  <martin@ximian.com>
23179         * mono-debug-debugger.c (write_class): Write the parent class at
23180         the end of the header.
23182 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
23184         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
23186 2004-06-17  Raja R Harinath  <rharinath@novell.com>
23188         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
23189         (bundle_obj): New conditional define.
23190         (BUILT_SOURCES): Remove.
23191         ($(bundle_srcs)): Make parallel-make safe.
23192         (libmonoruntime_la_LIBADD): Make unconditional.
23193         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
23194         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
23196 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
23198         * culture-info-tables.h: It was inconsistent with the latest
23199           supp info files.
23201 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
23203         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
23204         be loaded.
23206         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
23207         with gcc 2.95.
23209 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
23211         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
23212         cleaned up public header threads.h.
23214 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23216         * Makefile.am, *.c, *.h: more API cleanups.
23218 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23220         * Makefile.am: removed monosn from compilation.
23221         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
23222         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
23223         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
23224         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
23225         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
23226         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
23228 2004-06-15  Jackson Harper  <jackson@ximian.com>
23230         * assembly.c: Make locales lower case when searching the GAC for
23231         assemblies. gacutil will always make locales lowercase when
23232         installing so this effectively makes them case insensitive.
23233         
23234 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
23236         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
23237         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
23238           parameter which allows to choose whether the wait can be interrupted or 
23239           not. Also added the method mono_monitor_enter(), which locks the monitor
23240           using an infinite wait and without allowing interruption.
23241           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
23242           interrupted.
23243         * object.h: Added new fields in MonoThread. suspend_event holds the event
23244           used to susped/resume the thread. synch_lock is the lock object to use for
23245           modifying the thread state.
23246         * threads.c: Use the new synch_lock object for locking, instead of "this",
23247           which can generate deadlocks.
23248           Moved thread state change in Thread.Sleep and Thread.Join from managed
23249           to unmanaged code. This avoids a deadlock when the thread was suspended
23250           just after acquiring the thread lock.
23251           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
23252           Implemented Thread.Suspend using an event instead of ThreadSuspend,
23253           which is not fully implemented in the io-layer.
23254         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
23256 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
23258         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
23259         threads-types.h: more API cleanups.
23261 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
23263         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
23264         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
23265         threadpool.c, threads.c: first pass at the exported API cleanup.
23267 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
23269         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
23271 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23273         * icall.c: added internalGetHome.
23275 2004-06-14  Dick Porter  <dick@ximian.com>
23277         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
23278         possible to return successfully when '.' or '..' were the only
23279         entries in a directory, but were skipped.  The MonoIOStat was not
23280         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
23281         Fixes bug 59574.
23283 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23285         * reflection.c: make binaries run on .Net 1.1 by default.
23287 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
23289         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
23291 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
23293         * marshal.c: keep track of struct size with explicit layout
23294         (bug #59979).
23296 2004-06-12  Martin Baulig  <martin@ximian.com>
23298         * mono-debug-debugger.c: Comment out a debugging g_message().
23300 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
23302         * reflection.c, reflection.h: do not free custom attrs that are cached.
23303         * icall.c: use braces to make code clearer.
23305 2004-06-11  Martin Baulig  <martin@ximian.com>
23307         * class.h (MonoInflatedField): New type.
23308         (MonoClassField): Replaced `MonoType *generic_type' with
23309         `MonoInflatedField *generic_info'.
23311         * icall.c
23312         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
23314 2004-06-11  Martin Baulig  <martin@ximian.com>
23316         * reflection.c (mono_image_create_method_token): Correctly encode
23317         varargs methods.
23319 2004-06-11  Martin Baulig  <martin@ximian.com>
23321         * metadata.c (mono_metadata_parse_method_signature): When parsing
23322         a MethodDef which has VarArgs, also set sentinelpos if we don't
23323         have any parameters.
23325 2004-06-11  Martin Baulig  <martin@ximian.com>
23327         * verify.c (mono_method_verify): In CEE_CALL, use
23328         mono_method_get_signature() to get the method's signature, unless
23329         we're a PInvoke method.
23331 2004-06-10  Jackson Harper  <jackson@ximian.com>
23333         * assembly.c: Use <path>/lib/mono/gac for the extra paths
23334         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
23335         logical name as the supplied path is just a prefix to the gac not
23336         the direct path to it.
23337         
23338 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
23340         * reflection.c: make the token for a created method match
23341         the token of the MethodBuilder it was created from
23342         (IKVM requires this behaviour now).
23344 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
23346         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
23347         reflection.c, socket-io.c: leak fixes.
23349 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23351         * icall.c: handle sentinel pos in vararg methods in position different
23352         from 0.
23354 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23356         * culture-info-tables.h: freshly generated.
23358 2004-06-09  Martin Baulig  <martin@ximian.com>
23360         * loader.c (mono_get_method_constrained): Call `mono_class_init
23361         (constrained_class)'.   
23363 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
23365         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
23366         any methods. Fixes #59629.
23368 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
23370         * culture-info-tables.h: reflecting locale-builder updates.
23372 2004-06-08  Dick Porter  <dick@ximian.com>
23374         * object.h:
23375         * locales.c: Fixed compile warnings, including a real bug in
23376         CompareInfo_internal_compare.
23377         
23378 2004-06-08  Dick Porter  <dick@ximian.com>
23380         * locales.c
23381         (ves_icall_System_Globalization_CompareInfo_internal_index):
23382         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23383         Double-check the resuls of usearches, because ICU currently
23384         ignores most of the collator settings here.  Fixes bug 59720.
23385         
23386 2004-06-08  Dick Porter  <dick@ximian.com>
23388         * locales.c
23389         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23390         Fix memory leak and segfault-causing typo.  No idea how this one
23391         lasted so long without being noticed.
23393 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
23395         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
23396         any methods. Fixes #59629.
23398 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23400         * assembly.c:
23401         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
23402         own the critical section before). Removed dead code (that's done
23403         in the preload hook).
23405         (mono_assembly_load_with_partial_name): call the preload hook.
23407 2004-06-08  Martin Baulig  <martin@ximian.com>
23409         * metadata.c (mono_metadata_signature_alloc): Default
23410         `sentinelpos' to -1.
23412         * reflection.c (mono_image_get_array_token): Likewise.
23414 2004-06-08  Martin Baulig  <martin@ximian.com>
23416         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
23418         * metadata.c (mono_metadata_parse_method_signature): When parsing
23419         a MethodDef which has VarArgs, set sentinelpos.
23421         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
23422         `gint16' since we're using -1 for non-varargs methods.
23424         * reflection.c
23425         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
23426         (method_encode_signature): Added varargs support.
23427         (method_builder_encode_signature): Likewise.
23428         (mono_image_get_varargs_method_token): New static method.
23429         (mono_image_create_method_token): New public method; this is
23430         called via an icall instead of mono_image_create_token() when
23431         calling a varargs method.       
23433 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
23435         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
23437 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
23439         * culture-info-tables.h : Reflecting the latest locale-builder that
23440           fixed empty array representation ({} to {0}).
23442 2004-06-07  Jackson Harper  <jackson@ximian.com>
23444         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
23445         looking up extra gac paths. This allows MONO_GAC_PATH to act
23446         exactly like a prefix.
23447         
23448 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
23450         * reflection.c (mono_reflection_type_from_name): Make a copy of the
23451         type name before modifying it. Fixes #59405.
23453 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
23455         * culture-info.h: added fields for "all datetime patterns".
23456         * locales.c: (  ves_icall_System_Globalization_CultureInfo
23457           _construct_datetime_format ()): fill xxx_patterns fields.
23458         * object.h: added fields for "all datetime patterns" to
23459           MonoDateTimeFormatInfo.
23460         * culture-info-tables.h: reflecting locale-builder updates.
23462 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
23464         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
23465         the event has no add and remove methods. Fixes #59629.
23467 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
23469         * object.c: Fixed possible integer overflow when allocating large
23470         strings.
23472 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
23474         * culture-info-tables.h: reflecting locale-builder updates.
23476 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
23478         * culture-info-tables.h: reflecting locale-builder updates.
23480 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
23482         * culture-info-tables.h: reflecting locale-builder updates.
23484 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
23486         * threads.c: Made Thread.Sleep abortable.
23488 2004-06-02  Martin Baulig  <martin@ximian.com>
23490         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
23492         * debug-mono-symfile.h: Bumped symbol file version number to 37.
23494 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
23496         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
23498 2004-05-30  Jackson Harper  <jackson@ximian.com>
23500         * reflection.c: Do not hardcode assembly versions or public key
23501         tokens anymore. All of this except the corlib section was dead
23502         code anyways.
23503         
23504 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
23506         * object.c (mono_runtime_invoke_array): Automatically create boxed
23507         objects for byref valuetypes if needed. Fixes #59300.
23508         
23509         * object.c (mono_method_return_message_restore): Handle 
23510         MONO_TYPE_OBJECT as well.
23512 2004-05-28  Jackson Harper  <jackson@ximian.com>
23514         * reflection.c: The modified type encoding was causing build
23515         problems. Reverted for now.
23516         
23517 2004-05-28  Jackson Harper  <jackson@ximian.com>
23519         * reflection.c/h: Take an assembly ref so that we dont create
23520         fully qualified names when encoding types in the same assembly as
23521         the custom attribute being emitted.
23522         * appdomain.c: Increment version number.
23523         
23524 2004-05-26  Duncan Mak  <duncan@ximian.com>
23526         * icall.c
23527         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
23528         Set the full version number (major, minor, build, revision).
23530 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
23532         * marshal.c (emit_struct_conv): increment src/dst after blit
23533         (mono_marshal_get_managed_wrapper,
23534         mono_marshal_get_native_wrapper): make sure we have marshalling
23535         info before marshalling params (info computation affects
23536         blittable)
23538         * class.c (class_compute_field_layout): correctly deal with
23539         blittable
23540         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
23541         value types (as per what windows dows by default)
23542         (mono_class_setup_mono_type): System.ValueType is blittable
23543         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
23544         blittable
23546         * marshal.c (mono_marshal_load_type_info): flag types  as
23547         non-blittable if the native layout doesn't match the managed
23548         layout
23550 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23552         * appdomain.c: don't add stuff in the private search path that is
23553         above the application base. If application base is not set, there's
23554         no private search path.
23556 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
23558         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
23559         byref struct arguments in native->managed marshalling.
23561 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
23563         * marshal.c (mono_marshal_get_runtime_invoke): correctly
23564         cache methods using signature (special case for methods
23565         that are value type or string class)
23566         
23567         * image.c (mono_image_close): clean up allocated GSList's
23568         in runtime_invoke_cache.
23570 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23572         * mono-config.c: set the correct path for mono_cfg_dir on windows when
23573         there's no MONO_CFG_DIR environment variable defined.
23575 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23577         * threads.c: windows version must be >= 0x0500 to include OpenThread.
23579 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
23581         * threadpool.c: Really wait for 500ms after the async call, even if the wait
23582           is interrumped.
23583         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
23584           before waiting for it, and call CloseHandle after the wait to unref it.
23585           This will make sure that handles are not disposed too early.
23587 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23589         * appdomain.c:
23590         * appdomain.h:
23591         * icall.c: removed
23592         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
23593         needed now.
23595         * object.c: se the application_base only for the domain that runs
23596         Main. Fixes bug #59216,
23598 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23600         * appdomain.c:
23601         * object.c: only the domain in which Main is run have
23602         SetupInformation.ConfigurationFile set, so moved a few lines from
23603         appdomain.c to object.c.
23605 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23607         * appdomain.c: we tried to load [name].(dll|exe), but according
23608         to bug #57710, we must also try [culture]/[name].(dll|exe) and
23609         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
23610         There's a test case attached to bug #58922.
23612 2004-05-27  Dick Porter  <dick@ximian.com>
23614         * icall.c:
23615         * file-io.c: Implemented icalls for locking and unlocking regions
23616         in a file.
23617         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
23618         FALSE on error (fixes both compiler warning and real bug.)
23620 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
23622         * culture-info-tables.h: reflecting locale-builder updates.
23624           (Added missing ChangeLog entry for 05/26)
23626 2004-05-27  Jackson Harper  <jackson@ximian.com>
23628         * locales.c: Fix some cut and paste errors.
23629         
23630 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23632         * mono-config.c: set the correct path for config. directory on windows.
23634 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
23636         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
23637           on win32.
23639 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
23641         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
23642         from pinvoke functions.
23643         
23644         * marshal.c (mono_ftnptr_to_delegate): Implement this.
23646 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
23648         * culture-info-tables.h: reflecting locale-builder updates.
23650 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
23652         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
23653         #59086.
23655 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
23657         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
23658         * icall.c: Modified icalls for RNG.
23659         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
23660         Windows (CryptoAPI).
23662 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
23664         * locales.c: Fix build.
23666 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
23668         * culture-info-tables.h: reflecting locale-builder updates.
23670 2004-05-25  Jackson Harper  <jackson@ximian.com>
23672         * locales.c: When creating the current culture use the $LANGs
23673         specific culture. So DateTimeFormat and NumberFormat entries are created.
23674         
23675 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
23677         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
23678         a char array as parameter.
23680 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
23682         * image.c: In mono_image_open(), always use an absolute path name to
23683           look for already loaded images.
23685 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
23687         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
23688         missing in the windows build (like older cygwin include files).
23690 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
23692         * icall.c: Fixed check for possible integer overflow in Buffer_
23693         BlockCopy icall. Replaced comments style // by /* */.
23695 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
23697         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
23698         
23699         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
23700         check after MONO_VTADDR. Fixes pinvoke2.exe.
23702         * marshal.h marshal.c metadata.h: Add beginnings of support for
23703         ftnptr -> delegate marshalling.
23705 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
23707         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
23708         * threads.c: Fix warnings.
23710 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
23712         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
23713         * icall.c: Registered icalls for Suspend and Resume.
23714         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
23715           Thread.Abort.
23716         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
23717         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
23718         * process.c: Use WaitForSingleObjectEx.
23719         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
23720           checkpoints.
23721         * threads.c, threads.h: Make use of new Ex wait methods. Improved
23722           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
23723           for Suspend and Resume. Added new mono_thread_stop, used for stoping
23724           background threads. Added basic support for Abort in Windows.
23725           Start new threads using a managed delegate invoke wrapper. This wrapper
23726           has an interruption checkpoint that is needed since an interruption
23727           can be requested before the thread leaves the unmanaged code that starts 
23728           the thread.
23729         * marshal.c: Added interruption checkpoint after every native call, and
23730           also before managed calls for wrappers called from unmanaged code to
23731           go into managed code.
23732         * object.h: Added new field in MonoThread to keep track of interruption
23733           requests.
23735 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
23737         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
23738         calls.
23740 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23742         * appdomain.c:
23743         * assembly.c:
23744         * gc.c:
23745         * locales.c:
23746         * mono-config.c:
23747         * rand.c: getenv -> g_getenv (windows!)
23749         * process.c: complete_path is also used on non-windows platforms.
23751 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23753         * icall.c: new signature for Process_Start.
23755         * process.[ch]: new signature for Process_Start. If we're on windows
23756         and UseShellExecute is false, we have to search for the program by
23757         ourselves if we don't get a full path.
23759 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
23761         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
23762         marshalling and call CleanUpNativeData if needed. Fixes #58646.
23764 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23766         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
23767         Fixes bug #58373.
23769 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23771         * process.c: use double quotes to quote program name and arguments on
23772         windows. Fixes bug #58575.
23774 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23776         * file-io.c: don't return "." and ".." when using windows Find*File.
23778 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
23780         * marshal.c: Don't pass wrappers to message init because method 
23781         addressed used to lookup metadata. part of remoting[2|3] fix.
23783 2004-05-15  Jackson Harper  <jackson@ximian.com>
23785         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
23786         path is essentially the same as MONO_PATH except that it points to
23787         GACs instead of lib directories.
23788         * loader.h: The user gac is gone so we dont need function to
23789         enable/disable it.
23790         * mono-config.c: user gac option is now gone.
23791         
23792 2004-05-15  Jackson Harper  <jackson@ximian.com>
23794         * culture-info.h: Make defines more consistent, add calendar data
23795         to the culture info table.
23796         * culture-info-tables.h: Add basic calendar data. Basically
23797         everyone gets default gregorian until all the data is
23798         updated.
23799         * locales.c: Use the new consistent defines. Set calendar data for
23800         culture info objects.
23801         * object.h: add a field for calendar data to CultureInfo
23802         
23803 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
23805         * image.c: image->runtime_invoke_cache is keyed on signatures now.
23806         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
23807         a signature.
23808         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
23809         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
23810         an extra param that is the pointer of the method to invoke. The IL for
23811         the invoke method is no longer specific to the method, but to the
23812         signature of the method. Thus, we can share the same code for multiple
23813         methods. This reduces the number of methods that have to be compiled.
23815 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
23817         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
23819         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23821         * icall.c: Optimize Buffer.BlockCopy.
23823 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23825         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
23826         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
23827         quote). Changed them to "MMMM yyyy".
23829 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
23831         * rand.c
23832         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
23834 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
23836         * reflection.h: Updated after changes to managed structures.
23838         * appdomain.c: Bump corlib version.
23840 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23842         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
23843         windows.
23845 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23847         * Makefile.am: link to ../os/libmonoos.la on windows.
23849         * assembly.c:
23850                 -If MONO_DEBUG, warn about non-existing directories in
23851                 MONO_PATH.
23852                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
23853                 compile time variable.
23854                 -Removed init_default_path and call mono_set_rootdir from
23855                 libmonoos.a instead (windows only).
23857         * assembly.h: declare mono_assembly_getrootdir().
23859         * domain.c:
23860         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
23862         * loader.c: s/getenv/g_getenv/
23864 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
23866         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
23868         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
23870         * metadata.h: Add new marshalling conversions.
23872         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
23873         function.
23875         * reflection.c (mono_reflection_get_type): Lookup the type in all
23876         modules of a multi-module assembly. Fixes #58291.
23878 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
23880         * threads.c: Before aborting a background, set the StopRequested
23881         state.  This avoids throwing the Abort exception.
23882         In mono_thread_manage, don't continue with the shutdown until all
23883         aborted threads have actually stopped.
23885 2004-05-10  Jackson Harper  <jackson@ximian.com>
23887         * locales.c: Remove the modifier from culture names.
23888         
23889 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23891         * Makefile.am: monosn is not installed any more. It has been deprecated
23892         in favor of sn.
23894 2004-05-07  Jackson Harper  <jackson@ximian.com>
23896         * locales.c
23897         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
23898         Fix array construction, add bailout if the length is 0.
23900 2004-05-07  Dick Porter  <dick@ximian.com>
23902         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
23903         machine doesn't have a DNS entry.  Patch by Urs Muff
23904         (umuff@quark.com), fixes bug 57928.
23906 2004-05-06  Jackson Harper  <jackson@ximian.com>
23908         * reflection.c: Handle null PublicTokens properly. alloc mem for
23909         assembly names culture so we dont crash when freeing it.
23910         
23911 2004-05-06  Jackson Harper  <jackson@ximian.com>
23913         * assembly.c: Check the usergac when loading with partial names.
23914         
23915 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
23917         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
23918         does nothing for now (not required for Linux/Windows) but the class
23919         library can call it (and a newer or modified runtime could need it).
23920         * icall.c: Registred icall.
23922 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23924         * loader.c: prints a message on module loading error we set MONO_DEBUG
23925         environment variable.
23927 2004-05-05  Jackson Harper  <jackson@ximian.com>
23929         * appdomain.c: Handle PublicKeyToken=null properly.
23930         
23931 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
23933         * environment.c|h: Added icall ves_icall_System_Environment_
23934         GetOSVersionString to get the current OS version as a string.
23935         * icall.c: Registred icall.
23937 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
23939         * object.c: in mono_object_get_virtual_method(), take into account that
23940         non-virtual methods don't have a slot in the vtable. Check needed when
23941         the object is a proxy.
23943 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
23945         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
23946         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
23948         * object.c (mono_class_compute_gc_descriptor): Fix warning.
23950         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
23951         passed when a valuetype is expected.
23953         * object.c (mono_unhandled_exception): Only set the exit code if the
23954         exception happens in the main thread. Fixes thread5.exe.
23956         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
23957         invalid names. Fixes #58047.
23959 2004-05-03  Jackson Harper  <jackson@ximian.com>
23961         * assembly.c: This line was committed accidently and is unneeded.
23962         
23963 2004-05-03  Jackson Harper  <jackson@ximian.com>
23965         * icall.c: Add new icall for Assembly::LoadWithPartialName
23966         * assembly.c/.h: new function that probes the GAC to load partial
23967         assembly names by Paolo Molaro.
23968         
23969 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23971         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
23972         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
23973         (type_get_fully_qualified_name): Added PublicKeyToken when building a
23974         full type name.
23976 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23978         * appdomain.c: fixed check for 'neutral' culture and removed warning.
23979         * reflection.c: fix bug when parsing a full type name and Version is not
23980         the last thing in the string.
23982 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
23984         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
23985         crashes when it is freed.
23987 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23989         * assembly.c: print the compat warning to stderr.
23991 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
23993         * assembly.c (mono_assembly_load_references): Add a compatibility
23994         hack to run old applications that might be still referencing the
23995         3300-based assemblies, only do this for System.xxx.
23997 2004-05-01  Jackson Harper  <jackson@ximian.com>
23999         * appdomain.c: If the culture is neutral we set it to "".
24000         
24001 2004-04-29  Jackson Harper  <jackson@ximian.com>
24003         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
24005 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
24007         * string-icalls.c: added low overhead function for copying chars
24008         * icall.c: added needed icall for the above function
24010 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24012         * icall.c: fix return value of get_global_assembly_cache.  Implemented
24013         Environment.GetLogicalDrives.
24015 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
24017         * rand.c: try and talk to egd or prngd
24018         for random bytes if opening devices fail.
24020 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
24022         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
24023         alignment for the type using the native alignment of its members 
24024         instead of using klass->min_align.
24026         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
24028 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24030         * file-io.c:
24031         * socket-io.c: added check for sys/aio.h.
24033 2004-04-28  Dick Porter  <dick@ximian.com>
24035         * threads.c: Don't abort a thread thats already aborting, when
24036         terminating everything.
24038 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24040         * icall.c: added 2 new async calls for Socket.
24042         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
24043         IO on *nix systems.
24045         * threadpool.c: removed unused variable.
24047 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
24049         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
24051 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
24053         * locales.c: put back string_invariant_tolower () and
24054         string_invariant_toupper ().
24056 2004-04-26 David Waite <mass@akuma.org>
24058         * file-io.h:
24059         * socket-io.h:
24060         * threads.h:
24061         * unicode.h: remove comma from end of enumeration declarations
24063 2004-04-26 David Waite <mass@akuma.org>
24065         * debug-mono-symfile.h:
24066         * decimal.c:
24067         * mono_debug.h:
24068         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
24071 2004-04-26  Jackson Harper  <jackson@ximian.com>
24073         * appdomain.c: Increment version number.
24074         
24075 2004-04-26  Jackson Harper  <jackson@ximian.com>
24077         * appdomain.c: Set assembly references public token value when
24078         PublicKeyToken is specified, not the hash_value. Free public token
24079         values when free assembly name data. Previously the public key
24080         token was hex decoded, however we are using hex encoded public key
24081         tokens, so this is not neccasary.
24082         * assembly.c: Lookup assemblies in the gac if their public token
24083         value is set. Add function to allow enabling user gac
24084         lookups. Specify whether or not the assembly was loaded from the
24085         GAC. Compare full assembly names when checking the cache for
24086         assemblies (Temporarily disabled see comment in code). Remove
24087         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
24088         specifies trace-loader they get extra info to stdout on the
24089         loading of assemblies.
24090         * image.h: Add a field for an assembly references public token
24091         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
24092         whether an assembly has been loaded from the GAC.
24093         * image.c: Remove a corlib -> mscorlib name mapping.
24094         * loader.h: Add function to enable/disable the user gac.
24095         * mono-config.c: Check if the usergac is enabled in the config
24096         file.
24097         * icall.c: New icall to determine whether or not an assembly has
24098         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
24099         * tabldefs.h: Add constant for assemblyref flag that specifies a
24100         full public key is used instead of a public token.
24101         * reflection.c: Remove mscorlib -> corlib mappings. Set
24102         PublicTokenValue instead of hash value. This value is a hex
24103         string so it does not need to be expanded.
24105 2004-04-26  Martin Baulig  <martin@ximian.com>
24107         * mono-debug-debugger.c (mono_debugger_initialize): Set
24108         `mono_debugger_initialized' before calling mono_debug_lock().
24110 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
24112         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
24113           InternalToUpper/InternalToLower.
24114         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
24115           removed invariant culture shortcut.  This is now done in managed code.
24116         * locales.c: (string_invariant_toupper/tolower) removed.
24118 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24120         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
24121         Added Poll internal call.
24123         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
24124         call for Poll. Select was too heavy for polling a single socket.
24126         * threadpool.[ch]: added mono_threadpool_cleanup.
24127         * threads.c: use it. Don't use Thread_Abort on windows.
24129 2004-04-23  Martin Baulig  <martin@ximian.com>
24131         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
24133 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
24135         * icall.c: Registred new icalls for key pair protection and added an
24136         icall for Environment.GetFolderPath on Windows.
24137         * security.c|h: Added new icalls for key pair protection.
24139 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24141         * socket-io.c: don't display the non-supported family warning for known
24142         families. Now this is not displayed on windows when checking support
24143         for IPv4/IPv6.
24145 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24147         * class.c: don't display the layout warning for static fields.
24149 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
24151         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
24152         * locales.c, locales.h: Added new icalls for culture-specific
24153         Char.ToLower and Char.ToUpper.
24155 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24157         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
24158         by David Waite.
24160 2004-04-20  Martin Baulig  <martin@ximian.com>
24162         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
24163         of the type name before passing it to mono_reflection_type_from_name().
24165 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
24167         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
24168         encodings here. Fixes #56965.
24170 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
24172         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24173         fix test on strstr result not that I can see anything that
24174         relies on the result.
24176 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
24178         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
24179         Fixes #57081.
24181         * marshal.c (mono_marshal_get_string_encoding): New helper function.
24183         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
24184         function to determine which marshalling to use for strings. Fixes
24185         #56965.
24187         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
24189         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
24191 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
24193         * icall.c: #include mono-config.h
24195 2004-04-15  Jackson Harper  <jackson@ximian.com>
24197         * culture-info-tables.h: Fix date formats for en-US culture.
24198         
24199 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
24201         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
24202         ThreadPool.SetMinThreads.
24203         * threadpool.c: Implemented ThreadPool.GetMinThreads and
24204         ThreadPool.SetMinThreads.
24206 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
24208         * mono-config.c: also load the .config file in the directory
24209         where the assembly was found.
24211 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
24213         * assembly.c: load per-assembly config files.
24214         * icall.c: decrapified code to get the config dir and moved to
24215         mono-config.c.
24216         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
24217         per-assembly config files. When doing a dll map lookup give precedence
24218         to the per-assembly data.
24220 2004-04-14  Martin Baulig  <martin@ximian.com>
24222         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
24223         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
24224         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
24226         * mono-debugger-debugger.c: While the debugger is locked, remember
24227         whether the symbol tables have changes and send one single
24228         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
24230 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
24232         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
24234         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
24235         function.
24237         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
24238         account when marshalling string arrays. Fixes #56965.
24240 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
24242         * icall.c: Add new icalls mapping for security.
24243         * security.c|h: Add internal calls for WindowsIdentity,
24244         WindowsImpersonationContext and WindowsPrincipal.
24246 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
24248         * class.c: Added comment to ensure the System.MonoDummy class
24249         is removed when no longer necessary
24251 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
24253         * appdomain.c: Pass arguments to the bootstraping exceptions to
24254         minimize JITed methods at boot
24256         * metadata.c (mono_exception_from_name_two_strings): Allow for the
24257         second string to be null.
24259         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
24260         Change the protocol to minimize the JIT methods at startup.  Now
24261         it Returns the internal codepage, if the value of "int_code_page"
24262         is 1 at entry, and we can not compute a suitable code page
24263         number, returns the code page as a string.
24265 2004-04-13  Jackson Harper  <jackson@ximian.com>
24267         * culture-info-tables.h: Fix number of decimal digits for all
24268         english locales.
24270 2004-04-13  Jackson Harper  <jackson@ximian.com>
24272         * icall.c: Clairfy out of sync error message. It is not always
24273         your corlib that is out of sync.
24275 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
24277         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
24278         properties when only the set accessor is overriden. Fixes #55874.
24280 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
24282         * assembly.c (mono_assembly_load_references): Make this thread safe.
24283         Fixes #56327.
24285 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
24287         * monosn.c: Add missing initialization calls.
24289 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
24291         * locales.c:
24292         ves_icall_System_Globalization_CultureInfo_construct_number_format
24293         Fix g_assert so it compiles on fussier compilers re int/ptr
24294         mismatch
24296 2004-04-08  Dick Porter  <dick@ximian.com>
24298         * socket-io.h:
24299         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
24300         53992.  Also rearrange the code so that the internal calls return
24301         an error value and exceptions are thrown from managed code.
24303         * icall.c: Add type info to the socket icalls.
24305 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24307         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
24308         owes me a beer.
24310 2004-04-07  Martin Baulig  <martin@ximian.com>
24312         * class.c (mono_class_from_generic_parameter): Don't default
24313         `klass->parent' to `mono_defaults.object_type'.
24315 2004-04-07  Martin Baulig  <martin@ximian.com>
24317         * reflection.c (mono_reflection_initialize_generic_parameter): Set
24318         `param->pklass->reflection_info'.       
24320 2004-04-07  Jackson Harper  <jackson@ximian.com>
24322         * culture-info-tables.h: Fix date separator symbol.
24323         
24324 2004-04-07  Martin Baulig  <martin@ximian.com>
24326         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
24327         from System.Type to System.MonoType.
24329 2004-04-07  Martin Baulig  <martin@ximian.com>
24331         * reflection.h
24332         (MonoReflectionGenericParam): Added `has_reference_type' and
24333         `has_value_type' fields.
24335         * reflection.c (mono_image_get_generic_param_info): Encode the
24336         correct flags if we have the `class' or `struct' constraint.
24338 2004-04-07  Martin Baulig  <martin@ximian.com>
24340         * reflection.h
24341         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
24343 2004-04-07  Jackson Harper  <jackson@ximian.com>
24345         * appdomain.c: Revert extra patches, just wanted to bump the
24346         version number.
24347         
24348 2004-04-07  Jackson Harper  <jackson@ximian.com>
24350         * Makefile.am: Add culture-info private headers.
24351         * icall.c: Add new icalls for contructing locales.
24352         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
24353         * locales.h: Declare new culture info construction methods.
24354         * object.h: Add new fields used to avoid the CultureMap to
24355         MonoCultureInfo.
24356         * culture-info.h: Definition of structs used in the culture info
24357         tables.
24358         * culture-info-tables.h: Autogenerated tables that contain culture
24359         info data. This file was generated with the locale-builder tool.
24360         * appdomain.c: Incement corlib version number.
24361         
24362 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
24364         * appdomain.c: (mono_runtime_init) move mono_thread_init
24365         to before mono_object_new calls so critical sections
24366         are initialized before use.
24368 2004-04-07  Martin Baulig  <martin@ximian.com>
24370         * icall.c
24371         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
24372         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
24373         (ves_icall_MonoGenericParam_initialize): Removed.
24374         (monogenericparam_icalls): Removed.
24375         (generictypeparambuilder_icalls): Added new table for
24376         System.Reflection.Emit.GenericTypeParameterBuilder.
24378         * reflection.c
24379         (mono_reflection_define_generic_parameter): Removed.
24380         (mono_reflection_initialize_generic_parameter): This is now called
24381         from GenericTypeParameterBuilder's .ctor.
24383 2004-04-06  Martin Baulig  <martin@ximian.com>
24385         * class.c (mono_class_init): Don't inflate nested classes in a
24386         generic instance.
24387         (mono_type_get_name_recurse): Include the generic arguments for
24388         generic instances and generic type declarations.
24389         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
24390         (_mono_class_get_instantiation_name): Removed.
24391         (mono_class_create_generic): Always use `gklass->name' as our name.
24393         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
24395         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
24396         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
24397         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
24398         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
24399         closed generic methods here.
24401         * reflection.c
24402         (mono_reflection_generic_inst_get_nested_types): Removed.
24403         (inflate_mono_method): Copy the generic parameters from the
24404         MonoMethodHeader into out MonoGenericMethod.
24406 2004-04-06  Martin Baulig  <martin@ximian.com>
24408         * row-indexes.h
24409         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
24411         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
24413         * reflection.c (build_compressed_metadata): If we have any entries
24414         in the GenericParam, MethodSpec or GenericParamConstraint tables,
24415         set the header version to 1.1.
24417 2004-04-06  Martin Baulig  <martin@ximian.com>
24419         * class.c (mono_class_init): If we're a generic instance,
24420         initialize our nested classes, too.
24421         (_mono_class_get_instantiation_name): Deal with the new `!%d'
24422         suffix. 
24424 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24426         * process.c: quote the argument passed to the shell on windows.
24428 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
24430         * threads.c (mono_alloc_special_static_data): Allow this to be
24431         called during startup.
24433 2004-04-02  Martin Baulig  <martin@ximian.com>
24435         * icall.c
24436         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
24438 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
24440         * icall.c: Fix build.
24442 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
24444         * Makefile.am: Added security.c|h.
24445         * icall.c: Added icall for get_UserName;
24446         * security.c: New file for security related icalls. Added function
24447         get_UserName for System.Environment (fix #56144).
24448         * security.h: New. Header file for security.c
24450 2004-04-02  Dick Porter  <dick@ximian.com>
24452         * icall.c: Deleted the icalls that were obsoleted some time ago
24453         by the ICU string code, and which were mixed into the icall
24454         rearranging.  Fixes bug 55969.
24456         * string-icalls.h: 
24457         * string-icalls.c: Deleted the code that those icalls reference.
24459 2004-04-01  Martin Baulig  <martin@ximian.com>
24461         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
24463         * class.c (mono_class_from_generic_parameter): Don't set 
24464         TYPE_ATTRIBUTE_INTERFACE.
24465         (my_mono_class_from_generic_parameter): Likewise.
24467 2004-04-01  Martin Baulig  <martin@ximian.com>
24469         * loader.c (find_method): Added an optional `MonoClass *ic'
24470         argument to search in a specific interface.
24471         (mono_get_method_constrained): New public function.
24473 2004-04-01  Martin Baulig  <martin@ximian.com>
24475         * reflection.c (mono_image_get_generic_field_token): Use the
24476         `handleref' cache here.
24478 2004-04-01  Martin Baulig  <martin@ximian.com>
24480         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
24482         * reflection.c (create_generic_typespec): Use the `typespec' hash
24483         here, not the `typeref' one.    
24485 2004-04-01  Martin Baulig  <martin@ximian.com>
24487         * class.c (mono_class_inflate_generic_type): Moved the
24488         functionality into a new static inflate_generic_type() which
24489         returns NULL if it didn't do anything.  Only increment the
24490         `mono_stats.inflated_type_count' if we actually inflated
24491         something.
24492         (mono_class_get_full): Check the classes type to see whether we
24493         need to inflate it; also inflate MONO_TYPE_(M)VAR.
24495 2004-04-01  Jackson Harper  <jackson@ximian.com>
24497         * reflection.c: Set culture for assembly references.
24498         
24499 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
24501         * reflection.[ch], icall.[ch], Fix support for pinning variables.
24503 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24505         * assembly.c:
24506         (do_mono_assembly_open): the critical section also covers
24507         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
24509 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24511         * threads.c:
24512         (mono_manage_threads): abort the background threads when finishing.
24513         Fixes bug #47232.
24515 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24517         * gc.c: only close the done_event handle if there was no timeout.
24518         C-ified comments.
24520 2004-03-30  Martin Baulig  <martin@ximian.com>
24522         * icall.c (icall_entries): It's called "System.Activator", not
24523         "System.Activation".    
24525 2004-03-30  Martin Baulig  <martin@ximian.com>
24527         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
24528         (mono_class_create_from_typespec): Likewise.
24530 2004-03-30  Martin Baulig  <martin@ximian.com>
24532         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
24533         `has_ctor_constraint' and `initialized'.
24535 2004-03-30  Martin Baulig  <martin@ximian.com>
24537         * reflection.c (encode_new_constraint): New static function to add
24538         the constructor constraint attribute to a type parameter.
24539         (encode_constraints): Call encode_new_constraint() if necessary.
24541         * reflection.h
24542         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
24544         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
24545         
24546 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
24548         * reflection.c, icall.c: add support for pinning variables. 
24550 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
24552         * marshal.c (mono_marshal_get_managed_wrapper):
24553         init bool local with zero rather than null.
24555 2004-03-29  Martin Baulig  <martin@ximian.com>
24557         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
24558         the "official" behavior here.
24559         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
24561 2004-03-29  Martin Baulig  <martin@ximian.com>
24563         * icall.c: Reflect latest API changes.
24565 2004-03-29  Martin Baulig  <martin@ximian.com>
24567         * loader.c (mono_get_method_from_token): Also call
24568         mono_metadata_load_generic_params () for abstract and interface
24569         methods; replace the type arguments in the method signature with
24570         the ones which are loaded from the metadata.
24572 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
24574         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
24575         of the lock is not the current thread. MS.NET don't do it, in spite of
24576         what the documentation says. See bug #56157.
24578 2004-03-28  Martin Baulig  <martin@ximian.com>
24580         * class.c (mono_class_init): Don't call init_properties() and
24581         init_events() for generic instances; set `prop->parent' when
24582         inflating properties.
24584         * reflection.c (mono_generic_inst_get_object): Call
24585         `mono_class_init (ginst->klass)'.
24586         (mono_type_get_object): Only create a MonoGenericInst if your
24587         generic type is a TypeBuilder.
24588         (do_mono_reflection_bind_generic_parameters): Only set
24589         `ginst->is_dynamic' if our generic type is a TypeBuilder.
24591 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
24593         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
24594         Fixes #56091.
24596 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24598         * icall.c: added Kill_internal icall.
24599         * process.[ch]: added Kill_internal icall.
24601 2004-03-25  Martin Baulig  <martin@ximian.com>
24603         * class.h (MonoStats): Added `generic_instance_count',
24604         `inflated_method_count', `inflated_type_count' and
24605         `generics_metadata_size'.       
24607 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24609         * reflection.c: no warnings now.
24611 2004-03-25  Martin Baulig  <martin@ximian.com>
24613         * class.c (mono_class_get_full): New public function; does a
24614         mono_class_get(), but also takes a `MonoGenericContext *'.
24616         * loader.c (mono_field_from_memberref): Renamed to
24617         `field_from_memberref', made static and added `MonoGenericContext *'
24618         argument.
24619         (mono_field_from_token): Added `MonoGenericInst *' argument.
24620         (method_from_memberef): Likewise.
24621         (mono_get_method_from_token): Likewise.
24622         (mono_get_method_full): New public function; does a
24623         mono_get_method(), but also takes a `MonoGenericContext *'.
24625         * verify.c (mono_method_verify): Get the method's generic context
24626         and pass it to mono_field_from_token(), mono_get_method_full() and
24627         mono_class_get_full().
24629 2004-03-25  Martin Baulig  <martin@ximian.com>
24631         * class.c (mono_class_inflate_generic_type): Take a
24632         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
24633         `MonoGenericMethod *'.
24635 2004-03-25  Martin Baulig  <martin@ximian.com>
24637         * loader.h (MonoMethodInflated): Store the MonoGenericContext
24638         instead of the MonoGenericMethod here.
24640 2004-03-25  Martin Baulig  <martin@ximian.com>
24642         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
24643         each time we create a new MonoGenericInst, we also create a new
24644         context which points back to us.
24646         * class.c (inflate_method): Use `ginst->context' instead of
24647         creating a new context.
24649         * loader.c (method_from_memberref): Use
24650         `klass->generic_inst->context' instead of creating a new context.
24652 2004-03-25  Martin Baulig  <martin@ximian.com>
24654         * class.h (MonoGenericContext): New struct.
24655         (MonoGenericMethod): Removed `generic_inst'.
24657         * class.c (mono_class_inflate_generic_method): Take a
24658         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
24660 2004-03-25  Martin Baulig  <martin@ximian.com>
24662         * loader.h (MonoMethodInflated): New typedef.
24664         * metadata.h (MonoMethodSignature): Removed `gen_method', make
24665         `generic_param_count' consume just 30 bits, added `is_inflated'
24666         and `has_type_parameters' flags (one bit each).
24668         * class.c (mono_class_inflate_generic_method): Create a
24669         MonoMethodInflated instead of a MonoMethodNormal and set
24670         `is_inflated' in the method signature.
24672         * class.h (MonoGenericMethod): Removed `generic_method'.
24674 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
24676         * image.c: Make sure the name of a MonoImage is always an absolute path.
24677           This fixes bug #54415.
24679 2004-03-24  Martin Baulig  <martin@ximian.com>
24681         * class.c (mono_class_setup_vtable): If we're a generic instance,
24682         use our generic type's vtable size.
24684 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
24686         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
24687         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
24688         problems.
24690 2004-03-23  Martin Baulig  <martin@ximian.com>
24692         * class.h (MonoDynamicGenericInst): Added `int count_events' and
24693         `MonoEvent *events'.
24695         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
24696         (typebuilder_icalls): Added "get_event_info"; calls
24697         mono_reflection_event_builder_get_event_info(). 
24699         * reflection.c (mono_reflection_generic_inst_initialize): Added
24700         `MonoArray *events'.
24701         (mono_reflection_event_builder_get_event_info): New function.
24703 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
24705         * object.h: add mono_type_initialization_init
24707         * object.c (mono_runtime_class_init): 
24708         implement class constructor synchronization rules
24709         to cope with threading issues.  
24710         add mono_type_initialization_init
24712         * appdomain.c (mono_runtime_init): call 
24713         mono_type_initialization_init
24715         * class.h: removing initializing field from MonoVTable
24717 2004-03-23  Martin Baulig  <martin@ximian.com>
24719         * class.c (my_mono_class_from_generic_parameter): Use
24720         `param->name' if it's not NULL. 
24722 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
24724         * class.c: do not insert non-virtual methods in the vtable.
24725         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
24726         that means the method is non-virtual. This never would have
24727         happened before.
24729 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
24731         * profiler.c: Added lock for accessing coverage_hash.
24733 2004-03-22  Martin Baulig  <martin@ximian.com>
24735         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
24736         `method->method->signature->generic_param_count != 0' to make it
24737         work for interface methods.
24739 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24741         * process.c: quote the string passed to the shell using g_shell_quote.
24743 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24745         * threads.c:
24746         (mono_threads_manage): don't remove the finalizer thread and self
24747         from the threads hash table so that mono_thread_manage can be called
24748         more than once.
24750 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24752         * process.c: quote the arguments when UseShellExecute is true. Fixes
24753         bug #55790.
24755 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24757         * threads.c: set mono_thread_detach as a cleanup routine for every
24758         thread. This way it's always executed upon thread termination, either
24759         aborted or finished normally. No more xsp hangs!
24761 2004-03-17  Martin Baulig  <martin@ximian.com>
24763         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
24764         `int count_nested' and a `MonoType **nested'.
24766         * reflection.c (mono_reflection_bind_generic_parameters): Moved
24767         most of the functionality into a new static
24768         do_mono_reflection_bind_generic_parameters() and don't take a
24769         `MonoType *nested_in' argument any more.  Don't compute nested
24770         types here.
24771         (mono_reflection_generic_inst_get_nested_types): New public method
24772         to get nested types.
24774         * class.c (mono_class_create_generic): Set `klass->nested_in' if
24775         we're a nested class.
24777         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
24778         mono_reflection_generic_inst_get_nested_types() to compute the
24779         nested types.
24781 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
24783         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
24784         descriptive error message under windows.
24785         
24786 2004-03-17  Martin Baulig  <martin@ximian.com>
24788         * class.c (dup_type): Added `const MonoType *original' argument;
24789         copy the attrs from the original type.
24791 2004-03-17  Martin Baulig  <martin@ximian.com>
24793         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
24794         `m->generic_inst_cache' here.
24796 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
24798         * exception.h exception.c: Add stack_overflow_exception.
24800 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24802         * threadpool.c:
24803         (overlapped_callback): call SetEvent *after* invoking the callback.
24804         No need to call CloseHandle.
24806 2004-03-16  Martin Baulig  <martin@ximian.com>
24808         * reflection.c (mono_image_get_fieldref_token): Take a
24809         `MonoReflectionField *' instead of a `MonoClassField *' and a
24810         `MonoClass *'; store the `MonoReflectionField *' in the hash.
24812 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24814         * appdomain.c: don't add the culture to the filename we're looking for
24815         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
24817 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24819         * locales.c: don't ignore symbols when doing case insensitive compares.
24820         Thanks Dick! Fixes bug #54046.
24822         * threads.c: surround 'threads' usage with enter/leave in
24823         mono_thread_manage.
24825 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
24827         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
24828         implicitly marshalled as [Out]. Fixes #55450.
24830         (mono_marshal_get_runtime_invoke): Zero out the result if there is
24831         an exception.
24833 2004-03-16  Martin Baulig  <martin@ximian.com>
24835         * class.c (mono_class_from_generic_parameter): Use the actual
24836         parameter name. 
24838 2004-03-16  Martin Baulig  <martin@ximian.com>
24840         * reflection.c (type_get_signature_size): New static function.
24841         Compues the size of the type in a method signature.
24842         (method_get_signature_size): New static function; calls
24843         type_get_signature_size() to compute the actual size of the
24844         method's signature.
24845         (method_encode_signature): Use method_get_signature_size() to get
24846         the signature's size rather than using `nparams * 10'.
24848 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24850         * file-io.h: define here WapiOverlapped on windows. I don't want the
24851         regular OVERLAPPED one.
24853         * file-io.c:
24854         * threadpool.c: somehow, BindIoCompletionCallback is not found.
24855         Disabling AIO on windows.
24857 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24859         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
24860         bug #55385.
24862 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24864         * appdomain.c: upgraded corlib version.
24866         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
24867         and BeginWrite. Allow opening files for asynchrnous operations.
24869         * file-io.h: new struct that maps FileStreamAsyncResult.
24870         * icall.c: added new icalls.
24871         * process.[ch]: support setting child process environment variables
24872         and use the SHELL or COMSPEC when UseShellExecute is true.
24874         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
24875         callback for async. IO is here and also BindHandle.
24877         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
24878         from here.
24880 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
24882         * reflection.c (create_custom_attr): Allow len == 0.
24884         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
24885         computation on big-endian machines.
24887 2004-03-13  Martin Baulig  <martin@ximian.com>
24889         * class.h (MonoGenericInst): Added `int count_ifaces'.
24891         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
24892         `ginst->count_ifaces' instead `klass->interface_count' since we
24893         may get called before the vtable is created.
24895         * loader.c (mono_method_get_param_names): If we're a generic
24896         instance, return and don't initialize the class.
24898         * reflection.c (mono_reflection_setup_generic_class): Don't call
24899         ensure_runtime_vtable().
24900         (mono_reflection_bind_generic_parameters): Set
24901         `ginst->count_ifaces'.
24903 2004-03-11  Jackson Harper <jackson@ximian.com>
24905         * icall.c:
24906         * unicode.c:
24907         * unicode.h: Remove unused System.Char icalls.
24908         
24909 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
24911         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
24912         code when we P/Invoke the first library in Windows.Forms, instead
24913         of when we first open the assembly.
24915         * assembly.c: Drop the lookup from here.
24917 2004-03-10  Martin Baulig  <martin@ximian.com>
24919         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
24920         class for properties, fields and events.  Finally fixes #54945.
24922 2004-03-10  Martin Baulig  <martin@ximian.com>
24924         * metadata.c (mono_metadata_class_equal): New static function;
24925         checks whether two generic instances or two generic parameters are
24926         equal.
24927         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
24928         compare classes.        
24930 2004-03-10  Martin Baulig  <martin@ximian.com>
24932         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
24934         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
24935         argument and write it into the `reflection_info' field.
24937         * icall.c
24938         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
24939         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
24941 2004-03-09  Jackson Harper  <jackson@ximian.com>
24943         * char-conversions.h: use 8 bits for numeric data its all we need
24944         * icall.c: numeric data is only 8 bits now.
24946 2004-03-09  Martin Baulig  <martin@ximian.com>
24948         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
24950         * class.c (init_properties, init_events): Initialize the new
24951         `parent' field.
24953         * reflection.c (typebuilder_setup_properties): Likewise.
24954         (typebuilder_setup_events): Likewise.
24956         * reflection.h (MonoEventInfo): Replaced `parent with
24957         `declaring_type' and `reflected_type'.
24959         * icall.c (ves_icall_get_property_info): Distinguish between
24960         declaring and reflected type.
24961         (ves_icall_get_event_info): Likewise.
24963 2004-03-09  Martin Baulig  <martin@ximian.com>
24965         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
24966         (ves_icall_Type_GetField): Correctly set field->klass.
24968 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
24970         * loader.h: Fix warning.
24972 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
24974         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
24975         library routine if present.  Notice that it will still continue
24976         executing even if its missing, for those working on the Gtk#
24977         edition of Windows.Forms.
24979         * assembly.c (do_mono_assembly_open): If loading the
24980         System.Windows.Forms call mono_loader_wini_init.
24982 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
24984         * class.h: Added MonoRemoteClass struct.
24985         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
24986         function for MonoStrings.
24987         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
24988         Added internal call for getting the proxy type.
24989         * marshal.c: Get the type of transparent proxies from its remote_class.
24990         Added methods that generate the IL for type checks and casts:
24991         mono_marshal_get_isinst, mono_marshal_get_castclass, 
24992         mono_marshal_get_proxy_cancast.
24993         * marshal.h: Declaration of the previous new methods.
24994         * object.c: Added new moethods for creating and updating MonoRemoteClass
24995         instances: mono_remote_class, mono_upgrade_remote_class, 
24996         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
24997         * verify.c: FIx transparent_proxy_fields layout.
24998         * appdomain.c: Bump corlib version.
25000 2004-03-04  Jackson Harper  <jackson@ximian.com>
25002         * icall.c: Add icall to access char conversion tables.
25003         * char-conversions.h: Character conversion tables.
25004         * Makefile.am: Add char-conversions.h private header file.
25005         
25006 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
25008         * appdomain.c (unload_thread_main): Increase unloading timeout to
25009         10 sec as a temporary workaround for Nant problems.
25011 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
25013         * gc.c: Add checks for GC_enable and GC_disable.
25015         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
25016         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
25017         (bug #54988).
25018         
25019 2004-02-27  Martin Baulig  <martin@ximian.com>
25021         * reflection.c (mono_reflection_bind_generic_parameters): Take a
25022         `MonoReflectionType *' instead of a `MonoType *'.
25024 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
25026         * gc.c (run_finalize): Avoid finalizing the object representing the
25027         finalizer thread.
25028         (finalizer_thread): Fix warning.
25030 2004-02-25  Martin Baulig  <martin@ximian.com>
25032         * class.c (_mono_class_get_instantiation_name): Added `int offset'
25033         argument for nested types.
25034         (mono_class_create_generic): Added support for nested generictypes.
25036         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
25037         `GList *nested'.
25039         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
25041         * reflection.c (method_encode_signature): Increase the minimum
25042         value of `size' from 10 to 11.
25043         (mono_reflection_bind_generic_parameters): Take `int type_argc'
25044         and `MonoType **types' arguments instead of the `MonoArray
25045         *types'; added `MonoType *nested_in'.  Recursively instantiate
25046         nested classes. 
25048 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
25050         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
25051         stack_overflow_ex members which are used by exception handling.
25053         * appdomain.c (mono_runtime_init): Initialize the new members.
25055         * gc.c (mono_gc_enable): New helper function.
25056         * gc.c (mono_gc_disable): New helper function.
25058 2004-02-23  Martin Baulig  <martin@ximian.com>
25060         * icall.c: I must have been really stupid - make it actually work
25061         this time ;-)
25063 2004-02-23  Martin Baulig  <martin@ximian.com>
25065         * loader.c (method_from_memberref): Only inflate the method if
25066         it's in another klass.
25068 2004-02-23  Martin Baulig  <martin@ximian.com>
25070         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
25071         (mono_class_init): If we're a generic instance and an interface,
25072         compute `class->interface_id'; also create `class->interfaces'
25073         here and inflate them.
25075         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
25076         `ginst->is_open'.
25077         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
25079         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
25081 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
25083         * reflection.c (method_encode_code): Improved the error message
25084         generated by the exception.
25086 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25088         * icall.c: Martin did not do what he said in the ChangeLog for
25089         2004-02-18, but put back the changes for properties and events.
25090         Commenting those changes out again and adding comment to bug #54518.
25091         
25092         * process.c: removed warning.
25094 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
25096         * marshal.c (emit_struct_conv): Print an error message instead of
25097         asserting when a type does not have the StructLayout attribute.
25099 2004-02-20  Martin Baulig  <martin@ximian.com>
25101         * reflection.c (mono_type_get_object): Also use the cache for
25102         generic instances.
25103         (mono_reflection_bind_generic_parameters): Always compute
25104         `ginst->ifaces'.        
25106 2004-02-20  Martin Baulig  <martin@ximian.com>
25108         * class.h (MonoGenericMethod): Removed `klass'.
25110         * class.c (mono_class_inflate_generic_method): Added `MonoClass
25111         *klass' argument.
25113 2004-02-20  Martin Baulig  <martin@ximian.com>
25115         * reflection.c (method_encode_methodspec): Actually use the
25116         uninflated signature for the memberref.
25118 2004-02-20  Martin Baulig  <martin@ximian.com>
25120         * class.h (MonoGenericMethod): Removed `declaring'.
25122         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
25123         is NULL, compute it here.
25125 2004-02-20  Martin Baulig  <martin@ximian.com>
25127         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
25129         * metadata.c (mono_metadata_generic_inst_hash): New method.
25130         (mono_metadata_generic_inst_equal): New method.
25132         * reflection.c (mono_reflection_bind_generic_parameters): Use the
25133         `klass->image->generic_inst_cache' cache to avoid creating
25134         duplicate MonoGenericInst's.
25136         * class.c (mono_class_inflate_generic_type): Use the cache.
25138 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
25140         * object.c: fixed gc descriptor calculation for embedded valuetypes.
25142 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25144         * icall.c: added Socket.WSAIoctl icall.
25146         * socket-io.[ch]: implemented
25147         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
25149 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
25151         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
25153 2004-02-18  Urs C Muff  <umuff@quark.com>
25155         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
25156         this work on PPC and other big-endian architectures.
25158         * debug-mono-symfile.h: Prepended the names of all the `guint32'
25159         fields with an underscore to make sure they're only accessed by
25160         the read32() macro.
25162 2004-02-18  Martin Baulig  <martin@ximian.com>
25164         * icall.c: Put the klass->refclass changes back for methods and
25165         fields, but not for properties and events.  We're currently not
25166         distinguishing between DeclaringType and ReflectedType for
25167         properties and events, that's what caused the regressions.
25169 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25171         * object.c:
25172         (mono_async_result_new): the handle can be NULL.
25174         * threadpool.c: Use an event instead of a semaphore, don't initialize
25175         it until needed. This saves quite a few semaphores from being created
25176         when using the threadpool.
25178 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
25180         * object.c (mono_string_is_interned_lookup): Fix interning of long
25181         strings. Fixes #54473.
25183         * domain.c (ldstr_equal): Optimize if the two strings are equal.
25185         * icall.c: Revert the klass->refclass changes since they introduce
25186         regressions (bug #54518).
25188 2004-02-18  Martin Baulig  <martin@ximian.com>
25190         * class.c (mono_class_init): If we're a generic instance and don't
25191         come from a TypeBuilder, inflate our members here.
25192         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
25193         (mono_class_create_generic): New public method.
25194         (mono_class_initialize_generic): Removed.
25195         (get_instantiation_name): Renamed to
25196         _mono_class_get_instantiation_name() and made it public.
25198 2004-02-18  Martin Baulig  <martin@ximian.com>
25200         * class.c (mono_class_inflate_generic_type): Clear the new
25201         instance's `nginst->klass' when inflating a generic instance.
25202         (mono_class_is_subclass_of): Added (basic) support for generic
25203         instances.
25205 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
25207         * appdomain.h, domain.c: use a MonoCodeManager instead of a
25208         MonoMempool to hold compiled native code.
25210 2004-02-17  Martin Baulig  <martin@ximian.com>
25212         * class.h (MonoDynamicGenericInst): Added `count_properties' and
25213         `properties'.
25215         * reflection.c (mono_reflection_generic_inst_initialize): Added
25216         `MonoArray *properties' argument.
25218         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
25220 2004-02-17  Martin Baulig  <martin@ximian.com>
25222         * icall.c (ves_icall_Type_GetFields): Renamed to
25223         ves_icall_Type_GetFields_internal() and added a
25224         `MonoReflectionType *rtype' argument; pass it to
25225         mono_field_get_object() to set the field's "reflected" type.
25226         (ves_icall_Type_GetConstructors): Likewise.
25227         (ves_icall_Type_GetEvents): Likewise.
25228         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
25229         argument; pass it to mono_method_get_object() to set the method's
25230         "reflected" type.       
25232 2004-02-17  Martin Baulig  <martin@ximian.com>
25234         * class.h (MonoDynamicGenericInst): New type.
25235         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
25237         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
25238         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
25239         (ves_icall_MonoGenericInst_GetFields): New interncall.
25241         * class.c (mono_class_from_generic): Don't call
25242         mono_class_initialize_generic() if this is a dynamic instance;
25243         ie. it's being created from a TypeBuilder.
25244         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
25245         `class->byval_arg.type'.
25247         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
25248         to `inflate_method' and made static.
25249         (mono_reflection_inflate_field): Removed.
25250         (mono_reflection_generic_inst_initialize): New public method.
25252         * reflection.h (MonoReflectionGenericInst): Removed `methods',
25253         `ctors' and `fields'; added `initialized'.
25255 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
25257         * debug-helpers.c (mono_method_full_name): Fix output for empty
25258         namespaces.
25260 2004-02-12  Martin Baulig  <martin@ximian.com>
25262         * class.h (MonoClassField): Added `MonoType *generic_type'.
25264         * reflection.c (mono_image_get_fieldref_token): Added support for
25265         instantiated generic types.
25266         (field_encode_inflated_field): Removed.
25267         (mono_image_get_inflated_field_token): Removed.
25268         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
25270         * reflection.h (MonoReflectionInflatedField): Removed.
25272 2004-02-12  Martin Baulig  <martin@ximian.com>
25274         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
25275         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
25277         * reflection.c (mono_image_get_methodspec_token): Take a
25278         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
25279         (mono_image_create_token): Check whether we have a
25280         `method->signature->gen_method' and call
25281         mono_image_get_methodspec_token() if appropriate.
25282         (inflated_method_get_object): Removed.
25283         (mono_reflection_bind_generic_method_parameters): Return a
25284         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
25285         (mono_reflection_inflate_method_or_ctor): Likewise.
25287         * reflection.h (MonoReflectionInflatedMethod): Removed.
25289 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
25291         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
25292         for custom valuetype marshalling.
25294         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
25296 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25298         * icall.c: fixed WSAGetLastError_internal name.
25300 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
25302         * threads.c (mono_thread_attach): Allow this to be called multiple
25303         times for a thread.
25304         
25305         * threads.c (build_wait_tids): Do not wait for ourselves.
25307         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
25308         appdomain list is empty.
25310         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
25311         memory returned by mono_string_builder_to_utf16, since it points into
25312         managed memory. Thanks to Bernie Solomon for noticing this.
25314         * icall.c: Add AppDomainSetup icalls.
25316         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
25318         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
25319         types.
25321         * reflection.c (reflection_methodbuilder_to_mono_method): Save
25322         custom attributes to the method_aux struct. Also fix array indexes etc.
25324         * loader.c (mono_method_get_param_names): Make dynamic case work again.
25325         
25326 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
25328         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
25329         (both static and runtime) and reduce startup time.
25331 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
25333         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
25334         AsAny marshalling conversion instead of crashing.
25336         * marshal.c: Fix warnings.
25338 2004-02-09  Martin Baulig  <martin@ximian.com>
25340         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
25342         * reflection.h (MonoReflectionInflatedMethod): Removed the
25343         `declaring' field, it's now in the unmanaged MonoGenericMethod.
25345         * reflection.c (method_encode_methodspec): Removed the `method'
25346         argument; we get it from `gmethod->declaring'.
25347         (inflated_method_get_object): Removed the `declaring' argument.
25349 2004-02-09  Martin Baulig  <martin@ximian.com>
25351         * class.h (MonoGenericMethod): New type.
25352         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
25353         `generic_method'.
25355         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
25356         a `MonoGenericMethod *gen_method' one.
25358         * class.c (mono_class_inflate_generic_type): Take an additional
25359         `MonoGenericMethod * argument.  This is only non-NULL if we're
25360         inflating types for a generic method.   
25361         (mono_class_inflate_generic_signature): Renamed to
25362         inflate_generic_signature() and made static; take a
25363         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25364         (inflate_generic_header): Take a `MonoGenericMethod *' argument
25365         instead of a `MonoGenericInst *' one.
25366         (mono_class_inflate_generic_method): Likewise.
25368         * reflection.c (encode_generic_method_sig): Take a
25369         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25370         (method_encode_methodspec): Likewise.
25371         (inflated_method_get_object): Likewise. 
25373         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
25374         field with a `MonoGenericMethod *gmethod' one.  
25376 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
25378         * class.h (mono_class_has_parent): add parens to expansion
25379         so you can ! this.
25381 2004-02-08  Martin Baulig  <martin@ximian.com>
25383         * image.h (MonoImage): Removed `generics_cache'.
25385         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
25386         instead of a `MonoType *' argument; removed the `inflate_methods'
25387         argument.  Don't inflate methods here.
25389         * loader.c (find_method): If it's a generic instance, call
25390         mono_class_init() on the `sclass->generic_inst->generic_type'.
25392         * metadata.c (mono_type_size): Make this work on uninitialized
25393         generic instances; call it on the `ginst->generic_type's class.
25395         * reflection.c (mono_reflection_bind_generic_parameters): Call
25396         mono_class_from_generic() to create the `ginst->klass'.
25398 2004-02-08  Martin Baulig  <martin@ximian.com>
25400         * class.h (MonoClass): Changed type of `generic_inst' from
25401         `MonoType *' to `MonoGenericInst *'.
25403 2004-02-08  Martin Baulig  <martin@ximian.com>
25405         * icall.c (ves_icall_Type_BindGenericParameters): Just call
25406         mono_type_get_object(), this is now creating a `MonoGenericInst'
25407         for MONO_TYPE_GENERICINST.
25408         (ves_icall_MonoGenericInst_GetParentType): Likewise.
25409         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25411         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
25412         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
25413         (inflated_method_get_object): Added `MonoClass *refclass' argument.
25414         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
25415         and reflected type.
25417         * reflection.h (MonoReflectionInflatedMethod): Removed
25418         `declaring_type' and `reflected_type'.
25420 2004-02-08  Martin Baulig  <martin@ximian.com>
25422         * class.h (MonoGenericInst): Added `MonoType *parent' and
25423         `MonoType **ifaces'.
25425         * reflection.h (MonoReflectionGenericInst): Removed `klass',
25426         `parent' and `interfaces'.
25428         * reflection.c (mono_reflection_bind_generic_parameters): Take a
25429         `MonoType *' argument and return a `MonoType *'.
25431         * icall.c
25432         (ves_icall_MonoGenericInst_GetParentType): New interncall.
25433         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
25435 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
25437         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
25438         valuetype marshalling.
25440 2004-02-06  Martin Baulig  <martin@ximian.com>
25442         * class.c
25443         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
25444         (my_mono_class_from_generic_parameter): Likewise.
25446 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
25448         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
25449         contents of the symbol files lazily.
25451         * object.h (MonoThread): Add 'name' and 'name_len' fields.
25453         * threads.h threads.c icall.c: New icalls for getting and setting the
25454         threads name.
25456 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
25458         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
25459         Raise an exception when the domain is not found.
25461 2004-02-03  Martin Baulig  <martin@ximian.com>
25463         * reflection.c (mono_image_get_methodspec_token): Use the
25464         uninflated signature; fixes gen-33.
25466 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
25468         * gc.c threads.c: Make the finalizer thread a normal managed thread so
25469         the finalizer code can use thread functionality.
25471         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
25472         the finalizer thread.
25474         * threads.c: Make some functions more robust.
25476         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
25478         * metadata.h: Add new marshalling conventions.
25480         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
25481         stringbuilder marshalling. Fixes #53700.
25483         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
25485         * reflection.c (mono_image_get_type_info): Save declarative security
25486         info.
25488         * reflection.c (mono_image_get_field_info): Handle uninitialized 
25489         unmanaged fields as well.
25491         * appdomain.c: Bump corlib version.
25493 2004-02-01  Martin Baulig  <martin@ximian.com>
25495         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
25496         method type arguments.  
25498 2004-01-30  Duncan Mak  <duncan@ximian.com>
25500         * marshal.h: Add prototype for
25501         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
25502         and
25503         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
25504         fix the build.
25506 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
25508         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
25509         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
25511 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
25513         * marshal.c (mono_marshal_get_native_wrapper): Add support for
25514         custom marshalling of valuetypes.
25516         * marshal.c: Fix some warnings.
25518 2004-01-29  Martin Baulig  <martin@ximian.com>
25520         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
25521         for generic method parameters.
25523         * reflection.c (method_encode_methodspec): Write the uninflated
25524         signature into the methodspec table.
25525         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
25526         is always the uninflated method.
25527         (reflection_methodbuilder_to_mono_method): Copy the generic
25528         parameters from the MethodBuilder into `header->gen_params'.
25530 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
25532         * class.c (mono_class_from_generic_parameter): Fix warning.
25534 2004-01-27  Martin Baulig  <martin@ximian.com>
25536         * class.c (mono_class_from_generic_parameter): Don't create
25537         `klass->methods' here.  
25539 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
25541         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
25542         extension since it does not work with libraries named lib<FOO>.dll.so.
25544 2004-01-25  Martin Baulig  <martin@ximian.com>
25546         * class.c (mono_class_inflate_generic_type): Added support for
25547         MONO_TYPE_GENERICINST.
25549         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
25550         inflate methods on open constructed types.      
25552 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25554         * object.c: fire ProcessExit event in the root AppDomain after running
25555         Main. Fixes bug #53299.
25557 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
25559         * socket-io.c: include the new socket-wrappers.h header.
25560         Use the wrappers instead of the unix socket functions to make the code
25561         more clear.
25563 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
25565         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
25567         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25568         Fixes #22532.
25570 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
25572         * reflection.c (mono_image_create_pefile): Handle the case when the
25573         entry point is not a MethodBuilder.
25575         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25576         field to ReflectionMethod since it is not allways a builder.
25578         * reflection.c (type_get_fully_qualified_name): New helper function to
25579         return the fully qualified name of a type.
25581         * reflection.c (encode_marshal_blob): Always emit the fully qualified
25582         type name for custom marshallers.
25584         * reflection.c (mono_marshal_spec_from_builder): Ditto.
25586         * class.c (mono_class_setup_vtable): If a parent class already 
25587         implements an interface, use the implementing methods from that class.
25588         Fixes #53148.
25590 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25592         * threadpool.c: just return instead of ExitThread to allow for thread
25593         clean up earlier.
25595 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
25597         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
25598         when closing resource modules.
25600         * reflection.c (mono_image_create_pefile): Handle the case when the
25601         entry point is not a MethodBuilder.
25603         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25604         field to ReflectionMethod since it is not allways a builder.
25606 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
25608         * marshal.c (mono_marshal_get_managed_wrapper): 
25609         mono_marshal_alloc takes native int so CONV_I
25610         the arg for 64bits.
25612 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
25614         * reflection.c (fixup_cattrs): New function to fixup the methoddef
25615         tokens in the cattr table. Fixes #53108.
25617 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25619         * loader.c: don't trim ".dll" before looking up in the config file.
25620         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
25622 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
25624         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
25625         Return the module which contains the resource as well.
25626         (ves_icall_System_Reflection_Module_Close): New icall.
25628         * appdomain.c: Bump corlib version number.
25630         * image.c (mono_image_addref): New public function.
25632         * assembly.c: Call mono_image_addref.
25634         * reflection.c (mono_module_get_object): Increase reference count of 
25635         the image.
25637         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25638         Fixes #22532.
25640         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
25641         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
25642         proper exceptions on DllImport problems.
25644 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
25646         * class.c, metadata.c: eliminate CSIZE macro.
25648 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
25650         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
25651         * object.h: Added async_callback field in MonoAsyncResult.
25652         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
25653         * verify.c: Added async_callback in MonoAsyncResult layout.
25655 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
25657         * reflection.c (mono_reflection_get_custom_attrs): Add support
25658         for Modules.
25660 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
25662         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
25663         marshalling.
25664         (mono_marshal_method_from_wrapper): Add null pointer check.
25666 2004-01-16  Martin Baulig  <martin@ximian.com>
25668         * debug-mono-symfile.h: Set version number to 36 and reflect
25669         latest symbol writer changes.
25671 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
25673         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
25674         multi-dimensional arrays.
25675         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
25676         (mono_class_from_mono_type): Use bounded_array_class_get.
25677         
25678         * class.c (mono_bounded_array_class_get): New function which takes
25679         a 'bounded' bool argument to distinguish vectors from one dimensional
25680         arrays.
25682         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
25683         bounded_array_class_get if the array has bounds.
25685         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
25686         Search modules loaded using AssemblyBuilder:AddModule as well.
25688 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25690         * appdomain.c: increased corlib version.
25691         * filewatcher.c: removed g_print.
25692         * icall.c:
25693         (get_property_info): only allocate what is actually requested.
25694         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
25696 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25698         * Makefile.am: added filewatcher.[ch]
25699         * filewatcher.[ch]: FileSystemWatcher runtime support.
25700         * icall.c: added new FSW icalls.
25702 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
25704         * string-icalls.c: fix stringbuilder regression as suggested by
25705         Iain McCoy <iain@mccoy.id.au>.
25707 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
25709         * process.c (process_read_stringtable_block): Recognize '007f' as
25710         a language neutral stringtable block.
25712 2004-01-12  Patrik Torstensson
25714         * object.h (MonoStringBuilder) : Changed layout to support our
25715         new stringbuilder class.
25716         * marshal.c: Change marshalling to support the new layout of 
25717         string builder.
25718         * appdomain.c: increased version number because new layout of
25719         string builder.
25721 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
25723         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
25724         assembly name as an string instead of an AssemblyName, since it is
25725         easier to extract info from it.
25727         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
25728         the culture subdirectories too. Fixes #52231.
25730 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25732         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
25733         It takes 2 new parameters with an optional name for the method to look
25734         for and case ignoring info.
25736         * threadpool.c: removed unused variable.
25738 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25740         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
25741         It takes 2 new parameters with an optional name for the property to look
25742         for and case ignoring info.
25743         Fixes bug #52753.
25745 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
25747         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
25748         Fix #52451.
25750 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25752         * appdomain.c:
25753         * assembly.c: escape the uri before passing it to g_filename_from_uri.
25754         Fixes bug #52630.
25756 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
25758         * reflection.c: Add support for more than one unmanaged resource.
25760         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
25761         in field->def_value, as done in all other cases.
25763         * reflection.c (mono_reflection_get_custom_attrs): Add support for
25764         TypeBuilders.
25766         * reflection.c (mono_reflection_create_runtime_class): Remove 
25767         errorneous assignment to klass->element_class, since it is already
25768         done in mono_reflection_setup_internal_class.
25770 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25772         * gc.c: added missing LeaveCriticalSection.
25773         * icall.c: indented a couple of lines.
25774         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
25775         if we call EndInvoke inside a callback. Fixes bug #52601.
25777 2004-01-07  Martin Baulig  <martin@ximian.com>
25779         * mono-debug-debugger.h
25780         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
25782 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
25784         * appdomain.c: Use messages in NotImplementedException.
25786         * exception.c (mono_get_exception_not_implemented): Now this takes
25787         a message argument.
25789         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
25790         exception instead of g_asserting an aborting when something is not
25791         implemented.
25793         Add some inline docs.
25795 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
25797         * reflection.h: Update after changes to object layout.
25799         * reflection.c: Implement saving of unmanaged aka win32 resources.
25801         * appdomain.c: Bump version number.
25803         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
25804         Handle missing domains gracefully.
25806 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
25808         * file-io.c : On Windows, there are much more invalid_path_chars.
25810 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
25812         * class.h, object.c: prepare for GetType () speedup.
25814 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
25816         * profiler.c: workaround for --profile null reference exception on
25817           cygwin. Patch by Patrik Torstensson.
25819 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
25821         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
25822         make work for unaligned access.
25824 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
25826         * class.c: small cleanup (class->fields [i] -> field).
25827         * image.c: check address of metadata is valid.
25829 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
25831         * assembly.h assembly.c (mono_assembly_loaded): New public function to
25832         search the list of loaded assemblies.
25834         * reflection.c (mono_reflection_type_from_name): Use 
25835         mono_assembly_loaded instead of mono_image_loaded.
25837         * reflection.c: Fix warnings.
25839 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
25841         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
25842         is dynamic. This is needed since an assembly can contain both dynamic and
25843         non-dynamic images.
25845         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
25846         assembly->dynamic.
25848         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
25850         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
25851         to store modules loaded using AddModule.
25853         * reflection.c (mono_image_fill_file_table): Generalize this so it works
25854         on Modules.
25856         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
25858         * reflection.c (mono_image_fill_export_table_from_module): New function to
25859         fill out the EXPORTEDTYPES table from a module.
25861         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
25862         into a separate function. Also handle loaded non-dynamic modules.
25864         * reflection.c (mono_image_basic_init): Fix memory allocation.
25866         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
25868         * assembly.c (mono_assembly_load_references): Make this public.
25870 2003-12-19  Martin Baulig  <martin@ximian.com>
25872         * class.c (mono_class_initialize_generic): Made this static, take
25873         a `MonoGenericInst *' instead of a `MonoClass *'.
25874         (mono_class_from_generic): Call mono_class_initialize_generic()
25875         unless we're already initialized or being called from
25876         do_mono_metadata_parse_generic_inst().
25878         * class.h (MonoGenericInst): Added `initialized' and
25879         `init_pending' flags.
25881         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
25882         `mono_class_init (gklass)' or mono_class_initialize_generic()
25883         here; set `generic_inst->init_pending' while parsing the
25884         `type_argv'.
25886 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
25888         * locales.c: include string.h for memxxx prototypes
25890 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
25892         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
25893         constructor when accessing literal fields.
25895 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
25897         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
25899         * reflection.c (assembly_add_resource_manifest): New function to fill
25900         the MANIFESTRESOURCE table.
25902         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
25904         * reflection.h: Update to changes in class layout.
25906         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
25907         Reenable call to mono_runtime_is_shutting_down ().
25909         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
25910         determine if the runtime is shutting down.
25912 2003-12-16  Jackson Harper <jackson@ximian.com>
25914         * icall.c: comment out call to mono_runtime_is_shutting_down to
25915         fix build.
25916         
25917 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
25919         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
25920         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
25922 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
25924         * reflection.c: move definition of swap_with_size
25925         to before its first call
25927 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
25929         * appdomain.c (mono_runtime_is_shutting_down): New public function.
25931         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
25932         icall.
25934         * object.c: Fix warnings.
25936         * icall.c (ves_icall_Type_Get...): Only consider inherited static
25937         members if FlattenHierarchy is set.
25939         * reflection.c (mono_image_add_decl_security): New function to emit
25940         declarative security.
25942         * reflection.h reflection.c: Add support for declarative security.
25944         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
25945         
25946 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
25948         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
25949         
25950         * appdomain.c verify.c: Moved corlib version checking into its own
25951         function in appdomain.c since it needs to create vtables etc.
25953 2003-12-13  Patrik Torstensson <p@rxc.se>
25955         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
25956         instead of unwrapped server.
25958 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
25960         * verify.c (check_corlib): Fix field index.
25962 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
25964         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
25965         GetGacPath icall.
25967 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
25969         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
25970         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
25971         cope with sizeof(size_t) != sizeof(guint32).
25973 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25975         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
25976         in case of failure.
25978 2003-12-10  Mark Crichton <crichton@gimp.org>
25980         * icall.c: removed the GetNonZeroBytes.  We now handle this case
25981         in managed code.
25983         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
25985 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
25987         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
25988         marked as deleted.
25990 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
25992         * verify.c (check_corlib): Handle the case when the version field is 
25993         initialized by a static constructor.
25995 2003-12-08  Patrik Torstensson  <p@rxc.se>
25997     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
25999 2003-12-08  Martin Baulig  <martin@ximian.com>
26001         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
26002         a MonoReflectionGenericParameter, also take the parameter index
26003         and name as arguments.
26004         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
26005         (ves_icall_MonoGenericParam_initialize): New interncall.
26006         (ves_icall_Type_make_byref_type): New interncall.
26008         * reflection.h (MonoReflectionGenericParam): Derive from
26009         MonoReflectionType, not just from MonoObject.  Added `refobj' and
26010         `index' fields.
26012         * reflection.c (mono_reflection_define_generic_parameter): Create
26013         and return a new MonoReflectionGenericParam; don't initialize the
26014         constraints here.
26015         (mono_reflection_initialize_generic_parameter): New public method;
26016         initializes the constraints and creates the `param->pklass'.
26018 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
26020         * reflection.h reflection.c: Use the new fields 'num_types', 
26021         'num_fields' and 'num_methods' to track the number of types etc.
26023         * verify.c (check_corlib): Check corlib version number.
26025 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
26027         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
26028         function works on all methods.
26030 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
26032         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
26033         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
26034         the custom_type_info flag of the transparent proxy.
26035         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
26036         objects that supports IRemotingTypeInfo.
26037         * object.h: Added custom_type_info field in transparent proxy.
26039 2003-12-06  Martin Baulig  <martin@ximian.com>
26041         * class.c (mono_class_create_from_generic): Removed.
26042         (mono_class_from_generic): Check `ginst->klass' before doing
26043         anything else.  This is important to fully support "recursive"
26044         generic types.
26046         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
26047         empty `generic_inst->klass' before doing anything else.
26049 2003-12-06  Dick Porter  <dick@ximian.com>
26051         * verify.c: 
26052         * object.h:
26053         * icall.c:
26054         * locales.c: Use C structs to access class fields.  Don't do a
26055         conversion between MonoString and UChar because both are
26056         platform-endian UTF-16.  Compare now takes startindex and count
26057         parameters.  Add a char overload for IndexOf.  Speed up the
26058         invariant string IndexOf.
26060 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
26062         * Makefile.am (monosn_LDADD): Fix parallel build.
26064 2003-12-04  Martin Baulig  <martin@ximian.com>
26066         * icall.c
26067         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
26068         (ves_icall_Type_make_array_type): New interncall.       
26070 2003-12-04  Martin Baulig  <martin@ximian.com>
26072         * locales.c: also change it in the !HAVE_ICU case.
26074 2003-12-04  Dick Porter  <dick@ximian.com>
26076         * icall.c:
26077         * locales.c: construct_compareinfo is now in CompareInfo, not
26078         CultureInfo.
26080 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
26082         * image.c (mono_image_load_file_for_image): Cache loaded images in the
26083         image->files array.
26085         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
26086         table as well.
26088         * assembly.c (mono_assembly_load_references): Only load references
26089         once.
26091         * class.c (mono_class_from_name): Avoid linear search of the 
26092         EXPORTEDTYPE table.
26094         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
26096 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
26098         * image.h (MonoImage): Add 'field_cache' field.
26100         * loader.c (mono_field_from_token): Cache field lookups.
26101         
26102         * reflection.c (mono_module_get_object): Fix name property.
26104         * icall.c (ves_icall_get_enum_info): Update after changes to 
26105         mono_metadata_get_constant_index ().
26107         * icall.c: Get rid of get_type_info icall, use a separate icall for
26108         each type property to avoid needless memory allocations. Fixes #51514.
26110         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
26111         to avoid needless binary searches.
26113         * class.c (class_compute_field_layout): Move the initialization of
26114         field->def_value to mono_class_vtable ().
26116         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
26117         non-corlib types.
26119         * object.c (mono_object_allocate): Make it inline.
26121         * object.c (mono_object_allocate_spec): Make it inline.
26122         
26123 2003-12-02  Dick Porter  <dick@ximian.com>
26125         * locales.c (create_NumberFormat): NumberFormatInfo construction.
26126         Patch by Mohammad DAMT (mdamt@cdl2000.com).
26128 2003-12-01  Dick Porter  <dick@ximian.com>
26130         * threads.c: Fix signature and call in CreateMutex and
26131         CreateEvent.
26133 2003-12-01  Dick Porter  <dick@ximian.com>
26135         * icall.c: 
26136         * locales.c: Implement string compares and searching
26138         * object.h: Add extra Thread field
26140 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
26142         * reflection.c (fixup_method): Add support for MonoCMethod.
26144 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
26146         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
26148         * reflection.c (assembly_name_to_aname): Allow extra characters in
26149         assembly names. Fixes #51468.
26151 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
26153         * exception.c (mono_exception_from_name_domain): New helper function.
26155         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
26156         exception object in the correct domain.
26158         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
26159         formatting + make a copy a the input data.
26161         * loader.c (mono_get_method_from_token): Methods which contain
26162         native code do not have entries in the ImplMap.
26164         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
26165         Thanks to Gonzalo for spotting this.
26166         
26167         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
26168         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
26170         * assembly.h (mono_assembly_load_from): Split the second part of 
26171         assembly loading into a new public function.
26173         * exception.h (mono_get_exception_bad_image_format): New function.
26175 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
26177         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
26178         Enumerate all modules inside a dynamic assembly. Fixes #51293.
26179         
26180         * icall.c: Add new icall for creating dynamic methods.
26182         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
26184         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
26186         * reflection.c (mono_reflection_create_dynamic_method): New icall to
26187         create a dynamic method.
26189         * reflection.c (resolve_object): New helper function.
26191         * reflection.c: Generalize ReflectionMethodBuilder and the functions
26192         which manipulate it so they can also work on dynamic methods.
26194         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
26195         creating the MonoReflectionMethodAux structure if it is not needed.
26196         
26197         * reflection.h verify.c: Update after changes to object layout.
26199         * reflection.c (method_builder_encode_signature): Fix compilation on
26200         gcc 2.95.x.
26202 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
26204         * appdomain.h: Added support for context static fields. Added static_data
26205           field to MonoAppContext and renamed thread_static_fields to a more
26206           generic special_static_fields in MonoAppDomain, since it can now contain
26207           context static fields.
26208         * domain.c: Updated hashtable name.
26209         * object.c: Replaced field_is_thread_static() for a more generic
26210           field_is_special_static() which also checks for context static attribute.
26211           In mono_class_vtable(), added support for static context fields.
26212         * threads.c: Changed methods that manage thread static fields to more
26213           generic methods so they can be reused both for thread and context static
26214           data.
26215         * threads.h: Declared some new methods.
26217 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
26219         * reflection.h: Update after changes to the managed types.
26221         * reflection.c (encode_custom_modifiers): New helper function.
26223         * reflection.c (method_encode_signature): Emit custom modifiers.
26225         * reflection.c (field_encode_signature): Emit custom modifiers.
26227 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
26229         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
26231         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
26232         implementation.
26234         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
26235         icall.
26237         * object.c (mono_field_get_value_object): New function.
26239         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
26240         specific.
26242 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
26244         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
26245         return a preallocated out-of-memory exception instance.
26247         * object.c (out_of_memory): Use the new function.
26249         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
26250         flag is before the custom modifiers. Fixes #49802.
26252 2003-11-16  Martin Baulig  <martin@ximian.com>
26254         * class.c (mono_class_is_open_constructed_type): Implemented the
26255         MONO_TYPE_GENERICINST case.
26257 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
26259         * assembly.c (mono_assembly_fill_assembly_name): New function to
26260         fill out the MonoAssemblyName structure.
26261         (mono_assembly_open): Use the new function.
26263         * icall.c (fill_reflection_assembly_name): New helper function.
26265         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
26266         new function.
26268         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
26270 2003-11-15  Martin Baulig  <martin@ximian.com>
26272         * class.c (mono_class_is_open_constructed_type): New public
26273         function; checks whether a type is an open constructed type,
26274         ie. whether it still contains type parameters.
26275         (mono_class_inflate_generic_type): If we're a type parameter and
26276         the inflated type is also a MONO_TYPE_(M)VAR, return the original
26277         type.
26279         * class.h (MonoGenericInst): Added `guint32 is_open'.
26281         * loader.c (method_from_methodspec): Check whether we're an open
26282         or closed constructed type and set `ginst->is_open'.
26284         * reflection.c (mono_reflection_bind_generic_parameters): Check
26285         whether we're an open or closed constructed type and set
26286         `ginst->is_open'.
26287         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
26288         from open constructed types.
26290 2003-11-15  Martin Baulig  <martin@ximian.com>
26292         * reflection.c (mono_reflection_bind_generic_parameters): If we're
26293         a generic instance (instead of a generic type declaration) with
26294         unbound generic parameters, bind them to our actual types.
26296 2003-11-14  Martin Baulig  <martin@ximian.com>
26298         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
26300         * reflection.c (mono_reflection_bind_generic_parameters): If we're
26301         an interface type, populate `res->interfaces' with instantiated
26302         versions of all the interfaces we inherit.
26304 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
26306         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
26307         when MONO_PATH is set but doesn't contain the install dir.
26309 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26311         * icall.c:
26312         (ves_icall_Type_GetInterfaces): don't return an interface twice when
26313         it's also implemented in base classes. Fixes bug #50927.
26315 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
26317         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
26318         if this method is called from a finalizer. Fixes #50913.
26320 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
26322         * threads.c: Implement VolatileRead/VolatileWrite
26324         * icall.c: Add new icalls for VolatileRead/VolatileWrite
26326 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
26328         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
26329         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
26330         2.95.3.
26332         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
26333         from Peter Ross (pro@missioncriticalit.com).
26334         
26335 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
26337         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
26339 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
26341         * assembly.c (mono_assembly_load_references): Disable check because it
26342         triggers on older corlibs which lots of people have.
26344 2003-11-12  Jackson Harper  <jackson@ximian.com>
26346         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
26347         load corlib.dll if mscorlib.dll is not found.
26348         * assembly.h: Remove corlib name define.
26349         * class.c:
26350         * domain.c:
26351         * image.c: Change corlib name to mscorlib.
26352         
26353 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
26355         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
26357 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
26359         * appdomain.h: Added loader_optimization here to sync with the C#
26360         code, and add disallow_binding_redirects field.
26362 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
26364         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
26366         * reflection.c (mono_image_build_metadata): Fix crash on modules
26367         with no types.
26369         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
26371         * icall.c (ves_icall_get_method_info): Return callingConvention as
26372         well.
26374         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
26375         namespaces from the EXPORTEDTYPE table as well.
26377         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
26378         from all modules inside the assembly.
26379         
26380 2003-11-11  Martin Baulig  <martin@ximian.com>
26382         * reflection.c (mono_reflection_bind_generic_parameters): Make
26383         this work for interfaces.
26385 2003-11-11  Martin Baulig  <martin@ximian.com>
26387         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
26389 2003-11-11  Martin Baulig  <martin@ximian.com>
26391         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
26392         "MonoInflatedMethod" and "MonoInflatedCtor".
26394 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
26396         * reflection.c (resolution_scope_from_image): Use the assembly table
26397         from the manifest module, since other modules don't have it.
26399         * debug-helpers.c (mono_type_full_name): New helper function.
26401         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
26403         * image.c (mono_image_load_file_for_image): New public function which
26404         is a replacement for the load_file_for_image in class.c.
26406         * assembly.c (mono_assembly_load_module): A wrapper for the function
26407         above which does assembly association and reference loading too.
26409         * class.c (mono_class_from_name): Call mono_assembly_load_module.
26411 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26413         * appdomain.c: not all of the attributes for the full assembly name
26414         are required and the order doesn't matter. Fixes bug #50787.
26416 2003-11-10  Dick Porter  <dick@ximian.com>
26418         * locales.c: Use platform-endian UTF16
26420 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
26422         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26423         
26424 2003-11-10  Martin Baulig  <martin@ximian.com>
26426         * metadata.c
26427         (mono_metadata_load_generic_params): Make this actually work.
26429         * reflection.c (mono_reflection_bind_generic_parameters): If our
26430         parent is a generic instance, pass all the `types' to it, no
26431         matter whether it has the same number of type parameters or not.
26433 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
26435         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26437         * assembly.c (mono_assembly_load_references): Move the image<->assembly
26438         assignment code to this function so it gets called recursively for all
26439         modules.
26441         * image.c (load_modules): Remove the assembly assignment since it is
26442         now done by mono_assembly_load_references.
26443         
26444         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
26445         Add 'module' argument.
26446         (mono_module_get_types): New helper function.
26447         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
26449 2003-11-08  Martin Baulig  <martin@ximian.com>
26451         * class.c (mono_class_inflate_generic_method): Interface method
26452         don't have a header.
26454         * reflection.c (mono_image_get_methodspec_token): Take an
26455         additional `MonoGenericInst *' argument instead of reading it from
26456         the header; this is necessary to support interfaces.
26457         (mono_image_create_token): Pass the `MonoGenericInst *' from the
26458         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
26459         (inflated_method_get_object): Take an additional `MonoGenericInst *'
26460         argument.
26462         * reflection.h (MonoReflectionInflatedMethod): Added
26463         `MonoGenericInst *ginst'.
26465 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
26467         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
26469 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
26471         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
26473 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
26475         * reflection.c 
26476         (reflection_methodbuilder_from_method_builder):
26477         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
26478         initialize a ReflectionMethodBuilder structure.
26479         (mono_image_get_methodbuilder_token):
26480         (mono_image_get_ctorbuilder_token): New functions to emit memberref
26481         tokens which point to types in another module inside the same assembly.
26483         * reflection.c: Use the new helper functions.
26484         
26485         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
26487         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
26488         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
26490         * reflection.c (resolution_scope_from_image): Emit a moduleref if
26491         neccesary.
26493         * reflection.c (mono_image_build_metadata): Emit metadata only for the
26494         current module. Emit the manifest only for the main module.
26496         * reflection.c (mono_image_create_token): Add assertion when a 
26497         memberref needs to be created.
26499         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
26501         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
26502         larger buffer for the custom attribute blob. Fixes #50637.
26503         
26504 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26506         * threadpool.c: notify listener on async processing handles after
26507         invoking the async callback. Thanks to Zoltan.
26509 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
26511         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
26512         avoid code duplication.
26514         * reflection.h (MonoDynamicImage): New type which is currently unused,
26515         but will be used through the ref.emit code in place of 
26516         MonoDynamicAssembly.
26518         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26519         object layout.
26521         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
26522         a MonoDynamicImage instead of just a MonoImage.
26523         
26524         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
26525         icalls to ModuleBuilder but keep their semantics, so they will work
26526         with moduleb->assemblyb. This will change later.
26527         
26528 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
26530         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26531         object layout.
26533         * reflection.c (mono_image_build_metadata): Avoid creation of a default
26534         main module, since it is now done by the managed code.
26536 2003-11-03  Martin Baulig  <martin@ximian.com>
26538         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
26539         `ginst->klass' here.
26540         (method_encode_methodspec): Don't use the `ginst->generic_method's
26541         klass if it's a generic instance, use `ginst->klass' in this case.
26543 2003-11-03  Martin Baulig  <martin@ximian.com>
26545         * reflection.c (mono_image_get_generic_method_param_info):
26546         Removed, use mono_image_get_generic_param_info() instead.
26547         (mono_image_get_type_info): Write the GenericParam table before
26548         the Method table.  This is neccessary because in the GenericParam
26549         table, type parameters of the class (ie. '!0' etc.) must come
26550         before the ones from its generic methods (ie. '!!0' etc).
26552 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
26554         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
26556 2003-11-02  Martin Baulig  <martin@ximian.com>
26558         * reflection.c (create_generic_typespec): Take a
26559         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
26560         the generic parameters from it.
26562 2003-11-02  Martin Baulig  <martin@ximian.com>
26564         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
26565         instead of a `MonoClassField *' since we just need the type.
26566         (create_generic_typespec): New static function.  Creates a
26567         TypeSpec token for a generic type declaration.
26568         (mono_image_get_generic_field_token): New static function.
26569         (mono_image_create_token): If we're a FieldBuilder in a generic
26570         type declaration, call mono_image_get_generic_field_token() to get
26571         the token.
26573 2003-11-02  Martin Baulig  <martin@ximian.com>
26575         * reflection.h
26576         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
26577         `MonoReflectionGenericInst *declaring_type' and
26578         `MonoReflectionGenericInst *reflected_type' fields.
26580         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
26581         `MonoReflectionGenericInst *declaring_type' and a
26582         `MonoReflectionGenericInst *reflected_type' argument instead of a
26583         single `MonoReflectionGenericInst *type' one.  Set
26584         `res->declaring_type' and `res->reflected_type' from them.
26585         (mono_reflection_inflate_field): Likewise.      
26587 2003-11-02  Martin Baulig  <martin@ximian.com>
26589         * class.c (mono_class_setup_vtable): Don't store generic methods
26590         in the vtable.  
26592 2003-11-02  Martin Baulig  <martin@ximian.com>
26594         * reflection.h (MonoReflectionGenericInst): Added
26595         `MonoReflectionType *declaring_type'.
26597         * reflection.c (mono_reflection_bind_generic_parameters): Use
26598         `if (tb->parent)' instead of `klass->parent'.
26600 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
26602         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
26603         with an empty ASSEMBLY table.
26605         * reflection.c (mono_image_build_metadata): Avoid using the same loop
26606         variable in the inner and outer loops.
26608 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
26610         * metadata.h (mono_metadata_make_token): Put parentheses around macro
26611         argument.
26613         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
26614         
26615         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
26616         icalls. Instead, do everything in managed code. This is needed since
26617         it is hard to restore the original domain etc. in unmanaged code in the
26618         presence of undeniable exceptions.
26620         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
26621         New icalls to push and pop appdomain refs.
26623 2003-10-31  Martin Baulig  <martin@ximian.com>
26625         * class.c (inflate_generic_type): Renamed to
26626         mono_class_inflate_generic_type() and made it public.
26628         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
26629         New interncall.
26631         * loader.c (mono_field_from_memberref): Also set the retklass for
26632         typespecs.
26634         * fielder.c (mono_image_get_inflated_field_token): New static
26635         method; creates a metadata token for an inflated field.
26636         (mono_image_create_token, fixup_method): Added support for
26637         "MonoInflatedField".
26638         (fieldbuilder_to_mono_class_field): New static function.
26639         (mono_reflection_inflate_field): New public function.
26641         * reflection.h
26642         (MonoReflectionGenericInst): Added `MonoArray *fields'.
26643         (MonoReflectionInflatedField): New typedef.     
26645 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
26647         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
26648         for Solaris and other platforms without s6_addr16
26650 2003-10-30  Martin Baulig  <martin@ximian.com>
26652         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
26653         argument instead of two.
26654         (mono_class_inflate_generic_signature): Likewise.
26655         (inflate_generic_header): Likewise.
26656         (mono_class_inflate_generic_method): Likewise.  In addition, if
26657         `ginst->klass' is set, it becomes the new `method->klass'.
26659         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
26660         field.
26662         * reflection.c (encode_generic_method_sig): Write a 0xa as the
26663         first byte. [FIXME]
26664         (method_encode_methodspec): If we have generic parameters, create
26665         a MethodSpec instead of a MethodRef.
26666         (fixup_method): Added support for "MonoInflatedMethod" and
26667         "MonoInflatedCtor".
26668         (mono_image_create_token): Added support for "MonoInflatedMethod"
26669         and "MonoInflatedCtor".
26670         (inflated_method_get_object): New static function; returns a
26671         managed "System.Reflection.MonoInflatedMethod" object.
26672         (mono_reflection_bind_generic_method_parameters): Return a
26673         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
26674         (mono_reflection_inflate_method_or_ctor): Likewise.
26675         (mono_image_get_generic_method_param_info): Initialize unused
26676         fields to zero.
26677         (mono_image_get_generic_param_info): Likewise.
26679         * reflection.h (MonoReflectionInflatedMethod): New public
26680         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
26681         "S.R.MonoInflatedCtor" classes.
26683         * loader.c (method_from_memberref): If we're a TypeSpec and it
26684         resolves to a generic instance, inflate the method.
26686 2003-10-28  Dick Porter  <dick@ximian.com>
26688         * object.c (mono_runtime_run_main): Convert command-line arguments
26689         into utf8, falling back to the user's locale encoding to do so.
26691 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
26693         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
26694         at this time.
26696         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
26698         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
26699         up icalls at method definition time. Partially fixes #33569.
26701 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
26703         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
26704         marshalling of arrays. Fixes #50116.
26706         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
26708         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
26709         points to a vtable in the dying appdomain.
26711         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
26712         listeners into unmanaged code inside the lock.
26714         * object.c (mono_class_vtable): Turn off typed allocation in non-root
26715         domains and add some comments.
26717 2003-10-25  Martin Baulig  <martin@ximian.com>
26719         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
26721         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
26723         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
26724         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
26725         currently parsing.  Create the generic class and store it in
26726         `generic_inst->klass' before parsing the type arguments.  This is
26727         required to support "recursive" definitions; see mcs/tests/gen-23.cs
26728         for an example.
26729         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
26730         to support recursive typespec entries.
26732         * class.c (mono_class_setup_parent): If our parent is a generic
26733         instance, we may get called before it has its name set.
26734         (mono_class_from_generic): Splitted into
26735         mono_class_create_from_generic() and mono_class_initialize_generic().
26737 2003-10-25  Martin Baulig  <martin@ximian.com>
26739         * icall.c (ves_icall_Type_BindGenericParameters): Return a
26740         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
26741         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
26742         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
26744         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
26745         (create_typespec): Likewise.
26746         (mono_reflection_bind_generic_parameters): Return a
26747         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
26748         (mono_reflection_inflate_method_or_ctor): New public function.
26750         * reflection.h (MonoReflectionGenericInst): New typedef.        
26752 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
26754         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
26755         inside the domain lock. Fixes #49993.
26756         
26757         * object.c (mono_class_vtable): When typed allocation is used, 
26758         allocate vtables in the GC heap instead of in the mempool, since the
26759         vtables contain GC descriptors which are used by the collector even
26760         after the domain owning the mempool is unloaded.
26762         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
26764         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
26765         reflect what it does. Also invalidate mempools instead of freeing
26766         them if a define is set.
26768         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
26769         of the appdomain.
26770         
26771         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
26772         hold the finalizable objects in this domain.
26774         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
26775         appdomain.
26777         * appdomain.c (mono_domain_set): New function to set the current
26778         appdomain, but only if it is not being unloaded.
26780         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
26781         appdomain which is being unloaded.
26782         
26783         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
26784         unloading of the root appdomain.
26786         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
26787         icall to execute a method in another appdomain. Intended as a 
26788         replacement for InternalSetDomain, which can confuse the code 
26789         generation in the JIT.
26791         * appdomain.c (mono_domain_is_unloading): New function to determine
26792         whenever an appdomain is unloading.
26794         * appdomain.c (mono_domain_unload): New function to correctly unload
26795         an appdomain.
26797         * assembly.c (mono_assembly_load_references): Check that an assembly
26798         does not references itself.
26800         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
26801         domain manually, it asks the finalizer thread to do it, then waits for
26802         the result. Also added a timeout.
26804         * icall.c: Register the new icalls.
26806         * threads.h threads.c: Export the mono_gc_stop_world and 
26807         mono_gc_start_world functions.
26808         
26809         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
26810         function to fill out the mempool with 0x2a.
26812 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
26814         * reflection.h (MonoReflectionMethodAux): New structure to store
26815         information which is rarely used, thus is not in the MonoMethod
26816         structure.
26818         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
26819         store the aux info.
26821         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
26822         and marshalling info into the aux structure.
26824         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
26825         from the aux structure.
26827         * loader.c (mono_method_get_param_names): Retrieve the param names from
26828         the aux structure.
26829         
26830 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
26832         * exception.h exception.c: Add AppDomainUnloadedException && fix 
26833         warning.
26835 2003-10-21  Dick Porter  <dick@ximian.com>
26837         * socket-io.c
26838         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
26839         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
26841 2003-10-21  Martin Baulig  <martin@ximian.com>
26843         * reflection.c (mono_reflection_bind_generic_parameters):
26844         `klass->parent' is NULL for interfaces.
26846 2003-10-21  Martin Baulig  <martin@ximian.com>
26848         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
26850 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
26852         * exception.c (mono_exception_from_name_msg): New helper function for
26853         creating exceptions and initializing their message field.
26855         * exception.c: Simplify functions using the new helper.
26857         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
26858         New function.
26860         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
26861         mono_raise_exception, since otherwise gcc doesn't generate the function
26862         epilog for raise_exception, confusing the stack unwinding in the JIT.
26863         Fixes #45043.
26865         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
26866         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
26867         Fixes #49499.
26869 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26871         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
26872         utf8.
26874 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
26876         * icall.c: Removed GetUninitializedObject method because
26877           AllocateUninitializedClassInstance does the same.
26879 2003-10-18  Martin Baulig  <martin@ximian.com>
26881         * class.c (inflate_generic_signature): Renamed to
26882         mono_class_inflate_generic_signature() and made it public.
26883         (my_mono_class_from_generic_parameter): New static function; if we
26884         don't already have the generic parameter's MonoClass, create a
26885         very simple one which is just used internally in the runtime and
26886         not passed back to managed code.
26888         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
26890         * metadata.h (MonoMethodSignature): Moved the
26891         `MonoGenericParam *gen_params' to the MonoMethodHeader.
26892         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
26894         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
26895         ves_icall_MonoMethod_GetGenericArguments(); this is now an
26896         interncall on the MonoMethod class, not on MethodInfo.
26897         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
26898         calling mono_reflection_bind_generic_method_parameters() directly.
26900         * loader.c (mono_method_get_signature): If this is a MethodSpec;
26901         return the already computed `method->signature'.
26902         (method_from_methodspec): New static function to load a method
26903         from a MethodSpec entry.
26904         (mono_get_method_from_token): Call the new method_from_methodspec()
26905         for MethodSpec tokens.  
26906         (mono_get_method_from_token): If we're a generic method, load the
26907         type parameters.
26909         * reflection.c (mono_image_get_memberref_token): Allow
26910         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
26911         table.
26912         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
26913         (mono_image_create_token): First check whether it's a generic
26914         method (so we'd need to create a MethodSpec), then do the other
26915         two alternatives.
26916         (mono_reflection_bind_generic_method_parameters): Return a
26917         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
26918         called directly from the interncall.
26920 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
26922         * reflection.c (load_public_key): Move loading of the public key
26923         into managed code.
26925         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
26927         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
26928         fields.
26930         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
26931         culture, hash_alg and public_key. Fixes #49555.
26933 2003-10-17  Martin Baulig  <martin@ximian.com>
26935         * class.h (MonoGenericInst): Moved this declaration here and added
26936         `MonoMethod *generic_method'.
26938         * icall.c
26939         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
26940         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
26942         * metadata.c (mono_metadata_type_equal): Two types of
26943         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
26944         index; ie. don't compare the address of the `MonoGenericParam'
26945         structure.
26946         (mono_metadata_load_generic_params): Removed the `MonoMethod
26947         *method' argument.
26949         * metadata.h (MonoGenericInst): Moved declaration to class.h.
26950         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
26952         * reflection.c (method_encode_signature): Encode the number of
26953         generic parameters.
26954         (encode_generic_method_sig): New static function.
26955         (method_encode_methodspec): New static function; creates an entry
26956         in the MethodSpec table for a generic method.
26957         (mono_image_get_methodspec_token): New static function.
26958         (mono_image_create_token): Call mono_image_get_methodspec_token()
26959         for generic methods.
26960         (mono_reflection_bind_generic_method_parameters): New public
26961         function.  Instantiates a generic method.
26963 2003-10-16  Martin Baulig  <martin@ximian.com>
26965         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
26966         *gen_params' here from MonoMethodHeader.
26968         * metadata.c (mono_metadata_parse_method_signature): If we have
26969         generic parameters, initialize `method->gen_params' and then set
26970         the correct `type->data.generic_param' in all the parameters.
26972 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
26974         * threads.c (mono_threads_get_default_stacksize): New function to 
26975         return the default stacksize.
26977         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
26978         termination of the finalizer thread, since the previous method had
26979         race conditions. Fixes #49628.
26981         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
26982         as for the other managed threads.
26984 2003-10-16  Martin Baulig  <martin@ximian.com>
26986         * class.c (inflate_generic_signature): Copy `generic_param_count'
26987         and `gen_params'.
26989         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
26990         New interncall.
26992         * metadata.c (mono_metadata_parse_method_signature): Actually set
26993         the `method->generic_param_count' here.
26994         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
26996 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
26998         * object.h: Add a new field to TypedRef to simplify the implementation
26999         of the REFANY opcodes in the JIT.
27001         * icall.c: Make use of the new field.
27003         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
27004         dynamically.
27006 2003-10-15  Martin Baulig  <martin@ximian.com>
27008         * class.c (mono_class_from_gen_param): Renamed to
27009         mono_class_from_generic_parameter() and moved most of the
27010         functionality from mono_reflection_define_generic_parameter()
27011         here; ie. we create a "real" class here.
27012         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
27013         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
27014         previously been called.
27016         * class.h (MonoGenericParam): Moved the declaration of this struct
27017         here from metadata.h and added `MonoMethod *method'.
27019         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
27020         interncall.
27022         * loader.c (mono_get_method_from_token): If we have any generic
27023         parameters, call mono_metadata_load_generic_params() to read them
27024         from the MONO_TABLE_GENERICPAR.
27026         * metadata.c (mono_metadata_load_generic_params): Added
27027         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
27029         * metadata.h (MonoMethodSignature): Replaced
27030         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
27031         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
27033         * reflection.c (mono_reflection_define_generic_parameter): Moved
27034         most of the functionality into the new
27035         mono_class_from_generic_parameter(); set the `method' field if
27036         we're a method parameter.       
27038 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
27040         * marshal.c (emit_struct_conv): if native size is 0
27041         emit no code.
27043 2003-10-14  Martin Baulig  <martin@ximian.com>
27045         * icall.c: The generics API has changed in the spec since it was
27046         added to System.Type; these modifications make it match the spec
27047         again.
27048         (ves_icall_Type_GetGenericParameters): Renamed to
27049         `ves_icall_Type_GetGenericArguments'.
27050         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
27051         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
27052         `ves_icall_MonoType_get_HasGenericArguments'.
27053         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
27054         `ves_icall_MonoType_get_IsGenericParameter'.
27055         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
27056         this is no interncall anymore.
27057         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
27058         `ves_icall_TypeBuilder_get_IsGenericParameter'.
27060 2003-10-14  Martin Baulig  <martin@ximian.com>
27062         * reflection.c (mono_reflection_bind_generic_parameters): Also
27063         inflate generic methods if we're reading the class from IL.
27065 2003-10-13  Martin Baulig  <martin@ximian.com>
27067         * reflection.c (mono_reflection_define_generic_parameter): This
27068         method isn't called directly from the icall anymore; take a
27069         `MonoReflectionAssemblyBuilder *' so we can use this for type and
27070         method generic parameters.
27071         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
27072         (method_builder_encode_signature): Encode generic parameters.
27073         (mono_image_get_method_info): Write generic params to the
27074         MONO_TABLE_GENERICPARAM table.
27076         * reflection.h (MonoReflectionMethodBuilder): Added
27077         `MonoArray *generic_params'.
27079         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
27081         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
27082         wrapper for mono_reflection_define_generic_parameter().
27083         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
27085 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
27087         * marshal.h: Add missing function to fix build.
27089         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
27090         the SetLastError pinvoke attribute.
27092         * marshal.c (mono_marshal_set_last_error): New helper function called
27093         by the generated code.
27094         
27095         * marshal.c (mono_mb_emit_branch): New helper function.
27097         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
27099         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
27100         classes as parameters and return values of delegates. Fixes #29256. 
27102 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
27104         * locales.c: use gint32 in non HAVE_ICU case
27106 2003-10-11  Martin Baulig  <martin@ximian.com>
27108         * mono-debug.c (mono_debug_add_method): Added a workaround for
27109         bug #48591.
27111 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
27113         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
27114         delegates passed to native code must use the STDCALL calling 
27115         convention. Fixes #35987.
27117 2003-10-10  Martin Baulig  <martin@ximian.com>
27119         * class.c (inflate_generic_type): If we're inflating for a generic
27120         type instance (and not for a generic method), return
27121         MONO_TYPE_MVAR unchanged.
27123 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27125         * string-icalls.c: Join ignores null strings in the source array.
27126         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
27127         * threads.c: GetAvailableTheads is slightly more accurate.
27129 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
27131         * threads.h threads.c : add mono_threads_set_default_stacksize
27132         and pass default to CreateThread calls.
27134 2003-10-09  Dick Porter  <dick@ximian.com>
27136         * icall.c:
27137         * locales.h:
27138         * locales.c: Internal calls for constructing CultureInfo and
27139         related objects from libicu (if its available.)
27141 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
27143         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
27145 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27147         * threadpool.c: added an argument to async_invoke_thread that is the
27148         item to process, pass the MonoAsyncResult to the thread start function
27149         when creating a new thread. This way we don't need to acquire any lock
27150         when we're creating a new thread. Readded a semaphore for faster
27151         response times (instead of that Sleep i added).
27153 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
27155         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
27156         get daylight change dates better on Windows, fix handling
27157         of platforms without tm_gmtoff.
27159 2003-10-06  Martin Baulig  <martin@ximian.com>
27161         * class.c (inflate_generic_method): Renamed to
27162         mono_class_inflate_generic_method() and made public.
27163         (mono_class_init): Don't inflate the generic methods here.
27164         (mono_class_from_generic): Added `gboolean inflate_methods'
27165         argument.  Inflate the methods here.
27167         * loader.c (mono_method_get_param_names): Ignore instances of
27168         generic types for the moment.
27170         * reflection.c (fixup_method): Added support for inflated methods.
27171         (mono_image_create_token): Use mono_image_get_methodref_token()
27172         for inflated methods.
27173         (mono_custom_attrs_from_param): Ignore instances of generic types
27174         for the moment.
27175         (mono_reflection_bind_generic_parameters): New public function.
27176         Moved all the functionality from
27177         ves_icall_Type_BindGenericParameters() here and added support for
27178         dynamic types.
27179         (mono_reflection_define_generic_parameter): Initialize
27180         `klass->methods' here.
27182         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
27183         functionality into mono_reflection_define_generic_parameter().
27184         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
27185         TypeBuilder, return that TypeBuilder.
27187 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27189         * appdomain.c: removed mono_delegate_semaphore.
27191         * threadpool.c:
27192         (mono_thread_pool_add): moved hash table creation inside and the thread 
27193         creation outside of the critical region.
27194         (mono_thread_pool_finish): removed obsolete code.
27195         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
27196         continue or exit the thread depending on the queue.
27198 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
27200         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
27201         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
27202         handle more bool marshalling options
27204 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
27206         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
27207         arrays of structs. Also add a more descriptive error message when
27208         a structure member is marshalled as LPArray.
27210 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
27212         * marshal.c (mono_marshal_get_native_wrapper): Add support for
27213         marshalling arrays of complex types. Fixes #29098. Also remove an
27214         usused and incomplete function.
27216 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27218         * gc.c: report heap_size - free_bytes as total memory allocated
27219         (bug#49362).
27221 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
27223         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
27224         fix timezone handling problems on Windows.
27225         
27226         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
27227         asserts when the year is outside the range handled by ms the functions.
27229         * class.c (setup_interface_offsets): If the class is an interface,
27230         fill out its interface_offsets slot.
27232 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27234         * threadpool.c: mark threadpool threads as background.
27236 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
27238         * decimal.c - define DECINLINE to nothing if not using GCC
27240 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
27242         * assembly.c: More refcount fixes.
27244 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27246         * string-icalls.c: if we're not trimming, return the same string.
27247         When not splitting, don't create a new string.
27249 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27251         * image.c:
27252         (mono_image_open): increment the ref_count inside the critical section.
27254 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
27256         * image.c (mono_image_open): Fix reference counting bug.
27258 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
27260         * marshal.c (mono_marshal_type_size) struct alignment changed for 
27261         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
27262         64bits. Avoid leak in mono_marshal_get_native_wrapper when
27263         mono_lookup_pinvoke_call throws.        
27265 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
27267         * reflection.c (mono_reflection_parse_type): Fix #49114.
27269         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
27270         temporary workaround for cygwin header problem.
27272         * object.c (mono_object_isinst): Synchronize this with the code
27273         generated by the JIT for casts.
27275 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
27277         * reflection.c (encode_type): Fix #38332.
27279 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
27281         * marshal.c (mono_marshal_method_from_wrapper): New function to return
27282         the original method from the wrapper method.
27284 2003-09-25  Martin Baulig  <martin@ximian.com>
27286         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
27287         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
27288         (ves_icall_Type_get_IsGenericInstance): New interncall.
27290 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
27292         * object.c: fix cast warning in big endian code.
27294 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
27296         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
27297         
27298 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27300         * assembly.c: don't call check_env from mono_assembly_load. It's
27301         already done once in mono_assemblies_init and may cause headaches when
27302         multiple threads are loading assemblies.
27304 2003-09-19  Martin Baulig  <martin@ximian.com>
27306         * reflection.c (mono_reflection_define_generic_parameter): Don't
27307         allocate `klass->methods', set `klass->flags' to
27308         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
27310 2003-09-18  Martin Baulig  <martin@ximian.com>
27312         * class.c (mono_class_init): Don't create `class->methods' if it's
27313         already initialized.
27315         * metadata.c (mono_metadata_load_generic_params): Make this
27316         actually work.
27318         * reflection.c (mono_reflection_define_generic_parameter): Set
27319         parent class and interfaces from the constraints.
27321         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
27322         to keep this struct in sync with the declaration in TypeBuilder.cs.
27324 2003-09-17  Martin Baulig  <martin@ximian.com>
27326         * metadata.h (MonoType): Replaced the data's `int type_param'
27327         field with `MonoGenericParam *generic_param'.
27328         (MonoGenericParam): Added `MonoClass *klass'.
27330         * class.c (mono_class_from_gen_param): Removed the
27331         `MonoImage *image' and `int type_num' arguments.
27333         * metadata.c (mono_metadata_parse_generic_param): New static
27334         method; creates a MonoGenericParam which just contains the index.
27335         (do_mono_metadata_parse_type): Call
27336         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
27337         MONO_TYPE_MVAR.
27339         * reflection.c (mono_image_typedef_or_ref): Generic type
27340         parameters may be in the same assembly, but never use a typedef
27341         for them.
27342         (mono_reflection_define_generic_parameter): We're now creating a
27343         "real" class for the type parameter; it's now safe to call
27344         mono_class_from_mono_type() on the class'es type, it'll do the
27345         right thing.
27347 2003-09-16  Martin Baulig  <martin@ximian.com>
27349         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
27350         `symfile->range_entry_size' and `symfile->class_entry_size' here;
27351         the `symfile' data structure must be fully initialized before it
27352         gets added to the table.
27354 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
27356         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
27358         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
27359         class init trampolines.
27361 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
27363         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
27364         to the built-in profiler to turn off time and allocation profiling
27365         respectively.
27367 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
27369         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
27370         g_direct_equal.
27372         * debug-helpers.c (mono_method_full_name): Print the wrapper type
27373         in human readable form.
27375 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
27377         * reflection.c icall.c: Fixed warnings.
27379         * image.c (load_class_names): Use a temporary hash table to hold the
27380         namespaces in order to avoid doing many string comparisons.
27382         * image.h: Fix typo.
27384         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
27385         Pass NULL instead of g_direct_equal to the GHashTable constructor 
27386         since the NULL case is short-circuited inside g_hash_table_lookup, 
27387         leading to better performance.  
27389         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
27390         obtain the first custom attribute for a given index. Depends on the
27391         CustomAttribute table being sorted by the parent field.
27393         * reflection.c (mono_custom_attrs_from_index): Use the new function 
27394         for better performance.
27396 2003-09-07  Martin Baulig  <martin@ximian.com>
27398         * class.c (mono_class_init): If we're a generic instance, inflate
27399         all our methods instead of loading them from the image.
27400         (mono_class_from_generic): Set `class->methods = gklass->methods'.
27402 2003-09-07  Martin Baulig  <martin@ximian.com>
27404         * mono-debug-debugger.c: Added support for constructors.
27406 2003-09-06  Martin Baulig  <martin@ximian.com>
27408         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
27409         New interncall.
27411         * reflection.c (mono_reflection_setup_generic_class): Call
27412         ensure_runtime_vtable() to create the vtable.
27414 2003-09-05  Martin Baulig  <martin@ximian.com>
27416         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
27417         MONO_TYPE_MVAR.
27419 2003-09-04  Martin Baulig  <martin@ximian.com>
27421         * reflection.c (mono_reflection_define_generic_parameter): Generic
27422         parameters start with zero.
27424 2003-09-04  Martin Baulig  <martin@ximian.com>
27426         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27428         * reflection.h (MonoReflectionGenericParam): New typedef.
27429         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
27430         the generic parameters from the managed TypeBuilder.
27432         * reflection.c (mono_reflection_define_generic_parameter): New function.
27433         (mono_reflection_create_runtime_class): Encode generic parameters.
27434         (mono_reflection_setup_generic_class): New function; this is
27435         called after adding adding all generic params to the TypeBuilder.
27436         (encode_type): Added MONO_TYPE_VAR.
27438 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
27440         * class.h class.c (mono_class_needs_cctor_run): Moved this method
27441         here from the JIT.
27443         * assembly.h assembly.c: Moved the AOT loading code into an assembly
27444         load hook.
27446 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
27448         * reflection.h reflection.c class.h class.c: Delete duplicate 
27449         definition of mono_type_get_name () from reflection.c and export the
27450         one in class.c.
27452         * class.c: Class loading fixes from Bernie Solomon 
27453         (bernard@ugsolutions.com).
27455         * reflection.c: Endianness fixes from Bernie Solomon 
27456         (bernard@ugsolutions.com).
27457         
27458 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
27460         * assembly.h assembly.c: Define a file format version for AOT
27461         libraries.
27462         
27463         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
27465         * appdomain.h (MonoJitInfo): New field to determine whenever the
27466         code is domain neutral.
27467         
27468 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
27470         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
27472 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
27474         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
27475         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
27476         Avoid caching the result since strings must be domain specific. Fixes
27477         #48050.
27479 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
27481         * marshal.c (mono_marshal_init): Make this callable multiple times
27482         since it is hard to find a correct place to call it.
27484         * object.c (mono_runtime_class_init): Execute static constructors in
27485         the correct appdomain.
27487         * image.c (build_guid_table): Handle the case when multiple images have
27488         the same GUID.
27490 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27492         * icall.c: added a couple of icalls for System.Web.
27494 2003-08-28  Martin Baulig  <martin@ximian.com>
27496         * icall.c (ves_icall_Type_BindGenericParameters): Use
27497         `klass->generic_inst' instead of `&klass->byval_arg' in the
27498         mono_type_get_object() call.  The returned type must be
27499         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
27501 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
27503         * NOTES: New file.
27505         * object.c (mono_class_proxy_vtable): Make it thread safe.
27507         * pedump.c: Fix warning.
27509         * object.c appdomain.h: Get rid of metadata_section. 
27510         It is no longer needed and it was causing deadlocks with domain->lock.
27512         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
27514 2003-08-26  Martin Baulig  <martin@ximian.com>
27516         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
27518 2003-08-26  Martin Baulig  <martin@ximian.com>
27520         * pedump.c (main): Call mono_metadata_init(),
27521         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
27522         and mono_loader_init().
27524 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
27526         * loader.h: Add missing include to fix build.
27528         * image.h: mono_image_load_references is no more.
27530         * assembly.c: Reworked assembly loading to make it really thread safe.
27531         After these changes, the assembly returned by mono_assembly_open is
27532         fully initialized, i.e. all its references assemblies are loaded.
27534         * assembly.c (mono_image_load_references): Renamed to 
27535         mono_assembly_load_references, and made private, since clients no
27536         longer need to call it.
27538         * class.c: Removed calls to mono_assembly_load_references, since it was
27539         a source of deadlocks.
27541         * loader.h loader.c class.h class.c: Protect data structures using a 
27542         new lock, the loader lock.
27544         * class.c (mono_class_setup_vtable): Create temporary hash tables and
27545         GPtrArrays only when needed.
27547         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
27548         into empty structures by mcs. Fixes pinvoke7.cs.
27549         
27550         * domain.c (mono_init): Call a new initialization function.
27552         * appdomain.c (mono_runtime_init): Call the new initializer function
27553         of the marshal module.
27555         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
27556         inserted into empty structures by mcs. Fixes pinvoke7.cs.
27558         * marshal.h marshal.c: Added locks around the wrapper caches to make
27559         this module thread safe.
27561         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
27562         this argument. Fixes pinvoke1.exe.
27564 2003-08-25  Lluis Sanchez <lluis@ximian.com>
27566         * object.h: Added call_type field to MonoMethodMessage and the corresponding
27567         enumeration of values. Removed fields to store remote call output values in
27568         MonoAsyncResult. Not needed any more.
27569         * object.c: Initialize call_type and async_result fields in mono_message_init.
27570         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
27571         dispatching the message.
27572         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
27573         async call to finish. To do it use a message with EndInvoke call type.
27575 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
27577         * loader.h loader.c (mono_method_hash_marhal_info): New function which
27578         determines whenever a method has marshalling info.
27580 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27582         * assembly.c: fix the build on windows.
27584 2003-08-22 Lluis Sanchez <lluis@ximian.com>
27586         * object.cs: Fixed bug #47785.
27588 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
27590         * string-icalls.c (StringReplace): If their are no occurances of
27591         the old string found return a reference to the supplied
27592         string. This saves some memory and matches MS behavoir.
27593         
27594 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27596         * socket-io.c: fixed compilation for systems that define AF_INET6
27597         and don't define SOL_IP/SOL_IPV6.
27599 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
27601         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
27602         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
27604         * rawbuffer.c rawbuffer.h: Make this module thread safe.
27606         * domain.c: Make this module thread safe.
27608         * domain.c (mono_init): Call new initialization function.
27610         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
27611         reference types too. Fixes #38812.
27613         * image.c (mono_image_init): Fixed warnings.
27615         * class.c (mono_class_from_typeref): Handle assembly load failure
27616         correctly.
27618         * appdomain.c (add_assemblies_to_domain): Handle the case when
27619         the references of an assembly are not yet loaded.
27621         * metadata.c image.c assembly.c: Moved initialization of global
27622         variables to a separate function called at startup since lazy 
27623         initialization of these variables is not thread safe.
27624         
27625         * image.c assembly.c: Made this module thread safe by adding locks in 
27626         the appropriate places.
27628         * domain.c (mono_init): Call the new initialization functions of the
27629         three modules.
27631 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
27633         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
27634           make a direct call. It is proxy's work to make the call asynchronous.
27635           mono_delegate_end_invoke(): If the targe is a proxy, just collect
27636           the return values.
27637         * object.cs: mono_method_call_message_new(): read AsyncResult and
27638           state object from parameters list, if this info is requested.
27639         * object.h: Added fields to store remote call output values in
27640           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
27642 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27644         * object.h: add needed fields to MonoThread.
27645         * threads.c, threads.h: allow registering a function to cleanup data
27646         allocated per thread by the JIT.
27648 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
27650         * loader.h: portability fix by Bernie Solomon
27651         * <bernard@ugsolutions.com>.
27653 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
27655         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
27656         return a MonoArray. This simplifies the code and also ensures that
27657         the cache allways contains an object reference as a value.
27659         * icall.c (ves_icall_get_parameter_info): Simplified using the new
27660         function.
27662 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27664         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
27665         fixes a problem with byte ordering when getting the address family for
27666         a socket.
27668 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
27670         * .cvsignore: Added monosn.
27672         * reflection.h reflection.c loader.c: Added support for parameter
27673         marshalling to dynamically created types. Fixes #47295.
27675 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
27677         * rand.c: remove useless warnings.
27679 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
27681         * class.c: implemented ldtoken for methods and fieldrefs.
27683 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27685         * threadpool.c: when mono_async_invoke was called, no one took care of
27686         monitoring the queue. So if the method invoked took some time and we
27687         got new async invoke requests after 500 ms (the thread created waited
27688         that long in WaitForSingleObject), the new async invoke was not called
27689         until the previous one finished.
27691         This is fixed now. Thanks to Totte for helping with it.
27693 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27695         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
27697 2003-08-11  Martin Baulig  <martin@ximian.com>
27699         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
27701 2003-08-06  Martin Baulig  <martin@ximian.com>
27703         * mono-debug-debugger.c: Added support for static fields,
27704         properties and methods.
27706 2003-08-06  Martin Baulig  <martin@ximian.com>
27708         * mono-debug-debugger.c: Don't store the MonoString's vtable to
27709         make this work for applications with multiple application domains.
27711 2003-08-04  Martin Baulig  <martin@ximian.com>
27713         * mono-debug-debugger.c: Completely reworked the type support; the
27714         most important thing is that we're now just using one single
27715         `MonoType' instance per type.
27717 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
27719         * mono-endian.h, mono-endian.c, icall.c: Added icall
27720         ves_icall_System_Double_AssertEndianity to assert double word endianity
27721         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
27723 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27725         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
27726         support, icalls and fixes.
27728 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
27730         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
27731         classes that are a punctuation character in .NET is not the same a
27732         g_unichar_ispunct.
27734 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
27736         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
27738 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
27740         * icall.c: Add new MemCopy internalcall.
27741         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
27742         Simplified code; It is not necessary to handle all the cases here,
27743         as the C# code takes care of it.  Only handle the case of the name
27744         resource embedded into the assembly.
27746         Changed signature to return the data pointer and the size of the
27747         data. 
27749 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
27751         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
27752         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
27754 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
27756         * socket-io.c: ignore EINTR error in select.
27758 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
27760         * class.h, class.c: removed unused subclasses field in MonoClass.
27762 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
27764         * icall.c: improve fix of get_base_definition(). If the parent class
27765           doesn't have the mehod, look at the parent of the parent.
27766         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
27767           to check if a parameter is an in or out parameter
27768           (PARAM_ATTRIBUTE_IN is not set by default).
27769           mono_method_return_message_restore(): Use mono_class_value_size to
27770           get the size of a value type. mono_type_stack_size (parameterType)
27771           does not return the correct value if parameterType is byRef.
27772           mono_load_remote_field(), mono_load_remote_field_new(),
27773           mono_store_remote_field(), mono_store_remote_field_new():
27774           raise exception if the remote call returns an exception.
27776 2003-07-28  Martin Baulig  <martin@ximian.com>
27778         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
27779         method.  This is a wrapper around mono_runtime_invoke() which
27780         boxes the instance object if neccessary.
27782 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27784         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
27785         metadata.h, row-indexes.h, verify.c: first cut of generics support.
27787 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27789         * icall.c: disable mcs bug workaround.
27791 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
27793         * object.c (mono_runtime_class_init): Take the metadata_section
27794         mutex before obtaining the domain mutex.
27796         * appdomain.h: Added definition of metadata_section mutex here. 
27798         * object.c: define metadata_mutex here.
27800 2003-07-24  Ravi Pratap  <ravi@ximian.com>
27802         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
27803         fixed.
27805 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
27807         * reflection.c: Fix bug #46669
27809 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27811         * exception.c:
27812         * exception.h:
27813         * icall.c:
27814         * object.h: fill in the type name for TypeLoadException.
27816 2003-07-23  Ravi Pratap  <ravi@ximian.com>
27818         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
27819         relationship between TypeBuilders while compiling corlib) and bug
27820         45993 (Array types returned from the runtime while compiling
27821         corlib were from the loaded corlib).
27823 2003-07-22  Martin Baulig  <martin@ximian.com>
27825         * mono-debug-debugger.c: Reworked the type support a bit more;
27826         distinguish between types and classes.
27828 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
27830         * icall.c: add IsArrayImpl icall.
27832 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
27834         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
27835         initializing real_size only once. Also fix bug #46602.
27837 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
27839         * object.c: Renamed mono_metadata_section to metadata_section.
27841 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
27843         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
27844           empty array if the type is an array. Fixed.
27845           ves_icall_MonoMethod_get_base_definition: if the base method
27846           is abstract, get the MethodInfo from the list of methods of
27847           the class.
27848         * reflection.c: ParameterInfo.PositionImpl should be zero-based
27849           and it was 1-based. Fixed in mono_param_get_objects.
27851 2003-07-20  Martin Baulig  <martin@ximian.com>
27853         * mono-debug.h: Set version number to 31.
27854         (mono_debug_init): Added `MonoDomain *' argument.
27856         * mono-debug-debugger.c: Reworked the type support; explicitly
27857         tell the debugger about builtin types; pass the `klass' address to
27858         the debugger.
27860 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
27862         * image.c: Allow new metadata tables to be loaded without a
27863         warning. Also update the warning message to give the new constant value.
27864                 
27865 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
27867         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
27868         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
27869         array type representation changes.
27871 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
27873         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
27874         on Environment.Exit () call.
27876 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
27878         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
27879         requires a matching corlib.
27881 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
27883         * Changelog: My editor decided to add a CR to each line. Sorry about that.
27884           Committed again without the CRs.
27885         
27886 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
27888         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
27889           getting it from the "this" socket instance. Did not work
27890           if the socket is a subclass of Socket.
27891           Also fixed bug #35371.
27893 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
27895         * metadata.c: fixed size for TypedByRef.
27896         * loader.c: when searching for a method, consider the vararg amrker.
27897         * unicode.c, decimal.c: constify some arrays.
27899 2003-07-15  Dick Porter  <dick@ximian.com>
27901         * socket-io.c: Fixed compilation for gcc < 3.2.
27903         Fixed compilation for machines that don't have AF_INET6 (thanks to
27904         Bernie Solomon <bernard@ugsolutions.com> for that part.)
27906         Fixed compile warnings.
27907         
27908         Fixed formatting and line endings.
27910 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
27912         * socket-io.h:
27913         * socket-io.c: Added IPv6 support.
27915 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
27917         * class.c (mono_class_is_assignable_from): New function to implement
27918         the is_assignable_from logic. Used by mono_object_isinst, 
27919         Type::IsAssignableFrom () and the interpreter.
27921         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
27922         Object, even interfaces.
27923         
27924         * object.c (mono_object_isinst): Implement in terms of 
27925         is_assignable_from.
27927         * icall.c (ves_icall_type_is_assignable_from): New icall.
27929 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
27931         * domain.c (foreach_domain): fix compiler warning.
27933 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
27935         * image.c (load_metadata_ptrs): use g_strndup because strndup is
27936         not available on all plattforms
27938 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
27940         * image.h image.c: Store the metadata version string in MonoImage.
27941         * icall.c: New icall to retrieve the image version.
27942         * reflection.c (create_dynamic_image): Fill in the image version field
27943         * reflection.c (build_compressed_metadata): Use the image version
27944         from the image structure.
27946 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27948         * appdomain.c: modified comment.
27949         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
27950         That will be its last iteration when mono_gc_cleanup is called from
27951         mono_runtime_cleanup and before the domain is unloaded.
27953         Fixes bug #45962.
27955 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
27957         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
27958         attributes.
27960 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27962         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
27963         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
27964         Bernie Solomon <bernard@ugsolutions.com>.
27966 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
27968         * object.c, object.h: provide mono_object_new_fast() for faster
27969         allocation in some special cases.
27971 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
27973         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
27974         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
27976 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
27978         * threadpool.c: fix leaks.
27980 2003-07-01  Dick Porter  <dick@ximian.com>
27982         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
27983         using MonoGHashTables.  Fixes threadpool bug posted to list.
27985 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27987         * image.h, image.c: added support to load an assembly from a byte array.
27988         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
27989         assembly bundle support.
27991 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
27993         * threadpool.c (mono_thread_pool_add): keep a reference to the
27994         AsyncResult to prevent GC
27996 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
27998         * class.c: leak fix.
28000 2003-06-25  Dick Porter  <dick@ximian.com>
28002         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
28003         for the async object, the WaitHandle object will close the handle.
28004         Fixes bug 45321.
28006 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28008         * class.c: in mono_array_class_get (), lookup from the hash with the
28009         same type we insert: this works around a bug in
28010         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
28011         lluis. The real fix will have to wait for after the release.
28013 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28015         * icall.c: fix memory leak when getting type members.
28017 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28019         * reflection.c: added more pubtoken special cases.
28021 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
28023         * class.c: handle field offset correctly when class size
28024         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
28026 2003-06-20  Martin Baulig  <martin@ximian.com>
28028         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
28029         *image' field.
28031 2003-06-20  Martin Baulig  <martin@ximian.com>
28033         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
28035 2003-06-20  Martin Baulig  <martin@ximian.com>
28037         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
28038         just distinguish between variables in registers and variables at
28039         an offset relative to a register.
28041 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28043         * icall.c: #ifdef out latest changes until mcs is fixed.
28045 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28047         * icall.c: return members in metadata order.
28049 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
28051         * icall.c: avoid infinite loop in GetTimeZoneData.
28053 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
28055         * icall.c: added Marshal.Prelink/All icalls.
28057 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
28059         * object.c, object.h: fix warnings and do some overflow checking
28060         when creating arrays.
28062 2003-06-17  Dick Porter  <dick@ximian.com>
28064         * file-io.h:
28065         * file-io.c: File attributes need to be tweaked slightly when
28066         passed from the managed to the w32 world.
28068 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
28069         * profiler.h profiler-private.h profiler.c: Rework last patch
28070         based on suggestion by Paolo.
28071         
28072 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
28074         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
28075         instruction level coverage data collection.
28076         * profiler.h profiler.c (: Added new callback function which can be
28077         used by the profiler to limit which functions should have coverage
28078         instrumentation.
28079         * profiler.c (mono_profiler_load): Call g_module_build_path to
28080         generate the file name of the profiler library.
28082 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
28084         * profiler.c, profiler.h, profiler-private.h: added basic block 
28085         coverage profiling API.
28087 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
28089         * reflection.c (mono_reflection_create_runtime_class): Add support
28090         for events in dynamically generated code.
28092         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
28093         not allocated.
28095 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
28097         * icall.c: when getting timezone info, return reasonable values if we
28098         can't get the actual data.
28100 2003-06-14  Dick Porter  <dick@ximian.com>
28102         * threads.c (start_wrapper): Remove the reference to the thread
28103         object in the TLS data, so the thread object can be finalized.
28104         This won't be reached if the thread threw an uncaught exception,
28105         so those thread handles will stay referenced :-( (This is due to
28106         missing support for scanning thread-specific data in the Boehm GC
28107         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
28109 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
28111         * reflection.c: ensure streams and tables are first allocated with
28112         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
28114 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
28116         * icall.c: fixed GetElementType for byrefs (bug# 44792).
28118 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
28120         * reflection.c (mono_reflection_create_runtime_class): Add support for
28121         properties to dynamically created classes.
28122         * reflection.c: Fix a few places where non-MonoObjects were inserted
28123         into the tokens hashtable.
28125 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28127         * object.c: some support to handle out of memory exceptions.
28129 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
28131         * marshal.c (mono_marshal_get_native_wrapper): support reference
28132         return types
28134 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28136         * object.h, object.c: more portability stuff from Bernie Solomon.
28137         Unexport mono_object_allocate(). Added mono_object_unbox ().
28138         Set exitcode when an unhandled exception is thrown.
28140 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
28142         * marshal.c (mono_marshal_get_native_wrapper): use custom
28143         marshaler for return types.
28145 2003-06-10  Dick Porter  <dick@ximian.com>
28147         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
28148         ip_mreq is available
28150 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
28152         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
28153         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
28154         by Bernie Solomon <bernard@ugsolutions.com>.
28156 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
28158         * gc.c (mono_gc_init): Avoid error message on shutdown when
28159         GC_DONT_GC=1 is used.
28161         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
28162         New icall to return the GUID of a module.
28164 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
28166         * class.c: ensure instance size always includes the parent's size
28167         even whem class size is set explicitly (fixes bug#44294).
28169 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28171         * profiler.h, profiler.c: made the simple profiler thread-safe,
28172         get more accurate timing info. Allow the loading of an
28173         externally-developed profiler module.
28175 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
28177         * marshal.c (mono_marshal_get_native_wrapper): improved
28178         class/byref arguments.
28179         (mono_marshal_get_native_wrapper): better string marshaling support.
28181 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
28183         * class.c: ensure .pack and .size are handled correctly and
28184         simplified layout of static fields.
28186 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
28188         * appdomain.c
28189         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
28191         * loader.c (mono_lookup_pinvoke_call): look for modules in the
28192         current directory (fix bug 44008)
28194 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
28196         * marshal.c (mono_marshal_get_native_wrapper): started support for
28197         custom marshalers.
28198         (mono_delegate_to_ftnptr): consider marshalling specifications
28200 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
28202         * reflection.c, reflection.h: emit custom marshal info.
28204 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28206         * object.c: free the GError.
28207         * icall.c: added CloseEvent_internal.
28208         * threads.[ch]:
28209         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
28210         call.
28212 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
28214         * loader.c (mono_method_get_signature): Add support for dynamic
28215         assemblies.
28217 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
28219         * reflection.c: fixed bug #43905.
28221 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
28223         * class.c, domain.c, icall.c, metadata.h, object.h: support for
28224         handling TypedReference and ArgIterator.
28225         * loader.c, loader.h: added function to get signature at call site.
28227 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28229         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
28230         data readonly. Buglets and warning fixes. Some MethodSpec support.
28232 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
28234         * class.h, class.c, object.c: remove relative numbering support.
28236 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
28238         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
28239         free the string, until we get a chance to fix Gtk#
28241 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28243         * marshal.c: revert last patch.
28245 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
28247         * icall.c: updates for new mono_class_vtable() not calling
28248         the type constructor anymore.
28250 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28252         * object.h, object.c: separate vtable creation from type
28253         initialization. Make running the .cctor thread safe.
28255 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
28257         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
28259 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
28261         * loader.c (mono_get_method): consider calling convention
28263 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
28265         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
28266         to return the invisible global type for a module.
28268         * reflection.c (mono_image_build_metadata): Emit global fields too.
28270 2003-05-20  Peter Williams  <peterw@ximian.com>
28272         * loader.c (mono_lookup_internal_call): Add a few newlines.
28274 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
28276         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
28277         literal strings.
28279         * appdomain.c (set_domain_search_path): Recalculate search path when
28280         AppDomainSetup.PrivateBinPath changes.
28282         * object.c (mono_class_compute_gc_descriptor): It turns out some
28283         parts of the class libs (like System.Thread) holds pointers to
28284         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
28285         to treat native int a pointer type here.
28286         
28287 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
28289         * appdomain.h, domain.c: add hashtable for jump target resolution.
28291 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
28293         * reflection.h reflection.c icall.c: Added new icalls 
28294         GetManifestResourceInfoInternal, GetModulesInternal and support
28295         infrastructure.
28297 2003-05-16  Dick Porter  <dick@ximian.com>
28299         * icall.c:
28300         * file-io.h:
28301         * file-io.c: Implement System.IO.MonoIO::GetTempPath
28303 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
28305         * object.c: mono_store_remote_field: little fix to previous patch.
28307 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
28309         * class.c: add constructors to array classes.
28310         * icall.c: special case array construction for InternalInvoke (),
28312 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
28314         * class.h class.c reflection.c object.c: Added support for field
28315         defaults in dynamically generated classes.
28317 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
28319         * reflection.c: properly encode charset for ddlimport.
28321 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
28323         * threads.c: allow compiling without GC.
28325 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28327         * appdomain.h, object.c, object.h, threads.c, threads.h: added
28328         handling of thread static data.
28330 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28332         * reflection.h, reflection.c: added mono_custom_attrs_free ().
28334 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
28336         * class.c (mono_array_class_get): always set the serializable flags
28337         (mono_array_class_get): always set the SEALED attribute for array types
28339 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
28341         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
28342         attributes (fix for bug 42021).
28344 2003-05-12  Dick Porter  <dick@ximian.com>
28346         * gc.c: Don't run finalizers when the finalizer thread is
28347         finishing up, because the default domain has already been
28348         destroyed.
28350 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
28352         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
28353         value is null, we should throw an exception.   This is slightly
28354         different than the other conventions used for the constructor.
28356 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28358         * socket-io.c: fixed windows build.
28360 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28362         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
28364 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
28366         * object.c (mono_string_new_wrapper): Compatibility fix for MS
28367         compilers.
28369 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
28371         * class.c (mono_class_layout_fields): Add experimental GC aware
28372         auto layout facility. Requires class library changes to work correctly.
28374         (mono_class_setup_vtable): Avoid overriding explicit interface
28375         method implementations. Fixes iface3.exe test.
28377         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
28378         object reference.
28379         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
28380         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
28382         * metadata.h: Add new type classification macro which determines
28383         whenever the type holds an object reference.
28385 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
28387         * marshal.c (mono_marshal_get_native_wrapper): cleanups
28389 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
28391         * gc.c (finalizer_thread): Work around a GC bug.
28393 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
28395         * marshal.c (emit_struct_conv): allow unions
28397         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
28399 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
28401         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
28403 2003-05-06  Martin Baulig  <martin@ximian.com>
28405         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
28407 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28409         * socket-io.c:
28410         (Select_internal): allow NULLs, don't create arrays if not needed.
28411         Coupled with Socket.cs changes.
28413         * threadpool.c:
28414         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
28415         register a finalizer for it that will close the semaphore handle. This
28416         fixes the leak and make Lupus' test run with > 4080 loops.
28418 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
28420         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
28421         Jerome Laban (bug #42287)
28423 2003-05-02  Martin Baulig  <martin@ximian.com>
28425         * debug-mono-symfile.h
28426         (MonoSymbolFile): Moved declaration into mono-debug.h.
28427         (MonoDebugMethodJitInfo): Likewise.
28428         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
28429         argument.
28430         (_mono_debug_address_from_il_offset): Take a
28431         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
28433         * mono-debug.h
28434         (MonoDebugDomainData): New struct.
28435         (mono_debug_get_domain_data): New function.
28436         (mono_debug_add_method): Take an additional `MonoDomain *'
28437         argument.
28438         (mono_debug_source_location_from_address): Likewise.
28439         (mono_debug_il_offset_from_address): Likewise.
28440         (mono_debug_address_from_il_offset): Likewise.
28442 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
28444         * reflection.c: one more check for null type in custom attrs.
28446 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28448         * reflection.c: avoid warning (comparison is always false due to limited
28449         range of data type).
28451 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28453         * icall.c: throw an exception in Type.GetField if the argument 'name'
28454         is NULL.
28456 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
28458         * reflection.c: fixed handling of enums in named arguments to custom
28459         attributes (bug #42123).
28461 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
28463         * reflection.c: use the right array element type and handle
28464         a null for a Type argument, too.
28466 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
28468         * reflection.c: handle arrays as arguments to custom attributes.
28470 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
28472         * reflection.c: handle a string value in a custom attr
28473         ctor that takes an object.
28475 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
28477         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
28478         (fix bug #42063)
28480 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
28482         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
28484 2003-04-27  Martin Baulig  <martin@ximian.com>
28486         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
28487         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
28488         MONO_DEBUGGER_EVENT_BREAKPOINT.
28489         (mono_breakpoint_trampoline_code): Removed.
28490         (mono_debugger_event_handler): The last argument is now a
28491         `guint32'.
28492         (mono_debugger_insert_breakpoint_full): Removed the
28493         `use_trampoline' argument.
28494         (mono_debugger_method_has_breakpoint): Likewise.
28495         (mono_debugger_trampoline_breakpoint_callback): Renamed to
28496         mono_debugger_breakpoint_callback(); take the method and
28497         breakpoint number as arguments.
28499 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
28501         * metadata.c: fix off by one when loading parameters attributes.
28503 2003-04-24  Martin Baulig  <martin@ximian.com>
28505         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
28507 2003-04-24  Martin Baulig  <martin@ximian.com>
28509         * mono-debug-debugger.c: Moved all code which interacts with the
28510         Mono Debugger here.
28512         * debug-mono-symfile.c: This code now just deals with the symbol
28513         file itself, the debugger code is now in mono-debug-debugger.c.
28515 2003-04-23  Martin Baulig  <martin@ximian.com>
28517         * mono-debug.c (mono_debug_source_location_from_il_offset):
28518         New method; like mono_debug_source_location_from_address(), but
28519         takes an IL offset instead of a machine address.
28521 2003-04-23  Martin Baulig  <martin@ximian.com>
28523         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
28524         `line' field; this is now computed by the debugger.
28526 2003-04-23  Martin Baulig  <martin@ximian.com>
28528         * mono-debug.[ch]: New files.  This is the new debugging interface.
28530         * mono-debug-debugger.[ch]: New files.  Moved all code which
28531         interacts with the Mono Debugger here.
28533 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
28535         * domain.c (mono_init): initialize mono_defaults.monitor_class
28537 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
28539         * reflection.c (method_encode_code): Add a spicy exception to help
28540         future compiler authors.
28542 2003-04-21  Martin Baulig  <martin@ximian.com>
28544         * icall.c
28545         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
28546         Make this work with relative pathnames; g_filename_to_uri() needs
28547         an absolute filename.
28549 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
28551         * icall.c: Track name changes in Object and ValueType.
28553 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
28555         * metadata.c (mono_type_stack_size): size should be a multiple of
28556         sizeof (gpointer)
28558 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28560         * gc.c:
28561         (internal_domain_finalize): moved into mono_domain_finalize. No need
28562         to create another thread because the finalizers will be run in the
28563         finalizer thread.
28564         
28565         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
28566         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
28567         to be run (MS does this too).
28569 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
28571         * object.c (mono_class_compute_gc_descriptor): Update comment.
28573         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
28575         * image.h: Add synchronized wrapper cache.
28577         * image.c (do_mono_image_open): Initialize cache.
28579         * reflection.c (create_dynamic_mono_image): Initialize cache.
28581 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28583         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
28584         ves_icall_System_Buffer_ByteLengthInternal.
28586 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28588         * reflection.c: setup klass->nested_in earlier. Allow
28589         a dash in the assembly name.
28591 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
28593         * metadata.c (mono_type_to_unmanaged): dont access
28594         type->data.klass for MONO_TYPE_OBJECT
28595         (mono_type_to_unmanaged): consider System.Delegate class
28597 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
28599         * class.c: just setup supertypes in the proper place instead of
28600         initializing the full element class for arrays.
28602 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
28604         * class.c: ensure the element class of arrays is initialized.
28605         Setup the supertype info for array classes, too.
28607 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
28609         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
28611 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28613         * Makefile.am: re-added -m option when running cygpath. This way,
28614         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
28615         separator.
28616         * mono-config.c: same codepath for locating mono config file for WIN32
28617         and the rest.
28618         * assembly.c: if mono_assembly_setrootdir is called, don't override
28619         the value set.
28621 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28623         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
28624         MONO_ASSEMBLIES variable.
28626 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
28628         * icall.c: added Assembly::GetNamespaces() icall.
28630 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28632         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
28634 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
28636         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
28637         * object.c: fixed bug in the construction of vtable for proxies
28639 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
28641         * object.c (mono_array_new): Mark mono_array_new as an icall.
28643 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28645         * class.c: fixed test for public method when overriding interfaces.
28646         Closes bug #40970.
28648 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28650         * appdomain.h, domain.c: added mono_domain_foreach() to
28651         be able to access the currently loaded appdomains.
28652         * object.c: make string interning work across sppdomains.
28653         Mark some functions for use as icalls.
28655 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
28657         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
28659         * reflection.h reflection.c: Allocate long living data using 
28660         GC_MALLOC_ATOMIC so the collector does not need to scan it.
28662         * reflection.c: Double the allocation size in streams instead of
28663         increasing it, to prevent unneccesary copying on large assemblies.
28664         
28665         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
28666         creation if the assembly does not have the Run flag set.
28668 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
28670         * class.h: avoid the C++ keywords in header files (Jerome Laban
28671         spotted and fixed this).
28673 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28675         * object.c:
28676         (mono_unhandled_exception): fill in the arguments for the
28677         UnhandledException event. Only trigger that event for the default
28678         domain (as MS does).
28680 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
28682         * object.c: Improve typed allocation stuff based on suggestions from
28683         Paolo. Also turn it on if the GC library supports it.
28685 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
28687         * object.c object.h class.h: Added experimental typed allocation
28688         facility using the interfaces in gc_gcj.h.
28690         * os/gc_wrapper.h: Added new include files.
28691         
28692 2003-04-03  Martin Baulig  <martin@ximian.com>
28694         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
28695         which is not yet enabled by default.
28697         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
28698         functions.
28699         (mono_gc_lock, mono_gc_unlock): New static functions.
28701         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
28702         functions; stop/start the world for the garbage collector.  This
28703         is using the windows API; we need to complete the SuspendThread()/
28704         ResumeThread() implementation in the io-layer to make this work on Unix.
28705         (mono_gc_push_all_stacks): New public function; tells the garbage
28706         collector about the stack pointers from all managed threads.
28708 2003-04-03  Martin Baulig  <martin@ximian.com>
28710         * object.h (MonoThread): Added `gpointer stack_ptr'.
28712         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
28714 2003-04-03  Martin Baulig  <martin@ximian.com>
28716         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
28718 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
28720         * reflection.c (typebuilder_setup_fields): Initialize field.first and
28721         field.last.
28723 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
28725         * loader.c (mono_lookup_internal_call): Report the corlib that is
28726         out of sync.
28728 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
28730         * icall.c (ves_icall_type_GetTypeCode): fixed check for
28731         System.DBNull (it's class not valuetype).
28733 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28735         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
28736         if the array method was already assigned a token (fixes bug#40646).
28738 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
28740         * reflection.c (mono_reflection_get_type): Attempt type resolve even
28741         if no assembly is given.
28743 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
28745         * metadata.h: Added the new tables.
28747         * row-indexes.h: Added definitions for new tables.
28749         * metadata.c: Add schemas for new tables, and add support for
28750         computing the sizes of them.
28752         * class.c: Update for handling the new type cases.
28754 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
28756         * metadata.h (MONO_TYPE_IS_VOID): new macro
28758 2003-03-31  Martin Baulig  <martin@ximian.com>
28760         * threads.h (MonoThreadCallbacks): Added `thread_created'.
28762         * threads.c (mono_thread_new_init): Call `thread_created' in the
28763         mono_thread_callbacks.
28765 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
28767         * loader.h: added marshalbyrefobject_class to mono_defaults
28768         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
28769         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
28770           generation of output parameters.
28771           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
28772         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
28773           contextbound and the target object belongs to the context of the caller.
28774         * object.h: added context and unwrapped_server variables in MonoRealProxy.
28775         * object.c: Implemented support for interfaces and abstract classes
28776           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
28777           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
28779 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
28781         * class.h class.c (mono_class_is_subclass_of): New function.
28782         
28783         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
28784         routines for most common case (calls from ArrayList::ToArray).
28786         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
28787         routine so programs which call Environment::Exit() can be profiled.
28789         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
28790         Added MONO_ARCH_SAVE_REGS.
28792         * icall.c (ves_icall_type_is_subtype_of): Use new function.
28794 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
28796         * blob.h: Add a couple of new MonoType types definitions.
28798         * tabledefs.h: Add a couple of new call convs.
28800 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
28802         * reflection.h (MonoReflectionDynamicAssembly): track changes in
28803         the layout of the class.
28805         * reflection.c (alloc_table): double the size on overflow to avoid
28806         unnecessary copying.
28808         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
28809         avoid filling out metadata tables and blobs. Also set mb->ilgen to
28810         null so it can be garbage collected.
28811         
28812 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
28814         * reflection.c (mono_reflection_get_type): Return the resolved type
28815         only if it is in the assembly we searched.
28817         * reflection.c (ensure_runtime_vtable): Initialize method slots.
28819         * class.c (mono_class_setup_vtable): Set the slot of the overriding
28820         method.
28822 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28824         * appdomain.c:
28825         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
28826         the right one is 'file:///blah', but MS allows it.
28827         * assembly.c:
28828         (mono_assembly_open): allow 'file://blah'
28830         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
28832 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
28834         * socket-io.c: fixes bug #40310.
28836 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
28838         * reflection.c (mono_reflection_parse_type): handle deeply nested
28839         types correctly.
28841         * reflection.c (mono_image_create_token): Use unique token values
28842         since they will be put into a hash table.
28844         * class.c (mono_class_setup_vtable): If a method occurs in more than
28845         one place in the vtable, and it gets overriden, then change the
28846         other occurances too.
28848         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
28849         object as return type.
28851 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
28853         * icall.c: Deleted "ToString" implementation for double and float
28854         because they are full implemented in managed code.
28856 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
28858         * reflection.c, reflection.h: implemented and exported functions
28859         to retrieve info about custom attributes.
28861 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28863         * appdomain.c: moved Uri handling to assembly.c
28864         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
28865         work when using a file Uri in *nix and windows.
28867         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
28868         GetReferencedAssemblies.
28870 2003-03-18  Dick Porter  <dick@ximian.com>
28872         * icall.c: Rename a couple of internal calls
28874         * threads.c: Set the thread state to Stopped when a thread exits.
28875         Fixes bug 39377.
28877 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
28879         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
28880         New icall.
28882         * object.c (mono_class_vtable): fix warning.
28884 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
28886         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
28888         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
28889         memory.
28890         (method_encode_clauses): Create exception info structures in the right
28891         order.
28892         (mono_reflection_setup_internal_class): Initialize supertypes field.
28894         * class.c object.c: Handle interfaces which implement other interfaces 
28895         correctly.
28897         * class.h class.c: Move the supertypes array initialization code into 
28898         a separate function so it can be used for dynamic types too. Also call
28899         it earlier, in mono_class_init(), since it can be used before the
28900         type is initialized.
28902 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28904         * Makefile.am:
28905         * assembly.c:
28906         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
28908         * appdomain.c:
28909         * appdomain.h:
28910         * marshal.c:
28911         * object.c: remove warnings.
28913 2003-03-13  Martin Baulig  <martin@ximian.com>
28915         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
28916         (MonoDebugLexicalBlockEntry): New types.
28918         * debug-mono-symfile.c
28919         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
28921 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28923         * process.c: ret can be any non-zero value accroding to MS doc.
28925 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
28927         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
28928         fixing a warning for a miss-used prototype, would have cause
28929         random memory corruption.
28931 2003-03-07  Martin Baulig  <martin@ximian.com>
28933         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
28934         getting really annoying ....
28936 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
28938         * reflection.c (fixup_method): added support for array methods.
28940 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
28942         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
28943         (pointed out by Michael Adams).
28945 2003-03-04  Dick Porter  <dick@ximian.com>
28947         * icall.c: Temporarily reverted the Double and Single ToString()
28948         change, because it broke nunit.
28950 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
28952         * object.h, threads.h: make include files compatible with C++
28953         (patch by Jerome Laban <jlaban@wanadoo.fr>).
28955 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
28957         * icall.c: Erased ToString helper functions for Double and Single.
28958         Now, that implementations ar all in managed code (Double and Single
28959         Formatters).
28961 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
28963         * appdomain.c: Added method for initializing the default context of
28964         a domain. Added internal call for getting the default context.
28965         * appdomain.h: Added context variable in MonoDomain struct.
28966         * domain.c: mono_domain_set also sets the default context of the domain
28967         * icall.c: Mapped internal method InternalGetDefaultContext.
28968         * object.c: mono_object_get_virtual_method returns always a remoting
28969         wrapper if the object is a transparent proxy.
28970         mono_runtime_invoke_array: when creating an object by calling the
28971         constructor, if the created object is a proxy, then the constructor should
28972         be called using the a remoting wrapper.
28974 2003-03-03  Dick Porter  <dick@ximian.com>
28976         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
28977         variable so it compiles on solaris.  Problem spotted by
28978         Christopher Taylor <ct@cs.clemson.edu>
28980 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28982         * appdomain.c:
28983         (get_info_from_assembly_name): don't leak value.
28985         * icall.c:
28986         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
28987         result.
28989 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
28991         * assembly.c: export mono_image_load_references ().
28992         * class.c: handle function pointers. mono_class_from_name() now
28993         supports nested type names directly.
28995 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
28997         * reflection.h reflection.c: Encode already created dynamic methods 
28998         and fields correctly as a DEF instead of a REF.
29000         * reflection.c: Get rid of the force_ref argument to 
29001         mono_image_typedef_or_ref since it was wrong in the first place.
29003         * string-icalls.c: add error checking to string constructors according
29004         to the MSDN docs.
29006         * reflection.c: Emit types in the order their TypeBuilders were 
29007         created. Previously, a new table index was assigned to each type before
29008         the tables were emitted. This was wrong because the signature blob
29009         might already refer to a type by its original table index.
29011 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
29013         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
29014         change.
29015         
29016 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29018         * Makefile.am: make assemblies dir have \ instead of / on windows.
29020 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
29022         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
29023         iterate over the NESTEDCLASS table using a linear search since the
29024         table is not guaranteed to be sorted by the secondary key.
29026         * class.c (mono_class_create_from_typedef): fixed up call to
29027         mono_metadata_nesting_typedef.
29028         
29029 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
29031         * marshal.c (mono_string_to_byvalstr): clear the memory as
29032         suggested by Jerome Laban <jlaban@wanadoo.fr>
29034 2003-02-26  Dick Porter  <dick@ximian.com>
29036         * process.c: Cope with padding in .rsrc blocks
29038 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
29040         * metadata.h: reverted the filter_len change, it breaks reflection
29041         
29042 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
29044         * metadata.h: added a new field to store the filter_len
29045         
29047 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
29049         * reflection.c: handle custom attributes for types and members
29050         created with Reflection.Emit (bug#38422).
29052 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
29054         * reflection.c: define RTSpecialName automatically for constructors for
29055         compatibility with MS.NET.
29057         * reflection.c (mono_reflection_create_runtime_class): initialize
29058         nested_in field of dynamically created classes.
29060 2003-02-22  Martin Baulig  <martin@ximian.com>
29062         * debug-mono-symfile.h: Incremented version number.
29064 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
29066         * object.h icall.c process.c: fix warnings.
29068 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
29070         * appdomain.h appdomain.c:
29071         (mono_domain_try_type_resolve): split the 
29072         name_or_tb argument into a name and a tb argument.
29073         (mono_domain_has_type_resolve): new function to check whenever the
29074         application has registered a TypeResolve event handler.
29075         
29076         * icall.c reflection.h reflection.c: move the type resolve logic into
29077         mono_reflection_get_type () so it will be invoked when 
29078         Assembly::GetType () is called.
29080         * reflection.c:
29081         (mono_reflection_get_type): renamed to get_type_internal.
29082         (mono_reflection_get_type): fixed type name generation so it works 
29083         for nested types too.
29084         (mono_reflection_get_type): call has_type_resolve () to avoid the 
29085         costly type name generation if there is no resolve event handler.
29087 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29089         * class.c, image.c: load exported types from file references.
29091 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
29093         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
29094           used to cache the managed methods used to create proxies and make 
29095           remote invocation of methods.
29096         * class.h: Added in MonoVTable a flag to indicate that a class needs 
29097           to be remotely created.
29098         * object.c: Modified the method mono_class_vtable(). It now initializes 
29099           the remote flag of the vtable. Modified mono_object_new_specific(), 
29100           so now it checks the remote flag.
29101         * icall.c: Added a couple of internal methods, one for enabling instance 
29102           creation interception for a type, and one for creating objects bypassing
29103           the remote check.
29105 2003-02-18  Martin Baulig  <martin@ximian.com>
29107         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
29108         New interncall to get a method's metadata token.
29110         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
29111         New interncall for the debugger.
29113 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
29115         * class.c (mono_class_setup_vtable): allocate supertype array
29117 2003-02-18  Martin Baulig  <martin@ximian.com>
29119         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
29121 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29123         * reflection.c:
29124         (assembly_name_to_aname): jump over unknown properties (i've found
29125         something like: 'type, assembly, version=xxx, custom=null, public...',
29126         so now will ignore custom=null and still get the rest of the values).
29128 2003-02-17  Dick Porter  <dick@ximian.com>
29130         * threads.c: Have Thread.Start() wait for a semaphore to signal
29131         that the thread has set up all its local data.  This fixes bug
29132         34323, where Abort() raced the new thread's TLS data.
29134         Also removes the handle_store() call from start_wrapper, because
29135         threads are now always created suspended and there is no longer a
29136         race between the parent and child threads to store the info.
29138 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
29140         * image.c: explain the #- heap issue in a message, hopefully
29141         avoiding FAQs on mono-list.
29143 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29145         * icall.c:
29146         (GetEntryAssembly): if the domain has not invoked
29147         AppDomain.ExecuteAssembly yet, return the assembly of the default
29148         AppDomain.
29150 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
29152         * class.c (mono_ldtoken): make it work in dynamic assemblies.
29154 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
29156         * metadata.c, reflection.c: simple speedup to type hash
29157         and equals code.
29159 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
29161         * image.c, image.h, class.c, assembly.c: move module loading
29162         to MonoImage. When loading metadata, consider alignemnet from
29163         the start of metadata, not from the metadata address in memory.
29165 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
29167         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
29168         AssemblyBuilder objects. Factored out custom attribute creation into
29169         a separate function.
29170         (create_custom_attr): new function to create custom attributes.
29172 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
29174         * Makefile.am: Got tired of typing the full pathname to pedump.
29175         Until there is another option, am installing this.
29177 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
29179         * class.c (class_compute_field_layout): always set field->parent 
29180         (mono_ldtoken): use mono_defaults.fieldhandle_class;
29182 2003-02-11  Dick Porter  <dick@ximian.com>
29184         * threads-types.h:
29185         * monitor.c: Rewrote Monitor, making lock much faster and
29186         Pulse/Wait work as specified.  Also uses much fewer handles, and only
29187         creates them as needed.
29189         * exception.c: Added SynchronizationLockException
29191         * threads.c: Deleted old Monitor implementation.  The new one is
29192         in a new file.
29194 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
29196         * class.c: handled TypedReference type code. Set the correct size for
29197         class data. Setup interface_offsets for interface classes, too.
29199 2003-02-09  Martin Baulig  <martin@ximian.com>
29201         * debug-mono-symfile.h: Reflect latest symbol writer changes.
29203 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
29205         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
29206         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
29207         * object.c: fixed mono_object_get_virtual_method () for interfaces.
29208         * verify.c: check for code that runs after the end of the method.
29210 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
29212         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
29213         "System.Math::Round2".
29214         * sysmath.h: Added Floor, Round and Round2 definitions.
29215         * sysmath.c: Modified certain functions that were not 100% compliant
29216         with MS.NET (math precision) and added the implementation of Floor,
29217         Round and Round2.
29219 2003-02-07  Martin Baulig  <martin@ximian.com>
29221         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
29223 2003-02-07  Martin Baulig  <martin@ximian.com>
29225         * debug-mono-symfile.c: Reflected latest symwriter changes.
29226         (mono_debug_create_mono_symbol_file): Removed.
29227         (mono_debug_open_mono_symbol_file): Take an argument which
29228         specifies whether to create a dynamic symbol file.
29230 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
29232         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
29234 2003-02-05  Martin Baulig  <martin@ximian.com>
29236         * reflection.c (mono_image_build_metadata): Make this public,
29237         protect it against being called multiple times, don't create
29238         resources and don't build the compressed metadata here.
29239         (mono_image_create_pefile): Do this here.
29241         * icall.c
29242         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
29244 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29246         * socket-io.c: fixed bug #36322.
29248 2003-02-06  Piers Haken <piersh@friskit.com>
29250         * appdomain.[ch]:
29251         * class.h:
29252         * debug-mono-symfile.c:
29253         * icall.c:
29254         * loader.c:
29255         * mono-config.c:
29256         * monosn.c:
29257         * reflection.c:
29258         * socket-io.c: warning cleanups
29260 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
29262         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
29263         function. works like remoting invoke, but does a check for the Proxy first.
29265 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
29267         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
29269 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
29271         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
29272         array of pointers.
29273         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
29274         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
29276         * object.c (mono_store_remote_field_new): used by the new jit
29277         instead of mono_store_remote_field
29278         (mono_load_remote_field_new): used by the new jit
29279         instead of mono_load_remote_field
29281 2003-02-05  Patrik Torstensson
29283         * appdomain.c: changed unload to take the domain id instead
29284         of domain
29285         
29286         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
29289 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29291         * appdomain.c: don't look for assemblies in ApplicationBase if
29292         PrivateBinPathProbe is set.
29294 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29296         * object.c: make the first argument in main_args contain the absolute
29297         path to the assembly. Fixes bug #37511.
29299 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29301         * icall.c: get correct UTC offset for countries not using daylight
29302         time saving. Fixes bug #30030.
29304 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29306         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
29307         and 1 are the family).
29309 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
29311         * icall.c (ves_icall_InternalExecute): removed wrong assertion
29313         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
29315 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
29317         * reflection.c: added support for SignatureHelper tokens, which is
29318         needed by the Calli opcode.
29320         * reflection.h: track changes to SignatureHelper class.
29322         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
29324 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29326         * appdomain.c: fixed loading assemblies from PrivateBinPath.
29328 2003-02-03  Patrik Torstensson
29329         * appdomain.[c|h], domain.c : 
29330          - Added support for getting a domain via domain id
29331          - Support for setting and getting domain from System.AppDomain 
29332            (used in cross appdomain channel)
29333          - Added support for get/set for a MonoAppContext on a thread 
29334            (Context class in System.Runtime.Remoting.Contexts),
29335          - Removed hack in Get/SetData and ExecuteAssembly.
29336         
29337         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
29338         the managed world to get control when a proxy is created.
29340         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
29341         
29342 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
29344         * icall.c
29345         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29346         Populate the codebase field as well.
29348 2003-02-02  Martin Baulig  <martin@ximian.com>
29350         * debug-mono-symfile.c
29351         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
29352         (mono_debug_symfile_add_method): Allow interncalls.
29354 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29356         * icall.c: throw parse exception if strtod fails or the string is empty.
29358 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
29360         * marshal.c: handle object type separately from defined
29361         class types.
29363 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
29365         * marshal.c: handle NATIVE_LPSTR for strings when it's
29366         explicitly specified.
29368 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
29370         * reflection.c, reflection.h, icall.c: setup the reflection
29371         handle cache for ModuleBuilders and AssemblyBuilders.
29373 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
29375         * reflection.c (reflection_methodbuilder_to_mono_method): set
29376         pinvoke flag
29378 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29380         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
29382 2003-01-29  Dick Porter  <dick@ximian.com>
29384         * threads.c: No need for the fake_thread kludge now that Thread
29385         doesn't run a class constructor
29386         
29387 2003-01-29  Dick Porter  <dick@ximian.com>
29389         * threads.c: Use g_direct_hash instead of the rather bogus
29390         g_int_hash
29392 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
29394         * marshal.c (mono_marshal_get_native_wrapper): add check for null
29395         (fix pinvoke12.exe)
29396         (mono_marshal_get_struct_to_ptr): generate valid IL code
29397         (mono_marshal_get_ptr_to_struct): generate valid IL code
29398         (*): correctly set sig->pinvoke, we need to memdup the signature
29399         to do that
29401 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29403         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
29404         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
29406 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29408         * profiler.c: provide more callers information.
29410 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
29412         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
29414         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
29416         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
29418 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29420         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
29421         exception instead of going into an infinite loop on dates which it 
29422         can't yet handle.
29424         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
29425         out-of-range exception if needed.
29427         * class.c (mono_class_setup_vtable): allow a virtual method to provide
29428         an implementation for an interface method and to override an inherited
29429         method at the same time. 
29430         Imagine a scenario when a virtual method is used to override a
29431         virtual abstract method in a parent class, and this same method 
29432         provides an implementation for an method inherited from an interface. 
29433         In this case, the interface resolution code will set im->slot, which 
29434         means that the virtual method override pass will skip this method 
29435         which means a pointer to the abstract method inherited from the parent
29436         will remain in the vtable of this non-abstract class.
29438         * class.c: (mono_class_setup_vtable): continue search for a real 
29439         method if only an abstract method is found.     
29441 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29443         * reflection.c: add size to encoding for ByValStr and ByValArray
29444         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
29446 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29448         * class.c (mono_class_setup_vtable): pass the override info as an
29449         argument.
29451         * class.c (mono_class_setup_vtable): set the slot of overriding methods
29452         correctly.
29453         
29454         * reflection.c (ensure_runtime_vtable); add support for method 
29455         overrides.
29456         
29457 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29459         * reflection.c (resolution_scope_from_image): Hack to work to work with
29460         dynamic assemblies.
29462         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
29463         added a 'force_ref' argument to force this function to allways return 
29464         a TypeRef. This is needed by mono_image_get_memberref_token ().
29465         
29466 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29468         * reflection.c (mono_image_get_type_info): interfaces really don't have
29469         a parent.
29471         * reflection.c (mono_image_basic_init): fill out missing fields of
29472         image structure.
29474         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
29475         dynamic assemblies. This is required so dynamic assemblies show up in
29476         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
29477         Type::GetType() etc. This is consistent with MS behaviour.
29479         * image.c image.h reflection.c: add newly created classes to the name 
29480         cache so mono_class_get () will find them.      
29482 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29484         First part of changes to get IKVM.NET running under mono.
29485         
29486         * appdomain.h, appdomain.c: added new function 
29487         mono_domain_try_type_resolve() which will emit TypeResolve events. 
29488         This function will call AppDomain::DoTypeResolve to do the actual work.
29490         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
29491         moved existing code dealing with dynamic tokens to a new function 
29492         called mono_reflection_lookup_dynamic_token (). This function will 
29493         raise TypeResolve events when appropriate. Since reflection.c is not 
29494         part of libmetadata, a new hook function called 
29495         mono_lookup_dynamic_token() is added to class.c which will call this.
29497         * assembly.h assembly.c: make the invoke_load_hook function public,
29498         so it can be called for dynamic assemblies.
29500         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
29502         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
29503         type isn't found.
29505         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
29506         MonoGHashTable, since it contains pointers to objects which the GC 
29507         needs to track.
29509         * assembly.c (search_loaded): remove unused variable.
29510         
29511 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
29513         * object.c: fixed issue exposed by gcc-generated IL programs
29514         that use RVA data for pointers.
29516 2003-01-25  Martin Baulig  <martin@ximian.com>
29518         * threads.c (start_wrapper): Moved the initialization of
29519         `start_func' above the mono_new_thread_init() call to which we
29520         pass it as argument.
29522 2003-01-24  Martin Baulig  <martin@ximian.com>
29524         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
29525         the MonoThread pointer.
29527 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
29529         * icall.c: Rename `PowImpl' to Pow.
29531 2003-01-23  Dick Porter  <dick@ximian.com>
29533         * threads.c (start_wrapper): Create a Thread object if needed, so
29534         the Main() thread can do the class initialisation in a subthread
29535         that has been set up to allow managed code execution.
29537         Pass the thread ID instead of the MonoThread pointer to the thread
29538         start and attach callbacks.  This change is required, because the
29539         jit thread start callback must be called _before_ the Thread
29540         object can be created.
29541         
29542         (mono_thread_init): Removed much object creation code that is no
29543         longer needed.  No managed code is called from here now.
29545         * object.c (mono_runtime_exec_managed_code): Create a subthread
29546         for Main, and call back to the runtime to use it.
29547         Set the exit code when Main exits.
29549         * gc.c: Make sure domain finalisation happens in a subthread.
29550         Re-enable threaded GC, fixing bug 31333 (again).
29552         * environment.c: System.Environment internall calls (so far just
29553         ExitCode is here, the others are still in icall.c)
29555         * appdomain.c (mono_runtime_cleanup): All threads running managed
29556         code should have finished before mono_runtime_cleanup() is
29557         reached, so no need to clean up threads.
29559 2003-01-22  Martin Baulig  <martin@ximian.com>
29561         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
29562         `gpointer func' arguments.      
29563         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
29564         but added `MonoThread *thread' argument.
29565         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
29567         * threads.c (mono_new_thread_init): Added `gpointer func' argument
29568         and pass it to the mono_thread_start_cb callback.
29569         (mono_install_thread_callbacks): New public function to install a
29570         set of callbacks which are set by the debugger.
29571         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
29573 2003-01-22  Martin Baulig  <martin@ximian.com>
29575         * Makefile.am: Install debug-mono-symfile.h.
29577 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
29579         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
29581 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
29583         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
29584         * class.c (mono_ptr_class_get): correctly set access levels of pointers
29585         (mono_array_class_get): correctly set access levels of arrays
29587 2003-01-20      Patrik Torstensson
29588         * image.h (MonoAssemblyName): changed major, minor, build, revision
29589         from signed to unsigned.
29591 2003-01-20  sean kasun <skasun@azstarnet.com>
29593         * reflection.c (load_cattr_value): Now this handles
29594         MONO_TYPE_SZARRAY.  Fixes bug #35629
29596 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
29598         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
29599         integer value
29601 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29603         * decimal.c: fixed bug #26056.
29605 2003-01-17  Martin Baulig  <martin@ximian.com>
29607         * gc.c: Raise an ExecutionEngineException instead of using g_error().
29609 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29611         * exception.[ch]:
29612         (mono_get_exception_type_initialization): new function.
29614         * object.c: throw a TypeInitializationException when an exception is
29615         thrown invoking the class constructor.
29617 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29619         * reflection.c: fixed attribute reading.
29621 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29623         * icall.c:
29624         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
29625         provided, look for the type in the calling assembly and then in
29626         mscorlib; if the assembly name is provided, only try that one.
29628 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
29630         * object.c: register the vtable before there is a chance it's
29631         queried again recursively.
29633 2003-01-13  Duncan Mak  <duncan@ximian.com>
29635         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
29636         gc-internal.h. 
29637         
29638 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
29640         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
29642 2003-01-11  Martin Baulig  <martin@ximian.com>
29644         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
29645         this to 20 for the release.
29647 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
29649         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
29651         * loader.c (mono_method_get_marshal_info): bug fix
29653         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
29654         structures with explicit layout
29656 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
29658         * profiler.c: made the output more readable (and sorted). 
29659         Added caller information for the allocation profiler.
29661 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
29663         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
29665 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29667         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
29668         to get value types.
29669         
29670 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
29672         * object.c, profiler.h, profiler.c, profiler-private.h:
29673         Added object allocation profiler.
29675 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
29677         * reflection.h, reflection.c: handle global methods.
29678         Compress blob entries.
29680 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
29682         * marshal.c: fix compilation.
29684 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
29686         * loader.c (mono_method_get_marshal_info): impl.
29688         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
29690 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29692         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
29693         for reference types.
29695 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
29697         * loader.c: fixed off by one error in loaded parameter names.
29699 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
29701         * marshal.c (mono_marshal_get_icall_wrapper): like
29702         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
29703         instead of a MonoMethod.
29705 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29707         * decimal.c: fixed bug #36537.
29709 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
29711         * marshal.c: throw a missing method exception if a
29712         P/Invoke method is not found.
29714 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
29716         * icall.c: allow a null this for constructors.
29718 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
29720         * icall.c: raise the proper exceptions if the arguments to the
29721         internal Invoke are incorrect.
29723 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
29725         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
29727 2003-01-03  Martin Baulig  <martin@ximian.com>
29729         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
29731 2002-12-31  Martin Baulig  <martin@ximian.com>
29733         * debug-mono-symfile.c: Completely rewrote the type section.
29734         Instead of using individual malloc()ed fields, we use one big
29735         continuous memory area and offsets into this area.
29736         See the comments in the source code for details.
29738 2002-12-30  Martin Baulig  <martin@ximian.com>
29740         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
29742 2002-12-30  Martin Baulig  <martin@ximian.com>
29744         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
29745         line number table in this data blob instead of using an external
29746         pointer.
29748 2002-12-28  Martin Baulig  <martin@ximian.com>
29750         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
29752 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
29754         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
29755         as a boxed return type.
29757 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
29759         * appdomain.c
29760         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
29761         g_build_filename to properly get separators on the filename created.
29763         * object.h: Small change, introduce MonoMarshalByRefObject to
29764         track the layout of that structure in the C# universe as we make
29765         changes there.
29767 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
29769         * object.c: removed assert to allow static fields on interfaces.
29770         * loader.c: a TypeSpec may be used for any type, not just arrays.
29772 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29774         * class.c, class.h: added mono_class_array_element_size ().
29775         Ignore static methods in interfaces.
29777 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29779         * threads.c: fixed the build under cygwin.
29781 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
29783         * reflection.c: handle nullref constants. Allocate keys for
29784         reflection handles with the GC.
29786 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29788         * threads.c, threads.h: added mono_thread_get_abort_signal()
29789         to get a suitable signal for thread abort.
29791 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29793         * metadata.c: fix handling of ExportedType table.
29795 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29797         * icall.c: added WriteWindowsDebugString internal call.
29799 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29801         * reflection.h: added fields to match C# implementation.
29803 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29805         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
29807 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
29809         * gc.h, gc-internal.h: Rename header for GC internal calls to
29810         gc-internal.h from gc.h as to not clash with Boehm GC having its
29811         header installed as <gc.h> in outside include paths.
29812         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
29813         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
29815 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29817         * icall.c: assign minor, build and revision in FillName.
29819 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
29821         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
29822         Added support for running code generated by Reflection.Emit.
29824 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29826         * appdomain.c: check for NULL argument in LoadFrom.
29828 2002-12-10  Dick Porter  <dick@ximian.com>
29830         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
29832 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29834         * appdomain.c: fix buglet when building exe file name.  Handle full
29835         assembly name (needed after latest changes to AssemblyName).
29836         * image.c:
29837         (mono_image_close): free some hashtables.
29839 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
29841         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
29842         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
29843         on some systems (redhat 7.3) 
29845 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
29847         * threads.c: delete the critical section of a sync block,
29848         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
29850 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
29852         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
29854 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29856         * appdomain.[ch]: handle the assembly preload event to try loading the
29857         assemblies using the paths we have in the current domain.
29859         * assembly.[ch]: created an assembly preload hook that is called to try
29860         loading the assembly by other means that the ones provided here.
29862         * domain.c: initialize the domain search path.
29864         From now on, assemblies (TODO: except corlib and System) are loaded
29865         according to these rules when using mono_assembly_load ():
29867                 1. It tries to load the assembly from the ApplicationBase
29868                 of the current domain appending .dll and .exe (TODO: have to
29869                 try loading from name/name.dll and name/name.exe).
29871                 2. It tries the search path specified in PrivateBinPath for the
29872                 current domain (if any).
29874                 3. Previous behavior.
29876 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
29878         * icall.c: implemented GetInterfaceMap() related icall.
29879         * domain.c, loader.h: load MethodInfo in mono_defaults.
29881 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
29883         * gc.c: disable the finalizer thread for now, untill all the issues
29884         with it are resolved.
29886 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29888         * string-icalls.c: handle embedded nulls in string ctor when the
29889         length is specified.
29891 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
29893         * class.c: look for explicit interface implementation in parent
29894         classes, too.
29896 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
29898         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
29900 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
29902         * gc.c: protect handles with a critical section.
29904 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29906         * icall.c:
29907         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
29908         parameters. If no assembly specified, try getting the type from all
29909         the assemblies in the current domain, else, load the assembly and get
29910         the type from it.
29912 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29914         * marshal.c: applied patch from Aleksey Demakov that fixes
29915         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
29917 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29919         * icall.c: fixed get_location.
29921 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
29923         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
29924         declarations to make it work with older gcc. 
29926         * loader.c (mono_get_method): set signature->pinvoke for native calls
29928 2002-11-20  Dick Porter  <dick@ximian.com>
29930         * threads.c (mono_thread_init): Set the main thread's handle
29932 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
29934         * gc.c: allow compilation without GC support. Changed to match the
29935         mono coding style.
29937 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29939         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
29941 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
29943         * reflection.c: set a public key token on the core assemblies.
29945 2002-11-18  Dick Porter  <dick@ximian.com>
29947         * threads.c: Split out some thread initialisation so that other
29948         files can set the start callback function.
29950         * gc.c: Run finalisers in a separate thread, to avoid stack
29951         overflow.  Fixes bug 31333.
29953         * appdomain.c: Set up GC finalisation thread.
29955         * reflection.c: 
29956         * object.c: 
29957         * domain.c: Use gc.h macros for GC_malloc
29958         
29959 2002-11-15  Dick Porter  <dick@ximian.com>
29961         * threadpool.c: 
29962         * threads.c:
29963         * appdomain.c: Removed mono_runtime_init_with_attach(),
29964         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
29965         merging the extra parameter with the existing function.  Removed
29966         unneeded code in mono_thread_attach().
29968 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
29970         * image.c (mono_image_loaded_by_guid): a method to get loaded
29971         images by guid. 
29972         (load_metadata_ptrs): we store the guid as string.
29974 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
29976         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
29978         * metadata.c (mono_guid_to_string): imported method form Zoltan
29979         Varga (slightly modified)
29981         * assembly.c (mono_assembly_open): load precompiled code
29983         * loader.h (MonoMethod): we store the method token for use in the
29984         aot compiler. 
29986 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29988         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
29989         the hook function called when an assembly is loaded.
29990         
29991         * domain.c: Modified file.
29992         (mono_domain_assembly_load): removed hash table insertion of assemblies.
29994         Fixes bug #33196.
29996 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
29998         * reflection.c: Map PEFileKind to the value expected by the WinNT
29999         image loader. 
30001 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30003         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
30004         Read until the buffer is filled completely.
30006 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30008         * icall.c: implemented MonoType.InternalGetEvent ().
30010 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30012         * appdomain.c: implemented InitAppDomainSetup. Delayed
30013         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
30014         the entry_assembly.
30016         * assembly.c: base_dir is now an absolute path ending with
30017         G_DIR_SEPARATOR.
30019         * icall.c: modified get_location according to the above changes.
30021         * object.c: init AppDomain.SetupInformation for the default domain after
30022         we have the entry assembly.
30024         * domain.c: when unloading a domain, setup = NULL.
30026 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
30028         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
30030 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
30032         * object.h, object.c: introduced mono_object_get_virtual_method ()
30033         to lookup the method invoked on an object when a callvirt is done on
30034         a method.
30035         * icall.c: make MethodInfo::Invoke() always do a virtual call.
30037 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30039         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
30040         current domain when loaded an assembly and failed to load it.
30042         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
30044 2002-10-31  Dick Porter  <dick@ximian.com>
30046         * icall.c: 
30047         * file-io.h: 
30048         * file-io.c: Return the error status in a parameter, as the
30049         GetLastError() value has long since been blown away if we try and
30050         look it up in a subsequent internal call invocation.  Delete the
30051         GetLastError() internal call, because it's useless.
30053 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
30055         * class.[ch]: added cast_class to fix bug 29517
30057 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
30059         * marshal.c: create valid IL code in the filter clause:
30060         the new JIT is less forgiving:-)
30062 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30064         * icall.c: removed get_property internal call.
30066 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
30068         * appdomain.h domain.c: Added an ID to appdomains.
30069         
30070         * threads.c threads.h icall.c: Implement icall
30071         Thread:GetDomainID(), and remove unused icall 
30072         CurrentThreadDomain_internal.
30074 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30076         * icall.c: Don't recurse through the base types in GetConstructor.
30077         Fixes bug #32063. 
30079 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
30081         * mempool.h, mempool.c: added mono_mempool_empty() and
30082         mono_mempool_stats().
30084 2002-10-23  Dick Porter  <dick@ximian.com>
30086         * file-io.c: 
30087         * file-io.h: 
30088         * icall.c: Added MonoIO.GetFileType internal call
30090 2002-10-17  Dick Porter  <dick@ximian.com>
30092         * appdomain.c (mono_runtime_cleanup): Don't signal the async
30093         delegate semaphore before waiting for all threads to finish,
30094         because new threads can also call async delegates.  Fixes bug
30095         32004.
30097         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
30098         of 3 seconds, in case another async job is queued.  (This part is
30099         needed because the bug fix reintroduced the 3s exit lag.)  This
30100         makes the mono_runtime_shutdown flag superfluous.
30102 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
30104         * reflection.c: include ehader size in method section headers.
30105         Really check for suplicated modules entries.
30107 2002-10-17  Martin Baulig  <martin@gnome.org>
30109         * debug-mono-symfile.c: Added back support for locals.
30111 2002-10-14  Martin Baulig  <martin@gnome.org>
30113         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
30114         MONO_TYPE_VOID.
30116 2002-10-14  Martin Baulig  <martin@gnome.org>
30118         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
30119         mono_class_get() instead of looking in the class cache. 
30121 2002-10-13  Martin Baulig  <martin@gnome.org>
30123         * debug-mono-symfile.c: Set version number to 28, include the
30124         signature in method names.
30126 2002-10-13  Martin Baulig  <martin@gnome.org>
30128         * debug-mono-symfile.h: Set version number to 27.
30130 2002-10-11  Martin Baulig  <martin@gnome.org>
30132         * gc.c: Don't register/unregister NULL pointers as disappearing links.
30134 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30136         * metadata.c, metadata.h: added helper function to allocate signatures.
30138 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30140         * icall.c: added internal call to get the location of machine.config.
30142 2002-10-08  Martin Baulig  <martin@gnome.org>
30144         * debug-mono-symfile.c: Ignore classes with a pending init for the
30145         moment.
30147 2002-10-03  Dick Porter  <dick@ximian.com>
30149         * threads.c: Freebsd pthread_t is a pointer
30151 2002-10-03  Dick Porter  <dick@ximian.com>
30153         * socket-io.c: Implemented GetHostName_internal
30155 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30157         * mono-config.c:
30158         (mono_config_parse_file): don't leak the text.
30160 2002-10-02  Martin Baulig  <martin@gnome.org>
30162         * debug-mono-symfile.c: Added support for methods.
30164 2002-10-01  Martin Baulig  <martin@gnome.org>
30166         * debug-mono-symfile.c: Don't emit methods and line numbers for
30167         the dynamic symbol file, just write the type table.  We can easily
30168         have an external helper program which creates a symbol file for an
30169         IL file.        
30171 2002-10-01  Dick Porter  <dick@ximian.com>
30173         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
30174         Only add the handle to the cleanup array when we're about to
30175         launch the thread.  Bug 31425 deadlocked when the test was run on
30176         mono under w32.
30178 2002-10-01  Martin Baulig  <martin@gnome.org>
30180         * debug-mono-symfile.c: Added support for properties.
30182 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30184         * reflection.c: unaligned store fix from Mark Crichton
30185         <crichton@gimp.org>.
30187 2002-09-27  Martin Baulig  <martin@gnome.org>
30189         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
30190         New interncall.
30192 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
30194         * assembly.h, assembly.c: use a sane API to hook into the assembly
30195         loading process instead of a useless special-purpouse hack
30196         (ngen needs a hook, too, for example).
30198 2002-09-27  Dick Porter  <dick@ximian.com>
30200         * threads.c (mono_thread_init): Call GetCurrentProcess() so
30201         io-layer can set up some process handle info.  Not needed on w32,
30202         but doesn't hurt either.
30204         * process.c: Pass the program name in the second parameter to
30205         CreateProcess, so the path is searched.  Include the working
30206         directory. Implemented process name, process enumeration, and some
30207         process detail internal calls.
30208         
30209         * icall.c: Added internal calls for process lookup, and some
30210         process details
30212 2002-09-26  Martin Baulig  <martin@gnome.org>
30214         * assembly.c (mono_install_open_assembly_hook): New global
30215         function to install a function to be invoked each time a new
30216         assembly is loaded.
30217         (mono_assembly_open): Run this callback function if set.
30219         * debug-mono-symfile.c: Put back line numbers for the dynamic
30220         symbol file and also record the .il file as source file.  This
30221         allows us to install the temporary symbol file as `file.dbg' just
30222         like a compiler-generated one.
30224 2002-09-26  Nick Zigarovich <nick@chemlab.org>
30226         * Corrected typo in gc.c (BOHEM vs BOEHM).
30228 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30230         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
30231         GetProperties. Also avoid calling g_slist_length in GetProperties and
30232         GetMethods.
30234 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30236         * reflection.c: avoid unaligned stores (bug spotted by
30237         Mark Crichton  <crichton@gimp.org>).
30239 2002-09-25  Martin Baulig  <martin@gnome.org>
30241         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
30242         instead of guint64 for addresses and added prologue/epilogue info.
30244 2002-09-25  Martin Baulig  <martin@gnome.org>
30246         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
30247         store line number info.  For the dynamic symbol file, we only need
30248         to provide the JIT generated dynamic line number info for the dynamic
30249         symbol file.
30251 2002-09-25  Martin Baulig  <martin@gnome.org>
30253         * debug-mono-symfile.h: Incremented version number.
30255 2002-09-24  Martin Baulig  <martin@gnome.org>
30257         * class.c (mono_debugger_class_init_func): New global function
30258         pointer variable.
30259         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
30260         call it.
30262         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
30263         function.  This is called via the mono_debugger_class_init_func
30264         hook to add all types to the dynamic type table.
30265         (ves_icall_MonoDebugger_GetType): New interncall to get a class
30266         from its metadata token.
30268         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
30269         New interncall for the debugger.
30271 2002-09-24  Nick Drochak <ndrochak@gol.com>
30273         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
30274         before using it in case it is null.
30275         
30276 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30278         * metadata.c: allow custom modifiers in local var signatures
30279         (bug spotted by Zoltan Varga).
30281 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
30283         * class.c: deal with the <Module> class that may have a NULL vtable.
30284         Eliminate warnings.
30286 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30288         * image.c, image.h: more strong name helpers.
30289         * monosn.c: more work: convert pem keys to cryptoapi format.
30291 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30293         * string-icalls.c: speedup IndexOf.
30295 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30297         * icall.c: updates from Zoltan.2.Varga@nokia.com.
30299 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30301         * icall.c: cleanup: use mono_object_domain ().
30303 2002-09-23  Martin Baulig  <martin@gnome.org>
30305         * debug-mono-symfile.c: Improved type support.
30307 2002-09-22  Martin Baulig  <martin@gnome.org>
30309         * debug-mono-symfile.c: Added support for reference types and strings.
30311 2002-09-22  Martin Baulig  <martin@gnome.org>
30313         * debug-mono-symfile.c: Started to work on the type table.
30315 2002-09-21  Martin Baulig  <martin@gnome.org>
30317         * debug-mono-symfile.c: Largely reworked the symbol table format.
30318         The symbol table is now incrementally updated each time a new
30319         method is added.  We're now also using our own magic and version
30320         so that you don't need to recompile all your classes if the
30321         dynamic table changes.
30322         (mono_debug_update_mono_symbol_file): Removed.
30323         (mono_debug_symfile_add_method): New function to add a method.
30325 2002-09-21  Martin Baulig  <martin@gnome.org>
30327         * icall.c
30328         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
30329         New interncall.
30331         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
30332         New interncall to get a method from its metadata token.
30334 2002-09-21  Martin Baulig  <martin@gnome.org>
30336         * debug-mono-symfile.c: Create type table.
30338 2002-09-20  Martin Baulig  <martin@gnome.org>
30340         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
30342 2002-09-20  Martin Baulig  <martin@gnome.org>
30344         * debug-mono-symfile.c: Provide information about params and locals.
30346 2002-09-20  Martin Baulig  <martin@gnome.org>
30348         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
30349         New interncall.
30351         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
30352         interncall to get a method from its metadata token.
30354 2002-09-20  Martin Baulig  <martin@gnome.org>
30356         * debug-mono-symfile.c: Added a few checks for method->header
30357         being non-NULL.  This should never happen, but for the moment
30358         let's use a g_warning() rather than a g_assert().
30360 2002-09-19  Mark Crichton  <crichton@gimp.org>
30362         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
30363         even if support for it isn't present.  Added an #ifdef to fix this.
30365         * socket-io.c: Added checks back for Solaris support.
30367 2002-09-19  Martin Baulig  <martin@gnome.org>
30369         * debug-mono-symfile.c (read_string, write_string): Reflect latest
30370         changes in the symbol file format.
30372 2002-09-18  Martin Baulig  <martin@gnome.org>
30374         * debug-mono-symfile.c: Set version number to 21.
30376 2002-09-18  Dick Porter  <dick@ximian.com>
30378         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
30379         on netbsd.  Fixes bug 30051.
30381 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30383         * reflection.c:
30384         (set_version_from_string): little fix.
30386 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30388         * monosn.c, Makefile.am: added strong name utility.
30389         * reflection.h, reflection.c: implemented delayed signing,
30390         locale, version and hash id assembly attributes.
30392 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30394         * loader.c, metadata.c: load param attributes in signatures.
30396 2002-09-16  Martin Baulig  <martin@gnome.org>
30398         * debug-mono-symfile.c: Added string table with all method names.
30400 2002-09-14  Martin Baulig  <martin@gnome.org>
30402         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
30403         fast method lookup.
30405 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30407         * reflection.c: record the public key token of referenced assemblies.
30409 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30411         * image.c, image.h: added functions to get the strong name and the
30412         public key of an assembly.
30413         * pedump.c: use them.
30415 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
30417         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
30419 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
30421         * marshal.c (mono_marshal_get_managed_wrapper): Added
30422         MONO_TYPE_BOOLEAN 
30424 2002-09-11  Martin Baulig  <martin@gnome.org>
30426         * gc.c: Call GC_unregister_disappearing_link() on all links when
30427         finalizing them, this is necessary to aviod a crash in boehm's
30428         finalize handler.
30430 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30432         * gc.c: handle GetTarget for finalized objects spotted and fixed by
30433         nick@chemlab.org.
30435 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
30437         * icall.c: implemented MonoType::Module.
30438         * reflection.c, reflection.h: mono_module_get_object () from
30439         Tomi Pakarinen <tomi.pakarinen@welho.com>.
30441 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
30443         * icall.c: ignore overridden methods in GetMethods ().
30444         Fix for FieldInfo::SetValue().
30445         * object.c: handle float/double in runtime invoke.
30447 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
30449         * object.c: allow a constructor to be called again on an object.
30451 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30453         * class.h, class.c: move field layout code to it's own function and
30454         export it. Get an interface id earlier. Move fields in MonoClass
30455         so they are more cache friendly and align the bitfields.
30456         * loader.c: temporary handle get_param_names() for a runtime method.
30457         * reflection.c, reflection.h: more code to handle runtime creation of
30458         types.
30460 2002-09-09  Martin Baulig  <martin@gnome.org>
30462         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
30463         signature with the pinvoke field being set for the actual call.
30465 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
30467         * icall.c: removed some unused icalls. Start of map of glib charsets
30468         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
30470 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
30472         * debug-helpers.c: break infinite loop (found and fixed by
30473         Holger Arnold <harnold@gmx.de>).
30475 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30477         * icall.c: target may be null in create_delegate.
30479 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30481         * marshal.c: handle a boolean return type.
30483 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30485         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
30487 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30489         * gc.c: fix weakreferences.
30491 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
30493         * icall.c: added icall to get default codepage.
30495 2002-09-03  Dick Porter  <dick@ximian.com>
30497         * threads.h: 
30498         * threads.c: Use MonoThread instead of MonoObject where
30499         apropriate.
30501         Store running thread objects in a hash table, so that we have all
30502         the info to hand when waiting for them to finish
30503         (means we don't need OpenThread() any more, so mingw builds should
30504         be fully functional again.)
30506         * verify.c:
30507         * object.h: Added thread ID to MonoThread
30509 2002-09-03  Martin Baulig  <martin@gnome.org>
30511         * icall.c (System.Reflection.Assembly::get_location): New interncall.
30513 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30515         * icall.c: fixed leak in get_temp_path. Thanks lupus.
30517 2002-09-03  Martin Baulig  <martin@gnome.org>
30519         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
30520         argument to store the end address of the disassembled instruction.
30522         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
30523         here from debug-symfile.h.
30524         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
30525         JIT into this struct.
30526         (MonoSymbolFile): Added `char *image_file' field.
30527         (MonoDebugGetMethodFunc): Removed.
30528         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
30529         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
30530         (mono_debug_find_method): New method.
30532         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
30533         create a full symbol file.
30534         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
30535         and static symbol files.
30536         (mono_debug_find_method): The symbol file keeps an internal method hash,
30537         call this to get a MonoDebugMethodInfo from a MonoMethod.
30539         * debug-symfile.[ch]: Removed.
30541 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
30543         * image.c (do_mono_image_open): Remove linker version check.
30545 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
30547         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
30548         wrappers for instance methods.
30549         
30550 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30552         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
30554 2002-08-28  Dick Porter  <dick@ximian.com>
30556         * Makefile.am: Export HOST_CC for w32 builds
30558 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30560         * file-io.c process.c: MonoString are null terminated, no
30561         need for mono_string_to_utf16() anymore.
30563 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30565         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
30567 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
30569         * icall.c, reflection.h: speedup System.MonoType.
30571 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30573         * reflection.c: allow null as the value of a string argument in
30574         custom attributes constructors.
30576 2002-08-27  Martin Baulig  <martin@gnome.org>
30578         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
30579         `trampoline_address' field.
30581 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
30583         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
30584         check (fixes bug #29486) 
30586 2002-08-27  Martin Baulig  <martin@gnome.org>
30588         * debug-mono-symfile.c: Changed the file format in a way that allows us
30589         open it read-only and to use a specially malloced area for all the
30590         dynamic data.  We can now also generate a symbol file on-the-fly if we're
30591         debugging IL code and there is no MCS generated symbol file for it.
30593 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
30595         * object.c: added a define for a good string and array
30596         creation speedup (not enabled by default because we need to deal with
30597         the synch stuff).
30599 2002-08-26  Martin Baulig  <martin@gnome.org>
30601         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
30602         function to create a dynamic symbol file.  This is used by the
30603         debugger to create a symbol file for IL code on-the-fly.
30605 2002-08-26  Martin Baulig  <martin@gnome.org>
30607         * loader.c (mono_lookup_pinvoke_call): Include the error message
30608         from g_module_error() in the error message.
30610 2002-08-24  Martin Baulig  <martin@gnome.org>
30612         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
30613         function to update the symbol file.  The symbol file is mmap()ed
30614         writable, but private.  This allows us to install the symbol file
30615         together with the assembly.
30617 2002-08-24  Martin Baulig  <martin@gnome.org>
30619         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
30620         but they can read the new symbol file format which mcs is now creating.
30622         * debug-symfile.c (mono_debug_find_source_location): Moved to
30623         debug-mono-symfile.c; this is now operating on the new symbol file.
30625 2002-08-23  Martin Baulig  <martin@gnome.org>
30627         * debug-helpers.c (mono_method_desc_from_method): New function to get
30628         a MonoMethodDesc from a MonoMethod.
30630 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30632         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
30633         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
30635 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
30637         * string-icalls.[ch]: make helper methods static.
30639 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30641         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
30642         types to it and to SetValueInternal.
30644         * object.c: Moved handle_enum label to its proper place. This was the
30645         f... bug! ;-)
30647         This time i compiled mcs and gtk-sharp and they both work.
30649 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30651         * icall.c: reverted partially my previous patch until 
30652         object.c:set_value handles enums correcly.
30654 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30656         * icall.c:
30657         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
30658         (ves_icall_System_Environment_get_MachineName): removed warning when
30659         compiling under cygwin.
30661 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
30663         * object.c: fixed field_get_value() for reference types.
30665 2002-08-22  Dick Porter  <dick@ximian.com>
30667         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
30668         Don't free a buffer while it's still needed.  Patch from Jonathan
30669         Liger <Jonathan.liger@wanadoo.fr>
30671 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
30673         * icall.c (ves_icall_System_Environment_get_Platform): Add new
30674         internal call.
30676 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
30678         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
30679         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
30681         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
30682         we call unmanaged code which throws exceptions.
30684 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30686         * appdomain.h: added per-domain entry_assembly.
30687         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
30688         arguments.
30689         * icall.c: Assembly::GetEntryAssembly icall.
30690         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
30691         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
30693 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30695         * appdomain.h, gc.c: added mono_domain_finalize ().
30697 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30699         * object.c:
30700         (mono_print_unhandled_exception): changed g_warning by g_printerr
30701         because g_log has a 1024 characters limit (yeah, i got a big stack
30702         trace). Don't print exception name, that should be in ToString 
30703         returned string.
30705 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30707         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
30708         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
30710 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30712         * object.c:
30713         (mono_print_unhandled_exception): after previous commit, i realized
30714         that MS calls ToString on the exception. I changed this function to
30715         do that. This way we get stack_trace for free.
30717 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30719         * object.c:
30720         (mono_print_unhandled_exception): invoke Message property instead of
30721         getting 'message' field from Exception. Don't allocate memory for
30722         'trace' and 'message' if not needed.
30724 2002-08-18  Dick Porter  <dick@ximian.com>
30726         * unicode.c: Fix asserts to match Encoder.cs checks
30728 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30730         * marshal.c: fix unaligned store issue and a few wrong
30731         opcode argument types.
30733 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30735         * icall.c: added GetUninitializedObjectInternal internal call.
30737 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
30739         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
30740         to the right domain.
30742 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
30744         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
30746         * class.c (class_compute_field_layout): set blittable to false for Strings
30748         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
30750 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30752         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
30753         first chunk of code to create types at runtime. Code to
30754         handle ReflectedType/DeclaringType. Make reflection handles
30755         domain specific.
30757 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
30759         * class.c: set correct name in arrays.
30761 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
30763         * appdomain.c (mono_domain_transfer_object): make it work with
30764         valuetypes. bug fixes.
30766 2002-08-12  Dick Porter  <dick@ximian.com>
30768         * object.h: Rename some parameters to avoid c++ keywords (Patch
30769         from Joseph Wenninger <kde@jowenn.at>)
30771 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
30773         * icall.c: added icall to implement Assembly.GetFile*.
30775 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30777         * reflection.h, reflection.c: code to embed managed resources.
30779 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
30781         * class.c: move all the type size stuff into
30782         class_compute_field_layout().
30784 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30786         * class.c: ensure enums have always the correct instance size.
30787         * unicode.c: remove wrong assert.
30789 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
30791         * assembly.c: fix mem corruption issue.
30792         * image.h, image.c: added mono_image_get_resource () to access
30793         managed resources.
30794         * icall.c: implemented Assembly.EntryPoint property and some
30795         Managed Resources related internalcalls.
30798 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30800         * image.c, image.h: impemented mono_image_get_entry_point ().
30801         * appdomain.c: use mono_image_get_entry_point.
30803 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30805         * reflection.c: support the object type argument when loading
30806         custom attributes.
30808 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
30810         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
30811         String as return type.
30813 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
30815         * reflection.c: fix encoding of named args for custom attrs to match
30816         the ms implementation. Read them back when instantiating custom
30817         attributes.
30819 2002-08-02  Radek Doulik  <rodo@ximian.com>
30821         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
30822         by Dietmar as quick fix
30823         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
30824         16 as stack size, used on more places as quick fix before Dietmar
30825         will fix it properly
30827 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30829         * object.h, object.c: added accessors for fields and properties.
30831 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30833         * class.c, class.h: made mono_class_get_field_from_name ()
30834         loop on parent types.
30835         Added mono_class_get_property_from_name ().
30837 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
30839         * class.c, class.h: move the code to setup the type vtable in its own
30840         function so that it can be reused also for types created at runtime.
30841         Eliminate the "class" identifier from the header file.
30842         * reflection.c: setup the vtable for enums so that we can create
30843         objects for use in SetConstant ().
30845 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
30847         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
30848         instead of the delegate itself as this pointer (bug #28383)
30850 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
30852         * marshal.c (mono_marshal_get_managed_wrapper): added return type
30853         conversions.
30855 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30857         * loader.c: don't set the pinvoke bit on icalls.
30859 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
30861         * debug-helpers.c (mono_method_full_name): only print a number to
30862         indicate wrapper type (so that the output is more readable in traces).
30864 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
30866         * class.c (mono_class_init): include method override patch from Paolo
30868 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
30870         * icall.c: fixed GetTypeCode().
30872 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
30874         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
30875         use real delegate invoke function to make it work with multicast
30876         delegates (fix bug# 28291).
30878 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
30880         * object.c: load constant strings.
30882 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
30884         * reflection.c: no magic numbers.
30885         * tabledefs.h: security action enum.
30887 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
30889         * assembly.c: fix possible memory corruption.
30891 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30893         * reflection.h, reflection.c: added support for linking resources.
30894         * verify.c: check we have an updated corlib.
30896 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
30898         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
30899         string arrays.
30900         (mono_marshal_string_array): null terminate unmanaged string arrays.
30901         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
30903 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
30905         * icall.c: Type.GetType () can now return also types from the
30906         calling assembly.
30908 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
30910         * loader.h, loader.c: stack walking support.
30911         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
30912         GetCallingAssembly.
30914 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
30916         * marshal.c: added optimisations for blittable types 
30918         * class.c (mono_array_class_get): do not set blittable attribute on arrays
30919         (mono_class_setup_mono_type): set blittable attribute for single
30920         and double.
30922         * marshal.c (mono_string_utf8_to_builder): impl.
30923         (mono_string_builder_to_utf8): impl.
30924         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
30926 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
30928         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
30929         (mono_marshal_get_managed_wrapper): impl. byref types
30931 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30933         * icall.c:
30934         (search_method): don't display debug message. 
30936 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
30938         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
30940 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
30942         * appdomain.c: set the missing filename when throwing exception.
30944 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
30946         * metadata.c (mono_type_size): code cleanup
30947         (mono_type_stack_size): removed some test code
30949 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
30951         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
30952         mono_get_exception_file_not_found now.
30954         * exception.c (mono_exception_from_name_two_strings): New version
30955         that will call a constructor with two string arguments. 
30956         (mono_get_exception_file_not_found): New helper routine, used to
30957         report file-not-found errors.
30959 2002-07-20  Dick Porter  <dick@ximian.com>
30961         * process.h:
30962         * process.c: Pass file handles to CreateProcess
30963         
30964         * icall.c:
30965         * file-io.h:
30966         * file-io.c: Implemented CreatePipe
30968 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
30970         * metadata.c (mono_get_param_info): set alignment for value types
30972 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30974         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
30975         Constify mono_domain_assembly_open().
30976         * loader.c: handle null namespace in icalls.
30978 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
30980         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
30981         (emit_str_to_ptr_conv): marshal object as structs
30983         * metadata.c (mono_type_to_unmanaged): marshal object as structs
30985         * marshal.c (mono_marshal_get_runtime_invoke): support value types
30987 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
30989         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
30990         (mono_marshal_get_native_wrapper): we an now return value types
30992 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30994         * verify.c: more checks implemented.
30996 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
30998         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
30999         (fix bug #27695)
31000         (mono_marshal_get_native_wrapper): allow byref arguments
31001         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
31002         impl. PtrToStringXXX methods
31003         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
31004         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
31005         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
31006         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
31007         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
31009 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31011         * reflection.c: fix buglet in parsing an assembly name.
31013 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
31015         * marshal.c (emit_ptr_to_str_conv): first impl.
31017 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31019         * object.c, class.h: cache the vtable in the class as suggested by
31020         vargaz@freemail.hu (Zoltan Varga).
31022 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31024         * class.h, loader.c: added mono_field_from_token().
31025         * verify.c: first cut of type checking code.
31027 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
31029         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
31031 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
31033         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
31034         (fix bug #27782)
31035         (mono_marshal_get_remoting_invoke): impl.
31036         (mono_delegate_begin_invoke): impl.
31037         (mono_mb_emit_save_args): impl.
31038         (mono_delegate_end_invoke): impl.
31039         (mono_marshal_get_delegate_begin_invoke):
31040         (mono_marshal_get_delegate_end_invoke):
31041         (mono_marshal_get_delegate_invoke): generate a special name for
31042         those methods (including the signature) and associate them whith
31043         the delegate class. 
31045 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
31047         * reflection.[ch]: 
31048         (mono_reflection_type_from_name): now it has a MonoImage parameter
31049         which is used as the default image to search the type in. If the image
31050         is NULL or getting the type from it fails, it defaults to corlib.
31052         * icall.c: changed 1 call to mono_reflection_type_from_name to match
31053         new parameter.
31055 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31057         * reflection.c: update the parameter table index.
31059 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31061         * domain.c: don't include the mark byte in the string hash.
31063 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31065         * icall.cs: icall for Type.GetTypeCode ().
31066         * verify: a couple of fixes and disabled local initialization checks.
31068 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
31070         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
31072         * debug-helpers.c (mono_method_full_name): print the type of the
31073         runtime wrapper
31075         * metadata.c (mono_signature_hash): a hash function for signatures
31076         (mono_signature_hash): better hash algorithm
31078         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
31080         * debug-helpers.c (mono_method_full_name): this can now generate
31081         method names with signatures
31083         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
31084         method dont have this pointers.
31086 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31088         * reflection.c: fixup typebuilder tokens.
31089         * image.c: fix buglet.
31090         * marshal.h: remove whitespace.
31091         * metadata.h, metadata.c: reinstate code that was removed.
31092         * verify.c: handle catch directives and fix another couple of bugs.
31094 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
31096         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
31097         (mono_marshal_get_native_wrapper): make it comp. with the old code
31098         (mono_marshal_get_native_wrapper): support boolean
31099         (mono_marshal_get_managed_wrapper): support more types
31101 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
31103         * class.c (class_compute_field_layout): compute class->blittable attribute.
31105 2002-07-09  Dick Porter  <dick@ximian.com>
31107         * threads.c: Make the thread cleaning up cope with threads that
31108         call ExitThread()
31110 2002-07-08  Radek Doulik  <rodo@ximian.com>
31112         * reflection.c (method_encode_code): use non-translated values to
31113         compute finally_start, this fixes exception handling on ppc, yay!
31115         * decimal.h (struct signscale): fix endianess
31117 2002-07-07  Radek Doulik  <rodo@ximian.com>
31119         * reflection.c: swap box_val and not val
31121 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31123         * reflection.c, reflection.h: handle full assembly info in type name.
31124         Handle Type arguments when loading custom attributes.
31125         * icall.c: updated to use new mono_reflection_type_from_name () method.
31127 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31129         * loader.c:
31130         (method_from_memberref): also print assembly name when method not found.
31132 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31134         * icall.c:
31135         (ves_icall_TypeGetProperties): fixed bug #27473. 
31137 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31139         * reflection.c: display image name and token when cannot find the
31140         .ctor for an attribute.
31142 2002-07-05  Martin Baulig  <martin@gnome.org>
31144         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31146 2002-07-04  Dick Porter  <dick@ximian.com>
31148         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
31149         compile on mingw.  This will cause mingw builds to not wait for
31150         subthreads to terminate after the main thread does.  I've lodged a
31151         bug with the mingw developers for them to wrap OpenThread().
31153 2002-07-03  Dick Porter  <dick@ximian.com>
31155         * threads.c: Store thread IDs instead of handles, because
31156         GetCurrentThread() returns a pseudohandle and therefore stores
31157         useless values.  mono_thread_cleanup() continues checking the
31158         array of threads until it is empty, to cope with subthreads
31159         spawning new threads after the main thread has finished.
31161         * profiler.h:
31162         * profiler.c:
31163         * profiler-private.h: Pass the thread ID to thread profiler
31164         functions, instead of a handle
31166 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31168         * verify.c: fixes to make it more usable.
31169         * pedump.c: added --verify code to verify IL code in an assembly.
31171 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31173         * reflection.c: turn errors into warnings to allow compiling corlib.
31175 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
31177         * reflection.c: add special cases to compile corlib.
31179 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31181         * reflection.c: handle properties with only a set method.
31183 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31185         * opcodes.h: add enum with opcodes in opval order.
31187 2002-07-01  Dick Porter  <dick@ximian.com>
31188         
31189         * object.h:
31190         * object.c (mono_runtime_run_main): Removed unneeded argument
31192 2002-06-28  Martin Baulig  <martin@gnome.org>
31194         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
31196 2002-06-27  Dick Porter  <dick@ximian.com>
31198         * threads.c: Store the handle in both the parent thread and in the
31199         subthread, to minimise the time between starting a new thread and
31200         storing its ID.
31202 2002-06-26  Dick Porter  <dick@ximian.com>
31204         * appdomain.c (mono_runtime_cleanup): Close the socket library
31205         after all the threads have finished, not before
31207 2002-06-26  Martin Baulig  <martin@gnome.org>
31209         * debug-symfile.c (mono_debug_find_source_location): Added
31210         `guint32 *line_number' argument.  If it's not NULL, store the line number
31211         there and return the file name without the line number.
31213 2002-06-25  Dick Porter  <dick@ximian.com>
31215         * icall.c:
31216         * process.h:
31217         * process.c: Process forking and other support functions
31219 2002-06-25  Dick Porter  <dick@ximian.com>
31221         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
31222         things dont happen when the image is closed.
31223         (mono_image_lookup_resource): Walk the resource section looking
31224         for a particular entry
31226         * cil-coff.h: PE resource section decoding
31228 2002-06-25  Dick Porter  <dick@ximian.com>
31229         
31230         * assembly.h:
31231         * assembly.c: 
31232         (mono_assembly_foreach): Accessor functions to walk the list of
31233         loaded assemblies
31234         (mono_assembly_set_main):
31235         (mono_assembly_get_main): Process methods need to know which
31236         assembly is the "main" one
31238         * object.c (mono_runtime_run_main): Record the main assembly
31240         * debug-helpers.c: Fix typo
31242 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
31244         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
31245         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
31247 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31249         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
31251 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
31253         * image.c (do_mono_image_open): Initialize reference count,
31254         otherwise we leak the MonoImage.
31256 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31258         * reflection.c: small tweak to handle self-hosting.
31260 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
31262         * reflection.c: fix type name parse code.
31264 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31266         * reflection.c: break out of the loop.
31267         * image.c: special case corlib.
31269 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31271         * reflection.c: add all the custom attrs at the end to ensure the
31272         ctors have been properly initialized when the attributes are defined
31273         in the current assembly.
31275 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31277         * reflection.c: handle correctly multiple-nested types.
31279 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
31281         * row-indexes.h: fix typos.
31282         * reflection.c: adjust for typos and fix method_def_or_ref
31283         encoding in MethodImpl table.
31285 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31287         * reflection.c: fix entry point patching (thanks Serge!).
31289 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
31291         * verify.c: add check for System.Exception
31293 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
31295         * image.c, class.c: minifix for code just c&p'ed.
31296         * reflection.c: warning fix.
31297         * object.h, loader.h, domain.c: load also StringBuilder.
31299 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
31301         * marshal.h, marshal.c: some support code to handle complex marshaling.
31303 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31305         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
31306         Better signatures with vtable error dump.
31308 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
31310         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
31312 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
31314         * icall.c (ves_icall_Type_GetField): impl.
31316 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31318         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
31319         to retrieve a marshal description blob for a field or param.
31321 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
31323         * reflection.h, reflection.c: change order of nested type emission
31324         to avoid table corruption. The NestedTypes table is sorted.
31325         * icall.c: change order of GetConstructor results to workaround mcs bug.
31327 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31329         * reflection.h, reflection.c: handle field and param marshal
31330         information.
31332 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31334         * icall.c, marshal.c marshal.h: more Marshal class implementation.
31336 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31338         * reflection.c: fix call convention.
31340 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31342         * reflection.h, reflection.c: mono_image_get_memberref_token()
31343         takes a type instead of a class, now. Added
31344         mono_image_get_array_token() to create tokens for the special
31345         multi-dim array methods.
31347 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31349         * assembly.c: handle modules (no assembly table). Split
31350         loading references in its own function.
31351         * class.c: handle moduleref resolution scope.
31352         * image.c, image.h: cache module name in image.
31354 2002-06-07  Martin Baulig  <martin@gnome.org>
31356         * reflection.c (mono_image_get_type_info): Only add a class layout entry
31357         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
31359 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31361         * icall.c: more signature fixes that used uint instead of int.
31363 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31365         * reflection.c: fixed signature of field refs.
31367 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31369         * class.c, reflection.c: handle typerefs of nested types
31370         (both on read and when writing files).
31372 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31374         * icall.c: fix method signatures that tried to workaround the previous
31375         typo, d'oh!
31377 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31379         * debug-helpers.c: fix typo.
31381 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31383         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
31384         rewrote the PE/COFF writing code (our programs are understood by the
31385         ms runtime, now).
31387 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31389         * gc.c, gc.h, icall.c: weakreference support.
31391 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31393         * Makefile.am, mono-config.c: use $(sysconfdir).
31395 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31397         * icall.c: changed default precision of Double.ToString() to 15.
31398         Fixed memory leak. Unified with Single.ToString.
31400 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31402         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
31404 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31406         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
31407         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
31408         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
31409         and myself.
31411 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31413         * debug-symfile.c, sysmath.c: yet more compilation fixes.
31415 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31417         * reflection.c, socket-io.c: more compilation fixes.
31419 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31421         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
31422         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
31423         unicode.c: warning and compiler compatibility fixes.
31425 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31427         * class.h, metadata.c: fixed warnings/compilation errors.
31429 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31431         * Makefile.am, mono-config.c, mono-config.h: configuration file
31432         support routines.
31433         * loader.c, loader.h: make Dll mapping configurable at runtime in the
31434         config file. Export methods to insert and lookup mappings.
31436 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
31438         * reflection.c: handle types and boxed objects in custom attr
31439         constructors.
31441 2002-05-30  Martin Baulig  <martin@gnome.org>
31443         * debug-symfile.c
31444         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
31446 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
31448         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
31449         to lookup the implmap row for a P/Invoke method.
31450         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
31451         P/Invoke method from the runtime on an as needed basis.
31453 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
31455         * metadata.c (mono_metadata_parse_signature): impl.
31457 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31459         * class.c: handle .pack directive.
31461 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31463         * object.c: initialize static fields with RVA data.
31465 2002-05-25  Martin Baulig  <martin@gnome.org>
31467         * debug-symfile.c
31468         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
31470 2002-05-24  Martin Baulig  <martin@gnome.org>
31472         * debug-symfile.c
31473         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
31474         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
31475         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
31477 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31479         * object.c: special case string ctros in invoke.
31480         * gc.c: silly whitespace changes.
31482 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
31484         * threadpool.[ch]: impl. a threadpool that can
31485         be used by mint and mono.
31487 2002-05-22  Martin Baulig  <martin@gnome.org>
31489         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
31490         The first argument is now a `MonoReflectionModuleBuilder *', the return
31491         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
31492         `methods' field to get the method builder.  The `token' argument is the
31493         unfixed token.
31495         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
31496         invalid characters instead of g_assert_not_reached()ing.  This seems
31497         to be the behaviour of mscorlib.
31499 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
31501         * object.c (mono_runtime_invoke_array): applied patch from Rachel
31502         Hestilow to fix bug #25104
31504 2002-05-21  Martin Baulig  <martin@gnome.org>
31506         * debug-symfile.c (mono_debug_find_source_location): New function.
31507         Looks up an IL offset in the line number table and returns the source
31508         location as a string.
31510 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31512         * icall.c:
31513         (mono_double_ToStringImpl): changed %f by %g until we have something
31514         better.
31516 2002-05-21  Nick Drochak  <ndrochak@gol.com>
31518         * icall.c : Use different name for Math.Pow's icall.  Needed to check
31519         parameters first in C#.
31521 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31523         * icall.c, reflection.h: added icall to get info about an event.
31525 2002-05-20  Radek Doulik  <rodo@ximian.com>
31527         * object.c (mono_value_box): don't use memcpy for boxing on BIG
31528         endian
31529         (mono_value_box): don't use memcpy for small sizes on
31530         architectures with unaligned access
31532 2002-05-20  Martin Baulig  <martin@gnome.org>
31534         * reflection.c (mono_reflection_setup_internal_class): Don't crash
31535         if `tb->parent == NULL'.
31536         (mono_reflection_create_internal_class): New function.  This is
31537         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
31538         for enum types.
31540         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
31541         New interncall.
31543 2002-05-19  Martin Baulig  <martin@gnome.org>
31545         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
31546         argument to get the length, don't default to the array length.
31548 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
31550         * assembly.c (mono_assembly_setrootdir): New function used to
31551         override the MONO_ASSEMBLIES directory.
31553 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31555         * icall.c: ValueType_GetHashCode() initialize local var.
31557 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31559         * reflection.c: sort custom attributes table.
31561 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31563         * reflection.c: support named args in custom attributes (write support).
31565 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31567         * reflection.c: fix finally position calculation.
31569 2002-05-15  Radek Doulik  <rodo@ximian.com>
31571         * reflection.c: fixed endianess at many places
31573         * icall.c (ves_icall_InitializeArray): comment out debug msg
31575 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
31577         * object.c (mono_unhandled_exception): new function to handle
31578         unhandled exceptions.
31579         (mono_unhandled_exception): call the UnhandledException event.
31580         (mono_runtime_delegate_invoke): impl.
31582 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
31584         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
31585         returns the RVA, not the direct pointer to the data. Handle the case
31586         when the class size is fixed.
31588 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31590         * reflection.c: fix some endianess issues.
31592 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
31594         * object.c (mono_runtime_invoke): is now able to catch exceptions.
31596         * threads.c (mono_thread_init): added a callback which is invoked
31597         at thread start.
31599 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
31600         
31601         * icall.c: make GetHashCode return non-negative values.
31603 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
31605         * object.c, icall.c, gc.c: revert to address-based hashcode.
31607 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
31609         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
31611 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31613         * icall.c, class.c: special case <Module>.
31615 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
31617         * icall.c: fix bug in GetNow().
31619 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
31621         * object.c (mono_runtime_class_init): make sure that we call all
31622         static class constructors.
31624 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31626         * reflection.c: sort methodsemantics table.
31628 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31630         * reflection.h, reflection.c: honour init locals setting.
31632 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
31634         * icall.c: copied Double ToStringImpl for Single ToStringImpl
31636 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31638         * reflection.c: support ContructorBuilders in attribute blob creation.
31640 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31642         * reflection.c: some changes to build a binary that can be run
31643         directly in windows.
31645 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
31647         * loader.c: print a big message when an icall can't be found.
31649 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31651         * string-icalls.c: fix bug 24248.
31653 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
31655         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
31656         icall.c, reflection.h: separate assembly loading by pathname and by
31657         assembly name. Use the MONO_PATH env var to search for assemblies.
31659 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31661         * assembly.c, image.h: add some support for assemblies
31662         with multiple modules.
31663         * class.c, class.h: export mono_class_from_typeref().
31664         * loader.c: remove duplicated code and use mono_class_from_typeref(),
31665         instead.
31667 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31669         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
31670         documentation says (the ECMA one is correct).
31672 2002-05-02  Dick Porter  <dick@ximian.com>
31674         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
31675         Don't name the synchronisation mutex.
31677 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
31679         * rand.c
31680         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
31681         Make the prototypes match.
31682         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
31683         Same.
31685         * icall.c
31686         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
31687         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
31688         all systems have tm.tm_zone, so use strftime() with %Z to print
31689         the timezone abreviation into a temp string.
31691         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
31692         rather than mono_array_addr() on a MonoString on Big Endian
31693         machines.
31695 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
31697         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
31698         fix bug 24041
31700 2002-04-30  Dick Porter  <dick@ximian.com>
31702         * socket-io.c: Cope with SOCKET being an integer rather than a
31703         pointer now.
31705         * threads.c: Added Thread_free_internal, to deal with thread
31706         handle cleanup.  Moved calls to handle_store() and handle_remove()
31707         to start_wrapper(), so each can only be called once.  Allocate
31708         synchronisation blocks with GC_malloc(), and use GC finalisation
31709         to close the handles.
31711         * icall.c: added System.Threading.Thread::Thread_free_internal
31713 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31715         * icall.c: support Environment.Exit, CommandLineArgs().
31717 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31719         * object.c, object.h: added mono_runtime_run_main () and
31720         mono_runtime_get_main_args () for use in System.Environment.
31722 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31724         * gc.c: fix thinko, enable actual finalization since the jit is now
31725         fixed.
31727 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31729         * gc.c, object.c: take into account that an object may be offset wrt the address
31730         returned by GC_malloc().
31732 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
31734         * image.c: handle files without entries in the assembly table (modules).
31736 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
31738         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
31739         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
31740         allowed to be null when it's System.Object class setup.
31742 2002-04-27  Martin Baulig  <martin@gnome.org>
31744         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
31745         if `tb->parent == NULL' rather than crashing.
31747 2002-04-28  Nick Drochak  <ndrochak@gol.com>
31749         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
31750         calling acos() where asin() should have been called.
31752 2002-04-26  Martin Baulig  <martin@gnome.org>
31754         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
31755         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
31756         there's a subdirectory called `System', but we don't want to read that
31757         subdirectory as an assembly.
31759 2002-04-25  Martin Baulig  <martin@gnome.org>
31761         * debug-symfile.c: Reflect latest MonoString changes.
31763 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31765         * rand.c, rand.h: instance method icalls need to have an explicit
31766         this pointer as first argument in the C implementation.
31768 2002-04-25  Nick Drochak <ndrochak@gol.com>
31770         * icall.c: Fix typo in map for GetNonZeroBytes
31772 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
31774         * string-icalls.c : String does now passes unit tests without any 
31775         errors, the following changes has been made:
31776         
31777         Implemented replace methods.
31778         Renaming of methods to (try) follow the standard.
31779         Fixed compare ordinal
31780         Made all memory allocated directly to function instead of via icall function.
31781         Small performance fix in is_in_array function
31782                         
31783  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
31785         c (mono_string_Internal_ctor_charp_int_int):
31786         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
31787         sindex < 0, throw ArgumentOutOfRangeException instead of
31788         ArgumentNullException.
31790         Added new check for length == 0, however
31791         I need to make it return String.Empty from the C code.
31792         
31793         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
31794         that calculate the length for us here.
31795         
31796         (mono_string_Internal_ctor_sbytep_int_int): Replaced
31797         mono_string_new_utf16 with mono_string_new, since value is utf8.
31799 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31801         * object.c: register the object for finalization if needed.
31802         Allocate one more char in the string for the terminating 0 char.
31804 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31806         * class.c, class.h, image.c: check if a type implemenst a destructor.
31807         Use the proper key for array class lookups.
31808         * icall.c: register the icalls in the System.GC class.
31809         * gc.c, gc.h: GC-related functions and icalls.
31811 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31813         * icall.c:
31814         * socket-io.c:
31815         * unicode.c: free some strings gotten from mono_string_to_utf8 and
31816         changed a couple of free () by g_free ().
31818         * decimal.c: one-liner in the comments for decimal2string ().
31820 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
31822         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
31824 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
31826         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
31827         * object.c (mono_runtime_invoke_array) : handle null in params
31829 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
31831         * string-icalls.c: fixed bug in split (one off bug)
31833 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
31835         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
31836         * icalls.c: added String::Equals as internal method
31838 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
31840         * threads.c: fixed bug in the double interlocked functions
31842 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
31844         * threads.c: implemented all of the new interlocked icalls.
31845         * string-icalls.c: fix a bug in insert.
31846         * icalls.c: added the icalls for interlocked, removed old string functions.
31847         
31848 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
31850         * loader.c: fix off-by-one error when reading argument names.
31852 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31854         * profiler.c: win32 counter implementation (untested).
31855         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
31856         (the latter needs testing and more complete impl. from win32 folks).
31858 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
31860         * object.c: mono_array_new_full workaround mono_array_class_get
31861         problem.
31863 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
31865         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
31866         * object.h (mono_string_chars): Changed casting type.
31868 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
31870         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
31871                            method signatures to use gunichar2 instead of gint16.
31873 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
31875         * object.h, object.c: domain-specific versions of mono_object_new and
31876         mono_array_new.
31878 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
31880         * object.c: changed String layout
31882         * string-icalls.c (mono_string_Internal_ctor_chara): added
31883         internal string constructors.
31885 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
31887         * threads.c: pass 'this' to the thread start routine.
31889 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31891         * string-icalls.c: fix IndexOf and LastIndexOf. Now
31892         InternalCompareStr don't call twice mono_string_cmp_char for the last
31893         character. Improved performance in mono_string_cmp_char.
31895 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31897         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
31898         code into its own library: libmonoruntime.
31900 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
31902         * object.h, object.c: changed array format so that szarrays do not
31903         require a bounds structure.
31904         * icall.c, appdomain.c: support for new szarray format.
31906 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
31908         * metadata.c: compare also the retuns type when comparing signatures:
31909         we didn't do this as an optimization since really overloaded methods
31910         must differ also in the arguments, but this doesn't work with
31911         low-level IL code (or when using explicit conversion operators: see
31912         bug#23498 for an example).
31914 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31916         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
31918 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31920         * icall.c: make MonoType::GetElementType its own icall.
31922 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31924         * icall.c: remove MonoMethod_get_Name().
31925         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
31926         object.
31928 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
31930         * string-icalls.c: optimized a few methods.
31932 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
31934         * icall.c: added all new string internal calls
31935         * string-icalls.c: added, new string internal call implementation.
31936         * object.c: added mono_string_new_size for allocating a string a size
31938 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
31940         * object.c (mono_object_isinst): use the same code as in the
31941         optimized x86 version.
31943 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31945         * profiler.c: TSC-based timer code (faster and more accurate).
31946         Not hooked up in configure, yet (set USE_X86TSC to 1).
31948 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
31950         * profiler.c, profiler.h: track time spent compiling methods.
31951         * threads.c: track thread creation/destruction.
31953 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
31955         * profiler.c, profiler.h, profiler-private.h: profiling interface
31956         and sample implementation. Moved here so that it can be used also by
31957         the jit.
31959 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
31961         * reflection.c, reflection.h: keep types and other handles separate in
31962         the hash tables for referred tokens. Add guid for modules.
31964 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31966         * assembly.c: fix bugs found with valgrind.
31967         * metadata.h, metadata.c: added mono_metadata_guid_heap().
31969 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
31971         * threads: added icall support for getting current domain for
31972                    the thread.
31974 2002-04-13  Martin Baulig  <martin@gnome.org>
31976         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
31977         (MonoDebugVarInfo): Added `index' field for register based addresses.
31978         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
31979         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
31980         `MonoDebugVarInfo *params' and `guint32 this_offset' with
31981         `MonoDebugVarInfo *this_var'.
31983         * debug-symfile.c (relocate_variable): New static function to write
31984         a location description for a local variable or method parameter.
31986 2002-04-12  Martin Baulig  <martin@gnome.org>
31988         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
31989         stack offset and begin/end scope address of a local variable.
31990         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
31991         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
31992         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
31994         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
31995         Added new relocation types for start/end scope of a local variable.
31997 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31999         * object.h: add mono_object_domain() macro.
32000         * reflection.c: handle typespecs.
32001         * icall.c: MonoMethod::get_Name() implementation.
32003 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32005         * icall.c: String::GetHashCode() icall implementation.
32007 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32009         * icall.c: String::IndexOfAny icall.
32010         * object.c, object.h: make array->max_length more useful.
32011         Intrduced mono_object_class() and mono_string_length() macros.
32013 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32015         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
32016         instead of g_unichar_isdigit.
32018 2002-04-11  Nick Drochak  <ndrochak@gol.com>
32020         * icall.c: Implement a simple Double.ToString().
32022 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32024         * appdomain.h: only io-layer.h is supposed to be included.
32025         * icall.c: explicitly import environ. Fix warning.
32027 2002-04-10  Nick Drochak  <ndrochak@gol.com>
32029         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
32030                 return true even if it's not Daylight Savings time.
32031                 Only return false for the case where the function isn't
32032                 implemented for a plaform (read Windows).
32034 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32036         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
32037         data with a mutex.
32039 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
32041         * mempool.c (mono_mempool_alloc): only use g_malloc when
32042         absolutely necessary.
32044 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
32046         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
32048         * class.c (mono_class_vtable): use domain mempool to allocate vtable
32049         (mono_class_proxy_vtable): use domain mempool
32051 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
32053         * appdomain.h, appdomain.c: split initialization that requires the
32054         execution engine support into mono_runtime_init().
32056 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
32058         * class.c (mono_class_init): don't include vtable inside MonoClass
32059         to save some memory, gather some statistics.
32060         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
32062 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32064         * icall.c: internalcall implementation for ValueType.Equals().
32066 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
32068         * object.c (mono_message_init): moved 
32069         (mono_runtime_exec_main): new arch. independent impl.
32070         (mono_runtime_invoke_array): new method - like
32071         mono_runtime_invoke, but you can pass an array of objects.
32072         (mono_remoting_invoke): new arch. independent impl.
32073         (mono_message_invoke): new arch. independent impl.
32074         (mono_runtime_class_init): new arch. independent impl.
32075         (mono_runtime_object_init): new arch. independent impl.
32077 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
32079         * metadata.c, object.c, reflection.c: documented the exported
32080         functions.
32082 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
32084         * icall.c: simpler code to pass the assembly builder data to corlib.
32085         Implement GetNestedTypes() internalcall.
32087 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
32089         * class.c: warn if a type can't be loaded.
32091 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
32093         * image.h: typedef MonoImageOpenStatus
32094         * types.h: removed unused file
32095         
32096 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
32098         * icall.c: Enum_ToObject accepts enum value arguments.
32100 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
32102         * class.c: move initialization of properties, events and nested
32103         classes, so that they happen for interfaces, too.
32105 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
32107         * icall.c: cleanup some ugly casts in Array_SetValue*.
32109 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
32111         * icall.c: the values array fro enums is of the correct type, now.
32112         Implement (correctly) getFullName instead of assQualifiedName for
32113         MonoType.
32114         * reflection.h, reflection.c: added mono_type_get_name ().
32116 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
32118         * assembly.c, image.h: for each MonoImage, record from wich assembly
32119         it was loaded.
32120         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
32121         Make Type.Assembly work.
32123 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
32125         * debug-symfile.h: use char* instead of gpointer to avoid
32126         unnecessary casts.
32128         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
32130         * icall.c (ves_icall_InternalExecute): impl. FielSetter
32131         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
32133 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
32135         * icall.c (mono_message_init): impl. (code cleanup)
32136         (ves_icall_InternalExecute): impl. FieldGetter
32138         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
32139         defined we call all (non-static)methods through the vtable. 
32141 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
32143         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
32144         finalizer even though the memory is still referenced (and the chunk of
32145         memory is not freed).
32147 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
32149         * assembly.c: fix brokeness.
32151 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
32153         * class.c: kill some warnings. Check explicit interface method
32154         implementation also without considering the namespace.
32155         Load also literal strings in static class data.
32157 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
32159         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
32160         (default_assembly_name_resolver): Make the resolver take the
32161         "base" directory where the assembly was originally defined, so we
32162         can load DLLs that are in the same directory as the assembly that
32163         is being referenced.
32165 2002-03-28  Dick Porter  <dick@ximian.com>
32167         * file-io.h: 
32168         * file-io.c:
32169         * socket-io.c: 
32170         * unicode.h: 
32171         * unicode.c: Warning cleanups
32173 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
32175         * object.h, reflection.h: use the correct type instead of MonoObject.
32177 2002-03-28  Martin Baulig  <martin@gnome.org>
32179         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
32180         (mono_debug_update_symbol_file): Initialize classes if necessary.
32182 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32184         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
32185         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
32187 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
32189         * assembly.h: fix function prototype.
32190         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
32191         * mono-endian.h: use const cast.
32193 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
32195         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
32197 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32199         * loader.c: don't assert when a typeref can't be loaded, give
32200         a chance to the runtime to trow an exception instead.
32201         * loader.h: fix warning.
32203 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
32205         * class.c (mono_class_proxy_vtable): added proxy support
32207 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
32209         * icall.c: removed last of PAL calls, added System.Environment
32210         * file-io.h, file-io.c: MonoIO implementation
32211         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
32213 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32215         * appdomain.c: do not use the byte marker in ldstr table lookup.
32216         * debug-helpers.c: allow two ':' to separate class and method name.
32217         * object.c: allocate arrays bounds with the GC, too.
32218         * verify: add a few more checks.
32220 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
32222         * reflection.c: output also literal strings. Allocate parameter data
32223         with GC_malloc() (thanks, Martin, for catching this!).
32225 2002-03-26  Martin Baulig  <martin@gnome.org>
32227         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
32228         include the `this' offset in the `param_offsets'.
32230 2002-03-25  Martin Baulig  <martin@gnome.org>
32232         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
32233         mono_debug_get_class() function to get the classes. Added new
32234         relocation types for arrays and strings.
32235         (mono_debug_get_class): New static function to search in all
32236         referenced assemblies for a metadata token.
32238         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
32240 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32242         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
32243         hold gc-allocated objects. Make the string heap a stream like the
32244         others. Removed duplicated code when writing stream info.
32245         Added asserts to catch possible buffer overflows. Set the sorted map
32246         for tables that need sorting. Added some documentation.
32248 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
32250         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
32251         for interned strings and vtables.
32253 2002-03-24  Martin Baulig  <martin@gnome.org>
32255         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
32256         it in the array since it was created with g_slist_prepend().
32258 2002-03-24  Martin Baulig  <martin@gnome.org>
32260         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
32261         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
32262         (mono_debug_method_from_token): Renamed to
32263         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
32264         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
32266         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
32267         relocation types.
32269         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
32271 2002-03-24  Martin Baulig  <martin@gnome.org>
32273         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
32274         (mono_debug_method_from_token): New func.
32276         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
32277         New interncall, calls mono_debug_local_type_from_signature().
32278         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
32279         calls mono_debug_method_from_token().
32281 2002-03-23  Martin Baulig  <martin@gnome.org>
32283         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
32284         specifies the number of bytes to be converted, not the array size.
32285         Return the number of chars, not the number of bytes.
32286         (ves_icall_iconv_get_chars): The `byteCount' argument
32287         specifies the number of bytes to be converted, not the array size.
32289 2002-03-23  Martin Baulig  <martin@gnome.org>
32291         * reflection.h (MonoReflectionSigHelper): New type.
32293         * reflection.c (mono_reflection_sighelper_get_signature_local),
32294         (mono_reflection_sighelper_get_signature_local): New functions.
32296         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
32297         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
32298         interncalls.
32300 2002-03-23  Martin Baulig  <martin@gnome.org>
32302         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
32303         is_writeable is set.
32304         (mono_raw_buffer_update): New function to write the modified map
32305         back to disk.
32307         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
32309         * debug-symfile.c (mono_debug_update_symbol_file): Call
32310         mono_raw_buffer_update() when done writing.
32312 2002-03-23  Martin Baulig  <martin@gnome.org>
32314         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
32316         * debug-symfile.c: Added support for arguments and local variables.
32318 2002-03-23  Dick Porter  <dick@ximian.com>
32320         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
32321         protected by ifdefs, hence breaking the w32 build.
32323 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32325         * object.c: implement is_interned() the right way.
32327 2002-03-21  Martin Baulig  <martin@gnome.org>
32329         * debug-symfile.[ch]: New files to handle debugging information
32330         files. There's also support to dynamically update these symbol
32331         files to include machine dependent information.
32333 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
32335         * threads.c (mono_thread_create): new function to create thread
32336         from C
32338 2002-03-20  Martin Baulig  <martin@gnome.org>
32340         * icall.c (ves_icall_InternalInvoke): Create a new object if the
32341         method is a constructor.
32342         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
32343         points to ves_icall_InternalInvoke().
32345 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
32347         * file-io.c: Flush shouldn't throw exceptions.
32349 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
32351         * file-io.c: FileStream flush support; FileSetLength now
32352         restores file pointer.
32354 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32356         * class.c: set image for pointer classes.
32358 2002/03/19  Nick Drochak <ndrochak@gol.com>
32360         * sysmath.c: Forgot one.
32362 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
32364         * sysmath.c: Avoid redefining existing names.
32366 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
32368         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
32369         handled by runtime as icall rather than dllimport from libm.so
32370         * file-io.c, file-io.h: fixed handle argument type.
32372 2002-03-18  Dick Porter  <dick@ximian.com>
32374         * reflection.c (mono_image_get_type_info): rename interface to
32375         iface, because of "#define interface struct" on windows.
32377 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
32379         * class.c, class.h: rename and export mono_ptr_class_get().
32380         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
32381         * reflection.c, reflection.h, icall.c: better/saner type name
32382         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
32383         method signatures.
32385 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
32387         * class.c (mono_class_init): removed hardcoded GHC_SLOT
32389         * icall.c (ves_icall_InternalInvoke): impl.
32391 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32393         * reflection.c: output the interface map table, too.
32395 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
32397         * class.c (class_compute_field_layout): separate computation of 
32398         static field layout
32400 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
32402         * icall.c: added System.Buffer support.
32403         * file-io.c: moved file icalls from PAL to FileStream.
32405 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
32407         * icall.c (ves_icall_System_Object_GetHashCode): impl.
32409 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
32411         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
32413 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32415         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
32417 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32419         * debug-helpers.{c,h}: moved here from monograph some useful functions
32420         to locate a method by name/signature in a class or image. Included
32421         also a small and flexible IL disassembler.
32423 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32425         * reflection.c: fixup tokens in methods with small header size, too.
32427 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
32429         * object.c (mono_string_to_utf8): remove assert(!error), instead
32430         print a warning. 
32432 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
32434         * icall.c: update to the new mono_Array_class_get interface.
32436 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32438         * appdomain.c, object.c: Boehm-GC enable.
32439         * icall.c: make get_data_chunk() support split data requests.
32440         Ensure a class is initialized in more cases. Return only the first
32441         property found in GetProperties() or the compiler gets confused. 
32442         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
32443         * reflection.h, reflection.c: add fixup mechanism for field and method
32444         tokens. Initialize assembly->typeref in a single place. Output
32445         properties after events. Support custom attributes for events, too.
32446         Typo fix for paramter custom attrs.
32448 2002-03-07  Martin Baulig  <martin@gnome.org>
32450         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
32452 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
32454         * class.c (mono_array_class_get): fix. for multi. dim. arrays
32456 2002-03-06  Martin Baulig  <martin@gnome.org>
32458         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
32459         non-zero lower bounds. See testcases #F10-#F13.
32461 2002-03-05  Martin Baulig  <martin@gnome.org>
32463         * exception.c (mono_get_exception_argument_out_of_range): New exception.
32465         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
32466         ves_icall_System_Array_GetValue(), only calculate the absolute array position
32467         here.
32468         (ves_icall_System_Array_SetValue): Likewise.
32469         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
32470         as argument and does the actual work. This function is used when copying a
32471         multi-dimensional array.
32472         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
32473         now do all the widening conversions of value types.
32474         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
32476 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32478         * class.c: remove some magic numbers and use the smbolic names,
32479         instead. Added init_events() to load event info at class init time.
32480         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
32481         and mono_metadata_methods_from_event().
32482         * reflection.h, reflection.c: added support for writing out the evnets
32483         related information.
32485 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32487         * reflection.h, icall.c: use a different method (GetInterfaces)
32488         to gather interface info and add isbyref, isprimitive and
32489         ispointer to the ves_icall_get_type_info() return value.
32491 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32493         * class.h: stared adding support for events.
32494         * icall.c: split find_members implementation. Added debug icall to get
32495         the address of an object.
32496         * reflection.c: handle TypeBuilders in mono_type_get_object().
32498 2002-03-01  Martin Baulig  <martin@gnome.org>
32500         * icall.c (ves_icall_System_Array_GetLength): This must throw an
32501         ArgumentOutOfRangeException(), not an ArgumentException().
32502         (ves_icall_System_Array_GetLowerBound): Likewise.
32503         (ves_icall_System_Array_GetValue): Improved argument checking.
32504         (ves_icall_System_Array_SetValue): Improved argument checking.
32506 2002-03-01  Martin Baulig  <martin@gnome.org>
32508         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
32509         called with invalid arguments rather than just dying with g_assert().
32510         (ves_icall_System_Array_SetValue): Likewise.
32511         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
32512         raise a NotImplementedException instead.
32513         (ves_icall_System_Array_GetLength): Added argument checking.
32514         (ves_icall_System_Array_GetLowerBound): Added argument checking.
32516 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
32518         * object.h (mono_assert): new macros mono_assert and
32519         mono_assert_not_reached
32521 2002-02-28  Martin Baulig  <martin@gnome.org>
32523         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
32524         and "System::String::IsInterned" to "System::String::_IsInterned".
32526 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
32528         * icall.c: remove hacks for typebuilder. Added icall to create a
32529         modified type from a tybebuilder.
32530         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
32531         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
32532         to create a backing MonoClass for a TypeBuilder.
32534 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32536         * class.c, class.h: more refactoring of class init.
32537         Export mono_class_setup_mono_type() and mono_class_setup_parent().
32539 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
32541         * marshal.c, marshal.h: start of marshaling interface.
32543 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
32545         * icall.c: fix order in assembly qualified name icall.
32547 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
32549         * class.c: do not free str, since we store it in the hash table.
32550         * reflection.h: add label field to MonoILExceptionInfo.
32551         * reflection.c: handle references to more than one assembly. Handle
32552         case when there isn't a module created in the assembly.
32554 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32556         * class.c: Fix typo. Start refactoring of class init code.
32558 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32560         * appdomain.c: exit with 1 on error.
32561         * class.c: we already have the name in MonoClassField.
32562         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
32563         MonoStreamHeader instead of an offset of image->raw_metadata.
32565 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
32567         * appdomain.c (mono_init): Be even more descriptive about the error.
32569 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
32571         * appdomain.c: give the user an informative message when corlib can't
32572         be loaded.
32574 2002-02-26  Martin Baulig  <martin@gnome.org>
32576         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
32577         New icall to get the time zone data.
32579 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32581         * reflection.c: set virtual and raw size of section correctly.
32582         * threads.c: transfer domain information to newly created threads.
32584 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
32586         * class.c: when instancing a class in a domain, load the default
32587         vaules for static fields from the constant table. Fix System.Enum to
32588         not be an enum.
32589         * icall.c: implement Object::GetType() internalcall. Implemented
32590         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
32591         Fixed checking of binding flags in find_members().
32592         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
32593         * reflection.c: handle enumerations when writing to the constant
32594         table. Use a different object cache for types.
32597 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
32599         * object.c (mono_object_isinst): fix for arrays
32601         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
32603 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
32605         * object.c: don't use mprotect ()  and fix intern pool hash table
32606         lookup for big endian systems.
32608 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32610         * icall.c: change type_is_subtype_of () signature.
32612 2002-02-21  Mark Crichton  <crichton@gimp.org>
32614         * rand.c, rand.h: Added random number generator for
32615         System.Security.Cryptography classes.
32617         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
32619         * icall.c: Added System.Security.Cryptography calls.
32621 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
32623         * class.c, icall.c, metadata.c: better support for pointer types.
32624         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
32625         * reflection.c: Add support for getting custom attrs for properties
32626         and simplify some code.
32628 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32630         * icall.c: change getToken () and add custom attribute GetBlob()helper
32631         method.
32632         * reflection.h: add custom attrs array to the reflection builder structures.
32633         * reflection.c: encode and emit custom attributes for all the relevant
32634         reflection objects. Cache fieldref and methodref tokens. Change
32635         mono_image_create_token() interface to take a MonoDynamicAssembly.
32636         More complete custom attributes decoder. Load custom attributes for
32637         Assembly, Field, Method and Constructor objects, too. Make the
32638         returned array an Attribute[] one, not object[]. Added
32639         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
32640         custom attribute constructor.
32642 2002-02-20  Dick Porter  <dick@ximian.com>
32644         * icall.c:
32645         * rawbuffer.c:
32646         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
32647         problem code out for now).
32649 2002-02-19  Radek Doulik  <rodo@ximian.com>
32651         * object.c (mono_ldstr): use hash table to avoid multiple swapping
32653 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
32655         * icall.c: register the GetCustomAttributes method.
32656         * object.c, object.h: add mono_string_new_len ().
32657         * reflection.h, reflection.c: added mono_runtime_invoke(),
32658         mono_install_runtime_invoke(). Added
32659         mono_reflection_get_custom_attrs () to load custom attributes and
32660         create the attribute objects.
32662 2002-02-19  Dick Porter  <dick@ximian.com>
32663         * threads-dummy-types.c:
32664         * threads-dummy-types.h:
32665         * threads-dummy.c:
32666         * threads-dummy.h:
32667         * threads-pthread-types.c:
32668         * threads-pthread-types.h:
32669         * threads-pthread.c:
32670         * threads-pthread.h:  Deleted obsolete files
32672 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
32674         * class.c (mono_class_vtable): runtime init the class when we
32675         allocate static class data.
32677         * icall.c (ves_icall_System_Array_SetValue): check for null values.
32679         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
32680         and String - but we will need generic marshalling support in the
32681         future. 
32682         (mono_init): set the domain name in a ms compatible way
32684         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
32685         String[].
32687 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
32689         * object.c (mono_array_clone): use alloca() instead of g_malloc  
32690         for sizes
32692         * appdomain.c (mono_domain_unload): impl.
32694 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32696         * appdomain.c, object.c: fix intern pool implementation.
32697         * class.c: fix alignment code.
32699 2002-02-16  Radek Doulik  <rodo@ximian.com>
32701         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
32702         and s2 > s1, just copy lower bytes to be compatible with little
32703         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
32704         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
32706         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
32707         force big_endian to be 1 for big endian machines 
32708         (ves_icall_iconv_new_decoder): ditto
32710 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
32712         * socket-io.c (convert_sockopt_level_and_name): If the system
32713         doesn't define SOL_IP or SOL_TCP, get them by hand using
32714         getprotobyname() and caching the values (because this could be a
32715         slow operation).
32716         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
32717         Use the appropriate struct when the system does support it. Ie,
32718         not all systems have struct ip_mreqn so use struct ip_mreq when
32719         appropriate.
32721 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
32723         * reflection.c: handle finally clauses.
32725 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
32727         * socket-io.c: use g_snprintf() instead of snprintf.
32729 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
32731         * reflection.c (mono_param_get_objects): Cast second argument to
32732         mono_method_get_param_names to a const char** to silence the
32733         compiler warning.
32735         * appdomain.c (mono_domain_assembly_open): Put parens around the
32736         truth statement in the for-loop.
32738         * unicode.c (iconv_convert): Got rid of a compiler warning about
32739         int i being unused when the system has a new iconv.
32740         (iconv_get_length): Same.
32742         * image.c (load_class_names): Cast the second argument to
32743         g_hash_table_insert() to char* to hush compiler warnings about the
32744         arg being a const.
32745         (mono_image_open): Same here.
32747         * socket-io.c: Don't conditionally include sys/filio.h or
32748         sys/sockio.h here anymore since we now get them from
32749         io-layer/io-layer.h
32750         (inet_pton): If the system doesn't support inet_aton, implement
32751         using inet_addr and also #define INADDR_NONE if it isn't defined
32752         by the system.
32754 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
32756         * metadata.c, metadata.h: added function to get packing and size info
32757         of a typedef.
32758         * reflection.h, reflection.c: handle field RVA data. Save info about
32759         the table layout if needed. Assign typedef indexes to all the types
32760         before dumping the info about them to avoid forward reference problems.
32762 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
32764         * socket-io.c (convert_sockopt_level_and_name): ifdef
32765         SO_ACCEPTCONN because it is not defined on my system (old debian)
32767 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32769         * opcode.c: use stddef.h to get NULL.
32771 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
32773         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
32774         for FIONBIO, FIONREAD and SIOCATMARK.
32775         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
32776         define INADDR_NONE and besides, inet_addr() is deprecated and
32777         should not be used. Use inet_pton() instead - it also has the
32778         added bonus that it can easily handle IPv6 addresses as well.
32779         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
32781 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32783         * decimal.c: remove _MSC_VER conditional.
32785 2002-02-13  Dick Porter  <dick@ximian.com>
32787         * socket-io.c: 
32788         * icall.c: Internal calls for Blocking, Select, Shutdown,
32789         GetSocketOption and SetSocketOption
32791 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32793         * assembly.cs: better resolver: use it instead of some kludgy
32794         code.
32796 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
32798         * reflection.c: the best way to speed-up the compiler is to avoid
32799         infinite loops.
32801 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
32803         * class.c (mono_class_vtable): changed the object layout
32804         (obj->vtable->class). 
32805         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
32807 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32809         * assembly.c: look for assemblies in the assembly dir, too.
32811 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32813         * class.c: fix thinko in mono_class_from_type().
32815 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32817         * exception.h, exception.c: added TypeLoadException.
32818         * object.h, object.c: added mono_array_clone ().
32819         * icall.c: handle throwOnError in AssemblyGetType().
32820         Added Array.Clone().
32821         * opcode.h, opcode.c: use a single value for the opcode val.
32822         Compile fix for non-gcc compilers.
32824 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
32826         * opcodes.c, opcodes.h: export interesting info about opcodes.
32828 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
32830         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
32831         icalls. 
32833         * class.c (class_compute_field_layout): set element_class for enums
32834         (mono_class_create_from_typedef): set element_class for normal classes
32836         * icall.c (ves_icall_System_Enum_get_value): impl.
32838         * class.c (mono_class_create_from_typedef): do not set valuetype
32839         flag for System.ValueType and System.Enum
32841 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
32843         * unicode.c (iconv_convert): fix big endian problem.
32845 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32847         * class.c: add asserts if we are ever going to scribble over memory.
32848         * socket-io.c: not all systems have AF_IRDA defined.
32850 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
32852         * class.c (class_compute_field_layout): do not consider static
32853         fields to compute alignment
32855 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
32857         * appdomain.c (mono_appdomain_get): impl.
32858         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
32860 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32862         * icall.c: ignore "file://" prefix when loading an assembly.
32864 2002-01-23  Dick Porter  <dick@ximian.com>
32866         * socket-io.c:
32867         * icall.c:
32868         * Makefile.am: Added socket support
32870 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
32872         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
32873         code back.  This should return the assemblies that are loaded by
32874         the runtime on behalf of an application domain. 
32876         The current implementation is still broken, it just returns every
32877         assembly loaded, but until we get real applications domain this
32878         will do.
32880 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
32882         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
32883         AppDomain object.
32885 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
32887         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
32888         the mono_class_from_name lookup.
32889         (ves_icall_get_parameter_info): ditto.
32890         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
32891         method.
32892         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
32894 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
32896         * class.c: load also nested classes on class init.
32897         System.ValueType instance methods gets passed boxed
32898         values, unless methods in derived classed that get a pointer to the
32899         data.
32900         * icall.c: use better name parsing code in GetType().
32901         * image.c, image.h: add mono_image_loaded ().
32902         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
32903         * reflection.c, reflection.h: added mono_reflection_parse_type().
32905 2002-01-22  Veronica De Santis <veron78@interfree.it>
32907         * icall.c : Added mapping of internal calls for Manual and Auto reset events
32908         * threads.c : Added the implementation of internal calls for events
32909         * threads.h : Added prototypes of internal calls for events
32910         
32911 2002-01-21  Radek Doulik  <rodo@ximian.com>
32913         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
32915 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
32917         * class.c (mono_class_init): set min_align to 1 (instead of 0)
32918         (mono_class_value_size): use min_align
32920 2002-01-20  Dick Porter  <dick@ximian.com>
32922         * threads.h:
32923         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
32924         so it compiles on w32.
32926 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
32928         * metadata.c (mono_type_stack_size): impl.
32930         * class.c (mono_class_get_field): impl. memberref token
32932 2002-01-16 Veronica De Santis <veron78@@interfree.it>
32934         * icall.h : Added the internal calls mapping for CreateMutex_internal
32935                     and ReleaseMutex_internal.
32936         * threads.h : Added the prototype of mutexes internal calls.
32937         * threads.c : Added the implementations of mutexes internal calls.
32939 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
32941         * metaparse.h: removed unused file.
32942         * reflection.c, reflection.h: added stream_data_align () function 
32943         to align data in streams and keep stream aligned. Add support for
32944         exception support in method headers.
32946 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
32948         * unicode.c: make iconv_convert () return the number of bytess written
32949         in the output buffer.
32951 2002-01-15  Dick Porter  <dick@ximian.com>
32952         * threads.c: Make the runtime's idea of infinite timeouts coincide
32953         with the class library's
32955         Fix a particularly egregious bug in mono_thread_cleanup(). That
32956         code was so utterly bogus it must have been written on a Monday.
32958 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
32960         * reflection.h: add subtypes field to TypeBuilder.
32961         * reflection.c: encode constants for literal fields.
32962         Handle subtypes. Fix user string token (and add a zero byte)
32963         at the end.
32964         
32965 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
32967         * class.c (mono_class_init): bug fix: assign slot numbers for
32968         abstract methods.
32970 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32972         * reflection.c: don't try to output a code RVA for abstract methods.
32973         Small fixes for method header format. Output parameter info to the
32974         ParamDef table. Save method overriding info to MethodImpl table.
32975         Fix property support. Allow typedef.extends to be a type in the
32976         building assembly.
32977         * verify.c: fix off-by-one error.
32979 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
32981         * class.c: fix mono_class_from_mono_type () for szarray types.
32982         Remove unused cache check in mono_class_from_type_spec().
32983         * icall.c: *type_from_name () functions handle simple arrays and byref.
32984         * reflection.c: handle byref and szarray types. Handle methods without
32985         body (gets P/Invoke compilation working). Handle types and fields in
32986         get_token ().
32987         * reflection.h: add rank to MonoTypeInfo.
32989 2002-01-10  Dick Porter  <dick@ximian.com>
32991         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
32992         internal calls
32994 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
32996         * icall.c: initialize class in type_from_handle ().
32997         Loop also in parent classes for get_method ().
32998         * reflection.c: properly encode class and valuetype types.
32999         Start on encoding TypeBuilder types. Handle fieldrefs.
33000         Use correct length when registering a user string.
33001         Handle ConstructorBuilder and MonoMethod in get_token ().
33002         Make mono_type_get_object () aware of cached types.
33003         * object.c: back out change to mono_string_new ().
33005 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
33006         * object.c: mono_string_new should return a NULL when the string 
33007         passed in is NULL -- not try to deference it.
33008         
33009 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
33011         * icall.c: hack to make IsSubType work for TypeBuilders.
33012         * reflection.c: emit constructors before methods.
33013         Retrieve param names in mono_param_get_objects().
33015 2002/01/05  Nick Drochak  <ndrochak@gol.com>
33017         * Makefile.am: fix list of headers and sources so automake 1.5
33018         doesn't complain. Removed \# at end of list.
33020 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
33022         * reflection.c: get token for a method ref. Set return type of
33023         constructor to void.
33024         * loader.c: debug message.
33025         * class.c: typo fix.
33027 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
33029         * icall.c: fix array init with rank > 1. FindMembers
33030         loops in parent class as well.
33031         * image.c: do not insert nested types in name cache.
33032         * reflection.c: warning fix.
33033         * reflection.h: add override method (for interface impl).
33035 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
33037         * metadata.c: fix customattr decoding.
33039 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
33041         * rawbuffer.cs: Added native Win32 implementation, avoids using
33042         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
33044 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
33046         * class.c: make the low-level routines handle the cache.
33048 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
33050         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
33052 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
33054         * class.c: fix mono_array_element_size() for objects.
33055         * class.h, class.c: add properties to MonoClass and load them
33056         at init time.
33057         * icall.c: check with isinst() when assigning a value to an array
33058         instead of requiring the classes to match exactly.
33059         Implemented icall for System.Type::GetType().
33060         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
33061         enums. Handle bindingflags when looking for methods and fields.
33062         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
33063         and mono_metadata_methods_from_property().
33064         * reflection.h, reflection.c: added structures for propreties,
33065         parameters and enums. Implemented mono_property_get_object() and
33066         mono_param_get_objects().
33068 2001-12-18  Dick Porter  <dick@ximian.com>
33070         * file-io.c: Use mono_string_to_utf16() instead of
33071         mono_string_chars()
33073         * object.c: Added mono_string_to_utf16(), which copies the non
33074         NULL-terminated MonoString into a new double-null-terminated
33075         buffer.
33077 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
33079         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
33081 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
33083         * file-io.c: raise exceptions if handle is invalid.
33085 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
33087         * assembly.c: yet another check for mscorlib.
33088         * class.c, class.h: load nesting info for classes.
33089         * icall.c: many new functions to support the Reflection classes.
33090         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
33091         * reflection.h, reflection.c: mono_image_create_token(),
33092         mono_assembly_get_object(), mono_type_get_object(),
33093         mono_method_get_object(), mono_field_get_object(): methods to return
33094         objects that parallel the C representation of assemblies, types,
33095         methods, fields.
33097 2001-12-11  Dick Porter  <dick@ximian.com>
33099         * icall.c:
33100         * file-io.c: Internal calls for file IO.
33102 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
33104         * tabledefs.h: missing FileAttributes.
33105         * verify.h, verify.c: use is_valid_string () to simplify and check for
33106         valid strings more correctly. Fix warnings and speeling.
33107         Check more tables: Filed, File, ModuleRef, StandAloneSig.
33108         Check code: branches, maxstack, method calls.
33110 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
33112         * object.c (mono_object_allocate): removed static, so that the jit
33113         can allocate value types.
33115         * icall.c (ves_icall_System_DateTime_GetNow): impl.
33117 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33119         * class.c: init enum types right away and register the
33120         token->MonoClass map in mono_class_create_from_typedef ().
33121         * verify.h, verify.c: first cut of the verifier.
33122         * pedump.c: add --verify switch to verify metadata tables.
33123         * tabledefs.h: add some missing enums.
33125 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
33127         * class.c (mono_install_runtime_class_init): impl.
33128         (mono_class_init): renamed mono_class_metadata_init to
33129         mono_class_init, also removed the metadata_inited flag
33131         * object.c (mono_object_isinst): use faster algorithm
33133 2001-11-30  Radek Doulik  <rodo@ximian.com>
33135         * mono-endian.h: reverted last change
33136         added function prototypes
33138         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
33139         add mono-endian.c back
33141         * mono-endian.c: returned back, as Paolo pointed out, it's needed
33142         for unaligned access, I've mistaked it with endianess. I am
33143         sorry.
33144         (mono_read16): fix reverted endianess
33145         (mono_read64): ditto
33146         (mono_read32): ditto
33148 2001-11-30  Dick Porter  <dick@ximian.com>
33150         * exception.c: Implement mono_exception_from_name()
33152 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33154         * metadata.h, metadata.c: remove params_size and locals_size and their
33155         calculation from the metadata code: they are only usefult to the
33156         interp.
33158 2001-11-29  Radek Doulik  <rodo@ximian.com>
33160         * object.c (mono_ldstr): swap bytes here, it's probably not the
33161         best place, but works for me now, I'll redo it once I know mono
33162         better, also note that I add PROT_WRITE and don't reset back, also
33163         note that it's only affects big endians, so x86 should be OK
33165         * mono-endian.h (read16): use just glib macros for both endians
33167         * mono-endian.c: removed as glib macros are used in in
33168         mono-endian.h so we don't need to care about endianess for read
33169         macros as glib does that for us already
33171 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
33173         * class.h, class.h: take minimum alignment into consideration so
33174         that the fields of a class remain aligned also when in an array.
33176 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33178         * loader.h, loader.c: add mono_method_get_param_names().
33179         * class.c: 0-init class fields.
33181 2001-11-26  Dick Porter  <dick@ximian.com>
33183         * icall.c:
33184         * threads-types.h:
33185         * threads.c: New file that handles System.Threading on all platforms
33187         * object.c: 
33188         * object.h: Remove the synchronisation struct from MonoObject,
33189         replace it with a pointer that gets initialised on demand
33191         * Makefile.am: Replace all the system-specific threading code with
33192         a single file that uses the new wrapper library
33194 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
33196         * class.c, class.h: add mono_install_trampoline() so that the runtime
33197         can register a function to create a trampoline: removes the ugly
33198         requirement that a runtime needed to export arch_create_jit_trampoline.
33199         * object.h, object.c: added mono_install_handler() so that the runtime
33200         can install an handler for exceptions generated in C code (with
33201         mono_raise_exception()). Added C struct for System.Delegate.
33202         * pedump.c: removed arch_create_jit_trampoline.
33203         * reflection.c: some cleanups to allow registering user strings and
33204         later getting a token for methodrefs and fieldrefs before the assembly
33205         is built.
33206         * row-indexes.h: updates and fixes from the new ECMA specs.
33208 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
33210         * class.h, class.c: add enum_basetype field to MonoClass.
33211         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
33212         to get index in the constant table reated to a field, param or
33213         property.
33214         * reflection.h, reflection.c: handle constructors. Set public-key and
33215         version number of the built assembly to 0.
33216         * row-indexes.h: update from new ECMA spec.
33218 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33220         * class.h, class.c: add a max_interface_id to MonoClass.
33221         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
33222         since it's used to do that. Added mono_type_type_from_obj().
33223         Make GetType() return NULL instead of segfaulting if the type was not
33224         found. Handle simple arrays in assQualifiedName.
33225         * object.h: add a struct to represent an Exception.
33226         * reflection.c: output call convention in method signature.
33227         Add code to support P/Invoke methods and fixed offsets for fields.
33229 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
33231         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
33232         the value.
33233         * icall.c: use mono_array_addr instead of array->vector: fixes the
33234         reflection image writing.
33235         * reflection.c: init call convention byte to 0 in method signature.
33236         Encode the property signature. Don't output property-related methods
33237         twice. Really process the properties for a type (don't cast a field to
33238         a property, my mom always told me that).
33239         Fix 64 bit issues in pointer alignment in a different and more
33240         readable way.
33242 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
33244         * loader.h: Removed type class from MonoDefaults, added monotype
33246         * loader.c: Loaded MonoType, removed loading of Type
33248         * icall.c (my_mono_new_object): Now returns a System.MonoType,
33249         and fills in System.Type._impl with a RuntimeTypeHandle rather
33250         than the actual MonoClass *
33252         (ves_icall_type_from_handle): change from type_class to
33253         monotype_class
33255         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
33256         implemented
33258         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
33259         implemented
33261         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
33263         (ves_icall_System_Reflection_Assembly_GetType): implemented
33265         (ves_icall_System_MonoType_assQualifiedName): implemented
33267         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
33269 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
33271         * assembly.c (mono_assembly_open): Implement a cache for the
33272         assemblies. 
33274         (mono_assembly_close): only destroy the assembly when the last
33275         reference is gone.
33276         
33277 2001-11-09  Dick Porter  <dick@ximian.com>
33279         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
33281 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
33283         * class.c (mono_class_metadata_init): bug fix: compute the right slot
33285 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
33287         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
33288         from Martin Weindel.
33289         * object.h: add mono_string_chars ().
33291 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
33293         * reflection.c (build_compressed_metadata): Eliminates warnings
33294         and uses 64-bit clean code.
33296         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
33297         (mono_type_equal): Change signature to eliminate warnings.
33299 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
33301         * icall.c, loader.c: remove the internalcall array constructors.
33302         Changes to match the new MonoArray structure.
33303         * object.h, object.c: an array object doesn't allocate an extra
33304         vector. Add mono_array_new_full () to create jagged arrays easily.
33306 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
33308         * metadata.h, metadata.c: add mono_metadata_field_info () to
33309         retreive all the info about a field from vairous tables.
33310         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
33311         * class.h, class.c: augment MonoClassField with more info.
33312         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
33313         policy and load a field's RVA if needed.
33315 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
33317         * class.c (mono_class_metadata_init): create a trampoline for all
33318         virtual functions instead of actually compiling them.
33320 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
33322         * class.h, class.c: include name in MonoClassField.
33323         * class.c: fix fundamental type of System.Object and System.String.
33324         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
33325         tokens in ldtoken.
33326         * icall.c: remove internalcalls for the Reflection stuff that is now
33327         done in C# code.
33328         * loader.c: mono_field_from_memberref () implementation.
33329         * mono-endian.c: thinko (s/struct/union/g).
33330         * object.c, object.h: make the mono_string_* prototypes actually use
33331         MonoString instead of MonoObject.
33332         * reflection.c, reflection.h: updates for changes in the reflection
33333         code in corlib: we use C structures that map to the actual C# classes.
33334         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
33335         fat method header if needed and use the info from the ILGenerator for
33336         methods. Handle fields in types. Misc fixes.
33338 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
33340         * class.c (mono_class_metadata_init): bug fix: always allocate
33341         space for static class data
33343 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
33345         * class.c (mono_compute_relative_numbering): use relative
33346         numbering to support fast runtime type checks.
33348 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
33350         * class.c (mono_class_create_from_typeref): added debugging output
33351         to print class name when MonoDummy is returned instead of real class
33353 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
33355         * class.c (mono_class_metadata_init): interface offset table now
33356         contains pointers into the vtable - this is more efficient for the jit
33358 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
33360         * class.c (mono_class_metadata_init): use a temporary vtable (the
33361         old algorithm only worked for the interpreter, but not for the jit)
33363 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
33365         * loader.c (method_from_memberref): use mono_class_get to get the
33366         class of an array instead of using System.Array directly.
33367         (mono_get_method): also add MEMBERREF methods to the method cache
33368         which usefull for arrays.
33370 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
33372         * pedump.c (arch_compile_method): added to compute vtable entry
33374         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
33375         number of interfaces.
33376         
33377         * class.h: merged MonoArrayClass into MonoClass
33379         * class.c (mono_class_create_from_typedef): compute the vtable size and
33380         allocate space to include the vtable inside MonoClass
33381         (mono_class_metadata_init): initialize the vtable
33383 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
33385         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
33386         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
33387         * image.c: endian fixes by Laurent Rioux.
33388         * object.h, object.c: rename MonoStringObject to MonoString and
33389         MonoArrayObject to MonoArray. Change some function names to conform to
33390         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
33391         guint16* as first argument, so don't use char*.
33392         Provide macros to do the interesting things on arrays in a portable way.
33393         * threads-pthread.c: updates for the API changes and #include <sched.h>
33394         (required for sched_yield()).
33395         * icall.c: updates for the API changes above.
33396         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
33397         platforms that need them.
33399 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33401         * class.c: set the correct type for all the fundamental
33402         type when loading the class.
33404 2001-10-05  Dick Porter  <dick@ximian.com>
33406         * threads-pthread.c (pthread_mutex_timedlock): Simple
33407         compatibility version for C libraries that lack this call.
33409 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33411         * class.c: MonoTypes stored in MonoClass are stored as
33412         fundamental MonoTypes when the class represents a
33413         fundamental type (System.Int32, ...).
33414         The TypeHandle return by ldtoken is a MonoType*.
33415         * icall.c: ves_icall_get_data_chunk () write out all the
33416         PE/COFF stuff. Implement ves_icall_define_method (),
33417         ves_icall_set_method_body (), ves_icall_type_from_handle ().
33418         * image.c: properly skip unknown streams.
33419         * loader.h, loader.c: add type_class to mono_defaults.
33420         * metadata.c, metadata.h: export compute_size () as
33421         mono_metadata_compute_size () with a better interface.
33422         Typo and C&P fixes.
33423         * pedump.c: don't try to print the entry point RVA if there is no entry point.
33424         * reflection.c, reflection.h: many cleanups, fixes, output method
33425         signatures and headers, typedef and typeref info, compress the metadata
33426         tables, output all the heap streams, cli header etc.
33427         * row-indexes.h: typo fixes.
33429 2001-10-04  Dick Porter  <dick@ximian.com>
33431         * object.h: Add a synchronisation mutex struct to MonoObject
33433         * object.c (mono_new_object): Initialise the object
33434         synchronisation mutexes
33436         * icall.c: System.Threading.Monitor internal calls
33437         
33438         * threads-pthread.h:
33439         * threads-pthread.c: System.Threading.Monitor internal calls
33441         * threads-types.h: New file, includes the system-specific thread
33442         structures
33443         
33444         * threads-pthread-types.h:
33445         * threads-pthread-types.c: New files, handle pthread-specific
33446         synchronisation types
33448         * threads-dummy-types.h: 
33449         * threads-dummy-types.c: New files of dummy support for
33450         thread-specific types
33452         * metadata.c:
33453         * image.c:
33454         * pedump.c: include mono-endian.h not endian.h
33455         
33456         * Makefile.am: More threads files.
33457         Name mono-endian.h not endian.h
33459 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
33461         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
33462         stuff and implement a few more bits.
33463         * icall.c: a field needs to be dereferenced twice. Do not use the same
33464         name for two variables in the same scope.
33465         * image.c, image.h: cleanups.
33467 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
33469         * class.c (mono_class_metadata_init): bug fix: compute the right size
33471 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
33473         * icall.c: implemented some of the Reflection internalcalls.
33474         * image.c, image.h: start writing out the PE/COFF image.
33475         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
33476         that does the reverse than decode_blob_size ().
33477         * object.c: use mono_metadata_encode_value (). Move here
33478         temporary implementation of mono_string_to_utf8 ().
33479         * rawbuffer.c: make malloc_map static.
33481 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33483         * metadata.c: fix type comparison for arrays.
33484         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
33485         Added a couple of new classes to monodefaults.
33486         * icall.c: added a couple of Reflection-related internalcalls.
33487         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
33488         Added a byval_arg MonoType to MonoClass.
33490 2001-09-28  Dick Porter  <dick@ximian.com>
33492         * icall.c:
33493         * threads-pthread.h: 
33494         * threads-pthread.c: Implemented internal calls for
33495         LocalDataStoreSlot operations.  Applied mutexes around all shared
33496         data.  Reworked the thread creation and Start() operations to
33497         avoid a race condition.
33498         
33499         * threads-dummy.h:
33500         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
33502 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
33504         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
33506 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
33508         * class.c, loader.c: warn and return NULL instead of erroring out.
33509         * icall.c: added System.AppDomain::getCurDomain().
33510         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
33512 2001-09-25  Dick Porter  <dick@ximian.com>
33514         * threads-pthread.h:
33515         * threads-pthread.c: Implemented timed thread joining and added
33516         System.Threading.Thread::Join_internal internal call
33518         * icall.c: Added System.Threading.Thread::Join_internal internal call
33520         * threads-dummy.h:
33521         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
33523 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
33525         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
33526         mono_string_intern () to implement the semantics of the ldstr opcode
33527         and the interning of System.Strings.
33528         * icall.c: provide hooks to make String::IsIntern and String::Intern
33529         internalcalls.
33531 2001-09-23  Dick Porter  <dick@ximian.com>
33533         * threads-dummy.c: 
33534         * threads-dummy.h: New files of dummy threading routines
33536         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
33537         support code based on system specifics
33539         Rename PTHREAD_LIBS to THREAD_LIBS
33540         
33541 2001-09-23  Dick Porter  <dick@ximian.com>
33543         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
33544         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
33545         internal calls.
33546         (mono_thread_init): Set up a Thread object instance to return when
33547         the main thread calls Thread.CurrentThread
33548         (mono_thread_cleanup): Wait for all subthreads to exit
33550         * icall.c: New internal calls for System.Threading.Thread::Sleep
33551         (including Schedule) and CurrentThread
33553         * threads.h: New file, to insulate thread-specific stuff from the
33554         rest of the code
33556 2001-09-21  Dick Porter  <dick@ximian.com>
33558         * threads-pthread.h: 
33559         * threads-pthread.c: New file, for handling pthreads-style
33560         threading support.  Start() now starts a new thread and executes
33561         the ThreadStart delegate instance.
33563         * icall.c: Added the internalcall for
33564         System.Threading.Thread::Start_internal
33566         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
33568 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
33570         * loader.c: work around the different signatures for delegates
33571         constructors csc generates in compiled code vs the ones compiled in mscorlib.
33573 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
33575         * class.h, class.c: add mono_class_get_field_from_name ().
33576         * *: Fix C comments and other ANSI C issues.
33578 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
33580         * endian.h, assembly.c: fix some endianness issues.
33582 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
33584         * loader.h, load.c: add delegate_class to mono_defaults.
33585         Handle runtime provided methods in mono_get_method ().
33587 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
33589         * loader.c (mono_get_method): use pinvoke for internal call
33591         * icall.c: use pinvoke for internal call
33593         * loader.c (method_from_memberref): set the method name
33595 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
33597         * metadata.c: help the compiler generate better code for
33598         mono_class_from_mono_type ().
33600 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
33602         * class.c (mono_class_metadata_init): delayed computing of the
33603         class size to mono_class_metadata_init ()
33605 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
33607         * class.c, class.h: add an interfaces member to MonoClass.
33608         * image.c, image.h: add assembly_name field to MonoImage
33609         from the assembly table.
33610         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
33612 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
33614         * class.c: Handle Array in mono_class_from_mono_type ().
33615         * metadata.c, pedump.c: some endian fixes.
33617 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33619         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
33620         * metadata.c: fix small problem introduced with the latest commit.
33622 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
33624         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
33625         We don't need a MonoMetadata pointer anymore to compare signatures in
33626         mono_metadata_signature_equal (), update callers.
33627         Reduced memory usage an number of allocations for MonoMethodHeader and
33628         MonoMethodSignature.
33630 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
33632         * metadata.c: added compare for szarray.
33634 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
33636         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
33637         and add a couple more types to it and mono_defaults. Give an hint on
33638         classes that need implementing in our corlib and are referenced
33639         in mscorlib.
33641 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
33643         * class.h, class.c: keep track if a class is also an Enum.
33644         * loader.c: Implement a couple more types for use in libffi
33645         marshalling. Gives better diagnostics when failing to dlopen
33646         a library. Set method->klass for P/Invoke methods, too.
33648 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
33650         * class.c, class.h: add a MonoType this_arg to MonoClass that
33651         represents a pointer to an object of the class' type that
33652         can be used by the interpreter and later the type cache.
33653         Add best guess alignment info for valuetype objects.
33655 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
33657         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
33658         into MonoType: one less level of indirection and allocation and
33659         simplifies quite a bit of code. Added cache for MonoTypes that are
33660         used frequently, so that we don't need to allocate them all the time.
33662 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
33664         * class.c (mono_class_create_from_typedef): System.Enum is also a
33665         value type, although it does not derive from System.ValueType
33666         (maybe a bug in the ms compiler?)
33668         * metadata.c (mono_type_size): return the right size for value types
33670         * loader.c (mono_get_method): only initialize method header if not abstract
33672         * class.c (mono_class_from_mono_type): use mono_default values. 
33674 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
33676         * *: use MonoClass pointers instead of <type_tokens>
33677         
33678         * class.h: new flag: metadata_inited.
33680         * class.c (mono_class_metadata_init): impl.
33681         (mono_class_instance_size): impl.
33682         (mono_class_data_size): impl.
33684 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33686         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
33687         MonoClass now has the name and name_space fields. 
33688         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
33689         mono_get_method () takes and optional MonoClass as argument.
33690         Removed mono_typedef_from_name() and added mono_class_token_from_name()
33691         instead that takes advantage of a map from class names to typedef
33692         tokens in MonoImage.
33694 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
33696         * metadata.c: zero is not a valid alignment boundary.
33697         Merge MONO_TYPE_VOID in default decoding code.
33699 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
33701         * image.h: merged MonoMetadata into MonoImage
33703         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
33704         identify the type of elements.
33706 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
33708         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
33709         * cil-coff.h: split MonoMSDOSHeader and add size info.
33710         * image.c: add some consistency checks.
33711         * metadata.c: fix row size computation: one programmer
33712         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
33713         add explanation for the locator routine.
33714         Fix decoding of size in method header.
33715         
33716 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
33718         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
33719         (g_concat_dir_and_file): Bring g_concat_dir_and_file
33720         function from gnome-libs.  This uses the right path separator
33721         based on the OS, and also works around a bug in some systems where
33722         a double slash is not allowed. 
33723         (default_assembly_name_resolver): Use g_concat_dir_and_file
33724         (mono_assembly_open): ditto.
33726 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
33728         * metadata.c (mono_metadata_signature_equal): impl.
33730         * *: void is now a realy MonoType (instead of using NULL)
33731         
33732         * metadata.c (do_mono_metadata_parse_type): use
33733         mono_metadata_parse_type to parse void value.
33735 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
33737         * metadata.c, metadata.h: in the signature and method header store
33738         only the space required for holding the loca vars and incoming arguments.
33740 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
33742         * metadata.c (do_mono_metadata_parse_type): treat void like any
33743         other type (instead of assigning NULL);
33745 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
33747         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
33749 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
33751         * image.c (do_mono_image_open): added a cache for arrays.
33753 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
33755         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
33756         decode a single column from a row in a metadata table and changes
33757         to take advantage of it in the typedef locator (gives a nice speed up).
33758         Store offset info for function params.
33760 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
33762         * image.h (MONO_IMAGE_IS_CORLIB): removed 
33764 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
33766         * assembly.c: how could mono_assembly_close () had ever worked?
33767         * metadata.c, metadata.h: provide offset info for local vars.
33768         Implement mono_type_size () to take care of alignment as well
33769         as size (it was mono_field_type_size in cli/class.c before).
33771 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
33773         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
33775         * assembly.h (CORLIB_NAME): set to corlib.dll
33777         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
33779 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
33781         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
33782         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
33783         tokentype.h: massive namespace cleanup.
33785 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
33787         * metadata.h, metadata.c: decode exception clauses when parsing method header.
33789 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
33791         * metadata.c (mono_metadata_free_type): added check for type !=
33792         NULL (void) before calling mono_metadata_free_type()
33794 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
33796         * metadata.h, row_indexes.h: added header with enumerations to use
33797         to index in the columns from tables in metadata and to decode coded
33798         tokens: we should start using this instead of embedding magic numbers
33799         all over the code.
33801 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
33803         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
33804         Move metadata_t info from cli_image_info_t to MonoImage, where
33805         it's easily accessible. Changed all the uses accordingly.
33806         Added the method and class caches to MonoImage.
33807         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
33808         and mono_metadata_decode_value () signature to be more consistent
33809         with the other parse functions (and simplify code). Taken advantage
33810         of zero-length array allocation with GCC. Removed reduntant (and
33811         wrong) MonoFieldType struct and use MonoParam instead. Changed
33812         mono_metadata_parse_field_type () to use common code for parsing.
33813         Added mono_metadata_typedef_from_field () and
33814         mono_metadata_typedef_from_method () to lookup a typedef index from a
33815         field or method token.
33816         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
33818 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
33820         * metadata.c (mono_metadata_parse_field_type): Implement. 
33821         (do_mono_metadata_parse_type): Split engine from
33822         mono_metadata_parse_type, so that we can create smaller structures
33823         for things that just have one pointer to the MonoType (look at
33824         the MonoFieldType)
33826 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
33828         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
33829         as Jan Gray found out, it is incorrect. 
33831 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
33833         * assembly.c: Implement asssembly loading.  This loads an image
33834         and loads all the referenced assemblies.  Come to think of it, we
33835         could always do lazy loading of the assemblies. 
33837         * image.c (mono_image_open): Keep loaded images in a hashtable.
33839         * image.h (MonoImage): Add reference count.
33841 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33843         * assembly.c (mono_assembly_open): Keep track of the file name in
33844         case the assembly has no ASSEMBLY table.
33846         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
33847         from get.c here.
33849 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
33851         * metadata.c, metadata.h: decode local vars in method header
33852         parse function. Change callers accordingly.
33854 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
33856         * metadata.h, cil-coff.h: protect against multiple inclusion.
33857         Added some new structures to hold information decoded from metadata:
33858         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
33859         and relevant decoding/free functions.
33860         * metadata.c: implement decoding functions. Add warning for out of bounds
33861         index in mono_metadata_locate(). Implement mono_get_method () to retreive
33862         all the info about a method signature and invocation. Remove check on
33863         uninitialized local var in parse_mh() and fix memory leak.
33865 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
33867         * metadata.h: More macros.
33869         * tokentype.h: New file.
33871 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
33873         * assembly.c: added a consistency check and initialize
33874         some structures with g_new0().
33875         * metadata.c: fixed a couple more bugs in table size computation
33876         and add other checks for out-of bound access to metadata.
33878 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
33880         * metatada.c: fix bugs computing table sizes. Spew a
33881         warning when index in string heap is out of bounds.
33883 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
33885         * metadata.h: Add a couple of macros to manipulate tokens. 
33887 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
33889         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
33890         cli_section_tables).
33892 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
33894         * metadata.c (mono_metadata_user_string): New function, provides
33895         access to the UserString heap. 
33897 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
33899         * metadata.c: Add inline documentation.
33901 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
33903         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
33904         files. 
33906 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
33908         * typeattr.h: New file, TypeAttribute flags. 
33910 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
33912         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
33913         mono_assembly_ensure_section): Section loading code.
33914         (load_section_tables): Load the sections.
33916         * mono/metadata/metadata.c (mono_metadata_locate_token,
33917         mono_metadata_locate): Functions to locate the information
33918         definition given a token or a table and an index.
33919         (mono_metadata_compute_table_bases): New.
33920         (compute_size): New function to compute the sizes of the various
33921         tables.
33923         * mono/metadata/metadata.h: Finish listing the different index
33924         types. 
33926         * mono/metadata/pedump.c: Improve to dump new information.
33928 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33930         * mono/metadata/metadata.c: Entered all the tables matching
33931         Beta2. 
33933         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2