2010-04-13 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / metadata / ChangeLog
blob910dc2965cd5e9329ae7deeca6436808cbe69853
1 2010-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
3         * loader.c (mono_method_signature_checked): Properly
4         init MonoError.
6         * loader.c (mono_method_signature): It's the calee
7         resposibility to init the error object.
9 2010-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
11         * metadata-verify.c (decode_signature_header): Do proper
12         overflow checking.
14 Tue Apr 13 12:36:29 CEST 2010 Paolo Molaro <lupus@ximian.com>
16         * reflection.c: maintain the invariants required by
17         mono_class_layout_fields() also in typebuilder_setup_fields ().
19 2010-04-11  Sebastien Pouliot  <sebastien@ximian.com>
21         * security-core-clr.c: Call mono_class_setup_methods in 
22         get_default_ctor before checking klass->methods. Fix typo in
23         comment
25 2010-04-10  Jb Evain  <jbevain@novell.com>
27         * domain.c (supported_runtimes): remove .net 4.0 beta 2 and
28         add .net 4.0 RTM version.
30 2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
32         * reflection.c (resolve_object): Properly inflate generic
33         methods when a context is supplied.
35         Fixes #591226.
37 2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
39         * verify.c (mono_method_verify): A switch op don't empty
40         the stack for the next one. Fixes a bug when running fsi
41         under --verify-all.
43 2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
45         * metadata-verify.c (is_valid_standalonesig_blob): Accept
46         fields as valid standalone sig too. F# does generate them.
48         * metadata-verify.c (verify_typedef_table_full): Ignore
49         what <module> extends.
51 2010-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
53         * verify.c (do_invoke_method): It's ok to do use call with
54         virtual, non-final methods if their class is sealed.
56 2010-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
58         * icall.c (ves_icall_MonoField_GetValueInternal): This function
59         is a near identical copy of mono_field_get_value_object. So simply
60         call it.
62         * object.c (mono_field_get_value_object): Handle literal fields
63         on open generic classes.
65         Fixes #594942.
67 2010-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
69         * reflection.c (mono_reflection_create_runtime_class): Setup
70         parent/supertype information again since it can be changed
71         without notice.
73 2010-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
75         * verify.c (verify_type_compatibility_full): Properly handle
76         stores between arrays of primitives.
78         Fixes the verifier side of #555950.
80 2010-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
82         class.c (mono_bounded_array_class_get): Properly init
83         cast_class to take the fact that uint[] and int[] can be
84         casted between each other.
86         Fixes #555950.
88 2010-04-07  Geoff Norton  <gnorton@novell.com>
90         * domain.c: Avoid a deadlock on osx.  Fixes #565765
92 2010-04-08  Zoltan Varga  <vargaz@gmail.com>
94         * icall.c (ves_icall_System_Enum_ToObject): Avoid a crash for unfinished type
95         builders. Fixes #594464.
97 2010-04-08  Zoltan Varga  <vargaz@gmail.com>
99         * icall.c (ves_icall_System_Environment_Exit): Shutdown the threadpool before
100         waiting for all threads to suspend, as those threads can't be suspended.
102 2010-04-08  Zoltan Varga  <vargaz@gmail.com>
104         * threads.c (mono_thread_suspend_all_other_threads): Call ensure_synch_cs_set ()
105         to avoid crashes on newly created threads.
107 2010-04-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
109         * file-io.c: reset the MonoIOStat structure in case of error.
110         Fixes bug #582667.
112 2010-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
114         * class.c (print_implemented_interfaces): Print proper type name.
116         * class.c (mono_class_setup_vtable): Don't try that hard to produce
117         the override map for generic instances since it later ignored.
119         * class.c (mono_class_implement_interface_slow): Don't break for
120         dynamic generic instances.
122         * object.c (mono_runtime_invoke_array): Add an assert for allocation.
124         * reflection.c (mono_reflection_method_get_handle): New method that
125         resolves a method handle.
127         * reflection.c (mono_reflection_get_dynamic_overrides): Handle the
128         case when we override methods from a dynamic generic instance interface.
130         Fixes #575941.
132 2010-04-05 Gonzalo Paniagua Javier <gonzalo@novell.com>
134         * threadpool.c: don't attempt to close the pipe when it has not been
135         created.
137 2010-04-05 Gonzalo Paniagua Javier <gonzalo@novell.com>
139         * threadpool.c: if there are no waiting threads, try to start a new
140         one. This fixes the not-so-random hangs in System.ServiceModel tests.
141         No need to use InterlockedCompareExchange to read volatile variables.
143 2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>
145         * verify.c (verify_type_compatibility_full): Fail mixed valuetype
146         and reference types that point to the same class.
148         Fixes #565598.
150 2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>
152         * verify.c (verify_stack_type_compatibility_full): Ignore constraints
153         when verifying compatibility between a generic instance and a generic
154         parameter.
156         * verify.c (check_is_valid_type_for_field_ops): Improve error message.
158         * verify.c (stack_slot_stack_type_full_name): Improve verification type
159         name.
161         Fixes #587849.
163 2010-04-04  Mark Probst  <mark.probst@gmail.com>
165         * sgen-gc.c: Remove superfluous scanning of alloc-pinned objects.
167 2010-04-04  Zoltan Varga  <vargaz@gmail.com>
169         * threads.c Applied some openbsd changes from Robert Nagy <robert@openbsd.org>.
171 2010-04-03  Marek Habersack  <mhabersack@novell.com>
173         * process.c: when cross-compiling with MinGW, force GetProcessId
174         lookup using GetProcAddress.
176 2010-04-02  Mark Probst  <mark.probst@gmail.com>
178         * sgen-gc.c: parse_environment_string_extract_number() must be
179         static.
181 2010-04-02  Mark Probst  <mark.probst@gmail.com>
183         * sgen-gc.c, sgen-gray.c: Macros for gray_object_enqueue() and
184         gray_object_dequeue(), to make sure they're inlined.
186 2010-04-02  Mark Probst  <mark.probst@gmail.com>
188         * sgen-gc.c, sgen-gray.c: Fix a few debug levels, put a few
189         asserts in inner loops into DEBUG and lower MAX_DEBUG_LEVEL.
191 2010-04-02  Jb Evain  <jbevain@novell.com>
193         * exception.c: remove dead code.
195 2010-04-02  Zoltan Varga  <vargaz@gmail.com>
197         * *-gc.c: Fix the signature of mono_gc_get_used/heap_size () to be consistent
198         with mono-gc.h.
200 2010-04-01  Sanjoy Das <sanjoy@playingwithpointers.com>
202         * sgen-gc.c: Make the nursery size adjustable by the
203         MONO_GC_PARAMS environment variable.
205         Code is contributed under MIT/X11 license.
207 2010-04-01 Gonzalo Paniagua Javier <gonzalo@novell.com>
209         * threadpool.c: threadpool threads wait is alertable.
210         Fixes bug #592964.
211         Reduced the stack size of the *poll_wait thread.
213 2010-04-01  Sebastien Pouliot  <sebastien@ximian.com>
215         * exception.c|metadata-internals.h: Add new mono_get_exception_
216         field_access_msg and mono_get_exception_method_access_msg 
217         functions that accept a const char* parameter to provide more 
218         details when the exception is thrown.
219         * security-core-clr.c|h: Rework code to allow logging exceptions
220         (export MONO_LOG_MASK="security") and to supply more details in
221         [TypeLoad|MethodAccess|FieldAccess]Exception thrown. Also added
222         mono_security_core_clr_is_field_access_allowed and 
223         mono_security_core_clr_is_call_allowed to return an exception,
224         with messages and logging, that can be emitted by method-to-ir.c
226 2010-04-01  Mark Probst  <mark.probst@gmail.com>
228         * sgen-gc.c, sgen-pinning-stats.c: In the heap-dump, dump each
229         pinned object.
231 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
233         * appdomain.c (mono_domain_assembly_postload_search): Avoid a crash/assert if
234         the assembly name is not well formed utf8. Fixes #567882.
236 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
238         * reflection.c (mono_reflection_create_generic_class): Set the flags field of
239         the generic parameters from the builder. Fixes #473298.
241 2010-03-31  Miguel de Icaza  <miguel@novell.com>
243         * object.c (mono_class_proxy_vtable): Eliminate warning. 
245         * marshal.c (emit_marshal_boolean): Eliminate possible
246         uninitialized local warning. 
248 2010-03-30  Sebastien Pouliot  <sebastien@ximian.com>
250         * class.c (mono_class_init): Postpone coreclr inheritance check
251         until the end of the initialization (so we can check up the 
252         default ctor manually for the core-clr inheritance rules).
253         * security-core-clr.c: Add the missing (undocumented) checks on
254         default constructors when verifying inheritance rules.
256 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
258         * domain-internals.h (MonoJitExceptionInfo): Add new field
259         handler_end to the data union. To be used to point the end
260         of a finally block.
262 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
264         * reflection.c: Add support for new v4 type
265         System.Reflection.MonoModule that is the concrete version
266         of Module which is abstract unver v4.
268 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
270         * class.c (mono_class_init): Don't set class failure after
271         inited = 1 is set. It must be done before.
273 2010-03-30  Andreas Färber  <andreas.faerber@web.de>
275         * mono-config.c: Add support for OS "haiku"
276         * ChangeLog: Fix UTF-8 encoding
278         Code is contributed under MIT/X11 license.
280 Tue Mar 30 15:53:06 CEST 2010 Paolo Molaro <lupus@ximian.com>
282         * console-unix.c: fixed include logic for sys/ioctl.h.
284 2010-03-30  Mark Probst  <mark.probst@gmail.com>
286         * threads.c: Fix bitmap generation for TLS marking on 64 bit
287         systems.
289 2010-03-30  Zoltan Varga  <vargaz@gmail.com>
291         * icall.c (ves_icall_System_Enum_get_underlying_type): Don't crash on
292         unfinished/broken typebuilders.
294 2010-03-29  Mark Probst  <mark.probst@gmail.com>
296         * sgen-gc.c: Use the same heuristic for the LOS target that we use
297         for the minor section allowance.
299 2010-03-29  Raja R Harinath  <harinath@hurrynot.org>
301         * metadata-verify.c (INVALID_METHOD_IMPLFLAG_BITS): Allow bit 6
302         "NoOptimization".
304 2010-03-29  Mark Probst  <mark.probst@gmail.com>
306         * sgen-gc.c: Count bytes allocated with heavy statistics.
308 2010-03-29  Mark Probst  <mark.probst@gmail.com>
310         * sgen-gc.c: More detailed time statistics.
312 Mon Mar 29 11:52:34 CEST 2010 Paolo Molaro <lupus@ximian.com>
314         * gc-internal.h, sgen-gc.c, threads.c, utils/mono-hash.c:
315         fix the user defined mark interface to pass a pointer
316         to the object location and not the object itself.
318 2010-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
320         * reflection.c (mono_method_body_get_object): Release
321         the method header before the call to CACHE_OBJECT since
322         this is a macro that returns.
324 2010-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
326         * class.c (inflate_generic_type): mono_metadata_type_dup
327         already dupes array information, the g_memdup was just
328         leaking memory.
330 2010-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
332         * verify.c: Add stack_peek function. Fix CEE_DUP
333         to not read from invalid memory if push did expand
334         the stack.
336 2010-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
338         * verify.c: Remove old table verification code that has
339         been superseeded by the new metadata verifier.
341         * verify.h: Remove mono_image_verify_tables from the public
342         API.
344         * pedump.c: Fix for removed bits.
346 2010-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
348         * verify.c: Allocate stack slows lazily to reduce stack usage
349         in case of methods with huge stacks. Reduces memory consumption
350         for mcs yyparse from 459Mb to 1.8Mb.
352 2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
354         * threadpool.c: don't try executing items from domains being
355         unloaded. Fixes appdomain-async-invoke test.
357 2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
359         * threadpool.c: spin while the threadpool initializes.
360         * mono-wsq.c: if the WSQ has not been initialized or has been shut
361         down, don't do anything.
363 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
365         * threads.c (mono_thread_create_internal): Set the GC type of the
366         threads_starting_up hash table.
368 2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
370         * threadpool.c: reset 'state' to avoid returning non-null when the
371         event type is not found.
373 Fri Mar 26 19:03:09 CET 2010 Paolo Molaro <lupus@ximian.com>
375         * sgen-gc.c: make copy_object () take the address of the
376         slot holding the reference. This allows saving memory stores
377         when not needed and it allows keeping track of oldspace->nursery
378         references for the card table code.
380 2010-03-26  Andreas Färber  <andreas.faerber@web.de>
382         * null-gc.c (mono_gc_invoke_with_gc_lock): Fix function name.
384         Code is contributed under MIT/X11 license.
386 Fri Mar 26 11:33:17 CET 2010 Paolo Molaro <lupus@ximian.com>
388         * object.c, threads.c, threads-types.h, threads.h: make the
389         managed thread local storage references precisely tracked.
391 2010-03-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
393         * threadpool.[ch]: reworked the threadpool:
394                 -Threadpool threads use a work-stealing queue. Adding a work
395                 item from a threadpool thread will queue it in the thread
396                 local queue without locking (in most cases).
397                 -epoll events are coalesced before being added to the IO
398                 queue.
399                 -Dynamically change the number of active threads
400                 -Changed the global queue to be more GC friendly
402         * class-internals.h: add 2 new performance counters for the number of
403         threads in the threadpool and the IO threadpool.
405         * object-internals.h: new field in MonoAsyncResult.
406         * icall-def.h: new internal call for queueing work items.
408         * Makefile.am: add 2 new files.
410         * appdomain.c: bump up corlib version.
412         * mono-wsq.[ch]: an implementation of a work-stealing queue.
414         * mono-perfcounters-def.h:
415         * mono-perfcounters.c: added 2 new performance counters.
417 2010-03-26  Mark Probst  <mark.probst@gmail.com>
419         * sgen-gc.c: More FIXME/TODO updates.
421 2010-03-25  Mark Probst  <mark.probst@gmail.com>
423         * gc-internal.h, sgen-gc.c, sgen-gc.h, boehm-gc.c, null-gc.c: New
424         function mono_gc_invoke_with_gc_lock() which invokes a function
425         with the guarantee that no collection will occur during its execution.
427 2010-03-25  Mark Probst  <mark.probst@gmail.com>
429         * sgen-gc.c: Update a few comments.
431 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
433         * reflection.c: Add support for new v4 type
434         System.Reflection.MonoAssembly that is the concrete version
435         of Assembly which is abstract unver v4.
437 2010-03-24  U-anarquia\miguel  <miguel@anarquia>
439         * reflection.c (mono_reflection_get_custom_attrs_info): Protect
440         code that uses System.Reflection.Emit in DISABLE_REFLECTION_EMIT.
442         Expose a few macros that are needed for SR but not SRE to the
443         world (previous inside the SRE ifdef)
445 2010-03-24  Mark Probst  <mark.probst@gmail.com>
447         * sgen-gc.c (gc_register_current_thread): We need
448         stack_start_limit as well in the non-attribute pthread case.
450 2010-03-23 Rodrigo Kumpera  <rkumpera@novell.com>
452         * threads.c: Fix windows build.
454 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
456         * thread-types.h: Add mono_thread_resume_interruption.
458         * threads.c: Add mono_thread_resume_interruption, this
459         function should be called after the last protected handler
460         found at interruption time has finished.
462 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
464         * threads.c (ves_icall_System_Threading_Thread_ResetAbort):
465         Check MonoInternalThread's ::state instead of ::abort_exc
466         since the later can be lazily created.
468         This is specially problematic when running a finally block
469         under AbortRequested state. ResetAbort must work, but the
470         abort_exc object has not been created because interruption
471         has not began.
473 2010-03-22  Geoff Norton  <gnorton@novell.com>
475         * locales.c: Its possible for CFStringGetCStringPtr
476         to return null and not convert encodings.  Use
477         CFStringGetCString instead.
479 Mon Mar 22 18:06:38 CET 2010 Paolo Molaro <lupus@ximian.com>
481         * class-internals.h, class.c, object.c: introduce compressed
482         interface bitmaps (for now only under small config): this saves
483         about 600 KB of runtime memory on gmcs bootstraps or monodevelop
484         startups.
486 Mon Mar 22 16:03:34 CET 2010 Paolo Molaro <lupus@ximian.com>
488         * mono-debug.c: don't try to get the method header, it causes a
489         deadlock and it is not used for anything anymore.
491 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
493         * loader.c (mono_method_get_marshal_info): Fix the handling of dynamic methods
494         broken by the last change.
496 2010-03-21  Andreas Färber  <andreas.faerber@web.de>
498         * socket-io.c: Don't depend on AF_SNA, AF_DECnet,
499         SOCK_RDM.
500         
501         Code is contributed under MIT/X11 license.
503 2010-03-20  Sanjoy Das <sanjoy@playingwithpointers.com>
505         * sgen-gc.c (mono_gc_get_write_barrier): Handle non-aligned
506         nursery.
508         Code is contributed under MIT/X11 license.
510 2010-03-19  Martin Baulig  <martin@ximian.com>
512         * mono-debug.c (MonoDebugWrapperData): Replace `cil_code' with a
513         dummy field, containing an empty string.
514         (mono_debug_add_method): Don't call mono_disasm_code() for wrappers.
517 Fri Mar 19 17:26:43 CET 2010 Paolo Molaro <lupus@ximian.com>
519         * class.c: setup_interface_offsets() refactor to not call
520         mono_class_get_implemented_interfaces () more times than needed and
521         to reduce the runtime memory requirements to be O(num_interfaces)
522         instead of O(max_interface_id).
524 2010-03-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
526         * mono-mlist.[ch]: add mono_mlist_set_next ().
528 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
530         * domain-internals.h: Add MonoTryBlockHoleJitInfo struct and
531         associated changes to support holes in the protected range of a
532         try block.
534         * domain.c: Add mono_jit_info_get_try_block_hole_table_info, which
535         retrieves the holes table from a given MonoJitInfo.
537 Tue Mar 16 13:11:15 CET 2010 Paolo Molaro <lupus@ximian.com>
539         * object.h, object-internals.h, object.c, icall.c, gc-internal.h,
540         debug-helpers.c, cominterop.c, process.c, sgen-gc.c, socket-io.c:
541         hide the contents of the MonoString and MonoArray structs from the
542         public API. Change the accessor macros to accessors functions where
543         needed. Adjusted the array API to allow for pointer-sized lengths and
544         starting positions, so 64 bit arrays can be optionally provided in an
545         API compatible way if needed on 64 bit systems.
547 Tue Mar 16 10:18:07 CET 2010 Paolo Molaro <lupus@ximian.com>
549         * class-internals.h, class.c, loader.c, marshal.c, metadata.c,
550         reflection.c: the MonoMethodNormal struct is now unused, so remove it.
552 Mon Mar 15 18:28:00 CET 2010 Paolo Molaro <lupus@ximian.com>
554         * class-internals.h: remove the method header from MonoMethod since
555         from now on it will be transient. We have a header pointer for method
556         wrappers, since in that case we need to keep track of it. For this
557         reason, all the Reflection.Emit generated methods use MonoMethodWrapper
558         structs now. The same happens with MonoMethodInflated.
559         * class.c: reset the sre_method flag for inflated method structures:
560         this makes the code that cares look at the header in the MonoMethodInflated
561         structure.
562         * loader.c: lookup the method header in the appropriate field now that
563         it is removed from MonoMethod.
564         * metadata-internals.h: add a flag to the method header to know if it
565         can be freed inside mono_metadata_free_mh ().
566         * method-builder.c: updates after moving the header field from
567         MonoMethod to MonoMethodWrapper.
568         * reflection.c: MonoMethods generated from Reflection.Emit use
569         MonoMethodWrapper structs if they need a method header now (later take
570         advantage of this and remove all the current unsafe uses of method_aux_hash).
571         * metadata.c: make method header parsing not leak when verification
572         fails. Alloc it with g_malloc() and free it in mono_metadata_free_mh().
573         These changes save a few hundred KB of runtime memory in a mcs
574         bootstrap or a monodevelop startup.
576 2010-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
578         * verify.c: Improve error message.
580 2010-03-12  Jb Evain  <jbevain@novell.com>
582         * reflection.c (add_exported_type): populate the exported
583         table with the type's nested type.
585 2010-03-10  Mark Probst  <mark.probst@gmail.com>
587         * sgen-gc.c (STRING_SIZE): Semi-revert r153342.  I'm an idiot who
588         can't read parentheses.
590 2010-03-10  Mark Probst  <mark.probst@gmail.com>
592         * threads.c (thread_cleanup): Add a guard to dereferencing
593         "thread" to avoid an unlikely race condition.
595 2010-03-09  Sebastien Pouliot  <sebastien@ximian.com>
597         * assembly.c: Fix crash in moon-unit when aname->culture is NULL
598         instead of an empty string.
600 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
602         * object-internals.h (_G_BOOLEAN_EXPR): Fix the definition of this to explicitly
603         convert to a boolean, recent gcc versions compile this differently.
605 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
607        * sgen-gc.c (safe_object_get_size): Avoid a function call so this can really be
608        inlined.
610 2010-03-09  Mark Probst  <mark.probst@gmail.com>
612         * sgen-gc.c (STRING_SIZE): Off by one.
614 2010-03-09  Mark Probst  <mark.probst@gmail.com>
616         * sgen-archdep.h: Fix the signal context register access for
617         AMD64.
619 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
621         * sgen-gray.c: Get rid of the unused 'start' field in GrayQueueSection.
623 2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>
625         * verify.c: Store the initial basic block returned by mono_basic_block_split
626         so we can release the whole list and not just the first one.
628 Mon Mar 8 17:30:44 CET 2010 Paolo Molaro <lupus@ximian.com>
630         * verify.c, debug-helpers.c, profiler.c, loader.c,
631         mono-basic-block.c, mono-debug.c, reflection.c: prepare to make
632         MonoMethodHeader a transient entity.
634 2010-03-08  Zoltan Varga  <vargaz@gmail.com>
636         * sgen-gc.c (scan_needed_big_objects): Call drain_gray_stack () to avoid
637         uncontrolled growth of the gray stack.
639         * sgen-gray.c: Rewrite this so it behaves like a stack, not a queue, so recently
640         added items are removed first, improving cache locality. Avoid freeing queue
641         segments in the fast path, use the list of segments as the free list, truncate
642         it to its max size at the start of collection.
644 Mon Mar 8 10:13:52 CET 2010 Paolo Molaro <lupus@ximian.com>
646         * metadata-internals.h: more memory savings, both with small config and without.
649 Sat Mar 6 19:12:12 CET 2010 Paolo Molaro <lupus@ximian.com>
651         * appdomain.c, domain-internals.h, domain.c, object.c:
652         make class_vtable_hash into an array to reduce memory usage.
654 Sat Mar 6 18:16:35 CET 2010 Paolo Molaro <lupus@ximian.com>
656         * mempool.c, class-internals.h, class.c, icall.c, metadata.c,
657         object-internals.h, object.c, reflection.c, threadpool.c:
658         reduce resource usage when the small config is selected.
659         In particular, up to 64K of methods/fields/properties/events
660         are allowed and "other" methods in events are ignored.
662 Fri Mar 5 19:05:47 CET 2010 Paolo Molaro <lupus@ximian.com>
664         * threads.c: reduce resource usage when compiled for a small config.
666 2010-03-05  Mark Probst  <mark.probst@gmail.com>
668         * sgen-gc.c: Also collect number of degraded-alloced objects with
669         heavy statistics.
671 2010-03-04  Geoff Norton  <gnorton@novell.com>
673         * assembly.c: Only support OSX bundling if the bundle is 
674         actually detectable.
676 2010-03-04  Geoff Norton  <gnorton@novell.com>
678         * loader.c: The marshal specs are freed at the end of the call
679         but it explicitly frees the strings as well as the container,
680         so we need to dup them too to avoid referencing free'd memory.
682 2010-03-04  Geoff Norton  <gnorton@novell.com>
684         * icall-def.h:
685         * icall.c: Add a new private internal icall to construct
686         an object from its type without running the ctor.
688 Thu Mar 4 15:37:09 CET 2010 Paolo Molaro <lupus@ximian.com>
690         * profiler.c: allow multiple profiler engines to be loaded
691         at the same time.
693 Wed Mar 3 20:19:45 CET 2010 Paolo Molaro <lupus@ximian.com>
695         * profiler-private.h, profiler.c, profiler.h, sgen-gc.c: introduce
696         profiler event to track object moves.
698 Wed Mar 3 19:20:39 CET 2010 Paolo Molaro <lupus@ximian.com>
700         * object.c, profiler.c, profiler.h, string-icalls.c:
701         remove the reduntant MONO_PROFILE_STRING_ALLOC profiler event.
703 2010-03-03  Miguel de Icaza  <miguel@novell.com>
705         * decimal.c (mono_double2decimal): Add support for reducing the
706         scale of a decimal.  It turns the 0.6000000000000 into 0.6 as
707         expected.
709 2010-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
711         * icall-def.h:
712         * icall.c: Implement System.MonoType::get_core_clr_security_level icall.
714 2010-03-03  Marek Habersack  <mhabersack@novell.com>
716         * mono-config.c (mono_config_parse_assembly_bindings): added -
717         parses assembly binding redirections from appdomain's config
718         file.
720         * metadata-internals.h: added definition of a new function -
721         mono_config_parse_assembly_bindings - to support parsing assembly
722         binding redirections defined in appdomain's config file.
724         * domain-internals.h: added two new fields to _MonoDomain - a list
725         of assembly bindings and a flag to parse the config file only
726         once.
728         * assembly.c (assembly_binding_maps_name): empty culture name and
729         NULL culture name are considered equal.
730         (mono_assembly_apply_binding): added support for domain specific
731         assembly binding redirections, read from the appdomain's
732         configuration file. Fixes bug #580185
734 Wed Mar 3 11:46:06 CET 2010 Paolo Molaro <lupus@ximian.com>
736         * appdomain.c, domain.c, icall.c, image.c, marshal.c, object.c,
737         reflection.c, socket-io.c, threadpool.c, threads.c: removed 1.1/1.0
738         support.
740 2010-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
742         * reflection.c (mono_image_get_memberref_token): Extract mono_image_add_memberef_row
743         from this function. The new function receive the parent token instead of a type.
745         * reflection.c (mono_image_get_methodref_token_for_methodbuilder):
746         * reflection.c (mono_image_get_ctorbuilder_token): Use new function to encode
747         typebuilders. This make it possible to properly encode generic type builders since
748         their unmanaged type don't have generics data while unfinished.
750         Fixes #583655.
752 2010-03-02  Mark Probst  <mark.probst@gmail.com>
754         * sgen-gc.c, sgen-protocol.c, sgen-protocol.h: New facility for
755         writing binary log files (can be enabled by #define'ing
756         BINARY_PROTOCOL) for better debugging of timing-dependent bugs or
757         bugs in longer running programs.
759 Mon Mar 1 19:35:32 CET 2010 Paolo Molaro <lupus@ximian.com>
761         * metadata.c: added some API documentation.
763 2010-03-01  Robert Jordan  <robertj@gmx.net>
765         * filewatcher.h: Include glib.h to fix the MSVC build.
767 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
769         * class-internals.h (MonoClass): Get rid of the reflection_info field, add
770         a GC handle instead. This is a bit slower to access, but avoids burdening the
771         GC with 100s of individual roots.
773         * reflection.c (mono_class_get_ref_info):
774         (mono_class_set_ref_info):
775         (mono_class_free_ref_info): New internal helper fuctions.
777         * reflection.c appdomain.c icall.c class.c: Use the new helper functions instead
778         of accessing klass->reflection_info directly.
780         * sgen-gc.c (alloc_complex_descriptor): Fix the computation of the number of
781         words.
783         * gc.c (alloc_handle): Create a GC descriptor for the 'entries' array, free
784         the previous array.
786 2010-02-28  Zoltan Varga  <vargaz@gmail.com>
788         * marshal.c (get_runtime_invoke_type): Avoid sharing byref with I, as the latter
789         needs an indirection.
791 2010-02-26  Zoltan Varga  <vargaz@gmail.com>
793         * generic-sharing.c: Removed, moved its contents to mini/mini-generic-sharing.c,
794         so all generic sharing code is in one place.
796         * class.c (get_implicit_generic_array_interfaces): Fix the last change so
797         we don't call setup_interface_offsets () for unfinished types.
799 2010-02-26  Zoltan Varga  <vargaz@gmail.com>
801         * class.c (mono_class_generic_sharing_enabled): Move this to
802         generic-sharing.c.
804         * image.c: Add an unload hook which is called before an image is unloaded.
806         * generic-sharing.c: Use the unload hook to unregister per-image data, to avoid
807         metadata.c having to depend on generic sharing.
809 Fri Feb 26 19:23:18 CET 2010 Paolo Molaro <lupus@ximian.com>
811         * class.c: reduce size of ridiculously large cache.
813 2010-02-26  Martin Baulig  <martin@ximian.com>
815         * mono-debug.h
816         (MONO_DEBUGGER_MINOR_VERSION): Bump to 5.
818         * threads.c (mono_thread_internal_reset_abort): New method; resets
819         the abort, but doesn't throw any exception if no abort was requested.
821 2010-02-26  Zoltan Varga  <vargaz@gmail.com>
823         * class.c (get_implicit_generic_array_interfaces): Call
824         mono_class_setup_interface_offsets () before accessing
825         eclass->interface_offsets_count. This only shows up on platforms without IMT for
826         some reason.
828 Thu Feb 25 12:12:44 CET 2010 Paolo Molaro <lupus@ximian.com>
830         * environment.c, environment.h, icall.c: make the GetOSVersionString()
831         icall internal.
833 Thu Feb 25 11:37:50 CET 2010 Paolo Molaro <lupus@ximian.com>
835         * metadata.c, metadata.h: make MONO_TYPE_IS* functional without
836         direct access to the MonoType fields.
838 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
840         * threads.h: Move some internal functions which were added to this header by
841         mistake to threads-types.h.
843         * class.c (mono_class_init): Get rid of mono_setup_vtable_in_class_init.
845 Wed Feb 24 17:45:27 CET 2010 Paolo Molaro <lupus@ximian.com>
847         * class-internals.h, class.h, object.h: make MonoRemoteClass
848         and mono_remote_class() internal.
850 Wed Feb 24 17:05:18 CET 2010 Paolo Molaro <lupus@ximian.com>
852         * metadata-internals.h, class-internals.h, metadata.h: make the
853         MonoType guts internal as well.
855 Wed Feb 24 16:02:42 CET 2010 Paolo Molaro <lupus@ximian.com>
857         * reflection.h: the MonoTypeNameParse guts are internal now.
858         * assembly.c, assembly.h, image.h: the MonoAssemblyName guts
859         are internal now, provide accessors as needed.
860         * metadata.h, metadata-internals.h: the MonoMethodSignature
861         guts are internal now.
862         * Makefile.am: mempool.h is an internal header now.
863         * *.h, *.c: remove glib.h usage from the public headers.
865 2010-02-24  Atsushi Enomoto  <atsushi@ximian.com>
867         * culture-info-table.h : regenerated.
869 2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>
871         * metadata.c: Add mono_method_get_header_summary which returns minimal
872         information about the header of a method. This is the information used
873         by the inline oracle to reject methods.
875         This method doesn't decode local variables and doesn't cache it's result,
876         so it should cause a minimal reduction in memory usage.
878         * metadata-internals.h: Add MonoMethodHeaderSummary structure and
879         mono_method_get_header_summary.
881 2010-02-22  Jeffrey Stedfast  <fejj@novell.com>
883         * threads.c (mono_thread_exit): Make sure that the main thread is
884         non-null before dereferencing it.
886 2010-02-21  Geoff Norton  <gnorton@novell.com>
888         * Makefile.am: Add CoreFoundation linkage on darwin to properly get the current
889         locale.
890         * locaes.c: When running on darwin, try to get the local from CoreFoundation 
891         before falling back to the posix lookup.
893 2010-02-19  Zoltan Varga  <vargaz@gmail.com>
895         * threads.c (mono_thread_suspend_all_other_threads): Ignore threads which have
896         the DONT_MANAGE flag set.
898 2010-02-19  Rodrigo Kumpera  <rkumpera@novell.com>
900         * domain.c: Remove old v1 version strings. Let the runtime
901         default to 2.0 instead of failing because it can't find a
902         working 1.0 instalation.
904 2010-02-19  Rodrigo Kumpera  <rkumpera@novell.com>
906         * domain.c: Add v4 RC version string.
908 2010-02-19  Rodrigo Kumpera  <rkumpera@novell.com>
910         * mono-basic-block.c (mono_opcode_value_and_size): Use pointer variant
911         of overflow checking function.
913 2010-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
915         * reflection.c (mono_reflection_method_on_tb_inst_get_handle): Handle non
916         generic methods.
918         * reflection.c (mono_reflection_get_custom_attrs_info): Handle compiler context
919         cases for ParameterInfo.
921         Fixes #579493.
923 2010-02-18  Zoltan Varga  <vargaz@gmail.com>
925         * class.c (mono_class_get_cctor): Fix support for dynamic classes, which doesn't
926         have has_cctor set. Fixes #575946.
928 2010-02-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
930         * appdomain.c: display a warning if the parsing the config file
931         produces any error.
932         Skip the BOM in UTF-8 files.
933         Copy the AppDomainSetup before setting the privateBinPath so that the
934         correct configuration file is read.
936 2010-02-15  Zoltan Varga  <vargaz@gmail.com>
938         * object.c: Instead of using one vtable trampoline, allow the JIT to use one
939         vtable trampoline per vtable slot index. Not used yet.
941 2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
943         * icall-def.h:
944         * icall.c: add internal call that returns the system page size.
946 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
948         * debug-helpers.c (mono_method_desc_search_in_image): Handle short names like
949         'int' for system classes.
951 Fri Feb 12 18:36:02 CET 2010 Paolo Molaro <lupus@ximian.com>
953         * icall.c, icall-def.h: new icall to check for sufficient
954         stack space.
956 2010-02-12  Mark Probst  <mark.probst@gmail.com>
958         * reflection.c (ensure_complete_type): Check that reflection_info
959         is set, too.  Fixes crash of corlib testsuite with -O=-all.
961 2010-02-11  Rodrigo Kumpera  <rkumpera@novell.com>
963         * attrdefs.h:
964         * tabledefs.h: Add NoOptimization flag.
966 2010-02-10  Mark Probst  <mark.probst@gmail.com>
968         * sgen-gc.c: Don't consider it a missing remset if the target
969         object is pinned - we might have done the store but not added the
970         remset yet.
972 2010-02-10  Mark Probst  <mark.probst@gmail.com>
974         * sgen-gc.c: When checking for missing remsets, don't assert on
975         the first one, but print them all and then assert.
977 2010-02-10  Mark Probst  <mark.probst@gmail.com>
979         * sgen-gc.c (find_in_remset_loc): Handle the small bitmap case.
981 2010-02-09  Miguel de Icaza  <miguel@novell.com>
983         * console-unix.c: On OSX Control-Y is assigned to
984         VDSUSP (non-Posix), the
985         suspend-program-next-time-it-tries-to-read-input command (this is
986         different than C-z, which suspends immediately).
988         Do the same thing that bash does and ignore this setting,
989         making our repl/getline support pasting.
991 2010-02-10  Mark Probst  <mark.probst@gmail.com>
993         * sgen-gc.c: Simple plausibility check for scan_starts.
995 2010-02-10  Mark Probst  <mark.probst@gmail.com>
997         * sgen-gc.c: Round up when calculating the number of scan starts.
999 2010-02-10  Rodrigo Kumpera  <rkumpera@novell.com>
1001         * reflection.c: Export mono_get_object_from_blob.
1003         * object-internals.h: Ditto.
1005         * icall.c: New icall property_info_get_default_value to get the default
1006         value of a property. Since using this is not common, no caching is done.
1008         * icall-def.h: Add new icall.
1010 2010-02-10  Rodrigo Kumpera  <rkumpera@novell.com>
1012         * class.c: Add mono_class_get_property_default_value.
1014         * class-internal.h: Export mono_class_get_property_default_value.
1016 2010-02-10  Rodrigo Kumpera  <rkumpera@novell.com>
1018         * reflection.c (mono_image_get_property_info): Encode the default value of a property.
1020 Wed Feb 10 14:48:45 CET 2010 Paolo Molaro <lupus@ximian.com>
1022         * sgen-gc.c: introduced critical regions to allow some lockless
1023         operations and increase scalability.
1025 2010-02-10  Geoff Norton  <gnorton@novell.com>
1027         * reflection.c: Support building with DISABLE_REFLECTION
1029 2010-02-09 Gonzalo Paniagua Javier <gonzalo@novell.com>
1031         * threadpool.c: Fixes for SetMinThreads and SetMaxThreads.
1032         Closes bug #566057.
1034         * exception.c: fix typo in comment.
1036 2010-02-09  Rodrigo Kumpera  <rkumpera@novell.com>
1038         * icall.c (param_info_get_type_modifiers): Handle the case when the member object is a
1039         property. This happens which instances returned by PropertyInfo::GetIndexParameters ().
1041         * reflection.c (mono_reflection_get_custom_attrs_info): Ditto.
1043         * object-internals.h: Export mono_class_is_reflection_method_or_constructor as part of
1044         the internal API.
1046         Fixes #574434.
1048 2010-02-09  Mark Probst  <mark.probst@gmail.com>
1050         * threads.c: Removed two assertions that were too strict.  Added a
1051         clarifying comment.  Fixes #577090.
1053 2010-02-08  Zoltan Varga  <vargaz@gmail.com>
1055         * domain.c (mono_jit_info_table_find): Avoid looking in the root domain, since
1056         the caller has no way of knowing the domain which owns the returned MonoJitInfo.
1058         * appdomain.c (create_exceptions): Call mono_thread_push/popappdomain_ref ().
1060         * verify.c (mono_type_get_stack_name): Fix a warning.
1062 2010-02-07  Zoltan Varga  <vargaz@gmail.com>
1064         * marshal.c (mono_marshal_get_wrapper_info): Rename from
1065         mono_marshal_wrapper_info_from_wrapper.
1067         * marshal.c (mono_marshal_set_wrapper_info): Rename from
1068         mono_marshal_method_set_wrapper_data, and export.
1070         * boehm-gc.c sgen-gc.c null-gc.c: Get rid of mono_gc_get_allocator_type, store
1071         the allocator type in a AllocatorWrapperInfo structure instead, which is accesible
1072         by calling mono_marshal_get_wrapper_info ().
1074         * sgen-gc.c (mono_gc_get_managed_allocator): Add a specialized allocator for
1075         small objects which does no size checks.
1077 2010-02-05  Rodrigo Kumpera  <rkumpera@novell.com>
1079         * icall-def.h: Rename get_MetadataToken to GetMetadataToken.
1081 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
1083         * verify.c (mono_method_verify): Use the new basic block formation pass
1084         to avoid verifying dead basic blocks. This is the same behavior as the
1085         runtime MS verifier.
1087 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
1089         * mono-basic-block.c:
1090         * mono-basic-block.h: New implementation of a basic block formation pass.
1091         The formation pass does static liveness analysis as well to detect dead
1092         basic blocks.
1094 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
1096         * marshal.c (mono_marshal_get_native_wrapper): Emit a null check for the
1097         'this' argument in icalls.
1099 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
1101         * reflection.c (resolve_object): Handle MonoArrayMethod. Fixes #575955.
1103 2010-02-01  Mark Probst  <mark.probst@gmail.com>
1105         * object.c, domain.c: When using SGen, we must register
1106         vtable->type as a root if it's not a MonoType, because then it
1107         wasn't pin-alloced.
1109 2010-02-01  Mark Probst  <mark.probst@gmail.com>
1111         * sgen-gc.c: Reset to_space_bumper to to_space_section->next_data
1112         at the start of nursery collections, because we might have had
1113         degraded allocations which changed next_data.
1115 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
1117         * marshal.c (mono_marshal_get_managed_wrapper): Avoid constructing the
1118         custom attr so this function works in cross-compiling mode.
1120 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
1122         * class.c (make_generic_param_class): Initialize interface offsets since we
1123         set klass->inited. Fixes #574819.
1125 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
1127         * domain.c (mono_domain_free): Send the END_UNLOAD profiler event before
1128         calling the JIT domain cleanup hook.
1130 2010-01-28  Rodrigo Kumpera  <rkumpera@novell.com>
1132         * pedump.c (main): Properly set the verifier mode when running the metadata
1133         verifier.
1135 2010-01-28  Rodrigo Kumpera  <rkumpera@novell.com>
1137         * verify.c (verify_class_for_overlapping_reference_fields): Properly verify
1138         overlapping fields now that we're called before has_references is set.
1140         * pedump.c (dump_verify_info): Clear any loader error before verifying another
1141         method. Otherwise all sort of weird stuff happens.
1143 2010-01-27  Zoltan Varga  <vargaz@gmail.com>
1145         * object.c (mono_field_get_value_object): Handle nullable types correctly.
1146         Fixes #572874.
1148 2010-01-25  Zoltan Varga  <vargaz@gmail.com>
1150         * icall.c (ves_icall_System_Array_SetValueImpl): Handle nullable types correctly.
1151         Fixes #573322.
1153 2010-01-23  Mark Probst  <mark.probst@gmail.com>
1155         * sgen-pinning.c (evacuate_pin_staging_area): Don't assume
1156         pin_staging_area_index is greater than 0.
1158 2010-01-22 Miguel de Icaza (miguel@novell.com)
1160         * loader.c: Since we do nothing with the error returned, pass NULL
1161         to ignore the error.
1163 2010-01-21  Rodrigo Kumpera  <rkumpera@novell.com>
1165         * reflection.c (typebuilder_setup_fields): Pretend field setup already
1166         happened before starting to encode the actual fields. This avoid ciclic
1167         dependencies and eventual crashes.
1169         Fixes #572660.
1171 2010-01-21  Mark Probst  <mark.probst@gmail.com>
1173         * sgen-gc.c, gc-internal.h, object.c: Make string allocation
1174         atomic and remove the half-constructed hack in SGen.
1176 2010-01-21  Rodrigo Kumpera  <rkumpera@novell.com>
1178         * metadata-verify.c (parse_generic_inst): Fail a type signature if it 
1179         has a recursive reference to itself.
1181         Fixes #571863.
1183 2010-01-21  Rodrigo Kumpera  <rkumpera@novell.com>
1185         * loader.c (mono_method_signature): Fix error message.
1187 2010-01-21  Mark Probst  <mark.probst@gmail.com>
1189         * sgen-gc.c: Reuse to-space sections between nursery collections.
1191 2010-01-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1193         * icall.c: don't raise AppDomain.TypeResolve when the type is loaded
1194         from the current assembly or mscorlib. Fixes bug #322957.
1196 2010-01-20  Zoltan Varga  <vargaz@gmail.com>
1198         * marshal.c: Calculate the target class of the delegete invoke wrappers using
1199         get_wrapper_target_class.
1201 2010-01-19  Mark Probst  <mark.probst@gmail.com>
1203         * sgen-gc.c: Fix warnings.
1205 2010-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
1207         * verify.c (store_local): Better error message.
1209 2010-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
1211         * object.c (mono_object_get_virtual_method): Handle generic interfaces with variant
1212         arguments.
1214 2010-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
1216         * icall.c (ves_icall_Remoting_RemotingServices_GetVirtualMethod): This
1217         function is generics variance aware.
1219 2010-01-19  Sebastien Pouliot  <sebastien@ximian.com>
1221         * security-core-clr.c (mono_security_core_clr_can_access_internals):
1222         Handle the case where 'basedir' can be NULL (e.g. SRE assemblies)
1224 2010-01-19  Sylvain Dupont <duposyl@gmail.com>
1226         * cominterop.c marshal.c: Added support for marshalling in, in/byref,
1227           in/out, in/out/byref parameters of type SAFEARRAY[VARIANT].
1229         Code is contributed under MIT/X11 license.
1231 2010-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
1233         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Handle inflated generic methods
1234         on a GTD.
1236 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
1238         * marshal.c (mono_marshal_wrapper_info_from_wrapper): New helper function to
1239         return a point to a wrapper specific info structure describing the wrapper.
1240         (mono_marshal_get_array_address): Store the rank+elem_size in the wrapper info.
1242 2010-01-18  Mark Probst  <mark.probst@gmail.com>
1244         * sgen-gc.c: Make minor collection section allowance adaptive,
1245         depending on the amount of memory reclaimed in the last major
1246         collection.  If more memory was reclaimed (i.e. more garbage
1247         produced), do the next collection earlier.
1249 2010-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
1251         * metadata-verify.c (parse_type): Fail a type signature if it has a recursive reference
1252         to itself.
1254         * metadata-verify.c (mono_verifier_verify_typespec_signature): Change signature to take
1255         the token as parameter.
1257         * verify-internals.h: Ditto.
1259         * metadata.c (mono_type_create_from_typespec): Pass token to verifier.
1261         Fixes #571460.
1263 2010-01-18  Mark Probst  <mark.probst@gmail.com>
1265         * sgen-gc.c: Make store_remset_buffer_index long.
1267 2010-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
1269         * class.c (mono_class_from_typeref): Fail loading of self-referencing typeref tokens.
1271         Fixes #569579.
1273 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
1275         * sgen-gc.c (mono_gc_base_init): Add 'conservative_stack_mark' option to turn
1276         off precise marking if it is available.
1277         (mono_gc_get_bitmap_for_descr): Fix the handling of run length descriptors.
1279 2010-01-17  Zoltan Varga  <vargaz@gmail.com>
1281         * sgen-gc.c (mono_gc_conservatively_scan_area): Resurrect this.
1283         * sgen-pinning.c (evacuate_pin_staging_area): Don't assert if there are no
1284         pinned objects.
1286         * sgen-gc.c (create_allocator): Add the missing n > MONO_ARRAY_MAX_INDEX check
1287         to the array allocator.
1289 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1291         * generic-sharing.c (instantiate_other_info): Don't create ftnptr's from the
1292         result of mono_compile_method (), it already includes an ftnptr.
1294 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1296         * metadata.c (get_image_set): Remove an assert which can happen in normal use.
1298 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1300         * metadata.c (mono_metadata_str_hash): New helper function to compute a stable
1301         hash value which doesn't depend on glib/eglib versions.
1302         (mono_metadata_type_hash): Use it.
1304         * object.c (mono_method_get_imt_slot): Ditto.
1306 2010-01-14  Rodrigo Kumpera  <rkumpera@novell.com>
1308         * class.c (mono_type_has_exceptions): Check the generic instance. It can fail
1309         independently of the GTD.
1311         * class.c (mono_class_setup_fields): Fail if field has negative offset.
1313         * class.c (mono_class_setup_fields): Fail if valuetype has zero size. Add sizeof(MonoObject)
1314         to the upper limit since instance_size includes this amount.
1316         * class.c (mono_class_layout_fields): Check if the types of the static fields have failed.
1318         Fixes #569544.
1320 2010-01-14  Zoltan Varga  <vargaz@gmail.com>
1322         * object.c (build_imt_slots): Compute the vtable slot correctly for interfaces
1323         with static methods.
1325         * object.c (build_imt_slots): Avoid asserting when static methods are
1326         encountered in an interface.
1328 2010-01-13  Mark Probst  <mark.probst@gmail.com>
1330         * sgen-gc.c (to_space_expand): Fix assertion.
1332 Wed Jan 13 15:42:28 CET 2010 Paolo Molaro <lupus@ximian.com>
1334         * string-icalls.c: missing declaration fixes.
1335         * sgen-gc.c: portability fixes.
1337 2010-01-12  Rodrigo Kumpera  <rkumpera@novell.com>
1339         * class.c (mono_class_get_implemented_interfaces): Now take a MonoError argument.
1341         * class.c:
1342         * cominterop.c:
1343         * icall.c:
1344         * object.c: 
1345         * class-internals.h: Adjust for new signature of mono_class_get_implemented_interfaces.
1347 2010-01-12  Rodrigo Kumpera  <rkumpera@novell.com>
1349         * class.c (mono_class_setup_interfaces): Now take a MonoError argument and
1350         it can fail loading the type.
1352         * class.c: Add mono_class_inflate_generic_class_checked.
1354         * class.c:
1355         * verify.c:
1356         * class-internals.h: Adjust for new signature of mono_class_setup_interfaces.
1358 2010-01-11  Zoltan Varga  <vargaz@gmail.com>
1360         * loader.c (mono_method_signature_checked): New internal function taking an
1361         MonoError argument.
1363         * socket-io.c (AI_ADDRCONFIG): Applied patch from John Lightsey (jd@cpanel.net).
1364         Fixes build on rh 7.3.
1366 2010-01-10  Aaron Bockover  <abockover@novell.com>
1368         * assembly.c (mono_set_rootdir): Support finding the mono paths on OS X
1369         at runtime in the same way as on Windows, which yields a relocatable
1370         Mono. Uses dyld's _NSGetExecutablePath and realpath to resolve the path
1371         of the running mono process.
1373         On TARGET_ARM, fallback () will always be executed.
1375 2010-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
1377         * icall.c (ves_icall_Type_GetInterfaceMapData): This function is generics variance aware.
1379 2010-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
1381         * class.c (mono_class_is_assignable_from_slow): Support variant
1382         generic delegates.
1384         * class.c (mono_class_implement_interface_slow): Support types with
1385         variant generic arguments.
1387 2010-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
1389         * verify.c: Remove some code duplication.
1391 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1393         * object.c: Update docs.
1395 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1397         * object.c (add_imt_builder_entry): Improve DEBUG_IMT spew.
1399         * object.c (build_imt_slots): Interfaces with variant generic arguments use the
1400         fallback trampoline as well.
1402         * class.c (mono_class_interface_offset_with_variance): Add new non_exact_match
1403         out argument that is set to TRUE if the match was direct. 
1405         * class.c (mono_class_is_assignable_from): Delegates require variance testing as well.
1407         * class-internal.h: Update prototype of mono_class_interface_offset_with_variance.
1409 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1411         * class.c: Add mono_class_interface_offset_with_variance function that does same
1412         as mono_class_interface_offset but takes variance into account.
1414         * class-internal.h: Export mono_class_interface_offset_with_variance.
1416         * object.c: Fix and improve DEBUG_IMT. Added an assert for IMT thunk building.
1418 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1420         * object.c:
1421         * icall.c:
1422         * class.c: Add some FIXME for due to variant generic arguments.
1424         object.c (mono_object_isinst_mbyref): Interfaces with variant generic arguments
1425         can't use the simple bitfield check, so call mono_class_is_assignable_from if
1426         the bitfield check fails.
1428 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1430         * class.c (mono_class_is_assignable_from): Rework the generics variance code
1431         to be easier to read and fix bugs in the case a non generic type implements a variant
1432         interface.
1434         * class.c (mono_class_has_variant_generic_params): Make non static.
1436         * class-internals.h: Export mono_class_has_variant_generic_params as part of
1437         the private API.
1439 2010-01-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1441         * assembly.c: fix MONO_PATH debug output.
1443 2010-01-06  Atsushi Enomoto  <atsushi@ximian.com>
1445         * culture-info-table.h : regenerated.
1447 2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1449         * verify.c (mono_verifier_verify_class): Properly check for broken parent. Ignore
1450         types that are meant to not have a parent.
1452 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
1454         * marshal.c (mono_marshal_get_runtime_invoke): Make a copy of the signature
1455         from the image mempool, so it is not leaked.
1457 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
1459         * metadata-internals.h (_MonoImage): Remove unused generic_class_cache field.
1461 2010-01-04  Sebastien Pouliot  <sebastien@ximian.com>
1463         * verify.c (verify_valuetype_layout_with_target): Fix case
1464         that can lead to infinite recursion. Fix bug #567861
1466 2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1468         * pedump.c: Run code verifier even if image verification fails
1469         due to a failed type we. This allows more errors to be shown.
1471 2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1473         * class.c (count_virtual_methods): Remove the assert and now
1474         fail properly.
1475         
1476         * class.c (setup_interface_offsets): This can fail now.
1478         * class.c (mono_class_setup_vtable_general): Check for parent vtable
1479         errors. Check setup_interface_offsets errors.
1481         * class.c (setup_interface_offsets): Simplify the return error logic
1482         and remove class_init_ok.
1484         Fixes #560327.
1486 2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1488         * class.c (mono_class_init): Do class verification at the beginning. Add
1489         some asserts to avoid tripping into invalid memory.
1491         * object.c (compute_class_bitmap): Replace a g_assert_not_reached with a
1492         g_error and a decent message.
1494         * verify.c (mono_verifier_verify_class): Verify for invalid super type.
1496         Fixes #567548.
1498 2010-01-03  Zoltan Varga  <vargaz@gmail.com>
1500         * mempool-internals.h (g_list_prepend_mempool): Define this and related functions
1501         as inline functions instead of defining them in mempool.c.
1503         * metadata-internals.h (MonoImageSet): New structure representing a set of
1504         MonoImages, which own a collection of generic instances.
1506         * metadata.c: Get rid of the global generic caches, instead assign each generic
1507         instance to the image set which consists of all the images referenced by the
1508         instance. This greatly speeds up mono_metadata_clean_for_image (), and allows
1509         the memory used by generic instances to be allocated from a per image-set mempool
1510         later.
1512 2010-01-03  Zoltan Varga  <vargaz@gmail.com>
1514         * marshal.c (mono_marshal_get_runtime_invoke): Fix a memory leak.
1516 2010-01-03  Zoltan Varga  <vargaz@gmail.com>
1518         * appdomain.c (zero_static_data): Fix a warning.
1520         * locales.c (construct_culture_from_specific_name): Applied patch from
1521         José Antonio Sánchez Lázaro <jasl@darcysoft.es>. Fix a crash if a culture was
1522         not found. Fixes #567900.
1524 2009-12-31  Sebastien Pouliot  <sebastien@ximian.com>
1526         * loader.c (mono_method_get_signature_full): Remove two asserts.
1527         Return NULL instead so that the verifier can handle both cases 
1528         gracefully.
1530 2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>
1532         * class.c (mono_class_setup_methods): Use checked version of mono_class_inflate_generic_method_full
1533         so we can properly fail types instead of crashing.
1535         Fixes #567676.
1537 2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>
1539         * reflection.c (reflection_methodbuilder_to_mono_method): Assert in case of a broken
1540         generic method.
1542 2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>
1544         * marshal.c (mono_mb_emit_restore_result): Properly handle generic enums.
1546 2009-12-26  Zoltan Varga  <vargaz@gmail.com>
1548         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait): Don't close the
1549         wait handle if the wait is interrupted, since it is still in mon->wait_list, and
1550         we can't remove it from it since we don't hold the lock.
1551         (mon_new): Free the orphaned events here when a mon structure is added to the
1552         freelist. Fixes #561239. Thanks to Mike Rieker <wmrieker@nii.net> for tracking
1553         this down.
1555 2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>
1557         * verify.c (init_stack_with_value_at_exception_boundary): Do stack overflow checking here
1558         as max stack might be zero.
1560         Fixes #562320.
1562 2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>
1564         Rework all uses of mono_class_setup_methods to accept that it can fail now.
1566         * class.c (mono_class_setup_methods): This function now can fail the class. Do so for generic
1567         instances if the GTD did.
1569         * class.c (mono_class_setup_properties): Ditto.
1571         * class.c (mono_class_setup_events): Ditto.
1573         * class.c (mono_class_setup_vtable): Fail early if the type is already broken.
1575         * class.c (mono_class_setup_vtable_general): Add a few more missing broken type checks. Sanitize
1576         error setting.
1578         * class.c (mono_class_init): Fail if GTD did.
1580         * cominterop.c:
1581         * generic-sharing.c:
1582         * icall.c:
1583         * loader.c:
1584         * object.c:
1585         * verify.c: Properly handle failure of mono_class_setup_methods.
1587 2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>
1589         * class-internals.c: Add mono_class_inflate_generic_method_full_checked and make
1590         mono_class_inflate_generic_method_full internal.
1592         * class.c (inflate_generic_context): Now takes a MonoError argument.
1594         * class.c (mono_class_inflate_generic_method_full): Now calls the _checked and abort on
1595         errors.
1597 2009-12-26  Zoltan Varga  <vargaz@gmail.com>
1599         * generic-sharing.c (instantiate_other_info): Avoid creating jump trampolines since
1600         they cannot be patched. Partly fixes #564408.
1602 2009-12-24  Mark Probst  <mark.probst@gmail.com>
1604         * metadata-internals.h, reflection.c: Use the
1605         MonoDynamicImage.handleref hash table only with unmanaged keys,
1606         and add a managed hash table handleref_managed for managed keys.
1608 2009-12-24  Mark Probst  <mark.probst@gmail.com>
1610         * sgen-gc.c: Unset to-space bumper between collections.  It might
1611         become invalid due to degraded allocations.
1613 2009-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
1615         * loader.c (mono_method_get_signature_full): Check if the returned signature is compatible
1616         with the one from the original method.
1618         * metadata-verify.c (mono_verifier_is_sig_compatible): New function to verify signature
1619         compatibility.
1621         * verify-internals.h: Add new function to the internal API.
1623 2009-12-18  Dimitar Dobrev  <dpldobrev@yahoo.com>
1625         * culture-info-tables.h: regenerated it to include the Georgian culture.
1627 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
1629         * sgen-gc.c: Include mono/utils/memcheck.h.
1631         * reflection.c (mono_reflection_get_type_internal_dynamic): Use assembly->domain
1632         instead of the current domain, since the two might not match if this is called
1633         from the debugger.
1635         * metadata-internals.h (MonoDynamicAssembly): Add a 'domain' field to specify the
1636         domain which created this assembly.
1638 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
1640         * debug-helpers.c (dis_one): Avoid a glib assert on empty strings.
1642 2009-12-17  Mark Probst  <mark.probst@gmail.com>
1644         * sgen-gc.c: Managed implementation of the specialized generic
1645         store write barrier.
1647 2009-12-17  Rodrigo Kumpera  <rkumpera@novell.com>
1649         * icall.c (ves_icall_Type_GetMethodsByName): Don't pin virtual methods if they are newslot.
1650         A private virtual newslot method is used to implement an interface method without exposing
1651         it to users. When querying for public instance methods, such method would hide a public one
1652         on a parent type.
1654         Fixes #564379.
1656 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
1658         * reflection.c (resolve_object): Fix the encoding of unmanaged calling
1659         conventions.
1661 2009-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
1663         * reflection.c (mono_type_get_object): Guard against NULL generic param owner.
1665 2009-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
1667         * class-internals.h (MonoDynamicGenericClass): Kill property and event related fields
1668         as they are no longer used.
1669         
1670          * metadata.c (free_generic_class_dependents): Remove reference to previous fields
1672         * reflection.c (mono_reflection_generic_class_initialize): Ditto.
1674 2009-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
1676         * reflection.c (mono_type_get_object): If the type is VAR or MVAR check
1677         if the owner class has not been finished before returning reflection_info.      
1679         Fixes #565127.
1681 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
1683         * reflection.c (mono_custom_attrs_from_param): Avoid a crash if a dynamic
1684         param doesn't have custom attributes. Fixes #565117.
1686         * class.c (mono_bounded_array_class_get): Make these classes PUBLIC. Fixes
1687         #565120.
1689 2009-12-15  Rodrigo Kumpera  <rkumpera@novell.com>
1691         * class.c (mono_class_setup_fields): Fail valuetypes that are bigger than 1Mb.
1693 2009-12-15  Rodrigo Kumpera  <rkumpera@novell.com>
1695         * pedump.c: Add partial-md mode that doesn't perform full metadata verification. It does the
1696         same amount done by a core-clr enabled runtime.
1698 2009-12-15  Marek Habersack  <mhabersack@novell.com>
1700         * appdomain.c (mono_make_shadow_copy): make sure access mode of
1701         the target files is reset to writable by owner and readable by
1702         everyone else to prevent problems when updating shadow copies of
1703         files whose source is read-only. Fixes bug #556884
1705 2009-12-15  Mark Probst  <mark.probst@gmail.com>
1707         * class.c (mono_generic_class_get_class): Allocate the generic
1708         class via malloc again, so that it can be freed when any one of
1709         the images of its constituent types is closed.
1711         * metadata.c: When closing an image, don't free generic insts and
1712         generic classes right away, but put them into a list for later
1713         freeing.
1715         * image.c, metadata-internals.h: Store the free list and in the
1716         second pass of closing an image, free it.
1718 2009-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
1720         * reflection.c (mono_generic_class_get_object): Assert if this is ever called.
1722         * reflection.c (mono_reflection_register_with_runtime): Only register dynamic
1723         types in type_hash.
1725         * reflection.c (resolve_object): Call ensure_complete_type on the inflated field.
1727 2009-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
1729         * reflection.c (mono_reflection_type_get_handle): Properly fail in case of a broken
1730         user type.
1732         * reflection.c (mono_reflection_register_with_runtime): Throws in case a bad user type
1733         is used.
1735 2009-12-14  Miguel de Icaza  <miguel@novell.com>
1737         * verify.c (mono_method_verify): The Unused opcodes produce an
1738         InvalidProgramException on .NET
1740 2009-12-14  Sebastien Pouliot  <sebastien@ximian.com>
1742         * loader.c (mono_method_get_header): Move assert after the verifier
1743         has been called on the method header.
1745 2009-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
1747         * object-internals.h: Remove useless field from MonoReflectionGenericClass.
1749         * appdomain.c: Bump corlib version.
1751 2009-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
1753         To properly support user types, MonoGenericClass has to be used for regular, non SRE,
1754         types as well since otherwise generic instances would not return UT as arguments but
1755         their undelying system type.
1757         * object-internals.h: Change field types of MonoGenericClass and *OnTypeBuilderInst
1758         to reflect the fact that they can have now multiple different types.
1760         * reflection.c (mono_image_get_field_on_inst_token): Handle MonoField.
1762         * reflection.c (mono_image_get_ctor_on_inst_token): Handle MonoCMethod.
1764         * reflection.c (mono_image_get_method_on_inst_token): Handle MonoMethod.
1766         * reflection.c (mono_reflection_register_with_runtime): Init super types
1767         if the image is not dynamic.
1769         * reflection.c (mono_reflection_bind_generic_parameters): In case of a MonoGenericClass,
1770         check if the generic type definition is a TypeBuilder.
1772         * reflection.c (mono_reflection_generic_class_initialize): If the generic type definition
1773         doesn't belong to a dynamic image, skip initialization.
1775         * reflection.c (resolve_object): Properly handle *OnTypeBuilderInst types where their
1776         base definition is not a dynamic type.
1778 2009-12-11  Marek Habersack  <mhabersack@novell.com>
1780         * object.c (mono_ldstr, mono_ldstr_metadata_sig): added calls to
1781         mono_profiler_string_allocation
1783         * string-icalls.c (ves_icall_System_String_InternalAllocateStr):
1784         if string profiling is enabled, call
1785         mono_profiler_string_allocation
1787         * profiler.h: added two MonoProfileFlags -
1788         MONO_PROFILE_IOMAP_EVENTS and MONO_PROFILE_STRING_ALLOC as well as
1789         installation functions for the hooks below.
1791         * profiler-private.h, profiler.c: added two hooks:
1792         mono_profiler_string_allocation called whenever a string is
1793         allocated by InternalAllocateStr and mono_profiler_iomap called
1794         whenever IOMAP code performs an adjustement on a file path.
1796 Fri Dec 11 18:24:04 CET 2009 Paolo Molaro <lupus@ximian.com>
1798         * boehm-gc.c: fixed race condition while getting the target of a
1799         disappearing link (bug #522233).
1801 2009-12-10  Rodrigo Kumpera  <rkumpera@novell.com>
1803         * class.c (mono_type_get_full): Produce warning instead of simply swallowing
1804         the error.
1806 2009-12-10  Rodrigo Kumpera  <rkumpera@novell.com>
1808         * reflection.c: Add mono_reflection_register_with_runtime icall to
1809         allow a MonoGenericClass to register itself as the managed mirror of
1810         a given generic instance.
1811         This is a temporary workaround until all MGC instantiation happens in
1812         managed code.
1814         * object-internals.h: Ditto.
1816         * icall-def.h: Ditto.
1818 2009-12-10  Mark Probst  <mark.probst@gmail.com>
1820         * sgen-gc.c (find_in_remsets): Also search the generic store
1821         remsets.
1823 2009-12-10  Mark Probst  <mark.probst@gmail.com>
1825         * sgen-gc.c: Don't access class names in debugging code when
1826         unloading a domain, because they might not be valid anymore.
1828 2009-12-10  Mark Probst  <mark.probst@gmail.com>
1830         * domain.c, domain-internals.h: New function mono_domain_unset().
1832         * appdomain.c (unload_thread_main): Detach the thread again at the
1833         end.
1835         * threads.c: When a thread exists or is detached, unset its domain
1836         so that it's NULL when, for example, a pthread destructor runs.
1838         * sgen-gc.c: Assert that there is no domain set after a thread is
1839         done.
1841 2009-12-10  Mark Probst  <mark.probst@gmail.com>
1843         * class.c (mono_generic_class_get_class),
1844         metadata.c (free_generic_class): Allocate generic MonoClass's from
1845         the image mempool, not via malloc.  The problem with malloc is
1846         that when unloading a domain those classes are freed before
1847         clearing the heap and SGen needs the classes.  Rewriting the
1848         unloading code to do the free later would be more work and there's
1849         no point in using malloc anyway.
1851 2009-12-09  Sebastien Pouliot  <sebastien@ximian.com>
1853         * loader.c (mono_method_signature): Always call mono_loader_unlock 
1854         before returning.
1856 2009-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
1858         * metadata-verify.c: Add mono_verifier_verify_string_signature to check
1859         user string blobs.
1861         * verify-internals.h: Add new function to the internal API.
1863         * verify.c (do_ldstr): Call into mono_verifier_verify_string_signature to
1864         check if it's a valid string.
1866         * object.c (mono_ldstr): Ditto.
1868         Fixes #561943.
1870 2009-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
1872         * icall.c (ves_icall_GetCurrentMethod): Drop all generic arguments
1873         from a method before returning it. This is the expected behavior.
1875 2009-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1877         * reflection.c (inflate_method): Handle the case of a regular system type.
1879 2009-12-08  Mark Probst  <mark.probst@gmail.com>
1881         * sgen-gc.c, sgen-pinning-stats.c, sgen-gray.c: More statistics
1882         gathering code.
1884         * mempool.c, mempool-internals.h: New function
1885         mono_mempool_get_bytes_allocated().
1887         * Makefile.am: sgen-pinning-stats.c added.
1889 2009-12-08  Mark Probst  <mark.probst@gmail.com>
1891         * sgen-gc.c (create_allocator): Only use the fast path if the
1892         object size is within the small object size limit.
1894 2009-12-07  Mark Probst  <mark.probst@gmail.com>
1896         * sgen-gc.c: Make sure section->data is aligned to 8 bytes by
1897         possibly adding padding to sizeof (GCMemSection).
1899 2009-12-07  Mark Probst  <mark.probst@gmail.com>
1901         * sgen-gc.c (mono_gc_wbarrier_nostore): Skip the remset if the
1902         reference is not in the nursery.
1904 2009-12-07  Rodrigo Kumpera  <rkumpera@novell.com>
1906         * class.c (mono_class_from_typeref): Bounds check idx against the 
1907         assemblyref table.
1909 2009-12-07  Mark Probst  <mark.probst@gmail.com>
1911         * sgen-gc.c, sgen-pinning.c: When pinning, make only one pass
1912         through the potential roots, then sort the results and find the
1913         pinned objects from there.
1915         * Makefile.am: sgen-pinning.c added.
1917 2009-12-07  Mark Probst  <mark.probst@gmail.com>
1919         * sgen-gc.c: Record generic stores in specialized remset buffers.
1921 2009-12-06  Mark Probst  <mark.probst@gmail.com>
1923         * sgen-gc.c: Make pinned chunks the same size as major heap
1924         sections, and align them as well, so that we can check whether an
1925         object is in a pinned chunk or a major section in constant time.
1927 2009-12-06  Mark Probst  <mark.probst@gmail.com>
1929         * sgen-gc.c (build_nursery_fragments): Don't leak fragments.
1931 2009-12-06  Mark Probst  <mark.probst@gmail.com>
1933         * sgen-gc.c: Make all major heap sections the same size (currently
1934         128k) and allocate them on aligned addresses.  Small heap sections
1935         give us better granularity with pinned objects - we can free up
1936         much more memory.
1938 2009-12-06  Mark Probst  <mark.probst@gmail.com>
1940         * string-icalls.c (ves_icall_System_String_GetLOSLimit): Debug
1941         output removed.
1943 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
1945         Applied patch from Laurent Etiemble (laurent.etiemble@gmail.com).
1947         * mono/metadata/assembly.c: When opening an assembly image, pass the real
1948         names in addition to the runtime generated one.
1950         * mono/metadata/image.h: Add a function to take the real name of the assembly
1951         image.
1953         * mono/metadata/image.c: If a real name has been passed to load an assembly,
1954         use it instead of the runtime generated one.
1956         Code is contributed under MIT/X11 license.
1958 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
1960         * marshal.c (emit_marshal_vtype): Do the klass == date_time_class checks
1961         before the other checks to prevent problems if the DateTime class is blittable.
1962         Hopefully fixes #559600.
1964 2009-12-05  Mark Probst  <mark.probst@gmail.com>
1966         * string-icalls.c, string-icalls.h, icall-def.h: New icall that
1967         returns the largest string length that will not be put into the
1968         LOS.
1970         * sgen-gc.c, gc-internal.h: New function that returns the largest
1971         object size that will not be put into the LOS.
1973         * appdomain.c: Bump corlib version.
1975 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
1977         * class-internals.h: Add MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1979         * generic-sharing.c: Handle MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1981 2009-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1983         * reflection.c (inflate_method): Fix signature.
1985         * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Reflect change
1986         in managed code.
1988 2009-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1990         * reflection.c (inflate_method): Make this method work with TypeBuilder as well.
1992 2009-12-03  Mark Probst  <mark.probst@gmail.com>
1994         * sgen-gc.c: Abstract to-space handling.
1996 2009-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
1998         * loader.c (find_method_in_class): Ignore methods with broken signatures.
2000         Fixes #559906.
2002 2009-12-03  Mark Probst  <mark.probst@gmail.com>
2004         * sgen-gc.c: Only add references from outside the nursery to
2005         within the nursery to the global remset list.
2007 2009-12-03  Mark Probst  <mark.probst@gmail.com>
2009         * appdomain.c (create_exceptions): Set the domain temporarily if
2010         necessary to avoid cross-domain references.
2012 2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>
2014         * verify.c (get_stack_type): Return that the type is invalid instead of
2015         asserting.
2017         * verify.c (mono_method_verify): Verify that all locals and arguments
2018         have valid stack types.
2020         Fixes #559913.
2022 2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>
2024         * verify.c (mono_method_verify): Bounds check the filter offset. Make all
2025         bounds checking overflow aware.
2027         Fixes #559910.
2029 2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>
2031         * verify.c (do_invoke_method): Check for invalid method signatures.
2033         Fixes #553450.
2035 2009-12-02  Jb Evain  <jbevain@novell.com>
2037         * appdomain.c (MONO_CORLIB_VERSION): bump.
2038         * icall-def.h (get_base_definition): renamed to get_base_method
2039         and add a boolean argument indicating we want the original
2040         method definition, or the immediate base method.
2041         * icall.c: apply the get_base_definition to get_base_method change.
2043 2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>
2045         * class.c (mono_class_setup_fields): Fail an enum without an instance field.
2047         Fixes #558042.
2049 Wed Dec 2 16:35:49 CET 2009 Paolo Molaro <lupus@ximian.com>
2051         * class.c: remove asserts for invalid type token in
2052         mono_class_name_from_token(), mono_assembly_name_from_token() and
2053         mono_class_create_from_typedef () (fixes bug #553318).
2055 Wed Dec 2 15:48:19 CET 2009 Paolo Molaro <lupus@ximian.com>
2057         * metadata.c, class.c, loader.c: remove assert after bsearch() for
2058         incorrect assemblies (bug #553322).
2060 2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>
2062         * metadata.c (mono_metadata_inflate_generic_inst): Add MonoError parameter.
2064         * metadata-internals.h: Change signature of mono_metadata_inflate_generic_inst. 
2066         * class.c (inflate_generic_type): Use new version of mono_metadata_inflate_generic_inst.
2068         * class.c (inflate_generic_context): Ditto.
2070         * loader.c (method_from_methodspec): Ditto.
2072         Fixes #558230.
2074 2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>
2076         * class.c (mono_type_retrieve_from_typespec): Use MonoError machinery to report errors.
2078         * class.c (mono_class_create_from_typespec): Ditto.
2080         * class.c (mono_class_get_full): Fix for change on the above 2 functions.
2082         * class.c (mono_type_get_full): Fix for change on the above 2 functions.
2084         Fixes #558184.
2086 2009-12-02  Rodrigo Kumpera  <rkumpera@novell.com>
2088         * verify.c (mono_class_has_default_constructor): Check fror broken signatures.
2090         * verify.c (verify_delegate_compatibility): Ditto.
2092         * verify.c (do_newobj): Ditto.
2094         Fixes #558046.
2096 2009-12-02  Mark Probst  <mark.probst@gmail.com>
2098         * sgen-gc.c: Use a gray queue instead of requiring that gray
2099         objects are in a contiguous region.
2101         * sgen-gray.c: The gray queue implementation.
2103         * Makefile.am: sgen-gray.c added.
2105 2009-12-02  Mark Probst  <mark.probst@gmail.com>
2107         * appdomain.c: When unloading a domain, zero its static data and
2108         perform a minor collection when using SGen.  That will get rid of
2109         all the remsets pointing into that domain's static data.
2111         * sgen-gc.c: Allow remsets into static data.  By doing this we
2112         need less checks so we're more efficient.
2114 2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>
2116         * verify.c (mono_method_verify): Check for catch clauses with broken
2117         types.
2119         Fixes #558465.
2121 2009-12-01  Jb Evain  <jbevain@novell.com>
2123         * class.c (make_generic_param_class): set the namespace of
2124         the generic parameter class from its owner, if available.
2126 2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>
2128         * verify.c (code_bounds_check): Do proper overflow checking.
2130         * verify.c (mono_method_verify): The number of switch entries is
2131         an unsigned int. Properly bounds check it.
2133         Fixes #558594.
2135 2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>
2137         * metadata.c: Kill mono_metadata_get_param_attrs_checked. Add
2138         mono_metadata_method_has_param_attrs which only checks if a given param
2139         list has a non zero flags entry.
2141         * metadata.c (mono_metadata_get_param_attrs): Add param_count parameter
2142         to inform how many params should we expect to decode.
2144         * loader.c (mono_method_signature): Use mono_metadata_method_has_param_attrs
2145         as it's faster than mono_metadata_get_param_attrs.
2147         * metadata-internals.h: Fix mono_metadata_get_param_attrs signature and
2148         add mono_metadata_method_has_param_attrs.
2150 2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>
2152         * class.c (mono_class_setup_vtable_general): Check for mono_method_get_vtable_slot
2153         failures.
2155         * class.c (mono_method_get_vtable_slot): Don't assert if the computed method slot
2156         is -1 but its class is broken.
2158         Fixes #558522.
2160 2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>
2162         * metadata.c: Introduce mono_metadata_get_param_attrs_checked which checks
2163         for parameter overflow.
2165         * metadata.c (mono_metadata_parse_method_signature_full): Use checked version
2166         of mono_metadata_get_param_attrs.
2168         * metadata-internals.h: Add mono_metadata_get_param_attrs_checked to the internal
2169         API.
2171         * loader.c (mono_method_signature): Use checked version of mono_metadata_get_param_attrs.
2173 2009-12-01  Rodrigo Kumpera  <rkumpera@novell.com>
2175         * class.c (mono_class_setup_fields): Check for fields with broken types.
2177         Fixes #558741.
2179 2009-11-28  Rodrigo Kumpera  <rkumpera@novell.com>
2181         * reflection.c (ensure_generic_class_runtime_vtable): Split this function in 2
2182         so we can avoid calling ensure_runtime_vtable multiple times for the GTD during
2183         its TypeBuilder::CreateType ().
2185         * reflection.c (ensure_generic_class_runtime_vtable): Avoid initializing interfaces
2186         if not needed.
2188         * reflection.c: Every time we change the interface array, set interfaces_packed to NULL
2189         to make setup_interface_offsets happy.
2191         * reflection.c (remove_instantiations_of_and_ensure_contents): Fix instances again as corlib
2192         compilation now works.
2194 2009-11-28  Zoltan Varga  <vargaz@gmail.com>
2196         * appdomain.c (create_exceptions): New helper function extracted from
2197         mono_runtime_init () to precreate objects used during exception handling.
2198         (mono_runtime_init): Call it.
2199         (mono_domain_create_appdomain_internal): Ditto. Fixes #555264.
2201 2009-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
2203         * reflection.c (remove_instantiations_of_and_ensure_contents): Temp hack to fix corlib
2204         compilation until the proper one is found.
2206 2009-11-27  Zoltan Varga  <vargaz@gmail.com>
2208         * class.c (mono_class_setup_vtable_general): Cache the result of
2209         get_virtual_methods () since it can be slow because of the metadata
2210         optimization.
2212         * metadata-internals.h (_MonoImage): Change 'method_cache' to a GHashTable
2213         from a MonoValueHashTable for now, since the later is based on an earlier
2214         version of hpj's internal probing code and seems to have serious collision
2215         issues.
2217         * loader.c (mono_get_method_full): Update after the change above.
2219 2009-11-26  Zoltan Varga  <vargaz@gmail.com>
2221         * class-internals.h (MonoCachedClassInfo): Add 'is_generic_container' field.
2223 2009-11-26  Rodrigo Kumpera  <rkumpera@novell.com>
2225         * reflection.c (get_field_on_inst_generic_type): Try to fallback using the field from
2226         the GTD instead of the DGC instead of crashing.
2228         * reflection.c (ensure_generic_class_runtime_vtable): Only reinflate stuff that is
2229         required. Inflate fields if needed.
2231         * reflection.c (remove_instantiations_of): Ensure generic instances are properly
2232         finished. Renamed.
2234 2009-11-26  Rodrigo Kumpera  <rkumpera@novell.com>
2236         * class.c (check_interface_method_override): Check for NULL signatures and fail
2237         the type.
2239         * debug-helpers.c (mono_signature_get_desc): Return a fixed string for NULL signatures.
2241         Fixes #553428.
2243 2009-11-26  Zoltan Varga  <vargaz@gmail.com>
2245         * class.c (mono_class_get_virtual_methods): Call decode_row_col to obtain
2246         the MONO_METHOD_FLAGS column instead of decoding the whole row.
2248 2009-11-25  Rodrigo Kumpera  <rkumpera@novell.com>
2250         * loader.c (field_from_memberref): Resolve the class first then the field
2251         signature. Remove a lot of duplicated code and make sure we don't pass valid
2252         values to mono_loader_set_error_field_load.
2254         Fixes #553306.
2256 2009-11-25  Rodrigo Kumpera  <rkumpera@novell.com>
2258         * class.c (inflate_generic_type): Change code to use new signature of
2259         mono_error_set_bad_image.
2261         Fixes #558124.
2263 2009-11-25  Sebastien Pouliot  <sebastien@ximian.com> 
2265         * verify.c (mono_method_verify): Don't free ctx.params items if 
2266         we aborted while inflating the ctx.locals. Complete previous fix
2268 2009-11-25  Sebastien Pouliot  <sebastien@ximian.com>
2270         * verify.c (mono_method_verify): Use the uninflated type name, 
2271         when the inflated is null, to report errors. Also take care when
2272         freeing, not to free everything since, in case of an error, some
2273         stuff would be copies (i.e. not allocated by the function itself)
2274         Fix bug #558145
2276 2009-11-24  Rodrigo Kumpera  <rkumpera@novell.com>
2278         * verify.c (stack_push, stack_pop, stack_pop_safe): Assert if we underflow
2279         or overflow. The caller must have done this check explicitly. This guard us
2280         from accessing invalid memory.
2282         * verify.c (do_push_static_field): Check for stack overflow.
2284         Fixes #553333.
2286 2009-11-24  Rodrigo Kumpera  <rkumpera@novell.com>
2288         * loader.c (find_method_in_class): Don't crash if the signature cannot
2289         be resolved.
2291         * metadata.c (mono_metadata_parse_generic_param): Return NULL instead
2292         of asserting for the case of invalid params.
2294         Fixes #553304.
2296 2009-11-24  Sebastien Pouliot  <sebastien@ximian.com>
2298         * image.c (mono_image_load_module): Fix crash when a bad assembly
2299         has no module at all (fix bug #553412) and also replace the 
2300         g_assert with a return NULL (documented return value for failure)
2302 2009-11-23  Zoltan Varga  <vargaz@gmail.com>
2304         * debug-helpers.c (mono_type_get_desc): Handle typedbyref.
2306 2009-11-23  Miguel de Icaza  <miguel@novell.com>
2308         * file-io.c: Change FindFirst/FindNext/FindClose API to return the
2309         file attribute to managed code and avoid doing the mask/attribute
2310         checks here. 
2312 2009-11-22  Miguel de Icaza  <miguel@novell.com>
2314         * file-io.c: Surface a smart FindFirst/FindNext/FindClose API to
2315         the managed world.
2317         * icall-def.h: New entry points.
2318         
2319 2009-11-19  Mark Probst  <mark.probst@gmail.com>
2321         * process.c: Don't put references to managed objects into a
2322         g_ptr_array.
2324 2009-11-18  Sebastien Pouliot  <sebastien@ximian.com>
2326         * class.c (can_access_internals): Allow CoreCLR to participate in
2327         allowing (or not) [InternalsVisibleTo] between assemblies.
2328         * security-core-clr.c|h: Make sure that only trusted code (a 
2329         superset of platform code) can access the internals of platform
2330         code.
2332 Mon Nov 16 16:28:11 CET 2009 Paolo Molaro <lupus@ximian.com>
2334         * reflection.c: use the correct base class to get the virtual method
2335         "get_UnderlyingSystemType" and speed up the icall. Fixes bug #555013.
2337 2009-11-16  Sebastien Pouliot  <sebastien@ximian.com>
2339         * security-core-clr.c (get_caller_no_reflection_related): 
2340         [Mono]Type.InvokeMember is outside System.Reflection[.Emit] but
2341         it's still reflection and must be filtered correctly.
2343 2009-11-16  Mark Probst  <mark.probst@gmail.com>
2345         * object.c (compute_class_bitmap): Fix for large bitmaps.
2347 2009-11-15  Zoltan Varga  <vargaz@gmail.com>
2349         (mono_gc_get_suspend_signal): Fix the build with a system libgc.
2351         * boehm-gc.c (mono_gc_base_init): Applied patch from DKoushik K. Dutta (
2352         koush@koushikdutta.com). Disable GC_no_dls on android.
2354 2009-11-12  Mark Probst  <mark.probst@gmail.com>
2356         * sgen-gc.c (find_tlab_next_from_address): Handle the case where
2357         tlab_next points outside the TLAB because the allocator was
2358         interrupted.
2360 2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
2362         * reflection.c (mono_image_module_basic_init): Handle exceptions correctly.
2364 2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
2366         * object-internals.h: Change signature for mono_string_to_utf8_image.
2368         * object.c (mono_string_to_utf8_image): Change signature to take a MonoError
2369         argument.
2371         * reflection.c: Take care of mono_string_to_utf8_image change and avoid raising
2372         exceptions due to mono_string_to_utf8.
2374 2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
2376         * object-internals.h: Change signature for mono_string_to_utf8_mp.
2378         * object.c (mono_remote_class): Make sure all resources are released before
2379         raising an exception.
2381         * object.c (mono_print_unhandled_exception): Avoid raising an exception.
2383 2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
2385         * mono-perfcounters.c (network_get_impl): Change variable initialization
2386         ordering to fix potential memory leak in case of exceptions.
2388         * mono-perfcounters.c (mono_perfcounter_create): Properly handle badly
2389         encoded strings.
2390         
2391 2009-11-09  Rodrigo Kumpera  <rkumpera@novell.com>
2393         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): Change
2394         variable initialization ordering to fix potential memory leak in case
2395         of exceptions.
2397 2009-11-09  Zoltan Varga  <vargaz@gmail.com>
2399         * icall.c (mono_ArgIterator_Setup): Remove the MONO_ARCH_REGPARMS stuff, its not
2400         needed.
2402 2009-11-07  Rodrigo Kumpera  <rkumpera@novell.com>
2404         * appdomain.c: Fix shadow path code to better deal with exceptions.
2406 2009-11-07  Rodrigo Kumpera  <rkumpera@novell.com>
2408         * appdomain.c: Use checked version of mono_string_to_utf8 to avoid raising an
2409         exception in the middle of the runtime code.
2411 2009-11-07  Rodrigo Kumpera  <rkumpera@novell.com>
2413         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): Don't
2414         leak memory with broken envvar value.
2416 2009-11-06  Mark Probst  <mark.probst@gmail.com>
2418         * reflection.c (mono_reflection_setup_internal_class): Because
2419         nested classes are not added to the name cache, we must put them
2420         in the reflection_info_unregister_classes list.
2422 2009-11-05  Sebastien Pouliot  <sebastien@ximian.com>
2424         * class.c: When CoreCLR is enabled don't call mono_init_com_types
2425         if MONO_CLASS_IS_IMPORT return true unless the type reside in 
2426         platform (trusted) code. Instead we return a TypeLoadException to
2427         be thrown later. This is the exception thrown by Silverlight 2 if
2428         a type, inside application (user) code is marked with [ComImport]
2430 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2432         * icall.c (ves_icall_System_Diagnostics_Debugger_IsAttached_internal): Call
2433         mono_is_debugger_attached () too.
2435         * mono-debug.c (mono_is_debugger_attached): New helper function.
2436         (mono_set_is_debugger_attached): Ditto.
2438 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2440         * object-internals.h: Add mono_string_to_utf8_checked.
2442         * object.c: Implement mono_string_to_utf8_checked.
2444 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2446         * class.c: Add missing check for load errors after every
2447         call to mono_class_setup_fields
2449         Fixes #552282.
2451 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2453         metadata-verify.c (verify_tables_schema): Fix the error message.
2455 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2457         * metadata.c: Change event table schema to use TDOR for event type
2458         as this is what it's meant to be.
2460         * metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
2461         to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
2462         entry.
2464         * metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
2465         longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
2466         rows in MONO_TABLE_GENERICPARAM.
2468         Fixes #552289.
2470 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2472         * class.c (mono_image_add_to_name_cache): Assert on duplicate
2473         insertion.
2475         * reflection.c (mono_reflection_setup_internal_class): Avoid
2476         registering a gc root the same MonoClass multiple times.
2477         Don't register nested types on the global scope as they should
2478         not be available there.
2480 2009-11-05  Rolf Bjarne Kvinge  <RKvinge@novell.com>
2482         * culture-info-tables.h: regenerated.
2484 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
2486         * debug-helpers.c: avoid g_strdup() in mono_type_full_name().
2488 2009-11-04  Sebastien Pouliot  <sebastien@ximian.com>
2490         * string-icalls.c|h: Remove string internal calls that are not 
2491         used anymore by the class libraries.
2492         * icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
2493         which is not used in the class librairies.
2494         * icall-def.h: Update tables.
2496 2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
2498         * class.h: Move mono_class_inflate_generic_type_checked...
2500         * class-internals.h: to here and make it internal. We don't want to
2501         further expose MonoGenericContext. 
2503 2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
2505         * verify.c (mono_method_verify): Improve error message.
2507 2009-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
2509         * reflection.c (fieldref_encode_signature): If field_image is NULL then
2510         the token is already properly encoded. Fixs 4.0 build.
2512 2009-11-04  Rolf Bjarne Kvinge  <RKvinge@novell.com>
2514         * locales.c (construct_number_format): Check if the number index is
2515         valid before trying to use it, if not, just return.
2516         
2517 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
2519         * marshal.c (mono_marshal_get_runtime_invoke): Don't reset abort exceptions,
2520         since that loses the abort state. Fixes #539394.
2522 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
2524         * marshal.c (mono_marshal_get_native_wrapper): For icall wrappers, add an
2525         explicit this argument to the call signature.
2526         (mono_marshal_get_icall_wrapper): Ditto.
2528 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2530         * reflection.c (fieldref_encode_signature): Add new field_image parameter
2531         to indicate which assembly to use when resolving a custom-mod.
2533         Fixes handling of volatile fields used across assemblies as reported in #551513.
2535 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2537         * loader.c: Improve error messages.
2539 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2541         * class.c (mono_class_setup_methods): Only give a slot for virtual methods
2542         of interfaces. Fixes IKVM.
2544         * class.c (mono_class_setup_vtable_general): Improve debug spew.
2546 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2548         * verify.c (verifier_inflate_type): Return the inflated type on success.
2550 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
2552         * debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.
2554         * threads.c (mono_thread_attach): Call the profiler thread start callback.
2556         * object-internals.h (_MonoThreadInternal): Add a 'flags' field.
2558         * threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
2559         flag set.
2561         * profiler.c: Add new profiler callbacks for runtime invoke.
2563         * object.c (mono_runtime_invoke): Call the runtime invoke callbacks.
2565 2009-11-01  Mark Probst  <mark.probst@gmail.com>
2567         * sgen-gc.c: Keep track of the reason for a major collection and
2568         write it to the heap-dump file.
2570 2009-10-31  Miguel de Icaza  <miguel@novell.com>
2572         * threads.c: refactor the code that initializes the
2573         thread_start_args into a reusable function and use this in the two
2574         methods that start up threads.
2576 2009-10-31  Zoltan Varga  <vargaz@gmail.com>
2578         * appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
2579         Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.
2581 2009-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
2583         * mono-perfcounters.c: add the "_Total" instance for CPU counters.
2584         Until now, we only had the per-cpu(core) counters.
2586 2009-10-28  Mark Probst  <mark.probst@gmail.com>
2588         * gc-internal.h, boehm-gc, sgen-gc.c, null-gc: Add
2589         mono_gc_get_suspend_signal(), which returns the suspend signal
2590         number used by the GC.
2592 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
2594         * threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.
2596         * threads.c (start_wrapper): Call mono_profiler_thread_start () later after
2597         signalling start_notify.
2599 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2601         * appdomain.c: do not test the st_mode field for shadow-copies.
2602         Fixes bug #545276.
2604 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2606         * threadpool.[ch]: added hooks for thread start/finish and item
2607         processing begin/end. For monotouch use only.
2609 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
2611         * threads.c (mono_thread_get_name): New helper function.
2613         * reflection.c (resolve_object): Set handle_class for strings too.
2614         (mono_reflection_create_custom_attr_data_args): New helper function to decode
2615         a cattr blob into a set of arrays and structures without creating the custom
2616         attributes themselves.
2617         (create_custom_attr_data): Simplify using create_custom_attr_data_args.
2619         * mono-debug.c (mono_debug_il_offset_from_address): New helper function.
2621         * debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
2622         function.
2624 2009-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2626         * verify.c: Replace calls to mono_class_inflate_generic_type with
2627         mono_class_inflate_generic_type_checked. Fixes #480005.
2629 2009-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2631         * class.c (mono_class_inflate_generic_type_with_mempool): Clear the error
2632         object since not all paths lead to callees initing it.
2634 2009-10-23  Alp Toker  <alp@nuanti.com>
2636         Fix embedding API breakage from r144688. mono-compiler.h is an internal
2637         header and should not be shipped:
2639         * class.h: Back out MONO_DEPRECATED change. Currently depends on config.h
2640         which is specific to the mono build. Not going to work.
2642 2009-10-23  Sebastien Pouliot  <sebastien@ximian.com>
2644         * security-manager.c: Report if core-clr is active from
2645         ves_icall_System_Security_SecurityManager_get_SecurityEnabled
2646         to allow Moonlight BCL to behave appropriately (both in browser
2647         and outside, e.g. smcs)
2649 2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
2651         * mono-config.c: ignore UTF-8 BOM and report parser errors.
2652         Fixes bug #549108.
2654 2009-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2656         * class.c: fix typo.
2658 2009-10-22  Rodrigo Kumpera  <rkumpera@novell.com>
2660         * class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
2661         a MonoError parameter.
2663         * class.h: Mark mono_class_inflate_generic_type deprecated, add new mono_class_inflate_generic_type_checked
2664         version that can does proper error handling.
2666         * class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.
2668         * class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.
2670         * class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.
2672 2009-10-20  Zoltan Varga  <vargaz@gmail.com>
2674         * debug-helpers.c (dis_one): Fix the disassembly of empty strings when
2675         NO_UNALIGNED_ACCESS is defined.
2677 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
2679         * marshal.c (mono_string_builder_to_utf16): Applied patch from
2680         Hib Eris  <hib@hiberis.nl>. Return empty string for empty string builders.
2681         Fixes #549173.
2683 2009-10-22  Mark Probst  <mark.probst@gmail.com>
2685         * sgen-gc.c: Shorten sections whenever possible.
2687 2009-10-22  Mark Probst  <mark.probst@gmail.com>
2689         * sgen-gc.c: Use our portable semaphore #defines.
2691 2009-10-22  Mark Probst  <mark.probst@gmail.com>
2693         * sgen-gc.c: A debug option for dumping the heap layout to a file
2694         after each collection.
2696 2009-10-21  Mark Probst  <mark.probst@gmail.com>
2698         * sgen-gc.c: Make managed write barriers atomic via
2699         thread-restarts.
2701 2009-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2703         * verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
2704         methods. Fixes #543021.
2706 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
2708         * socket-io.[ch]: fix VS build.
2710 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
2712         * icall-def.h:
2713         * socket-io.[ch]: implemented SendFile.
2715 2009-10-20  Zoltan Varga  <vargaz@gmail.com>
2717         * class.c (mono_class_create_from_typedef): Initialize class->element_class
2718         before the interfaces to avoid crashes later if class initialization fails.
2719         Fixes #548417.
2721         * marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
2722         Fixes #548276.
2724 2009-10-20  Marek Safar  <marek.safar@gmail.com>
2726         * domain.c: Bump 4.0 version.
2728 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
2730         * assembly.c (mono_assembly_load_reference): Fix leak when 'status'
2731         code is known. (parse_public_key) Remove duplicate (unneeded) NULL
2732         check since 'pubkey' can't be NULL at this stage
2733         * icall.c (ves_icall_System_Array_FastCopy): Add comment about
2734         the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
2735         initialization of 'iter'
2737 2009-10-16  Bill Holmes  <billholmes54@gmail.com>
2739         * cominterop.c : Search the interface parts of vtable to find 
2740           method matches.  Fixes 547030.
2742         Code is contributed under MIT/X11 license.
2744 2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>
2746         * marshal.c: BeginInvoke cannot be called on multicast delegates with
2747         multiple targets. Fixes bug #574426.
2749 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
2751         * profiler.h: Put here the definition of
2752         MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
2753         (and fix the build...).
2755 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
2757         * profiler.c, profiler.h, profiler-private.h:
2758         Added support for different ways of getting call chains in stat mode.
2760 2009-10-12  Mark Probst  <mark.probst@gmail.com>
2762         * object.c, object-internals.h: New function for computing the
2763         size of an array, factored out of mono_array_new_full().  Use
2764         SGen's functions for allocating arrays and vectors.
2766         * sgen-gc.c, gc-internal.h: Special functions for allocating
2767         arrays and vectors without race conditions.  A managed array
2768         allocator method.
2770         * boehm-gc.c, null-gc.c: Don't provide a managed array allocator.
2772 2009-10-12  Mark Probst  <mark.probst@gmail.com>
2774         * object.c, object.h, icall.c: Write barriers do the copying now,
2775         as well, so no need for an additional memcpy.
2777         * sgen-gc.c: Lock when storing remsets.  Do the memory
2778         copying/moving in the write barriers.
2780         * null-gc.c, boehm-gc.c: Write barriers must copy here, too.
2782         * reflection.c: Added an assert.
2784 2009-10-12  Mark Probst  <mark.probst@gmail.com>
2786         * threads.c, process.c: A few missing write barriers.
2788 2009-10-12  Joel W. Reed <joelwreed@gmail.com>
2790         * mono-perfcounters.c, mono-perfcounters-def.h: Add
2791         network performance counters for bytes sent per second, bytes
2792         received per second, and bytes total per second.
2794         Code is contributed under MIT/X11 license.
2796 2009-10-09  Mark Probst  <mark.probst@gmail.com>
2798         * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
2799         Fix warning.
2801 2009-10-09  Mark Probst  <mark.probst@gmail.com>
2803         * threads.c, object-internals.h, object.c: Move code for
2804         transferring an object to a different domain (via
2805         serialization/remoting) to object.c.
2807         * object.c (call_unhandled_exception_delegate): If the exception
2808         is in a different domain than the delegate, transfer the exception
2809         to that domain.
2811 2009-10-07  Zoltan Varga  <vargaz@gmail.com>
2813         * marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
2814         Fixes #322934.
2816 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
2818         * domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.
2820 2009-10-06  Mark Probst  <mark.probst@gmail.com>
2822         * object.c (mono_method_return_message_restore): Handle the case
2823         where the argument is an instance of a generic type.  Fixes
2824         #544446.
2826 2009-10-06  Mark Probst  <mark.probst@gmail.com>
2828         * object.c (set_value): Write barrier fix - we must pass the
2829         count, not the size.
2831 2009-10-05  Zoltan Varga  <vargaz@gmail.com>
2833         * domain.c (mono_init_internal): Print a useful error message when encountering
2834         an old mscorlib, instead of crashing. Fixes #544307.
2836 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
2838         * appdomain.c (copy_app_domain_setup): Fix a warning.
2840         * debug-helpers.c (dis_one): Ditto.
2842 2009-10-04  Mark Probst  <mark.probst@gmail.com>
2844         * domain-internals.h, appdomain.c: The AppDomainSetup is copied
2845         into the new domain, instead of referencing the original one.
2847         * marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
2848         non-static.
2850         * appdomain.c: Corlib version bump.
2852 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2854         * threadpool.c: one more...
2856 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2858         * threadpool.c: forgot a LeaveCriticalSection when telling the idle
2859         threads to die because we're shutting down. delgate5.exe works again.
2861 2009-10-01  Bill Holmes  <billholmes54@gmail.com>
2863         * cominterop.c (mono_marshal_free_ccw_entry): Updating the
2864           ccw_interface_hash table when a ccw is finalized.
2866         Code is contributed under MIT/X11 license.
2868 2009-09-30  Mark Probst  <mark.probst@gmail.com>
2870         * assembly.c, domain.c, image.c, metadata-internals.h: Split
2871         domain and image unloading into two steps.  We must do this
2872         because clearing the domain in SGen requires the class metadata to
2873         be intact, but we need to free the mono_g_hash_tables in case a
2874         collection occurs during domain unloading and the roots would trip
2875         up the GC.
2877 2009-09-30  Mark Probst  <mark.probst@gmail.com>
2879         * object-internals.h: Remove serialized culture fields from
2880         MonoInternalThread.
2882         * icall-def.h, thread-types.h, threads.c: Remove serialized
2883         culture icalls.
2885         * appdomain.c: Corlib version bump.
2887 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
2889         * marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
2890         Fixes #543133.
2892 2009-09-30  Mark Probst  <mark.probst@gmail.com>
2894         * sgen-gc.c: Try to shorten the new section after a major
2895         allocation to avoid ever-growing sections.
2897 2009-10-13  Martin Baulig  <martin@ximian.com>
2899         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
2900         `MONO_DEBUGGER_EVENT_TRAMPOLINE' into
2901         `MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
2902         `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
2904         * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.
2906 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
2908         * threadpool.c: fixed the order in which 'completed' and the wait
2909         handle, if any, are set.  Fixes bug #542933 and delegate2.exe
2910         No need to use the wait_handle field of ASyncCall. Make sure the
2911         threadpool is active when adding a job or queueing an idle thread.
2913 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
2915         * object.c (mono_unhandled_exception): Fix a crash if there is no main thread.
2917         * threads.c (build_wait_tids): Fix a crash if there is no main thread, like
2918         when using --compile-all.
2920 2009-09-27  Mark Probst  <mark.probst@gmail.com>
2922         * metadata.c (free_generic_class): Unregister the field_objects
2923         roots if we're using SGen.
2925 2009-09-27  Mark Probst  <mark.probst@gmail.com>
2927         * reflection.c (mono_dynamic_image_free): Deregister the GC root
2928         for GenericParamTableEntry.gparam.
2930 2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2932         * marshal.c: don't create the handle when calling. It is created later
2933         if needed.
2935 2009-09-26  Mark Probst  <mark.probst@gmail.com>
2937         * sgen-gc.c: Warning fixes.
2939 2009-09-26  Mark Probst  <mark.probst@gmail.com>
2941         * sgen-gc.c: New debug option "xdomain-checks", which scans the
2942         whole heap for cross-domain references before each collection.
2944         * sgen-scan-object.h: The scan action can now use SCAN to scan the
2945         object.
2947         * threadpool-internals.h, threadpool.c: New function
2948         mono_thread_pool_is_queue_array() for checking whether a given
2949         array is used as a (cross-domain) queue by the thread pool code.
2951 2009-09-26  Mark Probst  <mark.probst@gmail.com>
2953         * sgen-gc.c: New function mono_gc_scan_for_specific_ref() which
2954         searches the whole heap for objects containing a specific
2955         reference.  Only for debugging.
2957 2009-09-26  Mark Probst  <mark.probst@gmail.com>
2959         * appdomain.c (MONO_CORLIB_VERSION): Bumped.
2961         * icall-def.h, threads.c, threads-types.h: New icalls for copying
2962         byte arrays between domains.
2964 2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
2966         * threadpool.c:
2967         * class-internals.h:
2968         * mono-perfcounters-def.h:
2969         * mono-perfcounters.c:
2970         -There is a list of idle threads
2971         -Each of those idle threads wait on their own WaitHandle instead
2972         of all of them using the same semaphore. When a new work item is
2973         added, the job is assigned directly to an idle thread or a newly
2974         created one if possible and then the handle for that thread is
2975         signaled. Compare that to the current approach where all the
2976         threads in the pool compete to dequeue a job from the same
2977         queue.
2978         -New struct ThreadPool that brings together the bunch of static
2979         variable for each threadpool (IO and regular).
2980         -New performance counters: # of items added and its rate per
2981         threadpool. The rate will be used later, perhaps together with
2982         other perf. counters, to decide when idle threads should exit.
2984 2009-09-25  Jonathan Chambers  <joncham@gmail.com>
2986         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal): 
2987         Fix typo on Windows build.      
2988         (ves_icall_System_Net_Sockets_Socket_Accept_internal): Fix typo on Windows build.
2989         
2990         Code is contributed under MIT/X11 license.
2992 2009-09-25  Mark Probst  <mark.probst@gmail.com>
2994         * object-internals.h: The Thread class is split up into Thread and
2995         InternalThread now.  We have exactly one InternalThread per
2996         thread, and at most one Thread per appdomain per thread.  Most
2997         data is stored in InternalThread.  All InternalThread objects live
2998         in the root domain.
3000         * class-internals.h: Add internal_thread_class to MonoDefaults.
3002         * appdomain.c (mono_domain_unload), attach.c (receiver_thread),
3003         domain.c, gc.c, icall-def.h, monitor.c, object.c, sgen-gc.c,
3004         socket-io.c, threadpool.c, thread-types.h, threads.c: Changes
3005         resulting from the split of the Thread class.
3007         * gc-internal.h: Prototype for new function for checking whether a
3008         thread is the finalizer thread.
3010         * appdomain.c: Corlib version bump.
3012 2009-09-25  Rolf Bjarne Kvinge  <RKvinge@novell.com>
3014         * appdomain.c|h: Add a mono_domain_try_unload method which is
3015         equivalent to mono_domain_unload, except that it returns an exception
3016         instead of throwing it. Make mono_domain_unload use the
3017         mono_domain_try_unload method to avoid code-duplication.
3019 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
3021         * debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
3022         a problem.
3024 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
3026         * marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
3027         aborting when a conversion is not implemented.
3029 2009-09-23  Miguel de Icaza  <miguel@novell.com>
3031         * verify.c: when comparing culture strings, use g_ascii_strcmp
3033         * assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
3034         when comparing public key tokens to use memcmp on 16 bytes.   I do
3035         not believe this ever worked as advertised in the past.
3037         The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
3038         which would have always failed earlier.
3040 2009-06-25  Miguel de Icaza  <miguel@novell.com>
3042         * gc.c: Raise a NullArgumentException if the object passed is
3043         null.
3045 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
3047         * image.c (mono_image_close): Atomically decrement the reference count and
3048         remove the image from the hash tables, to prevent another thread from seeing a
3049         dying MonoImage. Fixes #541194.
3051 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3053         * threadpool.c: actually use the minimum number of 'completion ports'
3054         (for us is just a potential worker thread).
3056 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3058         * threadpool.c: remove ares_htable. It does not make sense any more
3059         since the same objects are now stored in GC-tracked arrays while they are
3060         in the queue.
3062 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3064         * threadpool.c: increase the minimum length of the queues to 128.
3065         Remove warning.
3067 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
3069         * marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
3070         return the modified signature used by string ctors.
3072 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
3074         * marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
3075         to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
3076         method, to be used by full-aot.
3078 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
3080         Since the runtime supports lazy initialization of a type's vtable and this can cause a type
3081         to fail, we need to ensure that the vtable is properly initialized at spots were the type must
3082         be known to be good.
3084         * class.c (mono_class_init): Fail array types if their element type fails initialization
3085         as well.
3087         * object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
3088         initialization, additionally we request the element_type vtable to be initialized as well.
3090         This is fine and should not increase the working set in any meaningful way since it's reasonable
3091         to assume       that most code will create an array and eventually populate it, which will require the
3092         type's vtable to be initialized.
3094         * loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.
3096 2009-09-17  Atsushi Enomoto  <atsushi@ximian.com>
3098         * normalization-tables.h : regenerated.
3100 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
3102         * mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
3103         a leb128 encoding can take up to 5 bytes.
3105 2009-09-15  Rodrigo Kumpera  <rkumpera@novell.com>
3107         * class.c (verify_class_overrides): Remove useless argument.
3109         * class.c (mono_class_setup_vtable_general): Move the overrides check to happen
3110         before interface enumeration as this is no longer required.
3112 2009-09-15  Rodrigo Kumpera  <rkumpera@novell.com>
3114         * class.c: New function mono_class_is_assignable_from_slow that is safe to be
3115         used under mono_class_init context. This functions avoid any code path that
3116         calls mono_class_init, which leads it to be slow as some things like the interface
3117         bitmap are not available.
3119         * class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
3120         of it's own broken version. Fixes the verifier part of #538588.
3122         * class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
3123         API.
3125 2009-09-15  Mark Probst  <mark.probst@gmail.com>
3127         * class.c (mono_class_init): Always set an exception in a class if
3128         vtable setup fails.  Fixes #538577.
3130         * generic-sharing.c: Raise an exception if mono_class_vtable()
3131         returns NULL.
3133 2009-09-13  Zoltan Varga  <vargaz@gmail.com>
3135         * marshal.c (mono_marshal_get_runtime_invoke): Don't share instance 
3136         methods of vtypes, as they could be incorrectly shared with static methods
3137         taking an IntPtr argument.
3139 2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
3141         * domain.c:
3142         * object.c:
3143         * class-internals.h: renamed waithandle_class to
3144         manualresetevent_class.
3145         * marshal.c: propagate the exception if a remoting BeginInvoke call
3146         fails.
3148 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
3150         * object.c: Properly handle vtable failures.
3152 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
3154         * socket-io.c: Assert on vtable failure.
3156         * mono-mlist.c: Assert on vtable failure.
3158 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
3160         * marshal.c: Assert on vtable failure.
3162 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
3164         * icall.c: Properly handle vtable failures.
3166 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
3168         * debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.
3170 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
3172         * cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.
3174         * console-unix.c (do_console_cancel_event): Same.
3176 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
3178         * class-internals.h: Add mono_class_vtable_full function that allows control
3179         if an exception should be raised or not.
3181         * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
3182         to do what its documentation say, that is to return NULL and set exception_type on
3183         failure.
3185         * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
3186         and change the code to honor it.
3188 2009-09-11  Rodrigo Kumpera  <rkumpera@novell.com>
3190         * verify.c: Fix typo in error message.
3192 2009-09-10  Sebastien Pouliot  <sebastien@ximian.com>
3194         * security-core-clr.c: Fix default_platform_check so it can run
3195         the runtime coreclr tests (without an infinite recursion when
3196         throwing an exception).
3198 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
3200         object.c (mono_delegate_ctor_with_method): Guard against null method.
3202 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
3204         * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
3205         that should be replaced with error handling later.
3207 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
3209         * marshal.c (mono_delegate_end_invoke): Fix warning.
3211 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
3213         * loader.c (mono_field_from_token): Properly handle invalid
3214         dynamic tokens.
3216 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
3218         * pedump.c (verify_image_file): Skip types that can't be
3219         decoded.
3221 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
3223         * verify.c: Look for recursive valuetypes only against the
3224         type been initialized as this is a lot simpler and works.
3226 2009-09-10  Rodrigo Kumpera  <rkumpera@novell.com>
3228         * verify.c: Ensure that fields are properly loaded before
3229         checking them.
3231 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
3233         * object.c (mono_object_get_virtual_method) : Call 
3234           mono_cominterop_get_invoke if the object is a COM object.
3236         Code is contributed under MIT/X11 license.
3238 2009-09-09  Rodrigo Kumpera  <rkumpera@novell.com>
3240         * verify.c: Check for recursive valuetype definitions.
3242 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
3244         Use inheritance-aware interface offsets. Inherited types use the same offsets
3245         of their parents. This reduce offset duplication in case more than one type in
3246         the inheritance tree explicitly implements the same interface.
3248         This also removes a source of vtable bubbles found in #532409. An abstract type
3249         isn't required to provide abstract methods to all interfaces it implements, which
3250         resulted in a bubble with the previous scheme as the child would get a non-full
3251         vtable from its parent. We fail all concrete types with vtable bubbles, so this
3252         should be fixed.
3254         This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
3255         it's expected to not cause any significant increase beyond that.
3257         * class.c (setup_interface_offsets): Compute super class iface offsets
3258         first to force sharing.
3260         * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
3261         dumping only the relevant ones.
3263         * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
3264         methods a new slot regardless if they belong to an interface or not. This allows
3265         an inherited type to override the iface method separately from the class one.
3267 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
3269         * threadpool.c: make the Sleep() alertable to prevent delays exiting
3270         applications that take less than 2s to execute.
3271         Bug #524984 fixed.
3273 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
3275         * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
3277         * object.c (mono_get_runtime_callbacks): New helper function to return
3278         the runtime callbacks.
3280         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
3281         mono_get_runtime_build_info () as the display name.
3282         
3283 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
3285         * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
3286         argument, since NEWARR expects a native int. Fixes #481559.
3288 2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>
3290         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
3291         against broken SRE methods.
3293 2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>
3295         * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
3296         a NULL variable. Abort early on failure.
3298 2009-09-03  Rodrigo Kumpera  <rkumpera@novell.com>
3300         * class.c (can_access_type): Fail visibility test for non nested
3301         types with nested visibility.
3303 2009-09-02  Sebastien Pouliot  <sebastien@ximian.com>
3305         * assembly.c (parse_public_key): Avoid allocating (and not 
3306         freeing) the public key array when it's not requested by the 
3307         caller.
3308         * threads.c (mono_thread_manage, mono_thread_create_internal, 
3309         ves_icall_System_Threading_Thread_Thread_internal): Free 
3310         allocated memory on error.
3312 2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
3314         * icall.c, icall-def.h: Remove some dead code from early SRE changes.
3316 2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
3318         * class.c (mono_class_setup_fields): Remove duplicated local variable
3319         named gklass.
3320         Rename gklass to gtd to reflect the fact that it points to the generic
3321         type definition.
3322         Remove the duplicated call to mono_class_setup_fields on gtd and move
3323         the error check to the beginning.
3325 2009-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
3327         * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
3328         Remove cruft of the previous patch.
3330 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
3332         * metadata-verify.c (verify_method_table): Check for abstract + final.
3333         Fixes #534175.
3335 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
3337         * verify.c (verify_class_fields): Check for duplicate fields.
3339 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
3341         * metadata-verify.c: Verify the typeref table for duplicates.
3343 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
3345         This reverts r140936 and properly handles interfaces with static methods. The
3346         right fix is to ensure vtables without bubles which is an easier to verify
3347         constraint. We should avoid such special cases as of the reverted patch as those
3348         only make the runtime more brittle.
3350         * class.c (mono_class_setup_vtable_general): Revert previous change that handle
3351         static methods on interfaces.
3353         * class.c (setup_interface_offsets): Use the number of virtual methods when
3354         calculating interface offsets instead of the number of methods. This way we
3355         avoid bubles on the layout.
3357 2009-08-31  Rodrigo Kumpera  <rkumpera@novell.com>
3359         * metadata-verify.c (verify_metadata_header): Some very smart
3360         obfuscators like to add extra stream headers. Ignore them.
3362 2009-08-30  Zoltan Varga  <vargaz@gmail.com>
3364         * class.c (mono_class_setup_vtable_general): Verify interfaces with static
3365         methods correctly.
3367 2009-08-29  Rodrigo Kumpera  <rkumpera@novell.com>
3369         * metadata-verify.c: Verify for duplicated types.
3371 2009-08-28  Rodrigo Kumpera  <rkumpera@novell.com>
3373         * metadata-verify.c (verify_typedef_table): Verify for nested types
3374         without an entry on the nested class table.
3376 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
3378         * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
3379         <tom_hindle@sil.org>. Add locking around hash table accesses.
3381 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
3383         * verify.c (mono_verifier_verify_class): Verify all interface if
3384         really are interfaces. Fixes #534184.
3386 2009-08-27  Rodrigo Kumpera  <rkumpera@novell.com>
3388         * pedump.c: Initialize all types during metadata validation so we report
3389         errors only detected as part of class initialization.
3391 2009-08-26  Rodrigo Kumpera  <rkumpera@novell.com>
3393         * metadata-verify.c (verify_method_table): PInvoke requires method to
3394         be static. Fixes #534189
3396 2009-08-26  Zoltan Varga  <vargaz@gmail.com>
3398         * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
3399         being NULL.
3401 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
3403         * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
3404         for holes or bad methods. Fixes #525314.
3406 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
3408         * class.c (setup_interface_offsets): Don't allocate slot
3409         for the same interface multiple times. This creates bubbles
3410         that waster space and make vtable verification harder.
3412         The same interface get a slot multiple times since we need
3413         to get the closure of all implemented interfaces, which means
3414         the same interface is reported multiple times.
3416 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
3418         * verify.c (mono_verifier_verify_class): Don't check the fields
3419         of generic instances since the context on which they got expanded
3420         might lead to false positives.
3422         Such thing happens when a generic type is inflated in the context
3423         of a generic method and the inflated type of a field turns into a
3424         generic method argument, which causes the checking code to think
3425         it's an invalid class when it's not.
3427 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
3429         * verify.c (mono_type_is_valid_in_context): Verify if type
3430         is NULL and remove duplicate test.
3432 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
3434         * verify.c (mono_verifier_verify_class): Check fields for
3435         invalid generic arguments.
3437 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
3439         * class.c (verify_class_overrides): Verify if for static
3440         and non virtual methods.
3442 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
3444         * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
3445         Check for errors after retrieving the vtable.
3447 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
3449         * class.c (mono_class_setup_vtable_general): Verify
3450         if method overrides are valid before processing them.
3452 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
3454         * marshal.c (mono_array_to_lparray): Fix minimal build with
3455         cominterop disabled.
3457         * marshal.c (mono_free_lparray): Same.
3459 2009-08-21  Mark Probst  <mark.probst@gmail.com>
3461         * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
3462         the hash function for the ares_htable.
3464 2009-08-20  Rodrigo Kumpera  <rkumpera@novell.com>
3466         * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
3467         bit for assembly flags. MS is ok with it but there is no spec anywhere
3468         on its mean
3470 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3472         * class.c (mono_class_create_from_typedef): Emit profiler events
3473         in all cases.
3475 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3477         * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
3478         Release memory on failure.
3480 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3482         * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
3483         to the internal API.
3485         * metadata.c (get_constraints): Use a single-linked table as we don't
3486         traverse it backward. Fail and return FALSE if only of the contraint types
3487         is not found.
3489         * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
3490         to mono_metadata_load_generic_param_constraints except for having a return value.
3491         This has to be done since the later is part of the public API.
3493         * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
3494         and fail the type.
3496         * loader.c (mono_get_method_from_token): Properly check the loading of constraints
3497         and fail the method.
3499 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3501         * metadata-verify.c (is_valid_method_header): Add work-around to deal
3502         with MS broken behavior of emmitting EH section sizes without the
3503         header size added.
3505 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3507         * metadata.c (mono_type_create_from_typespec): Don't allocate image
3508         memory until we're sure that we'll need it. This avoids leaking for
3509         broken types or duplicated instantiation.
3511 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3513         * metadata-verify.c (is_valid_method_header): Fix stupid formating
3514         mistake.
3516 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
3518         * metadata-verify.c (is_valid_method_header): Fix number of clauses
3519         and expected size calculation.
3521 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3523         * class.c (mono_class_get_field_idx): Add fixme for broken
3524         behavior for types with multiple fields with the same name.
3525         I would rather fix it, but have no idea on how to generate
3526         such artifact for testing.
3528 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3530         * verify.c (verifier_load_field): We should allow references to
3531         fields to be made using the generic type definition. It's up to
3532         the loader system to fail invalid ops.
3534         * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
3535         are invalid.
3537 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3539         * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
3541         * metadata-internals.h: Fix declaration of 
3542         mono_metadata_interfaces_from_typedef_full.
3544         * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
3545         heap_alloc_result parameter that controls if the result should be
3546         g_malloc'd.
3548         * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
3549         array be g_malloc'd and properly document this public API function.
3551 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3553         * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
3554         remove METHOD_HEADER_TINY_FORMAT1.
3556         * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
3558         * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
3560         Both spec and MS uses only 2 bits to enumerate the kind of header.
3561         So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
3562         is superfluous, only used for tiny headers with odd code lengths.
3564         This change also make sure that mono doesn't wronly interpret bit 2
3565         of fat header flags, which is currently reserved.
3567 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3569         * metadata.c (do_mono_metadata_parse_type): Do error
3570         checking for element types. Don't abort if presented
3571         with a broken type kind.
3573 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
3575         * metadata.c (mono_metadata_parse_method_signature_full):
3576         Gracefully fail bad vararg signatures.
3578 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3580         * profiler.c:
3581         * class.c: Fix warnings for uninitialized variables.
3583 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3585         * icall.c: Fix _NSGetEnviron method declaration warning.
3587 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3589         * icall.c:
3590         * reflection.c: Make bitwise checks explicit.
3592 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3594         * debug-helpers.c:
3595         * marshal.c: Fix printf warnings.
3597 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
3599         * reflection.c (encode_cattr_value): Fix a warning.
3601 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
3603         * metadata.c (mono_metadata_parse_array_full): Fix memory leak
3604         of array bounds.
3606 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
3608         * loader.c (mono_method_signature): Don't assert on broken
3609         signature. Print a more useful error message.
3611 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
3613         * loader.c (mono_method_get_marshal_info): Assert if
3614         signature is invalid. Bounds check stores to the
3615         mspecs array;
3617 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
3619         * loader.c (field_from_memberref): Fix warning.
3621 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
3623         * loader.c (mono_method_get_param_names): Check if signature
3624         is null. Don't store beyond the size of the name array.
3626 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
3628         * loader.c (mono_get_method_constrained): Check if signature
3629         is null.
3631 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
3633         * loader.c (mono_loader_set_error_bad_image): Improve
3634         error messages.
3636 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
3638         * loader.c (mono_get_method_full): Convert an assertion
3639         into a loader error.
3641 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
3643         * class-internals.h, class.c: Better naming and documentation.
3645 2009-08-17  Zoltan Varga  <vargaz@gmail.com>
3647         * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
3648         obj is NULL.
3650 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
3652         * loader.c (mono_method_get_signature_full): Fail gracefully if signature
3653         parsing fails.
3655 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
3657         * loader.c (mono_loader_error_prepare_exception): Handle missing field
3658         errors with no class set.
3660         * loader.c (field_from_memberref): If the field signature is of the wrong
3661         type fail with a MissingFieldException instead of a BadImageException as
3662         this is the behavior observed on MS. 
3664 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
3666         * loader.c (field_from_memberref): Don't crash if either the field
3667         signature or the typespec class are invalid.
3669 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
3671         * verify.c (verifier_load_field): Don't allow field related
3672         ops to reference fields on generic type definition.
3674 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
3676         * metadata-verify.c: Add new warning level for errors specified
3677         by ECMA 335 but that MS ignores.
3679         * metadata-verify.c (verify_method_table): Make compiler controled
3680         visibility + (rt)specialname error a warning as MS ignores this. Ignoring
3681         this check is safe because the end result will only be some visibility
3682         exceptions been thrown.
3684 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
3686         * verify.c (get_boxable_mono_type): Don't allow the
3687         use of the generic type definition on boxed type positions.
3689         Fixes #531237.
3691 2009-08-14  Mark Probst  <mark.probst@gmail.com>
3693         * threadpool.c: Make sure no cross-domain references remain in
3694         ares_htable or the arrays that are thrown away when resizing.
3696 2009-08-14  Mark Probst  <mark.probst@gmail.com>
3698         * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
3699         list of classes for which we have to unregister reflection_info
3700         with the GC and which are not in the namespace cache.
3702         * reflection.c (mono_reflection_initialize_generic_parameter): Add
3703         the class to the list.
3705 2009-08-14  Mark Probst  <mark.probst@gmail.com>
3707         * domain.c (mono_domain_free): Unregister the GC roots in
3708         MonoDomain.
3710 2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>
3712         * reflection.c (mono_reflection_type_get_handle): Fix typo.
3714 2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>
3716         * class.c: Add mono_class_get_field_from_name_full which does
3717         the same as mono_class_get_field_from_name but does check field
3718         signature as well.
3720         * class-internals.h: Export mono_class_get_field_from_name_full as
3721         part of the internal API.
3723         * loader.c (field_from_memberref): Search fields by name and signature
3724         as it's valid to have two fields with same name but different types.
3726         Fixes #528055.
3728 2009-08-10  Rodrigo Kumpera  <rkumpera@novell.com>
3730         * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
3732         * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
3734         * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
3735         System.Type.
3737 2009-08-13  Zoltan Varga  <vargaz@gmail.com>
3739         * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
3741         * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
3743 2009-08-12  Mark Probst  <mark.probst@gmail.com>
3745         * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
3746         to sgen-scan-object.h, which can be included and parameterized via
3747         macros.
3749         * Makefile.am: sgen-scan-object.h added.
3751 2009-08-12  Mark Probst  <mark.probst@gmail.com>
3753         * gc.c: #define GC_dont_gc if we're compiling with SGen.
3755 2009-08-12  Mark Probst  <mark.probst@gmail.com>
3757         * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
3758         before clearing a domain in the GC.
3760 2009-08-12  Mark Probst  <mark.probst@gmail.com>
3762         * exception.c (mono_exception_from_name_domain): Actually create
3763         the exception in the specified domain.
3765         * appdomain.c (mono_domain_create_appdomain_internal): Create the
3766         OutOfMemoryException a bit later so that the domain is inialized
3767         "enough" that it works.
3769 2009-08-12  Mark Probst  <mark.probst@gmail.com>
3771         * threads.c (thread_cleanup): Clean up the cached_culture_info
3772         array to prevent cross-domain references.
3774 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
3776         * metadata.c: more documentation for MonoType accessors.
3778 2009-08-11  Raja R Harinath  <harinath@hurrynot.org>
3780         Fix incorrect size definitions where the tail array isn't a list
3781         of pointers
3782         * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
3783         define size.
3784         * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
3785         * metadata.h (MONO_SIZEOF_TYPE): Likewise.
3786         * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
3788 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3790         * reflection.h:
3791         * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
3793 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3795         * metadata.c:
3796         * loader.c:
3797         * metadata-internals.h:
3798         * method-builder.c:
3799         * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
3801 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3803         * cominterop.c:
3804         * metadata.c:
3805         * metadata.h:
3806         * loader.c:
3807         * marshal.c:
3808         * reflection.c: #define for sizeof in MonoType and
3809         MonoMethodSignature.
3811 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3813         * domain.c:
3814         * domain-internals.h: add and use #define's instead of sizeof()
3815         for MonoJitInfo and MonoJitInfoTable.
3817 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3819         * object.c:
3820         * class.h: use #define instead of sizeof() for MonoRemoteClass.
3822 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3824         * metadata.c:
3825         * metadata.h:
3826         * object.c:
3827         * class-internals.h:
3828         * generic-sharing.c:
3829         * marshal.c: use a #define instead of sizeof() for a few
3830         structures that use a zero-length array.
3832 2009-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
3834         * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
3835         to handle inflated generic methods.
3837         * appdomain.c: Bump corlib version.
3839         * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
3840         instances.
3842         * reflection.c (fixup_method): Same
3844         * reflection.c (resolve_object): Same.
3846         * reflection.c (inflate_method): Replace a g_assert_not_reached with a
3847         g_error and a decent message.
3849 2009-08-06  Massimiliano Mantione  <massi@ximian.com>
3851         * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
3852         from the object because it could not yet be available globally
3853         (it happens if the profiler tries to create a gchandle on the
3854         MonoThread object of a thread that is still registering itself
3855         with the runtime).
3857 2009-08-04  Rodrigo Kumpera  <rkumpera@novell.com>
3859         * reflection.c (mono_generic_class_get_object): Initialized the
3860         managed type arguments array.
3862         * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
3864         * appdomain.c: Bump corlib version.
3866 2009-08-04  Zoltan Varga  <vargaz@gmail.com>
3868         * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
3869         #527902.
3871 2009-08-03  Zoltan Varga  <vargaz@gmail.com>
3873         * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
3874         Avoid a crash if synch_cs is not set.
3875         
3876         * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
3877         Handle the case when the handle is 0.
3879         * appdomain.c: Bump corlib version.
3881 2009-08-02  Zoltan Varga  <vargaz@gmail.com>
3883         * reflection.c (mono_type_get_object): Fix a warning.
3885 2009-08-01  Mark Probst  <mark.probst@gmail.com>
3887         * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
3888         descriptor here.  We assume it's already been computed.
3890         * generic-sharing.c (instantiate_other_info): Compute the GC
3891         descriptor for info type MONO_RGCTX_INFO_KLASS.
3893 2009-08-01  Mark Probst  <mark.probst@gmail.com>
3895         * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
3896         type, so don't use MONO_OBJECT_SETREF to set a field.
3898 2009-08-01  Mark Probst  <mark.probst@gmail.com>
3900         * gc.c: We were missing one case where invoking a finalizer would
3901         not reset the domain.  Also, in the finalizer thread loop, assert
3902         that we're in the root domain.
3904 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
3906         * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
3907         if the type is not an array.
3909 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
3911         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
3912         method bound to the declaring type of the method. Raise an exception
3913         if the type is not a generic param.
3915 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
3917         * class.c (print_unimplemented_interface_method_info): Print the
3918         full type name.
3920         * class.c (mono_class_setup_vtable_general): When dealing with a
3921         generic instance first check if the generic type definition is
3922         not broken.
3924 2009-02-11 Tom Hindke <tom_hindle@sil.org>
3926         * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
3928         * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
3930         * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
3932         * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
3934         * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
3936         Code is contributed under MIT/X11 license
3938 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
3940         * verify.c: Fix naming of stelem and ldelem.
3942 2009-07-30  Mark Probst  <mark.probst@gmail.com>
3944         * generic-sharing.c: Replace the templates lock with the loader
3945         lock because of very hard to resolve deadlock issues.
3947 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
3949         * icall.c (ves_icall_Type_GetMethodsByName): Use 
3950         mono_class_get_vtable_size () instead of accessing klass->vtable_size
3951         directly. Fixes #525338.
3953         * class.c (mono_class_get_vtable_size): New helper function.
3955         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
3956         the field belongs to the type. Fixes #525733.
3958 2009-07-30  Mark Probst  <mark.probst@gmail.com>
3960         * sgen-gc.c: When we stop a thread and its stack top is not within
3961         its allocated stack (because it's in an altstack signal handler),
3962         restart it and stop it again, until it is.
3964 2009-07-30  Mark Probst  <mark.probst@gmail.com>
3966         * sgen-gc.c: Take a thread's stack top and registers from the
3967         sigcontext in the suspend signal handler.
3969         * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
3970         stuff to sgen-archdep.h.
3972         * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
3973         caller, because have code in sgen-archdep.h to acquire that data.
3975 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
3977         * profiler.c, profiler.h, profiler-private.h:
3978         Added support for keeping track of code chunks and buffers.
3980 2009-07-29 Rodrigo Kumpera  <rkumpera@novell.com>
3982         * metadata-verify.c: Fix endianness problems on decoding functions.
3983         Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
3985 2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
3987         * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
3988         schema for vectors and one dimension SZARRAY.
3990 2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
3992         * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
3993         schema for vectors and one dimension SZARRAY.
3995 2009-07-27  Mark Probst  <mark.probst@gmail.com>
3997         * icall-def.h, thread-types.h, threads.c: New separate icalls for
3998         Interlocked.(Compare)Exchange with object arguments, which invoke
3999         write barriers.
4001 2009-07-26  Miguel de Icaza  <miguel@novell.com>
4003         * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
4004         passed invalid arguments.   Fixes another crasher in the
4005         Silverlight test suite.
4007         * class.c (mono_class_array_element_size): Return 0 for the size
4008         of the class;  This fixes the crasher exposed by :
4010         typeof (void).MakeArrayType ();
4012         * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
4013         if there is no method to dereference.    Put all the code that
4014         depends on this inside the if (method) block.
4016         This fixes the crasher exposed by Microsoft's Silvelright CLR test
4017         suite  ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
4019         With this change, we pass the test.
4020         
4021         * reflection.c (mono_reflection_sighelper_get_signature_local):
4022         Only dereference the assembly if it has been set.    Fixes a
4023         crasher exposed by #525328
4025 2009-07-25  Mark Probst  <mark.probst@gmail.com>
4027         * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
4028         don't perform the store in mono_gc_wbarrier_generic_nostore().
4029         Remove the second argument (value), which is not needed.
4031 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
4033         * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
4034         the build.
4036         * boehm-gc.c: Ditto.
4037         
4038 2009-07-24  Mark Probst  <mark.probst@gmail.com>
4040         * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
4041         not perform the store itself.  Introduce
4042         mono_gc_wbarrier_generic_nostore(), which is the same as
4043         mono_gc_wbarrier_generic_store(), except it doesn't perform the
4044         store.
4046 2009-07-24  Mark Probst  <mark.probst@gmail.com>
4048         * icall.c (ves_icall_System_Array_SetGenericValueImpl):
4049         mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
4050         we still need the memcpy().
4052 2009-07-22  Mark Probst  <mark.probst@gmail.com>
4054         * sgen-gc.c: Align array bounds calculation to mono_array_size_t
4055         so that big arrays are handled correctly.  Always use
4056         safe_object_get_size() to calculate array object sizes, which
4057         takes bounds into account.
4059 2009-07-22  Mark Probst  <mark.probst@gmail.com>
4061         * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
4062         GC descriptor is computed before we use it.
4064 2009-07-22  Mark Probst  <mark.probst@gmail.com>
4066         * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
4067         write barrier if necessary.
4069 2009-07-22  Mark Probst  <mark.probst@gmail.com>
4071         * icall-def.h, icall.c, thread-types.h: New separate icall for
4072         VolatileWrite(object&,object) that uses a write barrier.
4074         * console-unix.c, file-io.c, icall.c, threads.c: Use write
4075         barriers in icalls which write to "ref" or "out" arguments.
4077 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
4079         * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
4080         handler in a separate icall, to reduce the size of the wrappers.
4082 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
4084         * metadata-verify.c (is_valid_typespec_blob): Fix error message.
4086 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
4088         * metadata-verify.c (parse_field): Allow byref field.
4090         * metadata-verify.c (parse_locals_signature): Allow byref locals.
4092         * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
4094 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
4096         * verify.c (do_cast): Fail for any non reference type that isn't boxed.
4097         Fixes #522784.
4099 2009-07-20  Robert Jordan  <robertj@gmx.net>
4101         * cominterop.c (cominterop_get_managed_wrapper_adjusted):
4102         Fix invalid IL in valuetype handling (STOBJ must push the
4103         corresponding class). Fixes bug #523149.
4105         Code is contributed under MIT/X11 license.
4107 2009-07-20  Geoff Norton  <gnorton@novell.com>
4109         * gc.c: Use proper semaphores where available on posix and darwin.
4111 2009-07-19  Geoff Norton  <gnorton@novell.com>
4113         * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
4115 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
4117         * refletion.c (is_sre_usertype): Change name to is_usertype and
4118         invert it's result so it returns true if the type is an user type
4119         and not the opposite.
4121         * reflection.c (is_*_type): Change all of those to use new macro
4122         check_corlib_type_cached that cached the type lookup so we don't
4123         need to do string comparisons all the type. Changed the signature
4124         to take a MonoClass instead.
4126         * reflection.c: Change mono_image_create_token and resolve_object
4127         to use is_sre_* functions.
4129 2009-07-18  Mark Probst  <mark.probst@gmail.com>
4131         * sgen-gc.c: Check for writes to the stack in the managed
4132         wbarrier as well.
4134 2009-07-18  Mark Probst  <mark.probst@gmail.com>
4136         * sgen-gc.c: When a thread is unregistered, don't free its remsets
4137         but put them on a list which is processed with the other thread's
4138         remsets.
4140 2009-07-18  Mark Probst  <mark.probst@gmail.com>
4142         * sgen-gc.c: Fix and enable the internal allocator instead of
4143         using malloc/free (which causes deadlocks).
4145 2009-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
4147         * refletion.c: Fix builds with SRE disabled by adding a minimal
4148         implementation of mono_reflection_type_get_handle.
4150 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
4152         * refletion.c: Make mono_reflection_type_get_handle non static.
4154         * object-internals.h: Export mono_reflection_type_get_handle.
4156         * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
4157         unmanaged handle using mono_reflection_type_get_handle.
4159 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
4161         * refletion.c: Replace all reads of MonoReflectionType::type with
4162         calls to mono_reflection_type_get_handle. Only the functions that
4163         deal with constructing TypeBuilder::type have not been changed
4164         because they have to deal with NULL values.
4166         This is a first step into supporting reflection types that don't
4167         map directly into their unmanaged counterpart.
4169 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
4171         * metadata-verify.c (parse_locals_signature): Don't complain
4172         on signature with zero locals since MS generates it and doesn't
4173         bother with.
4175 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
4177         * reflection.c (mono_image_get_array_token): Resolve return
4178         type using mono_reflection_type_get_handle.
4180         * reflection.c (mono_image_get_array_token): Resolve array method
4181         parent type using mono_reflection_type_get_handle.
4183 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
4185         * reflection.c (mono_image_basic_init): Applied patch from
4186         <Dax@daxxfiles.net>. Set the public key token from the assembly
4187         builder. Fixes #518909.
4189         * appdomain.c: Bump corlib version.
4191 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
4193         * class.c (mono_class_needs_cctor_run): Make this return false if
4194         the class has no cctor.
4196 2009-07-13  Mark Probst  <mark.probst@gmail.com>
4198         * sgen-gc.c: When the minor GC needs to allocate a new section,
4199         invoke the major GC afterwards.
4201 2009-07-14  Bill Holmes  <billholmes54@gmail.com>
4203         * process.c  (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
4204           Applying the window_style field to the SHELLEXECUTEINFO struct.
4206         Code is contributed under MIT/X11 license.
4208 2009-07-13  Mark Probst  <mark.probst@gmail.com>
4210         * sgen-gc.c: Fix the race condition in the unmanaged allocator by
4211         locking earlier.  Fix it in the managed allocator by making sure
4212         that no thread is stopped there before the GC runs.  If we do stop
4213         a thread there, we restart it and let it run a but, until it stops
4214         somewhere else.
4216         * gc-internal.h, gc.c: Function for getting the IP from a signal
4217         context via a function registered by mini.
4219 2009-07-11  Zoltan Varga  <vargaz@gmail.com>
4221         * object-internals.h (MonoIntPtr): New structure describing a boxed
4222         IntPtr.
4224         * object.c (mono_runtime_invoke_array): Handle ptr arguments and
4225         returns. Fixes #519953.
4227         * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
4229 2009-07-09  Mark Probst  <mark.probst@gmail.com>
4231         * class-internals.h, generic-sharing.c: New RGCTX info type for
4232         getting a remoting invoke with check wrapper.
4234 2009-07-07  Geoff Norton  <gnorton@novell.com>
4236         * icall-def.h: Fix the enable-minimal build.
4238 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
4240         * object-internals.h: Add MonoReflectionDerivedType.
4242         * reflection.c: Implement support for PointerType.
4243         Fixed tons of warnings.
4245 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
4247         * object-internals.h: Add MonoReflectionByRefType.
4249         * reflection.c: Implement support for ByRefType.
4251 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
4253         * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
4255         * object-internals.h: Add MonoReflectionArrayType and
4256         mono_reflection_create_unmanaged_type.
4258         * reflection.c: Implement support for ArrayType.
4260 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
4262         * metadata-verify.c (is_valid_method_header): Parse EH block
4263         flags correctly.
4265 2009-07-03  Mark Probst  <mark.probst@gmail.com>
4267         * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
4268         processing the disappearing links, and process disappearing links
4269         in a loop until no new objects are copied.
4271 2009-07-03  Mark Probst  <mark.probst@gmail.com>
4273         * object.c (handle_enum): Invoke the write barrier when copying
4274         value type instances.
4276         * sgen-gc.c: Register remsets for unmanaged write barriers only
4277         when the address written to is actually on the heap.  This makes
4278         set_value() in object.c work without requiring that the result be
4279         on the heap.
4281 2009-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
4283         The runtime wrappers are all bound to a given type that must
4284         exist in the same image. For regular images we use the <Module>
4285         type, which is required to exist for all images.
4287         The <Module> type can't be used for dynamic images because it
4288         might not exist at the time the wrapper is required, so we create
4289         a synthetic type to use instead.
4291         The current code works because of the 2 stage setup of MonoClass,
4292         but once this is gone it will no longer work.
4294         * icall-def.h: Add ModuleBuilder::set_wrappers_type.
4296         * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
4298         * object-internals.h: Export mono_image_set_wrappers_type icall
4299         as part of the internal API.
4301         * marshal.c (get_wrapper_target_class): If the image is dynamic,
4302         use MonoDynamicImage::wrappers_type instead of the <Module> type.
4304         reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
4305         image wrappers_type to the provided value.
4307 2009-07-01 Rodrigo Kumpera  <rkumpera@novell.com>
4309         * appdomain.c (deregister_reflection_info_roots): No need
4310         to use the image lock here.
4312 2009-07-02  Mark Probst  <mark.probst@gmail.com>
4314         * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
4316 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
4318         * threads.c: Store the thread start argument in a hash table instead of
4319         registering it as a root, as libgc doesn't support unregistering roots
4320         under windows, leading to 'too many root sets' errors when many threads
4321         are created.
4323         * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
4324         shutdown, they can still be referenced by the other dying objects.
4325         Fixes #514506.
4327 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
4329         * socket-io.c: DontLinger does not allow LingerOptions.
4331 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
4333         * metadata-verify.c: The spec doesn't mention that it's possible to add
4334         custom attribute to a generic parameter. Fixed.
4336 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
4338         * class.c (inflate_generic_type): Don't crash while trying to output a message
4339         on why we're aborting.
4341 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
4343         * socket-io.c: DontLinger can take an int or a boolean too.
4345 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
4347         * gc.c: check for a null argument to SuppressFinalize () and
4348         ReRegisterForFinalize ().
4350 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
4352         * loader.c (method_from_methodspec): Call into the verifier to check
4353         the signature.
4355         * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
4357         * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
4358         part of the internal API.
4360 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
4362         * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
4363         the signature.
4365         * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
4367         * verify-internals.h: Export mono_verifier_verify_typespec_signature as
4368         part of the internal API.
4370 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
4372         * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
4373         the signature.
4375         * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
4376         blob verification.
4378         * verify-internals.h: Export mono_verifier_verify_memberref_signature as
4379         part of the internal API.
4381 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
4383         * metadata-verify.c: Use is_valid_blob_object to verify blob validity
4384         when doing basic verification. 
4386         This check must be done since the runtime peeks into signatures in much
4387         more places than it does decoding so it makes sense to ensure that all
4388         pointers to blob objects are well formed.
4390 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
4392         * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
4393         Use proper overflow dectection. Fix usage of it.
4395 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
4397         * loader.c (field_from_memberref): Call into the verifier to check
4398         the signature.
4400         * loader.c (mono_method_get_signature_full): Same.
4402         * loader.c (method_from_memberref): Same.
4404         * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
4406         * verify-internals.h: Export mono_verifier_verify_memberref_signature as
4407         part of the internal API.
4409 2009-06-25  Mark Probst  <mark.probst@gmail.com>
4411         * threadpool.c (mono_thread_pool_add): If the domain is unloading
4412         or unloaded, still return an AsyncResult, but don't add it to the
4413         threadpool.
4415 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
4417         * threads.c: fix missing colon when DEBUG is defined.
4419 2009-06-25  Mark Probst  <mark.probst@gmail.com>
4421         * threadpool.c: Don't add new calls to a threadpool if the domain
4422         of the call is unloading or unloaded.  When dequeuing a job, null
4423         the reference in the queue.
4425 2009-06-25  Mark Probst  <mark.probst@gmail.com>
4427         * sgen-gc.c (null_link_in_range): Add the dislink for the old
4428         generation if an object was moved.
4430 2009-06-25  Sylvain Dupont <duposyl@gmail.com>
4432         * cominterop.h cominterop.c marshal.c: Added support for marshalling out 
4433           parameters of type SAFEARRAY[VARIANT].
4435         * reflection.c (encode_marshal_blob): Properly generate element type
4436           (SafeArraySubType marshal attribute option).
4438         Code is contributed under MIT/X11 license.
4440 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
4442         * reflection.c: in mono_method_clear_object () really ensure all the
4443         objects are removed.
4445 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
4447         * loader.c (mono_method_signature): Call into the verifier to check
4448         the method signature.
4450         * metadata-verify.c (verify_method_table): Move signature verification
4451         to verify_method_table_full.
4453         * metadata-verify.c: Add mono_verifier_verify_method_signature.
4455         * verify-internals.h: Export mono_verifier_verify_method_signature as
4456         part of the internal API.
4458 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
4460         * loader.c (mono_method_get_header): Call into the verifier to
4461         check the method header.
4463         * metadata-verify.c: Add mono_verifier_verify_method_header.
4465         * verify-internals.h: Export mono_verifier_verify_method_header as
4466         part of the internal API.
4468 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
4470         * class.c (mono_class_find_enum_basetype): Call into the verifier to
4471         check the field signature. Replace an assert with an explicit check.
4473         * class.c (mono_class_setup_fields): Call into the verifier to check
4474         the field signature.
4476         * metadata-verify.c: Add mono_verifier_verify_field_signature.
4478         * verify-internals.h: Export mono_verifier_verify_field_signature as
4479         part of the internal API.
4481 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
4483         * class.c (mono_class_find_enum_basetype): Simplify this function
4484         by moving code outside of the loop and not decoding static fields.
4486 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
4488         * metadata-verify.c (verify_typedef_table): Check the extends
4489         token here. Move to here a flags check from verify_typedef_table_full.
4491 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
4493         * metadata-verify.c (is_valid_method_header): Fix a warning.
4495         * metadata-internals.h (MonoImage): Remove the unused 
4496         static_rgctx_invoke_wrapper_cache.
4498         * image.c marshal.c: Ditto.
4500 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
4502         * image.c (do_mono_image_load): Enable table data verification.
4504 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
4506         * metadata-verify.c (is_valid_constant): Fix nullref check.
4508 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
4510         * metadata-verify.c (is_valid_constant): Fix string bounds check.
4512 2009-06-22  Mark Probst  <mark.probst@gmail.com>
4514         * sgen-gc.c: Managed allocation with pthreads TLS.
4516         * threads.c, threads-types.h: Functions for the JIT to tell the
4517         runtime whether it supports the MONO_TLS opcode.
4519 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
4521         * metadata-verify.c (verify_param_table): Fix a crash for assemblies
4522         without methods.
4524 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
4526         * metadata-verify.c (is_valid_constant): Fix the string length check.
4527         Use safe overflow checking. Add decent error messages.
4529 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
4531         * metadata-verify.c: Move remaininh blob checks to the offline
4532         verification path.
4534 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
4536         * metadata-verify.c: Move more blob checks to the offline verification
4537         path.
4539 2009-06-22  Bill Holmes  <billholmes54@gmail.com>
4541         * object-internals.h : Adding interrupt_on_stop field.
4543         * threads.c (mono_thread_request_interruption) : On Windows exit the
4544           thread if interrupt_on_stop is set.
4546         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
4547          Removing old interrupt logic and setting the interrupt_on_stop for the
4548          thread when calling accept.
4550         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
4551          setting the interrupt_on_stop for the thread when calling accept.
4553         Contributed under MIT/X11 license.
4555 2009-06-20  Martin Baulig  <martin@ximian.com>
4557         * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
4559 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
4561         * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
4562         running in no-exec mode.
4564 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
4566         * metadata-verify.c (verify_method_table): Move header
4567         checking to verify_method_table_full.
4569         * metata-verify.c (mono_verifier_verify_full_table_data):
4570         Call verify_method_table_full.
4572 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
4574         * metadata-verify.c (verify_field_table): Move signature
4575         checking to verify_field_table_full.
4577         * metata-verify.c (mono_verifier_verify_full_table_data):
4578         Call verify_field_table_full.
4580 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
4582         * metadata-verify.c (verify_typedef_table): Move remaining
4583         stuff to verify_typedef_table_full.
4585 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
4587         * metadata-verify.c: Kill is_corlib from VerifyContext.
4588         It is only used by the offline mode.
4589         So we better remove it from the runtime path.
4591 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
4593         * metadata-verify.c: Add new mono_verifier_verify_full_table_data
4594         function that perform the offline metadata verification steps.
4596         * metadata-verify.c (verify_typedef_table): Move some checks to
4597         verify_typedef_table_full and make it been called by new function
4598         mono_verifier_verify_full_table_data.
4600         * pedump.c: Call mono_verifier_verify_full_table_data.
4602         * verify-internals.h: Export mono_verifier_verify_full_table_data as
4603         part of the internal API.
4605 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
4607         * metadata-verify.c (typedef_is_system_object): Fix System.Object
4608         check.
4610         * metadata-verify.c (verify_implmap_table): Fix implmap invalid
4611         flags bits. SupportLastError was confused as bit 7 instead of 6.
4613         * metadata-verify.c (verify_implmap_table): Fix import scope verification
4614         to check against the module ref table instead of module.
4616         * metadata-verify.c (verify_implmap_table): Fix corlib check.
4618         * pedump.c: Call mono_image_load_names.
4620 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
4622         * image.c: Extract mono_image_load_names from do_mono_image_load.
4624         * metadata-internals.h: Export mono_image_load_names as part of
4625         the internal API.
4626         
4627 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
4629         * metadata.c (mono_metadata_cleanup): Free the generic method cache
4630         first, as it could reference data in the other caches.
4632 2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>
4634         * metadata-verify.c: Finished with method header verification.
4636 2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>
4638         * metadata-verify.c: Added more header verification code.
4639         Now only EH clauses are missing.
4641 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
4643         * marshal.c (get_runtime_invoke_type): Don't share primitive types
4644         for return values.
4646 2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>
4648         * metadata-verify.c: Initial method header verification.
4650 2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>
4652         * metadata-verify.c (verify_import_table): The IAT contents
4653         might end been patched by the windows DL when running with
4654         coree enabled.
4656 2009-06-15 Rodrigo Kumpera  <rkumpera@novell.com>
4658         * class.c (mono_class_from_typeref): If the enclosing type is not
4659         found return null instead of crashing. Fixes #508487.
4661 2009-06-15  Atsushi Enomoto  <atsushi@ximian.com>
4663         * normalization-tables.h : updated to the latest unicode charcter
4664           data.
4665         * appdomain.c : bump corlib version.
4667 2009-06-14  Zoltan Varga  <vargaz@gmail.com>
4669         * class.c (mono_class_from_name): Fix support for assembly references
4670         in the EXPORTEDTYPE table. Fixes #511704.
4672 2009-06-13  Geoff Norton  <gnorton@novell.com>
4674         * domain.c: Ensure that mono_domain_assembly_open actually opens the
4675         assembly in the target domain.
4677 2009-06-12  Robert Jordan  <robertj@gmx.net>
4679         * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
4680         because "this" of the managed signature has become an
4681         ordinary parameter in the unmanaged signature.
4683 2009-06-12  Zoltan Varga  <vargaz@gmail.com>
4685         * class-internals.h (struct _MonoGenericContainer): Add an 'image'
4686         field for owner-less generic containers.
4688         * reflection.c (mono_reflection_initialize_generic_parameter): Set the
4689         image field of the owner-less generic containers created here.
4691         * metadata.c (mono_metadata_load_generic_params): Ditto, the
4692         contain is ownerless until the caller sets its owner.
4694         * metadata.c (type_in_image): Handle owner-less generic containers
4695         correctly.
4696         
4697 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
4699         * image.c (mono_image_close): Support debug_assembly_unload for
4700         dynamic images too.
4702 2009-06-11 Andrés G. Aragoneses  <aaragoneses@novell.com>
4704         * class.c: Fix some typos in comments.
4706 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
4708         * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
4710         * threads.c (mono_thread_execute_interruption): Avoid creating the
4711         abort exception object while holding the synch_cs lock.
4713 2009-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
4715         * metadata-verify.c: Verify basic cattr content.
4717 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
4719         * reflection.c (add_exported_type): Don't set the FORWARDER flag on
4720         nested types.
4721         
4722         * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
4723         support for nested types. Fixes #511704.
4725 2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
4727         * metadata-verify.c: Verify methodspec signatures.
4729 2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
4731         * metadata-verify.c: Verify typespec signatures.
4733 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
4735         * metadata.c (free_inflated_method): Call 
4736         mono_marshal_free_inflated_wrappers (), which was missed earlier.
4738 2009-06-08  Miguel de Icaza  <miguel@novell.com>
4740         * mono-config.c: Small change to report the PPC64/ILP32 model.
4742 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
4744         * metadata-verify.c (parse_type): Check szarray.
4746 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
4748         * metadata-verify.c (parse_type): Check fnptr.
4750 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
4752         * metadata-verify.c (parse_type): Check generic instances.
4754 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
4756         * metadata-verify.c (parse_type): Check array shape.
4758 2009-06-05  Robert Jordan  <robertj@gmx.net>
4760         * class.c (mono_class_create_from_typedef): Check only for
4761         mscorlib's System.Array.
4763 2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
4765         * metadata-verify.c (parse_type): Check pointer, class/valuetype
4766         and generic params. 
4768         * metadata-verify.c (parse_field): Check the signature.
4770 2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
4772         * metadata-verify.c: Implement locals signature check.
4774 2009-06-04  Marek Safar  <marek.safar@gmail.com>
4776         * domain.c: Add .NET 4.0 Beta 1 version.
4778 2009-06-04  Bill Holmes  <billholmes54@gmail.com>
4780         * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
4781           For QueryInterface on CCWs consider the base class
4782           interfaces as well.
4784         Code is contributed under MIT/X11 license.
4786 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
4788         * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
4790         * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
4791         used.
4793         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
4794         adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
4796         * generic-sharing.c (inflate_other_data): Ditto.
4797         
4798 2009-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
4800         * metadata-verify.c: Implement property signature check.
4802 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4804         * sgen-gc.h: Register saving support for PPC.
4806 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4808         * sgen-gc.c: Fixed a pthread TLS screwup.
4810 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4812         * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
4813         supported.
4815 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4817         * sgen-gc.c: Disable TLA and managed allocation if the __thread
4818         keyword is not supported.
4820 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
4822         * marshal.c metadata.c: Applied patch from Ulrich Weigand 
4823         <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
4824         the inflated method is freed. Fixes #508389.
4826         The code is contributed under the MIT/X11 license.
4827         
4828 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
4830         * marshal.c (get_wrapper_target_class): New helper function.
4831         (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
4832         the <Module> class of the image. Fixes #509049.
4834 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
4836         * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
4837         Check if the thread was interrupted and proccess it straight away.
4838         Makes abortion much more responsive.
4840 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
4842         * threads.c (mono_thread_execute_interruption): Use atomic cas with
4843         MonoThread::interruption_requested to match it's counterpart.
4845         Fixes a hang in abort-stress-1 on a 2 core x86.
4847         * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
4848         Fix warning.
4850 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
4852         Change MonoImage::name_cache to be protected by the image lock
4853         instead of the loader lock.
4855         * appdomain.c (deregister_reflection_info_roots): Protect access
4856         to name_cache.
4858         * class.c (mono_image_init_name_cache): Change from the loader lock
4859         to the image lock. Check if the cache wasn't already created.
4861         * class.c: Change from the loader to the image lock.
4863         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
4864         the code to hold the image lock while iterating over name_cache and
4865         not go into mono_array_new holding it.
4867         * metadata-internals.h: Add a comment about this change.
4869 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
4871         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4872         Under the 2.0 profile raise the loader error.
4874         Fixes #508532.
4876 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
4878         * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
4879         of ldind opcode for generic instances so we don't fail for direct wrappers.
4880         This only affect direct calls.
4882 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
4884         * reflection.c (create_dynamic_mono_image): Fix warnings.
4886         * generic-sharing.c (other_info_equal): Ditto.
4887         
4888 2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
4890         * metadata-verify.c: Implement field signature check.
4892 2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
4894         * metadata-verify.c: Implement standalone signature check.
4896 2009-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
4898         * metadata-verify.c: Implement methodref signature check.
4900 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
4902         * object-internals.h (MonoRuntimeCallbacks): New structure containing
4903         callbacks supplied by the runtime.
4905         * object.c (mono_install_callbacks): New internal function to install
4906         the callbacks.
4908         * object.c (mono_create_ftnptr): Move the implementation of this to
4909         mini/.
4911         * object.c (mono_get_addr_from_ftnptr): Ditto.  
4913 2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
4915         * metadata-verify.c (parse_return_type): Proper byref check.
4916         * metadata-verify.c (is_valid_method_signature): Check for zero arity
4917         generic signatures and method params.
4919 2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
4921         * metadata-verify.c (decode_signature_header): Fix bounds check.
4923         * metadata-verify.c (parse_custom_mods): Check custom mods.
4925         * metadata-verify.c (parse_type): Do initial basic verification
4926         of valid values.
4927         
4928         * metadata-verify.c (is_valid_method_signature): Parse the generic
4929         param count.
4931 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
4933         * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
4934         discarded based on their most specific definition so we set the method_slots
4935         array before checking if the method is acceptable or not.
4937         Fixes #506757.
4939 2009-05-26  Mark Probst  <mark.probst@gmail.com>
4941         * icall.c: Free the old array when resizing a mono_ptr_array.
4943 2009-05-26  Mark Probst  <mark.probst@gmail.com>
4945         * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
4946         for the hashes whose keys are managed objects.
4948 2009-05-26  Mark Probst  <mark.probst@gmail.com>
4950         * object-internals.h, threads.c: Set the execution context on
4951         thread start here, not in corlib.
4953         * appdomain.c: Bump corlib version.
4955 2009-05-27  Martin Baulig  <martin@ximian.com>
4957         * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
4958         if `_mono_debug_using_mono_debugger' is set to make things work
4959         properly when embedding Mono.
4961 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4963         * class.c (mono_class_setup_fields): Don't mark simd types as having
4964         16 bytes alignment as the whole runtime doesn't support.
4966 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4968         * metadata-verify.c (safe_read): Use endian safe read macros.
4970 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
4972         * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
4973         it is read-only when using full aot.
4975 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
4977         * metadata-verify.c (is_valid_method_signature): Verify parts
4978         of the return type. Provide an error message in case of failure.
4980 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
4982         * metadata-verify.c (is_valid_method_signature): Verify the call conv.
4984 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
4986         * metadata-verify.c: Include the size prefix in the bounds check.
4988 2009-05-22  Miguel de Icaza  <miguel@novell.com>
4990         * icall.c: Remove warnings.
4992         * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
4993         prevent auto-detection based on GCC defines.
4995         Add PS3
4997         * metadata-verify.c: Do not include signal.h
4999         * generic-sharing.c, marshal.c: Add returns to avoid some warning
5000         messages.  Not sure why the g_assert_not_reached is not enough to
5001         quiet the compiler.
5002         
5004         * appdomain.c: Remove code that is not used when
5005         DISABLE_SHADOW_COPY is set.
5007         * image.c: use g_getenv
5009 2009-05-21  Miguel de Icaza  <miguel@novell.com>
5011         * reflection.c: Remove code that it not used with
5012         DISABLE_REFLECTION_EMIT is defined.
5014 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
5016         * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
5017         invoke wrappers.
5019 2009-05-20  Miguel de Icaza  <miguel@novell.com>
5021         * socket-io.c
5022         (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
5023         the ifdef here and instead put that on io-layer
5025 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
5027         * metadata-verify.c: Verify the generic param constraint table.
5029 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
5031         * metadata-verify.c (verify_generic_param_table): Fix
5032         thinko on the valid flags bits for generic params.
5034 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
5036         * metadata-verify.c: Verify the methodspec table.
5038 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
5040         * metadata-verify.c: Verify the generic param table.
5042 2009-05-19  Mark Probst  <mark.probst@gmail.com>
5044         * sgen-gc.c: Store and use the count with REMSET_VTYPE.
5046 2009-05-19  Mark Probst  <mark.probst@gmail.com>
5048         * sgen-gc.c: Use generation enum more consistently and use the
5049         correct generation in mono_gc_register_for_finalization().
5051 2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
5053         * metadata-verify.c: Verify the nested class table.
5055 2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
5057         * metadata-verify.c: Verify the manifest resource table.
5059 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
5061         * debug-helpers.c (dis_one): Add little-endian support for ldstr.
5063 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
5065         * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
5066         wrappers, this is now done in the JIT.
5067         
5068         * class.c (mono_set_generic_sharing_supported): New internal function.
5069         (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
5071 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
5073         * metadata-verify.c: Verify the exported type table.
5075 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
5077         * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
5079 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
5081         * metadata-verify.c: Verify the file table.
5083 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
5085         * metadata-verify.c (verify_assembly_table): Fix an error message.
5087         * metadata-verify.c: Verify the assemblyref table.
5089 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
5091         * metadata-verify.c (verify_assembly_table): Fix the valid
5092         bits mask for flags.
5094 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
5096         * debug-helpers.c (mono_method_full_name): Print generic parameters of
5097         generic methods as well.
5099 2009-05-15  Geoff Norton  <gnorton@novell.com>
5101         * gc.c: MachO/Darwin supports and uses semaphores fine for this 
5102         use-case and is significantly more performant than the wapi layer.
5104 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
5106         * metadata-verify.c: Verify the assembly table.
5108 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
5110         * metadata-verify.c: Fix rows limit check.
5112 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
5114         * metadata-verify.c: Verify the fieldrva table.
5116 2009-05-13  Mark Probst  <mark.probst@gmail.com>
5118         * sgen.c: Speed up weak links and finalizers by grouping them by
5119         generation.
5121 2009-05-13  Mark Probst  <mark.probst@gmail.com>
5123         * marshal.c (delegate_hash_table_add): When overwriting an entry,
5124         free the old GCHandle (only applies to SGen).
5126 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
5128         * loader.c (mono_get_method_from_token): Avoid the expensive call to
5129         mono_metadata_load_generic_params () for non-generic methods.
5131 2009-05-12  Mark Probst  <mark.probst@gmail.com>
5133         * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
5134         New function for returning a monitor's weak link if it has one.
5136         * sgen-gc.c: Remove an object's monitor's weak link (if it has
5137         one) when clearing a domain.  These can still be around because
5138         the object might not have been collected.
5140 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
5142         * gc.c: Fix a warning.
5144 2009-05-12  Kornél Pál  <kornelpal@gmail.com>
5146         * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
5147         prevous wait that resulted in a deadlock on Windows when initializing
5148         the runtime form DllMain. Also results in improved startup time.
5149         (finalizer_thread): Get rid of thread_started_event.
5150         * threads.c, threads-types.h (mono_thread_create_internal): Return the
5151         resulting MonoThread.
5153         Contributed under MIT/X11 license.
5155 2009-05-11 Rodrigo Kumpera  <rkumpera@novell.com>
5157         * metadata-verify.c: Verify the implmap table.
5158         Don't require that #US and #Strings be present.
5160 2009-05-11  Sebastien Pouliot  <sebastien@ximian.com>
5162         * security-core-clr.c: Delegate checks are done at creation time,
5163         not a invocation time. Fix exception for Telerik Silverlight demo
5165 2009-05-11  Mark Probst  <mark.probst@gmail.com>
5167         * sgen-gc.c (need_remove_object_for_domain): Remove the special
5168         case for the Thread class.
5170         * threads.c: Do clean-up of abort exception/state in
5171         thread_cleanup() instead of Thread.free_internal().  Also clean up
5172         current_appcontext.  The reason we have to do that is because
5173         those references might point into another domain and if that
5174         domain is unloaded before the thread is finalized, they point to
5175         invalid data.
5177 2009-05-10  Andreas Faerber  <andreas.faerber@web.de>
5179         * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
5180         stub signatures.
5181         
5182         Contributed unter MIT/X11 license.
5184 2009-05-09  Miguel de Icaza  <miguel@novell.com>
5186         * verify.c, metadata-verifier.c: Add support for disabling the
5187         verifier in some builds.
5189         [ Sorry, my previous commit accidentally commited some work in
5190         progress ]
5192 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
5194         * class.c (mono_class_setup_fields): Set class->field.first for
5195         generic instances.
5197 2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>
5199         * metadata-verify.c: Verify the typespec table.
5201 2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>
5203         * metadata-verify.c: Verify the module table.
5205 2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
5207         * metadata-verify.c: Verify the methodimpl table.
5209 2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
5211         * metadata-verify.c: Verify the property table.
5213 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
5215         * debug-helpers.c (mono_method_desc_match): Add support for generic
5216         glob patterns.
5218 2009-05-05 Rodrigo Kumpera  <rkumpera@novell.com>
5220         * metadata-verify.c: Verify the propertymap table.
5222 2009-05-04 Rodrigo Kumpera  <rkumpera@novell.com>
5224         * metadata-verify.c: Verify the event table.
5226         * metadata-verify.c (search_sorted_table): Fix offset
5227         calculation.
5229 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
5231         * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
5233 2009-05-01  Mark Probst  <mark.probst@gmail.com>
5235         * gc.c (mono_gc_run_finalize): Don't set the domain too late,
5236         because mono_delegate_free_ftnptr() needs it.
5238 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
5240         * metadata-verify.c: Verify the eventmap table.
5242 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
5244         * metadata-verify.c: Verify the standalonesig table.
5246 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
5248         * metadata-verify.c: Verify the field layout table.
5250 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
5252         * class.c (mono_type_get_name_recurse): Don't crash
5253         for ownerless generic params.
5255         * debug-helpers.c (mono_type_get_desc): Correct the format
5256         for ownerless generic params.
5258 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
5260         * metadata-verify.c: Verify the class layout table.
5262 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
5264         * metadata-verify.c: Verify the decl security table.
5266 2009-04-30  Mark Probst  <mark.probst@gmail.com>
5268         * domain.c (mono_domain_set_internal_with_options): Don't do
5269         anything if the old domain is the same as the old one.  Fixes
5270         #499326.
5272 2009-04-30  Mark Probst  <mark.probst@gmail.com>
5274         * appdomain.c: Deregister the reflection_info roots when unloading
5275         a domain.
5277         * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
5278         memory allocated by a domain and frees its disappearing links.
5280         * boehm-gc.c, null-gc.c: Empty implementation of
5281         mono_gc_clear_domain().
5283 2009-04-30  Mark Probst  <mark.probst@gmail.com>
5285         * appdomain.c (clear_cached_vtable): Free the static fields memory
5286         block.
5288 2009-04-30  Mark Probst  <mark.probst@gmail.com>
5290         * gc.c: Set the correct domain when invoking finalizers.
5292         * appdomain.c: Set the correct domain when creating threads.
5294 2009-04-30  Mark Probst  <mark.probst@gmail.com>
5296         * sgen-gc.c: Fix skip size for vectors.
5298 2009-05-03  Martin Baulig  <martin@ximian.com>
5300         * mono-debug-debugger.c
5301         (mono_debugger_check_breakpoints): Check class init handlers even
5302         if we don't have any method load handers.
5304 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
5306         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid 
5307         returning refonly assemblies if refonly is FALSE. Fixes #499013.
5309 2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>
5311         * metadata-verify.c: Verify the field marshal table.
5313 2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>
5315         * metadata-verify.c: Verify the custom attribute table.
5317 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
5319         * metadata-verify.c: Verify the constant table.
5321 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
5323         * metadata-verify.c: Verify the memberef table.
5325 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
5327         * metadata-verify.c (get_coded_index_token): Remove
5328         dead argument.
5330 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
5332         * metadata-verify.c: Verify the interfaceimpl table.
5334 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
5336         * verify.c: Improve error message.
5338         * debug-helpers.c (mono_type_get_desc): Harden the code that
5339         deals with VAR and MVAR.
5341 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
5343         * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes 
5344         part of #498692.
5346 2009-04-23 Tom Hindle <tom_hindle@sil.org>
5348         * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
5349         changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
5351 2009-04-28  Sebastien Pouliot  <sebastien@ximian.com>
5353         * security-core-clr.c: Avoid redundant checks for platform code, 
5354         e.g. check for method and for class (very common) and check
5355         for class and outer class (less common)...
5357 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
5359         * reflection.c: Avoid returning random cattrs for synthetic methods.
5360         Fixes #498545.
5362 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5364         * assembly.c: assemblies in the GAC should never be shadow-copied.
5366 2009-04-26  Mark Probst  <mark.probst@gmail.com>
5368         * domain.c, domain-internals.h: Disable
5369         track_resurrection_{objects,handles}_hash in MonoDomain if using
5370         SGen.
5372 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
5374         * metadata-verify.c: Verify the param table.
5376 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
5378         * metadata-verify.c (verify_typedef_table): Range check FieldList and
5379         MethodList.
5381         * metadata-verify.c (verify_method_table): Proper check the ParamList
5382         field.
5384 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
5386         * metadata-verify.c (verify_method_table): Check for runtime
5387         implemented functions such as delegate .ctors. Remove spurious
5388         printf.
5389         
5390 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
5392         * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
5394 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
5396         Don't allocate MonoGenericInfo for ownerless generic params.
5397         * class-internals.h (MonoGenericParam::info): Move field to ...
5398         (MonoGenericParamFull): ... this.  New struct.
5399         (MonoGenericContainer::type_params): Change type to
5400         MonoGenericParamFull.
5401         (MonoGenericParam, MonoGenericContainer): Update accessors.
5402         * metadata.c (mono_metadata_parse_generic_param): Don't initialize
5403         'info' field for ownerless generic param.
5404         (mono_metadata_load_generic_params): Update to changes.
5405         * reflection.c (mono_reflection_create_generic_class): Likewise.
5406         (reflection_methodbuilder_to_mono_method): Likewise.
5407         (mono_reflection_initialize_generic_parameter): Likewise.
5409 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
5411         Don't use MonoGenericParamInfo for ownerless generic params.
5412         * class.c (get_anon_gparam_class, set_anon_gparam_class): New.  Don't
5413         use ParamInfo class at all.
5414         (mono_class_from_generic_parameter): Use them.
5415         (make_generic_param_class): Fix a couple of instances where 'pinfo
5416         == NULL' wasn't handle.
5418 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
5420         * class.c (make_generic_param_class): Carve out of ...
5421         (mono_class_from_generic_parameter): ... here.
5423 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
5425         Simplify mono_class_from_generic_parameter
5426         * class-internals.h (MonoGenericParamInfo::token): New field.
5427         * metadata.c (mono_metadata_load_generic_params): Initialize it
5428         from metadata.
5429         * class.c (mono_class_from_generic_parameter): Use it instead of
5430         searching through metadata.
5432 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
5434         * metadata-verify.c: Add verification of the method table.
5436 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
5438         * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
5439         Delegate::Invoke optimization.
5441 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
5443         * appdomain.c (mono_domain_create_appdomain_internal): Free the
5444         string returned by get_shadow_assembly_location_base.
5446         * appdomain.c (get_shadow_assembly_location_base): Add a comment
5447         about caller's ownership.
5449 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
5451         * reflection.c: Add mono_reflection_cleanup_domain to cleanup
5452         reflection memory on domain unload.
5454         * domain.c (mono_domain_free): Don't free refobject_hash, let the
5455         reflection cleanup code do it.
5457         * domain-internals.h: Add mono_reflection_cleanup_domain.
5459         This fixes a memory leak for managed mirrors of reflection objects
5460         on domain unload. 
5462 2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>
5464         * metadata-verify.c: Implement more verification of the field table.
5466 2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>
5468         * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
5469         doesn't try to parse the input assembly, which can be broken.
5471 2009-04-23  Mark Probst  <mark.probst@gmail.com>
5473         * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
5474         sgen-gc.c: Implement track resurrection in weak GC handles in SGen
5475         by using the lowest bit in the link to store whether the link is
5476         tracked.  Move the track_resurrection hashes into boehm-gc.c.
5478 2009-04-22  Miguel de Icaza  <miguel@novell.com>
5480         * Makefile.am: Split the console support in platform specific code
5481         and put together a framework for making this easy in the future so
5482         that we can start splitting code instead of having a mess of PLATFORM_WIN32
5484 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
5486         * pedump.c: Fix a warning.
5488 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
5490         * verify.c (mono_delegate_type_equal): Compare valuetypes using
5491         mono_class_from_mono_type to avoid bad interactions with the dual representation
5492         of the generic type definition.
5494 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
5496         * verify.c (do_invoke_method): Use mono_class_from_mono_type to
5497         get the MonoClass for the call context type as it might be a generic
5498         instance.
5500         Fixes #491483.
5502 2009-04-21  Mark Probst  <mark.probst@gmail.com>
5504         * object-internals.h: The Thread object has no execution_context
5505         member anymore.
5507         * threads.c, threadpool.c, threads-types.h: Accessor functions for
5508         the execution context.
5510         * appdomain.c: Bump corlib version.
5512 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
5514         * verify.c (do_newobj): Improve error message.
5516 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
5518         * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
5519         is nested in the filter block.
5521         * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
5522         block is not fully nested.
5524         Fixes #495656.
5526 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
5528         * verify.c (verify_type_compatibility_full): Compare MonoClass and
5529         not MonoType to check for equality of valuetypes as the generic type
5530         definition allows for two different encodings: the generic type definition
5531         class or a generic instance over the GTD arguments.
5533         Fixes #496175.
5535 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
5537         * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
5539         * verify.c (do_initobj): Improve error message.
5541 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
5543         * metadata-verify.c: Enable pe verification as the issue with #496453
5544         is that the authenticode data directory have a different unspecified
5545         format. Ignore it for now.
5547         * pedump.c: Run the metadata verifier together with the IL verifier.
5549         Fixes ##496453.
5551 2009-04-20  Rolf Bjarne Kvinge  <RKvinge@novell.com>
5553         * metadata-verify.c: Temporarily disable pe verification due to #496453.
5555 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
5557         * class.c (can_access_type): Check visibility against
5558         the element type for pointers and arrays.
5560         Fixes #496150.
5562 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
5564         * metadata-verify.c: Fix cli and table verification to use information
5565         from the MonoImage. A lot of duplicated code got killed.
5567 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
5570         This patch starts to integrate the metadata verifier with the runtime code.
5572         This patch causes major regression in functionality for the metadata verifier
5573         as cli and table verification are disabled since they require to be ported to
5574         use MonoImage information.
5576         * image.c (do_mono_image_load): Split the code in this function
5577         into mono_image_load_pe_data and mono_image_load_cli_data.
5578         Add     care_about_pecoff parameter to not load pecoff data.
5579         Call into the metadata verifier for pecoff and cli verification.
5581         * image.c (mono_image_open_raw): New function that doesn't perform
5582         any parsing of the image contents.
5583         
5584         The reason for the 3 new functions is to give pedump better control
5585         into the interaction with the verifier.
5587         * metadata-internals.h: Add new functions from image.c as part of the
5588         internal mono API.
5590         * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
5591         mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
5592         to make those functions work together with the runtime.
5594         * verify.c: Add mono_verifier_is_enabled_for_image function that returns
5595         true if the image needs to be verified.
5597         * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
5599         * pedump.c: Use new metadata verifier API.
5601 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
5603         * object.c (mono_install_vtable_trampoline): Make this receive a
5604         trampoline creation function instead of trampoline, allowing the JIT
5605         to use a different trampoline for each vtable.
5607 2009-04-18  Mark Probst  <mark.probst@gmail.com>
5609         * object.c (mono_raise_exception): Don't reset the thread abort
5610         exception state here.
5612 2009-04-18  Mark Probst  <mark.probst@gmail.com>
5614         * icall-def.h: New icall for getting the thread abort exception
5615         state for a thread.
5617         * object.c, thread.c, object-internals.h: A thread's abort
5618         exception state is now a GC handle.  To get the object it stands
5619         for, we must move it into the current app domain, if it's
5620         different than the one where it originated from.
5622         * appdomain.c: Bump corlib version.
5624         * domain.c, domain-internals.h: New function for setting the
5625         domain and migrate the thread abort exception or not.
5627 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
5629         * metadata-verify.c: Add initial verification of the
5630         field table.
5632 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
5634         * metadata-verify.c: Add a macro to conditionally enable
5635         dumping of verification information. Add  make_coded_token
5636         and search_sorted_table to enable search sorted tables
5637         by a given coded token.
5639 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
5641         * metadata-verify.c: Add array mapping from table index
5642         to description offset. Add get_col_offset and get_col_size
5643         functions.
5645 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
5647         * metadata-verify.c: Add remaining table descriptions offsets.
5648         Add remaining coded index descriptions.
5650 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
5652         * metadata-verify.c: Fixed constant table description.
5653         Fixed calculation of HasCustomAttribute coded index size.
5654         Fixed calculation of size for many table indexes. 
5656 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
5658         * pedump.c (dump_metadata): Dump table offset instead
5659         of useless pointer in memory.
5661 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
5663         * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
5665 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
5667         * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
5668         a missing of for interface types.
5670 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
5672         * metadata-verify.c (verify_pe_optional_header): Add comment of why
5673         the code is commented.
5675         * metadata-verify.c (verify_resources_table): Remove spurious printf
5676         and don't fail if there are unmanaged resources. Gmcs generates a useless
5677         one     for all assemblies - I bet it's some MS compatibility junk.
5679 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
5681         * metadata-verify.c (verify_typedef_table): Verify the extends field.
5683         * metadata-verify.c (mono_image_verify): Add a is_corlib.
5685         * verify-internals.h: Same.
5687         * pedump.c: Fix for mono_image_verify new signature.
5689 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
5691         * metadata-verify.c (verify_typedef_table): Verify for some invalid
5692         flags combinations.
5694 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
5696         * metadata-verify.c (verify_module_table): Ignore the generation field.
5698 2009-04-15  Martin Baulig  <martin@ximian.com>
5700         * debug-mono-symfile.c
5701         (mono_debug_symfile_lookup_location): Don't print a warning for
5702         unknown extended opcodes if they're within 0x40 and 0x7f.
5704 2009-04-15  Zoltan Varga  <vargaz@gmail.com>
5706         * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
5707         invoke signatures returning an enum. Fixes #494847.
5709 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
5711         * metadata-verify.c: Initial code to verify the typedef table.
5713 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
5715         * verify.c (mono_method_verify): Don't fail if an unconditional branch
5716         with non empty stack happens before the beginning of a try block.
5718         Fixes #494812.
5720 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
5722         * metadata-verify.c: Verify typename and typenamespace fields of
5723         the typeref table.
5725 2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
5727         * metadata-verify.c: Initial code to verify the typeref table.
5729 2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
5731         * verify.c (verify_delegate_compatibility): Fix error message.
5733 2009-04-14  Sebastien Pouliot  <sebastien@ximian.com>
5735         * security-core-clr.c: Fix typo
5737 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
5739         * marshal.c (delegate_hash_table_add): Make delegate_target_locations 
5740         a MonoGHashTable to keep its values alive.
5741         (emit_marshal_boolean): Fix a warning.
5743 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5745         * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
5746         not have any interface configured for IPv4/IPv6.
5748 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5750         * assembly.c: fix typo in error message.
5752 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
5754         * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
5755         allocating the location holding the this argument to prevent
5756         'too many root sets' errors.
5758         * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
5759         to mark fields as special static.
5760         (mono_field_static_get_value): Handle special static fields.
5761         (mono_field_static_set_value): Ditto.
5763         * class-internals.h (struct _MonoClassField): Document this.
5765 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
5767         * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
5768           the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
5769           case.  This will handle when managed code returns null to native code.
5771         Code is contributed under MIT/X11 license.
5773 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
5775         * object.c (build_imt_slots): Changing a free to a g_free to match
5776           the g_malloc0 in add_imt_builder_entry that allocated this memory.
5778         Code is contributed under MIT/X11 license.
5780 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
5782         * marshal.c (emit_marshal_boolean): Adding code to ensure that
5783           the correct TRUE value is passed through the marshaling layer.
5785         Code is contributed under MIT/X11 license.
5787 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
5789         * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
5790         correctly. Fixes #492330.
5791         
5792         * marshal.c: Fix the embedding of object pointers into JITted code in
5793         the native-to-managed wrappers by allocating some GC tracked memory, and
5794         embedding the address of that.
5796 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
5798         * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
5799         pointers into the vtable.
5801 2009-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
5803         * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
5805         * verify.c (verify_ldftn_delegate): Improve error message.
5807 2009-04-09  Raja R Harinath  <harinath@hurrynot.org>
5809         * reflection.c (my_mono_class_from_mono_type): Remove.
5811 2009-04-09  Raja R Harinath  <harinath@hurrynot.org>
5813         Prepare to reduce memory usage of owner-less generic parameters (1/n)
5814         * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
5815         and constraints fields into ...
5816         (MonoGenericParamInfo): ... this.
5817         (mono_generic_param_info, mono_generic_container_get_param_info):
5818         New accessors.
5819         * class.c, debug-helpers.c, icall.c: Update to changes.
5820         * metadata.c, reflection.c, verify.c: Likewise.
5822 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
5824         * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
5826         * marshal.c (get_runtime_invoke_type): Share enums with their base types.
5827         
5828         * marshal.c (get_runtime_invoke_type): Share pointers with ints and
5829         booleans with sbytes.
5831 2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
5833         * class.c (can_access_instantiation): Verify accesibility of element types
5834         for arrays and pointers.
5836         * class.c (can_access_type): Return true if the target class is VAR or MVAR.
5838         * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
5840         Fixes #493068.
5842 2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
5844         * verify.c (do_invoke_method): Improve error messages.
5846 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
5848         * verify.c:  Fixing the MSVC build.
5850         Code is contributed under MIT/X11 license.
5852 2009-04-08  Sebastien Pouliot  <sebastien@ximian.com>
5854         * security-core-clr.c: Simplify get_reflection_caller not to call
5855         mono_method_get_last_managed (another stack walk) and adjust the
5856         callers to handle a (should not happen) NULL return value.
5858 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
5860         Add accessors to some MonoGenericParam fields
5861         * class-internals.h (mono_generic_param_owner): New accessor.
5862         (mono_generic_param_num): Likewise.
5863         (mono_type_get_generic_param_owner): New helper.
5864         (mono_type_get_generic_param_num): New helper.
5865         * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
5867 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
5869         * class-internals.h (mono_generic_container_get_param): New wrapper.
5870         * class.c, icall.c, metadata.c, verify.c: Use it.
5872 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
5874         Fix gtest-252.cs
5875         * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
5876         the standard case/loop.  In particular, don't complain about
5877         references to generic type definitions.
5879 2009-04-07  Zoltan Varga  <vargaz@gmail.com>
5881         * debug-helpers.c (dis_one): Decode string arguments.
5883 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
5885         * pedump.c (dump_verify_info): Dump type name correctly.
5887 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
5889         * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
5890         are larger than code size.
5892         This can happen in valid code if the try/catch block is not followed by any instruction
5893         and do a backward branch on the leave instruction.
5895         Fixes #492494.
5897 2009-04-06  Sebastien Pouliot  <sebastien@ximian.com>
5899         * security-core-clr.c: Fix typo while comparing second method names
5900         in can_avoid_corlib_reflection_delegate_optimization
5902 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
5904         * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
5906         Fixes #487738.
5908 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
5910         * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
5911         a MVAR using a class context.
5913         Fixes #490335.
5915 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
5917         * object.c (mono_class_compute_gc_descriptor): Make this non-static.
5919         * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
5921         * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
5922         functions supplied by the JIT for the SGEN GC.
5924         * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
5925         
5926 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
5928         monitor.c (mono_monitor_try_enter_internal):
5929         Added calls to profile monitor contentions.
5930         Also duplicated a small piece of code (the "get the monitor" logic)
5931         from the fast path to the slow path, and changed the relevant goto
5932         statements, so that monitor acquisition events can be emitted from the
5933         slow path (this is by Paolo Molaro).
5935 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
5937         * profiler.c, profiler.h, profiler-private.h:
5938         Added support for profiling monitor contentions.
5940 2009-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
5942         * metadata-verify.c: Verify the modules table.
5944 2009-04-02 Rodrigo Kumpera  <rkumpera@novell.com>
5946         * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
5947         using the context of the method been verifier and not of the method been called.
5949         * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
5950         safely inflate generic types. 
5952 2009-04-02  Sebastien Pouliot  <sebastien@ximian.com>
5954         * security-core-clr.c: Change the strategy for checking the 
5955         "reflection using delegates optimization" to avoid unneeded 
5956         attributes in multiple class libraries.
5958 2009-04-02  Mark Probst  <mark.probst@gmail.com>
5960         * sgen-gc.c: Remove object element in the disappearing link struct
5961         by storing the object pointer in the link.
5963 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
5965         * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
5967 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
5969         * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
5971         * verify.c (mono_method_verify): Do proper bounds checking of exception
5972         clause ranges.
5974 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
5976         * loader.c (mono_field_from_token): Don't crash if the field parent could
5977         not be decoded.
5979 2009-03-31  Mark Probst  <mark.probst@gmail.com>
5981         * sgen-gc.c: Execute critical finalizers after ordinary
5982         finalizers.
5984         * class-internals.h, domain.c: Add CriticalFinalizerObject to
5985         mono_defaults.
5987 2009-03-31 Jb Evain <jbevain@novell.com>
5989         * verify.c (do_ldstr): don't check if a string is in the user strings
5990         heap if the current image is dynamic.
5992 2009-03-31  Mark Probst  <mark.probst@gmail.com>
5994         * sgen-gc.c: Wait until the last finalizer has executed when
5995         returning from WaitForPendingFinalizers.
5997 2009-03-31  Martin Baulig  <martin@ximian.com>
5999         * mono-debug-debugger.h (MonoDebuggerEvent): Add
6000         `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
6001         `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
6002         (mono_debugger_event_create_appdomain): New function.
6003         (mono_debugger_event_unload_appdomain): New function.
6005         * appdomain.c (mono_domain_create_appdomain_internal): Call
6006         mono_debugger_event_create_appdomain().
6008 2009-03-31  Martin Baulig  <martin@ximian.com>
6010         * mono-debug-debugger.c
6011         (mono_debugger_register_class_init_callback): Also register the
6012         class init callback if the class is already initialized to make
6013         things work with shadow copied assemblies.
6015 2009-03-31  Sebastien Pouliot  <sebastien@ximian.com>
6017         * security-core-clr.c
6018         (mono_security_core_clr_ensure_reflection_access_field): Let 
6019         critical code access the field (just like we do for methods). Use
6020         check_field_access helper.
6021         (mono_security_core_clr_ensure_reflection_access_method): Use 
6022         check_field_access helper.
6024 2009-03-31  Mark Probst  <mark.probst@gmail.com>
6026         * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
6027         call the run-finalize function directly.
6029         * gc.c, gc-internal.h: Make run_finalize() non-static.
6031 2009-03-31  Mark Probst  <mark.probst@gmail.com>
6033         * sgen-gc.c: Use a separate struct for disappearing links.
6035 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
6037         * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
6038         * MaxIOVectorLength enabled, just ignore them.
6039         Fixes bug #349688.
6041 2009-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
6043         * metadata-verify.c: Fix eglib build.
6045 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
6047         * threads-types.h: Fix the win32 build.
6049 2009-03-28  Sebastien Pouliot  <sebastien@ximian.com>
6051         * class.c: move coreclr inheritance/override checks to 
6052         security-core.clr.c
6053         * security-core.clr.c|h: add code from class.c with additional
6054         documentation. Fix override check when the method is not critical.
6056 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
6058         * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
6059         (match_class): Ditto.
6061 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
6063         * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
6065         * metadata-verify.c: Implement table layout row size calculation. Verify
6066         the total size of the tables.
6068 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
6070         * metadata-verify.c: Verify heap sizes and size to decode row counts. 
6072 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
6074         * appdomain.c:
6075         * console-io.[ch]: added new mono_console_init() to make sure that
6076         file descriptors 0, 1 and 2 are opened.
6077         Bug #489019 fixed.
6079 2009-03-27  Sebastien Pouliot  <sebastien@ximian.com> 
6081         * appdomain.h: Export a new callback type and a new function to
6082         set this callback. This allow a mono host to provide it's own
6083         definition for "platform code".
6084         * metadata-internals.h: Add a core_clr_platform_code flag on 
6085         _MonoImage to (cache and) know if it is representing platform 
6086         code.
6087         * image.c (do_mono_image_open): Set core_clr_platform_code flag 
6088         on platform code images.
6089         * security-core-clr.c|h 
6090         (mono_security_set_core_clr_platform_callback): Allow the host
6091         to provide it's own platform check definition.
6092         (mono_security_core_clr_determine_platform_image): Detect if an 
6093         image is platform code (using the specified callback).
6094         (mono_security_core_clr_is_platform_image): Return cached value 
6095         for platform code.
6097 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
6099         * threads.c (mono_create_thread): New helper function to wrap CreateThread
6100         which has different parameter types for the 'tid' argument in windows and
6101         the io-layer.
6103         * appdomain.c attach.c threads.c: Use the new helper.
6105 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
6107         * metadata-verify.c: Verify valid table bits.
6109 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
6111         * metadata-verify.c (verify_metadata_header): Store size in the size field.
6113         * metadata-verify.c: Add initial table schema verification.
6115 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
6117         * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
6118         obtain the refclass argument needed by mono_param_get_objects (). Fixes
6119         #488383.
6121         * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
6123         * appdomain.c (MONO_CORLIB_VERSION): Bump this.
6125 2009-03-26  Sebastien Pouliot  <sebastien@ximian.com>
6127         * security-core-clr.c: Add/update documentation
6129 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
6131         * marshal.c (emit_marshal_object): Generate code to throw an exception
6132         instead of throwing it. Fixes #488670.
6134 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com>
6136         * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
6137         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
6138         an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
6139         and add a call to mono_security_core_clr_ensure_delegate_creation
6140         to do the extra checks required by CoreCLR.
6141         * security-core-clr.c|h: Add function to check delegate creation,
6142         both in the binding and accessibility, under CoreCLR.
6144 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com> 
6146         * reflection.c (mono_reflection_create_dynamic_method): when 
6147         coreclr is enabled make sure that every resolved object are
6148         checked (e.g. field and method access).
6149         * security-core-clr.c|h: Add function to check objects resolved
6150         when a dynamic method is created.
6152 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
6154         * metadata-verify.c: Cache directory rva translations.
6156         * metadata-verify.c: Add cli-header and streams verification.
6158 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
6160         * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
6161         the wrong offset (8 instead of 6).
6163 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
6165         * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
6166         methods, return the native function address itself. Fixes
6167         #487758.
6169 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
6171         * console-io.c: some of the values for control characters might not be
6172         present.
6174 2009-03-21  Sebastien Pouliot  <sebastien@ximian.com>
6176         * exception.c|h: Add helpers to create [Field|Method]AccessException
6177         * icall.c: Add required coreclr check calls for field reflection.
6178         Move the existing (method) check logic into security-core-clr.c
6179         * security-core-clr.c: Add functions to check if the access of a
6180         field or method is allowed when reflecting under coreclr. This is
6181         mostly done using a stack walk to find the "real" caller: i.e. the
6182         code that is calling the reflection
6184 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
6186         * gc-internal.h: Change location of gc_wrapper.h
6188 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com> 
6190         * class.c: Simplification to coreclr checks for overrides that
6191         makes it easier to set breakpoints.
6193 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com>
6195         * security-core-clr.c|h: (mono_security_core_clr_class_level, 
6196         mono_security_core_clr_method_level): Avoid potential 
6197         MonoCustomAttrInfo allocation for transparent assemblies (e.g. 
6198         user/application code) and make it easier to set breakpoints
6200 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
6202         * metadata-verify.c: Reject cli header tables that mono don't handle.
6204 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
6206         * pedump.c: Fix CLI header dumping.
6208 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
6210         * metadata-verify.c: More CLI header verification.
6212 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
6214         * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
6216 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
6218         * metadata-verify.c: Initial verification of the CLI header.
6220 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
6222         * metadata-verify.c (verify_resources_table): Fix verification of zero
6223         sized resource section and id entries count.
6225 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
6227         * icall.c: Handle user types in many Type icalls. Fixes #486303.
6229 2009-03-17  Jb Evain  <jbevain@novell.com>
6231         * profiler.c: call mono_gc_base_init from mono_profiler_load.
6233 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
6235         * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
6236         (mono_gc_make_descr_for_array): Ditto.
6238 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
6240         * verify.c (mono_verifier_is_class_full_trust): Add support for
6241         CoreCLR security mode where trusted assemblies are defined as
6242         "platform code".
6244 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
6246         * metadata-verify.c: Add minimal PECOFF resource verification.
6248 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
6250         * metadata-verify.c: Be less restrictive with some coff fields.
6252 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
6254         * verify.c (init_stack_with_value_at_exception_boundary): Init generic
6255         params as boxed values on stack. Fixes #485706.
6257 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
6259         * console-io.c: the termios values may vary in different flavors of unix.
6261 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
6263         * console-io.[ch]: return the entire set of control characters when
6264         initializing the terminal.
6265         * appdomain.c: bump corlib version.
6267 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
6269         * mono-perfcounters.c: added support for in-process custom
6270         performance counters.
6272 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
6274         * metadata-verify.c: Small cleanup and add comment for IAT directory entry. 
6276 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
6278         * metadata-verify.c: Verify the data pointed by the import table. 
6280 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
6282         * metadata-verify.c (load_data_directories): Store data
6283         directory contents.
6285         * metadata-verify.c: Verify the import table. 
6287 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
6289         * metadata-verify.c: Verify data directories.
6291 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
6293         * metadata-verify.c: Check section header flags.
6295 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
6297         * appdomain.c: if the assembly name is a shadow-copied file, return
6298         TRUE from mono_is_shadow_copy_enabled but don't actually do anything
6299         in mono_make_shadow_copy.
6300         * icall.c: if the assembly name is a shadow-copied file, replace it
6301         with the original assembly path.
6303         Bug #484244 fixed. NUnit tests for corlib can be run without
6304         --noshadow now.
6306 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
6308         * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
6309         entries when the table is reallocated.
6311         * icall.c: Allocate the memory used by the mono_ptr_array macros using
6312         mono_gc_alloc_fixed () since it contains GC refs.
6314 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
6316         * reflection.c (ensure_complete_type): New helper function to call
6317         type resolve handlers for unfinished dynamic types.
6318         (resolve_object): Call it for MonoClassFields. Fixes #483852.
6320 2009-03-09  Zoltan Varga  <vargaz@gmail.com>
6322         * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
6323         #483247.
6325 2009-03-08 Rodrigo Kumpera  <rkumpera@novell.com>
6327         * appdomain.c (get_shadow_assembly_location): Fix memleak.
6329 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
6331         * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
6332         between GCHandles of type WeakTrackResurrection and the objects they
6333         point to.
6335         * gc.c: Partly implement the sematics of GCHandles of type 
6336         WeakTrackResurrection: these handles should only be cleared after the
6337         finalizer of the object they are pointing to has ran.
6339 2009-03-06  Mark Probst  <mark.probst@gmail.com>
6341         * icall.c: Partially revert r126631 because using the jump
6342         trampolines for generic shared methods makes it superfluous.
6344 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
6346         * threads.c (handle_store): Create the 'threads' hash table with the proper
6347         MONO_HASH_VALUE_GC type.
6349 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
6351         * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
6352         FIRST_GC_TRACKED.
6354         * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
6355         and LAST_GC_TRACKED as a GC root.
6357         * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
6359         * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
6360         the static data even if it consists of 1 reference.
6362         * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
6363         if there is a GC descriptor.
6365         * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
6366         instead of through the GC since they contain no object references.
6368 2009-03-05  Mark Probst  <mark.probst@gmail.com>
6370         * generic-sharing.c (instantiate_other_info): Always return a jump
6371         trampoline for method code.
6373 2009-03-05  Marek Habersack  <mhabersack@novell.com>
6375         * culture-info-tables.h: generated to include the en-tt culture.
6377 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
6379         * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
6380         capture the thread context.
6382         * object.c (mono_async_result_new): Cache the invoke wrappers to
6383         ExecutionContext::Capture.
6385 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
6387         * marshal.h: Add a prototype for what mono_compile_method returns
6388         for invoke wrappers.
6390         * gc.c: Use the new prototype declaration.
6392 2009-03-04  Geoff Norton  <gnorton@novell.com>
6394         * boehm-gc.c: Add some MONO_LOG tracing for the GC
6395         * gc-internal.h:
6396         * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
6398 2009-03-04  Martin Baulig  <martin@ximian.com>
6400         * mono-debug.h
6401         (mono_debugger_runtime_invoke): Removed.
6403         * mono-debug-debugger.c
6404         (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
6406 2009-03-02  Martin Baulig  <martin@ximian.com>
6408         * mono-debug.h
6409         (mono_debugger_unhandled_exception): Removed.
6410         (mono_debugger_handle_exception): Removed.
6411         (mono_debugger_throw_exception): Removed.
6413         * mono-debug.c
6414         (mono_debug_debugger_version): Bump to 5.
6416         * mono-debug-debugger.c: Moved the exception handling code to
6417         ../mini/debug-mini.c
6419 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
6421         * domain-internals.h (struct _MonoDomain): Add a separate lock for the
6422         finalize_objects_hash.
6424         * gc.c: Use the separate lock to access the finalize_objects_hash field.
6425         
6426         * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
6427         field.
6429         * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
6430         cache.
6432         * image.c (mono_image_close): Free it.
6433         
6434         * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
6435         allowing a creation of a wrapper which invokes its method using a CALLVIRT
6436         on the this argument.
6438         * gc.c (run_finalize): Optimize the calling of the finalizers.
6440 2009-03-03  Martin Baulig  <martin@ximian.com>
6442         * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
6443         of the `MonoGenericInst' changes.
6445 2009-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
6447         * icall.c (ves_icall_MonoType_GetGenericArguments): Use
6448         mono_array_class_get_cached to reduce locking contention. Extract
6449         a domain var.
6451         * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
6452         intermediary managed arrays. Use caching version of mono_array_new
6453         to allocate the result array.
6455         * icall.c (ves_icall_Type_GetEvents_internal): Same.    
6457         * icall.c (ves_icall_Type_GetNestedTypes): Same.        
6459         * locales.c (create_names_array_idx):  Use mono_array_new_cached
6460         to reduce locking contention.
6462 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
6463                 
6464         * object.c (mono_method_add_generic_virtual_invocation): Put back the
6465         thunk builder code for the non-interface case.
6467 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
6469         * object.c (get_generic_virtual_entries): New helper function to collect
6470         the virtual generic method instances which need to be added to an IMT
6471         thunk.
6472         (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
6473         Instead of creating a new IMT thunk, reset the vtable slot to the
6474         trampoline, the thunk will be created the next time the trampoline is called.
6475         (build_imt_slots): Add support for virtual generic methods in interfaces by
6476         adding to the IMT thunk all the methods registered using 
6477         mono_method_add_generic_virtual_invocation ().
6479         * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
6480         (struct _MonoIMTCheckItem): Ditto.
6482         * object.c (mono_method_add_generic_virtual_invocation): Take a
6483         MonoMethod argument instead of a MonoGenericInst. Fix the construction of
6484         the IMT thunk to include all items.
6485         
6486         * object.c (mono_class_create_runtime_vtable): Add a missing
6487         mono_loader_unlock ().
6489 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
6491         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6493         * object-internals.h (MonoReflectionEvent): Add cached_add_event.
6495 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
6497         * object-internals.h: Rename _MonoReflectionEvent to
6498         MonoReflectionMonoEvent so it reflects the right managed type.
6499         Add a MonoReflectionEvent that correctly represents System.EventInfo.
6501         * icall.c:
6502         * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
6503         type.
6505 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
6507         * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
6508         intermediary managed arrays. Use caching version of mono_array_new
6509         to allocate the result array.
6511 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
6513         * reflection.c: Use cached version of mono_array_new alongside
6514         the mono_reflection_get_custom_attrs_by_type call path.
6516 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
6518         * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
6519         intermediary managed arrays. Use caching version of mono_array_new
6520         to allocate the result array.
6522         * icall.c (ves_icall_Type_GetConstructors_internal): Same.
6524 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
6526         * icall.c: Add small implementation of a growable stack bound array.
6528         * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
6530         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
6531         intermediary managed arrays. Use caching version of mono_array_new
6532         to allocate the result array.
6534 2009-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
6536         * icall.c: New icall ves_icall_System_Enum_compare_value_to that
6537         helps Enum::CompareTo to be implemented without reboxing all enums
6538         to their underlying type.
6539 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
6541         * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
6542         since it acquires a global lock leading to scalability problems.
6544         * profiler.c: Make the stat profiler work with multiple appdomains, this
6545         currently only works when no appdomains are unloaded.
6547 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
6549         * appdomain.c: make the check to avoid copying when the assembly is
6550         already shadow copied actually work.
6552 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
6554         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6556         * object-internals.h (struct _MonoReflectionGenericClass): Sync with
6557         changes to the managed side.
6559 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
6561         * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
6562         classes + a separate lock for it, as it is used frequently at runtime, not
6563         just during metadata loading/JIT compilation.
6565         * class.c (mono_bounded_array_class_get): Use the separate cache + lock
6566         for szarrays.
6567         
6568         * object-internals.h (mono_class_from_name_cached): New macro to cache
6569         the results of the lookup locally without having to declare a static
6570         variable to hold it.
6571         (mono_class_get_field_from_name_cached): Ditto.
6572         (mono_array_class_get_cached): Ditto.
6574         * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
6575         the new macros.
6576         
6577         * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
6578         slower search in metadata.
6580         * pedump.c: Fix a warning.
6582 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
6584         * reflection.c (encode_locals): Add checks for user types.
6585         (method_encode_clauses): Ditto.
6586         (method_encode_code): Ditto.
6587         (mono_image_create_token): Ditto.
6589         * object-internals.h: Change the type of more fields from MonoReflectionType*
6590         to MonoObject*.
6592 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
6594         * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
6595         the a thread does not suspend within 100ms.
6597         * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
6598         in addition to StopRequested as well.
6600         * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
6602         * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
6603         search the method_hash before inserting a new entry, to avoid crashes when
6604         the same method is inserted multiple times, causing the old 
6605         MonoDebugMethodInfo structure to be freed by the value dtor function.
6607 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6609         * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
6610         SO_EXLUSIVEADDRUSE where available.
6612 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
6614         * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
6615         runtime invoke wrappers, this time it is string ctor wrappers, which
6616         pass a dummy string as 'this' instead of their obj argument. Fixes
6617         #478473.
6619 2009-02-21  Jb Evain  <jbevain@novell.com>
6621         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6622         only get create_culture once.
6624 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
6626         * reflection.c (mono_reflection_setup_internal_class): Move the user type
6627         check before the locking.
6628         
6629         * reflection.c (mono_reflection_setup_internal_class): Check for user types.
6630         (mono_reflection_create_runtime_class): Ditto.
6631         (mono_reflection_sighelper_get_signature_local): Ditto.
6632         (mono_reflection_sighelper_get_signature_field): Ditto.
6634         * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
6635         is a System.MonoType object or similar.
6636         (monotype_cast): New helper function to cast a MonoObject to a 
6637         MonoReflectionType object.
6639         * object-internals.h: Change MonoReflectionType* members in structures to
6640         MonoObject* members to force the usage of the monotype_cast () function.
6642         * reflection.c icall.c: Use monotype_cast () for accessing Type members of
6643         structures/arrays. This causes us to assert instead of crashing when 
6644         instances of user defined subclasses of System.Type are encountered.
6646 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
6648         * cil-coff.h:
6649         * icall-def.h:
6650         * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
6651         win32 resource loaded from a PE file.
6653         * image.c: fix mono_image_lookup_resource.
6655 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
6657         * icall-def.h:
6658         * threads-types.h:
6659         * threads.c: added internal call for WaitHandle.SignalAndWait.
6661 2009-02-19  Bill Holmes  <billholmes54@gmail.com>
6663         * cominterop.c : Adding cominterop_type_from_handle and 
6664           registering it as an icall.  Replacing all references
6665           to type_from_handle.
6667         Code is contributed under MIT/X11 license.
6669 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
6671         * Makefile.am: Add lock-tracer.h and lock-trace.c.
6673         * appdomain.c: Call the tracer init function.
6675         * domain-internals.h: Enable the tracer for the domain locks.
6677         * image.c: Enable the tracer for image locks.
6679         * loader.c: Enable the trace for the loader lock.
6681         * lock-tracer.h:
6682         * lock-tracer.c: Initial implementation of the lock trace utility.
6683         The tracer requires a compile time define to be enabled and a env var
6684         to be enabled at runtime.
6686 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
6688         * domain.c (mono_domain_code_foreach): Improve documentation.
6690 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
6692         * appdomain.c:
6693         * generic-sharing.c:
6694         * object.c:
6695         * reflection.c:  Adjust locking order to the new semantics where the loader lock
6696         comes first.
6698 2009-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
6700         * domain.c: Add mono_domain_code_* functions that perform locking
6701         around the domain codeman.
6703         * domain-internals.h: Export those functions.
6705         * object.c: Use new functions instead of acquiring the domain lock.
6707 2009-02-19  Zoltan Varga  <vargaz@gmail.com>
6709         * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
6710         delegate. Fixes #477396.
6712 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
6714         * reflection.c (create_custom_attr): Get rid of alloca.
6716 2009-02-18  Bill Holmes  <billholmes54@gmail.com>
6718         * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
6719           Adding exception handling for all CCW calls.
6721         Code is contributed under MIT/X11 license.
6723 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
6725         * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
6727         * marshal.c (emit_marshal_boolean): Add null checks to the new 
6728         native->managed marshalling code. Fixes #476247.
6730 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
6732         * class.c (mono_class_get_vtable_entry): Move the addition of
6733         static rgctx invoke wrappers for vtable methods here, this simplifies
6734         a lot of code and causes fewer rgctx wrappers to be created.
6736         * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
6737         name of the statistics to begin with an uppercase.
6739 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
6741         * reflection.c: Revert previous change as it breaks the build.
6742         
6743 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
6745         * verify.c: Properly handle SZARRAY element type.
6747         Fixes #474271.
6749 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
6751         * reflection.c (mono_image_create_method_token): Correctly encode
6752         MethodDef MemberRefParent token.
6754         Fixes #472845.
6756 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
6758         * image.c (mono_image_close): Delete the critical section before
6759         freeing the memory holding it.
6761 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
6763         * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
6764         Fixes #476257.
6766 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
6768         * pedump.c (main): Call mono_marshal_init so pedump
6769         doesn't crash.
6771 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
6773         * loader.c (method_from_memberref): Properly fix #474271 and
6774         don't break the runtime bad.
6776 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
6778         * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
6779         (mono_domain_alloc0): Ditto.
6781 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
6783         * loader.c (method_from_memberref): Don't abort if the array
6784         method is not found. A regular loader failure is more informative
6785         and correct.
6787         Fixes #474271.
6789 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
6791         *loader.c: Guard MonoImage::method_cache/methodref_cache
6792         using the image lock instead of the loader lock.
6794         * metadata.h: Add comments about which fields are protected by
6795         the image lock.
6797 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
6799         * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
6801         * generic-sharing.c (mono_method_construct_object_context): Remove the
6802         wrapper_type == NONE assert, it is not needed.
6804 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
6806         * reflection.c (clear_cached_object): New helper function.
6807         (mono_method_clear_object): New function to clear the cached reflection
6808         objects for a dynamic method.
6810         * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
6811         Partly fixes # 463323.
6812         
6813 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
6815         * class.c:
6816         * loader.c:
6817         * reflection.c: Remove all explicit uses of MonoImage::property_hash.
6819 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
6821         * image.c: Add mono_image_property_(lookup,insert,remove) functions that
6822         take the image lock instead of the loader lock.
6824         * metadata-internals.h: Export new functions.
6826 2009-02-12  Miguel de Icaza  <miguel@novell.com>
6828         * domain.c (app_config_parse): Remove another use of stat that is
6829         not necessary as g_file_get_contents already does the presence
6830         check. 
6832 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
6834         * cominterop.c icall-def.h: Fix the DISABLE_COM build.
6836         * marshal.c: Move the bstr handling code to cominterop.c.
6838         * marshal.c: Remove some COM interop code missed previously.
6840 2009-02-12  Miguel de Icaza  <miguel@novell.com>
6842         More Paolo patches from the Wii port:
6843         
6844         * security.c: Remove ves_icall_System_Environment_get_UserName
6845         from here.
6847         * icall.c: And put ves_icall_System_Environment_get_UserName
6848         here. 
6850         * appdomain.c (mono_set_private_bin_path_from_config): Remove
6851         redundant call to stat that was only used to test for the file
6852         existence.   Patch from Paolo.
6854         * gc.c (run_finalize): If COM is disabled, do not link in
6855         mono_marshal_free_ccw.
6857         * generic-sharing.c: Use alloca.h here as well.
6859 2009-02-13 Rodrigo Kumpera  <rkumpera@novell.com>
6861         * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
6863 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
6865         * cominterop.c cominterop.h: New files.
6867         * marshal.c: Move the COM interop related code to cominterop.c. Make a few
6868         function/typedefs which are needed by cominterop.c global.
6870 2009-02-12  Mark Probst  <mark.probst@gmail.com>
6872         * generic-sharing.c: Don't take the loader lock to guard image
6873         mempool allocs.
6875 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
6877         * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
6878         called without the loader lock which is required to guard MonoImage:tokens.
6880 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
6882         * class.c:
6883         * metadata.c:
6884         * method-builder.c:
6885         * marshal.c:
6886         * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
6888 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
6890         * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
6891         Rework the code to use regular mono_image_alloc/0.
6893         * loader.c: Rework the code to use regular mono_image_alloc/0.
6895         * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
6897 2009-02-12  Bill Holmes  <billholmes54@gmail.com>
6899         * object-internals.h : Fixing a typo in the 
6900           MonoReflectionComVisibleAttribute struct.
6902         * marshal.c (cominterop_com_visible): Check the implemented 
6903           interfaces for ComImport.
6905         * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls 
6906           assume that bools should be treated as VARIANTBOOLs.
6908         * marshal.c (emit_marshal_boolean): Adding cases for 
6909           MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
6911         * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to 
6912           emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
6914         * marshal.c (cominterop_get_ccw): For COM calls assume that bools
6915           should be treated as VARIANTBOOLs.    
6917         Code is contributed under MIT/X11 license.
6919 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
6921         * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
6922         allocation with the image lock.
6924 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
6926         This patch is the last of a series to remove explicit reference of MonoImage::mempool
6927         and use mono_image_alloc set of functions instead. This time we finish with reflection.c
6929         * object.c: Add mono_string_to_utf8_image.
6931         * object-internals.h: Export mono_string_to_utf8_image.
6933         * reflection.c: Rework all explicit references to the the image mempool to go thought
6934         the mono_image_alloc set of functions.
6936 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
6938         This patch is the third of a series to remove explicit reference of MonoImage::mempool
6939         and use mono_image_alloc set of functions instead. This time we finish with marshal.c
6940         and generics-sharing.c.
6942         * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
6943         as first argument. Note that this function remains broken as it doesn't perform locking around the
6944         mempool allocation.
6946         * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
6948         * image.c: Add g_slist_append_image.
6950         * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
6951         the supplied image for allocation. Move code into mono_metadata_field_info_full.
6953         * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
6954         Fix all related code to do the same.
6956         * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
6958         * metadata-internals.h: Fix the signatures.
6960 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
6962         This patch is the second of a series to remove explicit reference of MonoImage::mempool
6963         and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
6964         and similar to work using MonoImage.
6966         * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
6967         MonoMemPool.
6969         * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
6971         * class.c (mono_metadata_signature_deep_dup): Same.
6973         * class.c (inflate_generic_type): Same.
6975         * class.c (mono_class_inflate_generic_type_with_mempool): Same.
6977         * metadata.c (mono_metadata_signature_dup_full): Same.
6979         * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from 
6980         mono_metadata_signature_dup_full.
6982         * metadata.c (mono_metadata_type_dup): Same.
6984         * marshal.c: Pass the image to calls to mono_metadata_type_dup.
6986         * reflection.c: Same.
6988         * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
6990         * metadata-internals.h: Fix the signatures.
6992         * class-internals.h: Same.
6994 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
6996         This patch is the first of a series to remove explicit reference of MonoImage::mempool
6997         and use mono_image_alloc set of functions instead. 
6999         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
7000         Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
7001         of a MonoMemPool.
7003         * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
7005         * class.c (g_list_prepend_mempool): Removed.
7007         * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
7009         * image.c: Add g_list_prepend_image.
7011         * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
7013         * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
7016 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
7018         * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
7019         mono_image_unlock.
7021         * image.c (mono_image_init): Init the lock field.
7023         * image.c (mono_image_init): Cleanup the lock field.
7025         * image.c: Add mono_image_(un)lock functions.
7027 2009-02-11  Mark Probst  <mark.probst@gmail.com>
7029         * class.c, class-internals.h: mono_method_get_context_general()
7030         combines the functionality of mono_method_get_context() and
7031         mini_method_get_context().
7033         * generic-sharing.c, domain-internals.h:
7034         mono_method_construct_object_context() and
7035         mono_domain_lookup_shared_generic() moved from mini.
7037         * icall.c (ves_icall_InternalInvoke): Handle the case where the
7038         method doesn't have the correct instantiation because it's shared
7039         generic code.  Fixes #473999.
7041 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
7043         * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
7045         * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
7046         
7047 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
7049         * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
7051         * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
7053         * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
7054         and recheck the cache for dups after it.
7056         * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
7058         Fixes one of the deadlocks found in #473150.
7060 2009-02-11  Bill Holmes  <billholmes54@gmail.com>
7062         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
7063           For Win32, add additional break conditions for accept.
7065         Code is contributed under MIT/X11 license.
7067 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
7069         * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
7070         lazily initialize the native wrapper cache.
7071         (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
7072         cache, since they are different from the normal wrappers.
7074         * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
7076         * metadata-internals.h (struct _MonoImage): Add a new wrapper for
7077         AOT compiled native wrappers.
7079 2009-02-09  Geoff Norton  <gnorton@novell.com>
7081         * appdomain.h:
7082         * security-core-clr.c: Allow enabling core-clr from the embedding
7083         API.
7085 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
7087         * socket-io.c: when requesting all the local ips, if there are no
7088         interfaces up and running, MS returns 127.0.0.1.
7090 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
7092         * mono-perfcounters-def.h: processor time is an inverse time.
7093         Fixes bug #468625.
7095 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
7097         * socket-io.c: an empty host name returns the list of local IPs.
7098         Fixes bug #386637 part 1/2.
7100 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
7102         * verify.c (mono_class_interface_implements_interface): Call
7103         mono_class_setup_interfaces ().
7104         (merge_stacks): Ditto.
7106 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
7108         * class.c (mono_class_setup_interfaces): New function to lazily initalize
7109         klass->interfaces.
7110         (mono_generic_class_get_class): Don't initalize klass->interfaces.
7111         (mono_generic_class_get_class): Ditto.
7113 2009-02-06  U-QUACK\miguel  <miguel@quack>
7115         * icall-defs.h: Include also the Encrypt/Decrypt string methods as
7116         they live in security.c
7118         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
7119         another bit from Paolo's code.
7121 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
7123         * object.c (build_imt_slots): Add a small optimization to avoid inflating
7124         methods which will be discarded by add_imt_builder_entry ().
7126         * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
7127         need to be boxed.
7129         * loader.c: Add a statistics for the size of the memberref signature cache.
7130         
7131         * loader.c (find_cached_memberref_sig): New helper function.
7132         (cache_memberref_sig): Ditto.
7134         * loader.c: Cache the result of parsing memberref signatures, since otherwise
7135         they will be parsed again for every generic instantiation, leading to unbounded
7136         memory growth.
7138 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
7140         * loader.c (mono_get_method_from_token): Avoid creating class for the generic
7141         parameters of generic methods.
7143         * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
7144         after the original method is copied to the inflated method.
7145         (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
7147         * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
7148         field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
7150         * class.c metadata.c: Update after the changes above.
7152 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
7154         * metadata-verify.c: Simplified error handling and added
7155         section table validation.
7157 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
7159         * class-internals.h (MonoClassExt): New structure containing rarely used
7160         fields of MonoClass.
7161         (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
7162         through a new 'ext' field.
7164         * class.c (mono_class_alloc_ext): New helper function to allocate 
7165         class->ext.
7167         * class.c metadata.c reflection.c: Update after MonoClass structure changes.
7169 2009-02-05  Mark Probst  <mark.probst@gmail.com>
7171         * object.c (mono_object_get_virtual_method): Properly inflate
7172         generic methods.  Fixes #472692.
7174 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
7176         * class.c (mono_class_create_from_typedef): The CLR supports SystemF
7177         recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
7178         for the parent type, the created type must be ready to be used on a generic
7179         instantiation.
7180         We fill this_arg/byval_arg if the parent is a generic instance to make sure
7181         we won't have duplicated entries in generic_inst_cache.
7183         Fixes #469553.
7185 2009-02-05  Miguel De Icaza  <miguel@novell.com>
7187         * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
7188         replace with plain BSD per the comments on the bug MONO77637.
7190 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
7192         * class.c (mono_class_get_generic_class): New accessor function.
7193         (mono_class_get_generic_container): Ditto.
7195         * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
7196         fields, similar to the ones in MonoMethod.
7198         * class.c (mono_generic_class_get_class): Set klass->is_inflated.
7199         (mono_class_create_from_typedef): Set klass->is_generic if needed.
7201         * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
7202         
7203         * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
7204         the same information as element_class->byval_arg.
7206         * class.c reflection.c: Remove references to class->byval_arg.
7208         * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing 
7209         klass->enum_basetype directly.
7211         * verify.c metadata.c object.c icall.c reflection.c: Use 
7212         mono_class_enum_basetype () instead of accessing klass->enum_basetype 
7213         directly.
7215 2009-02-04  Miguel de Icaza  <miguel@novell.com>
7217         * icall-def.h: Remove internal calls for sockets when
7218         DISABLE_SOCKET is defined, file system writing features when the
7219         OS only support reading and not writing data and Policy support if
7220         the Policy is disabled.
7221         
7222         * image.c (do_mono_image_open): Apply Paolo's patches for using
7223         mono_file_map_ APIs here.
7225         * assembly.c: Add support for platforms to avoid prefix
7226         auto-detection. 
7228 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
7230         * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
7231         warning.
7233         * class.c (mono_class_inflate_generic_class): New helper function.
7235         * class.c: Use mono_class_inflate_generic_class in a few places. Add
7236         statistics for inflated methods/classes.
7238         * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
7240         * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
7241         the call is made from Delegate.CreateDelegate () for the invoke method of
7242         a delegate.
7244         * loader.c: Add a statistics for the memory occupied by inflated signatures.
7246         * metadata.c (mono_metadata_signature_size): New helper function.
7248         * class.c (mono_class_get_method_from_name_flags): Add an optimization for
7249         generic instances.
7251         * metadata.c (inflated_method_in_image): Avoid calling 
7252         mono_method_signature () if the method does not already have a signature.
7254 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
7256         * verify.c (is_compatible_boxed_valuetype): When checking if the boxed 
7257         valuetype is compatible with target type, check by inheritance as a
7258         VT is not really compatible with System.ValueType, for example.
7260         * verify.c (do_invoke_method): Improve error message.
7262         * verify.c (do_box_value): If boxing a nullable, use the type argument
7263         on stack instead.
7265         * verify.c (do_newobj): Improve error message.  
7267         Fixes #469549.
7269 2009-02-03  Miguel de Icaza  <miguel@novell.com>
7271         * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
7273 2009-02-03  Mark Probst  <mark.probst@gmail.com>
7275         * generic-sharing.c: Don't hold domain lock when calling
7276         instantiate_other_info().  Fixes #471958.
7278         * domain-internals.h, loader.c: Describe locking policy of domain
7279         lock vs loader lock.
7281 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
7283         * verify.c (mono_delegate_signature_equal): Make it possible to check
7284         first-arg-bound delegates to static method.
7286         * verify.c (verify_delegate_compatibility): Correctly verify delegates to
7287         static methods with the first arg bound.
7289         Fixes #469529.
7291 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
7293         * verify.c: Added stack_slot_full_name to provide decent and more meanfull
7294         errors.
7296         * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
7297         under strict mode. Any type, when boxed can be seen as a reference type.
7299         Fixes #469528.
7301 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
7303         * object.h: The lower bound of an array is a signed integer value.
7304         Introduce mono_array_lower_bound_t typedef. It should be used instead of
7305         gint32 as under MONO_BIG_ARRAYS it will be a gint64.
7307         * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
7308         calculate the upper bound.
7309         
7310         Fixes #471252.
7312 2009-02-02  Miguel de Icaza  <miguel@novell.com>
7314         From Paolo's work, refactored, cleared up:
7315         
7316         * threadpool.c, icall.c: ifdef code that requires a working socket
7317         stack.
7319         * metadata.c (mono_metadata_field_info): Do not attempt to return
7320         a value from a function declared as void.
7322         * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
7323         from the console stack.
7325         * assembly.c: use strrchr instead of rindex.
7327         * class.c, object.c, marshal.c, icall.c, reflection.c: include
7328         alloca.h on systems that have it.
7330         * environment.c: Avoid code that uses stuff from
7331         HAVE_SYS_UTSNAME_H
7332         
7333         * appdomain.c: Include sys/time.h.
7335         * console-io.c: include sys/ioctl.h if it is available.
7337 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
7339         * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
7341         * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
7342         the method builder.
7344         * marshal.c: Set mb->skip_visibility instead of setting it on the method
7345         after it was created and cached, as the later is not thread safe.
7346         
7347 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
7349         * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
7350         called while the debugging module is not initialized. Fixes #471669.
7352 2009-02-02 Rodrigo Kumpera  <rkumpera@novell.com>
7354         * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
7356         Fixes #471255.
7358 2009-02-02  Mark Probst  <mark.probst@gmail.com>
7360         * generic-sharing.c (lookup_or_register_other_info): Make sure the
7361         loader lock is not taken while the templates lock is held.  Fixes
7362         #471089.
7364 2009-02-02  Mark Probst  <mark.probst@gmail.com>
7366         * metadata.c (type_in_image): Added a check to fix a monodis
7367         crash.
7369 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
7371         * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
7372         nullable arguments.
7374         * object.c (mono_runtime_invoke_array): Ditto.
7375         
7376         * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
7377         freeing wrappers of dynamic methods.
7379         * loader.c (mono_free_method): Call it. Fixes #463323.
7380         
7381         * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
7382         methods taking vtype/byref arguments, to fix yet another bug caused by
7383         the sharing of runtime invoke wrappers. Partly fixes #471259.
7385 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
7387         * debug-mono-symfile.c (check_line): Return NULL instead of returning
7388         <first file in file table>:1 when the IL offset does not have an associated
7389         line number.
7391 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
7393         * mono-debug.c (mono_debug_lookup_locals): New function to return local
7394         variable info for a method.
7396         * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
7397         
7398 2009-01-30  Jb Evain  <jbevain@novell.com>
7400         * pedump.c: reuse code from monodis to make sure pedump honors
7401         MONO_PATH, which is needed to verify net_2_1 assemblies.
7403 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
7405         * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
7406         there is no line number info.
7408 2009-01-29  Raja R Harinath  <harinath@hurrynot.org>
7410         Avoid some MonoType allocations
7411         * reflection.c (mono_reflection_initialize_generic_parameter):
7412         Reuse MonoType from param->pklass rather than allocating one.
7413         (mono_dynamic_image_free): Update to changes.
7415 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
7417         Rearrange some code to improve consistency
7418         * reflection.c (mono_reflection_setup_generic_class): Move body ...
7419         (mono_reflection_initialize_generic_parameter): ... here.
7421 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
7423         * generic-sharing.c (has_constraints): Enable gshared for methods/classes
7424         with type constraints as an experiment.
7426         * boehm-gc.c (on_gc_notification): Update mono_stats.
7428 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
7430         Avoid some allocations
7431         * class-internals.h (_MonoGenericInst::type_argv): Convert from
7432         pointer to tail array to avoid extra allocation.
7433         * metadata.c (free_generic_inst): Update to changes.
7434         (mono_metadata_get_generic_inst): Likewise.  Use alloca instead of
7435         on-stack struct.
7437 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
7439         * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
7440         return TRUE if the two type objects are the same.
7442 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
7444         * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
7445         (mono_class_native_size): Use klass->marshal_info->min_align instead of
7446         klass->min_align, since klass->min_align contains the managed alignment,
7447         while the native alignment can be different, like for longs on x86.
7448         Fixes #469135.
7450         * class-internals.h (MonoMarshalType): Add a min_align field.
7452 2009-01-26 Rodrigo Kumpera  <rkumpera@novell.com>
7454         * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
7455         the 1.0 format.
7457 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
7459         * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
7460         some comments about the usage of the used_regs field.
7462         * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
7463         Fixes #469217.
7465 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
7467         * appdomain.c: return NULL instead of throwing FileNotFoundException
7468         when LoadAssembly() fails.
7470 2009-01-23  Mark Probst  <mark.probst@gmail.com>
7472         * metadata.c (mono_metadata_generic_param_equal): Only compare the
7473         image if the owner is NULL.  Fixes the AOT failures.
7475 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
7477         * metadata.c (mono_metadata_load_generic_params): Initialize the 
7478         MonoGenericParam structure using memset so the image field is initialized
7479         as well.
7481 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
7483         * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
7484         a plain store.
7486 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
7488         * class.c (mono_class_setup_vtable_general): In the generic instance
7489         optimization, set method->slot for abstract virtual methods. Fixes part of
7490         #467834.
7492 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
7494         * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
7495         which signals that the unloading has started but all appdomain services must
7496         remain operational.
7498         * appdomain.c (mono_domain_unload): The initial state for unloading now
7499         is unloading_start and we switch to unloading after the managed call to
7500         AppDomain::DomainUnload has finished.
7502         The new unloading state has to be created because managed code in the
7503         DomainUnload event can depend on things like the threadpool still working.
7504         The domain must remain fully functional while the event executes.
7506         This shown as an issue due to Process::WaitForExit, which waits for
7507         async reads of stdout and stderr to complete. Since those are processed
7508         in the threadpool the code deadlocks because the DomainUnload callback 
7509         waits for the async read finished event, which should have been set by a
7510         threadpool job but has been discarded due to the domain been in unload
7511         state.
7513 2009-01-21  Mark Probst  <mark.probst@gmail.com>
7515         * metadata.c (mono_metadata_generic_param_equal): Owner as well as
7516         image must match.
7518 2009-01-21  Mark Probst  <mark.probst@gmail.com>
7520         * reflection.c (resolve_object): For fields, inflate the class and
7521         then get the field in the inflated class.
7523 2009-01-20  Mark Probst  <mark.probst@gmail.com>
7525         * object-internals.h (struct _MonoException): Added a comment
7526         explaining the new use of trace_ips.
7528 2009-01-20  Mark Probst  <mark.probst@gmail.com>
7530         * generic-sharing.c (inflate_other_data): Inflate array methods
7531         correctly.
7533         * loader.c, class-internals.h: Rename search_in_array_class() to
7534         mono_method_search_in_array_class() and make it non-static.
7536 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
7538         * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
7539         Hopefully fixes #458168.
7541 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
7543         * object.c (mono_raise_exception): Remove call to InterlockedIncrement
7544         as it is performed elsewhere.
7546         Code is contributed under MIT/X11 license
7548 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
7550         * mono-perfcounters-def.h: Add counters for asp.net requests total and
7551         requests queued.
7552         * object.c (mono_raise_exception): Increment the exceptions total
7553         counter when an exception is thrown.
7554         * class-internals.h: Add a location for storing the total number of
7555         asp.net requests served.
7556         * mono-perfcounters.c: Implement update support for asp.net counters
7557         from the class libraries. Implement read support for asp.net counters
7558         and exceptions total counter.
7560 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
7562         * loader.c (search_in_array_class): Call mono_class_setup_methods () before
7563         accessing klass->methods. Fixes #467385.
7565 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
7567         * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
7568         for byval arguments without an [Out] attribute. Fixes #467212.
7570         * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com). 
7571         Fix compilation under android.
7572         
7573         * sgen-gc.c: Instead of scanning gray objects after all roots have been 
7574         processed, scan them directly after they are copied, to achieve better locality
7575         and cache usage.
7577         * socket-io.c: Applied patch from Koushik Dutta
7578         (koush@koushikdutta.com). Disable IPV6 when running under android.
7580 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
7582         * icall.c (ves_icall_InternalExecute): Add write barriers.
7584         * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
7585         the GC code.
7587         * sgen-gc.c: Implement write barriers in IL code.
7589 2009-01-17  Geoff Norton  <gnorton@novell.com>
7591         * image.c: Avoid trying to walk the reference table of dynamic assemblies.
7593 2009-01-17  Geoff Norton  <gnorton@novell.com>
7595         * image.c: When unloading the image->references table, there can be gaps
7596         in it.  Ensure that we iterate every entry to avoid leaking assembly references
7597         when unloading an appdomain.
7599 2009-01-16  Zoltan Varga  <vargaz@gmail.com>
7601         * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
7602         speed up ptr-in-nursery checks.
7604         * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
7605         threads_lock () to prevent deadlocks.
7607         * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
7608         does not need to be scanned during minor collections, since writes to it
7609         must use write barriers.
7611 2009-01-15 Rodrigo Kumpera  <rkumpera@novell.com>
7613         * metadata-verify.c: Add pe nt header verification.
7614         
7615 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
7617         * gc.c: Fix a few warnings when using SGEN.
7619 2009-01-14 Rodrigo Kumpera  <rkumpera@novell.com>
7621         * metadata-verify.c: Add pe optional header verification.
7623 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
7625         * sgen-gc.c: Add support for user defined marker functions, used by
7626         MonoGHashTable to avoid registering a GC root for every hash node.
7628 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
7630         * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
7631         non-pinned roots into separate hashes to avoid having to traverse them
7632         in functions which are only interested in one kind.
7634 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
7636         * metadata-verify.c: Add pe header machine field verification.
7637         
7638 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
7640         * metadata-verify.c: Add pe header size verification.
7642 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
7644         * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
7645         using the GC, they don't contain references.
7647         * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
7649 2009-01-13  Geoff Norton  <gnorton@novell.com>
7651         * appdomain.c|h: Expose mono_domain_unload to the embedding api so that 
7652         AppDomains created on the native side can be cleaned up on the native side.
7654 2009-01-13  Geoff Norton  <gnorton@novell.com>
7656         * appdomain.c: Ensure that we call mono_context_init for the embedding api
7657         as well as the managed api.
7659 2009-01-13  Geoff Norton  <gnorton@novell.com>
7661         * appdomain.h|c: New API for creating a MonoDomain in the embedding api
7662         with a MonoAppDomain initialized against it.
7664 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
7666         * reflection.c (MOVING_GC_REGISTER): Fix a warning.
7667         
7668         * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
7670         * marshal.c: Avoid setting the exception clauses after a method has been entered 
7671         into the wrapper caches. Fixes #465700.
7673         * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
7674         method builder.
7675         (mono_mb_create_method): Set the clauses from the method builder.
7677 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
7679         * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
7680         Patch from Makoto Kishimoto.
7682 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
7684         * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by 
7685         encoding them as ROOT_DESC_COMPLEX.
7686         (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
7688 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
7690         * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
7691         no longer point to the nursery.
7693         * sgen-gc.c: Add a few comments/FIXMEs.
7694         
7695         * sgen-gc.c: Implement scanning of the alloc_pinned objects.
7697         * marshal.c (mono_marshal_get_synchronized_wrapper): Make the 
7698         initialization of the various _method variables thread safe. Fixes
7699         #465377.
7701 2009-01-12  Mark Probst  <mark.probst@gmail.com>
7703         * domain.c, domain-internals.h: Remove the shared_generics_hash
7704         and its lookup functions.
7706 2009-01-12  Bill Holmes  <billholmes54@gmail.com>
7708         * socket-io.c:  Fixing the MSVC build. 
7710         Code is contributed under MIT/X11 license.
7712 2009-01-12 Rodrigo Kumpera  <rkumpera@novell.com>
7714         * metadata-verify.c: Add pe header watermark verification.
7716 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
7718         * metadata-verify.c: Add lfanew verification.
7720 2009-01-12  Jb Evain  <jbevain@novell.com>
7722         * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
7723         METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
7725 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
7727         * socket-io.c: Fix the build.
7729         * environment.c: Fix an #ifdef.
7731 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
7733         * threadpool.c (async_invoke_thread): Handle the wait function returning
7734         WAIT_IO_COMPLETION as well.
7735         (async_invoke_io_thread): Ditto.
7737 2009-01-09  Bill Holmes  <billholmes54@gmail.com>
7739         * threads.c: Fixing the Windows build.
7741         Code is contributed under MIT/X11 license.
7743 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
7745         * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
7746         interrupt a wait.
7747         (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
7748         the thread to wait again.
7750 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
7752         * metadata-verify.c: Initial skeleton of the metadata verifier.
7754         * pedump.c: Add support for the metadata verifier.
7756         * verify-internal.h: Export the whole assembly metadata verifier function.
7758 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
7760         * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
7762 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
7764         * Makefile.am: Upgrade dtrace-prelink.sh location.
7766 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
7768         * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
7769         well. Otherwise the shutdown deadlock that happens on unix will can happen
7770         as well.
7771         If the main thread code finishes too fast it's possible that the finalizer
7772         thread won't have executed yet, won't record itself as the finalizer thread
7773         and the shutdown sequence will wait on it forever.
7775 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
7777         * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
7778         with MSVC.
7780 2009-01-08  Miguel de Icaza  <miguel@novell.com>
7782         * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
7783         Robert Jordan for pointing this out.
7785 2009-01-08  Christian Prochnow  <cproch@seculogix.de>
7787         * icall.c
7788         * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
7789         ves_icall_System_IO_DriveInfo_GetDriveType.
7791 2009-01-07  Miguel de Icaza  <miguel@novell.com>
7793         * icall.c: Wrap calls to mono_strtod in CriticalSection
7794         invocations when using eglib, to work around #464316.
7796 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
7798         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
7799         return value of GetCurrentDirectory to never access unitialized memory.
7801 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
7803         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
7804         return value of GetCurrentDirectory and expand the buffer if needed.
7806         Fixes #459094.
7808 2009-10-07 Tom Hindle  <tom_hindle@sil.org>
7810         * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) : 
7811           Adding a call to mono_init_com_types.
7813         Code is contributed under MIT/X11 license.
7815 2009-01-07  Geoff Norton  <gnorton@novell.com>
7817         * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on 
7818         darwin.  Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
7819         ai_canonname can be null in some cases on darwin, where the runtime assumes it will 
7820         be the value of the ip buffer.
7822 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
7824         * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
7825         interfaces_packed here.
7827         Fixes part of #463294.
7829 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
7831         * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
7833         Fixes part of #463294.
7835 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
7837         * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
7838         is a boxed complex as well.
7840         Fixes part of #463294.
7842 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
7844         * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
7845         control if a methodspec should be created for the generic method definition from external assemblies.
7846         Caching of methodspec is done using the handleref hash table.
7848         Fixes #462592.
7850 2009-01-05 Rodrigo Kumpera  <rkumpera@novell.com>
7852         * loader.c (find_method): When searching the interfaces of a class
7853         check the transitive closure of implemented interfaces.
7855         Fixes #463303.
7857 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
7859         * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
7860         
7861 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
7863         * class.c (get_implicit_generic_array_interfaces): Extract valuetype
7864         interfaces calculation to fill_valuetype_array_derived_types.
7866         * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
7867         ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
7868         for example.
7870         * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
7871         interfaces for valuetypes if needed.    
7873         * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
7874         for their basetype as well. Types are array expanded if rank is > 0.
7876         Fixes #400716.
7878 2008-12-30  Bill Holmes  <billholmes54@gmail.com>
7880         * socket-io.h : Changing the signature of
7881           ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
7882           the blocking state.
7884         * icall-def.h :  Changing the signature of
7885           System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
7887         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
7888           For Windows only.  Avoid blocking when calling accept by
7889           querying for a connection via select.  The loop also queries
7890           the thread state every 1000 micro seconds for the thread
7891           stop state.  This will avoid the process hanging on shutdown
7892           when using a TcpChannel that is never connected to.
7894         Code is contributed under MIT/X11 license.
7896 2008-12-30  Marek Safar  <marek.safar@gmail.com>
7898         * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
7900 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
7902         * class.c (get_implicit_generic_array_interfaces): Extract common
7903         code to a helper function making it a lot easier on the eyes.
7905 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
7907         * class.c (get_implicit_generic_array_interfaces): If the internal
7908         enumerator is an interface inflate System.Object instead of itself.
7910         Fixes #461261.
7912 2008-12-24 Rodrigo Kumpera  <rkumpera@novell.com>
7914         * object.c (mono_runtime_invoke_array): Don't assert with
7915         byref nullable types.
7917         * marshal.c (mono_marshal_get_runtime_invoke): To handle
7918         byref nullables we unbox the object and store it on the
7919         stack. 
7920         We can't use the boxed object since it is the T of Nullable<T>
7921         and the boxed representation of a nullable it's underlying type
7922         or null.
7923         We could cheat and create a boxed nullable and use the same
7924         machinery of other byref VTs but this feels like a hack and
7925         using the stack has the bonus of reducing heap pressure.
7927         Fixes #461941.
7929 2008-12-23 Rodrigo Kumpera  <rkumpera@novell.com>
7931         * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
7932         return value.
7934         Fixes #461867.
7936 2008-12-19  Bill Holmes  <billholmes54@gmail.com>
7938         * icall-def.h : Adding an internal call definition for 
7939           System.Environment.internalBroadcastSettingChange.
7941         * icall.c : Adding a Windows only implementation to broadcast a 
7942           WM_SETTINGCHANGE when an environment variable has changed.
7944         Code is contributed under MIT/X11 license.
7946 2008-12-19  Mark Probst  <mark.probst@gmail.com>
7948         * class.c, class-internals.h: Made
7949         mono_class_has_parent_and_ignore_generics() non-static.
7951 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
7953         * image.c: deal with the mmap failing when loading an image.
7955 2008-12-17  Geoff Norton  <gnorton@novell.com>
7957         * threadpool.c: Ensure that the io_queue_lock is initialized
7958         in all circumstances, as we always attempt to cleanup against it.
7960 2008-12-17  Miguel de Icaza  <miguel@novell.com>
7962         * icall.c (ves_icall_System_Environment_get_Platform): For
7963         compatibility reasons for existing client code we will keep
7964         returning 4 for a while.   
7966         For how long will depend on the documentation being updated, and
7967         for us to give client code a chance to be updated.
7969         This reverts the original decison on #433108 since we did not
7970         catch roughly 33 instances of the broken code in our own source
7971         code base, we did not catch failures on the buildbots, and QA did
7972         not bring this as a problem.
7974         Only today I found some customer's code breaking due to our own
7975         class libraries not being fully updated and tracked it down to
7976         this change.  I am reverting it because if we could not even get
7977         our story straight in our own code base, how can we hope that our
7978         end user code be fixed?
7980         As of this morning, our Wiki page that documents how to detect
7981         Unix had not been fixed.    
7983 2008-12-16  Zoltan Varga  <vargaz@gmail.com>
7985         * metadata.c (inflated_method_in_image): Add a workaround for #458168.
7987         * class.c (mono_class_get_fields): Handle loading errors.
7989 2008-12-12 Mark Mason <mmason@upwardaccess.com>
7991         * 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.
7992         
7993 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
7995         * mono-perfcounters.c: avoid warning.
7997 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
7999         * reflection.c (ensure_runtime_vtable): Work on generic instances and
8000         make sure all interfaces have MonoClass::interface_id set.
8002         * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
8003         method table is property set.
8005 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
8007         * class.c: New function mono_class_setup_interface_id that setup
8008         MonoClass::interface_id if needed.
8010         * class-internals.h: Export new function.
8012 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
8014         * class.c: Add code to sanity check the vtable after setup_vtable_general
8015         has done it's work.
8017 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
8019         * icall.c: make Assembly.GetExecutingAssembly work properly when
8020         reflection is used to invoke the method.
8021         Bug #321781 fixed.
8023 2008-12-11  Mark Probst  <mark.probst@gmail.com>
8025         * metadata/generic-sharing.c: Look for constraints in all type
8026         arguments, not just the first one.
8028 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
8030         * appdomain.c: return the correct CodeBase for an Assembly instance
8031         that was loaded from the shadow-copy directories.
8032         Bug #458190 fixed.
8034 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
8036         * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
8038         * sgen-gc.c (check_object): New debugging helper function.
8040         * object.c: Fix calls to mono_value_copy_array ().
8042 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
8044         * class.c (mono_class_setup_fields): If working on an inflated class
8045         first check if the generic definition did init with success.
8047         Fixes #445361.
8049 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
8051         pedump.c (main): Fix a warning.
8053 2008-12-10  Bill Holmes  <billholmes54@gmail.com>
8055         * object-internals.h : Adding a definition for 
8056           MonoReflectionComVisibleAttribute.
8058         * marshal.c (cominterop_com_visible) :  Method added to check the 
8059           ComVisible attribute of a class.
8061         * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :  
8062           cominterop_raise_hr_exception added to consolidate common code 
8063           to raise hr exceptions.
8065         * marshal.c (cominterop_can_support_dispatch) :  Method added to determine 
8066           if a managed class should support IDispatch.
8068         * marshal.c 
8069           (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :  
8070           Added additional checks for managed object when getting 
8071           an IDispatch interface.
8073         Code is contributed under MIT/X11 license.
8075 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
8077         pedump.c (main): Handle mono_get_method () returning NULL. 
8079 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
8081         * marshal.h: Fix a warning.
8083 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
8085         * marshal.c : Adding cominterop_release_all_rcws to release all
8086           runtime callable wrappers held by the runtime.
8088         * marshal.h : Adding declaration for cominterop_release_all_rcws.
8089           
8090         Code is contributed under MIT/X11 license.
8092 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
8094         * metadata.c (mono_image_alloc_lock): New helper function.
8095         (mono_image_alloc0_lock): Ditto.
8097         * metadata.c: Use the alloc_lock () helper functions for allocating
8098         memory from the image mempool.
8100 2008-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
8102         * class.c (mono_class_from_generic_parameter): Document it's
8103         locking behavior. Fix double checked locking here, we stored in
8104         param->pklass a partially initialized MonoClass and no membar was used.
8106 2008-12-05  Marek Habersack  <mhabersack@novell.com>
8108         * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
8109         (3) functions are present in the C library use them to do the
8110         job. If they are absent, make sure that the sum of int_part and
8111         dec_part is rounded before returning. This is necessary due to the
8112         division of dec_part by the power of 10 before the final addition
8113         is performed - if the result is not rounded in some cases it will
8114         yield invalid results.
8116 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
8118         * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
8119         wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR 
8120         instruction instead of a pointer constant.
8122 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
8124         * loader.c (mono_method_get_header): Do most of the work outside the
8125         loader lock, to avoid assembly load hook deadlocks.
8127         * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
8128         (mono_metadata_parse_type_full): Ditto.
8130 2008-12-02 Rodrigo Kumpera  <rkumpera@novell.com>
8132         * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
8133         Make the stack depth fixed. Ensure proper argument passing to the backtrace
8134         funtions. Finally, use a lock to produce well ordered output.
8136         The lock looks silly, as all calls to the corlib mempool should be guarded
8137         with the loader lock, but for some reason this fact doesn't help. 
8139         * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
8141 2008-12-02  Mark Probst  <mark.probst@gmail.com>
8143         * socket-io.c: 64 bit big-endian fixes.
8145 2008-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
8147         * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
8148         targets that require strict compatibility between the types.
8150         * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
8151         to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
8152         Kill the strict argument and create a new one valuetype_must_be_boxed.
8154         * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
8155         state that all valuetypes must be boxed.
8157         Fixes #448560.
8159 2008-11-29  Kornél Pál  <kornelpal@gmail.com>
8161         * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
8162         IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
8164         Contributed under MIT/X11 license.
8166 2008-11-28 Rodrigo Kumpera  <rkumpera@novell.com>
8168         * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
8169         the inflate_generic_type machinery should handle it.
8171         This avoids a crash when the field's flags is zero and it's type is
8172         a primitive.
8173         What happens is that mono_metadata_parse_type_full will see that opt_attrs
8174         is zero and will return one of the cached built-in primitive types. Since
8175         those types live in read-only memory, the code that copies it crashes.  
8177 2008-11-28  Mark Probst  <mark.probst@gmail.com>
8179         * object.c: Don't put function descriptors into generalized IMT
8180         thunks.
8182 2008-11-28  Mark Probst  <mark.probst@gmail.com>
8184         * class.c: Enable generic code sharing on PPC64.
8186 2008-11-27  Mark Probst  <mark.probst@gmail.com>
8188         * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
8189         from mini/mini.c.
8191         * generic-sharing.c: Allocate the method template slists from the
8192         image mempool so it doesn't leak.
8194 2008-11-27 Rodrigo Kumpera  <rkumpera@novell.com>
8196         * class.c (generic_array_methods): Release the linked list.
8198 2008-11-27  Mark Probst  <mark.probst@gmail.com>
8200         * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
8201         invocation to g_utf16_to_utf8().
8203 2008-11-26  Mark Probst  <mark.probst@gmail.com>
8205         * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
8206         arguments on big endian archs.
8208 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
8210         * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
8211         the type name (test added in corlib).
8213 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
8215         * pedump.c: initialize perf. counters. Fixes a segv.
8217 2008-11-25  Martin Baulig  <martin@ximian.com>
8219         * mono-debug-debugger.c
8220         (mono_debugger_runtime_invoke): Return the exception object if an
8221         exception was thrown.  Visual Studio displays the exception object
8222         in the locals window.
8224 2008-11-24  Mark Probst  <mark.probst@gmail.com>
8226         * mini-trampolines.c (mono_delegate_trampoline): Don't return a
8227         ftnptr.
8229 2008-11-24  Mark Probst  <mark.probst@gmail.com>
8231         * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
8232         MONO_TYPE_U are sizeof (gpointer), too.
8234 2008-11-24  Mark Probst  <mark.probst@gmail.com>
8236         * marshal.c (mono_type_native_stack_size): Fixed size and
8237         alignment for reference types.
8239 2008-11-23  Mark Probst  <mark.probst@gmail.com>
8241         * class.c (mono_class_generic_sharing_enabled): Disable generic
8242         code sharing for PPC64.
8244 2008-11-21 Rodrigo Kumpera  <rkumpera@novell.com>
8246         * icall.c (mono_method_get_equivalent_method): Make sure
8247         method->klass->methods is inited before looping over it.
8249 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
8251         * object.c: when calling ExecuteAssembly in a newly created domain,
8252         the configuration file and application base are already set up.
8253         Bug #446353 take 2 fixed.
8255 2008-11-20  Zoltan Varga  <vargaz@gmail.com>
8257         * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
8258         Fixes #444715. Fix a warning.
8260 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
8262         * appdomain.c: write the full path of the assembly to the .ini file
8263         created when "shadow-copying"
8264         Bug #446353 fixed.
8266 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
8268         * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
8269         if signature==FALSE.
8271 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
8273         * marshal.h : Fix the cygwin build.
8274            marshal.c:12442: undefined reference to `_IID_IMarshal'
8275           
8276         Code is contributed under MIT/X11 license.
8278 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
8280         * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
8281           free threaded marshaler when QueryInterface is called on a COM callable
8282           wrapper requesting the IMarshal interface.
8283           
8284         Code is contributed under MIT/X11 license.
8286 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
8288         * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
8290         * reflection.c (mono_type_get_object): Special case the very common
8291         void type.
8293         * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
8294         hold typeof(void).
8296 2008-11-13  Bill Holmes  <billholmes54@gmail.com>
8298         * process.h : Adding method declaration for
8299           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
8300           
8301         * process.c : Adding implementation for
8302           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
8303           
8304         * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
8305           to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
8307         Code is contributed under MIT/X11 license.
8309 2008-11-10  Rodrigo Kumpera  <rkumpera@novell.com>
8311         * appdomain.c (unload_thread_main): Clean up threadpool by
8312         calling mono_thread_pool_remove_domain_jobs.
8314         * domain-internals.h (struct _MonoDomain): Add new fields to
8315         help coordinate the cleanup of the threadpool.
8317         * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
8318         that cleans up the threadpool of all jobs associated with an appdomain.
8319         It does that by cleaning up the queues and making sure all active
8320         threads are accounted.
8322         * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
8323         unloaded or in the process of. Take this is such way that there is
8324         no race condition between another thread starting the unload and the
8325         current thread acknowledging it.
8327         * threadpool.c (async_invoke_thread): Same.
8329         * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
8330         firing the new thread.
8332         * threadpool.c (start_tpthread): Same.
8334         * theadpool.c (append_job): Increment threadpool_jobs before queueing.
8336         * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
8338 2008-11-06  Jonathan Chambers  <joncham@gmail.com>
8340         * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle): 
8341         Add support for DuplicateHandle.
8342         
8343         * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
8344         Add support for DuplicateHandle.
8345         
8346         * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
8347         Add support for DuplicateHandle.
8349         Code is contributed under MIT/X11 license.
8351 2008-11-06  Mark Probst  <mark.probst@gmail.com>
8353         * class-internals.h: Make min_align into a whole byte.
8355         * class.c: Set min_align for SIMD types to 16.
8357 2008-11-05  Geoff Norton  <gnorton@novell.com>
8359         * attach.c: Default the attacher to enabled for all cases including
8360         embedded.
8362 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8364         * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
8365         change r117650.
8367 2008-11-04  Mark Probst  <mark.probst@gmail.com>
8369         * monitor.c, monitor.h: New function for querying offsets of
8370         members of MonoThreadsSync.
8372 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8374         * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
8375         to speed up this function and to avoid the boundless memory growth caused by
8376         the signature_dup () calls.
8378 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
8380         * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
8381         wrapper.
8383         * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
8384         by 1 bit.
8386         * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
8388 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
8390         * appdomain.c:
8391         * domain-internals.h: made mono_set_private_bin_path_from_config()
8392         "internal".
8393         * object.c: call the above function after setting the configuration
8394         file path for the root domain.
8395         Fixes bug #314478.
8397 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
8399         * assembly.c: when the assembly is loaded from an absolute path, end
8400         basedir with a directory separator.
8401         Bug #440781 fixed.
8403 2008-10-30  Mark Probst  <mark.probst@gmail.com>
8405         * monitor.c (mono_monitor_get_fast_enter_method): If
8406         CompareExchange is not available, don't create the fastpath
8407         instead of asserting.  (The method is missing in the 1.1 profile.)
8409 2008-10-30  Mark Probst  <mark.probst@gmail.com>
8411         * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
8413         * monitor.c, monitor.h: Code for generating Monitor.Enter and
8414         Monitor.Exit IL fastpaths.
8416 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8418         * class.c (mono_class_create_from_typedef): Added Vector2ul.
8420 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8422         * class.c (mono_class_create_from_typedef): Added Vector2l.
8424 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8426         * class.c (mono_class_create_from_typedef): Added Vector2d.
8428 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
8430         * appdomain.c: translate \ into / for cache_path.
8431         * domain-internals.h: new mono_is_shadow_copy_enabled().
8432         * icall.c: (fill_reflection_assembly_name) do the same path
8433         manipulations that get_code_base does.
8434         (get_code_base) use mono_is_shadow_copy_enabled.
8436 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
8438         * appdomain.c: shadow-copied assemblies go to CachePath +
8439         ApplicationName when both are set. DynamicBase has nothing to do with
8440         shadow copies.
8441         Bug #406877 fixed.
8443 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
8445         * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
8446         STANDALONESIG table.
8448         * metadata-internals.h (struct _MonoDynamicImage): Add cache for
8449         standalone signatures.
8451         * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature 
8452         comparison code: instead of comparing the signatures using a custom
8453         equals function, transform them to a common signature and compare that. This
8454         works better with AOT.
8456 2008-10-25  Zoltan Varga  <vargaz@gmail.com>
8458         * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
8460         * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
8461         call for generic instances.
8462         (mono_class_setup_properties): Call setup_properties () before accessing
8463         gklass->properties.
8465         * class.c (mono_class_get_virtual_methods): New helper function to iterate
8466         over the virtual methods of a class using metadata if possible, avoiding the
8467         creation of MonoMethod's for non-virtual methods.
8468         
8469         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
8470         get_virtual_methods () to iterate over the virtual methods of classes.
8472 2008-10-25  Martin Baulig  <martin@ximian.com>
8474         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
8476 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8478         * class.c (mono_class_create_from_typedef): Added Vector4i.
8480 2008-10-24  Mark Probst  <mark.probst@gmail.com>
8482         * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
8483         ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
8484         special-casing applies to eliminate the call completely.
8486 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8488         * class.c (mono_class_create_from_typedef): Added Vector8s.
8490 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
8492         * class.c (mono_class_create_from_typedef): Added Vector16sb.
8494 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
8496         * icall.c: get rid of annoying warning.
8498 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
8500         * threadpool.c: in 1.x, if you change the background status of the
8501         threadpool thread, it's not reset.
8502         Remove unnecessary calls to SetState.
8504 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8506         * threadpool.c: asynchronously create a set of idle threads upon first
8507         use of the threadpool. SetMinThreads will now start the appropriate
8508         number of idle threads if they are not already running. The default is
8509         1 threadpool thread per CPU. Increased the maximum number of threads
8510         per CPU to 10.
8512 2008-10-22  Martin Baulig  <martin@ximian.com>
8514         Revert r116521 from Zoltan, it breaks the debugger:
8516         * class.c (mono_class_get_virtual_methods): New helper function to iterate
8517         over the virtual methods of a class using metadata if possible, avoiding the
8518         creation of MonoMethod's for non-virtual methods.
8519         
8520         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
8521         get_virtual_methods () to iterate over the virtual methods of classes.
8523 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8525         * threads.c: when creating a threadpool thread, set its state to
8526         'background'.
8527         * threadpool.c: reset the background state of a threadpool thread
8528         after finishing each work item
8529         Bug #437888 fixed.
8531 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
8533         * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
8534         
8535         * class.c (mono_class_setup_vtable_general): Add an optimized version for
8536         generic instances which works by inflating the methods in the container
8537         class's vtable.
8539         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
8540         variant which doesn't make a copy if no inflation was done.
8541         (mono_class_setup_fields): Use it.
8543         * metadata.c (mono_metadata_get_shared_type): New helper function to
8544         return a shared instance of a given MonoType.
8546         * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
8547         a copy of most non-generic types.
8549 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
8551         * threadpool.c: remove one more GetSystemInfo () call.
8553 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
8555         * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
8556         use the code in mono-proclib.h to get processor information.
8558 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8560         * appdomain.c: fixed the logic that determines whether assemblies in a
8561         directory are "shadow-copied" or not. Bug #433483 fixed.
8563 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
8565         * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
8566         warning.
8568 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
8570         * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
8571         returning a vtype.
8573         * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
8574         reflection.c: Use mono_field_get_name () for accessing a field's name.
8576         * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
8577         class.c
8579         * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
8580         field.
8582         * loader.c (find_method_in_class): Reenable the metadata optimization by
8583         not using it for generic instances.
8585         * class-internals.h (MonoFieldDefaultValue): Extract the rarely used 
8586         data/def_type fields from MonoClassField into a separate structure.
8587         (struct MonoClassField): Remove data/def_type fields.
8588         (struct _MonoClass): Add a 'field_def_values' array to store the default
8589         values/RVA for fields.
8591         * class.c reflection.c: Update after the changes.
8592         
8593         * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
8594         for accessing field->data.
8596         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
8598         * loader.c (find_method_in_class): Revert the last change for now as
8599         it breaks Mono.C5 unit tests.
8601         * class-internals.h (struct _MonoDynamicGenericClass): Add fields
8602         'field_generic_types' and 'field_objects' which contain the information
8603         previously stored in MonoInflatedField.
8604         (MonoInflatedField): Delete.
8605         (struct _MonoClassField): Delete 'generic_info' field.
8607         * reflection.c: Store the information which was previously in 
8608         field->generic_info in MonoDynamicGenericClass instead.
8610         * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
8611         MonoClassField changes.
8613 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
8615         * marshal.c, method-builder.c: get rid of wrapper_hash and instead
8616         store the value inside the data array of the MonoMethodWrapper.
8617         This saves memory, is faster and fixes the lifetime issues (methods
8618         were never removed from the hash previously). May also fix bug#436996.
8620 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
8622         * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic 
8623         generic instances, compute the type from the generic definition instead of
8624         looking in field->generic_info.
8626         * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
8627         for inflated fields, the only user was get_fieldref_token () which no
8628         longer needs it.
8630         * class.c (mono_class_init): Revert the last change as it seems to cause
8631         crashes.
8633         * class-internals.h (struct _MonoClassField): Reorder fields to save 4
8634         bytes on 64 bit platforms.
8636         * object.c (mono_class_create_runtime_vtable): Fix a warning.
8637         
8638         * object.c (mono_class_create_runtime_vtable): Don't initalize
8639         field->data/field->def_type here, it is done lazily by 
8640         mono_class_get_field_default_value ().
8642         * icall.c (ves_icall_get_enum_info): Call 
8643         mono_class_get_field_default_value () instead of directly accessing
8644         field->data and field->def_type.
8646         * object.c (get_default_field_value): Ditto.
8648         * class.c (mono_field_get_data): Ditto.
8649         
8650         * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
8651         call for generic instances.
8653         * loader.c (find_method_in_class): If klass != from_class, then inflate
8654         the method with the context of from_class, since the caller assumes this.
8656 2008-10-20  Zoltan Varga  <vargaz@gmail.com>
8658         * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
8659         for accessing method->slot.
8661 2008-10-20  Cedric Vivier  <cedricv@neonux.com>
8663         * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
8665 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
8667         * class.c (mono_method_get_vtable_index): Use
8668         mono_method_get_vtable_slot () for accessing method->slot.
8670         * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
8671         accessing klass->methods.
8673         * class.c (mono_method_get_vtable_slot): New helper function.
8674         (mono_class_get_vtable_entry): Ditto.
8675         (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
8676         accessing method->slot.
8678         * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
8679         method to get_inflated_method ().
8681         * class.c (mono_class_get_inflated_method): New helper method to obtain
8682         a method of an inflated class without calling setup_methods ().
8683         (mono_class_get_cctor): Use get_inflated_method.
8685         * generic-sharing.c (mono_class_get_method_generic): Ditto.
8686         
8687         * marshal.c image.c: Lazily create all the marshal caches.
8689         * image.c (mono_image_init): Move initialization of runtime_invoke
8690         caches to marshal.c.
8692         * marshal.c (get_cache): New helper function to lazily initialize a 
8693         wrapper cache.
8694         (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
8696         * debug-helpers.c (mono_method_full_name): Include generic arguments.
8698 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
8700         * loader.c: fixed check for interface type.
8702 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
8704         * appdomain.c: check for NULL setup before it's referenced.
8707 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
8709         * class.c: remove the unused old vtable setup code.
8711 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
8713         * class.c: don't depend on interface order in
8714         setup_interface_offsets (bug #435777).
8715         * reflection.c: sort the InterfaceImpl table (patch from
8716         Jb Evain  <jbevain@novell.com>).
8718 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
8720         * assembly.c (mono_assembly_open_full): Avoid loading images while holding
8721         the low level assemblies lock.
8723 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
8725         * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
8726         object.c, reflection.c, socket-io.c, threads.c: introduced
8727         mono_framework_version () to return the major framewrok version,
8728         changed the code that was using more complex patterns to use it.
8729         Return the correct value for PlatformID for OSX.
8731 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
8733         * icall-def.h, process.h, process.c: added an icall to get info about
8734         processes using mono-proclib.
8736 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
8738         * mono-perfcounters.c: use the mono-proclib functions to
8739         access process information.
8741 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
8743         * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
8744         monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
8745         reflection.c: remove rawbuffer usage: mmap support is more sanely
8746         provided by utils/mono-mmap.
8748 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
8750         * gc.c: use posix semaphores when possible so that
8751         mono_gc_finalize_notify() is signal safe.
8753 2008-10-11  Zoltan Varga  <vargaz@gmail.com>
8755         * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
8756         #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
8757         be #ifdef-ed out, the linker will remove the rest.
8759         * marshal.c: Implement DISABLE_COM.
8761         * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
8763 2008-10-11  Miguel de Icaza  <miguel@novell.com>
8765         * locales.c (string_invariant_compare_char): Optimization: do not
8766         call g_unichar_type unless we actually need the information.
8768 2008-10-10  Mark Probst  <mark.probst@gmail.com>
8770         * object.c, class-internals.h: Also create remoting trampolines
8771         for generic methods.  Pass the domain to the remoting trampoline
8772         creation function, too.
8774 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
8776         * class.c (mono_class_init): Fix+re-enable the finalize optimization.
8778 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8780         * class.c (mono_class_create_from_typedef): Vector4u was renamed to
8781         Vector4ui.
8783 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
8785         * assembly.c:
8786         * locales.c: remove the use of g_strdown. Fixes bug #322313.
8788 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
8790         * assembly.c: in mono_assembly_load_friends() take the assemblies lock
8791         for the least possible amount of time (extending the fix in r113458).
8793 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
8795         * class.c (mono_class_create_from_typedef): Retrofit to new type names.
8797 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
8799         * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
8800         as possible simd intrinsic types.
8801         Optimized the test to check for the common prefix first.
8803 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
8805         * class.c: back out part of a broken optimization committed on
8806         May 23th (bug #433908).
8808 2008-10-09  Mark Probst  <mark.probst@gmail.com>
8810         * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
8811         Win32.  Should fix #432388 for most cases until we have the new
8812         profiler on Win32.
8814 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
8816         * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
8817         instead of using inst->id so the hash is stable for AOT.
8819 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
8821         * appdomain.c:
8822         * icall.c: create a .ini file for shadow-copied assemblies that
8823         contains the location of the original assembly. Use this to return the
8824         proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
8825         Also fix the number of '/' for windows when returning the CodeBase.
8826         Fixes bug #430920.
8828 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
8830         * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
8832         Code is contributed under MIT/X11 license.
8834 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
8836         * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
8837           if if the class vtable needs initialized.
8839         Code is contributed under MIT/X11 license.
8841 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
8843         * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) : 
8844           Adding default MonoMarshalSpecs for COM methods.  OBJECT->STRUCT,
8845           STRING->BSTR, and CLASS->INTERFACE.
8847         Code is contributed under MIT/X11 license.
8849 2008-10-07  Marek Habersack  <mhabersack@novell.com>
8851         * sysmath.h: changed the declaration of the
8852         ves_icall_System_Math_Round2 icall by adding an extra
8853         away_from_zero parameter.
8855         * sysmath.c (ves_icall_System_Math_Round2): added support for
8856         away from zero rounding. The icall now takes an extra boolean
8857         parameter to signal that away from zero operation is requested.
8859 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
8861         * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
8862         the delegate klass so it can work with full-aot.
8863         (mono_marshal_get_delegate_end_invoke): Ditto.
8864         (mono_marshal_get_delegate_invoke): Ditto.
8866 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
8868         * gc.c, attach.h, attach.c: remove a bad pattern:
8869         add_finalizer_callback () is not implemented correctly, it can't
8870         without adding more overhead to the finalizer loop and it's not
8871         even needed, since we know exactly what we need to call, so there is
8872         no need to do so through an expensive function pointer.
8874 2008-10-04  Zoltan Varga  <vargaz@gmail.com>
8876         * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
8877         for the no-gc case.
8878         * attach.c (mono_attach_init): Remove the #ifdef.
8880 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
8882         * attach.c (mono_attach_init): Don't use
8883         mono_gc_add_finalizer_thread_callback when compiling without GC.
8884         Fixes #432306.
8885         
8886         Code is contributed under MIT/X11 license.
8888 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
8890         * class.c (mono_class_create_from_typedef): Remove the 
8891         #ifndef DISABLE_SIMD stuff.
8893 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
8895         * class-internals.h (MonoClass): Added simd_type bit field.
8897         * class.c (mono_class_create_from_typedef): Check if type is a simd
8898         intrinsic.
8900 2008-10-03  Mark Probst  <mark.probst@gmail.com>
8902         * object.c (mono_method_add_generic_virtual_invocation): Only add
8903         instantiations to the thunk whose count is at least as large as
8904         the threshold.
8906 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
8908         * icall.c: changed the Type of the exception thrown when trying to
8909         invoke a constructor on an abstract class. Part of the fix for bug
8910         #324185.
8912 2008-10-02  Mark Probst  <mark.probst@gmail.com>
8914         * class.c, class-internals.h (mono_method_get_vtable_index): New
8915         function which returns the index into the vtable and properly
8916         handles inflated virtual generic methods.
8918 2008-10-01  Mark Probst  <mark.probst@gmail.com>
8920         * object.c, domain.c, object-internals.h, domain-internals.h:
8921         Generalize IMT thunk machinery to also handle thunks for virtual
8922         generic method invokes.  When a virtual generic method is invoked
8923         more than a number of times we insert it into the thunk so that it
8924         can be called without lookup in unmanaged code.
8926         * generic-sharing.c, class-internals.h: Fetching a
8927         MonoGenericInst* for a method from an (M)RGCTX.
8929 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
8931         * marshal.c (emit_marshal_string): Applied a variant of a patch by
8932         tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
8933         marshalling. Fixes #431304.
8935 2008-10-01  Bill Holmes  <billholmes54@gmail.com>
8937         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
8938           handle when ref is specified without In or Out.
8940         Code is contributed under MIT/X11 license.
8942 2008-09-30  Mark Probst  <mark.probst@gmail.com>
8944         * loader.c (mono_get_method_constrained): Don't expand method with
8945         the class's context, because it's already a method of that class.
8947 2008-09-30  Atsushi Enomoto  <atsushi@ximian.com>
8949         * attach.c : should be correct build fix.
8951 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
8953         * attach.c: Fix the previous change.
8955 2008-09-29  Atsushi Enomoto  <atsushi@ximian.com>
8957         * attach.c : quick w32 build fix.
8959 2008-09-27  Miguel de Icaza  <miguel@novell.com>
8961         * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
8962         crashes MonoDevelop: #430455.
8964 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
8966         * domain-internals.h (struct _MonoDomain): Move most fields used only by
8967         the JIT do MonoJitDomainInfo in ../mini/mini.h.
8969         * domain.c: Remove initialization/cleanup of the removed fields.
8971 2008-09-27  Mark Probst  <mark.probst@gmail.com>
8973         * class.c (mono_class_generic_sharing_enabled): Enable generic
8974         code sharing for PPC.
8976 2008-09-26  Bill Holmes  <billholmes54@gmail.com>
8978         * attach.c : Fixing the Windows builds.
8980         Code is contributed under MIT/X11 license.
8982 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
8984         * class.c (mono_class_generic_sharing_enabled): Experimentally change 
8985         the default generic sharing mode to 'all'.
8987 2008-09-25  Mark Probst  <mark.probst@gmail.com>
8989         * generic-sharing.c, class-internals.h: New function for checking
8990         whether a method needs a static RGCTX invoke wrapper.  A few
8991         funtions moved from mini/generic-sharing.c.
8993         * icall.c: New function used.
8995 2008-09-25  Mark Probst  <mark.probst@gmail.com>
8997         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
8998         Static RGCTX invoke wrapping applies to value type methods, too.
9000         * class.c (mono_class_setup_vtable_general): In generic-shared
9001         value types, wrap methods with a static RGCTX invoke wrapper.
9003 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
9005         * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
9006         osx build.
9008 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
9010         * gc.c (mono_gc_add_finalizer_thread_callback): New function to
9011         register a callback which is called when the finalizer thread is woken
9012         up.
9013         (finalizer_thread): Call the callback if it exists.
9015         * attach.h attach.c: New files, implementing the attach mechanism.
9017         * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
9018         
9019         * object.c (mono_object_get_virtual_method): Fix an assertion introduced
9020         by the previous change.
9022 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
9024         * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
9025         loader.c, marshal.c, metadata-internals.h, metadata.c,
9026         method-builder.c, object.c, reflection.c: introduced specific functions
9027         to allocate from the domain and image mempools and cleaned up most of
9028         the code to use them (still missing a few in reflection.c).
9029         Keep the loader bytes counter updated.
9031 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
9033         * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
9034         loader-related counters.
9036 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
9038         * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
9039         added more MS-compatible counters.
9041 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
9043         * class.c (mono_class_setup_fields): Call setup_fields before accessing
9044         class->blittable. Fixes #428217.
9046 2008-09-21  Zoltan Varga  <vargaz@gmail.com>
9048         * reflection.c (mono_image_get_field_on_inst_token): Call 
9049         field_encode_signature () since that handles custom modifiers too.
9050         Fixes #424663.
9052 2008-09-20  Zoltan Varga  <vargaz@gmail.com>
9054         * reflection.c (add_custom_modifiers): New helper function to merge custom
9055         modifiers stored in objects to a MonoType.
9056         (fieldref_encode_signature): Encode custom modifiers.
9057         (mono_image_get_generic_field_token): Call add_custom_modifiers ().
9058         (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
9060 2008-09-19  Kornél Pál  <kornelpal@gmail.com>
9062         * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
9063         calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
9064         64-bit IL only images because imports are not resolved for IL only images.
9065         Special thanks to Bill Holmes for finding this bug and testing the patch.
9066         Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
9068         Contributed under MIT/X11 license.
9070 2008-09-19  Miguel de Icaza  <miguel@novell.com>
9072         * mono-config.c (dllmap_start): Add support for the bits keyword
9073         on dllentry and dllmap to easily detect 32 vs 64 bit systems.
9075 2008-09-19  Mark Probst  <mark.probst@gmail.com>
9077         * reflection.c (inflate_mono_method): When the class the method is
9078         to be inflated for is itself not inflated, just return the method.
9080 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
9082         * mono-perfcounters.c: use more user friendly process instance names.
9084 2008-09-18  Bill Holmes  <billholmes54@gmail.com>
9086         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
9087           handle "[in] ref" and "[in][out] ref" cases.
9089         * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
9090           to mono_mb_create_method.  This was causing problems calling native to
9091           managed passing Variants by value.
9093         Code is contributed under MIT/X11 license.
9095 2008-09-18  Zoltan Varga  <vargaz@gmail.com>
9097         * class.c (can_access_internals): Call mono_assembly_load_friends ()
9098         before accessing the friend_assembly_names field.
9100         * assembly.c (mono_assembly_load_friends): Make this callable multiple
9101         times.
9102         (mono_assembly_load_from_full): Avoid calling load_friends (), it is
9103         called lazily when it is needed.
9105         * metadata-internals.h (struct _MonoAssembly): Add 
9106         'friend_assembly_names_inited' flag.
9108 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
9110         * mono-perfcounters-def.h: fix the types of a few counters.
9111         * mono-perfcounters.c: implemented the instance names getter
9112         and a few bugfixes.
9114 2008-09-18  Atsushi Enomoot  <atsushi@ximian.com>
9116         * culture-info-table.h : regenerated.
9118 2008-09-17  Robert Jordan  <robertj@gmx.net>
9120         * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
9121         context bound objects. Fixes #415577.
9123         Code is contributed under MIT/X11 license.
9125 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
9127         * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
9128         implementation (bug #423582).
9130 2008-09-16  Zoltan Varga  <vargaz@gmail.com>
9132         * object.c (mono_object_get_virtual_method): Handle the case method->slot
9133         is not set. Fixes #426309.
9135 2008-09-16  Jb Evain  <jbevain@novell.com>
9137         * class.c (mono_class_from_name): fix the exported type look up
9138         when the type is defined in a referenced assembly.
9140 2008-09-16  Jb Evain  <jbevain@novell.com>
9142         * reflection.c (mono_image_fill_export_table_from_type_forwarders):
9143         increment the next index counter on each iteration to make that work
9144         for more than one type forwarder. Unmanaged part to fix #422929.
9146 2008-09-15  Mark Probst  <mark.probst@gmail.com>
9148         * object-internals.h: enum ComInterfaceType in
9149         MonoInterfaceTypeAttribute is guint32, not guint16.
9151 2008-09-12  Mark Probst  <mark.probst@gmail.com>
9153         * cil-coff.h, image.c, reflection.c: Endianness fixes in image
9154         writing code.
9156 2008-09-11  Mark Probst  <mark.probst@gmail.com>
9158         * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
9159         not gboolean.
9161 2008-09-11  Mark Probst  <mark.probst@gmail.com>
9163         * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
9164         Endianness fixes for MonoSymbolFileOffsetTable.
9166 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
9168         * process.c (complete_path) : Removing quotes from the 
9169           input path.  The glib file routines do not handle file paths
9170           that have quotes around them.
9172         Code is contributed under MIT/X11 license.
9174 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
9176         * socket-io.h : Adding a comment to provide locations where 
9177           changes to MonoSocketAsyncResult need to be synced.
9179         Code is contributed under MIT/X11 license.
9181 2008-09-10  Zoltan Varga  <vargaz@gmail.com>
9183         * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out 
9184         parameters as well. Fixes #425001.
9186 2008-09-08  Miguel de Icaza  <miguel@novell.com>
9188         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
9189         windows build.
9191 2008-09-07  Miguel de Icaza  <miguel@novell.com>
9193         * console-io.c: Add support for tracking the window size if it
9194         changes.
9196         The setup is very simple: the TtySetup function will now return a
9197         pointer to a location in memory that tracks the current console
9198         size.  The managed code checks its current value every time its
9199         queried against the last value set, and updates accordingly.
9201         With this setup we can work with multiple consoles, and we do not
9202         require to poke into managed code from a signal handler.
9204         Additionally, the environment for COLUMNS and LINES is now handled
9205         in unmanaged code.
9207         (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
9209 2008-09-07  Mark Probst  <mark.probst@gmail.com>
9211         * marshal.c (mono_type_native_stack_size): Treat
9212         MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
9214 2008-09-04  Jb Evain  <jbevain@novell.com>
9216         * class.c (mono_class_is_assignable_from): fix assignability of nullables
9217         to nullables.
9219 2008-09-03 Rodrigo Kumpera  <rkumpera@novell.com>
9221         * verify.c (verify_type_compatibility_full): Revert change
9222         to allow converting a native int to unmanaged pointer be verifiable
9223         under non-strict mode.
9224         It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
9226         * verify.c: Added some TODOs.
9228 2008-09-02  Bill Holmes  <billholmes54@gmail.com>
9230         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
9231           ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
9232           Changed to use GlobalAlloc for the memory returned on Windows platforms.
9234         Code is contributed under MIT/X11 license.
9236 2008-09-02  Jb Evain  <jbevain@novell.com>
9238         * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
9240 2008-09-02 Rodrigo Kumpera  <rkumpera@novell.com>
9242         reflection.c (typebuilder_setup_fields): Handle classes with
9243         explicit size.
9245 2008-09-01 Rodrigo Kumpera  <rkumpera@novell.com>
9247         class.c (mono_class_setup_events): Add memory barrier due to
9248         double checked locking.
9249         
9250         class.c (mono_class_setup_properties): Same.
9252 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
9254         * class.c (mono_class_is_assignable_from): Fix the build.
9255         
9256         * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
9257         before accessing klass->interface_bitmap. Fixes #421744.
9259 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
9261         * appdomain.c (mono_runtime_set_no_exec): New internal function setting
9262         the runtime into no-exec mode, useful when running the AOT compiler.
9264         * appdomain.c gc.c object.c: Avoid executing managed code when running
9265         in no-exec mode.
9266         
9267         * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
9269         * reflection.c (_mono_reflection_get_type_from_info): Handle the 
9270         special case when the mono_assembly_loaded () returns NULL because the 
9271         search hook is not installed.
9273 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
9275         * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
9276         crashes in bstr marshalling on linux.
9278 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
9280         * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
9281         with more than one parameter.
9283 2008-08-24  Miguel de Icaza  <miguel@novell.com>
9285         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
9286         start/stop flow control as well when turning off ICANON (allows
9287         C-s and C-q to be read by Console.ReadKey).
9289 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
9291         * class.c (mono_class_init): Move the initialization of nested classes
9292         into mono_class_get_nested_types (). Fixes #418433.
9294         * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
9295         flag.
9297         * class.c reflection.c icall.c: Use mono_class_get_nested_types () for 
9298         iterating tough the nested classes of a class.
9300 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
9302         * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
9303         on arm.
9305 2008-08-22  Miguel de Icaza  <miguel@novell.com>
9307         * console-io.c (sigcont_handler): Support signal chaining for
9308         SIGCONT.
9310         (console_set_signal_handlers): Use best practices with sigaction,
9311         clear the structure before using it. 
9313 2008-08-22  Robert Jordan  <robertj@gmx.net>
9315         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
9316         Fix the Windows build.
9318 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
9320         * class.c (mono_class_generic_sharing_enabled): Make the default
9321         sharing mode 'corlib'.
9323 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
9325         * console-io.c (console_set_signal_handlers): Fix a warning.
9327         * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
9328         method normally, the JIT will take care of avoiding recursion.
9330 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
9332         * console-io.c : Fixing builds for platforms that do not have <termios.h>.
9334         Code is contributed under MIT/X11 license.
9336 2008-08-20  Miguel de Icaza  <miguel@novell.com>
9338         * console-io.c (sigcont_handler): We need to restore the entire
9339         termios state, not only the original settings, as things like echo
9340         can be controlled after this (Booish exposes this issue with its
9341         own ReadLine implementation).
9343         Additionally, we need to set the terminal back into keypad_xmit
9344         mode.
9345         
9346         (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
9347         string as a paramter as well.   Otherwise we get different
9348         keyboard sequences.
9350 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
9352         * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
9353         delegates with byref out parameter passing. Fixes #351520.
9355         * debug-helpers.c (mono_context_get_desc): New helper function to stringify
9356         a generic context.
9357         (mono_type_get_desc): Add the type arguments for GENERICINST.
9358         (mono_method_full_name): Stringify the class name using mono_type_full_name
9359         so it picks up generic arguments.
9361 2008-08-19  Gert Driesen  <drieseng@users.sourceforge.net>
9363         * console-io.c: Removed debug output.
9365 2008-08-19 Rodrigo Kumpera  <rkumpera@novell.com>
9367         reflection.c (mono_reflection_create_runtime_class): Alloc
9368         the nested classes linked list using the dynamic image mempool.
9369         Fixes leak in corlib compilation.
9371 2008-08-19  Miguel de Icaza  <miguel@novell.com>
9373         * console-io.c: Fix incredibly annoying behavior on the console
9374         after resuming execution after control-z.   This affected every
9375         console application.
9377 2008-08-18 Rodrigo Kumpera  <rkumpera@novell.com>
9379         * mempool-internals.h: Header for mono private mempool functions. The first
9380         two function are for allocating glib linked lists using pools.
9382         * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
9384         * Makefile.am: Added mempool-internals.h.
9386 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
9388         * domain.c (mono_domain_create): Call the JIT domain hook if installed.
9389         (mono_domain_free): Ditto.
9391         * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
9392         be used by the JIT to store its domain-specific information, instead of putting
9393         it directly into MonoDomain.
9395         * domain.c (mono_install_create_domain_hook): New helper function to install
9396         a hook which initializes domain->runtime_info.
9398         * domain.c (mono_install_free_domain_hook): Ditto.
9399         
9400 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
9402         * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
9403         asserting if the ares parameter is null.
9405         * mono-perfcounters.c: Fix warnings.
9407         * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
9408         is not needed, don't check for interruptions either.
9409         (mono_marshal_get_delegate_end_invoke): Ditto.
9411 2008-08-15  Marek Habersack  <mhabersack@novell.com>
9413         * mono-perfcounters.c (predef_readonly_counter): added support for
9414         reading the ASP.NET Requests Queued counter from another process.
9416 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
9418         * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
9419         MonoImage to simplify the AOT code.
9421 2008-08-10  Zoltan Varga  <vargaz@gmail.com>
9423         * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
9424         marshalling. Fixes #416078.
9426 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
9427         
9428         * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
9429         it is set, looking up the icall address is deferred to the JIT, since 
9430         in embedded scenarios, the icall might not be registered in the runtime
9431         doing the AOT compilation. Backported from the 2.0 branch.
9433 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
9435         * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
9436         Fixes #415621.
9438 2008-08-05  Marek Habersack  <mhabersack@novell.com>
9440         * Makefile.am: added support for cross-compilation.
9442 2008-08-04  Zoltan Varga  <vargaz@gmail.com>
9444         * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
9446 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
9448         * mono-perfcounters.c: jitted methods and jitted bytes counters.
9450 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
9452         * class-internals.h, icall-def.h, mono-perfcounters-def.h,
9453         mono-perfcounters.c: performance counters implementation.
9455 2008-07-31  Zoltan Varga  <vargaz@gmail.com>
9457         * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
9458         to gpointer, letting the AOT code decide what to store in it.
9460 2008-07-31  Bill Holmes  <billholmes54@gmail.com>
9462         * marshal.c (cominterop_get_native_wrapper) : Adding a call to 
9463           mono_class_setup_methods if the methods are not initialized.
9465         Code is contributed under MIT/X11 license.
9467 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
9469         * verify.c: Remove some debug code I commited by accident.
9471         * verify.c (mono_method_is_valid_in_context): Change the return value
9472         to make possible to distinguish between invalid and unverifiable.
9474         * verify.c (verifier_load_method): Don't return NULL for unverifiable
9475         methods.
9477 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
9479         * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
9480         constraints. Fixes regression in gtest-253.
9482 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
9484         * verify.c (mono_verifier_verify_class): Don't allow generic types
9485         with explicit layout.
9487         * verify.c (mono_method_verify): Check locals and argument types.
9489 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
9491         * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
9492         wait if the thread is in StopRequested state.
9494         * class.c (mono_class_from_name): Refactor the module searching code into
9495         a separate function so it can be reused in the AOT case too.
9497 2008-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
9499         * verify.c (mono_type_is_valid_in_context): Improve the error message.
9500         Check both the type and it's generic type definition for loader errors.
9501         
9502         * verify.c (mono_method_is_valid_in_context): Don't generate another
9503         error when a type errors occur, this leads to the wrong exception been
9504         thrown.
9506 2008-07-28  Dick Porter  <dick@ximian.com>
9508         * icall-def.h
9509         * process.c
9510         (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
9511         New internal calls to duplicate and close a process handle.
9513 2008-07-27  Andreas Färber  <andreas.faerber@web.de>
9515         * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
9517 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
9519         * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
9521 2008-07-27  Robert Jordan  <robertj@gmx.net>
9523         * class.c (mono_class_init): Don't compute class.has_finalize for
9524         valuetypes. Fixes #412477.
9526 2008-07-25 Rodrigo Kumpera  <rkumpera@novell.com>
9528         * verify.c: Implement constraint equivalence checking.
9529         This is required when a generic parameter is used as
9530         argument to a constrained one.
9532         Fixes #410637.
9534 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
9536         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9538         * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
9540         * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
9541         synch with managed object layout.
9543 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
9545         * verify.c (do_branch_op): Handle valuetypes and generic
9546         arguments properly.
9548         * verify.c (do_cmp_op): Same.
9550         Fixes #410383.
9552 2008-07-24  Mark Probst  <mark.probst@gmail.com>
9554         * generic-sharing.c: Fix memory leaks.
9556         * class.c, class-internals.h: Make
9557         mono_class_inflate_generic_type_with_mempool() non-static.
9559 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
9561         * pedump.c (dump_verify_info): Dump full class name.
9563 2008-07-24  Mark Probst  <mark.probst@gmail.com>
9565         * generic-sharing.c: Removed some old code that didn't do anything.
9567 2008-07-24  Massimiliano Mantione  <massi@ximian.com>
9568         * profiler.c: Added runtime_initialized_event,
9569         mono_profiler_install_runtime_initialized and
9570         mono_profiler_runtime_initialized. This new hook tells the profiler
9571         when the runtime is sufficiently initialized to be able to call
9572         mono_thread_attach on the root appdomain.
9573         * profiler.h, profiler-private.h: Likewise.
9575 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
9577         * verify.c (do_cast): Do boxing for generic arguments as well.
9579         * class.c (is_nesting_type): Drop generic instantiations before
9580         checking for nesting.
9582         * class.c (can_access_instantiation): Allow access to generic
9583         arguments.
9585 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
9587         * verify.c (verify_class_for_overlapping_reference_fields):
9588         On some cases, the field size might be zero, guard against that.
9589         Fix the explicit layout check to work as expected.
9591 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
9593         * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling 
9594         mono_thread_resume () during shutdown, since the thread we want to abort
9595         might be suspended.
9597 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
9599         * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a 
9600         warning.
9602         * debug-mono-symfile.c: Fix a warning.
9604         * mono-perfcounters.c (get_cpu_times): Fix a warning.
9606         * object.c (mono_class_vtable): Check if exception_type is set, and return
9607         NULL as defined by the function comments.
9609 2008-07-22  Mark Probst  <mark.probst@gmail.com>
9611         * mempool.c: Use malloc for every single mempool allocation if the
9612         configure option is set.  This makes it easier to track mempool
9613         allocations with tools like Valgrind.
9615 2008-07-22  Jb Evain  <jbevain@novell.com>
9617         * reflection.c (create_dynamic_mono_image): emit the same
9618         metadata version that SL2 does when creating a SL2 image.
9620 2008-07-21 Rodrigo Kumpera  <rkumpera@novell.com>
9622         * icall-def.h:
9623         * icall.c: New icall System.Enum:get_hashcode. This function
9624         avoids the overhead of boxing the enum to the underlying type.
9626 2008-07-21  Mark Probst  <mark.probst@gmail.com>
9628         * reflection.c (mono_method_get_object): Don't let static RGCTX
9629         invoke wrappers get into MonoReflectionMethods.
9631 2008-07-17 Rodrigo Kumpera  <rkumpera@novell.com>
9633         * object-internals.h:
9634         * object.c: New mono_runtime_class_init_full function
9635         that makes throwing the exception optinal.
9637         * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
9638         for the case where the exception object is supplied.
9640 2008-07-16  Kornél Pál  <kornelpal@gmail.com>
9642         * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
9643         old ld versions.
9645         Contributed under MIT/X11 license.
9647 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
9649         * string-icalls.c (ves_icall_System_String_InternalSplit):
9650         Optimize array allocation by caching the MonoClass of the
9651         array type.
9653         * icall.c (ves_icall_Type_GetMethodsByName): Same.
9655         * reflection.c (mono_param_get_objects): Same.
9657 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
9659         * icall-def.h:
9660         * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
9661         It inflates the given type using the class context.
9663 2008-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
9665         * object.c (mono_class_try_get_vtable): New function. Tries to fetch
9666         the vtable if it already exists.
9668         * object-internals.h: Add mono_class_try_get_vtable as part of the
9669         internal API.
9671         * reflection.c (mono_type_get_object): Use the MonoObject from the
9672         vtable when possible. Reduces locking contention on reflection heavy
9673         code.
9675 2008-07-15  Zoltan Varga  <vargaz@gmail.com>
9677         * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
9678         g_bit_nth_msf () since that macro is not implemented in eglib.
9680 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
9682         * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
9683         on platforms which do not support it.
9685 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
9687         * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
9689 2008-07-11  Martin Baulig  <martin@ximian.com>
9691         * mono-debug-debugger.h
9692         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
9694         * mono-debug-debugger.c
9695         (_mono_debugger_interruption_request): New global volatile variable.
9696         (mono_debugger_check_interruption): New public function.
9698         * threads.c
9699         (mono_thread_current_check_pending_interrupt): Call
9700         mono_debugger_check_interruption().
9701         (mono_thread_interruption_checkpoint_request): Likewise.
9703 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
9705         * verify.c: Add more type checks for loaded types. Verify the result
9706         handle from ldtoken.
9708 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
9710         * loader.c (field_from_memberref): Don't crash if the field
9711         wasn't found.
9713 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
9715         * verify.c: Verify if type and method instantiations
9716         don't have invalid VAR or MVAR arguments.
9718 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
9720         * verify.c: Fix double free of function pointer list.
9722 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
9724         * object.c (mono_string_to_utf8): Comment the new code as it
9725         breaks under eglib.
9727 2008-07-08 Rodrigo Kumpera  <rkumpera@novell.com>
9729         * object.c (mono_string_to_utf8): Avoid allocating a temp array.
9731 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
9733         * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
9734           is not throw too many times.
9736         Code is contributed under MIT/X11 license.
9738 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
9740         * mono-debug.c (mono_debug_find_method): Allow this to be called even when
9741         debugging is turned off.
9743 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
9745         * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
9747 2008-07-04  Mark Probst  <mark.probst@gmail.com>
9749         * class-internals.h, class.c: Added new generic sharing option:
9750         Share only stuff in System.Collections.Generic, which is now the
9751         default.
9753 2008-07-04  Mark Probst  <mark.probst@gmail.com>
9755         * generic-sharing.c, class-internals.h: New function for getting a
9756         generic method in a generic class given the corresponding method
9757         for a different instantiation of the class.  Partly refactored
9758         from mini-trampolines.c.
9760         * class.c: Make sure generic methods have a class_inst if they are
9761         part of a generic class.
9763         * metadata.c (mono_type_stack_size_internal): Handle type
9764         variables.
9766 2008-07-04  Mark Probst  <mark.probst@gmail.com>
9768         * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
9769         Signifies whether information on the this/vtable/mrgctx variable
9770         is available.
9772 2008-07-04  Mark Probst  <mark.probst@gmail.com>
9774         * object.c, object-internals.h, icall.c: New function
9775         mono_delegate_ctor_with_method(), which does the same as
9776         mono_delegate_ctor(), but takes an explicit method argument
9777         instead of taking the method from the jit info.
9779         * marshal.c: When creating a delegate with an inflated method take
9780         the "this" argument as the target class for the castclass.
9782 2008-07-03  Mark Probst  <mark.probst@gmail.com>
9784         * domain.c (mono_jit_info_table_find): Fixed a bug that caused
9785         mono_jit_info_table_find() to perform very badly in some cases.
9787 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
9789         * icall.c (type_from_typename): Handle 'string'.
9791         * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
9792         wrappers into the wrapper_hash, since the key is not a MonoMethod.
9794 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
9796         * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
9798         * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
9799         number of available managed allocator types.
9801         * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
9802         (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
9804 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
9806         * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
9807         which is a low level lock protecting just the 'jit_code_hash' hash table.
9809         * domain.c: Initialize+cleanup jit_code_hash_lock.
9810         
9811 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
9813         * coree.c (mono_load_coree): Set coree_module_handle global variable only
9814         after initialization.
9816         * coree.h: Make MonoFixupExe internal.
9818         Contributed under MIT/X11 license.
9820 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
9822         * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
9823         because that is platform independent. Check NumberOfRvaAndSizes in PE32
9824         as well.
9825         (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
9826         image being loaded is a CLI image and _CorValidateImage gets called.
9828         * coree.h: Add MonoLoadImage.
9830         * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
9831         instead of LoadLibrary.
9833         Contributed under MIT/X11 license.
9835 2008-06-29 Rodrigo Kumpera  <rkumpera@novell.com>
9837         * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
9838         for any primitive type.
9840 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
9842         * object.c (mono_array_new_specific): Optimize this and the other allocation
9843         functions a bit.
9844         
9845         * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
9846         domains too if mono_dont_free_domains is set.
9848         * domain-internals.h (mono_dont_free_domains): New internal option controlling
9849         whenever to free appdomain data after it has been unloaded.
9851         * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
9852         
9853 2008-06-28  Zoltan Varga  <vargaz@gmail.com>
9855         * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
9856         (mono_method_get_equivalent_method): Fix a warning.
9858         * object.c (mono_message_init): Avoid looking up array types for each call.
9860 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
9862         * object.c (mono_message_invoke): Avoid looking up the object[] type for each
9863         call.
9865         * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
9866         even more.
9868         * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
9869         each iteration.
9871         * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
9872         fields of an enum.
9874 2008-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
9876         * object.c (mono_value_box): Fix boxing of nullables.
9878 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
9880         * assembly.c (mono_set_rootdir): Use __ImageBase instead of
9881         mono_module_handle that is defined by the linker; no initialization required.
9882         * coree.h: Remove mono_module_handle, add __ImageBase, update
9883         mono_image_open_from_module_handle.
9884         * coree.c (_CorValidateImage): Convert platform independent PE32 images to
9885         PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
9886         (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
9887         memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
9888         to 4 GB away from image base address. IA64 version is not tested but was very
9889         easy to implement and should work if we ever need it.
9890         * domain.c (mono_init_internal): Avoid system error message boxes.
9891         * image.c (mono_image_open_from_module_handle): Replace ref_count argument
9892         with has_entry_point. Handle do_mono_image_load fauilre correctly.
9893         (mono_image_open_full, mono_image_close): Use has_entry_point instead of
9894         coff_attributes that is a more reliable way to detect if _CorDllMain was called.
9895         * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
9897         Contributed under MIT/X11 license.
9899 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
9901         * class.c, class-internals.h: Export mono_class_get_generic_type_definition
9902         as part of the private mono API.
9903         
9904         * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
9905         Do proper argument checking for methods that belong to generic classes.
9906         Do proper type resolution for GMFH/2.
9907         Fixes #377324.
9908         
9909 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
9911         * verify.c (do_switch): Fix a memory corruption bug with
9912         the jump index is out of bound.
9914 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
9916         * verify.c: Disable debug code.
9918 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
9920         * reflection.c (mono_image_get_methodbuilder_token): Use
9921         mono_image_get_methodspec_token_for_generic_method_definition
9922         instead of mono_image_get_memberref_token. We cache more memberef
9923         entries now.
9925 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
9927         * verify.c: Inflate exception clause types.
9928         Fixes #402606.
9929         
9930 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
9932         * reflection.c (mono_image_get_methodbuilder_token): Don't leak
9933         name.
9935         * reflection.c (mono_image_get_ctorbuilder_token): Same.
9937         * reflection.c (mono_image_create_method_token): Same.
9939 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
9941         * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
9942         It does the same as mono_image_get_methodref_token but works on
9943         MethodBuilder.
9945         * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
9946         and always generate a methodspec. This follows the old behavior and fixes
9947         the regressions in System.Core. 
9949 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
9951         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where 
9952         don't event mono_class_get () succeeds. Fixes #402182.
9954 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
9956         * metadata-internals.h: Added MonoDynamicImage::methodspec
9957         hashtable to store methodspec tokens created for MethodBuilders.
9959         * reflection.c (mono_image_get_methodbuilder_token): Encode generic
9960         MethodBuilders as open instantiations if a methodspec was requested.
9962         * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
9964         * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
9966         * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
9968         Fixes bug #349190.
9970 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
9972         * loader.c (method_from_methodspec): Avoid crashing if the
9973         method lookup fails.
9975 2008-06-20  Dick Porter  <dick@ximian.com>
9977         * socket-io.c (get_socket_assembly): Cope with Moonlight network
9978         classes being in a different assembly.  Fixes bug 399184.
9980 2008-06-20  Zoltan Varga  <vargaz@gmail.com>
9982         * loader.c (mono_loader_init): Make this callable multiple times.
9983         (mono_dllmap_insert): Call mono_loader_init () so this works even before
9984         the runtime is initialized. Fixes #401755.
9986 2008-06-19  Dick Porter  <dick@ximian.com>
9988         * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
9989         Fixes bug 349688.
9991 2008-06-19  Dick Porter  <dick@ximian.com>
9993         * socket-io.c:
9994         * icall-def.h: Implement Socket generic Send() and Receive()
9995         methods.  Fixes bug 395168.
9997 2008-06-19  Kornél Pál  <kornelpal@gmail.com>
9999         * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
10001         Contributed under MIT/X11 license.
10003 2008-06-18  Martin Baulig  <martin@ximian.com>
10005         * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
10006         `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
10007         set to 80.0.  The debugger <-> runtime interface is now frozen as
10008         well.   
10010         * mono-debug.c
10011         (mono_debug_debugger_version): Bump to 4.
10013 2008-06-18  Martin Baulig  <martin@ximian.com>
10015         * debug-mono-symfile.c
10016         (load_symfile): Don't check the minor version.
10018         * debug-mono-symfile.h: Bump the version number to 50.0.
10020 2008-06-18  Martin Baulig  <martin@ximian.com>
10022         * debug-mono-symfile.c
10023         (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
10024         minimum required version.
10026 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
10028         * reflection.c (mono_custom_attrs_from_property): Fix support for
10029         retriveving cattrs of dynamic inflated generic types.
10031         * reflection.c (mono_custom_attrs_from_event): Same.
10033         * reflection.c (mono_custom_attrs_from_field): Same;
10035         * reflection.c (typebuilder_setup_events): Same cattrs of events.
10037         * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
10038         Moved to metadata.c.
10040         * metadata.c: New functions to retrive the equivalent field, event
10041         of property from the generic type definition.
10043         * metadata-internals.h: Added new functions from metadata.c.
10045 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
10047         * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
10048         to cached in a mempool is used.
10050         * metadata.c (free_generic_class): In some situations field generic_info type
10051         is not properly dup'ed and leads to double free'ing.
10053         Fixes #400643.
10055 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10057         * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
10058         this arguments (will be needed later for generic methods).
10059         Collect stats.
10061 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10063         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
10064         Create a static RGCTX invoke wrapper for methods which require it.
10066 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10068         * object.c, class-internals.h: New function for checking whether
10069         an individual field is special static.
10071 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
10073         * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
10074         linear search since the table is sorted.
10076         * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
10077         Fixes #324180.
10079 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
10081         * appdomain.c (unload_thread_main): Applied patch from Tim Howard 
10082         (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
10084         * gc.c (mono_domain_finalize): Allow an infinite timeout.
10086         * threads.c (mono_threads_abort_appdomain_threads): Ditto.
10087         
10088         * threads.c (mono_thread_request_interruption): Get rid of locking, use
10089         InterlockedCompareExchange to query and modify 
10090         thread->interruption_requested.
10092         * object-internals.h (struct _MonoThread): Change interruption_requested
10093         to a gint32 so it can be modified by atomic operations. Add 
10094         'critical_region_level' from the managed side, change small_id to a guint32,
10095         add new set of 'unused' fields.
10097         * appdomain.c: Bump corlib version.
10099 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
10101         * class.c (mono_class_from_name): Search modules as well. Fixes
10102         #322332.
10104 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10106         * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
10107         templates.  Templates are generalized with an additional type_argc
10108         argument.  RGCTX templates have type_argc==0, MRGCTX templates
10109         have type_argc>0.
10111         * domain-internals.h, domain.c: New hash table for looking up
10112         MRGCTXs.
10114         * metadata.c, metadata-internals.h: Rename hash and equal
10115         functions for MonoGenericInst's and make them public.
10117         * class-internals.h: New data structures for the MRGCTX.  Macros
10118         for distinguishing slots in the RGCTX and the MRGCTX.
10120 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10122         * object.c (mono_method_get_imt_slot): Put the same methods of
10123         different instantiations of the same generic interface in the same
10124         IMT slots, to make generic sharing simpler.
10126 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
10128         * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
10130         * metadata.c (mono_metadata_field_info_with_mempool): Added.
10131         This function works just like mono_metadata_field_info, but
10132         accept a mempool as argument to be used allocating memory.
10134         * marshal.c (mono_marshal_load_type_info): Use new function
10135         to load marshal data into image mempool.
10137 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
10139         * class.c (mono_class_inflate_generic_type_with_mempool):
10140         This function allows to inflate a generic type using
10141         a mempool.
10143         * class.c (inflate_generic_type): Take a mempool as argument
10144         and use it to do type dup'ing.
10146         * class.c (mono_class_setup_fields): Field type for generic
10147         generic classes are allocated from the image mempool.
10149         * metadata.c (free_generic_class): Inflated field type is
10150         now allocated in the image mempool.
10152 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
10154         * threads.c (thread_cleanup): Free MonoThread::name.
10156 2008-06-12  Marek Habersack  <mhabersack@novell.com>
10158         * appdomain.c (ensure_directory_exists): avoid unnecessary
10159         mkdir(2) calls when the shadow directory already exists.
10160         (mono_make_shadow_copy): copy also satellite assemblies from the
10161         private bin directories.
10163 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
10165         * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
10166         
10167         * threads.c (mono_thread_get_stack_bounds): Align the stack address to
10168         a page boundary. Fixes #396219.
10170 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
10172         * marshal.c (mono_marshal_load_type_info): Add a memory barrier
10173         due to double-checked locking.
10175 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
10177         * assembly.c (build_assembly_name): Release memory on failure.
10179         * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
10181 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
10183         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
10184         memory on failure.
10186 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
10188         * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
10189         memory on failure.
10191 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
10193         * loader.c (field_from_memberref): Check if field signature type is equal
10194         to the non-inflated type of the field. Fixes #398980.
10196 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
10198         * assembly.c (mono_assembly_load_from_full): Call 
10199         mono_assembly_load_friends () outside the assemblies lock, since it can
10200         acquire the loader lock. Fixes #323696.
10202         * reflection.c (resolve_object): Inflate the inst with the context for
10203         FieldOnTypeBuilderInst. Fixes #399010.
10205 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
10207         * reflection.c (mono_image_get_field_on_inst_token): Don't
10208         inflate the field to encode it's signature. If it's a
10209         VAR or MVAR it should stay that way in the signature.
10210         Fixes #399047.
10212 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
10214         * reflection.c (resolve_object): Release memory of inflated types.
10216 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
10218         * loader.c (mono_method_get_signature_full): Remove assert about
10219         loading a methodspec to a generic method. We have such methods, such as
10220         System.Threading.Interlocked::CompareExchange<T>.
10221         This assert was removed since it crashes the verifier when it checks
10222         methods calling CompareExchange<T>.
10224 2008-06-10  Marek Safar  <marek.safar@gmail.com>
10226         * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
10227         of Type array and not MonoType.
10229 2008-06-10  Marek Habersack  <mhabersack@novell.com>
10231         * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
10232         <lupus@ximian.com>
10234 2008-06-10  Martin Baulig  <martin@ximian.com>
10236         * debug-mono-symfile.h
10237         (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6.  There were no
10238         changes to the file format, but we were generating incorrect
10239         source file indices in the line number table due to a bug, which
10240         made backtraces report an incorrect source file.
10242 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
10244         * mono-debug.c: Moved mono_debug_free_method_jit_info from
10245         mini/debug-mini.c to here.
10247         * mono-debug.c (il_offset_from_address): Free memory from find_method.
10249         * mono-debug.h: Export mono_debug_free_method_jit_info, users should
10250         use it to release structs returned by mono_debug_find_method.
10252 2008-06-10  Zoltan Varga  <vargaz@gmail.com>
10254         * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
10255         since it needs to set method->slot for all interface methods.
10257 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
10259         * class-internals.h: Forgot to add.
10261 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
10263         * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
10265         * reflection.c (lookup_custom_attr): Added a MonoImage argument.
10266         Lookup the custom attributes from property_hash.
10268         * reflection.c (mono_save_custom_attrs): Save the custom attributes
10269         in property_hash. Allocate all data using the image mempool.
10271         * reflection.c: Removed dynamic_custom_attrs. Changed all checks
10272         for dynamic_custom_attrs to checks if the image is dynamic.
10274 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
10276         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
10277         assemblies array.
10278         
10279         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
10280         runtime functions while holding the domain assemblies lock.
10282 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
10284         * verify.c: Reapplied the last bit of the reverted changes.
10286 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
10288         * verify.c: Reapplied more of the reverted changes.
10290 2008-06-09  Martin Baulig  <martin@ximian.com>
10292         * debug-mono-symfile.c (load_symfile): Check the major version
10293         first; if it's wrong, don't print the minor version in the error message.
10295 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
10297         * appdomain.c (set_domain_search_path): Make this use the domain assemblies
10298         lock instead of the domain lock to avoid deadlocks, since the thread might
10299         already hold the loader lock.
10301         * threads.c (start_wrapper): Call mono_monitor_init_tls ().
10302         (mono_thread_attach): Ditto.
10304         * monitor.c: Use a TLS variable for holding the current thread id instead
10305         of calling pthread_self ().
10306         (mono_monitor_init_tls): New internal function to initialize the TLS
10307         variable.
10308         (mono_monitor_try_enter_internal): Put the owner == id check after the
10309         owner == 0 check.
10311         * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
10312         missed optimizations when using gcc-4.3.
10314 2008-06-08 Rodrigo Kumpera  <rkumpera@novell.com>
10316         * reflection.c (mono_dynamic_image_free): Free the memory
10317         used by MonoGenericParam in MonoDynamicImage::gen_param.
10319         * reflection.c (mono_reflection_setup_generic_class): Allocate
10320         container from mempool.
10322         * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
10323         container from mempool.
10325 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
10327         * threads.c (mono_set_pending_exception): New internal function to set the
10328         pending exception of the current thread.
10329         (mono_thread_get_and_clear_pending_exception): Check for 
10330         thread->pending_exception as well.
10332         * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
10334         * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
10335         it can trigger a collection.
10337 2008-06-06  Martin Baulig  <martin@ximian.com>
10339         Merged the `debugger-kahalo' branch.
10341         * mono-debug.h
10342         (MONO_DEBUGGER_VERSION): Bumped to 72.
10344         * debug-mono-symfile.h
10345         (MonoSymbolFileMethodIndexEntry): Removed.
10346         (MonoSymbolFileMethodEntry): New public typedef.
10347         (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
10348         (MonoSymbolFileSourceEntry): Remove everything except `index' and
10349         `data_offset'.
10350         (MonoSymbolFileMethodEntry): Removed.
10351         (MonoSymbolFileLexicalBlockEntry): Removed.
10352         (MonoSymbolFileLineNumberEntry): Removed.
10353         (MonoDebugLexicalBlockEntry): Removed.
10354         (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
10355         removed `num_il_offsets' and `il_offsets'.
10356         (MonoSymbolFile): Replace `version' with `major_version' and
10357         `minor_version'.
10358         (MONO_SYMBOL_FILE_VERSION): Replace with
10359         `MONO_SYMBOL_FILE_MAJOR_VERSION' and
10360         `MONO_SYMBOL_FILE_MINOR_VERSION'.
10362         * debug-mono-symfile.c
10363         (mono_debug_symfile_lookup_location): Add support for the new line
10364         number table format.
10366 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
10368         * metadata.c (free_generic_class): Release the inflated
10369         MonoClass of dynamic generic classes if it's not a generic
10370         type definition.
10372 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
10374         * verify.c: Reapplied more of the reverted changes.
10376 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
10378         * reflection.c (lookup_custom_attr): Clean the cached flag or
10379         nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
10380         for SRE types.
10382 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
10384         * verify.c: Reapplied a small part of the reverted changes.
10386 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
10388         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10390         * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was 
10391         previously in managed code.
10392         (mono_monitor_exit): Ditto.
10393         (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
10395         * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
10396         the managed definition.
10398 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
10400         * verify.c: Revert changes to see if it helps with weird buildbot crashes.
10402 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
10404         * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
10405         
10406         * monitor.c: Add some micro optimizations.
10408         * icall.c (type_from_typename): Handle 'bool'.
10410 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
10412         * verify.c: Implement constructor verification per P III 1.8.1.4.
10413         Fixes #396716.
10415 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
10417         * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
10418         holding the assemblies lock here too.
10420 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
10422         * verify.c: Kill stack_top function.
10424 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
10426         * verify.c: Kill stack_get function.
10428 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
10430         * verify.c (mono_method_verify): Last change broke the build. Fixed.
10432 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
10434         * verify.c (verify_type_compatibility_full): Make SZARRAY checks
10435         more reliable.
10437         * verify.c (mono_method_verify): Inflate params and locals to avoid
10438         mismatch when checking for compatibility.
10440 2008-06-05  Jonathan Chambers  <joncham@gmail.com>
10442         * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
10443         Length prefix should be size in bytes. Fix bug #339530.
10444         
10445         * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
10446         Length prefix should be size in bytes. Fix bug #339530.
10448         Code is contributed under MIT/X11 license.
10450 2008-06-05  Bill Holmes <billholmes54@gmail.com>
10452         * decimal.c:  Adding MSVC implementation to my_g_bit_nth_msf.
10454         Contributed under MIT/X11 license.
10456 2008-06-05  Martin Baulig  <martin@ximian.com>
10458         * mono-debug-debugger.c
10459         (mono_debugger_check_breakpoints): Reflect latest runtime changes.
10461 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
10463         * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
10464         while holding the assemblies lock to prevent deadlocks. Handle the case
10465         where the search hook returns NULL but the assembly was still loaded.
10466         Fixes #323696.
10468         * appdomain.c (set_domain_search_path): Acquire the domain lock since we
10469         modify domain state.
10471 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
10473         * boehm-gc.c: Add DTrace probes gc-{begin,end}.
10474         * Makefile.am (pedump_LDADD): Post-process object files and
10475         add dtrace-generated object file, if necessary.
10477         Code is contributed under MIT/X11 license.
10479 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
10481         * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
10483 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
10485         * class.c (mono_type_get_full): Add a work-around for generic type definitions.
10487 2008-06-04  Mark Probst  <mark.probst@gmail.com>
10489         * threads.c: Try to free everything from the delayed free table
10490         when shutting down threads, and set the variable to NULL after the
10491         table is freed so that calling
10492         mono_thread_hazardous_try_free_all() when shutting down the root
10493         domain doesn't crash.
10495 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
10497         * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
10498         the caller if resulting type was inflated.
10500         * class.c (mono_class_create_from_typespec): Free the MonoType if it
10501         was inflated.
10503         * class.c (mono_type_get_full): Free the MonoType if it was inflated.
10506 2008-06-04  Zoltan Varga  <vargaz@gmail.com>
10508         * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
10509         class library tests.
10511         * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume 
10512         (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
10513         #396989.
10515 2008-06-04  Mark Probst  <mark.probst@gmail.com>
10517         * domain.c, domain-internals.h: The JIT infos are now freed by the
10518         JIT info table code.  They are freed immediately if there only a
10519         single JIT info table in circulation.  If there is more, the free
10520         is delayed via a queue.
10522         * threads.c, threads-types.h: New hazard pointer function for
10523         freeing all freeable delayed items in one sitting.
10525 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
10527         * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
10529         * reflection.c (typebuilder_setup_properties): Same.
10531         * reflection.c (typebuilder_setup_events): Same.
10533 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
10535         * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
10536         and use it for allocating memory.
10538         * reflection.c (mono_marshal_spec_from_builder): Same.
10540         * reflection.c: Change code to use new signatures.
10542         * metadata.c (mono_metadata_type_dup): Add a FIXME note.
10544 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
10546         * decimal.c (rescale128): Put back one line which was accidently commented
10547         out.
10548         
10549         * decimal.c (rescale128): Disable the code added by the last patch, as it seems
10550         to cause crashes.
10552 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
10554         * reflection.c (mono_reflection_generic_class_initialize): Name must
10555         be always malloc'ed so we can free it later on. Do this for field, property
10556         and event.
10558         * metadata.c (free_generic_class): Free field, property and event names.
10560 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
10562         * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
10563         instead of g_memdup.
10565         * reflection.c (typebuilder_setup_fields): Same.
10567 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
10569         * decimal.c (rescale128): Optimize this function a bit more.
10571 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
10573         * metadata.c (free_generic_class): Release some memory from
10574         SRE generic classes.
10576 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
10578         * reflection.c (mono_image_get_generic_field_token): No reference
10579         to name is kept, free it.
10581         * reflection.c (mono_reflection_generic_class_initialize): Free
10582         more memory of the inflated field.
10584 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
10586         * decimal.c (mono_decimalDiv): Moved equality checks here from managed
10587         code.
10589 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
10591         * reflection.c (mono_dynamic_image_free): Release memory used by
10592         MonoDynamicImage::array_methods elements.
10594         * reflection.c (assembly_add_win32_resources): Release memory after
10595         encoding.
10597 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
10599         * decimal.c (log2_32): Use an optimized version for this function too.
10600         
10601         * decimal.c (log2_64): Fix this on 32 bit machines.
10603 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
10605         * class.c (mono_dup_array_type): Implement allocation using a mempool.
10607         * class.c (mono_metadata_signature_deep_dup): Same.
10609         * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
10610         a mempool.
10612         * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
10614         * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
10616         * metadata-internals.h: Added mono_metadata_signature_dup_full.
10618         * class-internals.h: Update signatures to take a MonoMemPool.
10620 2008-06-02  Dick Porter  <dick@ximian.com>
10622         * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage): 
10623         * icall-def.h: Add
10624         System.ComponentModel.Win32Exception.W32ErrorMessage, using the
10625         FormatMessage API to get the error text.  Fixes bug 321827.
10627 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
10629         * decimal.c: Add some micro optimizations to make decimal operations faster.
10631 2008-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
10633         * reflection.c (method_encode_clauses): Take a mempool
10634         as parameter and use it to allocate the clause array.
10636         * reflection.c (mono_image_get_field_on_inst_token): Free
10637         the inflated type after encoding it.
10639         * reflection.c (mono_dynamic_image_free): Free each element
10640         of MonoDynamicImage::gen_params.
10642         * reflection.c (reflection_methodbuilder_to_mono_method):
10643         Allocate the generic param array from the mempool.
10644         Allocate signature params from the mempool.
10646         * reflection.c (mono_reflection_generic_class_initialize):
10647         Free inflated fields after been used.
10649 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
10651         * icall.c: Reapply the memory leak fixes as they no
10652         longer make mono crash.
10654 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
10656         * reflection.c (mono_type_get_object): Don't store the suplied
10657         MonoType with type_hash. A caller which pass a type that
10658         was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
10659         might end with a pointer to freed memory.
10660         The solution is to use byval_arg or this_arg from the associated
10661         MonoClass of the supplied type.
10663 2008-05-29  Zoltan Varga  <vargaz@gmail.com>
10665         * icall.c: Revert the rest of the last change as it breaks the build too.
10667 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
10669         * icall.c: Revert a leak fix as it's breaking the build.
10671 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
10673         * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
10675 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
10677         * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
10679 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
10681         * icall.c: Fix some memory leaks.
10683 2008-05-29  Dick Porter  <dick@ximian.com>
10685         * threadpool.c (mono_thread_pool_remove_socket): Always remove the
10686         async socket operations from the pending list when a socket
10687         closes.  Leaving it until the threadpool services the event
10688         exposes a race condition when a socket descriptor is reused.
10689         Fixes bug 377589.
10691 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
10693         * object.c: Fix negative index check for array alocation.
10695 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
10697         * icall.c, marshal.c: Delegate wrappers should skip visibility.
10698         This check is performed by the verifier for IL created delegates
10699         and by Delegate::CreateDelegate for programatically created ones.
10700         Fixes #372406.
10702 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
10704         * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
10705         Fix code to use mono_array_size_t instead of int.
10707         Based on patch by Luis F. Ortiz.
10708         Contributed under X11 license.
10709         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10711 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
10713         * icall.c: Added ves_icall_System_Array_GetLongLength and
10714         ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
10715         arrays.
10717         * icall.h: Export both new functions.
10719         Based on patch by Luis F. Ortiz.
10720         Contributed under X11 license.
10721         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10723 2008-05-28  Martin Baulig  <martin@ximian.com>
10725         The debugger now requires exactly r103463.
10727         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
10728         This version is not supported by the debugger, wait for 72.
10730 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
10732         * object.h: Changed array related functions to use
10733         mono_array_size_t instead of guint32. Forgot to commit this file.
10735         Patch by Luis F. Ortiz.
10736         Contributed under X11 license.
10737         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10740 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
10742         * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
10743         don't define it. Use the number literal instead.
10745 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
10747         * icall.c: Changed array related functions to use
10748         mono_array_size_t instead of guint32.
10750         * icall.c (ves_icall_System_Array_GetLength): Check for length
10751         overflow under MONO_BIG_ARRAYS.
10753         Based on patch by Luis F. Ortiz.
10754         Contributed under X11 license.
10755         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10757 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
10759         * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
10761         Based on patch by Luis F. Ortiz.
10762         Contributed under X11 license.
10763         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10765 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
10767         * object.c, object.h: Changed array related functions to use
10768         mono_array_size_t instead of guint32.
10770         Patch by Luis F. Ortiz.
10771         Contributed under X11 license.
10772         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10774 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
10776         * object.h: Introduced mono_array_size_t typedef. This must be used
10777         in all places an array length is expected. This is 64bits wide if
10778         MONO_BIG_ARRAYS is enabled.
10780         Patch by Luis F. Ortiz.
10781         Contributed under X11 license.
10782         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10784 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
10786         * security-manager.c class.c: Set the class exception info by calling
10787         mono_class_set_failure ().
10789         * class.c (mono_class_get_exception_data): New accessor function.
10790         (mono_class_set_failure): Store exception_data in the property hash.
10792         * class-internals.h (struct _MonoClass): Store 'exception_data' outside
10793         the struct as a property.
10795         * loader.c (mono_get_method_full): Store the lookup result for method
10796         tokens in method_cache, the others in methodref_cache to decrease the memory
10797         usage of hash tables.
10799         * image.c (mono_image_close): Destroy method_cache and methodref_cache.
10800         (mono_image_init): method_cache is lazy inited now.
10802         * metadata-internals.h (struct _MonoImage): Change method_cache to
10803         a MonoValueHashTable, add a separate methodref_cache.
10805 2008-05-27  Eyal Alaluf <eyala@mainsoft.com>
10807         * number-formatter.h: Fix tables to avoid arithemtic overflow in
10808           Double.ToString as exposed by Bug #383531.
10810 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
10812         * number-formatter.h: Make some tables static.
10814         * class.c (mono_method_set_generic_container): New accessor function.
10815         (mono_method_get_generic_container): Ditto.
10817         * class-internals.h (struct _MonoMethod): Remove rarely used 
10818         'generic_container' field, store it in the property hash instead. Add 
10819         'is_generic' boolean field instead.
10821         * image.c (mono_image_init): Initialize property_hash.
10822         (mono_image_close): Destroy property_hash.
10824         * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
10825         hold rarely used fields of runtime structures belonging to this image.
10827         * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
10828         to get/set method->generic_container.
10830         * loader.c (mono_get_method_from_token): Avoid loading the method header for
10831         generic methods.
10833 2008-05-25  Zoltan Varga  <vargaz@gmail.com>
10835         * class.c (mono_class_inflate_generic_method_full): Don't increase
10836         mono_stats.inflated_method_count for methods found in the cache.
10838         * threads.c (mono_thread_request_interruption): Add a comment about 
10839         QueueUserAPC ().
10841 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
10843         * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
10844         interface_offsets_packed table.
10845         
10846         * class.c (mono_class_init): Remove some dead code.
10848         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
10849         mono_class_setup_vtable () when CAS is active to detect security problems.
10851 2008-05-23 Rodrigo Kumpera  <rkumpera@novell.com>
10853         * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
10855         * verify.c (mono_delegate_signature_equal): Don't compar number of generic
10856         parameters as it's irrelevant for delegate checking.
10858 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
10860         * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
10862         * class.c (mono_class_init): Control the creation of a generic vtable using
10863         a global which is true by default, but set to false by the runtime startup code.
10864         
10865         * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
10866         Disabled for now since it breaks the embedding API.
10867         Move the setup of class->methods for arrays to mono_class_setup_methods ().
10868         (mono_class_setup_methods): Add a memory barrier.
10870         * object.c (mono_class_create_runtime_vtable): Add code to handle the case
10871         when mono_class_init () doesn't compute the generic vtable.
10872         
10873 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
10874         * profiler.c: Added mono_profiler_install_statistical_call_chain,
10875         mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
10876         to support call chains (backtrace) in the stat profiler.
10877         * profiler.c, profiler-private.h: Likewise.
10879 2008-05-22  Mark Probst  <mark.probst@gmail.com>
10881         * generic-sharing.c: Init generic class when a method of it is
10882         requested via a runtime generic context.
10884 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
10886         * class.c (mono_class_init): Add a comment about trying to avoid calling this.
10888         * reflection.c (mono_type_get_object): Add a FIXME.
10890         * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
10892         * class.c (mono_class_get_method_by_index): New helper function, returning an
10893         entry in the class->methods array.
10895 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
10897         * class.c (mono_class_init): Only do the array optimization for szarrays. 
10898         Avoid creating a generic vtable for generic instances as well.
10899         (mono_class_get_method_from_name_flags): Don't search in the metadata for
10900         generic instances.
10902 2008-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
10904         * loader.c (mono_get_method_constrained): Inflate the signature
10905         with class context. Fix #325283.
10907 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
10909         * object.c (mono_class_create_runtime_vtable): Add a comment.
10911         * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
10912         where needed.
10913         (setup_interface_offsets): Handle the case when this is called twice for arrays.
10914         (mono_class_setup_vtable_general): Add an assert.
10915         (mono_class_init): Avoid creating a generic vtable for arrays.
10917         * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
10918         here, let mono_class_init () do that.
10920         * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
10921         interfaces in mscorlib.
10923         * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
10924         interfaces. Add some comments.
10925         (mono_class_init): Call mono_class_setup_methods () here since it is no
10926         longer called by mono_class_setup_vtable ().
10928         * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
10929         not set in class->vtable.
10930         (mono_class_create_runtime_vtable): Reenable the disabled code.
10932         * object.c (mono_class_create_runtime_vtable): Disable the last change for
10933         now as it causes some test failures.
10935         * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
10936         if using the vtable trampoline. Also remove some strange code which put the
10937         generic methods themselves into the vtable slots. Remove the AOT init_vtable
10938         stuff as it is no longer needed.
10940 2008-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
10942         * pedump.c: Give make --verify all option check code as well.
10943         Using --verify code won't check for metadata now.
10945 2008-05-19  Martin Baulig  <martin@ximian.com>
10947         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
10949         * mono-debug.c
10950         (_mono_debug_using_mono_debugger): New global variable; it's set
10951         directly by the debugger, so mono_debug_using_mono_debugger() also
10952         works after attaching.
10954 2008-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
10956         * object.c (mono_class_create_runtime_vtable): Use memory barriers
10957         as we do double checked locking on MonoClass::runtime_info and
10958         MonoClassRuntimeInfo::domain_vtables.
10960 2008-05-18  Zoltan Varga  <vargaz@gmail.com>
10962         * debug-helpers.c (print_field_value): Fix a warning.
10964 2008-05-16  Zoltan Varga  <vargaz@gmail.com>
10966         * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
10967         set in the AOT case.
10969 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
10971         * class.c (mono_class_setup_vtable_general): Use memory barriers
10972         as we do double checked locking on MonoClass::vtable.
10974 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
10976         * reflection.c (resolve_object): Inflate only if the generic context
10977         is not null. Fixes #389886.
10979 2008-05-15  Jonathan Chambers  <joncham@gmail.com>
10981         * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
10982         instead of g_free.
10984         Code is contributed under MIT/X11 license.
10986 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
10988         * class.c: Revert unrelated change.
10990 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
10992         * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
10993         a generic instantiation, use mono_class_from_mono_type instead of playing
10994         with MonoType directly.
10996 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
10998         * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
10999         checks must ignore generic instantiations, so mono_class_has_parent is not
11000         suitable. Fixes #390128.
11002 2008-05-14  Zoltan Varga  <vargaz@gmail.com>
11004         * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
11005         it to avoid registering tokens during metadata generation. Fixes #390023.
11007 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
11009         * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
11010         consistent.
11012         Contributed under MIT/X11 license.
11014 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
11016         * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
11017         even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
11018         to fixup the EXE image.
11019         (mono_cleanup): Use mono_close_exe_image.
11020         (mono_close_exe_image): New function.
11021         * image.c: Include "marshal.h".
11022         (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
11023         (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
11024         counting when the image is loaded outside of mono_image_open_full. Set status
11025         based on GetLastError.
11026         * coree.c: Include required headers. Add init_from_coree.
11027         (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
11028         mono_assembly_open only when the image has vtfixups. Set init_from_coree.
11029         (_CorExeMain): Set init_from_coree.
11030         (CorExitProcess): Only call ExitProcess for now.
11031         (CorBindToRuntimeEx): New stub implementation.
11032         (CorBindToRuntime): New function.
11033         (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
11034         (MonoFixupExe): ILONLY executables require no fixups.
11035         (mono_set_act_ctx): New function to set activation context.
11036         (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.  
11037         * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
11038         Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
11039         mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
11040         as MONO_INTERNAL.
11041         * domain-internals.h: Add mono_close_exe_image.
11043         Contributed under MIT/X11 license.
11045 2008-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
11047         * metadata.c (mono_metadata_compute_size): Correctly calculate field
11048         size for generic param and event tables. Fixes #388977.
11050 2008-05-13  Zoltan Varga  <vargaz@gmail.com>
11052         * loader.c (mono_method_signature): Use memory barriers because of the double
11053         checked locking pattern.
11055         * threads.c (remove_and_abort_threads): Stop and wait for threads which are
11056         aborting or aborted as well. Fixes #376391.
11057         
11058         * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
11059         existing runtime state in the Suspend handler during shutdown.
11061 2008-05-12  Zoltan Varga  <vargaz@gmail.com>
11063         * threads.c (mono_thread_request_interruption): Add some FIXMEs.
11065         * threads.c (mono_thread_suspend_all_other_threads): Add support for threads 
11066         which are starting up or shutting down.
11068         * threads.c (mono_threads_set_shutting_down): Don't return a value since
11069         this function never returns if the runtime is already shutting down.
11071         * icall.c (ves_icall_System_Environment_Exit): Update after 
11072         mono_threads_set_shutting_down () signature change.
11073         
11074 2008-05-09 Rodrigo Kumpera  <rkumpera@novell.com>
11076         * class.c: Added can_access_instantiation to verify if the instantiation
11077         is visible. Fix access check for nested types as they returned TRUE
11078         before doing type and generic instantiation visibility checks.
11080 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
11082         * reflection.c (mono_reflection_create_generic_class): The created type
11083         must have a different container from its TypeBuilder. Otherwise they
11084         will end sharing generic arguments, which is wrong.
11086         Due to the sharing, making a generic instance of the created type using
11087         the TypeBuider generic arguments resulted in the generic type definition
11088         been returned, which is wrong as well.
11090         As a bonus the code was leaking the type_params array. This memory should
11091         be allocated from the image mempool.
11093         This fixes bug #354047.
11095 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
11097         * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
11098         to here         as they are now used in assembly.c new code.
11099         Added a skipverification flag to MonoAssembly.
11100         New internal function mono_assembly_has_skip_verification.
11102         * assembly.c: New function mono_assembly_has_skip_verification. It checks
11103         if an assembly has a version 2.0 SkipVerification security attribute. Fixes
11104         part of #387274.
11106 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
11108         * object.c (mono_object_get_virtual_method): Inflate the resulting method if
11109         needed. Fixes #387034.
11111         * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
11113 2008-05-06  Miguel de Icaza  <miguel@novell.com>
11115         * assembly.c (mono_assembly_load_reference): Prevent crash while
11116         disassembling Silverlight 2.0 executables while we still do not
11117         have GACed libraries.
11119 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
11121         * reflection.c: Special case generic type definitions as well. Fixes #383444.
11123 2008-05-06  Zoltan Varga  <vargaz@gmail.com>
11125         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
11126         of the dynamic case. Fixes #387404.
11128 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
11130         *verify.c (mono_verifier_is_class_full_trust): If under
11131         verify_all and the verifier mode was not set, only
11132         gac and corlib types are fulltrust. This makes --verify-all
11133         usable to detect unverifiable code, which is the expected
11134         use case.
11136 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
11138         * verify.h: Ops, commited the header with debug
11139         enabled.
11141 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
11143         * verify.c (merge_stack): Use the new value on unverifiable
11144         stack merges.
11146         * verify.c (verify_type_compatibility_full): Comparison
11147         of nullable types can't use mono_class_is_assignable_from.
11149         * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
11150         that makes all verification errors be reported.
11152         * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
11153         mono_method_verify.
11155 2008-05-05  Robert Jordan  <robertj@gmx.net>
11157         * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
11158         support for value types. See #386415.
11160         * object.c: comments.
11162         Code is contributed under MIT/X11 license.
11164 2008-05-05  Martin Baulig  <martin@ximian.com>
11166         * debug-mono-symfile.h
11167         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
11168         for old pre-terrania symbol files.
11170 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
11172         * mono-config.c: Add ppc64 architecture.
11174         Code is contributed under MIT/X11 license.
11176 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
11178         * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
11179           PPC64 uses function descriptors as well.
11181         Code is contributed under MIT/X11 license.
11183 2008-05-04  Zoltan Varga  <vargaz@gmail.com>
11185         * object.c (compute_class_bitmap): Ignore literal static fields.
11187         * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
11188         var has an invalid format.
11189         (describe_ptr): Add some sanity checks for the vtable.
11190         (add_nursery_frag): Clear unused nursery fragments.
11191         (major_collection): Clear all remaining nursery fragments.
11193 2008-05-03  Robert Jordan  <robertj@gmx.net>
11195         * image.c, metadata-internals.h: add thunk_invoke_cache.
11197         * marshal.c, marshal.h: implement
11198         mono_marshal_get_thunk_invoke_wrapper ().
11200         * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
11202         Code is contributed under MIT/X11 license.
11204 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
11206         * verify.c (do_leave): Empty the stack.
11208 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
11210         * class.c (mono_class_is_assignable_from): Variance
11211         doesn't work between reference and value types. For example,
11212         given type C<T+>, C<int32> is not assignable to C<object>.
11213         Break the argument checking loop on first error. 
11215 2008-05-02  Atsushi Enomoto  <atsushi@ximian.com>
11217         * icall.c : base64_to_byte_array() needs some more strict
11218           check for sequence of '=' characters. Patch by Santa
11219           Marta (http://deee.g.hatena.ne.jp/santamarta).
11221           Contributed under MIT/X11 license.
11222           (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
11224 2008-05-02  Jonathan Chambers  <joncham@gmail.com>
11226         * domain.c: Disable LoadLibrary support to fix Win32 build.
11228         Code is contributed under MIT/X11 license.
11230 2008-05-02  Zoltan Varga  <vargaz@gmail.com>
11232         * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
11233         to help with cache behaviour.
11235 2008-05-01  Miguel de Icaza  <miguel@novell.com>
11237         * appdomain.c (mono_domain_from_appdomain): Add new accessor
11238         method. 
11240 2008-05-01  Zoltan Varga  <vargaz@gmail.com>
11242         * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
11244 2008-05-01  Dick Porter  <dick@ximian.com>
11246         * process.c (process_get_fileversion): Only pass 16 bits of
11247         language ID to VerLanguageName.  Fixes bug 381204.
11249 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
11251         * verify.c (mono_method_verify): Fix the comparison
11252         operator for code bounds check.
11254 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
11256         * verify.c (mono_method_verify): Check the bounds of
11257         all access of the code array.
11259 2008-04-29  Kornél Pál  <kornelpal@gmail.com>
11261         * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
11263 2008-04-28  Zoltan Varga  <vargaz@gmail.com>
11265         * image.c (mono_image_strong_name_position): Fix return value when the rva is
11266         not valid.
11268 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
11270         * loader.c (mono_get_method_from_token, mono_method_signature): Add
11271         support for METHOD_IMPL_ATTRIBUTE_NATIVE.
11272         * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
11273         fixup main EXE images when using mono.exe for mixed-mode assembly support.
11274         * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
11275         mono_runtime_load.
11276         * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
11277         runtime initialization from metadata.
11278         * assembly.c: Remove obsolete ceGetModuleFileNameA.
11279         (mono_set_rootdir): Use mono_get_module_file_name.
11280         (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
11281         handles.
11282         * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
11283         * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
11284         * image.c (mono_cli_rva_image_map): Use MonoImage instead of
11285         MonoCLIImageInfo. Add support for module handles.
11286         (load_cli_header): Update mono_cli_rva_image_map signature.
11287         (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
11288         (mono_image_strong_name_position): Use mono_cli_rva_image_map.
11289         (mono_image_rva_map): Add support for module handles.
11290         (mono_image_ensure_section_idx): Add support for module handles.
11291         (mono_image_close): Add support for module handles.
11292         (do_load_header): Add support for module handles.
11293         (mono_image_open_from_module_handle): New function for internal use.
11294         (mono_image_open_full): Load normal images using LoadLibrary on Windows.
11295         (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
11296         (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
11297         handles.
11298         (mono_image_fixup_vtable): New function for mixed-mode assembly support.
11299         * image.h: Add mono_image_fixup_vtable.
11300         * coree.c: New file for mscoree.dll functions and mixed-mode assembly
11301         support.
11302         * coree.h: New file.
11303         * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
11304         unsupported native code.
11305         (mono_marshal_set_callconv_from_modopt): New function splitted from
11306         mono_marshal_get_managed_wrapper.
11307         (mono_marshal_get_managed_wrapper): Use
11308         mono_marshal_set_callconv_from_modopt.
11309         (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
11310         * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
11311         * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
11312         that results in a deadlock when the runtime is loaded in _CorDllMain.
11313         * Makefile.am: Add coree.c and coree.h.
11315         Contributed under MIT/X11 license.
11317 2008-04-28  Mark Probst  <mark.probst@gmail.com>
11319         * generic-sharing.c: Search for type arguments in array element
11320         types as well.
11322 2008-04-28  Mark Probst  <mark.probst@gmail.com>
11324         * class-internals.h, generic-sharing.c: New, small runtime generic context.
11326         * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
11328         * object.c: Don't setup the RGCTX when the vtable is created,
11329         because we're setting it up lazily now.
11331 2008-04-26  Zoltan Varga  <vargaz@gmail.com>
11333         * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix 
11334         64 bit support.
11336 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
11338         * verify.c (verify_class_for_overlapping_reference_fields): 
11339         If class is under fulltrust allow reference types to overllap
11340         if they have the same RVA.
11342 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
11344         * pedump.c: Added new flag valid-only, that makes the verifier
11345         behaves just like --security=validil. It won't fail type load
11346         due to unverifiable restrictions.
11348 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
11350         * class-internals.h (struct MonoMethod): Added a verification_success
11351         field to cache verifier executions. Reduced MonoMethod:slot size by
11352         one bit.
11354 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
11356         * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
11357         instead of a 'vt' argument to save an indirection and to allow these to be used
11358         for valuetypes.
11359         (scan_vtype): New helper function to scan an area using a gc descriptor.
11360         (mono_gc_wbarrier_value_copy): Implement this.
11361         (handle_remset): Add support for REMSET_VTYPE.
11362         (find_in_remset_loc): Ditto.
11363         (mono_gc_base_init): Allow some debugging options to be controlled through the
11364         use of the MONO_GC_DEBUG env variable.
11365         (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
11366         (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
11368 2008-04-23  Martin Baulig  <martin@ximian.com>
11370         * domain.c (mono_domain_create): Move the call to
11371         mono_debug_domain_create() down, after allocating the domain id.
11373 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
11375         verify.c (verify_class_for_overlapping_reference_fields): Skip
11376         static fields while verifying for overlapping fields as they
11377         don't matter at all.
11379 2008-04-23  Marek Habersack  <mhabersack@novell.com>
11381         * domain-internals.h: added a declaration of
11382         mono_make_shadow_copy.
11384         * assembly.c (mono_assembly_open_full): shadow copying of
11385         assemblies moved to here, so that all the assemblies within the
11386         application domain's private binary directories can be
11387         processed. Fixes bug #380546
11389         * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
11390         mono_make_shadow_copy and made non-static. The decision whether
11391         to shadow-copy an assembly is made based on its location - it's
11392         copied if it's in one of the private application domain binary
11393         directories and its different to the target file in the shadow
11394         directory. Fixes bug #380546
11396 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
11398         * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
11400         * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
11401         types.
11403         * reflection.c (mono_image_create_token): Handle 
11404         Method/ConstructorOnTypeBuilderInst.
11405         (resolve_object): Ditto.
11406         (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
11407         so it can be called from resolve_object. Also handle the case when the inflated
11408         class already has its methods setup.
11410 2008-04-21  Martin Baulig  <martin@ximian.com>
11412         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
11414 2008-04-20  Geoff Norton  <gnorton@novell.com>
11416         * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
11417         pointer dereference.
11419 2008-04-15  Marek Habersack  <mhabersack@novell.com>
11421         * appdomain.c (try_load_from): if IOMAP is in effect, call the
11422         portability API to look up the assembly file. Fixes behavior in
11423         situations when the application has a bin/ directory, but the
11424         assembly search patch refers to Bin/ (and thus the requested file
11425         name is Bin/SomeLibrary.dll). Fixes bug #379888
11427 2008-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
11429         verify.c (mono_type_is_generic_argument): Extracted this check
11430         from a dozen places to here.
11432         verify.c: Fixed all issues related to boxing generic arguments
11433         and their constraints.
11435 2008-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
11437         verify.c (mono_class_interface_implements_interface): Fix win32 build.
11439 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
11441         * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
11442         isn't finished yet. Fixes #363447.
11444 2008-04-13  Zoltan Varga  <vargaz@gmail.com>
11446         * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
11447         Fixes #346419.
11449 2008-04-13  Jb Evain  <jbevain@novell.com>
11451         * domain.c: update the 2.1 profile versions.
11452         Merged from the Moonlight 2 branch.
11454 2008-04-12  Zoltan Varga  <vargaz@gmail.com>
11456         * assembly.c (mono_assembly_load_from_full): Do the check for loading other
11457         mscorlibs for the non-refonly case as well.
11459         * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
11460         in mono_assembly_load_from_full (). Fixes #378924.
11462 2008-04-11  Geoff Norton  <gnorton@novell.com>
11464         * icall.c: The global extern environ doesn't exist on Mac.  We
11465         need to call NSGetEnviron instead.
11467 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
11469         verify.c: Add generic method constraint verification.
11471 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
11473         class.c (mono_class_inflate_generic_method_full): Add a long
11474         explanation to the is_mb_open hack. Remove the FIXME.
11476 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
11478         * verify.c (mono_method_verify): Mark all unknown opcodes
11479         as invalid. Mark jmp as unverifiable.
11481 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
11483         * verify.c: Add code to do type constraint verification on class instances.
11485         * verify.c (mono_verifier_verify_class): Use the type constraint 
11486         verification code.
11488 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
11490         * class.c (mono_class_get_field_default_value): Don't pass cindex
11491         as hint to mono_metadata_get_constant_index. The local is not initialized
11492         and should contain garbage most of the time. This could only work
11493         with a lot of luck.
11495 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
11497         * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
11499 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
11501         * class-internals.h: Add generic_param_token to MonoClass::sizes union.
11503         * class.c (mono_class_from_generic_parameter): Save the token of the
11504         generic param in MonoClass::sizes.generic_param_token.
11506         * reflection.c (mono_custom_attrs_from_class): If the class type is
11507         VAR or MVAR retrieve the attributes of the generic param.
11509 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
11511         * class.c (mono_class_init): Do class verification if the verifier
11512         is enabled.
11514 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
11516         * verify-internal.h: Added mono_verifier_verify_class.
11518         * verify.c: Added mono_verifier_verify_class. It checks for
11519         classes with explicit layout that have overlapping reference fields.
11521         * pedump.c: Init the verifier state prior to verification. Fixed
11522         command line arguments.
11524 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
11526         * Makefile.am: Added verify-internals.h, hopefully fix the build.
11528 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
11530         * verify-internals.h: Fix a warning.
11532 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
11534         * verify-internals.h: New header with the verifier configuration
11535         extracted from mini.c.
11537         * verify.c: Implemented the new functions exported by verify-internals.h.
11539 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
11541         * verify.c: Add proper verification of ckfinite.
11543 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
11545         * verify.c (do_conversion): Improved error message to something
11546         more meanfull.
11548         * verify.c (check_is_valid_type_for_field_ops): Fix to work
11549         with primitive types.
11551 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
11553         * verify.c: Added tail prefix checking. Marked icall
11554         as unverifible.
11556 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
11558         * verify.c: Fix the detection of branches to the middle
11559         of an instruction.
11561 2008-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
11563         * verify.c: Implemented verification of volatile. and
11564         unaligned. prefix. Check if a type is valid after retrieving it.
11566 2008-04-01  Dick Porter  <dick@ximian.com>
11568         * process.c (process_get_fileversion): If there's no string block,
11569         set the file language to en_US.  Fixes the other new part of bug
11570         374600.
11572 2008-03-29 Rodrigo Kumpera  <rkumpera@novell.com>
11574         * class.c: New functions mono_method_can_access_field_full and
11575         mono_method_can_access_method_full. They perform type visibility
11576         and type site check.
11578         * class-internal.h: Added exported functions.
11580         * verify.c: Use new functions to implement proper visibility checks.
11582 2008-03-29  Zoltan Varga  <vargaz@gmail.com>
11584         * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
11586 2008-03-28  Dick Porter  <dick@ximian.com>
11588         * process.c (process_get_fileversion): Use the first language ID
11589         we see, rather than insisting on an invariant language.  Fixes bug
11590         374600.
11592 2008-03-28  Zoltan Varga  <vargaz@gmail.com>
11594         * reflection.c (calc_section_size): Use add_stream_zero to align the size of
11595         the streams to fix reading of invalid memory later.
11597         * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
11598         to ease debugging.
11600 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
11602         * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
11603         (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
11605 2008-03-26  Massimiliano Mantione  <massi@ximian.com>
11606         * threads.h: Added MonoThreadManageCallback type and
11607         mono_thread_set_manage_callback prototype
11608         * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
11609         (used to store the mono_thread_manage callback).
11610         * threads.c: Added mono_thread_set_manage_callback, and handle
11611         "MonoThread->manage_callback" in build_wait_tids.
11613 2008-03-26  Dick Porter  <dick@ximian.com>
11615         * process.c (process_get_fileversion): Set FileVersionInfo strings
11616         to Empty when the resource doesn't have the particular info.
11617         Fixes bug 355717.
11619 2008-03-25 Rodrigo Kumpera  <rkumpera@novell.com>
11621         * verify.c (mono_method_verify): Proper prefix validation.
11623 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
11625         * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
11626         itself in a separate argument instead of throwing them. Fixes #373448.
11628         * appdomain.c: Bump corlib version.
11630 2008-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
11632         * verify.c: Implemented readonly prefix and verify controled mutability pointers.
11634 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
11636         * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
11637         version macros.
11639 2008-03-20  Mark Probst  <mark.probst@gmail.com>
11641         * generic-sharing.c, class-internals.h: Code for putting
11642         reflection types into the runtime generic context.
11644 2008-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
11646         * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
11647         Fixes #340662. 
11650 2008-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
11652         * verify.c (VerifyContext): Added instruction prefix data to the struct.
11654         * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
11656         * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
11658         * verify.c (do_cast): Let the result value keep the boxed status.
11660         * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
11662 2008-03-17  Jb Evain  <jbevain@novell.com>
11664         * reflection.c: when running on a 2.0 runtime, emit
11665         unconditionally the #~ header version as 2.0, and the
11666         CLI header version as 2.5, for symmetry's sake with csc.
11668 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
11670         * class.c: Remove the unused cache_interface_offsets stuff.
11672         * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
11673         profiler.c: Fix warnings.
11675 2008-03-16  Mark Probst  <mark.probst@gmail.com>
11677         * generic-sharing.c, class-internals.h: Support for putting
11678         methods into the runtime generic context.
11680 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
11682         * class.c (mono_class_setup_fields): Ignore calls made to this function for
11683         classes which are generic instances of not-yet finished typebuilders. Fixes
11684         #351172.
11686         * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
11688 2008-03-15  Zoltan Varga  <vargaz@gmail.com>
11690         * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
11692         * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
11693         field, replace it with a hash table in MonoDynamicImage.
11695         * reflection.c (inflate_mono_method): Access the generic definition object from
11696         image->generic_def_objects instead of imethod->reflection_info.
11698         * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto. 
11700         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
11701         
11702         * image.c (mono_image_close): Move the dynamic image freeing code to a separate
11703         function in reflection.c so it is easier to keep in sync with the dynamic image
11704         creation code.
11706         * reflection.c (mono_dynamic_image_free): New internal function, extracted from
11707         mono_image_close ().
11709 2008-03-15  Mark Probst  <mark.probst@gmail.com>
11711         * class.c (mono_class_generic_sharing_enabled): Disable generic
11712         sharing for all architectures except AMD64 and x86 to fix build.
11714 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
11716         * verify.c: Use the generic definition MonoGenericContext when available.
11717         Remove code for checking generics instance compatibility in favor of
11718         mono_class_is_assignable_from.
11720 2008-03-14  Mark Probst  <mark.probst@gmail.com>
11722         * marshal.c, marshal.h, metadata-internals.h, image.c,
11723         wrapper-types.h: New wrapper for invoking a shared static method
11724         without having to pass the runtime generic context argument.
11726 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
11728         * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
11730 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
11732         * reflection.c (mono_image_get_field_on_inst_token): Add caching.
11733         
11734         * reflection.c (mono_image_get_field_on_inst_token): New helper function to
11735         create a token from a FieldOnTypeBuilderInst.
11736         (mono_image_create_token): Handle FieldOnTypeBuilderInst.
11737         (resolve_object): Ditto.
11739         * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
11740         mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
11742 2008-03-14  Martin Baulig  <martin@ximian.com>
11744         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
11746         * debug-mono-symfile.h
11747         (MONO_SYMBOL_FILE_VERSION): Bump to 41.
11748         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
11750 2008-03-10  Martin Baulig  <martin@ximian.com>
11752         * debug-mono-symfile.h
11753         (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
11754         `lexical_block_table_offset'.
11755         (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
11756         `lexical_blocks'.
11757         (MonoSymbolFile): Added `version'.
11759         * mono-debug.h
11760         (MonoDebugLexicalBlockEntry): Removed.
11761         (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
11762         `lexical_blocks'.
11764         * mono-debug.c (mono_debug_add_method): Don't compute lexical
11765         blocks here; the debugger now does this internally.
11767 2008-02-27  Martin Baulig  <martin@ximian.com>
11769         * object.c (mono_runtime_exec_main): Call
11770         `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
11771         `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
11773 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
11775         * verify.c (verify_type_compatibility_full): Allow native int to be converted
11776         to native pointer in non-strict mode. Required to "(IntPtr)null" work.
11778 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
11780         * verify.c (verify_ldftn_delegate): Accept a sealed type when using
11781         ldftn with a virtual method.
11783 2008-03-13  Geoff Norton  <gnorton@novell.com>
11785         * decimal.c:  Only include memory.h if the platform has it.
11787 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
11789         * assembly.c, class.c, metadata-internals.h: make sure public key
11790         tokesns are compared in a case-insensitive way. Also, all
11791         the lookups in the GAC use a lowercase public key token
11792         (gaacutil already does the lowercasing on install). Fixes
11793         bug #369541.
11795 2008-03-11 Rodrigo Kumpera  <rkumpera@novell.com>
11797         * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
11798         and return value.
11800 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
11802         * image.c: when someone loads a mscorlib from a file, return the
11803         currently loaded mscorlib (fixes bug #369253).
11805 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
11807         * class.c: handle types with no parents by forcing them to have
11808         System.Object as a parent and marking them as broken (this currently
11809         allows the first part of bug #369173 to work as well, likely because
11810         we don't check for typeload exceptions everywhere yet).
11812 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
11814         * class.c: more complete check that types belong to corlib
11815         (fixes second part of bug #369173).
11817 2007-03-10  Bill Holmes  <billholmes54@gmail.com>
11819         * generic-sharing.c:  Including glib.h for the MSVC builds to define
11820           "inline" to "__inline" before including mono-membar.h.
11821           
11822         * mono-perfcounters.c:  Adding HAVE_SYS_TIME_H check for MSVC builds.
11823           Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for 
11824           MSVC builds.
11826         Contributed under MIT/X11 license.
11828 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
11830         * verify.c (do_invoke_method): Remove return type validation.
11832         * verify.c (do_ret): Do return type validation at return site instead of
11833         call site.
11835 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
11837         * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
11839         * verify.c: Some todos cleaned and improved a few error messages.
11841 2008-03-08  Zoltan Varga  <vargaz@gmail.com>
11843         * class.c (mono_class_setup_mono_type): Improve the test for corlib.
11845 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
11847         * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
11848         system types correctly.
11850         * exception.h exception.c (mono_exception_from_token_two_strings): New helper
11851         function.
11853 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
11855         * assembly.c (build_assembly_name): Fix a warning.
11857 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
11859         * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
11860         the called function takes an object type argument. Fixes storing or
11861         valuetypes across remoting as well as reducing memory usage.
11862         * image.c, metadata-internals.h: remove now unused ldfld_remote and
11863         stfld_remote wrapper caches.
11865 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
11867         * icall.c (mono_lookup_internal_call): Update the exception message when an icall
11868         is not found.
11870         * reflection.c (mono_image_register_token): New helper function to save
11871         a token->object mapping.        
11873         * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
11874         managed code.
11876         * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
11877         one dimension arrays. Fixes #367670.
11878         (mono_reflection_get_type_internal): Ditto.
11880 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
11882         * marshal.c: mono_load_remote_field_new() always returns object.
11883         so use the proper signature (fixes bug #366445).
11885 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
11886         
11887         * class-internals.h (MonoMethod): Remove unused uses_this flag, 
11888         add an 'inline_failure' flag instead.
11890 2008-03-04  Mark Probst  <mark.probst@gmail.com>
11892         * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
11893         with a new structure, MonoGenericJitInfo, in the MonoJitInfo.  It
11894         contains the location of "this", used for exception handling.
11896 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
11898         * class.c (mono_class_layout_fields): Set the min alignment of small structs to
11899         their size on all platforms for perf reasons.
11901 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
11903         * reflection.h: Move mono_reflection_is_valid_dynamic_token to
11904         object-internal.h
11906         * object-internal.h: Same.
11908 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
11910         * reflection.h: Fix the build I just broke.
11912 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
11914         * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
11915         Test if a token is valid, this remove explicit usage of 
11916         MonoDynamicImage::tokens from the verifier code.
11918         * reflection.h: Added mono_reflection_is_valid_dynamic_token.
11920         * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
11921         instead of direct access to MonoDynamicImage::tokens.
11923 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
11925         * verify.c (token_bounds_check): Fix the build I just broke.
11927 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
11929         * verify.c (token_bounds_check): Fix bounds check for dynamic images.
11931         * verify.c (verifier_load_method): Fixed the errors message.
11933         * verify.c (mono_method_verify): Fixed a debug message.
11935 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
11937         * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
11938         mono-perfcounters.h, class-internals.h: support for predefined
11939         writable counters, query of categories and counters, bugfixes.
11941 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
11943         * verify.c (do_refanytype): Verify the refanytype opcode.
11945         * verify.c (mono_method_verify): Use do_refanytype.
11947 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
11949         * verify.c (do_mkrefany): Verify the mkrefany opcode.
11951         * verify.c (mono_method_verify): Use do_mkrefany.
11953 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
11955         * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
11956         mono-perfcounters.c, mono-perfcounters.h: basic performance counter
11957         implementation.
11959 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
11961         * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
11962         the type load exception.
11964 2008-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
11966         * verify.c: Added a few FIXME for method signatures
11968         * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
11969         of mono_method_get_signature and get vararg call working. Removed unused
11970         checks for return value.
11972         * verify.c (do_refanyval): Verify the refanyval opcode.
11974         * verify.c (mono_method_verify): Implemented verification of arglist and
11975         use do_refanyval.
11977 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
11979         * class.c (mono_class_setup_methods): Move the check for synchronized methods on
11980         vtypes to marshal.c.
11982         * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
11983         it works for AOT as well.
11985 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
11987         * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
11988         with mono_msec_ticks () which is monotonic and doesn't cause bugs when
11989         the system time is adjusted.
11991 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
11993         * icall.c, icall-def.h: use the new time functions (fixes the
11994         non-monotonic behaviour of TickCount).
11996 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
11998         * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
11999         it breaks the build.
12000         
12001         * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
12002         cattr is not finished yet.
12004 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
12006         * verify.c: Proper token validation for field, method and type.
12008 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
12010         * loader.c (field_from_memberref): Generate a loader error if the type is not found.
12012         * loader.c (method_from_memberref): Generate type load error instead of method missing
12013         if the type is not found.
12015 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
12017         * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
12018         some of the conversions caused the generation of a marshal directive exception.
12020 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
12022         verify.c: Report which exception should be thrown by the JIT.
12023         Added a lot of FIXME notes.
12025 2008-02-22  Mark Probst  <mark.probst@gmail.com>
12027         * generic-sharing.c: Runtime generic context slots are not
12028         instantiated on init anymore.  Instead, provide function to do the
12029         instantiating on demand.
12031         * class-internals.h: Added vtable to runtime generic context.
12032         Macros for encoding direct and indirect slot offsets in one
12033         guint32.
12035 2008-02-21  Mark Probst  <mark.probst@gmail.com>
12037         * object.c, generic-sharing.c: Moved some generic sharing code
12038         from object.c to generic-sharing.c.
12040         * generic-sharing.c: Added support for extensible runtime generic
12041         context.
12043         * metadata-internals.h: Two new hash tables in MonoImage for
12044         extensible runtime generic context support.
12046         * domain.c: Unregister generic vtables upon domain unloading.
12048         * image.c: Destroy new hash tables upon image unloading.
12050         * metadata.c: Unregister generic subclasses upon image unloading.
12052         * class-internals.h: New data structure for runtime generic
12053         context template.  New fields in the runtime generic context for
12054         extensible part.
12056         * Makefile.am: Added generic-sharing.c.
12058 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
12060         icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
12061         there is a pending loader exception, raise it.
12063         icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
12064         same.
12066         icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): 
12067         same.
12069         Fixes #363450.
12071 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
12073         * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
12075         * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
12076         
12077         * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
12078         ref-only requests for compatibility with MS.
12080 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
12082         * reflection.c (mono_custom_attrs_from_method): Don't silently
12083         return an empty list for generic method instances.
12084         (mono_custom_attrs_from_param): Likewise.
12086 2008-02-20  Rodrigo Kumpera  <rkumpera@novell.com>
12087             Raja R Harinath  <harinath@hurrynot.org>
12089         Fix #354757
12090         * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
12091         * class.c (mono_class_inflate_generic_method_full): Initialize it
12092         when a fully-open method is instantiated.
12093         * metadata.c (inflated_method_equal, inflated_method_hash): Update
12094         to new field.
12095         * reflection.c (inflate_mono_method): Don't create a temporary context.
12097 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
12099         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
12100         Compute correct value, to prepare for imethod->reflection_info going away.
12102 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
12104         * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
12106 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
12108         * verify.c: Implement skip visibility flag.
12110 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
12112         * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
12113         which contains an extra field to tell the kind of exception that should be thrown.
12115         * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
12117 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
12119         * loader.c (mono_method_get_param_names): Initialize 'klass' after
12120         'method' is updated.
12122 2008-02-11  Zoltan Varga  <vargaz@gmail.com>
12124         * class.c (mono_class_layout_fields): Set class->min_align for classes using
12125         explicit layout as well. Fixes #360375.
12127 2008-02-11  Geoff Norton  <gnorton@novell.com>
12129         * loader.c: Guard and dereference against inflated generic methods
12131 2008-02-10  Gert Driesen  <drieseng@users.sourceforge.net>
12133         * class.c: Include Retargetable spec in assembly name.
12134         * assembly.c: Always include PublicKeyToken spec in assembly name
12135         (with value "null" if assembly is not signed), and include
12136         Retargetable spec.
12137         * icall-def.h: Added icall for Assembly.get_fullname.
12138         * icall.c: Added icall returning the fullname of an assembly.
12140 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
12142         * class.c (mono_class_setup_vtable_general): Add a missing call to
12143         mono_class_setup_methods () which is needed in the AOT case.
12145 2008-02-08 Rodrigo Kumpera  <rkumpera@novell.com>
12147         * verify.c (mono_type_get_stack_name): Added. Return the name for the
12148         stack type of the given MonoType.
12150         * verify.c (verify_type_compatibility_full): Handle the void type.
12152         * verify.c (is_compatible_boxed_valuetype): Changed to fit the
12153         way stack merging works.
12155         * verify.c (store_local): Improved verification message.
12157         * verify.c (do_branch_op): If the merging is invalid, the method
12158         is unverifiable and not invalid. Improved error message.
12160         * verify.c (merge_stacks): Properly merge a boxed valuetype and
12161         a reference type diferent than System.Object. Improved error
12162         message.
12164 2008-02-07 Rodrigo Kumpera  <rkumpera@novell.com>
12166         * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
12168         * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
12169         type of an enum even if the argument is byref.
12171         * verify.c: Replace all explicit uses of enumtype and enum_basetype
12172         to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
12174         * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
12176         *verify.c (verify_type_compatibility_full): Make enum types
12177         compatible with their base types.
12179         * verify.c (is_compatible_boxed_valuetype): Added. Check if both
12180         types are compatible for the special case of a boxed valuetype and
12181         System.Object.
12183         * verify.c (verify_stack_type_compatibility): The function
12184         is_compatible_boxed_valuetype was extracted from here.
12186         * verify.c (push_arg): Only set ctx->has_this_store if the method
12187         is not static.
12189         * verify.c (do_ldelem): Fixed a typo in an error message and added
12190         strict check for mixing int32 and native int as the array type
12191         and ldelem type.
12193         * verify.c (merge_stacks): Consider boxed valuetypes in the
12194         compatibility checks.
12196 2008-02-07  Massimiliano Mantione  <massi@ximian.com>
12197         * profiler.h: (MonoGCEvent): Added start-stop the world events.
12199 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
12200         *class.c: use_new_interface_vtable_code: renamed the env var to have
12201         a "MONO_" prefix, and fix the logic to enable it by default.
12203 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
12204         *class.c:
12205         mono_class_setup_vtable_general: rewrote the way in which interface
12206         methods are added to vtables. Makes bug-77127.exe pass, and hopefully
12207         makes the code more maintainable.
12208         For now the old code is still there, and can be activated setting
12209         the env var "USE_NEW_INTERFACE_VTABLE_CODE".
12211 2008-02-06 Rodrigo Kumpera  <rkumpera@novell.com>
12213         * verify.c: guarded some debug functions around and #ifdef.
12215         * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
12217 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
12219         * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
12220         changes for now since they seem to break too many things.
12222 2008-02-05  Mark Probst  <mark.probst@gmail.com>
12224         * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
12225         mono_marshal_find_nonzero_bit_offset): Added macro and function
12226         for finding the byte- and bit-offset of a bitfield within a
12227         struct.
12229 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
12231         * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
12232         (mono_marshal_get_struct_to_ptr): Ditto.
12234         * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of 
12235         cctor_signature.
12237 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
12239         * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
12240         between methods for non-corlib types.
12242 2008-02-02  Geoff Norton  <gnorton@novell.com>
12244         * loader.c (mono_method_get_param_names): Populate the parameter name for 
12245         generic parameters as well. (Fixes #342536)
12247 2008-01-31 Rodrigo Kumpera  <rkumpera@novell.com>
12249         * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
12251         * verify.c (do_invoke_method): Fix for calling with byref structs.
12253         * verify.c (do_cast): push a boxed value type based on the type token and not
12254         the type of stack.
12256 2008-01-31  William Holmes  <billholmes54@gmail.com>
12258         * process.c (process_module_string_read): Check the size returned form 
12259           VerQueryValue to avoid out of memory exception. 
12261 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
12263         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
12264         Handle properly modules which are not in the moduleref table. Fixes
12265         #356938.
12267 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
12269         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
12270         the dynamic case which is now in managed code.
12271         (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
12273         * marshal.c (mono_string_to_bstr): Fix a warning.
12274         (init_com_provider_ms): Ditto.
12276         * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
12278         * exception.c (mono_get_exception_out_of_memory): New helper function.
12280 2008-01-28  Jonathan Chambers  <joncham@gmail.com>
12282         * marshal.c: Add support for BSTR marshalling
12283         using other COM systems.
12285         Code is contributed under MIT/X11 license.
12287 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
12289         * object.c (mono_runtime_invoke_array): reverted previous
12290         commit as it breaks the build.
12292 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
12294         * object.c (mono_runtime_invoke_array): Verify arguments for
12295         invalid types. Fixes #348522.
12297 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
12299         * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
12300         non-final virtual calls using call. 
12302         * verify.c (do_invoke): fixed some TODOs.
12304         * verify.c (push_arg): set has_this_store for "ldarga 0".
12306 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
12308         * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
12309         which belong to an inflated class. Fixes #356531.
12311 2008-01-26  Robert Jordan  <robertj@gmx.net>
12313         * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
12314         which resort to FindFirstFile when a certain error condition
12315         (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
12316         Code is contributed under MIT/X11 license.
12318 2008-01-24  Jonathan Chambers  <joncham@gmail.com>
12320         * marshal.c (emit_marshal_string): Fix out string marshalling
12321         to use specified encoding. Fixes #323900.
12323         Code is contributed under MIT/X11 license.
12325 2008-01-24  Raja R Harinath  <harinath@hurrynot.org>
12327         * class.c (mono_class_inflate_generic_method_full): Don't modify
12328         iresult->context after cache check.
12330 2008-01-23  Zoltan Varga  <vargaz@gmail.com>
12332         * class.c (mono_class_inflate_generic_method_full): Change the
12333         struct assignments to memcpy for better visibility and add some comments.
12335 2008-01-23  Dick Porter  <dick@ximian.com>
12337         * threads.c (mono_threads_set_shutting_down): Simplify shutdown
12338         procedure, and make it work on windows.
12340 2008-01-22  Zoltan Varga  <vargaz@gmail.com>
12342         * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
12343         a MonoReflectionTypeBuilder since it is always of that type.
12345         * reflection.c (mono_type_get_object): Remove an unneccesary check.     
12347         * reflection.c (mono_generic_class_get_object): Simplify this a bit.
12349         * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
12350         
12351         * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
12353         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
12355         * reflection.c (mono_reflection_create_runtime_class): Remove already created
12356         instantiations from the type cache.
12358 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
12360         * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
12362         * verify.c (do_unbox_value): push a controled mutability managed pointer.
12364 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
12366         * verify.c (do_ldstr): added, verifies if the #US token is valid.
12368         * verify.c (mono_method_verify): removed old TODO
12370 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
12372         * verify.c (do_newobj): add visibility check.
12374 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
12376         * verify.c (do_load_function_ptr): add visibility check.
12378 2008-01-21  Massimiliano Mantione  <massi@ximian.com>
12379         *class.c:
12380         mono_generic_class_get_class: hook profiler events.
12381         mono_field_get_offset: added to support heap-shot in the new profiler.
12382         *class.h: exported mono_field_get_offset.
12383         * reflection.c:
12384         mono_reflection_setup_internal_class: hook profiler events.
12386 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
12388         * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
12389         argument here too and use it to avoid checking for pending exceptions if 
12390         possible.
12392 2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>
12394         * assembly.c (build_assembly_name): add arg for passing the assembly
12395         flags. Do not consider a PublicKey with value "null" valid.
12396         (mono_assembly_name_parse_full): added boolean argument that will be
12397         set if the assembly name contains a PublicKeyToken spec. Added support
12398         for the Retargetable spec for which only Yes or No are allowed as valid
12399         value. Consider assembly name invalid if Retargetable spec is set, but
12400         either version, culture or public key (token) are not specified.
12401         * metadata-internals.h: sync signature of mono_assembly_name_parse_full
12402         with implementation in assembly.c.
12403         * icall.c (fill_reflection_assembly_name): also copy assembly flags
12404         from MonoAssemblyName.
12405         (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
12406         introduced argument for mono_assembly_name_parse_full to know if the
12407         assembly name has a PublicKeyToken spec, and if it has instruct
12408         fill_reflection_assembly_name to use default value for keyToken (if
12409         PublicKeyToken is null).
12411 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
12413         * verify.c (mono_method_verify): fixed ovf ops with
12414         float values. They are unverifiable now.
12416 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
12418         * class.c (set_failure_from_loader_error): add BadImageException to the
12419         list of exceptions that can cause a type to fail to load.
12421         * class.c (mono_class_get_exception_for_failure): same.
12423 2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
12425         * verify.c (in_any_exception_block): added, check if offset
12426         is part of any exception handling clause.
12428         * verify.c (get_stack_type): added VAR and MVAR types.
12430         * verify.c (do_stobj): better error messages.
12432         * verify.c (do_cpobj): added, check cpobj.
12434         * verify.c (do_initobj): added, check initobj.
12436         * verify.c (do_sizeof): added, check sizeof.
12438         * verify.c (do_localloc): added, check localloc.
12440         * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
12442 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
12444         * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
12445         save_lmf/restore_lmf opcodes.
12447         * threads.c (mono_threads_install_notify_pending_exc): New function to
12448         install a callback notifying the JIT there is a pending exception on a thread.
12449         (mono_thread_request_interruption): Call the new callback.
12450         (mono_thread_get_and_clear_pending_exception): New function to return the
12451         exception pending on a thread.
12453         * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
12454         to turn off checking for pending exceptions.
12455         (mono_marshal_get_native_wrapper): Ditto.
12457 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
12459         * threads-types.h: Get rid of the unnecessary extern declarations.
12461 2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>
12463         * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
12464         return field from parent class if not private.
12465         (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
12466         returns fields from parent class if they are not private.
12467         (method_nonpublic): added function to determine if a given method
12468         should be considered non-public. Returns false for private methods
12469         on parent class, and internal methods from parent on the 1.0 profile.
12470         (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
12471         use method_nonpublic function to determine whether method should be
12472         returned.
12473         (property_accessor_public): use newly introduced method_nonpublic
12474         function to determine whether accessor is non-public. 
12475         (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
12476         event from parent class if not private. Only return static event if
12477         Static flag is set, and only return static event from parent class if
12478         FlattenHierarchy flag is set.
12479         (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
12480         include non-private events from parent class.
12482 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
12484         * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
12485         warning.
12487 2008-01-16  Wade Berrier <wberrier@novell.com>
12489         * security.c: Add assembly.h header to appease some warnings
12491 2008-01-16  Dick Porter  <dick@ximian.com>
12493         * process.c (process_module_string_read): Remove trailing null
12494         when saving string.
12496 2008-01-16  Mark Probst  <mark.probst@gmail.com>
12498         * class-internals.h: A new data structure describing the layout of
12499         a runtime generic context (MonoRuntimeGenericContextTemplate).
12501         * metadata-internals.h: Added a hash table to MonoDomain that maps
12502         from open generic classes to their runtime generic context
12503         templates.
12505         * object.c: Building of the runtime generic context, including
12506         proper handling of generic type arguments of superclasses.
12507         Building of the runtime generic context according to the template.
12509 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
12511         * class.c (mono_class_setup_fields): Set field.count for generic instances.
12512         Fixes #350856.
12514         * image.c (do_mono_image_open): Pass TRUE as last_exists to 
12515         mono_portability_find_file (). Fixes #325466.
12516         (mono_image_get_public_key): Fix a warning.
12518 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
12520         * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
12521         Fixes #353550.
12522         (mono_class_from_name_case): Ditto.
12524 2008-01-13  Eyal Alaluf <eyala@mainsoft.com>
12526         * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
12527           common storage for the tables used in the System/NumberFormatter class.
12529 2008-01-13  Zoltan Varga  <vargaz@gmail.com>
12531         * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
12533 2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
12535         * verify.c (get_boxable_mono_type): check if the token is valid.
12537         * verify.c (set_stack_value): changed to add an error if an
12538         invalid type is set on stack. Changed all callers due to signature change.
12540         * verify.c (do_stobj): implement stobj validation.
12542 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
12544         * reflection.c (reflection_methodbuilder_to_mono_method): No need to
12545         set container->is_method, it was set earlier.
12547         * metadata.c (type_in_image): Handle MVARs which belong to not finished
12548         generic methods.
12550         * reflection.c (mono_reflection_initialize_generic_parameter): Set
12551         is_method of the generic container to TRUE for methods.
12553 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
12555         * metadata.c (type_in_image): Handle type parameters properly.
12557         * class-internals.h (MonoGenericParam): Add an 'image' argument to track
12558         memory ownership of this structure.
12560 2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
12562         * verify.c (get_boxable_mono_type): make typedref types been just
12563         unverifiable. check for void type.
12565         * verify.c (do_unbox_any): added, verify opcode unbox.any.
12567         * verify.c (do_load_function_ptr): accept method spec tokens.
12569 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
12571         * marshal.c (mono_class_native_size): Always set *align even if this is called
12572         recursively.
12574 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
12576         * verify.c (mono_verify_corlib): Remove this as it was not used and was 
12577         out-of-date.
12579 2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
12581         * verify.c: removed some old unused tables. A huge bunch of small fixes
12582         to things found while testing the verifier with mono basic.
12584         * verify.c (dump_stack_value): dump null literal flag to.
12586         * verify.c (verify_type_compatibility_full): fix comparison
12587         for types that have a generic super type.
12589         * verify.c (verify_stack_type_compatibility): fix compatibility
12590         between null literals and reference types. fix compatibility between
12591         boxed valuetypes and object. fix corner case test for enums.
12593         * verify.c (do_cmp_op): proper verification of cgt.un in case
12594         of reference types.
12596         * verify.c (do_invoke_method): fix error message.
12598         * verify.c (do_store_indirect
12600         * verify.c (check_is_valid_type_for_field_ops): proper verification
12601         of managed pointers to valuetypes and boxed valuetypes. proper verification
12602         of null literals.
12604         * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
12605         allow token to be a reference type.
12607         * verify.c (do_cast): proper handling of boxes valuetypes.
12609         * verify.c (do_stelem): proper handling of storing a boxed valuetype
12610         in object[].
12612         * verify.c (mono_method_verify): pass the opcode to do_cmp_op
12613         to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
12614         fixed the decoding of unbox_any
12616 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
12618         * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
12620 2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
12622         * verify.c (do_newobj): do delegate verification.
12624         * verify.c (verify_delegate_compatibility): perform delegate
12625         verification.
12627         * verify.c (verify_ldftn_delegate): perform tests related to
12628         ldftn delegates.
12630         * verify.c (mono_delegate_signature_equal): perform the
12631         slightly diferent signature comparison required by delegates.
12633         * metadata.c (mono_metadata_type_equal_full): added and exported
12634         as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
12635         allows signature only comparison.
12637         * metadata-internal.h (mono_metadata_type_equal_full): added and exported
12638         as MONO_INTERNAL.
12640 2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
12642         * verify.c: added a bunch of stack_slot_* functions to
12643         make access to stack slot type easier. This is required to
12644         allow optional flags, like null literal, boxed value and
12645         this pointer.
12646         All access paths to IlStackDesc::stype have been changed 
12647         to use these new funcions.
12648         Removed a bunch of unused functions and cleared all warnings.
12649         This patch introduces the usage of the this pointer and 
12650         boxed value flags.
12652 2008-01-07  Zoltan Varga  <vargaz@gmail.com>
12654         * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
12656 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
12658         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
12659         match managed version.
12661         * appdomain.c: Bump corlib version.
12662         
12663         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
12664         argument.
12666 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
12668         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
12669         Set public key token to zero-length byte array if assembly is not
12670         strongnamed.
12672 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
12674         * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
12675         writing a vtype array elem.
12677 2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
12679         * assembly.c (build_assembly_name): return FALSE if length of token is
12680         not 16 (if not "null").
12681         (mono_assembly_name_parse_full): return FALSE if value of version,
12682         culture, token or key is 0.
12683         * icall.c (fill_reflection_assembly_name): add boolean arguments to
12684         specify whether public key and public key token must be set to default
12685         value (zero-length byte array) if not available. Set versioncompat to
12686         SameMachine. If public key is available or the default is set, then
12687         set PublicKey flag.
12688         (ves_icall_System_Reflection_Assembly_FillName): if no public key
12689         is available, use empty byte array as default value. On the 2.0
12690         profile, use default value for public key token if not set.
12691         (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
12692         profile, use default value for public key if not set. On the 2.0
12693         profile, use default value for public key token if not set.
12694         (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
12695         default values for public key and public key token.
12697 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
12699         * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
12700         field to keep it in synch with the managed object.
12702         * marshal.c (emit_marshal_object): Add support for byref marshalling of
12703         delegates. Fixes #351520.
12705         * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
12706         contains defined memory.
12707         
12708         * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
12710         * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
12711         
12712         * sgen-gc.c (check_consistency): New helper function to do a consistency check
12713         of the GC data structures.
12715         * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
12717         * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
12718         
12719         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
12720         barrier.
12721         (mono_array_clone_in_domain): Ditto.
12722         (mono_array_clone_in_domain): Ditto.
12724         * threads.c (start_wrapper): Register the thread start argument as a GC root.
12725         (cache_culture): Use a write barrier.
12727         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
12728         (ves_icall_get_property_info): Ditto.
12730         * object.h (MONO_STRUCT_SETREF): New macro.
12732         * class-internals.h (MonoStats): Add some GC statistics.
12734         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
12736 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
12738         * exception.c (mono_exception_from_name_two_strings):
12739         Break from loop after method is found.
12741 2008-01-04  Dick Porter  <dick@ximian.com>
12743         * process.c (process_module_string_read): Rename variable to
12744         reflect correct usage, after fixing bug 345972.
12746 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
12748         * verify.c (mono_type_create_fnptr_from_mono_method): 
12749         created a MonoType function pointer instance to be used during
12750         verification. The verifier releases this memory at end.
12752         * verify.c (mono_method_is_constructor): extracted repeated
12753         checks for constructor into a single class.
12755         * verify.c (do_push_field): use new extracted method
12756         for constructor check.
12758         * verify.c (do_newobj): same.
12760         * verify.c (do_ldftn): renamed to do_load_function_ptr
12761         and make it verify ldvirtftn too.
12763         * verify.c (mono_method_verify: proper verification
12764         of ldvirtftn. release created MonoMethod instances.
12766 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
12768         * verify.c (token_bounds_check): added.
12770         * verify.c (do_ldftn): added.
12772         * verify.c (mono_method_verify): proper verificartion of ldftn.
12774 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
12776         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
12777         than the table row count. It's the resposibility of the caller to
12778         make the bounds check and raise the correct error.
12780         * metadata.c (mono_metadata_decode_row_col): Same.
12782         * loader.c (mono_get_method_from_token): perform bounds check
12783         on token for methoddef table.
12785 2007-12-29  Miguel de Icaza  <miguel@novell.com>
12787         * icall.c
12788         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
12789         assert into a negative result, the managed code already coped with
12790         that.
12792         Some folks on Windows reported this error. 
12794 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
12796         * appdomain.c: Bump corlib version.
12797         * icall.c:
12798         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
12799         CultureInfo.CreateCulture to create CultureInfo for name.
12800         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
12801         create CultureInfo for name. Fixes bug #347174.
12803 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
12805         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
12806         flags.
12808         * verify.c (is_valid_branch_instruction): allow branching to the
12809         first instruction of the protected block.
12811         * verify.c (is_valid_cmp_branch_instruction): same.
12813         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
12814         avoid double initialization.
12816         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
12817         detect which cases the eval stack should just be copied.
12819         * verify.c (mono_method_verify): check if the eval stack
12820         is empty when entering a protected block.
12822 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
12824         * verify.c: added is_clause_in_range, is_clause_inside_range,
12825         is_clause_nested and verify_clause_relationship. They perform
12826         the verifications stated in P1 12.4.2.7.
12828         * verify.c (mono_method_verify): remove some unused variables,
12829         add the new exception clause checks, add instruction border
12830         checks for protected block start/end, improved some error 
12831         messages and fixed a bug in the way invalid instruction access
12832         is detected.
12834 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
12836         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
12837         from GC 7.0 if available.
12839         * object.c: Remove an unused define.
12840         
12841         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
12843         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
12845         * null-gc.c (mono_gc_make_descr_for_array): Implement.
12847         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
12849         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
12850         to take the same arguments as the other make_descr functions.
12852         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
12854         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
12855         directly.
12857         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
12858         mini.c.
12860         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
12861         call to boehm-gc.c.
12863         * boehm-gc.c (mono_gc_register_root): Fix a warning.
12865         * null-gc.c (mono_gc_register_root): Fix a warning.
12867         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
12869         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
12870         (mono_gc_base_init): Call GC_init ().
12872         * null-gc.c: Define mono_gc_register_root () as a no-op.
12874         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
12876 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
12878         * verify.c: add prototype for merge_stacks at top
12880         * verify.c (do_switch): added.
12882         * verify.c (merge_stacks): on some cases the stack merging
12883         was not happening properly. Unequal stack sizes at merge
12884         points should be invalid.
12886         * verify.c (mono_method_verify): added more debug info on stack state.
12887         verify switch properly.
12889 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
12891         * method-builder.h: New file, moved the mono_mb_ declarations here from 
12892         marshal.h.
12894         * boehm-gc.c marshal.c: Include method-builder.h.
12896         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
12898         * marshal.c: Remove some code which is now in method-builder.c.
12900 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
12902         * method-builder.c: New file, extraction of the method builder functionality 
12903         from marshal.c.
12905         * marshal.c: Move the mb functions into method-builder.c.
12907         * marshal.h marshal.c: Export some mono_mb_... functions.
12909         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
12911         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
12912         the caller.
12914         * class.c (mono_class_get_full): Check the token type in the dynamic case.
12916         * loader.c (mono_field_from_token): Ditto.      
12918         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
12919         type as well.
12920         
12921         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
12922         Fixes #342565.
12924         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
12925         a helper function for setting it.
12927         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
12929         
12930         * assembly.c: Significally simplify code now that referenced assemblies are 
12931         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
12933         * threads.h: Don't include  the internal threads-types.h header file. Fixes
12934         #349952.
12936 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
12938         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
12939         instructions that were target of branches or are at protected block boundaries.
12941         * verify.c (in_same_block): handle filter clauses.
12943         * verify.c (is_valid_branch_instruction): added. checks the target of
12944         instructions br or brtrue/false.
12946         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
12947         binary branch instructions such as beq and bge.
12949         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
12950         and made it pin the instruction as been part of the exception block.
12952         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
12953         of in_same_block.
12955         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
12956         of in_same_block.
12958         * verify.c (do_ret): ret from a protected block is unverifiable and
12959         not invalid.
12961         * verify.c (do_static_branch): verify br and br.s instructions.
12963         * verify.c (merge_stacks): add extra param to support detection
12964         of branches in the middle of instructions.
12965         
12966         * verify.c (mono_method_verify): verify branches and exception blocks
12967         that target the middle of instructions. Proper verification of br and br.s.
12969 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
12971         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
12972         skip_visibility field.
12973         (reflection_methodbuilder_from_dynamic_method): Ditto.
12975         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
12976         registrations. Fixes #348193.
12978         * threads.h: Move the internal mono_thread_get_pending_exception () to
12979         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
12981 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
12983         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
12984         icall registration. Fixes #348193.
12986         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
12987         for corlib classes into object. Fixes #349621.
12989 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
12991         * icall.c (property_accessor_nonpublic): new function to determine
12992         whether an accessor allows a property to be considered non-public.
12993         Returns false for private accessor(s) from parent class, and internal
12994         accessor(s) from parent on 2.0 profile (and higher).
12995         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
12996         to determine whether property should be included if NonPublic flag
12997         is set. Fixes bug #349078.
12999 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
13001         * verify.c (init_stack_with_value): added.
13003         * verify.c (mono_method_verify): extracted common
13004         code for exception initialization into init_stack_with_value.
13006         * verify.c (mono_method_verify): initialize the exception
13007         for handler clauses as well.
13009         * verify.c (mono_method_verify): fix the exception clause
13010         ordering rules, it should use handler end offset and not
13011         start offset.
13013 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
13015         * rawbuffer.c: remove useless warning.
13017 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
13019         * threads.h, threads-types.h: move functions to the correct header
13020         (fixes bug#349952).
13022 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
13024         * verify.c (mono_method_verify): proper verification
13025         of exception handling clauses ranges and fallthru in
13026         and out of protected blocks.
13028 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
13030         * verify.c (mono_method_verify): fixed compilation issue.
13032 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
13034         * verify.c (mono_method_verify): a printf slipped in, changed
13035         to use verifier debug macro.
13037 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
13039         * verify.c (is_correct_leave): check for filter clauses.
13041         * verify.c (do_filter): added.
13043         * verify.c (mono_method_verify): property verification of leave.
13046 2007-12-18  Mark Probst  <mark.probst@gmail.com>
13048         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
13049         Win32 build, until we figure out how to do the proper thing on
13050         Win32.
13052 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
13054         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
13055         by the previous patch.
13056         
13057         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
13058         the assembly resolve handler for refonly assemblies.
13060 2007-12-17  Mark Probst  <mark.probst@gmail.com>
13062         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
13063         Make sure only one thread is allowed to commence shutdown, and
13064         don't allow new threads to be started once shutdown is in
13065         progress.
13067 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
13069         * verify.c (is_correct_endfilter): added.
13071         * verify.c (is_unverifiable_endfilter): added.
13073         * verify.c (do_endfilter): added.
13075         * verify.c (mono_method_verify): property verification of endfilter
13076         and fixed a corner case or endfinally.
13078 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
13080         * verify.h: new flags to support fail fast of unverifiable code and
13081         do non-strict verification. Non-strict verification is required to
13082         have MS runtime compatibility. There are a huge amount of unverifiable
13083         code that it accepts as verifiable. The strict mode verifies the code
13084         as the specs says.
13085         Non-strict mode will be required in cases where code needs to be
13086         accepted as verifiable but fails under strict mode.
13088         * pedump.c: added support to fail fast and non-strict verification.
13090         * verify.c: added support for both fail fast and non-strict verification.
13092 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
13094         * verify.c (is_correct_endfinally): added.
13096         * verify.c (mono_method_verify): property verification of endfinally.
13098 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13100         * verify.c (in_any_block): check for filter clauses.
13102         * verify.c (is_correct_rethrow): added.
13104         * verify.c (mono_method_verify): property verification of rethrow.
13106         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
13108 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13110         * verify.c (do_throw): added.
13112         * verify.c (mono_method_verify): property verification of throw
13114 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
13116         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
13117         assemblies. Fixes #346425.
13119 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
13121         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
13122         FieldBuilders.
13124         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
13126         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
13127         prevent asserts when this is called with a token which might not be valid.
13129         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
13130         lookup_dynamic_token_class with valid_token == FALSE.
13132         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
13134         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
13136         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
13137         
13138 2007-12-10  Mark Probst  <mark.probst@gmail.com>
13140         * gc.c: Don't delay threadpool thread finalization unless Mono is
13141         shutting down.
13143 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13145         * threads.c: turn an assert into a non-fatal warning.
13147 2007-12-09  Robert Jordan  <robertj@gmx.net>
13149         * icall.c (GetVirtualMethod): Add missing argument validation.
13151 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
13153         * verify.c (do_cast): added.
13155         * verify.c (mono_method_verify): property verification of castclass and isinst.
13158 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
13160         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
13162         * verify.c (do_stelem): added.
13164         * verify.c (mono_method_verify): property verification of stelem.X.
13166 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13168         * class.c, class-internals.h: Introduce an environment variable
13169         (MONO_GENERIC_SHARING) through which the extent of generic code
13170         sharing can be controlled (share all classes, share only corlib
13171         classes, or share nothing).
13173         * object.c: Only create runtime generic context for classes for
13174         which sharing is enabled.
13176 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
13178         * verify.c (do_ldelem): refactor it to work with ldelem.any.
13180         * verify.c (mono_method_verify): property verification of ldelem.any.
13182 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
13184         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
13185         added ldelem.X opcodes.
13187         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
13189         * verify.c: proper verification of ldelem.X 
13191 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
13193         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
13195 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
13197         * verify.c (mono_method_verify): null literal requires special handling,
13198         the value pushed on stack need to be flagged as so.
13200         * verify.c (do_ldelema): Verify ldelema properly.
13202 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
13204         * verify.c: Verify ldlen properly.
13206 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
13208         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
13209         to the target object's type. Fixes #346160.
13211 2007-12-05  Dick Porter  <dick@ximian.com>
13213         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
13214         Solaris needs the same workaround as BSD-derived systems.  Fixes
13215         bug 323524, patch by Burkhard Linke
13216         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
13218 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
13220         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
13221         handle to use when error dialog is shown; otherwise, update mask
13222         to show no error dialog when an error occurs.
13224 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
13226         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
13228         * class.c (mono_class_get_field_default_value): New helper function to initialize
13229         field->def_type and field->data.
13231 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
13233         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
13234         the general one.
13236         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
13238         * marshal.c: Avoid depending on delegate->method_info being set.
13240         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
13241         
13242         * object.c (mono_delegate_ctor): Set delegate->method.
13244         * object-internals.h (struct _MonoDelegate): Add 'method' field.
13246         * appdomain.c: Bump corlib version.
13248 2007-11-27  Raja R Harinath  <harinath@gmail.com>
13250         * metadata.c (mono_generic_inst_equal_full): Short-circuit
13251         equality check if we're comparing canonicalized MonoGenericInsts.
13253 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
13255         * class.c (generic_array_methods): Call mono_class_setup_methods () before
13256         accessing class->methods.
13258 2007-11-22  Dick Porter  <dick@ximian.com>
13260         * threads.c: Ensure that the synch_cs is set before trying to use
13261         it.
13263 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
13265         * profiler.c: r89126 broke the statistial profiler, unbreak.
13267 2007-11-22  Martin Baulig  <martin@ximian.com>
13269         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
13271         * mono-debug.c
13272         (mono_debug_debugger_version): Bump to 3.
13273         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
13274         -> mono_debugger_class_initialized().
13276         * mono-debug-debugger.c
13277         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
13279         * class.c
13280         (mono_debugger_start_class_init_func): Removed.
13281         (mono_debugger_class_loaded_methods_func): Added.
13282         (mono_class_setup_methods): Call it here.
13284 2007-11-22  Martin Baulig  <martin@ximian.com>
13286         * mono-debug.c
13287         (mono_debug_add_delegate_trampoline): New public method.
13288         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
13290         * mono-debug.h
13291         (MonoSymbolTable): Added `global_data_table'.
13292         (MonoDebuggerTypeKind): Removed.
13294 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
13296         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
13297         these methods.
13299         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13300         
13301 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
13303         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
13305 2007-11-20  Martin Baulig  <martin@ximian.com>
13307         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
13309         * mono-debug-debugger.c
13310         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
13311         (mono_debugger_remove_breakpoint): Likewise.
13312         (mono_debugger_check_breakpoints): Likewise.
13313         (mono_debugger_register_class_init_callback): New public method.
13314         (mono_debugger_remove_class_init_callback): Likewise.
13315         (mono_debugger_add_type): Likewise.
13317         * mono-debug-debugger.h
13318         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
13320 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
13322         * class.c: more interface implementations needed for the
13323         array enumerator (fixes bug #341112).
13325 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
13327         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
13328         fix ParamName of ArgumentNullExceptions.
13330 2007-11-17  Miguel de Icaza  <miguel@novell.com>
13332         * reflection.c (mono_reflection_encode_sighelper): Generate the
13333         modopts and modreqs.   I have a useless test that crashes monodis,
13334         but that shows the code working.
13336 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
13338         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
13339         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
13341 2007-11-15  Dick Porter  <dick@ximian.com>
13343         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
13344         When joining a thread, it's the thread that's calling Join that
13345         gets WaitSleepJoin state not the target.  Fixes the standalone
13346         test case in bug 334740, and hopefully the whole bug too.
13348 2007-11-15  Dick Porter  <dick@ximian.com>
13350         * process.c: Read file version info from the files pointed at by
13351         process modules, not the current process.  Fixes bug 315969.
13353         Use windows typedef names in some places to fix warnings on the
13354         windows build.
13356 2007-11-15  Mark Probst  <mark.probst@gmail.com>
13358         * image.c, metadata-internals.h: Added a generic_class_cache hash
13359         to MonoImage for looking up generic classes when sharing generics.
13361 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13363         * sgen-gc.c: warning cleanups.
13365 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
13367         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
13368         inherited properties.
13370 2007-11-14  Mark Probst  <mark.probst@gmail.com>
13372         * object.c, class-internals.h: Added more information to the
13373         runtime generic context.
13375 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
13377         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
13378         instead of just the target method. Generalize the abstract method handling to
13379         handle any non-static method.
13381         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
13382         mono_marshal_get_delegate_invoke () signature change.
13384 2007-11-13  Mark Probst  <mark.probst@gmail.com>
13386         * class.c, class-internals.h: Made
13387         mono_type_get_basic_type_from_generic () public.  Fixed member
13388         access check for shared generics.
13390         * loader.c: Don't insert field into field cache if it's part of a
13391         non-inflated generic class.
13393         * domain.c, domain-internals.h: The generic sharing context is now
13394         part of the jit info data structure.  Added two accessor
13395         functions.
13397 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
13399         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
13400         the array Get/Set/Address methods, since the JIT inlines them.
13402         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
13404         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
13405         (mono_image_init): Initialize runtime_invoke_direct_cache.      
13407         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
13408         mono_marshal_get_delegate_invoke signature change.
13410         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
13411         an additional argument. Add support for invoking abstract methods.
13413         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
13415         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
13417 2007-11-09  Mark Probst  <mark.probst@gmail.com>
13419         * class.c: Do field layout for open generic classes as well.
13421 2007-11-09  Mark Probst  <mark.probst@gmail.com>
13423         * gc.c, gc-internal.h: Don't finalize threadpool threads with
13424         other objects, because the threadpool is still around.  Put them
13425         in a list instead and after finalizing all other objects in the
13426         root domain shut down the thread pool and then finalize the
13427         threads.  Fixes bug #337383.
13429         * threads.c, thread-types.h: New mono_thread_create_internal()
13430         function for marking a thread with the threadpool flag before it
13431         started.  Set synch_cs to NULL after freeing it.
13433         * threadpool.c: Mark threadpool threads before they start.
13435 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13437         * reflection.h, reflection.c: don't export random functions
13438         and lazy load dbnull and missing objects.
13440 2007-11-07  Jonathan Chambers <joncham@gmail.com>
13442         * class.c: Initialize COM types if COM interfaces
13443         are present (not just COM classes).
13444         
13445         Code is contributed under MIT/X11 license.
13447 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
13448         * reflection.c:
13449         create_dynamic_mono_image: hook module profiler events (dynamic case).
13450         mono_image_basic_init: hook assembly profiler events (dynamic case).
13452 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
13453         * profiler.c:
13454         simple_appdomain_unload: completely terminate the profiler
13455         instead of only processing the statistical samples.
13456         simple_shutdown: make sure this is really called exactly once,
13457         even in multithreaded applications, and always listen to
13458         appdomain events.
13459         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
13460         here, the "[un]load" functions will do it.
13461         Fixes bugs #333791 and #325261.
13463 2007-11-07  Geoff Norton  <gnorton@novell.com>
13465         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
13466         rather than depend on __APPLE__.
13468 2007-11-07  Mark Probst  <mark.probst@gmail.com>
13470         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
13472 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
13474         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
13475         UTF16 MonoString. Fix the crash from bug #335488
13477 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
13479         * marshal.c: Correct (for non-Win32 OS) length != size in 
13480         mono_string_from_bstr. Fix #339530.
13482 2007-11-06  Geoff Norton  <gnorton@novell.com>
13484         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
13485         to succeed
13487 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
13489         * process.c: Added run-time GetProcessId API detection for Windows.
13491 2007-11-04  Miguel de Icaza  <miguel@novell.com>
13493         * reflection.c  (mono_param_get_objects): If a parameter has the
13494         attribute [System.Runtime.InteropServices.Optional] we should
13495         set the DefaultValue of the ParameterInfo to be
13496         System.Reflection.Missing instead of DBNull.
13498         See bug #339013.
13500         (mono_get_reflection_missing_object): New method,
13501         returns the System.Reflection.Missing.Value singleton instance.
13503 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
13505         * culture-info-table.h : regenerated.
13507 2007-11-02  Jonathan Chambers <joncham@gmail.com>
13509         * icall.c: Use GetEnvironmentStrings on windows
13510         so we are using the same environment block as 
13511         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
13512         #333740.
13513         
13514         Code is contributed under MIT/X11 license.
13516 2007-10-31  Martin Baulig  <martin@ximian.com>
13518         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
13520         * mono-debug-debugger.h
13521         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
13523 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
13525         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
13526         classes.
13528 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
13530         * culture-info-table.h : regenerated.
13532 2007-10-30  Robert Jordan  <robertj@gmx.net>
13534         * icall-def.h, icall.c:
13535         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
13537         Code is contributed under MIT/X11 license.
13539 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
13541         * class.c (mono_class_setup_vtable): Find the inflated methods in the
13542         inflated class instead of inflating them again.
13543         
13544         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
13545         dynamic case.
13547         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
13548         Call setup_supertypes () after klass->parent is set.
13549         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
13551         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
13552         for inflated instances of not yet created dynamic generic classes.
13553         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
13554         times from inflated_method.
13555         (methodbuilder_to_mono_method): Ditto.
13557 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13559         * gc.c: code cleanup and removed old untested option of not creating the
13560         finalizer thread.
13562 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
13564         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
13565         creating a jump trampoline for dynamic methods.
13567 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
13569         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
13570         generic TypeBuilders when called from another method of the same type (bug #335131).
13573 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
13575         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
13576         doesn't seem to work perfectly.
13577         
13578         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
13579         called multiple times.
13580         (methodbuilder_to_mono_method): Ditto.
13581         (resolve_object): Inflate FieldBuilder's.
13583 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13585         * string-icalls.c, string-icalls.h, appdomain.c: patch from
13586         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
13587         RemoveEmptyEntries in the string.Split implementation (bug #322375).
13589 2007-10-26  Dick Porter  <dick@ximian.com>
13591         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
13592         Thread initialisation changes
13594 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
13596         * verify.c: fix compatibility check between arrays and System.Array
13598 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
13600         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
13601         too. Fixes #336999.
13603 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
13605         * object.c (mono_value_box): Use typed allocation here.
13607 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
13609         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
13610         trampoline instead of compiling the method right away.
13612         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
13614 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
13616         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
13617         related fields for dynamic classes. Fixes #334493.
13619 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
13621         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
13622         
13623         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
13625         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
13626         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
13628         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
13630         * reflection.c (create_generic_typespec): Initialize klass->generic_container
13631         if needed.
13632         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
13634 2007-10-18  Jonathan Chambers <joncham@gmail.com>
13636         * marshal.c: Use correct key when removing item
13637         from ccw_hash.
13638         
13639         Code is contributed under MIT/X11 license.
13641 2007-10-17  William Holmes  <billholmes54@gmail.com>
13643         *marshal.c: Adding a case to marshal booleans to U1
13645         Code is contributed under MIT/X11 license.
13647 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
13649         * class.c (mono_class_from_name): Search the modules compromising dynamic
13650         assemblies. Fixes #331601.
13652 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
13654         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
13655         exception if the type name contains an assembly component. Fixes #334203.
13657         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
13658         modules inside dynamic assemblies. Fixes #334200.
13659         
13660         * reflection.c: Set image->public_key and image->public_key_length;
13662         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
13663         fields.
13665         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
13666         
13667 2007-10-16  Mark Probst  <mark.probst@gmail.com>
13669         * metadata.c: Implemented correct comparing of generic classes.
13670         An inflated generic class can be equal to a non-inflated one if it
13671         is inflated with generic type variables as type arguments.  Fixes
13672         bug #333798.
13674 2007-10-15  Dick Porter  <dick@ximian.com>
13676         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
13677         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
13678         81646.
13680         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
13681         instead of a monitor lock.  This means that monitor_try_enter and
13682         co can set the thread state safely.
13683         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
13684         thread_interrupt_requested, so interrupt actually works.
13686         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
13687         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
13688         state accessor function
13690 2007-10-15  Martin Baulig  <martin@ximian.com>
13692         * mono-debug.h
13693         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
13694         the debugger with the current runtime.
13696 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
13698         * object.c, object-internals.h: added the ability to set a single
13699         trampoline for all the slots in a vtable.
13701 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13703         * marshal.c: deal with a possible race condition during multicast
13704         delegate invocation.
13706 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13708         * class.c: ensure value type methods don't have the synchronized
13709         flag set.
13711 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
13713         * string-icalls.c, string-icalls.h: reverted unapproved patch that
13714         breaks the build.
13716 2007-10-11  Joel Reed  <joelwreed@comcast.com>
13718         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
13719         to take an options parameter so that empty entries can be removed during
13720         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
13722 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13724         * marshal.c: make sure we don't store the signature from a dynamic
13725         method into the runtime invoke cache (bug #327189).
13727 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13729         * marshal.c: make sure the wrapper methods are properly initialized.
13731 2007-10-11  Mark Probst  <mark.probst@gmail.com>
13733         * metadata.c, metadata-internals.h: Generalized
13734         mono_type_stack_size() to mono_type_stack_size_internal() which
13735         takes an additional argument specifying whether it allows open
13736         types.
13738 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
13740         * verify.c (do_invoke_method): handle typedbyref params
13741         correctly and check for unverifiable return values.
13743         * verify.c (do_newobj): fix a warning.
13745 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
13747         * verify.c: don't tread typedbyref as allways unverifable,
13748         so uses, like (ld/st)loc.0 are valid. verify for the cases
13749         that it matters, like boxing related operations.
13751 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
13753         * verify.c: add verification of the newobj opcode. verification
13754         of delegate instantation still missing due ldftn and virldftn not
13755         pushing the function type on stack
13757 2007-10-08  Mark Probst  <mark.probst@gmail.com>
13759         * class-internals.h: Runtime generic context data structure
13760         definition.
13762         * object.c: Initialization of runtime generic context at runtime
13763         vtable creation time.
13765 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
13766         * class.c (mono_class_create_from_typedef,
13767         mono_class_from_generic_parameter, mono_ptr_class_get,
13768         mono_fnptr_class_get, mono_bounded_array_class_get)
13769         * domain.c (mono_domain_create, mono_domain_free)
13770         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
13771         * image.c (do_mono_image_load, mono_image_close):
13772         Hooked up load-unload profiler events.
13774 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
13776         * domain.c: track statistics about the actual amount of native code
13777         allocated.
13779 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
13781         * class.c: the valuetype enumerators don't have the additional
13782         supertypes interfaces.
13784 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13786         * class.c: need more interfaces setup for the IEnumerator<T>
13787         object created for arrays (tests/ienumerator-interfaces.2.cs).
13789 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
13791         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
13793 2007-10-05  Alp Toker  <alp@atoker.com>
13795         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
13796         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
13797         #315863.
13799 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
13801         * verify.c (verify_type_compatibility_full): verification of
13802         compatibility improved, validates correctly non-strict checks between
13803         native int and I4 types different than (unsigned)int32.
13805         * verify.c (do_store_indirect): added, do all verification of
13806         ldind.X opcodes. 
13808         * verify.c (get_load_indirect_mono_type): renamed to
13809         get_indirect_op_mono_type, as it now returns the MonoType for 
13810         ldind.X and stind.X opcodes.
13812 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
13814         * reflection.c: Fix the encoding of generic type definition for
13815         TypeBuilders.
13817         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
13818         mono_image_typedef_or_ref but allows to specify if typespec lookups should
13819         be made. Typespec check is done prior to typeref cache lookup.
13821         * reflection.c (mono_image_typedef_or_ref): now just delegate to
13822         mono_image_typedef_or_ref_full.
13824         * reflection.c (encode_generic_class): encode the generic class
13825         directly instead of calling encode_type.
13827         * reflection.c (encode_type): encode the generic type definition
13828         MonoClass as a generic instantiation.
13830         * reflection.c (create_typespec): cache typespec tokens in
13831         the assembly->typespec cache. Don't create typespec for a generic
13832         instance MonoClass. Create typespec for the generic type defintion.
13834         * reflection.c (create_generic_typespec): encode the generic
13835         class directly instead of calling encode_type.
13837         * reflection.c (mono_image_create_token): encode the generic
13838         type definition not using a typespec for MonoType instances.
13841 2007-10-04  Raja R Harinath  <rharinath@novell.com>
13843         Fix #328812
13844         * class.c (mono_image_init_name_cache): Don't return nested
13845         'protected internal' classes.
13846         (mono_class_from_name_case): Likewise.
13848 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
13850         * icall-def.h, icall.c : get_bundled_machine_config() is now the
13851           common function used by both DefaultConfig in System.dll and
13852           InternalConfigurationHost in System.Configuration.dll.
13854 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13856         * class.c: automatically add to vectors only a few essential explicit
13857         generic interfaces. The rest of the interfaces that arrays should
13858         provide are currently implicitly added (but still not lazily, see the
13859         design in the discussion of bug#325495 for the details of what is
13860         needed for that). Additionally, implicit interfaces are assigned the
13861         same vtable slot as the explicit interfaces (as they are compatible):
13862         this enables huge memory savings since we don't need to instantiate
13863         as many memthods and as large vtables anymore. Also, Since
13864         GetEnumerator<T> returns an instance of a type that is required to
13865         support a similarly large set of interfaces as arrays, we add
13866         implicit interfaces and interface offset sharing support to those
13867         types, too. This change adds all the required interfaces so that
13868         the anonarray.cs test case in the bug report works (we don't add
13869         all the interfaces to arrays of arrays 3-level deep and more because
13870         of the memory requirements explained in the bug and since they are much
13871         less common: the lazy-loading support will enabled them to work, too).
13873 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
13875         * verify.c (merge_stacks): major clean up, all type compatibility
13876         checks are done by verify_type_compatibility. This fix my earlier lack
13877         of understanding of the CLR type system and merge_stacks no longer looks
13878         scary.
13880         * verify.c: fixed some bad spelling.
13882 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
13884         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
13885         a given stack slock.
13886         
13887         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
13888         verify_type_compatibility_full. This removed a near indentical function and fixed
13889         handling of Int32 and IntPtr across all opcodes.
13891 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
13893         * class.c: only vectors have the additional generic interfaces.
13895 2007-10-01  Jonathan Chambers <joncham@gmail.com>
13897         * mono-config.c: Use g_strcasecmp instead of
13898         strcasecmp like everywhere else to fix
13899         compilation with MSVC.
13900         
13901         Code is contributed under MIT/X11 license.
13903 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13905         * object.c, object-internals.h: refactored the IMT code to enable
13906         building a single slot at a time and lazily creating the IMT trampolines
13907         and thunks.
13909 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
13911         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
13913         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
13914         Fixes #328501.
13915         
13916 2007-09-29  Raja R Harinath  <harinath@gmail.com>
13918         * loader.c (method_from_methodspec): Rearrange to avoid
13919         un-necessary exposition.  Don't assert out if the method's
13920         declaring type is a generic type definition.
13922 2007-09-28  Martin Baulig  <martin@ximian.com>
13924         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
13926 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
13928         * class-internals.h: optimize field layout of MonoClass to
13929         requires less cachelines at runtime and save a few bytes on 64 bit
13930         systems.
13932 2007-09-28  Jb Evain  <jbevain@novell.com>
13934         * reflection.c: when encoding type names in custom attributes,
13935         if the type is a closed generic type, its generic arguments
13936         have to be serialized as AssemblyQualifiedName, so that when
13937         they are deserialized, it's possible to re-create them properly.
13938         Fixes #329450.
13941 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
13943         * object.c, class-internals.h: added delegate-creation counter.
13945 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
13947         * class.c: cleanup of the code that synthetizes interfaces for
13948         arrays in 2.0: saves quit a bit of corlib mempool memory.
13949         Code to fix bug #325495 ifdeffed out for now until the issues
13950         with memory usage and O(n^2) behaviour are fixed.
13952 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13954         * marshal.c: when possible, do not duplicate the name of the methods
13955         in the method builder and in the generated MonoMethod.
13957 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
13958         * verify.c: added support for type checking ldind_* opcodes.
13960 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
13962         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
13963         which is used to distinguish the fully open instantiation of a TypeBuilder
13964         with the rest. This temporary hack is required to restore the property that
13965         the fully open instantiation is the same type of the generic type definition.
13967         * class-internals.h (mono_generic_class_is_generic_type_definition):
13968         new function as part of the internal API.
13970         * class.c (inflate_generic_type): return NULL when the generic inst is
13971         fully open. The fully open generic type is now the same as the generic type
13972         definition for non TypeBuilder types.
13974         * class.c (mono_generic_class_get_class): removed assert since it is
13975         no longer valid, gklass->cached_class can point to the generic type definition.
13977         * class.c (mono_generic_class_is_generic_type_definition): new.
13979         * metadata.c (mono_generic_class_hash): added is_tb_open field
13980         to the hash calculation.
13982         * metadata.c (free_generic_class): if the generic class is associated
13983         with the generic type definition, its field will come from the mempool and
13984         must not be freed.
13986         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
13987         new, this function identifies the corner case of a TypeBuilder fully open
13988         instantiation.
13990         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
13991         for lookup. Set gclass->cached_class to be the container class in case of
13992         the fully open instantiation of non TypeBuilder types.
13994         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
13995         to compare generic classes.
13997         * reflection.c (method_encode_methodspec): remove assert that
13998         no longer is valid.
14000         * reflection.c (mono_reflection_generic_class_initialize): add
14001         an aditional assert to ensure the proper type is used.
14003 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
14005         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
14006         to enjoy it.
14008 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
14010         * verify.c (push_arg): Fixed support for ldarga
14011         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
14012         MonoType used as first arg in case of instance calls.
14014 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
14016         * verify.c: Support for verifying VAR and MVAR types, 
14018 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
14020         * icall.c (ves_icall_get_property_info): Set the reflected type of the
14021         accessors correctly.
14023 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
14025         * threads.c: support OSX and other systems in
14026         mono_thread_get_stack_bounds (bug #328026).
14028 2007-09-25  Martin Baulig  <martin@ximian.com>
14030         * mono-debug.h
14031         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
14033 2007-09-24  Martin Baulig  <martin@ximian.com>
14035         * mono-debug.h
14036         (MonoDebugClassEntry): Moved the definition of this struct into
14037         mono-debug.c to make it private.
14039         * mono-debug.c
14040         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
14041         type table per symbol file, we don't need to store the symfile id
14042         any longer.
14044 2007-09-24  Martin Baulig  <martin@ximian.com>
14046         Create one type table per symbol file, since a `MonoClass *' gets
14047         invalid when its image is unloaded.
14049         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
14050         (MonoDebugHandle): Added `type_table'.
14052 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
14054         * mempool.c, mempool.h: added mono_mempool_new_size () API
14055         to be able to specify a smaller initial size for the pool.
14056         Adjusted the code to slowly increase pool size before using
14057         the previous default size.
14058         * image.c: use a small initial size for image mempools.
14060 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
14062         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
14063         Fixes ##320990.
14065         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
14066         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
14068 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
14070         * metadata.c (mono_type_create_from_typespec): Remove an invalid
14071         free. Fixes #327438.
14073 2007-09-21  Raja R Harinath  <harinath@gmail.com>
14075         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
14076         generic instantiations, etc.
14077         <MONO_TYPE_ARRAY>: Likewise.
14079 2007-09-21  Martin Baulig  <martin@ximian.com>
14081         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
14082         these structs were never defined.
14083         (MonoDebugHandle): Removed the `_priv' field, it was never used.
14085 2007-09-21  Martin Baulig  <martin@ximian.com>
14087         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
14089 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
14091         * image.c: removed the guid hash tables: we can get the same info
14092         without the additional memory usage hit (partially fixes also bug #327052).
14094 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
14096         * profiler.h, profiler-private.h, profiler.c: add a new profiler
14097         event to handle unloading methods. After the event is called, the
14098         corresponding MonoMethod* must be considered invalid.
14099         * loader.c (mono_free_method): call the new mono_profiler_method_free
14100         event.
14102 2007-09-20  Mark Probst  <mark.probst@gmail.com>
14104         * domain-internals.h: New flag in MonoJitInfo which marks shared
14105         generic methods.  New hash table (shared_generics_hash) in
14106         MonoDomain to keep track of shared generic methods.  Prototypes
14107         for functions to register and lookup shared generic methods.
14109         * domain.c: Support for registering and looking up shared generic
14110         methods via a hash table (shared_generics_hash) in MonoDomain.
14112         * class-internals.h: New exception to signal failure of shared
14113         compilation of a generic method.  New counters for generics
14114         sharing in MonoStats.
14116 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
14118         * image.c, metadata-internals.h: don't keep a file descriptor open
14119         for loaded assemblies (bug#325988).
14121 2007-09-19  Raja R Harinath  <rharinath@novell.com>
14123         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
14124         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
14125         use the corresponding datatypes.
14126         (type_in_image): Update to changes.
14127         (CleanForImageUserData): Simplify.
14128         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
14129         Avoid quadratic behaviour in handling the "stolen" list by
14130         separating the filter predicate out, and by prepending the stolen
14131         items rather than appending them.
14132         (steal_ginst_in_image): Likewise.
14133         (mono_metadata_clean_for_image): Update to changes.
14135 2007-09-19  Martin Baulig  <martin@ximian.com>
14137         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
14139 2007-09-19  Martin Baulig  <martin@ximian.com>
14141         * mono-debug.c (mono_debug_cleanup): Don't call
14142         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
14144 2007-09-19  Raja R Harinath  <harinath@gmail.com>
14146         Fix crash on 'make run-test' in mcs/errors
14147         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
14148         Avoid more potential allocations in mono_class_from_mono_type.
14149         (ginst_in_image): Update to changes.
14150         (gclass_in_image): Rearrange slightly.
14152 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
14154         * class.c (mono_class_init): Move the code that sets up class->methods to 
14155         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
14157         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
14158         canonical instance of an inflated generic signature.
14159         (mono_type_create_from_typespec): Remove an invalid free.
14161         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
14163 2007-09-18  Marek Habersack  <mhabersack@novell.com>
14165         * domain-internals.h: added a declaration of the
14166         mono_assembly_load_full_nosearch internal function.
14168         * assembly.c (mono_assembly_load_with_partial_name): use
14169         mono_try_assembly_resolve return value properly.
14170         (mono_assembly_load_full_nosearch): copied the function body from
14171         mono_assembly_load_full, without the code to invoke assembly
14172         search hooks.
14173         (mono_assembly_load_full): calls the above new function and if the
14174         assembly is not resolved, invokes the search hooks.
14176         * appdomain.c (mono_runtime_init): restore the global postload
14177         assembly search handlers.
14179 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
14181         * class.c (mono_class_init): Make sure class->methods and class->properties
14182         are never NULL in the generics case.
14184         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
14186 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
14188         * metadata.c (free_generic_class): Disable some code to fix the build.
14190         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
14192         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
14193         from the image mempool.
14195         * metadata.c (free_generic_class): Free more data from the inflated class.
14197         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
14199         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
14200         mempool.
14201         (mono_type_create_from_typespec): Ditto.
14203         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
14204         MonoImage to the caller.
14205         (mono_init_internal): Save the opened image in a global variable.
14206         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
14208         * reflection.c (resolve_object): Fix a leak.
14210         * metadata.c: Fix the freeing of data in the generics caches.
14211         
14212         * metadata.c (free_generic_inst): Comment this out to fix the build.
14213         (free_generic_class): Ditto.
14215         * metadata.c: Free cached generic methods, instantinations and classes when
14216         they are removed from the caches.
14217         (mono_metadata_free_type): Free the type itself.
14219         * class.c: Free the result of mono_class_inflate_generic_type () in a few
14220         places.
14222 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
14224         * boehm-gc.c: restrict managed allocs to __thread supporting
14225         architectures.
14227 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
14229         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
14230         (mono_generic_class_get_class): Fix a leak.
14232         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
14233         mono_metadata_free_type ().
14234         (mono_metadata_inflate_generic_inst): Fix a leak.
14236 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
14238         * mono-debug.c (free_header_data): Fix a leak missed earlier.
14240         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
14241         mempool.
14243         * mono-debug.c (mono_debug_close_image): Fix call to 
14244         g_hash_table_remove ().
14246 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
14248         * icall-def.h: redirect all the string ctor to the managed
14249         CreateString () methods.
14250         * string-icalls.c, string-icalls.h: removed dead code for string
14251         ctors and icalls.
14253 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
14255         * mono-debug.c: Fix memory leaks.
14257 2007-09-14  Jonathan Chambers <joncham@gmail.com>
14259         * threads-types.h: Implement mono_hazard_pointer_set and 
14260         mono_hazard_pointer_clear macros using do/while(0) to fix
14261         compilation with MSVC.
14262         
14263         Code is contributed under MIT/X11 license.
14265 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
14267         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
14268         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
14270 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
14272         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
14273         icalls.
14275 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
14277         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
14278         managed-code allocated as well.
14280 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
14282         * class.c (mono_class_is_assignable_from): Add support for generic variance.
14284 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
14286         * boehm-gc.c: fixed the build after the AOT changes.
14288 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
14290         * wrapper-types.h: Add an ALLOC wrapper type.
14292         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
14293         reference managed allocator methods.
14295 2007-09-12  Marek Safar  <marek.safar@gmail.com>
14297         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
14298         of Type array and not MonoType, a fix suggested by Hari.
14299         
14300 2007-09-12  Jonathan Chambers <joncham@gmail.com>
14302         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
14303         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
14304         
14305         Code is contributed under MIT/X11 license.
14307 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
14309         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
14311 2007-09-12  Marek Habersack  <mhabersack@novell.com>
14313         * image.c (do_mono_image_open): if assembly file fails to open and
14314         MONO_IOMAP is in effect, try to find the path in a
14315         case-insensitive way.
14317         * appdomain.c (mono_runtime_init): do not install postload hooks -
14318         tests show that MS.NET doesn't use anything of that sort to
14319         trigger the AppDomain.AssemblyResolve event.
14320         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
14321         made non-static.
14322         (mono_runtime_init): init portability helpers here.
14324         * assembly.c (mono_assembly_load_with_partial_name): if other   
14325         attempts fail, trigger the AppDomain.AssemblyResolve event handler
14326         to resolve the assembly.
14328         * domain-internals.h: added mono_try_assembly_resolve and marked
14329         it as internal.
14331 2007-09-11  Jb Evain  <jbevain@novell.com>
14333         * object-internals.h (MonoReflectionDynamicMethod): add
14334         a `MonoReflectionType *owner` field. The owner is used
14335         * reflection.c:
14336         (mono_reflection_create_dynamic_method): use the owner of the dynamic
14337         method as the class declaring the dynamic method.
14338         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
14339         dynamic method to the declaring type of the methodbuilder.
14341 2007-09-11  Mark Probst  <mark.probst@gmail.com>
14343         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
14344         rules for calling methods via reflection.
14346 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
14348         * reflection.c (resolve_object): Add support for MonoGenericClass. 
14349         Inflate MonoType's.
14351 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
14353         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
14354         provide a managed method that does fast allocations without needing
14355         a managed->unmanaged transition. Boehm GC implementation currently
14356         enabled for ptrfree objects on sane architectures.
14358 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
14360         * marshal.c, marshal.h: exported a couple of useful functions and
14361         added mono_mb_get_label () to easily handle backward branches.
14363 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
14365         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
14367 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
14369         * loader.c (find_method): Fixed the regression introduced while
14370         fixing bug #81466.
14372 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
14374         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
14375         well.
14376         
14377         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
14378         icall.c reflection.c: Pass a MonoGenericContext argument to 
14379         mono_lookup_dynamic_token ().
14381         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
14382         #82744.
14383         
14384 2007-09-09  Robert Jordan  <robertj@gmx.net>
14386         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
14387         for generic methods.
14389         * object.c (mono_object_get_virtual_method): Handle generic methods.
14390         Fixes bug #78882.
14392         Code is contributed under MIT/X11 license.
14394 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
14396         * image.c: fix locking in mono_image_load_file_for_image ().
14398 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
14400         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
14401         used only as a cache: added an icall to fill it.
14403 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
14405         * reflection.h: exposed mono_reflection_free_type_info
14406         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
14407         since mono_reflection_bind_generic_parameters makes a copy of it.
14408         * reflection.c (free_type_info): subinfos should be freed.
14409         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
14410         made non static.
14411         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
14412         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
14413         this fixes #82695 and #81726.
14414    
14416 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
14418         * process.h, process.c:  added support for user profile/info in
14419           ProcessStartInfo. For now only Windows works.
14421 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
14423         * metadata.c: consider the generic arguments when comparing
14424         signatures (bug #82614).
14426 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14428         * cil-coff.h, image.c: updated assembly loader to cope with the
14429         PE32+ 64 bit file format.
14431 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14433         * assembly.c, class.c, domain.c, loader.c: remove useless
14434         inclusion of cil-coff.h.
14436 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
14438         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
14439         if interface is marked with CoClassAttribute. 
14440    
14441         Code is contributed under MIT/X11 license.
14443 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
14445         * sgen-gc.c: ensure no object from the to space is copied again or finalized
14446         if it's seen twice in major collections.
14448 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14450         * sgen-gc.c: big objects are not copied to the gray area, but they
14451         need to be considered for scanning, too, if they are brought alive
14452         by an object ready for finalizations or a survived one.
14454 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
14456         * sgen-gc.c: properly account the number of disappearing links when
14457         they are nullified.
14459 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
14461         * sgen-gc.c: share the code to scan the registered roots between the
14462         different types of collections.
14464 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
14466         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
14468 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
14470         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
14471         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
14473 2007-08-28  Mark Probst  <mark.probst@gmail.com>
14475         * security-manager.c (mono_security_manager_get_methods):
14476         LinkDemandSecurityException now has 2 arguments instead of 3.
14478 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
14480         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
14481         platforms which need it.
14483 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14485         * sgen-gc.c: unregister thread data structures with a pthread_key_t
14486         dtor.
14488 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
14490         * threads.c: free the thread static data on thread exit.
14492 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
14494         * class.c: walk the hierarchy to find the generic definition for
14495         a class (fixes runtime part of bug #82498).
14497 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
14499         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
14500         ...
14502         * image.c (mono_image_close): Here. Hopefully fixes #82510.
14504 2007-08-24  Mark Probst  <mark.probst@gmail.com>
14506         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
14508 2007-08-24  Robert Jordan  <robertj@gmx.net>
14510         * appdomain.c: don't perform the ':'->';' substitution on Win32.
14512 2007-08-24  Jb Evain  <jbevain@novell.com>
14514         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
14515         for byref types.
14517 2007-08-24  Mark Probst  <mark.probst@gmail.com>
14519         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
14520         #82286.
14522 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
14524         * assembly.c: Fix a warning.
14525         
14526 2007-08-23  Marek Habersack  <mhabersack@novell.com>
14528         * appdomain.c: parse the <runtime> section looking for the probing
14529         element with the 'privatePath' attribute, which sets additional
14530         directories in which the runtime should look for assemblies.
14532 2007-08-23  Robert Jordan  <robertj@gmx.net>
14534         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
14535         Fixes #82499.
14537 2007-08-23  Martin Baulig  <martin@ximian.com>
14539         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
14540         _mono_debug_init_corlib() and remove it from the header file.
14542 2007-08-23  Martin Baulig  <martin@ximian.com>
14544         * mono-debug-debugger.c
14545         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
14546         don't notify the debugger about it.
14548         * mono-debug-debugger.h
14549         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
14551 2007-08-23  Robert Jordan  <robertj@gmx.net>
14553         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
14554         Code is contributed under MIT/X11 license.
14556 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14558         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
14560 2007-08-22  Martin Baulig  <martin@ximian.com>
14562         * mono-debug.c: Store debugging info on a per-domain basis and
14563         free it on domain unload.  Add support for unloading symbol files.
14565         * mono-debug.h
14566         (MonoDebugList): New typedef.
14567         (MonoSymbolTable):
14568         - add `data_tables and `type_table'.
14569         - replace 'symbol_files' and `num_symbol_files' with a
14570           `MonoDebugList *'.
14571         (mono_debug_data_table): Removed.
14572         (mono_debug_list_add): New public function.
14573         (mono_debug_list_remove): New public function.
14574         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
14575         (mono_debug_init_2_memory): Renamed into
14576         mono_debug_open_image_from_memory().
14577         (mono_debug_close_image): New public function.
14578         (mono_debug_domain_create): Likewise.
14579         (mono_debug_domain_unload): Likewise.
14580         (MONO_DEBUGGER_VERSION): Bump to 60.
14582         * mono-debug-debugger.h
14583         (MonoDebuggerEvent):
14584         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
14585         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
14586         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
14587         - rename `THREAD_CREATED' and `THREAD_EXITED' into
14588           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
14589         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
14590           meaning.
14591         (mono_debugger_add_symbol_file): Removed.
14592         (mono_debugger_add_type): Removed.
14593         (mono_debugger_lookup_type): Removed.
14594         (mono_debugger_lookup_assembly): Removed.
14596         * domain.c
14597         (mono_domain_create): Call mono_debug_domain_create().
14598         (mono_init_internal): Call mono_debug_init_corlib().
14600         * assembly.c
14601         (mono_assembly_close): Call mono_debug_close_image().
14603 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
14605         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
14606         mmap call.
14608 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
14610         * sgen-gc.c: ensure section->pin_queue_end is initialized
14611         correctly when non pinning objects in the section have been found.
14613 2007-08-22  Marek Habersack  <mhabersack@novell.com>
14615         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
14616         containing a list of directories separated by ':'. MSDN docs say
14617         the directories should be separated with ';'. Part of a bugfix for
14618         bug #81446
14620 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
14622         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
14623         it should MonoType and not MonoClass.
14625 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
14627         * culture-info-table.h : regenerated.
14629 2007-08-20  William Holmes  <billholmes54@gmail.com>
14631         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
14632          to call ReplaceFile Kernel32 on windows or in io-layer.
14633         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
14634         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
14635          as an internal call.
14637         Code is contributed under MIT/X11 license.
14639 2007-08-20  Jb Evain  <jbevain@novell.com>
14641         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
14642         and MONO_EXCEPTION_FIELD_ACCESS.
14644         * debug-helpers.[c|h]: new mono_field_full_name function.
14646 2007-08-20  Mark Probst  <mark.probst@gmail.com>
14648         * class.c: Removed class_security_level() and moved it to
14649         security-core-clr.c.
14651         * security-core-clr.c, security-core-clr.h: class_security_level()
14652         is now public and renamed to mono_security_core_clr_class_level().
14653         It also looks for security attributes in the classes a class is
14654         nested in.
14656 2007-08-20  Mark Probst  <mark.probst@gmail.com>
14658         * security-core-clr.c, security-core-clr.h: CoreCLR security
14659         utility functions.
14661         * Makefile.am: Added security-core-clr.[ch].
14663         * security-manager.c, security-manager.h: Functions and enum for
14664         setting and getting the security mode.
14666         * class.c: CoreCLR security checks.
14668 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14670         * icall-def.h, process.c, process.h: implemented icall to get
14671         user/system processor times.
14673 2007-08-17  Mark Probst  <mark.probst@gmail.com>
14675         * domain.c, threads.c, class-internals.h, domain-internals.h: New
14676         reader-lock-free jit_info_table.
14678 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
14680         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
14682         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
14684         * object-internals.h (MonoException): Add missing _data member.
14686 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
14688         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
14689         checking that only methods with matching qname or fqname are picked
14690         from implemented interfaces.
14692 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
14694         * verify.c (do_newarr):added, do type verification of
14695         newarr ops, push the right value on the eval stack.
14696         * verify.c (mono_method_verify): use do_newarr
14699 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
14701         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
14702         factored the common code into get_boxable_mono_type, which
14703         is now using mono_type_get_full, this fixed byref related tests.
14705 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
14707         * class.c: added mono_type_get_full, this function has the same
14708         behavior of mono_class_get_full but the returned MonoType has
14709         all metadata of the associated token in case of a typespec token.
14710         * class.c: added mono_type_retrieve_from_typespec, used by 
14711         mono_type_get_full to retrieve the token type.
14712         * class.c (mono_class_create_from_typespec): changed to use
14713         mono_type_retrieve_from_typespec.
14714         * class.c (mono_ldtoken): changed to use mono_type_get_full
14715         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
14716         * class-internals.h: exported mono_type_get_full for internal use.
14718 2007-08-16  Jb Evain  <jbevain@novell.com>
14720         * domain.c (supported_runtimes): add entry for
14721         the 'moonlight' runtime version.
14723 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
14725         * verify.c (mono_method_verify): small typo sliped in.  
14727 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
14729         * verify.c (do_unbox_value): added, do type verification of
14730         unboxing ops
14731         * verify.c (mono_method_verify): use do_unbox_value
14734 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
14736         * verify.c (dump_stack_value): fixed typo, was printing string
14737         instead of object on stack.
14738         * verify.c (do_box_value): moved the byref check up as it leads
14739         to invalid code and should be done earlier.
14740         * verify.c: improved error messages for and ldobj
14742 2007-08-15  William Holmes  <billholmes54@gmail.com>
14744         * marshal.c (emit_marshal_custom): Omit the call to 
14745           marshal_native_to_managed when calling native to managed 
14746           and the argument is specified as an out argument.
14748         Code is contributed under MIT/X11 license.
14750 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
14752         * verify.c: fixed the type checks for generics, function pointers and vectors.
14753         Added type verification for ldobj and ldtoken. The verifier
14754         would segfault if header or signature of a method contained references
14755         to non-existant types.
14757 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
14759         * marshal.c (cominterop_get_ccw): Patch from
14760         Bill Holmes to no walk up interface hierarchy. 
14761         All parent methods should be present in the interface for COM.
14762    
14763         Code is contributed under MIT/X11 license.
14765 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
14767         * marshal.c (emit_marshal_com_interface): Patch from
14768         Bill Holmes to handle COM Interfaces as return values
14769         for native->managed calls.
14770    
14771         Code is contributed under MIT/X11 license.
14773 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
14775         * marshal.c (cominterop_get_idispatch_for_object): Implement
14776         for runtime callable wrappers.
14777    
14778         Code is contributed under MIT/X11 license.
14780 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
14782         * pedump.c (main): changed from mono_init to mono_init_from_assembly
14783         so 2.0 types are accessible
14786 2007-08-13  Miguel de Icaza  <miguel@novell.com>
14788         * domain.c (mono_init_internal): Call mono_assembly_load_friends
14789         once we load mscorlib.   Due to the order in which we initialize,
14790         the mono_assembly_load_full routine that loads mscorlib did not
14791         load friends.   We now load it once we load the
14792         mono_defaults.internals_visible_class class. 
14794         * assembly.c: Expose the mono_load_friend_assemblies method.
14796 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
14798         * verify.c: improved the handling of boxing, better
14799         type checking for unary ops and conversion. Fix bug
14800         regarding managed pointer compatibility checking
14802 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
14804         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
14806         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
14808 2007-08-09  Raja R Harinath  <rharinath@novell.com>
14810         * reflection.c (dup_type): Remove.
14811         * class.c (dup_type): Remove.
14812         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
14813         instead of the dodgy 'dup_type'.
14814         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
14815         handle the case where 'dup_type' needed the second argument.
14817 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
14819         * domain.c: Fix a warning.
14821 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
14823         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
14824         checking that methods with the same fqname are not overridden
14825         with a method from an ancestor.
14827 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
14829         * threads.c (free_thread_static_data_helper): Avoid a crash if
14830         thread->static_data is not yet set.
14832 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
14834         * marshal.c: Use correct image when emitting
14835         native wrapper for COM calls.
14836    
14837         Code is contributed under MIT/X11 license.
14839 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
14841         * icall-def.h, security.c, security.h :
14842           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
14844 2007-08-07  Martin Baulig  <martin@ximian.com>
14846         * mono-debug-debugger.h
14847         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
14849         * domain.c (mono_domain_free): Call
14850         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
14852 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
14854         * verify.c (check_underflow, check_overflow): error message now returns IL offset
14855         * verify.c (in_same_block): code should test if either offset is inside the clauses
14856         * verify.c (mono_method_verify): push the exception into the eval stack of exception
14857         and filter blocks
14859 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
14861         * image.c (mono_image_close): Fix a leak.
14863         * object.c (mono_runtime_invoke_array): Avoid using alloca.
14865         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
14867 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14869         * domain.c, threads.c, threads-types.h: fix memory retention issue
14870         with thread static variables not being cleared on domain unload.
14871         Reuse thread static slots after domain unload.
14873 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
14875         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
14876         nullable type.
14878         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
14879         now done in mono_runtime_invoke_array.
14881         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
14882         receiver is a nullable type.
14884         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
14885         generic parameter.
14887 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
14889         * marshal.c: Implement COM Objects as return type for 
14890         managed->unmanaged calls. Added Release calls for COM Object
14891         out/return values in managed->unmanaged calls.
14893         Code is contributed under MIT/X11 license.
14895 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
14897         * threads.h, threads-type.h: move the hazard pointer declarations
14898         to the private header.
14900 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
14902         * file-io.c, appdomain.c: memory leak fixes.
14904 2007-08-02  Dick Porter  <dick@ximian.com>
14906         * socket-io.c
14907         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
14908         SO_REUSEADDR setting into io-layer/sockets.c.
14910 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
14912         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
14913         from Object when called on a generic parameter. Fixes #82211.
14915 2007-08-01  Dick Porter  <dick@ximian.com>
14917         * file-io.c (convert_share): Test FileShare values bit-by-bit.
14918         Fixes bug 79250 yet again.
14920 2007-07-30  Martin Baulig  <martin@ximian.com>
14922         Merged the `debugger-dublin' branch.
14924         * mono-debug.h
14925         (MonoDebugDataTable): New typedef.
14926         (MonoDebugMethodAddressList): New typedef.
14927         (MonoDebugWrapperData): Removed.
14928         (MonoDebugSymbolTable): Removed `current_data_table',
14929         `current_data_table_size', `current_data_table_offset'.
14930         (MonoDebugDataItemType): Moved into mono-debug.c.
14931         (MonoDebugMethodJitInfo): Remove `address'.
14932         (mono_debug_data_table): New global variable.
14933         (mono_debug_lookup_method_addresses): New public function.
14934         (mono_debug_find_method): Take a `MonoMethod *', not a
14935         `MonoDebugMethodInfo *'.
14937         * mono-debug.c: Drop support for the old symbol tables.
14939 2007-06-28  Martin Baulig  <martin@ximian.com>
14941         * mono-debug.c (mono_debug_debugger_version): New public variable.
14943 2007-07-31  William Holmes  <billholmes54@gmail.com>
14945         * metadata.c Changed mono_type_create_from_typespec to not insert
14946           the type into the hash map until after
14947           do_mono_metadata_parse_type has completed.
14948         Fixes Bug #82194
14949         Code is contributed under MIT/X11 license.
14951 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
14953         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
14954         generic parameter. Fixes #82211.
14956 2007-07-27  Jb Evain  <jbevain@novell.com>
14958         * pedump.c (dump_metadata, dump_metadata_header): dump
14959         versions contained in the metadata header.
14961 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
14963         * threads.c: register small_id_table with the GC.
14965 2007-07-27  Mark Probst  <mark.probst@gmail.com>
14967         * threads.c, threads.h, class-internals.h, object-internals.h:
14968         Hazard pointers, to be used by lock-free parallel algorithms.
14970 2007-07-26  Dick Porter  <dick@ximian.com>
14972         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
14973         routine on non-windows platforms, as I've not managed to think of
14974         a non-kludgy way of doing this.  Finishes off bug 78739.
14976 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
14978         * object.c: properly setup interface_bitmap in proxy vtables.
14980 2007-07-25  Marek Habersack  <mhabersack@novell.com>
14982         * appdomain.c (get_shadow_assembly_location): do not use TickCount
14983         to create unique shadow copy target directories, use the domain's
14984         serial number instead. Each domain gets a unique target directory
14985         that way.
14987         * domain.c (mono_domain_create): added code to increment domain
14988         shadow copy serial number and cache the value in the current
14989         domain structure.
14991         * domain-internals.h (struct _MonoDomain): added a new field -
14992         shadow_serial to hold the serial number used in generation of
14993         shadow-copy directories. This is to make sure that the directory
14994         name is unique for each and every domain created. We avoid a race
14995         condition with overriding assemblies already in use by other app
14996         domains.
14998 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
15000         * class.c (mono_bounded_array_class_get): fixed memory leak when 
15001         binding generic parameters.
15003 2007-07-24  Raja R Harinath  <rharinath@novell.com>
15005         * metadata.c (do_mono_metadata_parse_generic_class): Use
15006         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
15007         error.
15009 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
15011         * loader.c, class-internals.h, reflection.c: removed the per-method
15012         generics hashtable: we use the global one through the call of
15013         mono_class_inflate_generic_method ().
15015 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
15017         * class.c, metadata.c, class-internals.h: introduce yet another
15018         generics global cache for inflated methods (fixes 98% of the perf
15019         issue in bug #81806).
15021 2007-07-23  Raja R Harinath  <rharinath@novell.com>
15023         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
15024         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
15025         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
15026         return a MonoGenericInst containing (a copy) of those types.
15027         (mono_metadata_inflate_generic_inst): Update to changes.
15028         (mono_metadata_parse_generic_inst): Likewise.
15029         (mono_get_shared_generic_inst): Likewise.
15030         * reflection.c (mono_class_bind_generic_parameters): Likewise.
15031         (mono_reflection_bind_generic_method_parameters): Likewise.
15032         * metadata-internals.h: Likewise.
15033         * icall.c (free_generic_context): Kill.
15034         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
15036         * reflection.c (reflection_methodbuilder_to_mono_method): Use
15037         mono_metadata_type_dup.
15038         * marshal.c (mono_mb_create_method): Likewise.
15040         * metadata.c (mono_metadata_type_dup): Rename from
15041         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
15042         MonoImage.  Handle a few more cases, esp. when no mempool is given.
15043         * marshal.c, metadata-internals.h: Update to changes.
15045 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
15047         * class.c: fixed a small leak for array classes and removed warning.
15049 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
15051         * loader.c (mono_method_get_param_token): Make this work on generic methods.
15052         Return 0x8000000 for return parameters. Fixes #82161.
15054 2007-07-21  Marek Habersack  <grendello@gmail.com>
15056         * appdomain.c (get_shadow_assembly_location): append the current
15057         ticks value to the path. Avoids overwriting the same assemblies by
15058         several threads at the same time.
15060 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
15061         and Raja R Harinath  <rharinath@novell.com>
15063         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
15064         Simplify slightly.
15065         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
15066         property for testing if a method is a generic method definition.
15068 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
15070         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
15072 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
15074         * verify.c: used function from private branch, reverted to the one in class.h 
15076 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
15078         * verify.c: a typo slipped in and the code wont compile
15080 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
15082         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
15083         disabled box instruction as it is doing the wrong thing
15084         improved stack dump messages, now it is easier to debug type related issues
15087 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
15089         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
15091 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
15093         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
15094         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
15095         grouped with class and valuetype. This change will simply 
15096         the code as it should be handled just like unmanaged pointers.
15098 2007-07-19  Mark Probst  <mark.probst@gmail.com>
15100         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
15102 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
15104         * verify.c: several stack merge issues fixed, reference comparisons now
15105         check the type size. strict type check now works correctly.
15106         added more uses of IS_MANAGED_POINTER macro.
15107         fixed issues pointed by running the test suite against .net.
15108         
15110 2007-07-19  Mark Probst  <mark.probst@gmail.com>
15112         * class.c, loader.c, class-internals.h: Removed the
15113         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
15114         defines.
15116         * icall.c: Better error checking in some internal reflection
15117         methods.
15119 2007-07-18  William Holmes  <billholmes54@gmail.com>
15121         * filewatcher.c : removed unused variable 'filename' in 
15122           ves_icall_System_IO_FSW_SupportsFSW
15124 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
15126         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
15127         obsolete, removed.
15129 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
15131         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
15132         
15133         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
15135 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
15137         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
15138         Implement generics support.
15139         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
15141         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
15142         type_args and method_args arguments.
15143         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
15144         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
15145         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
15147 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
15149         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
15150           It adds a rootimage parameter to mono_reflection_get_type_internal,
15151           adds new function mono_reflection_get_type_with_rootimage and use
15152           the rootimage to resolve the types instead of the current image
15154 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
15156         * culture-info-table.h: Forgot to update after r78304.
15158 2007-07-13  Raja R Harinath  <rharinath@novell.com>
15160         * class.c (mono_class_is_open_constructed_type)
15161         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
15163 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
15165         * class.c (mono_bounded_array_class_get):  method fails if used with
15166         an incomplete TypeBuilder enum (no basetype field), fixed it by 
15167         avoiding calculating the size for such array as it cannot be instantiated.
15168         Fix bug #82015
15170 2007-07-12  Raja R Harinath  <rharinath@novell.com>
15172         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
15173         field.
15174         * metadata.c, reflection.c: Update to changes.
15176 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
15178         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
15179         mono_class_is_valid_enum, they are used to valide a enum when loading.
15180         * reflection.c: used new functions to throw TypeLoadException when and
15181         invalid enum is build with TypeBuilder. Fixes #82018
15182   
15183 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
15185         * object.c: forgot commit of mono_class_setup_methods () to access
15186         iface->methods.
15187         * object-internals.h: added a few more handy fields to
15188         MonoIMTCheckItem.
15190 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
15192         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
15193         iface->methods.
15195 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
15197         * class-internals.h, object-internals.h, object.c: IMT-based
15198         interface invocation core from Massimiliano Mantione
15199         (massi@ximian.com) with a reworked arch-specific interface,
15200         bsearch implementation and a few bugfixes and memory savings by me.
15202 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
15204         * class.c (mono_class_create_from_typedef): mono would segfault if 
15205         an enum did not have a __value field. It now throws a TypeLoadException
15206         for such cases. Fix bug #82022
15208 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
15210         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
15212 2007-07-09  Mark Probst  <mark.probst@gmail.com>
15214         * class.c (mono_class_init): If a class is already inited but has
15215         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
15217 2007-07-09  Mark Probst  <mark.probst@gmail.com>
15219         * class.c: Properly handle the case of an unimplemented interface
15220         method.  Fixes: 81673.
15222 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
15224         * class-internals.h, object.c: cleanup patch from massi: use
15225         MonoVTable->interface_bitmap since the vtable interfaces offset array
15226         is going away.
15228 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
15230         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
15231         GetMDStreamVersion icall instead.
15233 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
15235         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
15236         not use mono_dl_build_path() with a full library name: makes
15237         fallbacks to libgaim and libfam work.
15239 2007-07-06  William Holmes  <billholmes54@gmail.com>
15241         * assembly.c: Added a continue statement in probe_for_partial_name when
15242          parse_assembly_directory_name fails.  Fixes : 82002
15244 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
15246         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
15247         and added a verification  for TYPEDBYREF.
15248         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
15249         make native int interchangeable with int32 and some small cleanup and formating.
15250         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
15251         handle byref of byref.
15252         * verify.c (push_local): handle byref of byref.
15253         * verify.c (do_binop): invalid mix of values is unverifiable
15254         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
15255         added visibility checks
15256         * verify.c (field related method): added visibility checks
15257         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
15259 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
15261         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
15262         string.
15264 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
15266         * profiler.c (mono_profiler_load): Fix an off-by-one error.
15268         * marshal.c (emit_marshal_string): When returning a string from managed code,
15269         allways make a copy even for unicode strings. Fixes #81990.
15271 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
15273         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
15274         of byref generic inst types (bug #81997).
15276 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
15278         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
15279         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
15281 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
15283         * marshal.c (emit_marshal_string): Add support for unicode strings in
15284         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
15286 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
15288         * verify.c: field load/store are now verified, missing only access checks now
15290 2007-06-28  Martin Baulig  <martin@ximian.com>
15292         * mono-debug.c (mono_debug_debugger_version): New public variable.
15294 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
15296         * locales.c: When constructing DateTimeFormat or NumberFormat for
15297         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
15298         MonoCultureInfo contructed from the current locale is always
15299         read-only and has UseUserOverride set to true. All MonoCultureInfo
15300         instances returned for GetCultures have both IsReadOnly and
15301         UseUserOverride set to true. Fixes part of bug #81930.
15303 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
15305        * icall-def.h: Update System.__ComObject icalls
15306        * marshal.c: Avoid managed transition (and object creation)
15307        when looking up COM interface in RCW.
15308        * marshal.h: Ditto.
15309        
15310        Code is contributed under MIT/X11 license.
15312 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
15314         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
15315         to avoid crashes during assembly unloading.
15317 2007-06-22  Raja R Harinath  <rharinath@novell.com>
15319         Fix MethodInfo.IsGenericMethodDefinition
15320         * reflection.c (mono_reflection_bind_generic_method_parameters):
15321         Rearrange code to ensure we always uses a generic method definition.
15322         * class.c (mono_class_inflate_generic_method_full): Set
15323         'generic_container' field only for generic method definitions.
15324         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
15325         Use presense of 'generic_container' field as indication of being a
15326         generic method definition.
15328 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
15330         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15332         * object-internals.h: Reflect changes in the layout of the managed Delegate
15333         class.
15334         
15335         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
15336         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
15337         runtime memory used by the dynamic method. Fixes #77146.
15339 2007-06-21  Dick Porter  <dick@ximian.com>
15341         * file-io.h: 
15342         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
15343         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
15344         81767.
15346 2007-06-21  Raja R Harinath  <rharinath@novell.com>
15348         * reflection.c (method_encode_methodspec): Add a tripwire.
15349         * class.c (inflate_generic_type): The fully open generic type is
15350         not the same as the generic type definition.
15352 2007-06-21  Martin Baulig  <martin@ximian.com>
15354         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
15356         * mono-debug-debugger.h
15357         (MonoDebuggerBreakpointInfo): Removed.
15358         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
15359         (mono_debugger_remove_breakpoint): Likewise.
15360         (mono_debugger_breakpoint_callback): Likewise.
15361         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
15363 2007-06-21  Raja R Harinath  <rharinath@novell.com>
15365         * metadata.c (mono_metadata_lookup_generic_class): The fully open
15366         generic type is not the same as the generic type definition.
15367         * class.c (mono_generic_class_get_class): Likewise.
15369 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
15371         * icall.c: The second argument to 
15372         System.Reflection.MethodBase.GetMethodFromHandleInternalType
15373         is a MonoType not a MonoClass.
15375 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
15377         * verify.c: support for function pointers in the verifier
15379 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
15381         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
15383 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
15385         * assembly.c: removed Mono.Data.SqliteClient from the list of
15386         forward-compatible assemblies as it breaks the ABI (bug #81899).
15388 2007-06-19  Raja R Harinath  <rharinath@novell.com>
15390         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
15391         lookup/update with the loader lock.
15392         * reflection.c (mono_class_bind_generic_parameters): No need to
15393         protect mono_metadata_lookup_* with the loader lock.
15394         * class.c (inflate_generic_type): Likewise.
15395         
15396         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
15397         on a generic instantiated type.
15399 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
15401         *verify.c: produce meanfull error messages on verification error
15402         *verify.c: fixed some cases of verification errors reported as validation errors
15403         *pedump.c: fixed the error name array, now it shows validation errors properly
15404         *verify.h: fixed the contant that should be used for verification errors
15406 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
15408         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
15409         for bug #77596, 81858 and 80743 (generics data structures on domain
15410         unload).
15412 2007-06-15  Raja R Harinath  <rharinath@novell.com>
15414         Avoid allocating 'MonoGenericContext' on the heap.
15415         * class-internals (_MonoMethodInflated::context): Make field
15416         inline, not a pointer.
15417         * loader.c (method_from_methodspec): Allocate 'new_context' on the
15418         stack.  Use the context embedded within the inflated method as the
15419         hash key, rather than 'new_context'.
15420         * class.c (inflate_generic_context): Simplify.  Return a struct
15421         rather than allocating on the heap.
15422         (mono_class_inflate_generic_method_full): Update to changes.  Now,
15423         doesn't salt away a copy of the context -- simplifying the
15424         lifetime rules of a 'MonoGenericContext *'.
15425         (mono_method_get_context): Return pointer to embedded context.
15426         (setup_generic_array_ifaces): Allocate temporary context on stack.
15427         * reflection.c (inflate_mono_method): Likewise.
15428         (mono_reflection_bind_generic_method_parameters): Likewise.
15429         Use the context embedded within the inflated method as the hash key.
15431         Avoid a source of allocation of 'MonoGenericContext'.
15432         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
15433         and 'cached_context' fields into embedded 'MonoGenericContext' field.
15434         * class.c: Update to changes.
15435         (mono_generic_class_get_context): Simplify drastically.  Now just
15436         returns a pointer to the field.
15437         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
15438         argument as a const pointer.
15439         (mono_metadata_generic_context_equal): Likewise.
15440         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
15441         Update to changes.
15443 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
15445         * verify.c improved the handling of brtrue/brfalse, factored out common code
15447 2007-06-14  Raja R Harinath  <rharinath@novell.com>
15449         Kill MonoGenericMethod.
15450         * class-internals.h (MonoGenericContext::method_inst): Rename from
15451         'gmethod' and convert to a MonoGenericInst.
15452         (MonoGenericMethod): Remove.
15453         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
15454         * loader.c (method_from_methodspec): Update to changes.  Use a
15455         MonoGenericContext as the key to the hashtable.
15456         * metadata.c (mono_metadata_generic_context_equal): Rename from 
15457         'mono_metadata_generic_method_equal' and take MonoGenericContext.
15458         (mono_metadata_generic_context_hash): Likewise from
15459         'mono_metadata_generic_method_hash'.  Change hash function.
15460         (mono_metadata_load_generic_params): Update to changes.
15461         (mono_get_shared_generic_method): Remove.
15462         * metadata-internals.h (mono_get_shared_generic_method): Remove.
15463         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
15464         (inflate_generic_context): Likewise.
15465         (mono_class_inflate_generic_method_full): Likewise.
15466         (setup_generic_array_ifaces): Likewise.
15467         (mono_class_create_from_typespec): Likewise.
15468         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
15469         (method_encode_methodspec): Update callsite.
15470         (reflection_methodbuilder_to_mono_method): Update to changes.
15471         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
15472         MonoGenericContext as the key to the hashtable.
15473         (inflate_mono_method): Update to changes.
15475         * class-internals.h (MonoGenericMethod::container): Remove.
15476         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
15478 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
15480         * profiler-private.h, profiler.c, profiler.h: added API to profile
15481         exception events.
15483 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
15485         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
15487 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
15489         * verify.c: method invocation is now validated, now we verify parameter types on stack.
15490         Fixed overflow and underflow not aborting the verification process.
15492 2007-06-13  Mark Probst  <mark.probst@gmail.com>
15494         * class-internals.h (MonoStats): Added stats entries for dynamic
15495         code allocations.
15497 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
15499         * loader.c (mono_free_method): Free header->locals and header->clauses.
15501         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
15502         dynamic case.
15504         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
15506         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
15508 2007-06-12  Raja R Harinath  <rharinath@novell.com>
15510         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
15511         the tables.
15513 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
15515         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
15517 2007-06-11  Raja R Harinath  <harinath@gmail.com>
15519         MonoGenericMethod on a diet
15520         * class-internals.h (_MonoMethodInflated::reflection_info): Move
15521         here ...
15522         (_MonoGenericMethod::reflection_info): ... from here.
15523         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
15524         Update to changes.
15525         * reflection.c (inflate_mono_method): Likewise.
15526         (mono_reflection_bind_generic_method_parameters): Likewise.
15528 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
15530         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
15531         *verify.c: factored long ldarg forms to share code with short forms
15533 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
15535         *verify.c: fixed code formating factored some duplicate code
15536         into a new function
15538         *verify.h: fixed binary incompatibility introduced earlier
15540         *pedump.c: fixed formating
15542 2007-06-11  Raja R Harinath  <harinath@gmail.com>
15544         Fix assertion when disassembling Mono.C5.dll
15545         * loader.c (method_from_methodspec): Avoid inflating a method
15546         twice with the same context.  If the methodref is inflated, use
15547         the declaring method instead.
15549         * class.c (mono_class_from_generic_parameter): Fix case similar to
15550         bug #81830 handled below, but for method containers.
15552 2007-06-10  Raja R Harinath  <harinath@gmail.com>
15554         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
15555         get_shared_generic_class.  Directly inflate the instance.
15556         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
15557         (inflate_generic_class): Delete.
15558         (get_shared_generic_class): Delete.  Move setting of
15559         'cached_class' and 'cached_context' ...
15560         * metadata.c (mono_metadata_lookup_generic_class): ... here.
15562         * metadata.c (mono_metadata_lookup_generic_class): Change
15563         signature to take the components of a MonoGenericClass rather than
15564         an allocated MonoGenericClass.  Change semantics to be intern-like.
15565         * reflection.c (mono_class_bind_generic_parameters): Update to
15566         changes.  Make locking region tighter.
15567         * class.c (inflate_generic_class): Update to changes.
15568         (get_shared_generic_class): Likewise.
15569         * metadata-internals.h: Likewise.
15571         * reflection.c (mono_class_bind_generic_parameters): Take and
15572         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
15573         (mono_reflection_bind_generic_parameters): Use
15574         'mono_class_bind_generic_parameters' rather than duplicate the code.
15575         * class.c (mono_bounded_array_class_get): Update to changes.
15576         * object-internals.h: Likewise.
15578         * reflection.c (mono_class_bind_generic_parameters): Only support
15579         parameterizing generic type definitions.  Remove support for other
15580         open types.
15582 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
15584         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
15586         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
15587         in the dynamic case.
15589 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
15591         * threads.c: When cleaning up thread, reset the Background bit.
15592         Fixes bug #81720.
15594 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
15596        * metadata.c: Move variable declarations to top of scope.
15597        * verify.c: Move variable declarations to top of scope.
15599        Code is contributed under MIT/X11 license.
15601 2007-06-08  Raja R Harinath  <rharinath@novell.com>
15603         * reflection.c (mono_class_bind_generic_parameters): Replace
15604         open-coded loop with mono_metadata_inflate_generic_inst.
15606         * class.c (get_shared_generic_class): Don't call
15607         mono_get_shared_generic_inst.  Use the container's own
15608         'class_inst'.
15610         * metadata.c (mono_metadata_load_generic_params): Move
15611         initialization of 'context' field here from ...
15612         * class.c (mono_class_create_from_typedef): ... here, and ...
15613         * loader.c (mono_get_method_from_token): ... here.
15615         * class.c (get_shared_generic_class): Rename from
15616         mono_get_shared_generic_class and make static.
15617         (mono_get_shared_generic_inst): Move to metadata.c.
15618         * loader.c (mono_get_shared_generic_method): Likewise.
15619         * class-internals.h, metadata-internals.h: Update to changes.
15621         Fix #81830
15622         * class.c (mono_class_from_generic_parameter): Don't assume a
15623         generic container owner exists.  Generic containers from monodis
15624         don't have any.
15626 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
15628         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
15629         * verify.h: new typedefs to returns the non-verifiable status
15630         * verify.c: initial implementation of generics, stack merging and object compatibility check
15632 2007-06-06  Mark Probst  <mark.probst@gmail.com>
15634         * class.c, image.c, class-internals.h (MonoImage): class_cache is
15635         a MonoInternalHashTable again (fixed bug in internal hash table
15636         code).
15638 2007-06-06  Mark Probst  <mark.probst@gmail.com>
15640         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
15641         MonoInternalHashTable again (fixed bug in internal hash table
15642         code).
15644 2007-06-06  Mark Probst  <mark.probst@gmail.com>
15646         * class.c, image.c, class-internals.h, domain.c,
15647         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
15648         changes.  Have to figure out what makes them break the SWF
15649         regression.
15651 2007-06-04  Mark Probst  <mark.probst@gmail.com>
15653         * class.c, image.c, class-internals.h (MonoImage): class_cache is
15654         a MonoInternalHashTable now.
15656 2007-06-04  Mark Probst  <mark.probst@gmail.com>
15658         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
15659         MonoInternalHashTable now.
15661 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
15663         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
15664         invoke_impl code.
15666         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
15668         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
15669         dependent trampoline.
15671         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15673         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
15675 2007-05-29  Robert Jordan  <robertj@gmx.net>
15677         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
15679 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
15681         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
15683 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
15685        * marshal.c: Fix interface lookup loops for
15686        cominterop_get_com_slot_for_method and 
15687        cominterop_get_method_interface. Only need to lookup
15688        if type is a class, else use interface type method is on.
15690        Code is contributed under MIT/X11 license.
15692 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
15694         * reflection.c: HasSecurity can be present even if no specially 
15695         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
15696         SecurityAttribute). Fix CAS regression tests on buildbot.
15698 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
15700        * appdomain.c: Add configure checks for header files.
15701        * image.c: Add configure checks for header files.
15702        * file-io.c: Add configure checks for header files.
15703        * debug-mono-symfile.c: Add configure checks for header files.
15704        * threadpool.c: Add configure checks for header files.
15705        * console-io.c: Add configure checks for header files.
15706        * profiler.c: Add configure checks for header files.
15707        * rawbuffer.c: Add configure checks for header files.
15708        * icall.c: Add configure checks for header files.
15709        * rand.c: Add configure checks for header files.
15710        * socket-io.c: Add configure checks for header files.
15712        Code is contributed under MIT/X11 license.
15714 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
15716         * reflection.c (mono_custom_attrs_from_builders): Remove the 
15717         assertion as it breaks the build.
15718         
15719         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
15721         * reflection.c (lookup_custom_attr): Make a copy here too.
15723         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
15724         dynamic images.
15726         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
15727         images.
15729         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
15730         info.
15732 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
15734         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
15735         (load_cattr_value): Ditto.
15737 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
15739         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
15741 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
15743         * threads.c: In "start_wrapper", set apartment_state to MTA if
15744         apartment_state is Unknown and we're running on 2.0 profile or
15745         higher.
15746         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
15747         to main method, then set apartment_state to Unknown on 1.0 profile,
15748         and MTA on 2.0 profile.
15750 2007-05-16  Jb Evain  <jb@nurv.fr>
15752         * class-internals.h (MonoDefaults): Add an attribute_class and
15753           customattribute_data_class.
15754         * domain.c (mono_init_internal): Populate them.
15755         * reflection.c: Use them to remove duplicates. Make a vew
15756         MonoClass variables `static'.
15758 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
15760         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
15761         step in implementing IMT, so that all isinst checks now can go
15762         through the bitmap.
15763         This was needed because vtables for TransparentProxy need to look
15764         like the vtable of the "target" class, so they need to point to
15765         its interface bitmap directly.
15767         * object.c: inside "mono_class_create_runtime_vtable" and
15768         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
15770 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
15772         * object-internals.h
15773           culture-info.h : added territory field in MonoCulture and
15774           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
15775         * locales.c : fill territory field above too.
15776         * culture-info-table.h : regenerated.
15778 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
15780         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
15781         Fixes #81599.
15783 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
15785         * object.c: Always initialize apartment, even if 
15786         there is no custom attributes on entry point.
15787         
15788         Code is contributed under MIT/X11 license.
15790 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
15792         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
15793         * metadata.c: If no encoding is set, check for unicode
15794         on class.
15795         
15796         Code is contributed under MIT/X11 license.
15798 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
15800         * threads.c: Handle if mono_thread_current returns NULL 
15801         
15802         Code is contributed under MIT/X11 license.
15804 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
15806         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
15807         in start_wrapper. Added mono_thread_init_apartment_state and
15808         mono_thread_cleanup_apartment_state.
15809         * object.c: Initialize thread apartment state on main thread
15810         by checking for STAThreadAttribute on entry point.
15811         * object-internals.h: Add apartment_state field to MonoThread.
15812         * threads-types.h: Add unmanaged definition of 
15813         System.Threading.ApartmentState, MonoThreadApartmentState.
15814         
15815         Code is contributed under MIT/X11 license.
15816         
15817 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
15819         * class.c: Fix windows build.
15820         * class-internals.h: Fix windows build.
15821         
15822         Code is contributed under MIT/X11 license.
15824 2007-05-08  Robert Jordan  <robertj@gmx.net>
15826         * process.c (CreateProcess_internal):
15827         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
15828         .CreateNoWindow was specified. Fixes #81496.
15830 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
15832         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
15833         step in implementing IMT, replaced it with two compact arrays
15834         (interfaces_packed and interface_offsets_packed) and a bitmap that
15835         is used for isinst checks (interface_bitmap).
15837         * class.c: (compare_interface_ids): compare function to pass to
15838         bsearch when looking for an interface with a given id.
15839         (mono_class_interface_offset): reimplemented using bsearch on
15840         interfaces_packed, getting the offset from interface_offsets_packed.
15841         (print_implemented_interfaces): utility debugging function.
15842         (setup_interface_offsets): reworked to initialize interfaces_packed,
15843         interface_offsets_packed and interface_bitmap.
15845         * object.c: replaced all accesses to "MonoClass.interface_offsets"
15846         with uses of interfaces_packed and interface_offsets_packed.
15848 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
15850         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
15851         mono_class_interface_offset prototype to wrap all accesses to
15852         "MonoClass.interface_offsets".
15854         * class.c: Implemented mono_class_interface_offset, and wrapped all
15855         accesses to "MonoClass.interface_offsets".
15857         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
15858         "MonoClass.interface_offsets".
15860 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
15862         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
15863         GetMethodFromHandle overloads (bug #78637).
15865 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
15867         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
15868         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
15870 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
15872         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
15873         #81498.
15875         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
15876         gracefully.
15877         (mono_custom_attrs_from_index): Ditto.
15879         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
15880         Fixes #81501.
15882 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
15884         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
15885         is now allocated from a mempool.
15887 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
15889         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
15890         caller holds threads_lock, leading to deadlocks. Fixes #81476.
15892 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
15894         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
15895         mono_loader_clear_error () too late. Fixes #81463.
15897 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
15899         * culture-info-table.h : regenerated.
15901 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
15903         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
15904         is missing.
15906 2007-04-25  Dick Porter  <dick@ximian.com>
15908         * Makefile.am: Put the mingw enforced-optimisation back into the
15909         PLATFORM_WIN32 section.
15911 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
15913         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
15914         patch.
15916         * image.c (mono_image_load_module): New API function to load a module reference.
15918         * image.c (load_modules): Load modules lazily. Fixes #80812.
15920         * class.c (mono_class_from_typeref): Use mono_image_load_module.
15921         
15922         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
15924         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
15925         to mono_image_load_module_dynamic.
15927 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
15929         * marshal.c: Fix calling convention for CCW on non-windows
15930         platforms. STDCALL on windows, CDECL everywhere else to work 
15931         with XPCOM and MainWin COM.
15932         
15933         Code is contributed under MIT/X11 license.
15935 2007-04-23  Martin Baulig  <martin@ximian.com>
15937         Fix #80969.
15939         * loader.c
15940         (method_from_memberref): Added `gboolean *used_context' argument.
15941         (mono_get_method_from_token): Likewise.
15942         (mono_get_method_full): Don't insert the method in the cache when
15943         `used_context' is true.
15945 2007-04-23  Raja R Harinath  <rharinath@novell.com>
15947         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
15949         * reflection.c (mono_reflection_bind_generic_parameters): Don't
15950         create new MonoTypes for returned types.
15951         * class.c (mono_generic_class_get_class): Export mono-internal.
15952         * class-internals.h: Update to changes.
15954 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
15956         * threadpool.c, threadpool.h, icall-def.h: patch from
15957         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
15959 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
15961         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
15962         
15963         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
15965         * threads.c (mono_thread_get_stack_bounds): New helper function.
15967         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
15968         Correctly compute stack bounds when attaching. Fixes #81394.
15970 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
15972         * reflection.c: fix handling of doubles in custom attributes
15973         for the arm-fpa format (bug #81368).
15975 2007-04-18  Raja R Harinath  <rharinath@novell.com>
15977         * reflection.c (assembly_add_win32_resources): Mildly relax an
15978         bounds check to let the end pointer point just past the end of the
15979         allocated buffer.  (may fix #81384)
15981 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
15983         * culture-info-table.h : regenerated.
15985 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
15987         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
15988         the thread is aborted early.
15990 2007-04-05  Dick Porter  <dick@ximian.com>
15992         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
15993         FindFirstFile()/FindNextFile() to find entries.  This lets the
15994         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
15995         81038.
15997         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
15998         the parameters of
15999         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
16001 2007-04-04  Martin Baulig  <martin@ximian.com>
16003         * debug-helpers.c
16004         (mono_method_desc_full_match): Add support for nested classes.
16006 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
16008         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
16010 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
16012         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
16013         waiting for too many threads.
16015 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
16017         * environment.c: Fix return value check on uname so we can get the 
16018         executing version on Solaris operating systems.
16020 2007-03-28  Jb Evain  <jbevain@gmail.com>
16022         * class.c (mono_type_get_name_recurse): Complete the
16023         fix for the creation of assembly qualified names for
16024         pointer types. Fixes #81208.
16026 2007-03-27  Dick Porter  <dick@ximian.com>
16028         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
16029         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
16030         changed.
16032         * threads.c
16033         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
16034         the value of ReleaseMutex().
16036 2007-03-27  Dick Porter  <dick@ximian.com>
16038         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
16039         in little-endian order, not network endian, so must be converted
16040         to host endian here.  Fixes bug 80593.
16042 2007-03-22  Jb Evain  <jbevain@gmail.com>
16044         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
16045         qualified names for pointer types. Fixes #81208.
16047 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
16049         * marshal.c: Add support for PreserveSigAttribute. 
16050         
16051         Code is contributed under MIT/X11 license.
16053 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
16055         * process.c: Fix endianness issues. Fixes #81126.
16057         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
16058         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
16060         * image.c (mono_image_lookup_resource): Make this work on big-endian
16061         machines.Change API contract so the caller needs to free the return value.
16062         
16063         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
16064         API change.
16065         
16066 2007-03-14  Martin Baulig  <martin@ximian.com>
16068         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
16069         mono_type_get_desc() as well.
16071 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
16073         * icall.c:  Fix environ access in VS.  
16074         
16075 2007-03-13  Alp Toker  <alp@atoker.com>
16077         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
16078         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
16079         #63841.
16081 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
16083         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
16084         circular references among dynamic methods. Fixes #81091.
16086         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
16088 2007-03-09  Martin Baulig  <martin@ximian.com>
16090         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
16092 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
16094         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
16095         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
16096         
16097         Code is contributed under MIT/X11 license.
16098         
16099 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
16101         * loader.c: Reapply patch for bug #79424.
16103 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
16105         * metadata.c (mono_type_to_unmanaged): Only convert object to
16106         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
16108 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
16110         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
16111         (and incorrectly set) is_reference field from MonoGenericInst.
16113 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
16115         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
16116         a little earlier.
16118         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
16120         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
16122 2007-03-05  Miguel de Icaza  <miguel@novell.com>
16124         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
16125         FileOptions.1 value to mean "temporary", map that to
16126         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
16128         Fixes 80688
16130 2007-03-03  Marek Habersack  <mhabersack@novell.com>
16132         * appdomain.c: implement MS .Net style shadow copying. Copies of
16133         the assemblies are made in a subdirectory of the dynamic base
16134         directory, the assembly names are preserved.
16135         Copy .mdb and .config files along with the assemblies being shadowed.
16137 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
16139         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
16140         (emit_marshal_handleref): Ditto.
16142         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
16143         on Visual C++. Fixes #80671.
16145 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
16147         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
16148         for clone operations.
16150 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
16152         * marshal.c: Fix warnings.
16154 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
16156         * loader.c: allow case-insensitive matching of the dll name
16157         in dllmap handling when prefixed with "i:".
16159 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
16161         * threads.c: Fix #ifdef for dummy_apc function for VS.
16163 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
16165         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
16167 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
16168         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
16169         giving precedence to the methods with a fully qualified name
16170         (InterfaceName.MethodName) when building the interface sections
16171         of the vtable.
16173 2007-02-16  Dick Porter  <dick@ximian.com>
16175         * threadpool.c (append_job): Fix fast-path array handling, so it's
16176         less likely the array will grow exponentially when the load is
16177         heavy.
16179 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
16181         * metadata-internals.h, loader.c: fix dllmap lookup order
16182         for non-function maps, too, and prepare for fallback code.
16184 2007-02-12  Robert Jordan  <robertj@gmx.net>
16186         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
16187         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
16188         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
16189         GlobalFree. Fixes a part of bug #77075.
16191 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
16193         * loader.c: implemented typedef parent in field memberref.
16195 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
16197         * marshal.c: Fix warnings and remember to call Release on
16198         IUnknown of RCW.
16199         
16200         Code is contributed under MIT/X11 license.
16202 2007-02-10  Miguel de Icaza  <miguel@novell.com>
16204         * class-internals.h: Add MonoHandleRef definition, and
16205         handleref_class to mono_defaults. 
16207         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
16208         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
16210         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
16211         (do nothing on this stage)
16212         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
16213         (emit_marshal_handleref): New method, used for argument handling
16214         of HandleRefs. 
16216 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
16218         * class.c (mono_class_setup_parent): Lazily init com types.
16219         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
16220         init com types.
16221         * object.c (mono_remote_class_vtable): Lazily init com types.
16222         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
16223         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
16224         * domain-internals.h: Expose mono_init_com_types.
16225         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
16226         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
16227         Add support for COM Callable Wrapper marshalling.
16228         * marshal.h: Add icall definitions.
16229         * gc.c: Handle freeing of CCWs in finalizer code.
16230         
16231         Code is contributed under MIT/X11 license.
16233 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
16235         * reflection.c: changed all the signature encoding code to use
16236         a variable-sized buffer.
16238 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
16240         * marshal.c: locking fixes: never take the loader lock
16241         or other runtime locks when holding the marshal lock
16242         (fixes bug#80664).
16244 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
16246         * marshal.c: make the delegate function pointer mapping
16247         work for the moving GC.
16249 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
16251         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
16252         for bug #80618.
16254 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
16256         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
16257         gmodule.
16259 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
16261         * threadpool.c: made the code moving-GC safe.
16263 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
16265         * assembly.c, boehm-gc.c, class-internals.h, class.c,
16266         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
16267         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
16268         warning cleanup.
16269         * reflection.c: warning cleanup, some threading and moving GC fixes.
16271 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
16273         * class.c, loader.c: create the needed Set/Get/Address array methods
16274         as well as the .ctors in mono_class_init (), fixes bug #80567.
16276 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
16278         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
16279         we doesn't decrease its alignment. Should fix the sparc build.
16281 2007-01-24  Dick Porter  <dick@ximian.com>
16283         * socket-io.c
16284         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
16285         Create the returned object if we need to ignore an unsupported
16286         socket option.  Fixes a segfault reported by Atsushi.
16288 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
16290         * class.c, object.c: restrict GC-tracked fields to
16291         UIntPtr fields used inside corlib, so we provide better
16292         type info to the GC and also allow broken packing as in
16293         bug #80580.
16295 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
16297         * sgen-gc.c: removed duplicated function.
16299 2007-01-19  Miguel de Icaza  <miguel@novell.com>
16301         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
16302         value that means that the value is not supported, but that we
16303         should not return a failure, but instead report this as a
16304         successful operation.
16306 2007-01-19  Raja R Harinath  <rharinath@novell.com>
16308         Fix tests/bug79956.2.il
16309         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
16310         (mono_generic_class_get_class): If the generic definition in an
16311         enum, copy over other fields related to it.
16313 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
16315         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
16316         genericinst enums (bug #79215).
16318 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
16319         * class.c: Fix bug 80307.
16321 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
16323         * image.c: if the file table is not present, try to load
16324         all the modules, since we don't have info about them
16325         having or not metadata (bug #80517).
16326         * assembly.c: allow mono_assembly_load_references () to
16327         work for netmodules.
16329 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
16331         * image.c, metadata-internals.h, object.c: execute module
16332         cctors when running on the 2 runtime if present (bug #80487).
16334 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
16336         * icall.c: optimized InitializeArray() on bigendian.
16338 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
16340         * icall.c: fix for the broken ARM FPA double format.
16342 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
16344         * icall.c: handle endian issues for r4 and r8 types, too, in
16345         the InitializeArray() icall.
16347 2007-01-15  Miguel de Icaza  <miguel@novell.com>
16349         * loader.c (mono_loader_error_prepare_exception): Clear the error
16350         once we have extracted the information from it, do this before we
16351         call into the JIT's class loading mechanisms.
16353         * object.c (mono_class_create_runtime_vtable): Do not clear the
16354         loader error before calling mono_class_get_exception_for_failure
16355         as the loader error is needed inside
16356         mono_class_get_exception_for_failure to throw the error (thinko).
16358         Fixes #80521
16359         
16360 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
16362         * reflection.c: align fields rva data so it's faster to load at
16363         runtime.
16365 2007-01-12  Raja R Harinath  <rharinath@novell.com>
16367         Prepare to simplify GenericMethod handling.
16368         * class-internals.h (mono_method_get_context): New accessor function.
16369         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
16370         rather than directly accessing '->context' field.
16372         * class-internals.h (_MonoGenericParam.method): Move ...
16373         (_MonoGenericContainer): ... here.  Add into union with klass field.
16374         * class.c, icall.c, loader.c, metadata.c, reflection.c:
16375         Update to changes.
16377 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
16379         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
16380         the wrapper type enum and reduce relocations.
16382 2007-01-12  Raja R Harinath  <rharinath@novell.com>
16384         * reflection.c (inflate_mono_method): Reuse method instantiation
16385         from the generic method, if available.
16387 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
16389         * marshal.c (emit_marshal_variant): Fix conv_arg
16390         type in last commit, based on whether parameter is byref.
16391         
16392 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
16394         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
16395         marshalling.
16396         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
16397         MONO_TYPE_OBJECT back for VARIANT support.
16399 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
16401         * marshal.c, marshal.h, icall-def.h: Implement 
16402         Marshal.ReAllocCoTaskMem.
16404 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
16406         * marshal.c: memory retention fixes: use the proper
16407         image cache for runtime_invoke method lookups.
16409 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
16411         * mempool.c: added code to help debug mempool allocations.
16413 2007-01-11  Dick Porter  <dick@ximian.com>
16415         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
16416         support (experimenting with faking it with IP_MTU_DISCOVER for
16417         systems that don't have IP_DONTFRAGMENT.)
16418         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
16419         icall.
16421         * icall-def.h: new System.Net.Sockets.Disconnect icall.
16423         * socket-io.h: Add new fields to MonoSocketAsyncResult
16424         corresponding to the new ones in Socket.cs.
16426 2007-01-11  Raja R Harinath  <rharinath@novell.com>
16428         Fix IronPython regression mentioned in #80249
16429         * metadata.c (do_mono_metadata_parse_generic_class): Clear
16430         'cached_context' field, since it may have been initialized as a
16431         side-effect of metadata parsing.
16433         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
16434         (_MonoGenericClass.cached_class): Move here and rename from lone
16435         remaining field of ...
16436         (_MonoInflatedGenericClass): ... this.  Remove.
16437         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
16438         to changes.
16440         Fix mcs/tests/test-128.cs regression.
16441         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
16442         2007-01-10 change below.
16443         [MONO_TYPE_OBJECT]: Recurse into array case.
16445 2007-01-11  Raja R Harinath  <harinath@gmail.com>
16447         * class-internals.h (mono_get_inflated_generic_class): Remove.
16448         * class.c (mono_get_inflated_generic_class): Remove.
16449         (mono_generic_class_get_class): Rename from
16450         mono_class_create_generic.
16451         (mono_class_from_mono_type) [GENERICINST]: Use it.
16452         * reflection.c, metadata.c: Update to changes.  Use
16453         'mono_class_from_mono_type'.
16455 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
16457         * reflection.c: use passed type when encoding an array element
16458         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
16460 2007-01-09  Robert Jordan  <robertj@gmx.net>
16462         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
16463         result arguments (someDelegate.EndInvoke (unrelatedAres)).
16464         Fixes bug #80392.
16466 2007-01-09  Raja R Harinath  <rharinath@novell.com>
16468         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
16470         * object.c (set_value): Avoid aliasing between type->data.klass
16471         and type->data.generic_class.
16473         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
16475 2007-01-08  Raja R Harinath  <rharinath@novell.com>
16477         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
16478         between type->data.klass and type->data.generic_class.
16480 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
16482         * marshal.c: In MS.NET, StringBuilder objects are not copied by
16483         value in out parameters.
16485 2007-01-08  Raja R Harinath  <rharinath@novell.com>
16487         Simplify invariant for MonoGenericClass::klass field.
16488         * class.c (mono_class_create_generic): Verify 'klass' is null.
16489         * metadata.c (do_mono_metadata_parse_generic_class): Don't
16490         initialize 'klass' field.
16492 2007-01-05  Raja R Harinath  <rharinath@novell.com>
16494         Ongoing work to avoid redundant data and simplify invariants.
16495         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
16496         'generic_class', and change type to a GenericInst.
16497         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
16498         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
16500 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
16502         * class.c : skip io-layer under PLATFORM_WIN32.
16504 2007-01-03  Tor Lillqvist  <tml@novell.com>
16506         Fix #80305: In a bundled executable, look in the bundled exe
16507         assembly to determine the runtime version. Add the possibility to
16508         bundle also the machine.config file.
16509         
16510         * assembly.c (mono_assembly_open_from_bundle): Make
16511         non-static. Allow being called even if we have no bundled
16512         assemblies, and return NULL right away in that case.
16514         * domain-internals.h: Declare mono_assembly_open_from_bundle()
16515         here.
16517         * domain.c (app_config_parse): Take an assembly exe file name as
16518         parameter instead of a config file name. Check for a bundled
16519         config file for that assembly by calling
16520         mono_config_string_for_assembly_file() (see below) before looking
16521         for one in the file system.
16522         (get_runtimes_from_exe): Corrsponding change to call of
16523         app_config_parse().
16524         (get_runtimes_from_exe): Check for bundled assembly exe file first
16525         by calling mono_assembly_open_from_bundle(). If no bundled
16526         assembly exe file is found, call mono_image_open() as before to
16527         look it up in the file system.
16529         * mono-config.c: Add variable bundled_machinec_onfig.
16530         (mono_config_string_for_assembly_file): New function.
16531         (mono_config_for_assembly): Move code snippet that looks for a
16532         bundled assembly .config file into the above new function. Call
16533         it.
16534         (mono_register_machine_config, mono_get_machine_config): New
16535         functions to set and retrieve
16537         * assembly.h: Declare mono_register_machine_config().
16539         * mono-config.h: Declare mono_get_machine_config() and
16540         mono_config_string_for_assembly_file().
16542         * icall.c: No declaration of environ necessary on Win32. It is
16543         declared (as a macro expanding to a function call) in stdlib.h.
16544         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
16545         New internal mono function. Returns the value of
16546         mono_get_machine_config() as a Mono string.
16548         * icall-def.h: Add get_bundled_machine_config().
16550 2007-01-04  Raja R Harinath  <rharinath@novell.com>
16552         Remove redundant field
16553         * class-internals.h (_MonoGenericContext.container): Remove field.
16554         * loader.c (mono_method_get_signature_full): Don't parse a
16555         "container" for a signature parse when the signature is inflated
16556         immediately.
16557         (method_from_methodspec): Likewise, for a generic_inst.
16558         * class.c, metadata.c, reflection.c: Update to changes.
16560 2006-01-04  Raja R Harinath  <rharinath@novell.com>
16562         * class-internals.h (_MonoGenericClass): Rename 'context' field to
16563         'cached_context', and change semantics -- it starts off NULL, and
16564         is initialized on demand.
16565         * class.c (mono_generic_class_get_context): New accessor to
16566         replace 'context' field accesses.
16567         (mono_class_get_context): New helper.
16568         (*): Update to changes.
16569         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
16571 2007-01-03  Miguel de Icaza  <miguel@novell.com>
16573         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
16574         before the memcpy.   Fixes Marshal2 regression.
16576 2007-01-02  Jb Evain  <jbevain@gmail.com>
16578         * blob.h: add a MONO_TYPE_ENUM definition
16579         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
16580         fix the encoding of arrays of enums in custom attributes.
16582         Fixes #79666.
16584 2007-01-01  Miguel de Icaza  <miguel@novell.com>
16586         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
16587         string is null terminated, but only cut the string short if it
16588         overflows the buffer.   
16589         
16590         (mono_string_to_byvalstr): Also fix this routine.   The code here
16591         was not properly terminating a string (it was only terminated
16592         because of the previous catch-all memset). 
16594         I left the memset, because I do not know if applications expect
16595         the runtime to clear this region. 
16597         Fixes #79944.
16599         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16600         Clear the error before returning to unmanaged code to prevent the
16601         runtime from being confused later on (fixes  80420).
16602         (ves_icall_type_from_name): Always call mono_loader_clear_error
16603         after parsing a type that could have failed.
16604         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
16606         * loader.c (mono_loader_clear_error): Fix indentation.
16608 2006-12-28  Martin Baulig  <martin@ximian.com>
16610         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
16612 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
16614         * reflection.c: patch from Rolf Bjarne Kvinge to fix
16615         getting a token for an EnumBuilder.
16617 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
16619         * reflection.c: be more careful in case resource generation
16620         fails to create the data array.
16622 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
16624         * sgen-gc.c: write barrier for clone and fix unregister handles.
16626 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
16628         * reflection.c: some fixes needed in the generics code for the moving GC.
16630 2006-12-22  Robert Jordan  <robertj@gmx.net>
16632         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
16633         account. Fixes bug #80299.
16635 2006-12-21  Raja R Harinath  <rharinath@novell.com>
16637         Fix WaitHandle usage in delegates.
16638         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
16639         * object.c (mono_wait_handle_new): Use the property set method to
16640         initialize the handle.
16641         (mono_wait_handle_get_handle): New.
16642         * threadpool.c (mono_async_invoke): Use it.
16643         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
16644         Likewise.
16645         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
16647 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
16649         * marshal.c (emit_marshal): Call emit_marshal_variant and
16650         emit_marshal_com_interface when applicable.
16651         (emit_marshal_variant, emit_marshal_com_interface): Add
16652         methods for this case and remove if's from emit_marshal_object.
16653         
16654 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
16656         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
16658 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
16660         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
16661         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
16662         and GlobalFree on Windows. Remove FIXME.
16664 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16666         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
16667         implementation for managed objects.
16669 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16671         * object.c: implemented code to be used for checking
16672         that no reference field overlaps with non-references.
16674 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16676         * threadpool.c: fix queue code to be compatible with the
16677         moving GC.
16679 2006-12-18  Miguel de Icaza  <miguel@novell.com>
16681         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
16682         in structures by throwing ArgumentNullException.
16684         (emit_marshal_safehandle): Also when they are null parameters.
16686         (emit_marshal_safehandle): Add support for ref
16687         SafeHandles parameters
16689 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16691         * profiler.c: updated to use the mono-dl API instead of
16692         gmodule.
16694 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16696         * profiler.c: updated to use the mono-dl dynamic loading
16697         API instead of gmodule.
16699 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
16701         * profiler.c: use readlink, older versions of glib don't have
16702         g_file_read_link ().
16704 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16706         * profiler.c: try to detect the path to mono if libc fails to provide
16707         a useful name (bug #80286).
16709 2006-12-16  Raja R Harinath  <rharinath@novell.com>
16711         Fix #80242
16712         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
16713         instance, use the generic type definition instead.
16714         (ves_icall_Type_GetNestedTypes): Likewise.
16715         * class.c (mono_class_create_generic): Always set the
16716         nested_classes of a generic instance to NULL, even if the generic
16717         type definition has nested types.
16719 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
16721         * marshal.c (mono_string_from_bstr): Revert previous Windows change
16722         and fix on Linux.
16723         
16724 2006-12-15  Miguel de Icaza  <miguel@novell.com>
16726         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
16727         my arguments were in the wrong order.   I also fixed the Windows
16728         version which seems to have had the same issue.
16730         (mono_free_bstr): On Unix, this is g_free.
16731         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
16732         conversions (for the tests in corlib to pass).
16734 2006-12-14  Miguel de Icaza  <miguel@novell.com>
16736         * marshal.c (emit_ptr_to_object_conv): For now, ignore
16737         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
16738         exception if a ref SafeHandle in a struct has changed).
16739         
16740         (emit_struct_conv): Do not perform layout checks for classes
16741         derived from SafeHandle, as those are specially handled. 
16743         (emit_object_to_ptr_conv): Add support for
16744         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
16746         (emit_marshal_safehandle): Implement conversion of return values
16747         of safehandles (MARSHAL_ACTION_CONV_RESULT).
16748         
16749         * threads.c: WaitHandle now is compiled with two different handles
16750         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
16751         for 2.0.
16752         
16753         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
16754         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
16755         these routines to cope with both kinds of fields.
16757 2006-12-12  Miguel de Icaza  <miguel@novell.com>
16759         * metadata.c (mono_type_to_unmanaged): Handle the case where
16760         type->data.klass is a SafeHandle, and in that case, return the
16761         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
16762         MONO_MARSHAL_CONV_SAFEHANDLE. 
16764 2006-12-11  Miguel de Icaza  <miguel@novell.com>
16766         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
16767         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
16768         calling emit_marshal_object.
16770         (emit_marshal_safehandle): Implement marshalling of
16771         SafeHandle parameters (no ref support yet).
16773         (MarshalAction): Document the defines as I implement
16774         them for SafeHandle.
16776         (emit_marshal_object): indentation police.
16778         * class-internals.h: Define MonoSafeHandle.
16779         Add safehandle_class to MonoDefaults type.
16781         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
16782         list of classes to check for fields. 
16784         * domain.c (mono_init_internal): Add SafeHandle to the list of
16785         mono_defaults loaded.
16787 2006-12-15  Raja R Harinath  <rharinath@novell.com>
16789         Fix #80253
16790         * reflection.c (mono_reflection_bind_generic_parameters): If the
16791         generic type definition is a type builder, ensure that it is fully
16792         initialized before instantiating it.  Kill some dead code.
16794 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
16796         * object.c: clear the loader_error () before loading
16797         more metadata stuff (bug #80258).
16799 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
16801         * icall.c, icall-defs.h: type modifiers icalls for
16802         parameters and properties.
16804 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
16806         * object.c, icall.c: fixed warnings.
16808 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
16810         * marshal.c: fixed a couple of leaks and coding style in a few places.
16812 2006-12-08  Dick Porter  <dick@ximian.com>
16814         * process.c: Cope with NULL ProcessStartInfo arguments on windows
16815         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
16816         80173.
16818 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16820         * process.c: ProcessStartInfo may have only filename set and
16821         arguments can be NULL.
16823 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16825         * icall.c: fix leak found by Robert Jordan.
16827 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
16829         * marshal.c, marshal.h: generate managed method to access an element
16830         of a multi-dimensional array.
16832 2006-11-30  Paolo Molaro (lupus@ximian.com)
16834         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
16836 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16838         * icall.c: back out GetFields () fix until the serialization code is
16839         fixed to not depend on the incorrect behaviour.
16841 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
16843         * profiler.c: provide defaults if none are set.
16845 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
16847         * Makefile.am, attrdefs.h: new public header file with
16848         constants for attributes for use by embedders.
16850 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
16852         * icall.c: GetFields () fix for bug #80064.
16854 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
16856         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
16857         removed long unused icalls.
16859 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
16860   
16861         * marshal.c: 
16862                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
16863                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
16864                 can be generated without a delegate class.
16865                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
16866         
16867         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
16869 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16871         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
16872         #80069.
16874 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16876         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
16877         icall-def.h: added icalls needed by System.GC.
16879 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
16881         * loader.c: ensure the class in catch clauses is handled
16882         correctly for generics methods (fixes bug#79980).
16884 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
16886         * monitor.h, monitor.c: added mono_locks_dump () function
16887         to help debug deadlocks involving managed locks.
16889 2006-11-13  Dick Porter  <dick@ximian.com>
16891         * file-io.c (get_file_attributes): If the file is a symlink try
16892         and get the stat data for the target, but also add the
16893         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
16894         the specs for the windows symlink support, but will probably have
16895         to be reworked when I have test data from a vista machine.  Fixes
16896         bug 79887.
16898 2006-11-13  Dick Porter  <dick@ximian.com>
16900         * gc.c (mono_domain_finalize): 
16901         * marshal.c (mono_delegate_begin_invoke): 
16902         * threadpool.c (socket_io_init, mono_thread_pool_init)
16903         (mono_thread_pool_finish): 
16904         * monitor.c (mono_monitor_try_enter_internal): 
16905         * threads.c (mono_thread_resume, mono_thread_init)
16906         (mono_thread_suspend_all_other_threads)
16907         (mono_thread_execute_interruption): 
16908         * appdomain.c (mono_domain_unload): Check for NULL error returns
16909         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
16910         75733.
16912 2006-11-11  Miguel de Icaza  <miguel@novell.com>
16914         * process.c
16915         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
16916         Only close the handle if the value of the handle is not
16917         INVALID_HANDLE_VALUE.  This just makes the process a bit more
16918         robust.
16920         Improvement for #75733, so that we do not run into this problem. 
16922         
16923         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
16924         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
16925         internal variables.  Fixes #79462 
16926         
16928 2006-11-09  Dick Porter  <dick@ximian.com>
16930         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
16931         Use poll() not select().  Fixes bug 79397.
16933 2006-11-09  Raja R Harinath  <rharinath@novell.com>
16935         Fix #79872
16936         * assembly.c (mono_assembly_load_from_full): Check that the given
16937         image has an assembly manifest.
16939 2006-11-09  Ankit Jain  <jankit@novell.com>
16941         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
16942         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
16943         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
16945 2006-11-07  Dick Porter  <dick@ximian.com>
16947         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
16948         Put the old resolver behaviour back for pre-2.0 profiles.
16950 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16952         * threadpool.c: precise GC and locking fixes.
16954 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
16956         * class.c: don't load types that have an explicit unaligned
16957         managed reference. Provide better info in the TypeLoad exception.
16958         Part of the fix for bug #79744.
16959         * object.c: use the correct check for class type load issues.
16961 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16963         * class.c: enforce alignment of fields with managed references
16964         even when Pack=1 is forced by the user (bug #77788).
16966 2006-11-03  Dick Porter  <dick@ximian.com>
16968         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
16969         If the address reverse lookup fails, return it as the hostname
16970         anyway.  Fixes bug 79721.
16972 2006-11-03  Dick Porter  <dick@ximian.com>
16974         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
16975         Fix build on Windows.
16977 2006-11-02  Dick Porter  <dick@ximian.com>
16979         * icall-def.h: 
16980         * object-internals.h: 
16981         * exception.c (mono_get_exception_thread_interrupted): 
16982         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
16983         Fixes bug 74525.
16985         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
16986         Check for pending Thread.Interrupt.
16988 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
16989         * loader.c: Fixed bug 79684.
16991 2006-10-27  Dick Porter  <dick@ximian.com>
16993         * file-io.c (get_file_attributes): Force symlinks to directories
16994         to be returned as a regular file.  Fixes bug 79733.
16995 2006-10-26  Dick Porter  <dick@ximian.com>
16997         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
16998         CreateFile to open a directory then we need to set the
16999         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
17001 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
17003         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
17004         friends.
17006 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
17008         * sgengc.c: small cleanup of timer code.
17010 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
17012         * sgen-gc.c: fix some warnings and start adding support for
17013         complete object removal on domain unload.
17015 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
17017         * assembly.c: build_assembly_name should not consider a version
17018         number without build or revision number invalid. Fixes bug #79715.
17020 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
17022         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
17023         call kernel32 function OutputDebugString directly.
17024         
17025         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
17026         
17027 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
17029         * reflection.c: small cleanup, using a function to insert a MonoString
17030         in the string heap.
17032 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
17034         * reflection.c: moving GC fixes.
17036 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
17038         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
17039         all the objects with finalizers belonging to an unloading appdomain.
17041 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
17043         * sgen-gc.c: added ability to allocate even when the nursery is fully
17044         pinned and fixed a couple of bugs.
17046 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
17048         * threads.h: Revert the last change for now.
17050         * threads.h (mono_thread_get_pending_exception): Rename this to
17051         mono_thread_get_undeniable_exception ().
17053 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
17055         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
17056         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
17057         when fname does not refer to valid assembly. This result in a more
17058         meaningful error message.
17059         * exception.c: added mono_get_exception_bad_image_format2 which 
17060         constructs a BadImageFormatException using the ctor taking a custom
17061         message and the file name. Passing in a NULL msg results in a default
17062         message.
17063         * exception.h: define mono_get_exception_bad_image_format2 function.
17064         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
17065         when file name pointed to an invalid IL image. Use 
17066         mono_get_exception_file_not_found2 to construct FileNotFoundException,
17067         as this results in a more meaningful error message.
17069 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
17071         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
17072         #79465.
17074 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
17076         * metadata.c (mono_type_size): Change the align parameter to guint32 for
17077         consistency with the other _size functions.
17078         (mono_type_stack_size): Ditto.
17080         * class.c object.c icall.c: Fix warnings caused by the above change.
17082         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
17084         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
17086         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
17088 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
17090         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
17091         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
17092         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
17093         threadpool.h, threads-types.h: mark more internal functions.
17095 2006-10-11  Dick Porter  <dick@ximian.com>
17097         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
17098         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
17099         reproduce the bug even before applying the fix.)
17101 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
17103         * reflection.c: allow retrieving attributes for arguments in generic
17104         methods (bug #79241).
17106 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
17108         * debug-mono-symfile.c: properly check fopen () result (found by
17109         coverity).
17111 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
17113         * reflection.c: make error message clearer and fixed two
17114         issuelets found by Coverity.
17116 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
17118         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
17120 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
17122         * object-internals.h, gc-internal.h, profiler-private.h:
17123         mark internal functions.
17125 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
17127         * reflection.c: put data in the text section.
17128         * icall.c: recognize more types in type_from_typename ().
17129         * process.c, marshal.c: added some GC FIXMEs.
17131 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
17133         * loader.c: check for NULL before initializing.
17135 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
17137         * gc.c (finalizer_thread): Use a non-alertable wait here.
17139         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
17140         until the correct solution is found.
17142 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
17144         * reflection.c (mono_module_get_object): Avoid an assert when operating on
17145         modules with no metadata. Fixes #79596.
17147         * image.c (load_metadata_ptrs): Put back the error message when
17148         the #- heap is encountered since the support is not complete yet.
17150 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
17152         * gc.c: do not allow the user to SuppressFinalize () a
17153         delegate because it would leak the trampoline if present.
17155 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
17157         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
17158         PropertyPtr table.
17160 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
17162         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
17164         * metadata.c (mono_metadata_get_param_attrs): Ditto.
17166         * row-indexes.h: Add definitions for *Ptr tables.
17168         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
17170         * metadata.c (mono_metadata_translate_token_index): New helper function to
17171         translate table indexes used in uncompressed metadata.
17172         (mono_metadata_decode_table_row): Ditto.
17173         (mono_metadata_decode_table_row_col): Ditto.
17175         * metadata.c: Add table schema for *Ptr tables.
17177         * class.c loader.c: Use the new helper function to access the affected metadata
17178         tables.
17179         
17180         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
17181         #38532.
17182         
17183 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
17185         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
17186         sequences which can be unbounded in size. Fixes #79583.
17188 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
17190         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
17191         static initialization.
17193         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
17195         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
17197         * domain.c (mono_domain_free): Free up type_init_exception_hash.
17199         * object.c (mono_runtime_class_init): Implement correct semantics when a static
17200         ctor fails, i.e. throw the same exception on subsequent accesses.
17201         
17202 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
17204         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
17205         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
17206         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
17207         Handle marshalling of interfaces and VARIANTs contained in structs.
17208         
17209         Code is contributed under MIT/X11 license.
17210         
17211 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
17213         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
17214         
17215         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
17216         mempool.
17218 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17220         * console-io.c: ignore previous SIGINT handler.
17222 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
17224         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
17225         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
17226         #79460, #79461, #79485.
17228         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
17230         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
17231         #79217.
17233 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
17235         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
17236         could be generated from it.
17238 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
17240         * rand.c: fix read loop to correctly handle EINTR.
17242 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
17244         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
17245         internal calls are defined to keep methods closer to the declaring
17246         type and allow a significant reduction in runtime relocations and
17247         memory usage.
17249 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
17251         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
17252         exception message to have FileNotFoundException use the default
17253         assembly load error message. Fixes bug #79426.
17254         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
17256 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17258         * threadpool.c: (start_thread_or_queue) use the root domain when
17259         creating the thread instead of the async object one.
17261 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
17263         * class.c, object.c, class-internals.h, reflection.c:
17264         for arrays, store element_size inside MonoClass (speedup
17265         for array object creation).
17267 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
17269         * icall.c: fixed CodeBase to use the file name and not the module
17270         name (bug #79365).
17272 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
17274         * mono-debug.c, mono-debug.h: export find_method as
17275         mono_debug_find_method ().
17277 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
17279         * debug-helpers.c, class-internals.h: added a few functions useful
17280         when debugging under gdb.
17282 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17284         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
17285         characters that need special handling.
17287 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
17289         * mono-config.c: make the os/cpu specification more flexible,
17290         allowing lists and negation.
17292 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
17294         * marshal.c: COM Interop fixes. Handle case where method->klass.
17295         is interface. Handle BSTR/MonoString when null. Use CDECL as 
17296         calling convention on non-windows platforms. This is for
17297         compatibility with XPCOM and MainWin COM.
17298         
17299         Code is contributed under MIT/X11 license.
17300         
17302 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
17304         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
17305         correctly. Fixes #79217.
17307         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
17309 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
17311         * mono-config.c: allow both an os and cpu attribute for dllmap
17312         and dllentry elemnets to enable a single config file to be used
17313         for multiple architectures.
17315 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
17317         * loader.c: MonoLoaderError was cleared too soon on load failure.
17318         Fixes bug #79424.
17320 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
17322         * icall.c: use the defining class vtable when accessing a
17323         static field, not a pobblibly derived class.
17325 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
17327         * icall.c string-icalls.c: Remove references to unicode.h.
17329         * unicode.h unicode.c Makefile.am: Remove these unused source files.
17331         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
17333         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
17334         indicating the image where custom marshaller types should be looked up.
17335         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
17336         custom marshallers, instead of corlib. Fixes #79425.
17338 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
17340         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
17342 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
17344         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
17345         Implement Environment.ProcessorCount.
17346         
17347         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
17348         Implement Environment.ProcessorCount.
17349         
17350         * icall.c: 
17351         Add Environment.ProcessorCount icall.
17352         
17353         Patch by Jason McFall.
17355 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17357         * assembly.c: don't append .exe/.dll when the filename already contains
17358         one of those extensions.
17360 2006-09-12  Martin Baulig  <martin@ximian.com>
17362         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
17363         to array interfaces.
17365 2006-09-11  Martin Baulig  <martin@ximian.com>
17367         * reflection.c (mono_image_build_metadata): Create the
17368         MethodImpl's after emitting all types and methods, so we don't
17369         need another fixup pass for them.
17371 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
17373         * class.c (mono_class_from_name_case): Fix regression introduced by the last
17374         change.
17376 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
17378         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
17379         unload.
17381 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
17383         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
17384         args is not set. Fixes #78926.
17386 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
17388         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
17390         * image.c (load_class_names): Move this to class.c, and rename it to 
17391         'mono_image_init_name_cache'.
17392         (load_modules): Fix a warning.
17394         * class.c icall.c image.c: Initialize image->name_cache lazily.
17396         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
17397         on its name using information in the AOT file.
17399         * class.c (mono_class_from_name): Use the new hook function.
17401 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
17403         * reflection.c (mono_param_get_objects): Handle enum default parameter values
17404         correctly.
17406         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
17407         Fixes #79289.
17408         
17409 2006-09-06  Martin Baulig  <martin@ximian.com>
17411         * icall.c (mono_lookup_internal_call): Small fix.
17413 2006-09-05  Raja R Harinath  <rharinath@novell.com>
17415         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
17416         double g_free.
17418 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
17420         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
17421         when --debug is specified.
17423 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
17425         * class.c (setup_generic_array_ifaces): Fix a warning.
17427 2006-09-04  Miguel de Icaza  <miguel@novell.com>
17429         * Temporarily remove the patch to assemly.c that checks the
17430         assembly versions as it breaks our gacutil.
17432 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
17434         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
17436         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
17437         a net 1.0 runtime.
17439         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
17440         created using the default ctor. Fixes #79152.
17441         (mono_string_builder_to_utf16): Ditto.
17443 2006-09-01  Martin Baulig  <martin@ximian.com>
17445         Fix handling of the generic array interfaces.
17447         * class-internals.h
17448         (MonoDefaults): Removed `generic_array_class' and added
17449         `generic_ilist' class.
17451         * class.c
17452         (mono_bounded_array_class_get): Add the new generic array interfaces.
17453         (setup_generic_array_ifaces): New static method; create vtable
17454         entries for each method in the generic array interfaces.
17456         * metadata.c
17457         (select_container): Allow "parent-less" generic methods.
17459         * marshal.c
17460         (mono_marshal_get_generic_array_helper): New public method.
17462         * icall.c
17463         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
17464         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
17465         moved the interncall into System.Array.
17467 2006-09-01  Raja R Harinath  <rharinath@novell.com>
17469         A few more cases of avoiding work on types with ->byref set.
17470         Has the real fix for #79238
17471         * icall.c (is_generic_parameter): New helper.
17472         (ves_icall_Type_GetGenericParameterPosition): Use it.
17473         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
17474         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
17475         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
17476         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
17477         reference types.
17478         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
17479         reference types.
17480         (ves_icall_Type_get_IsGenericInstance): Likewise.
17481         (ves_icall_Type_get_IsGenericType): Likewise.
17483 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
17485         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
17486         class if possible.
17488         * mempool.h (mono_mempool_get_allocated): New helper function.
17490         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
17491         change.
17493         * mempool.c: Fix warnings and the calculation of stats.
17495         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
17497         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
17499         * loader.c (mono_get_method_from_token): Update method_count stat.
17501         * class-internals.h (MonoStats): Add some stats.
17503 2006-08-31 Robert Jordan  <robertj@gmx.net>
17505         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
17506         with managed variants.
17507         All code is contributed under the MIT/X11 license.
17508         
17509 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
17511         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
17512         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
17514         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
17516         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
17517         with cycles in classes.
17519         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
17521         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
17522         missing a [MarshalAs] directive. Fixes #79203.
17524         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
17525         klass->marshal_info. Fixes #79217.
17527 2006-08-30  Martin Baulig  <martin@ximian.com>
17529         Committing a patch from Joachim Ante <joe@otee.dk>:
17530         Add support for binary data symbol stores.
17532         * debug-mono-symfile.c
17533         (mono_debug_open_mono_symbol_file): Renamed into
17534         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
17535         arguments.
17537         * mono-debug.c
17538         (mono_debug_open_image): Added `raw_contents' and `size' args.
17539         (mono_debug_init_2_memory): New public function.
17541 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
17543         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
17545 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17547         * appdomain.c: implement support for ShadowCopyFiles.
17549 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
17551         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
17552         when value is NULL (and should remove CID #51).
17554 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17556         * image.c: moved 2 functions to ../utils.
17558 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
17560         * gc.c: cope with the target object of a GC handle being NULL
17561         (bug #78877).
17563 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17565         * class.c: recursively check parent's explicit implementations
17566         of interface methods (fixes bug #79125).
17568 2006-08-19  Miguel de Icaza  <miguel@novell.com>
17570         * filewatcher.c: Avoid warnings when building, do not redefine
17571         constants that are defined.
17573         Remove warnings.
17575 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17577         * image.c: don't fail when the link points to an absolute path.
17579 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
17581         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
17582         Fix CID #3.
17584 2006-08-17  Miguel de Icaza  <miguel@novell.com>
17586         * image.c (full_path): A new method used to obtain the actual path
17587         of an assembly even in the presence of symbolic links.  
17589         This is necessary for the case where we are running a binary that
17590         has been GACed, but we are using the "published" path name
17591         ($prefix/mono/1.0/blah.exe) which happens to point to the real
17592         file in the GAC.
17594         This was the source of the failure for the `xsp' command with the
17595         recent AppDomain changes, as far as the runtime was concerned,
17596         there were two different assemblies: $prefix/mono/1.0/blah.exe and
17597         $prefix/mono/gac/blah/version/blah.exe.
17599         (do_mono_image_open): use full path
17601 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
17603         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
17605 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
17607         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
17608         domain_id is supplied. Fix CID #241 and corlib's unit tests.
17610 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
17612         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
17613         small structures. Fixes #78990.
17615 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
17617         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
17619         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
17621 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17623         * appdomain.c:
17624         * marshal.c: don't load all the assemblies from a domain into newly
17625         created ones. The new domains might have different rules and load
17626         assemblies from different locations. Fixes bug #76757.
17628         Patch by Lluis. Conflicts resolved by Brian Crowell.
17630 2006-08-16  Alp Toker  <alp@atoker.com>
17632         * socket-io.c: First half of the fix for #79084.
17633         Set sa_size to the length of the content, not that of the struct.
17634         Don't add NULL suffix to the content, this should be done in
17635         managed code if needed.
17637 2006-08-14  Raja R Harinath  <rharinath@novell.com>
17639         Fix part of #79012
17640         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
17641         mono_metadata_parse_type returns NULL.
17643 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
17645         * normalization-tables.h : new file for string normalization data.
17646         * locales.c, locales.h, icall.c :
17647           added load_normalization_resource() for string normalization,
17648           and icall as well.
17649         * Makefile.am : added normalization-tables.h to the sources.
17651 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
17653         * marshal.c: Add more helper functions to reduce code duplication and use them
17654         everywhere.
17656 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
17658         * marshal.c: Fix non-x86 stdcall warnings.
17659         
17660         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
17661         them everywhere.
17663 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
17665         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
17666         type check on multi-dimensional arrays. Fixes #79000.
17668 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
17670         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
17671         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
17672         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
17673         * class-internals.h: add is_com_object to class structure.
17674         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
17675         null checks to COM object marshalling. Fix .ctor call on RCW.
17676         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
17677         
17678         All code is contributed under the MIT/X11 license.
17680 2006-08-09  Dick Porter  <dick@ximian.com>
17682         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
17683         racing mono_monitor_allocator_lock() somewhere, so don't delete
17684         the critical section for now.  Found by running and exiting
17685         monodevelop.
17687 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
17689         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
17690         (ves_icall_System_ComObject_FindInterface): Ditto.
17691         (ves_icall_System_ComObject_CacheInterface): Ditto.
17693         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
17694         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
17696 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17698         * threadpool.c: treat pipes from process asynchronous reads as sockets
17699         when reading from them, so we get select/poll or epoll to wait for
17700         data.
17702 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
17704         * loader.c: Fix a typo (CID #233) in the null check.
17706 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
17708         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
17709         Hopefully fixes #78949.
17710         
17711         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
17712         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
17713         bytes. Fixes #78972.
17715 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17717         * filewatcher.c: we need to set errno here.
17719 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17721         * filewatcher.c: let Win32Exception get the error value.
17723 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17725         * filewatcher.c: translate errno into win32 errors for Win32Exception
17726         to know what happened.
17728 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
17730         * threadpool.c: Fix more warnings.
17732         * assembly.c (search_loaded): Fix warnings.
17734         * threadpool.c (mono_thread_pool_finish): Fix warnings.
17735         (mono_async_invoke): Ditto.
17737 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
17739         * object.c (mono_remote_class_vtable): Need to create proxy vtable
17740         entries for __ComObject type in addition to ComImport types.
17741         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
17742         about hash table.
17743         
17744         All code is contributed under the MIT/X11 license.
17746 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
17748         * image.c: avoid tentative loading of modulerefs that contain
17749         no metadata (P/Invoke library names).
17751 2006-07-28  Dick Porter  <dick@ximian.com>
17753         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
17754         mono_loader_lock() somewhere, so don't delete the critical section
17755         for now.  Found by running and exiting monodevelop.
17757 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17759         * filewatcher.c: define the inotify syscalls when we're building on
17760         linux and have sys/syscall.h. The build system might not have support
17761         for inotify but the target system might have it.
17763 2006-07-26  Miguel de Icaza  <miguel@novell.com>
17765         * domain.c: Documentation updates.
17767         * loader.c (mono_free_method): Do not release the method
17768         information if we are being profiled, as profilers will use this
17769         information at shut down to present some data to the user.
17771         This is needed so that the profiler does not crash, as the
17772         profiler tends to keep MonoMethods around, and they might become
17773         invalid if we free these.
17775         (mono_get_method_constrained): Return the original CIL stream
17776         method as well, so verification can be performed against it.
17778 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17780         * filewatcher.[ch]: support for inotify file system watcher.
17781         * icall.c: add new internal calls for the inotify file system watcher.
17783 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17785         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
17786         #78888.
17788 2006-07-20  Dick Porter  <dick@ximian.com>
17790         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
17791         warning.
17793 2006-07-20  Dick Porter  <dick@ximian.com>
17795         * threads.c (start_wrapper): Do the thread cleanup while we still
17796         hold a reference to its object.  Fixes bug 78123.
17798 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
17800         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
17801         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
17802           "managed-to-managed".
17803         * icall.c: Redirect string constructors that take sbyte* to
17804           ves_icall_System_String_ctor_RedirectToCreateString.
17805         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
17806           to CreateString () methods with matching signature.
17807         * reflection.c: Use original security informations for
17808           MONO_WRAPPER_MANAGED_TO_MANAGED.
17809         * security-manager.c: Use original security informations for
17810           MONO_WRAPPER_MANAGED_TO_MANAGED.
17811         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
17812           that is a placeholder and only its address should be used.
17813         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
17814           that is a placeholder and only its address should be used.
17816 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
17818         Begin implementing COM Interop.
17819         * appdomain.c: Increment corlib version.
17820         * class.c: Set ComImport classes' parent to __ComObject.
17821         * loader.c: Mark cominterop methods as such.
17822         * domain.c: Add __ComObject class to MonoDefaults structure.
17823         * image.c: Add 2 hashtables to the image for COM Interop related methods
17824         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
17825         using the mempool allocator
17826         
17827         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
17828         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
17829         declaration for mono_metadata_type_dup_mp.
17830         
17831         * debug-helpers.c: Added strings for two additional wrapper types
17832         * object.c: Create proxy objects for ComImport classes
17833         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
17834         and added __ComObject class to MonoDefaults structure.
17835         
17836         * object-internals.h: Finish MonoRealProxy definition, and add definition of
17837         MonoComInteropProxy and MonoComObject.
17838         
17839         * marshal.c: Added support for COM Interop
17840         (signature_cominterop): Converts managed signature to corresponding
17841         unmanaged COM signature.
17842         (cominterop_get_function_pointer): gets unmanaged function pointer via
17843         COM object vtable
17844         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
17845         (cominterop_get_method_interface): returns interface type that method is defined on
17846         (mono_mb_emit_cominterop_call): emits native call to function pointer
17847         gotten from vtable
17848         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
17849         that matches signature of unmanaged function.
17850         (cominterop_get_native_wrapper): wrapper around adjusted method call.
17851         (cominterop_get_invoke): forwards call from proxy to __ComObject
17852         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
17853         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
17854         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
17855         
17856         * marshal.h: Added Marshal icall declarations.
17857         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
17858         so we can access them in finalizer
17859         
17860 2006-07-14  Dick Porter  <dick@ximian.com>
17862         * object.c (mono_type_initialization_cleanup): Fix a race
17863         condition by temporarily commenting out the critical section
17864         deletion.
17866 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
17868         * reflection.c (create_custom_attr): Fix some warnings.
17869         (create_custom_attr_data): Ditto.
17870         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
17871         types. Fixes #78855.
17873 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
17875         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
17877         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
17879 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
17881         * reflection.c (resolve_object): Add support for DynamicMethod.
17883         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
17884         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
17886 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
17888         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
17889         don't leak GPtrArray's pdata has we have no use (nor free) for it.
17891 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
17893         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
17894         Fixes #77888.
17896 2006-06-30  Raja R Harinath  <rharinath@novell.com>
17898         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
17899         slightly: remove a shadow local variable.
17901 2006-06-29  Raja R Harinath  <rharinath@novell.com>
17903         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
17904         definition that introduces the virtual function slot.
17905         Also fix Coverity #105.
17907 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
17909         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
17910         for dynamic assemblies. Fixes #78724.
17912 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
17914         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
17915         Fixes #78722.
17917 2006-06-21  Martin Baulig  <martin@ximian.com>
17919         * reflection.c
17920         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
17921         fixes #76484.
17923 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
17925         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
17927 2006-06-20  Raja R Harinath  <rharinath@novell.com>
17929         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
17930         nor TYPEREFs.
17931         * class.c (mono_class_create_from_typespec): Add 'context' argument.
17932         Inflate result if necessary.
17933         (mono_class_get_full): Remove old version.  Rename from
17934         'mono_class_get' and add 'context' argument.  Pass it to
17935         ..._create_from_typespec.
17936         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
17937         (mono_ldtoken): Revert change below.
17939 2006-06-20  Martin Baulig  <martin@ximian.com>
17941         * class.c (mono_ldtoken): Don't pass the generic context to
17942         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
17944 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
17946         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
17947         and later freeing it. Fixes #78638.
17949 2006-06-15  Miguel de Icaza  <miguel@novell.com>
17951         * icall.c (mono_class_get_throw): Revert over-zealous error
17952         throwing, the caller for mono_class_get_throw will cope with
17953         errors when classes are not properly initialized already.
17955         The code still copes with loader exceptions though.
17957         Fixes the regression in reftype1 and reftype3 from the CAS tests.
17958         
17959 2006-06-14  Miguel de Icaza  <miguel@novell.com>
17961         Fixes the `make run1' version of RuntimeAbort (to be commited,
17962         source is in Bugzilla).
17963         
17964         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
17965         FALSE on class loading failure instead of returning true.
17967         * class.c (mono_class_create_from_typedef): It is possible for
17968         mono_metadata_interfaces_from_typedef_full to fail if a class is
17969         not found, cope with this.
17970         
17972 2006-06-14  Dick Porter  <dick@ximian.com>
17974         * socket-io.c: 
17975         * process.c: Fix a bunch of signed/unsigned warnings from gcc
17976         4.1.1
17978 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
17980         * culture-info-table.h : oops, forgot to make it nsync with r61548.
17982 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
17984         * icall.c: Another fix for building mono in Visual Studio.
17986 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
17988         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
17989         
17990 2006-06-09  Martin Baulig  <martin@ximian.com>
17992         * debug-mono-symfile.c: Put this back and really fix it this
17993         time. Sorry for all the trouble.
17995 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
17997         * icall.c (mono_class_get_throw): Fix a warning.
17998         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
17999         ReflectionTypeLoadException if needed. Fixes #78606.
18001         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
18002         (mono_class_init): Ditto.
18004         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
18005         ref_only exceptions.
18006         (mono_loader_clear_error): Make this work even if there is no error.
18008 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
18010         * object-internals.h marshal.c marshal.h icall.c: Implement method 
18011         Marshal.GetComSlotForMethodInfo using internal call.
18013 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
18015         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
18016         a function for signalling it.
18018         * class.c (mono_class_from_typeref): Use the new kind of loader error when
18019         a referenced assembly is not found.
18021         * loader.c (mono_loader_error_prepare_exception): Add support for 
18022         LOADER_ERROR_ASSEMBLY. Fix formatting.
18024 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
18026         * domain.c appdomain.c class-internals.h marshal.c: Add support 
18027         for VARIANT marshalling on windows and increment corlib version
18028         since Variant struct was added.
18030 2006-06-03  Miguel de Icaza  <miguel@novell.com>
18032         * debug-mono-symfile.c: Revert Martin's previous patch which broke
18033         stack trace line information:
18035         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
18036         (Martin) when looking up B which is between A and C, return A not C.
18038         Bug is #78573.
18040         Thanks to Alexander Olk for tracking this down.
18042 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
18044         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
18045         
18046         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
18047         avoid clobbering its value.
18048         (mono_string_to_lpstr): Fix a warning on windows.
18050 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
18052         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
18054         * reflection.c loader.c: Removed references to 'dummy' flag.
18056         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
18058         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
18059         it gets GC tracking.
18061         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
18062         GC tracking.
18063         
18064         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
18066         * marshal.c threadpool.c: Update callers of mono_async_result_new.
18068         * appdomain.c: Bump corlib version.
18070 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
18072         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
18073         CEE_STIND_REF when working with object references.
18075 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
18077         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
18078         Fixes #78539.
18080 2006-05-30  Miguel de Icaza  <miguel@novell.com>
18082         * loader.c (method_from_memberref): Fix argument value for
18083         mono_loader_set_error_method_load (I was passing the MonoClass
18084         instead of the class name char *).
18086 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
18088         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
18089         CEE_STIND_REF when working with object references.
18091 2006-05-30  Martin Baulig  <martin@ximian.com>
18093         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
18094         mono_method_full_name() change and replace the ':' with a '.'
18095         here.
18097 2006-05-30  Martin Baulig  <martin@ximian.com>
18099         * debug-mono-symfile.c
18100         (mono_debug_symfile_lookup_location): Fix the algorithm:
18101         when looking up B which is between A and C, return A not C.
18103 2006-05-29  Martin Baulig  <martin@ximian.com>
18105         * mono-debug.h
18106         (MonoDebugMethodInfo): Make the typedef public.
18107         (MonoDebugSourceLocation): New public struct.
18109         * mono-debug.c
18110         (mono_debug_source_location_from_address): Removed.
18111         (mono_debug_source_location_from_il_offset): Removed.
18112         (mono_debug_il_offset_from_address): Removed.
18113         (mono_debug_address_from_il_offset): Removed.
18114         (mono_debug_lookup_method): New public function.
18115         (mono_debug_lookup_source_location): New public function; replaces
18116         the old mono_debug_source_location_from_*() functions; see the
18117         inline documentation.
18118         (mono_debug_free_source_location): New public function.
18119         (mono_debug_print_stack_frame): New public function; see the
18120         inline documentation.
18122         * debug-mono-symfile.c
18123         (mono_debug_find_source_location): Renamed into
18124         mono_debug_symfile_lookup_location(); only take a
18125         `MonoDebugMethodInfo *' and an `offset' argument; added inline
18126         documentation.
18127         (mono_debug_find_method): Renamed into
18128         mono_debug_symfile_lookup_method().
18130 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
18132         * assembly.c (mono_assembly_open_full): Dont overwrite the status
18133         returned by mono_image_open_full ().
18135         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
18136         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
18137         #78517.
18139         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
18140         #78518.
18142 2006-05-27  Miguel de Icaza  <miguel@novell.com>
18144         * class.c (mono_class_from_typeref): handle missing images
18145         earlier, deals with bug #78418.   Refactor code; 
18147         Fix a warning introduced in my previous commit (some stale code
18148         from before I revisited my patch).
18150         * class.c (mono_class_create_from_typedef): On failure, remove the
18151         class from the MonoImage->class_cache as the class is not
18152         initialized;   Fixes the leak pointed out by Paolo.
18154 2006-05-25  Dick Porter  <dick@ximian.com>
18156         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
18157         DeleteCriticalSections until I figure out which one may still be
18158         sometimes locked when mono_thread_cleanup is called.
18160 2006-05-24  Dick Porter  <dick@ximian.com>
18162         * threads.c (mono_thread_cleanup): Move the threading cleanup out
18163         of mono_thread_manage and back into its own function, so it can be
18164         called after the finalizer thread has finished.
18166         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
18168 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
18170         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
18171         Fixes #78495.
18173         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
18174         with non-blittable elements.
18175         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
18177 2006-05-24  Martin Baulig  <martin@ximian.com>
18179         * mono-debug-debugger.h (MonoDebuggerEvent): Added
18180         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
18182         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
18183         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
18184         `mono_debugger_event_handler' to NULL.
18186 2006-05-24  Martin Baulig  <martin@ximian.com>
18188         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
18190 2006-05-24  Martin Baulig  <martin@ximian.com>
18192         * mono-debug-debugger.h
18193         (mono_debugger_create_notification_function): Added
18194         `MonoCodeManager *' argument.
18196 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
18198         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
18200 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
18202         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
18203         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
18204         implementation.
18206 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
18208         * icall.c: precise GC support: objects can't be stored in unmanaged
18209         memory anymore, even if they are kept alive by other references: since
18210         they can move the GC needs to be able to always find them.
18212 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
18214         * object.c: precise GC support for static fields. Support
18215         for moving GCs: write barriers and pinned allocation for interned
18216         strings.
18218 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
18220         * domain.c, domain-internals.h: precise GC support for the MonoDomain
18221         structure.
18223 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
18225         * class.c, gc.c: sgen and precise GC updates.
18227 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
18229         * marshal.h, marshal.c: added write barrier wrapper and precise type
18230         fixes.
18232 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
18234         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
18235         support.
18237 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
18239         * reflection.c: precise and sgen GC updates.
18241 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
18243         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
18245 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
18247         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
18249 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
18251         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
18252         MONO_TYPE_OBJECT. Fixes #78462.
18254 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
18256         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
18257         and blittable types.
18259 2006-05-17  Miguel de Icaza  <miguel@novell.com>
18261         * class.c (mono_class_get_exception_for_failure): Implement parts
18262         of a TODO: if the loader error is set (instead of the class
18263         error), we return a Loader exception that can be properly thrown
18264         elsewhere.
18266         This was exposed by some Winforms 2.0 code that I tried to run
18267         (Atsushi pointed me to it).
18269 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
18271         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
18272         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
18273         
18274         * marshal.c (emit_marshal_vtype): Add limited support for 
18275         UnmanagedType.LPStruct. Fixes #78427.
18277         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
18278         Applied a patch from kangaroo to fix #77523.
18280 2006-05-17  Martin Baulig  <martin@ximian.com>
18282         * threads.c
18283         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
18284         (debugger_thread_created): Removed.
18285         (debugger_thread_exited): Removed.
18287 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
18289         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18291         * object-internals.h (MonoReflectionResource): Sync with managed version.
18293 2006-05-12  Wade Berrier <wberrier@novell.com>
18295         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
18297 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
18299         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
18300         functions try to allocate from the image mempool.
18302 2006-05-12  Dick Porter  <dick@ximian.com>
18304         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
18306 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
18308         * object.c: The FieldGetter and FieldSetter methods require the full
18309         name of the class, not only the name. Fixes bug #78277.
18311 2006-05-11  Miguel de Icaza  <miguel@novell.com>
18313         * loader.c (method_from_memberref): Do not pass the NULL klass to
18314         mono_loader_set_error_() methods.  Pass the non-NULL value
18315         (class). 
18317 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
18319         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
18320         (mono_assembly_close): Null out assembly->image->references after freeing it.
18322         * image.c (mono_image_close): Free image->references.
18323         
18324         * reflection.c (mono_image_basic_init): Fix a small memory leak.
18326 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
18328         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
18329         before checking if it's NULL (g_assert).
18331 2006-05-10  Martin Baulig  <martin@ximian.com>
18333         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
18334         I thought I already killed that two months ago, but now it somehow reappeared.
18336 2006-05-10  Martin Baulig  <martin@ximian.com>
18338         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
18340 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
18342         * reflection.c: Allocate memory for dynamically created methods in the image
18343         mempools.
18345 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
18347         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
18348         don't use the ad pointer before checking if it's NULL (g_assert).
18350 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
18352         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
18353         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
18355         * marshal.c: Allocate all signatures from mempools.
18357         * marshal.c: Allocate some more signatures from mempools.
18359 2006-05-09  Miguel de Icaza  <miguel@novell.com>
18361         * object.c (mono_load_remote_field): The code used to provide a
18362         temporary variable for returning results if the user did not
18363         provide a result pointer.  But our temporary variable was allocted
18364         on the satck.
18366         Fix calling code to always pass a result area.   Coverity ID 103.
18368 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
18370         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
18371         value, not the old. Fixes #78312.
18372         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
18374         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
18375         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
18376         per-image cache.
18378         * assembly.c (mono_assembly_close): Free image->references.
18380         * assembly.c (mono_assembly_names_equal): Fix a warning.
18381         (mono_assemblies_cleanup): Cleanup more global data.
18383         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
18385         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
18386         ptr_cache and image->modules.
18388         * image.c (mono_image_init): Allocate array_cache lazily.
18389         
18390 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18392         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
18393         behavior was changed recently and has bad side effects.
18395 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
18397         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
18398         
18399         * assembly.c (mono_assembly_close): Remove a debug printf.
18401         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
18403         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
18404         to also allow for temporary references between mono_image_open ()/close ().
18406         * domain.c (get_runtimes_from_exe): Add a FIXME.        
18408 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
18410         * marshal.c: Fix support for dynamic methods.
18412         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
18414         * marshal.c (mono_marshal_cleanup): New cleanup function.
18416         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
18417         image mempools.
18419         * class.c (mono_class_init): Fix leaking class->nested_classes.
18421         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
18423         * image.c (mono_image_init): Initialize the new cashes.
18425         * image.c (mono_image_close): Destroy the new cashes.
18427         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
18429         * mempool.c (mono_mempool_strdup): New helper function.
18431         * class-internals.h: Add prototype for mono_loader_unlock ().
18433         * domain.c (mono_jit_info_table_find): Fix a warning.
18434         (mono_debugger_check_runtime_version): Ditto.
18436         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
18437         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
18438         functions to these modules.
18440         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
18441         metadata modules.
18442         
18443         * marshal.c (mono_free_bstr): Fix a warning.
18445         * assembly.c (mono_assembly_open_full): Fix another small leak.
18447         * object.c: Fix some unload leaks in the remoting code.
18449         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
18450         function.
18452         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
18454         * reflection.c: Fix some unload leaks in dynamic assemblies.
18456 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
18458         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
18459         * marshal.h: Add BSTR support on Win32
18460         * icall.c: Add BSTR icalls
18461         * metadata.h: Add BSTR enums
18463 2006-04-28  Miguel de Icaza  <miguel@novell.com>
18465         Work to catch the crash from #76795 and turn it into an
18466         exception.   As I stubbed out pieces of the VisualBasic support,
18467         I found a number of places where the code was failing and I added
18468         checks to those places. 
18469         
18470         * metadata.c (do_mono_metadata_parse_generic_class): Make this
18471         function return a status code.  If we fail to parse the signature
18472         from mono_metadata_parse_generic_inst, return FALSE.
18474         * loader.c (mono_get_method_from_token): If we fail to load the
18475         method (mono_class_get) return NULL.   
18477         * (method_from_memberref): Return NULL if we are unable to parse
18478         the method signature
18480         (mono_loader_error_prepare_exception): Since we now use the
18481         loader_error flag internally to stop processing, and obtaining
18482         exceptions that might be thrown will walk this code path the
18483         proper way of going from a MonoLoaderError into a
18484         MonoException was convoluted.   This new routine encapsulates the
18485         process of turning the error into an exception and *clearing* the
18486         error afterwards.
18487         
18488 2006-04-27  Miguel de Icaza  <miguel@novell.com>
18490         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
18491         with missing assemblies), and to cope with:
18493                 * Missing fieldref from a non-existing assembly.
18494                 * Missing methodref from a non-existing assembly.
18496         The first batch of work to address *some* of the issues from 76661.
18497         
18498         * object.c (mono_class_create_runtime_vtable): If we fail to
18499         initialize the class raise the exception here. 
18501         * metadata.c (mono_class_get_overrides_full): If any methods fail
18502         to load return the failure to the caller.
18504         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
18505         flagging assemblies that failed to load.   
18507         Do not crash if we are unable to load the assembly.
18509         (mono_assembly_close): Do nothing with REFERENCE_MISSING
18510         assemblies. 
18512         * loader.c (mono_loader_set_error_type_load): Change the
18513         convention to always pass unallocated strings, so we make our own
18514         copies (I know our own code had duplicated strings before, but
18515         this keeps the normal conventions).
18516         (method_from_memberref): Call mono_loader_set_error_method_load
18517         for all possible failures of loading the class. 
18518         Remove assert, turn into a loader error.
18520         (mono_loader_error_to_exception): Move this routine from mini
18521         (mini_loader_error_to_exception) there was no need to have that in
18522         mini. 
18524         * class.c (mono_class_from_typeref): If we were not able to load
18525         the assembly with mono_assembly_load_reference, call the
18526         mono_loader_set_error_type_load to register the problem.
18528         (mono_class_setup_fields): If we fail to load the type from
18529         mono_metadata_parse_type_full, call mono_class_set_failure and
18530         break from the loop.
18532         If class->exception_type is set, we do not layout the fields as
18533         that might crash the runtime, and instead return (from breaking
18534         from the previous loop).
18536         (mono_class_setup_vtable): This now returns a boolean indicating
18537         whether the table was properly setup.   The decision is driven by
18538         mono_class_get_overrides_full which might run into non-existing
18539         methods. 
18540         
18541         (mono_class_init): Returns TRUE on success or FALSE if there was a
18542         problem in loading the type (incorrect assemblies, missing
18543         assemblies, methods, etc).
18545         When we call mono_class_setup_fields we also check for a potential
18546         error inside this call (either a class exception or a general
18547         loader exception).
18549         (mono_class_create_from_typedef): If the parent fails to load
18550         (calling mono_class_get_full) return NULL.
18551         
18552         ** Important **
18554         calls to mono_metadata_parse_type_full should be checked
18555         everywhere and set the mono_class_set_failure
18556         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
18558         The current patch checks the places where my manually constructed
18559         tests show the errors are showing up, but we should do it
18560         everywhere. 
18562         ** Important2 **
18564         mono_class_init return values should be tested everywhere, like
18565         the previous case this is something that we should audit
18566         everywhere and not only on the cases exposed by the tests I
18567         created. 
18569 2006-04-26  Miguel de Icaza  <miguel@novell.com>
18571         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
18572         boolean parameter and instead pass the information on `options'
18573         parameter (FileOptions).
18575         * icall.c: Register the new signature for MonoIO.Open.
18577         * debug-helpers.c (dis_one): Trying to understand how coverity
18578         works.  Fix Run 5, item 78.
18580 2006-04-26  Dick Porter  <dick@ximian.com>
18582         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
18583         dereference.
18585 2006-04-25  Martin Baulig  <martin@ximian.com>
18587         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
18589         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
18590         debugger_thread_created().
18591         (debugger_gc_push_all_stacks): Don't handle the main thread in any
18592         special way.
18593         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
18594         (mono_debugger_finalize_threads): New function; undo the effects
18595         of mono_debugger_init_threads().
18596         (mono_debugger_create_all_threads): Removed.
18598 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
18600         * image.c (mono_image_close): Tidy up trace messages.
18602         * assembly.c (mono_assembly_close): Ditto.
18604         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
18605         no longer references an already freed assembly. Fixes #78168.
18607 2006-04-21  Dick Porter  <dick@ximian.com>
18609         * threads.c (mono_thread_detach): Fix reference counting when
18610         detaching threads.
18612 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
18614         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
18615         #78155.
18617 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
18619         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
18620         (mono_type_to_stind): Ditto.
18622         * marshal.c: Use the new helper functions to simplify code.
18624         * image.c (mono_image_close): Add some code for help debug assembly unloading
18625         problems.
18627         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
18628         image mempool.
18630         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
18631         assembly was already loaded in another appdomain. Fixes #78083.
18633 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
18635         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
18636         referenced assemblies.
18637         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
18639         * domain.c (mono_domain_free): Add a trace message.
18641         * appdomain.c (add_assemblies_to_domain): Ditto.        
18643         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
18644         field.  
18646 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
18648         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
18650 2006-04-12  Martin Baulig  <martin@ximian.com>
18652         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
18653         `USE_INCLUDED_LIBGC'.   
18655 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
18657         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
18658         the patch contains ../ and a small directory name later. Hopefully fixes
18659         #78035.
18661 2006-04-10  Martin Baulig  <martin@ximian.com>
18663         Clean up the debugger's thread-handling code.
18665         The debugger's thread-handling code has been moved from
18666         ../mini/debug-debugger.c to threads.c.  We now iterate directly
18667         over the `threads' hash, keep track of exiting threads and also
18668         use proper locking.
18670         We can now debug XSP and XSP based applications with the debugger.
18672         * object-internals.h (MonoThread): Added `gpointer end_stack'.
18674         * threads.h
18675         (MonoThreadCallbacks): Removed; this was only used by the debugger.
18676         (mono_install_thread_callbacks): Likewise.      
18678         * threads.c (mono_thread_callbacks): Removed.
18679         (debugger_thread_created, debugger_thread_exited): New static functions.
18680         (start_wrapper): Call debugger_thread_created().
18681         (thread_cleanup): Call debugger_thread_exited().
18682         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
18683         (mono_debugger_init_threads): New public function.
18684         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
18685         iterate directly over the `threads' hash and also use proper locking.
18687         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
18689         * mono-debug-debugger.h
18690         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
18692 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
18694         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
18695         argument type=array. Fixes #78057.
18697 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
18699         * culture-info-table.h : regenerated. Fixed bug #69652.
18701 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
18703         * loader.c metadata.c: Reapply a variant r59116.
18704         
18705         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
18707         * class.c (mono_class_setup_interface_offsets): New internal function.
18709         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
18710         interfaces too. Fixes #77398.
18712         * reflection.c (encode_cattr_value): Add support for 
18713         parameter type=object, argument type=array.
18714         (load_cattr_value): Ditto. Fixes #77916.
18716         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
18717         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
18719         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
18720         a byval char array and CharSet is Ansi.
18722         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
18724 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
18726         * metadata.c: Add some locking comments.
18727         
18728         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
18729         mempool.
18730         (mono_metadata_free_method_signature): Don't free the signature itself.
18732         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
18734         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
18735         reference the same MonoImage.
18736         (mono_assembly_load_from_full): Add an assert.
18738 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
18740         * image.c (mono_image_close): Don't put the image we are about to free into the
18741         loaded_images_guid_hash.
18743         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
18744         to reduce code duplication.
18746         * marshal.c: Register the native functions called by this module as icalls, to
18747         somewhat centralize the creation of MonoMethodSignature's.
18749         * loader.c (mono_method_signature): Add a cache for method signatures.
18751         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
18752         the parameter attributes of a method.
18753         (mono_metadata_parse_method_signature_full): Refactored the computation of
18754         parameter attributes into a separate function. Also avoid one allocation in
18755         most cases.
18757         * assembly.c (mono_assembly_close): Ditto.
18759         * image.c (mono_image_close): Log trace messages with INFO level.
18761         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
18763         * image.c reflection.c: Correct reference counting of image modules.
18764         
18765         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
18766         of this function from the image mempool.
18767         
18768         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
18769         to allow more cached types to be used.
18771         * mono-debug.c (mono_debug_add_method): Appled patch from
18772         David S. Miller  <davem@sunset.davemloft.net>: Access 
18773         minfo->lexical_blocks[] entry elements using read32().
18775 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
18777         * loader.c (mono_free_method): No longer free the method header for non-dynamic
18778         methods as it is allocated from the mempool.
18780         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
18781         image mempool.
18783         * metadata-internals.h: Add comments describing the reference counting scheme
18784         used for MonoImage and MonoAssembly.
18786         * image.c assembly.c reflection.c: Rework reference counting of images and 
18787         assemblies so they are freed when the runtime is shut down. Free some 
18788         additional memory structures when an image is unloaded.
18789         
18790 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
18792         * class.c loader.c reflection.c: Allocate more data structures in
18793         the image mempool.
18795 2006-03-31  Miguel de Icaza  <miguel@novell.com>
18797         * icall.c
18798         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
18799         build on pre glib 2.4 systems.
18801 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
18803         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
18805         * icall.c: Fix some warnings.
18807 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
18809         * culture-info-table.h : regenerated.
18811 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
18813         * threads.c, object-internals.h, verify.c: changed the culture caching
18814         code to use a normal MonoArray for storage so the GC can keep track of
18815         them easily. Fixed bits of the cache logic, too and simplified the
18816         code.
18818 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
18820         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
18821         thread for non-Boehm GCs.
18823 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
18825         * domain.c, object.c, domain-internals.h: reduce the amount of memory
18826         needed to keep track of the data for static fields.
18828 2006-03-29  Raja R Harinath  <rharinath@novell.com>
18830         Fix #75172
18831         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
18832         for interface classes.  Use 'num_methods' instead.
18833         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
18834         before using '->vtable_size' field.
18836 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
18838         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
18839         doesn't contain managed pointers, so use a normal hashtable.
18841 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
18843         * reflection.c, class-internals.h, domain.c: fixed handling of types
18844         used as values for objects in custom attributes (bug #77915):
18846 2006-03-24  Martin Baulig  <martin@ximian.com>
18848         * class.c (mono_class_setup_fields): Added support for generic
18849         instances; fixes #77580.
18851 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18853         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
18855 2006-03-24  Dick Porter  <dick@ximian.com>
18857         * file-io.c (get_file_attributes): More stat macro breakage.
18858         Fixes bug 77759.
18860 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
18862         * profiler.c: added the file=filename option in the default profiler
18863         to output the profile data to filename.
18865 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18867         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
18868         bug #77877.
18870 2006-03-22  Martin Baulig  <martin@ximian.com>
18872         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
18873         allocated `MonoClassField *' in `fb->handle'.
18875 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
18877         * class.c, image.c, metadata-internals.h: implemented new mechanism to
18878         allocate interface ID to save memory and allow better ID reuse on
18879         appdomain unload. setup_generic_vtable () removal from Martin.
18881 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
18883         * object.h, appdomain.c, domain.c, exception.c, icall.c,
18884         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
18885         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
18886         write barriers for reference stores with managed objects accessed with
18887         C structures in the runtime and in embedding programs.
18889 2006-03-20  Raja R Harinath  <rharinath@novell.com>
18891         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
18892         'interface_id' and 'max_interface_id' fields of MonoClasses
18893         representing open generic types.
18895 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
18897         * object.h, object.c, icall.c: added functions to deal with
18898         storing valuetypes that contain references in managed objects.
18899         * reflection.c, string-icalls.c, threads.c, marshal.c: small
18900         fixes and comments around uses of mono_array_addr ().
18902 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
18904         * object.h, icall.c, monitor.c: object.GetHashCode ()
18905         implementation that supports the moving garbage collector.
18907 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
18909         * icall.c, threads-types.h, threads.c: implemented finalizer for
18910         LocalDataStoreSlot.
18912 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
18914         * metadata.c (mono_type_size): Add a fixme.
18915         (mono_type_stack_size): Ditto.
18917         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
18918         'type_forwarders' field.
18920         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
18921         attribute from net 2.0.
18923         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
18924         from class.c.
18926         * class.c (mono_class_setup_fields): Fix a warning.
18927         
18928         * class.c (mono_class_from_name): Add support for assemblyref entries
18929         in the EXPORTEDTYPE table.
18931         * reflection.c: Add support for handling type forwarders under net 2.0.
18933         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
18934         
18935 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
18937         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
18938         overwriting entries in ModuleBuild->types, also clean up the code
18939         a little. Fixes #77774.
18941 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
18943         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
18944         load friend assembly info when present.
18946 2006-03-14  Raja R Harinath  <rharinath@novell.com>
18948         Fix crasher on gtest-158.cs.
18949         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
18950         the return value if the MonoClass we want is yet in an
18951         inconsistent state.
18952         * class.c (mono_class_create_from_typedef): Add an comment
18953         explaining an order dependency between mono_class_setup_parent and
18954         mono_class_setup_mono_type.
18956 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
18958         * class.c: documentation updates and events bug fix.
18960 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
18962         * class.c: some cleanup, locking fixes.
18964 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
18966         * class.c: fix the generics code to setup nested
18967         type info to the instantiated type (bug #77770).
18969 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
18971         * marshal.c: fixed a few type correctness issues.
18973 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
18975         * loader.c: the Set/Get/Addrtess array methods should be public.
18977 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
18979         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
18980         
18981         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
18982         info->wrapper.
18984 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
18986         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
18988         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
18990         * mempool.c (mono_mempool_alloc): Speed this up a bit.
18991         (mono_mempool_alloc0): Ditto.
18993 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18995         * socket-io.c:
18996         (create_object_from_sockaddr): it was allocating 4 extra bytes
18997         for the AF_UNIX data. Fixes bug #77747.
18999 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
19001         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
19003 2006-03-09  Dick Porter  <dick@ximian.com>
19005         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
19006         Fixes bug 76966 again.
19008 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
19010         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
19011         names from r57532
19012         * appdomain.c: Bumped corlib version to 48 (due to r57532)
19014 2006-03-07  Martin Baulig  <martin@ximian.com>
19016         * object.c
19017         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
19019 2006-03-07  Martin Baulig  <martin@ximian.com>
19021         * class.c
19022         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
19023         regression introduced in r56970; see gtest-252.cs.
19025         * loader.c (mono_get_method_constrained): Correctly handle generic
19026         methods; see gtest-253.cs.
19028 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
19030         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
19032 2006-03-04  Martin Baulig  <martin@ximian.com>
19034         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
19035         compute the parent type at runtime, just like we're already doing
19036         it for interfaces.
19038         * reflection.c
19039         (mono_reflection_bind_generic_parameters): Don't compute the
19040         parent type anymore.
19042         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
19044 2006-03-04  Martin Baulig  <martin@ximian.com>
19046         * mono-debug-debugger.h
19047         (mono_debugger_create_notification_function): Allocate memory at
19048         runtime and return a pointer to it.
19050 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
19052         * assembly.c: Fix windows build.
19053         
19054         * assembly.c: Fix build.
19056         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
19058         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
19059         
19060 2006-03-03  Dick Porter  <dick@ximian.com>
19062         * process.c
19063         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
19064         Check parameters before dereferencing them.  Fixes Aaron's part of
19065         bug 77393.
19067 2006-03-03  Raja R Harinath  <rharinath@novell.com>
19069         Fix performance regression.
19070         * loader.c (find_method_in_class): Add 'from_class' argument.
19071         Rename 'klass' argument to 'in_class'.  The signature is compared
19072         against the method in 'in_class', and the corresponding method is
19073         returned from 'from_class'.
19074         (find_method): Walk both 'in_class' and 'from_class' in parallel.
19075         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
19076         type definition and generic instantiation in parallel.
19077         (mono_get_method_constrained): Update to changes.
19079 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
19081         * threads.c: make sure the domain is correct, too when doing
19082         mono_thread_attach ().
19084 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
19086         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
19087         windows. Fixes #77683.
19089 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
19091         * object.h, *: introduced specific way to set elements of an array
19092         of references to be used as write barrier. Still need to audit the
19093         uses of mono_array_addr.
19095 2006-03-01  Miguel de Icaza  <miguel@novell.com>
19097         * object-internals.h: New field to cache the assmebly name, patch
19098         from Tambet Ingo (tambet@ximian.com)
19100 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
19102         * decimal.h, class-internals.h, metadata-internals.h,
19103         file-io.h: mark a few function declarations as internal, to
19104         reduce the number of PLT entries.
19106 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19108         * file-io.c: fix typo in warning message.
19110 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
19112         * loader.c: on unix, lookup the "*A" version of a function
19113         if charset is auto as a second option before failing.
19115 2006-02-28  Raja R Harinath  <rharinath@novell.com>
19117         * class.h (mono_class_inflate_generic_method): Revert to two
19118         argument version.
19119         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
19120         (mono_class_inflate_generic_method_full): Add.
19121         * class.c (mono_class_inflate_generic_method_full): Rename from
19122         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
19123         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
19124         * loader.c, reflection.c: Update to changes.
19126 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
19128         * icall.c: const fixes and small improvements.
19130 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19132         * threadpool.c: for asynchronous connect(), enable the same workaround
19133         for BSD 6 as for the Mac. Fixes bug #77637.
19135 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
19137         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
19138         formatted classes. Fixes #77524.
19140 2006-02-24  Raja R Harinath  <rharinath@novell.com>
19142         * class.c (inflate_generic_type): Add a couple more
19143         micro-optimizations.
19144         (inflate_generic_context): Don't use the 'gmethod' from
19145         'inflate_with'.
19146         (mono_class_inflate_generic_method): If the method has generic
19147         parameters, but the passed-in context doesn't have a 'gmethod',
19148         create one.  Use the possibly simplified generic instantiation
19149         from the declaring class instead of the one passed in.
19151 2006-02-24  Raja R Harinath  <harinath@gmail.com>
19153         Make generic method signature and method header handling lazy.
19154         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
19155         (inflate_generic_header): Likewise.
19156         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
19157         parameter to avoid inflating types.
19158         (mono_get_inflated_method): Empty out.
19159         * class.h (mono_class_inflate_generic_method): Update to changes.
19160         * loader.c (mono_get_method_from_token): Don't parse signature for
19161         generic methods, nor methods of generic classes.
19162         (mono_method_signature): Rename from 'mono_method_signature'.
19163         Inflate signature on demand.
19164         (mono_method_get_header): Inflate method header on demand.
19165         * reflection.c: Update to changes.
19167 2006-02-23  Raja R Harinath  <rharinath@novell.com>
19169         * metadata.c (mono_metadata_inflate_generic_inst): If the
19170         instantiation is closed, don't bother expanding it in the new
19171         context.
19172         * class.c (inflate_generic_class): If the generic instantiation
19173         doesn't change after inflation, return the argument itself.
19174         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
19175         Add bounds checks.
19176         (inflate_generic_context): If neither the generic class nor the
19177         generic method instantiations change, return the original context.
19178         * reflection.c (mono_method_get_object): Do
19179         'mono_get_inflated_method' before accessing the ->klass field.
19180         (inflate_mono_method): Don't create a MonoGenericMethod unless
19181         necessary.
19182         (inflate_method): Don't pass a constructed type as the declaring
19183         type of a methodbuilder.
19185 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
19187         * object.c: fix memory overwrite.
19189 2006-02-22  Dick Porter  <dick@ximian.com>
19191         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
19192         it doesn't work any more.
19193         (mono_threads_request_thread_dump): Fix unused variable warnings.
19195 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
19197         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
19198         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
19199         the public header file.
19201 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
19203         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
19205 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
19207         * class-internals.h, object.c: reduce the size of MonoVTable
19208         and store the interface_offsets array at negative offsets.
19210 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
19212         * metadata.c: tweak table descriptors data structures to reduce
19213         size and runtime relocations.
19215 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
19217         * marshal.c: fix some types and opcodes to be type-safe
19218         in marshaling wrappers.
19220 2006-02-21  Ankit Jain  <jankit@novell.com>
19222         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
19224 2006-02-21  Raja R Harinath  <rharinath@novell.com>
19226         * metadata.c (get_constraints): Relax debugging checks for monodis.
19228 2006-02-21  Ankit Jain  <jankit@novell.com>
19230         * metadata.c (mono_metadata_load_generic_params): Move the code
19231         checking for ambiguous generic params from here to mono/dis/get.c
19232         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
19234 2006-02-21  Raja R Harinath  <harinath@gmail.com>
19236         Fix assertion triggered when compiling nemerle.
19237         * class.c (mono_get_shared_generic_inst): Rename from
19238         get_shared_inst and make non-static.
19239         * loader.c (mono_get_shared_generic_method): New.  Used to create
19240         the MonoGenericContext-equivalent of a MonoGenericContainer.
19241         (mono_get_method_from_token): Initialize the 'context' field of
19242         the created MonoGenericContainer.
19243         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
19244         * metadata.c (get_constraints): Add sanity check.
19245         * class-internals.h: Add new internal methods.
19247         * reflection.c (verify_safe_for_managed_space): New sanity check.
19248         Currently checks that owner-less generic parameters aren't allowed
19249         in managed space.
19250         (mono_type_get_object): Use it.
19251         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
19252         that are now in mono_type_get_object.
19253         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
19255 2006-02-19  Raja R Harinath  <harinath@gmail.com>
19257         * metadata.c (mono_type_create_from_typespec): Rename from
19258         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
19259         argument and caching of types in the generic container.
19260         (unwrap_arrays, find_generic_param): Remove.
19261         * metadata-internals.h: Update.
19262         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
19264 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
19266         * class.c (mono_class_get_exception_for_failure): Fix a warning.
19268         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
19269         return values. Fixes #77581.
19271         * class.c (mono_fnptr_class_get): Switch name and name_space.
19273         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
19274         classes and add support for [In, Out] attributes.
19275         (mono_marshal_free_asany): Ditto. Fixes #77524.
19277 2006-02-18  Raja R Harinath  <harinath@gmail.com>
19279         * class.c (mono_class_from_generic_parameter): Make more robust to
19280         incomplete MonoGenericContainers from monodis.
19282 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
19284         * class-internals.h: added some more exception types.
19285         * class.c, metadata.c: added a few checks to handle missing
19286         types.
19288 2006-02-17  Raja R Harinath  <rharinath@novell.com>
19290         Use owner-less generic-params some more.
19291         * class.c (my_mono_class_from_generic_parameter): Remove.
19292         (mono_class_from_generic_parameter): Handle null image,
19293         param->name and param->owner.
19294         (mono_class_from_mono_type): Update.
19295         (mono_class_create_from_typespec): Remove 'container' parameter.
19296         If that parameter is non-null, the result is always inflated by
19297         'mono_class_get_full' anyway.
19298         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
19299         parameter.
19300         (mono_class_get_full): Update.
19302         * class.c (inflate_generic_type) [GENERICINST]: If the generic
19303         instance is not open, don't bother inflating.
19304         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
19305         parse metadata for inflated classes.
19306         (_mono_class_get): Change GenericContext* parameter to
19307         GenericContainer*.
19308         (mono_class_create_from_typespec): Likewise.  Simplify, and
19309         implement trivially.  All the cases are handled in
19310         mono_class_from_mono_type.  Don't inflate returned class.
19311         (mono_class_get_full): Delegate GENERICINST optimization to
19312         inflate_generic_type.
19313         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
19315 2006-02-16  Dick Porter  <dick@ximian.com>
19317         * socket-io.c (create_object_from_sockaddr): Fix typo.
19318         (create_sockaddr_from_object): Check array lengths before
19319         potentially accessing items off the end.
19320         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
19321         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
19322         (ves_icall_System_Net_Sockets_Socket_Send_internal)
19323         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
19324         length checks to avoid wraparound overflows.
19325         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
19326         contents of the array of sockets
19327         (hostent_to_IPHostEntry2)
19328         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
19329         Check return value of inet_ntop ().
19330         (addrinfo_to_IPHostEntry): Fix typo
19332 2006-02-16  Raja R Harinath  <rharinath@novell.com>
19334         Type metadata parsing doesn't use generic-instantiation information.
19335         * metadata.c (mono_metadata_parse_array_full): Change
19336         MonoGenericContext* parameter to MonoGenericContainer*.
19337         (mono_metadata_parse_type_full): Likewise.
19338         (mono_type_create_from_typespec_full): Likewise.
19339         (mono_metadata_parse_mh_full): Likewise.
19340         (mono_metadata_parse_generic_inst): Likewise.
19341         (do_mono_metadata_parse_generic_class): Likewise.
19342         (do_mono_metadata_parse_type): Likewise.
19343         * metadata-internals.h: Update to changes.
19344         * class.c (mono_class_find_enum_basetype): Likewise.
19345         (mono_class_setup_fields): Likewise.
19346         (mono_class_create_from_typespec): Likewise.
19347         * loader.c (method_from_methodspec): Likewise.
19348         (mono_get_method_from_token): Likewise.
19349         (mono_method_get_header): Likewise.
19351 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
19353         * marshal.c: handle additional GENERICINST case (patch from
19354         Thong Nguyen <tum@veridicus.com>).
19355         Fix a few cases where LDIND_I/STIND_I was used for references.
19357 2006-02-16  Raja R Harinath  <rharinath@novell.com>
19359         * reflection.c (mono_reflection_get_token): Remove unused variable.
19361 2006-02-16  Martin Baulig  <martin@ximian.com>
19363         * reflection.c (mono_reflection_get_token): Add support for fields
19364         in instantiated generic types.
19366         * icall.c
19367         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
19369 2006-02-15  Martin Baulig  <martin@ximian.com>
19371         * icall.c
19372         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
19373         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
19374         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
19375         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
19377 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
19379         * class.c, metadata.c, metadata.h, object.c, icall.c,
19380         marshal.c: changed mono_type_get_underlying_type () to do
19381         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
19382         Fixed handling of instantiated generic valuetypes (bug #75479).
19384 2006-02-15  Raja R Harinath  <rharinath@novell.com>
19386         * metadata.c (mono_metadata_decode_signed_value): Simplify.
19387         Delegate to mono_metadata_decode_value, and work on the returned value.
19389         * icall.c (ves_icall_MonoType_GetGenericArguments):
19390         Add consistency check here too.
19391         
19392 2006-02-15  Ankit Jain  <jankit@novell.com>
19394         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
19395         char/short etc.
19397 2006-02-15  Ankit Jain  <jankit@novell.com>
19399         * metadata.c (mono_metadata_decode_signed_value): New function to decode
19400         signed values, used only for representing lower bounds of arrays.
19401         (mono_metadata_parse_array_full): Use new
19402         mono_metadata_decode_signed_value to decode lower bounds.
19404 2006-02-14  Martin Baulig  <martin@ximian.com>
19406         * reflection.c
19407         (mono_reflection_get_token): Support "MonoGenericMethod" and
19408         "MonoGenericCMethod" and allow generic instances / methods.
19410 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
19412         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
19413         to obtain the terminal size using an ioctl.
19415         * object.c (mono_nullable_init): Revert this as nullable reference
19416         types are not valid.
19417         (mono_nullable_box): Ditto.
19419 2006-02-09  Dick Porter  <dick@ximian.com>
19421         * threads.c (mono_thread_detach): Drop a reference to the thread
19422         we're detaching.
19424 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
19426         * object.c (mono_nullable_init): Handle nullable reference types.
19427         (mono_nullable_box): Ditto. Fixes #77446.
19429 2006-02-07  Martin Baulig  <martin@ximian.com>
19431         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
19433 2006-02-07  Ankit Jain  <jankit@novell.com>
19435         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
19436         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
19437         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
19438         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
19439         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
19440         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
19442 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
19444         * class.c (mono_class_create_generic): Set type_token as well.
19446         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
19447         compatible with MS.
19449 2006-02-02  Martin Baulig  <martin@ximian.com>
19451         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
19452         has never been used so far.
19454 2006-02-02  Martin Baulig  <martin@ximian.com>
19456         * mono-debug-debugger.h: Changed comment at the top of this file;
19457         the header is not installed, but it's safe to #include it from
19458         within the JIT.
19460         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
19461         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
19463 2006-02-02  Martin Baulig  <martin@ximian.com>
19465         * mono-debug.h
19466         (MonoSymbolTable): Removed the `metadata_info' field.
19468         * mono-debug.c
19469         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
19471         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
19472         (mono_debugger_add_builtin_types): Removed.
19473         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
19474         (mono_debugger_create_notification_function): We now operate on a
19475         pre-allocated area; take a `gpointer' and return `void'.
19477         * mono-debug-debugger.c
19478         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
19479         (mono_debugger_add_builtin_types): Removed.
19481 2006-02-02  Martin Baulig  <martin@ximian.com>
19483         * threads.c (mono_debugger_create_all_threads): New public method.
19485 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
19487         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
19488         breaks on several platforms.
19490 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
19492         * assembly.c: the VS.NET build doesn't supply default values for
19493         MONO_ASSEMBLIES and MONO_CFG_DIR.
19495 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
19497         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
19498         helper function.
19500         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
19502         * loader.c (method_from_memberref): Fix a warning.
19504         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
19506         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
19507         with explicit layout. Fixes #77433.
19509 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
19511         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
19512         max_interface_id is initialized before using it. Fixes #77398.
19513         (ves_icall_Type_GetInterfaces): Ditto.
19515 2006-01-30  Raja R Harinath  <rharinath@novell.com>
19517         * metadata.c (mono_metadata_parse_method_signature_full): Don't
19518         allocate memory for parameter attributes when parsing memberref
19519         signatures.
19520         * loader.c (mono_loader_set_error_method_load): Don't warn.
19521         (method_from_memberref): Ensure MissingMethodException gets thrown
19522         if method is not found.  Make warning more informative.
19524 2006-01-29  Raja R Harinath  <harinath@gmail.com>
19526         Fix #77397
19527         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
19528         return true if is byref.
19529         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
19530         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
19531         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
19533 2006-01-27  Raja R Harinath  <rharinath@novell.com>
19535         Fix tests/find-method.2.il
19536         * loader.c (find_method, find_method_in_class): Remove is_inflated
19537         argument.  Revert 2006-01-18 change.
19538         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
19539         is generic, search for method in its generic definition.
19540         * class.c (mono_class_setup_vtable_general): Print generic
19541         arguments of generic types in debugging printf.
19543 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
19545         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
19547         * threads.c (mono_threads_request_thread_dump): New helper function.
19549 2006-01-25  Raja R Harinath  <rharinath@novell.com>
19551         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
19553 2006-01-25  Ankit Jain  <jankit@novell.com>
19555         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
19556         move definition to ..
19557         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
19558         
19559 2006-01-25  Ankit Jain  <jankit@novell.com>
19560             Raja R Harinath  <rharinath@novell.com>
19562         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
19563         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
19564         as necessary.
19566 2006-01-25  Martin Baulig  <martin@ximian.com>
19568         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
19569         `MonoDebuggerThread' into debug-debugger.c.
19571 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
19573         * profiler.c: fix printing of data.
19575 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
19577         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
19578           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
19580 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
19582         * object.c: fix deadlock related to string interning.
19584 2006-01-23  Martin Baulig  <martin@ximian.com>
19586         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
19588         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
19590 2006-01-23  Martin Baulig  <martin@ximian.com>
19592         * mono-debug.h: Moved the prototypes of some functions which are
19593         used by the JIT here from mono-debug-debugger.h.
19595 2006-01-21  Martin Baulig  <martin@ximian.com>
19597         * Makefile.am: Don't install mono-debug-debugger.h.
19599 2006-01-21  Martin Baulig  <martin@ximian.com>
19601         * mono-debug-debugger.h: Enforce the private status of this header
19602         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
19603         Moved some stuff from mono-debugger-jit-wrapper.h here.
19605 2006-01-20  Raja R Harinath  <rharinath@novell.com>
19607         * class.c (mono_class_from_typeref): Add a sanity test to help
19608         catch lack of assembly load/search hooks.
19610 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
19612         * marshal.c (emit_struct_conv): Relax the fields with same offset
19613         check even more. Fixes #77230.
19615 2006-01-18  Martin Baulig  <martin@ximian.com>
19617         * loader.c (find_method_in_class): Added `gboolean is_inflated'
19618         argument; if false, we compare the uninstantiated signatures.
19619         (method_from_memberref): Compare the uninstantiated signatures;
19620         fixes #76417.
19622 2006-01-18  Robert Jordan  <robertj@gmx.net>
19624         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
19625         Clear the weak link. Fixes bug #77170.
19627         * gc.c (mono_gchandle_free):
19628         Reflect *-gc.c changes (tiny optimization).
19630 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
19632         * metadata.c (mono_metadata_signature_dup): Applied patch from
19633         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
19634         Fixes #77288.
19636 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
19638         * marshal.c (emit_struct_conv): Allow fields with the same offset when
19639         marshalling from native to managed code. Fixes #77230.
19641 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19643         * threadpool.c: fix problem (Mac only) when more than one asynchronous
19644         connect. Fixes bug #77020.
19646 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
19648         * class.c: fixed id assignement for nested interfaces (bug #77275).
19649         Added also better info for --print-vtable debugging.
19651 2006-01-12  Martin Baulig  <martin@ximian.com>
19653         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
19654         interfaces on-the-fly; fixes #76625.
19656         * class-internals.h
19657         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
19658         don't need that anymore.
19660 2006-01-12  Miguel de Icaza  <miguel@novell.com>
19662         * socket-io.c
19663         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
19664         To avoid initing the nested_classes when not needed I turned the
19665         PeerCredData as a toplevel internal class, as it has to be shared
19666         anyways. 
19668         Fixes the CASA issue.
19670 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
19672         * domain.c: Accessors for MonoJitInfo
19674         * profiler-private.h: Add jitinfo to the end jit hook
19676         * profiler.[ch]: Define new hooks, called after jitting which give
19677         the MonoJitInfo that was compiled
19679 2006-01-10  Martin Baulig  <martin@ximian.com>
19681         * class.c (mono_class_setup_events): Add support for generic
19682         classes; fixes #76440.
19684 2006-01-06  Raja R Harinath  <rharinath@novell.com>
19686         Fix #77160.
19687         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
19688         on passed-in method.
19690 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
19692         * object.c (mono_runtime_invoke_array): Add Nullable support.
19694         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
19696 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
19698         * file-io.c: Don't consider sockets as directory and avoid an endless
19699         loop. Fix bug #76966.
19701 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
19703         * object.c (mono_nullable_init): New helper function.
19704         (mono_nullable_box): Ditto.
19706         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
19708         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
19710         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
19711         
19712 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
19714         * class.c (mono_class_is_assignable_from): Make T assignable to 
19715         Nullable<T>.
19717 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
19719         * appdomain.c: Bump corlib version to 46.
19720         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
19721         serialization purpose) and changed ves_icall_System_Reflection_
19722         Assembly_get_code_base signature to accept a boolean (to escape, or 
19723         not, the assembly code base).
19725 2005-12-23  Dick Porter  <dick@ximian.com>
19727         * icall.c: 
19728         * threads-types.h: 
19729         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
19730         CreateEvent icall now returns "created" boolean parameter.
19732 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
19734         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
19735         #76967.
19737         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
19738         when attr_klass is an interface. Fixes #77045.
19740 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
19742         * marshal.c (emit_struct_conv): Fix previous patch.
19743         
19744         * marshal.c (emit_struct_conv): Add a check for fields with the same
19745         offset.
19747 2005-12-20  Raja R Harinath  <rharinath@novell.com>
19749         Fix regression in Mono.C5.
19750         * class.c (mono_class_create_generic): If 'klass' is an interface
19751         set up the interface offsets.
19752         (mono_class_is_assignable_from): Don't throw away generic arguments.
19754 2005-12-19  Raja R Harinath  <rharinath@novell.com>
19756         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
19757         type parameters.
19759 2005-12-15  Raja R Harinath  <rharinath@novell.com>
19761         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
19762         dead store.
19763         (do_mono_metadata_parse_generic_class): Don't pass the current
19764         generic context when parsing the type being instantiated: it
19765         cannot use it, anyway.
19767         * loader.c (method_from_memberref): Don't inflate a signature if
19768         it doesn't contain any type parameters.
19770 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
19772         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
19774 2005-12-14  Martin Baulig  <martin@ximian.com>
19776         * class.c
19777         (mono_type_get_name_recurse): Don't return null for type
19778         parameters and open generic classes.
19779         (mono_class_setup_methods): Don't exclude generic instances.
19780         (mono_get_unique_iid): Use different IDs for different
19781         instantiations of the same generic type.
19782         (mono_class_setup_vtable): Only use setup_generic_vtable() for
19783         open generic instances; create a normal vtable for closed generic
19784         instances.
19785         (mono_class_setup_vtable_general): We're now also called for
19786         closed generic instances.
19788         * reflection.c
19789         (mono_reflection_bind_generic_parameters): Correctly use
19790         mono_metadata_lookup_generic_inst() everywhere.
19792 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
19794         * object.c (mono_class_create_runtime_vtable): Call 
19795         mono_class_setup_vtable ().
19797         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
19798         function.
19799         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
19800         #76959.
19802         * loader.c (mono_loader_set_error_type_load): Print the type load
19803         warnings to the console so they are more visible to the user.
19804         (mono_loader_set_error_method_load): Ditto.
19806         * reflection.c (ensure_runtime_vtable): Revert the last change as it
19807         is still broken.
19808         
19809         * reflection.c (ensure_runtime_vtable): Fix build.
19811         * reflection.c (ensure_runtime_vtable): Disable an optimization which
19812         doesn't work in all cases.
19814 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
19816         * object.c (mono_array_new_full): Treat a single dimensional array
19817         with 0 lower bounds as an szarray. Fixes #76973.
19819         * reflection.c (custom_attr_visible): Really fix this.
19821 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
19823         * reflection.c (custom_attr_visible): Allow nested public attributes
19824         as well.
19826         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
19827         interface check.
19829 2005-12-12  Raja R Harinath  <harinath@gmail.com>
19831         * class.c (set_generic_param_owner): Delete.
19832         (mono_class_create_from_typedef): Don't set ->owner field of
19833         generic parameters to "param containers" of enclosing classes.
19834         * reflection.c (mono_reflection_initialize_generic_parameter):
19835         Likewise.
19837 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
19839         * reflection.c (custom_attr_visible): Fix build.
19841 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
19843         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
19844         private attributes.
19845         
19846         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
19847         handling of null parameter defaults.
19849 2005-12-09  Raja R Harinath  <rharinath@novell.com>
19851         * class.c (mono_class_from_generic_parameter): Don't set
19852         klass->generic_container.
19853         (my_mono_class_from_generic_parameter): Likewise.
19855 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
19857         * reflection.c (load_public_key): Fix a warning.
19858         (method_encode_code): Fix unaligned accesses.
19860 2005-12-07  Martin Baulig  <martin@ximian.com>
19862         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
19864         * reflection.c
19865         (write_generic_param_entry): Encode our custom attrs.
19867         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
19869 2005-12-07  Martin Baulig  <martin@ximian.com>
19871         * reflection.c (encode_new_constraint): Removed; we don't use the
19872         `NewConstraintAttribute' anymore.
19874 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
19876         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
19877         not fire a TypeResolve event when Assembly.GetType () is called.
19879 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
19881         Beginning of support for nullable types in the runtime. Parts of
19882         this patch are from Martin.
19884         * appdomain.c (MONO_CORLIB_VERSION): Bump
19886         * domain.c (mono_init_internal): get the nullable type
19888         * class.c (mono_class_is_nullable): New method
19889         (mono_class_get_nullable_param): New mehod
19890         (mono_class_create_generic): In types T? set cast_class to T
19892         * class-internals.h (MonoDefaults): new nullable default class
19893         (mono_class_get_nullable_param, mono_class_get_nullable_param):
19894         new methods.
19896 2005-12-05  Raja R Harinath  <rharinath@novell.com>
19898         * metadata.c (select_container): New.  Refactor code to select the
19899         appropriate GenericContainer given the type of generic parameter
19900         we are looking for.
19901         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
19902         not a MonoGenericContext.  Use select_container.  Update parameters.
19903         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
19904         and MONO_TYPE_MVAR.
19905         (unwrap_arrays): Remove duplicate tests.
19906         (find_generic_param): Rename from 'has_same_context'.  Now walks a
19907         generic instantiated class to find any arguments that are generic
19908         parameters.
19909         (mono_type_create_from_typespec_full): Use find_generic_param to
19910         avoid evicting some generic instantiations from the typespec
19911         cache.
19913 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
19915         * reflection.c: fixed writing of doubles on ARM FPA.
19917 2005-12-02  Robert Jordan  <robertj@gmx.net>
19919         * icall.c: Fixed EventInfo.ReflectedType (#76829).
19921 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19923         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
19924         least on SUSE 10 they are not the same (on debian, they are just the
19925         same thing).
19927 2005-12-01  Raja R Harinath  <rharinath@novell.com>
19929         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
19930         DeclaringType for VARs and MVARs.
19931         * class.c (set_generic_param_owner): Fix initialization of owner
19932         fields.
19934 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
19936         * icall.c: fixed Enum.ToObject() to correctly convert the values.
19938 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19940         * threadpool.c: workaround for a bug that shows up on the Mac:
19941         select()+connect() on a blocking socket is not like it should
19942         be, so we proceed to connect() in that case, wasting the I/O
19943         threadpool thread until connect succeedes. Fixes bug #75436.
19945 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19947         * threadpool.c: fix typo when setting file descriptor states.
19949 2005-11-28  Raja R Harinath  <rharinath@novell.com>
19951         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
19952         * metadata.c (mono_metadata_parse_method_signature_full): Don't
19953         create a temporary signature container.
19954         (mono_metadata_parse_generic_param): Update to changes.
19955         (mono_type_create_from_typespec_full): Update to changes.
19956         * loader.c (method_from_memberref): Don't use a
19957         MonoGenericContainer while parsing a memberref signature.
19958         (method_from_methodspec): Remove dead-store of the 'container'
19959         variable.  It's overwritten before use.
19961         * metadata.c (mono_type_create_from_typespec_full): Make debugging
19962         checks tighter.
19963         (mono_metadata_parse_generic_param): Likewise.
19964         * loader.c (find_method_in_class): Does not need a
19965         MonoGenericContainer.  Use 'mono_method_signature' rather than
19966         'mono_method_signature_full'.
19967         (find_method, mono_get_method_constrained, method_from_memberref):
19968         Update to changes.
19970         * metadata.c (mono_type_create_from_typespec_full): Ensure that
19971         owner-less generic-parameters are never evicted from the typespec
19972         cache.
19974         * loader.c (method_from_memberref): Don't use the current context
19975         when parsing signatures.
19976         (method_from_methodspec, mono_get_method_from_token): Update to changes.
19978         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
19979         side-effects in g_assert.
19980         * loader.c (mono_get_method_from_token): Resolve klass earlier so
19981         that we don't potentially lose information.
19983 2005-11-26  Dick Porter  <dick@ximian.com>
19985         * icall.c:
19986         * threads.c: icalls to implement basic (ie, not named)
19987         System.Threading.Semaphore.
19989 2005-11-24  Dick Porter  <dick@ximian.com>
19991         * process.c
19992         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
19993         Use GetProcessId() if it's available.
19995 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
19997         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
19999 2005-11-23  Raja R Harinath  <rharinath@novell.com>
20000             Ankit Jain  <jankit@novell.com>
20002         * loader.c (mono_get_method_from_token): Initialize 'method' field
20003         of all generic parameters before parsing the signature.  Remove
20004         code that "fixed"-up MVAR references.
20006 2005-11-23  Ankit Jain  <jankit@novell.com>
20008         * metadata.c (mono_metadata_has_generic_params):
20009         (mono_metadata_load_generic_param_constraints):
20010         (mono_metadata_load_generic_params): Move duplicate code ...
20011         (mono_metadata_get_generic_param_row): ... here. Returns the
20012         first row-id in GenericParam table for a given owner (token).
20013         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
20014         prototype.
20016 2005-11-23  Raja R Harinath  <rharinath@novell.com>
20017             Ankit Jain  <jankit@novell.com>
20019         * metadata.c (mono_metadata_class_equal): Pass signature_only when
20020         comparing VARs too.
20021         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
20022         type->data.generic_param only if the type is an MVAR.
20023         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
20024         leak owner-less VARs and MVARs into managed space.
20026 2005-11-21  Martin Baulig  <martin@ximian.com>
20028         * class-internals.h
20029         (MonoMethod): Moved the `generic_container' here from
20030         `MonoMethodNormal' since we now also need it for
20031         `MonoMethodPInvoke';
20032         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
20033         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
20034         an union containing both `MonoMethodNormal' and
20035         `MonoMethodPInvoke'.
20037         * loader.c
20038         (mono_get_method_from_token): Allow implementing generic methods
20039         as interncalls.
20041         * threads.c
20042         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
20043         icall.
20045 2005-11-17  Dick Porter  <dick@ximian.com>
20047         * icall.c: 
20048         * process.h: 
20049         * process.c: Split the Process Start_internal icall into
20050         ShellExecuteEx_internal and CreateProcess_internal, which are
20051         called depending on whether UseShellExecute is true.  Fixes bug
20052         76670.
20054         * appdomain.c (MONO_CORLIB_VERSION): Incremented
20056 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
20058         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
20059         'msize' parameters, use the information in 'mspec' instead.
20060         (emit_object_to_ptr_conv): Ditto.
20062         * marshal.c (emit_struct_conv): Handle explicit layout structs with
20063         fields out of order. Fixes #76733.
20065 2005-11-17  Ankit Jain  <jankit@novell.com>
20067         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
20069 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
20071         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
20072           bug #76575.
20074 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
20076         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
20077         for types with non-auto layout. Fixes #76717.
20079 2005-11-16  Ankit Jain  <jankit@novell.com>
20081         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
20082         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
20083         if generic_context is null.
20084           (mono_metadata_generic_param_equal): param->owner can be null.
20085           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
20086         null.
20088 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
20090         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
20091         the correct value.
20093 2005-11-15  Martin Baulig  <martin@ximian.com>
20095         * object.c (set_value): Use mono_class_from_mono_type() instead of
20096         the hack for generic instances; fixes #76136.
20098 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
20100         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
20101         fields.
20103         * image.c (load_metadata_ptrs): Initialize the new fields.
20105         * reflection.c (create_dynamic_mono_image): Ditto.
20107         * reflection.c (build_compressed_metadata): Use the new fields.
20109         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
20110         icall.
20112         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
20113         icall.
20114         
20115 2005-11-15  Ankit Jain  <jankit@novell.com>
20116             Raja R Harinath  <harinath@gmail.com>
20118         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
20119         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
20120         new per-generic_container cache if the cached MonoType's context matches
20121         the current context.
20122           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
20123         to the expected context.
20124           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
20126 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
20128         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
20129         we changed the signature of an icall.
20130         * icall.c: Modify to mono_double_ParseImpl return true/false 
20131         depending on the success, instead of throwing the exception. This will
20132         help us in Double.TryParse methods.
20133         
20134 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
20136         * marshal.c (emit_marshal_object): Throw an exception when
20137         marshalling 'object' instead of crashing. Fixes #76696.
20139 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
20141         * class-internals.h: Add prototype for mono_type_get_full_name ().
20143 2005-11-11  Dick Porter  <dick@ximian.com>
20145         * threads.c (mono_thread_manage): Make sure the main thread has
20146         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
20148 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
20150         * loader.c (mono_loader_set_error_type_load): Log a warning to the
20151         console about the missing type.
20152         (mono_loader_set_error_method_load): Ditto.
20154 2005-11-09  Miguel de Icaza  <miguel@novell.com>
20156         * mono-config.c (mono_get_config_dir): Set the system defaults if
20157         none is specified.
20159         * assembly.c (mono_set_dirs): New API entry point to set the
20160         assembly and the config directory in one call
20162 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
20164         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
20165         the ftnptr was created from a delegate in a domain other than the
20166         current domain. Fixes #75377.
20168         * exception.h exception.c: Add mono_get_exception_not_supported ().
20170 2005-11-08  Martin Baulig  <martin@ximian.com>
20172         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
20174 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
20176         * security-manager.h: Added definitions to deal with strongname key 
20177         pairs bigger (and smaller) than 1024 bits.
20178         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
20179         adjust wrt the public key length being used.
20181 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
20183         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
20184           Windows build (r51396-51397).
20186 2005-11-03  Martin Baulig  <martin@ximian.com>
20188         * class.c (mono_class_setup_vtable_general): Also add generic
20189         methods to the vtable; fixes #76581.
20191 2005-11-01  Miguel de Icaza  <miguel@novell.com>
20193         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
20194         sure that we lookup GetString method from the System.Text.Encoding
20195         class, not the derived class or we get an empty method.
20197         Fixed class #76612.
20199 2005-10-25  Miguel de Icaza  <miguel@novell.com>
20201         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
20202         if it has been previously set (embedders). 
20204         Make mono_set_rootdir available also on Unix.
20206 005-10-24  Robert Jordan  <robertj@gmx.net>
20208         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
20210 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
20212         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
20213         only calls which are made to native code use this flag.
20215         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
20217 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
20219         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
20220         Add support for FieldBuilders.
20222 2005-10-29  Martin Baulig  <martin@ximian.com>
20224         * mono-debug.c
20225         (mono_debug_using_mono_debugger): New public method; returns
20226         whether we're running inside the debugger.
20228 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
20230         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
20231         for Method/Constructor/FieldBuilders.
20233 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
20235         * reflection.c (module_add_cattrs): Save custom attributes for global methods
20236         and fields as well.
20238 2005-10-26  Martin Baulig  <martin@ximian.com>
20240         * mono-debug-debugger.c
20241         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
20243 2005-10-24  Raja R Harinath  <harinath@gmail.com>
20245         * icall.c (base64_to_byte_array): Don't pass an out-of-range
20246         integer to isspace.
20248 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
20250         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
20251         when passing valuetypes byref. Fixes #76502.
20253 2005-10-19  Jackson Harper  <jackson@ximian.com>
20255         * profiler.c: Don't put a . in front of types that are not in a
20256         namespace.
20258 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
20260         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
20262 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
20264         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
20265         #76436.
20266         (mono_marshal_get_ldflda_wrapper): Fix a warning.
20268 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
20270         * assembly.c metadata-internals.h icall.c: Define an additional
20271         parameter for mono_assembly_name_parse_full, so we can avoid creating
20272         S.R.AssemblyName.Version when no version info wasn't passed.
20273         
20274 2005-10-09  Miguel de Icaza  <miguel@novell.com>
20276         * class.c (mono_type_get_full_name): Reimplement method that was
20277         removed. 
20279         * image.c: Some docs
20281 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
20283         * profiler.c (output_newobj_profile): Fix printing of Total memory
20284         on x86.
20286 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
20288         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
20290 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
20292         * threads.c: remove debug output.
20294 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
20296         * threads.c (mono_thread_manage): Fix crashes if more than 64
20297         threads need to be aborted. Hopefully fixes #75899.
20299         * assembly.c (mono_stringify_assembly_name): New helper function.
20301         * class.c: Use mono_stringify_assembly_name instead of the similar
20302         static function.
20304         * assembly.h assembly.c: Add support for calling a postload search 
20305         hook if an assembly cannot be loaded.
20307         * appdomain.c: Register new search hooks which call the AssemblyResolve
20308         events in AppDomain. Fixes #75231
20310 2005-10-07  Martin Baulig  <martin@ximian.com>
20312         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
20313         methods without debug info.
20315 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
20317         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
20318         wrappers.
20320 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20322         * file-io.c: now that we return symlinks, use lstat and, when the file
20323         is a symbolic link, stat, to get the file attributes. Also avoid the
20324         conversion to/from utf16/external.
20326 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
20328         * class.c (mono_class_layout_fields): Compute klass->has_references
20329         correctly if an embedded valuetype is not yet initialized. Fixes
20330         #76331.
20332 2005-10-04  Martin Baulig  <martin@ximian.com>
20334         * metadata.c
20335         (mono_metadata_load_generic_param_constraints): New public
20336         function; splitted the constraints loading out from
20337         mono_metadata_load_generic_params().
20339         * class.c (mono_class_create_from_typedef): Call
20340         mono_metadata_load_generic_param_constraints() after setting up
20341         the type and creating our parent; fixes #75329.
20343 2005-10-04  Martin Baulig  <martin@ximian.com>
20345         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
20346         non-dynamic parent classes.
20348 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
20350         * file-io.c : win32 build fix (ETXTBSY seems not found).
20352 2005-10-04  Martin Baulig  <martin@ximian.com>
20354         * reflection.c
20355         (mono_image_get_methodspec_token): Make the cache actually work;
20356         fixes #75974.
20358 2005-10-04  Martin Baulig  <martin@ximian.com>
20360         * class.c (mono_class_name_from_token): Removed the unneccessary
20361         `MonoGenericContext *' argument.
20363 2005-10-04  Martin Baulig  <martin@ximian.com>
20365         * loader.c
20366         (method_from_methodspec): Make the caching work again; fixes the
20367         performance regression from #76262.
20369 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20371         * file-io.c:
20372         * file-io.h:
20373         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
20374         GetFileSystemEntries that performs the same work but without going
20375         into io-layer, locking, etc.
20377 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
20379         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
20380         ThreadState_Stopped as well. Fixes #76047.
20382 2005-09-29  Martin Baulig  <martin@ximian.com>
20384         * class.c
20385         (inflate_generic_context): If the new context has a `gmethod', set
20386         its `container' that that gmethod's `container'.
20388         * metadata.c
20389         (mono_metadata_parse_generic_param): Simplify things;
20390         `generic_container = generic_context->container;' is just fine.
20392         * loader.c (method_from_methodspec): Code cleanups.
20394 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
20396         * decimal.c: fix warning (and let gcc generate correct
20397         code on ARM with optimizations).
20399 2005-09-28  Martin Baulig  <martin@ximian.com>
20401         * loader.c
20402         (method_from_memberref): Added `MonoGenericContext *class_context'
20403         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
20404         (method_from_methodspec): If we're a memberref, use the enclosing
20405         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
20407 2005-09-28  Martin Baulig  <martin@ximian.com>
20409         * object.c (mono_runtime_invoke_array): Added support for
20410         MONO_TYPE_GENERICINST; fixes #75917.
20412 2005-09-27  Martin Baulig  <martin@ximian.com>
20414         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
20415         `k->byval_arg.type' to determine the actual type.
20417         * loader.c (method_from_methodspec): Removed some hacks.
20419 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
20421         * class-internals.h (mono_field_is_deleted): Do the test for
20422         rtspecialname before we check the actual name of the field. This
20423         prevents us from dereferencing a pointer into the string table,
20424         saving us from accessing a few pages
20426         * *.c: Replace the use of {Enter,Leave}CriticalSection with
20427         macros. This will allow a deadlock debugger to easily be plugged
20428         in.
20430 2005-09-27  Martin Baulig  <martin@ximian.com>
20432         * loader.c (method_from_methodspec): Create a "signature"
20433         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
20435 2005-09-27  Martin Baulig  <martin@ximian.com>
20437         * class.c
20438         (inflate_generic_class): Correctly set the new context's
20439         container.
20441         * loader.c
20442         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
20443         instead of a `MonoGenericContext *'.
20444         (mono_method_signature_full): Take a `MonoGenericContainer *'
20445         instead of a `MonoGenericContext *'.
20447         * metadata.c
20448         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
20449         instead of a `MonoGenericContext *'.
20450         (mono_metadata_parse_method_signature_full): Likewise.
20452 2005-09-26  Martin Baulig  <martin@ximian.com>
20454         * class.c
20455         (mono_class_from_generic_parameter): Set `klass->generic_container'
20456         (mono_class_from_generic_parameter): Likewise.
20457         (mono_bounded_array_class_get): We inherit the generic container
20458         from the element class.
20460         * loader.c
20461         (find_method, find_method_in_class): Take a `MonoGenericContext *'
20462         argument rather than computing it here.
20463         (method_from_memberref): Correctly set the generic context before
20464         parsing the signature.  Fixes #75681.
20466 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
20468         * object.c (mono_class_has_special_static_fields): Fix warnings.
20470 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
20472         * assembly.c: Add parse_public_key function, to
20473         par the public keys. Also added mono_assembly_name_parse_full,
20474         to define it the parsed key should be freed or not.
20475         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
20476         to parse a long format assembly name.
20477         * metadata-internals.h: Keep mono_assembly_name_parse_full as
20478         private, since calling it to preserve the key requires
20479         freeing it manually.
20480         
20481 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
20483         * locales.c : removed HAVE_ICU part.
20485 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
20487         * object.c (mono_class_create_runtime_vtable): Avoid calling 
20488         field_is_special_static if the klass has no special static fields.
20490         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
20491         (MonoCachedClassInfo): Likewise.
20493         * object.c (mono_class_has_special_static_fields): New helper function.
20495 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
20497         * class.c (mono_class_create_from_typedef): Don't call 
20498         interfaces_from_typedef_full for enums.
20499         (mono_class_create_from_typedef): Compute the base types of enums directly
20500         without calling mono_class_setup_fields ().
20501         (mono_class_find_enum_basetype): New helper function.
20503         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
20504         one place inside the string heap.
20505         
20506 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
20508         * class.c: locking fixes, code cleanups, some docs added.
20509         Allocate some data structures in the image mempool.
20511 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
20513         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
20514         the example code.
20515         
20516 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
20518         * class-internals.h, class.c, reflection.c: reduce memory taken by
20519         MonoClass.
20521 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
20523         * metadata.c, metadata.h, loader.h: documentation updates, code and
20524         API cleanups.
20526 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
20528         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
20529         the example code.
20531         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
20532         page faults caused by the runtime while reading metadata.
20534 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20536         * socket-io.c: the field names were changed 3 months ago and no one
20537         realized until bug #76077 got filed!
20539 2005-09-20  Martin Baulig  <martin@ximian.com>
20541         * icall.c (assembly_icalls): Removed some unused debugger icalls.
20543 2005-09-20  Martin Baulig  <martin@ximian.com>
20545         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
20546         write the rank into the class entry.
20548 2005-09-20  Martin Baulig  <martin@ximian.com>
20550         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
20552 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
20554         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20556         * icall.c (custom_attrs_defined_internal): New icall.
20558         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
20559         function.
20560         (mono_custom_attrs_construct_by_type): New helper function.
20562 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
20564         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
20565         terminate the resulting string. Fixes #76123.
20567 2005-09-16  Martin Baulig  <martin@ximian.com>
20569         * mono-debug.c
20570         (mono_debug_add_method): Ignore inflated methods for the moment.
20572 2005-09-14  Martin Baulig  <martin@ximian.com>
20574         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
20576 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
20578         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
20579         return a success/failure indication.
20580         (mono_metadata_interfaces_from_typedef_full): Ditto.
20581         (get_constraints): Ditto.
20583 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
20585         * marshal.c (emit_marshal_array): Fix handling of null arrays.
20586         
20587         * marshal.c (emit_marshal_array): Add support for returning string
20588         arrays from delegates. Fixes #76063.
20590         * marshal.c: Use the emit_ldloc/stloc macros where possible.
20592 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
20594         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
20595         icall.
20597 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
20599         * reflection.c icall.c: Fix after mono_get_exception_type_load
20600         signature change.
20602         * assembly.c (mono_assembly_get_assemblyref): New helper function.
20603         (mono_assembly_load_reference): Use the new helper.
20605         * class-internals.h (MonoLoaderError): New structure containing 
20606         information about type loading errors.
20608         * class-internals.h loader.c: Add APIs to store per-thread loader
20609         error information.
20611         * loader.c class.c: Set the loader error if needed.
20613         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
20615 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
20617         * decimal.c: fixed to handle the broken ARM fp format.
20619 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
20621         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
20622         broken.
20624 2005-09-06  Martin Baulig  <martin@ximian.com>
20626         * domain.c (supported_runtimes): Added v2.0.50727.
20628 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
20630         * culture-info.h: reduce the size of some structures.
20632 2005-09-05  Martin Baulig  <martin@ximian.com>
20634         Reflect latest API changes in the August CTP.
20636         * icall.c
20637         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
20638         ("MonoType.HasGenericArguments"): Removed.
20639         ("MonoMethod.BindGenericParameters"): Renamed to
20640         "MakeGenericMethod".
20641         ("MethodBuilder.BindGenericParameters"): Renamed to
20642         "MakeGenericMethod".    
20644 2005-09-05  Martin Baulig  <martin@ximian.com>
20646         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
20648 2005-09-05  Martin Baulig  <martin@ximian.com>
20650         Applying a patch from Michal Moskal <malekith@nemerle.org>.
20652         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
20653         generic_container is non-NULL.
20655 2005-09-05  Martin Baulig  <martin@ximian.com>
20657         Applying a patch from Michal Moskal <malekith@nemerle.org>.
20659         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
20661 2005-08-29  Michal Moskal  <malekith@nemerle.org>
20663         * reflection.c (encode_locals,
20664         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
20665         for large generic types.
20667 2005-09-05  Martin Baulig  <martin@ximian.com>
20669         Applying a patch from Michal Moskal <malekith@nemerle.org>.
20671         * class.c (mono_dup_array_type): New public method.
20672         (mono_metadata_signature_deep_dup): New public method.
20673         (dup_type): Correctly duplicate array and function types.
20675 2005-09-05  Martin Baulig  <martin@ximian.com>
20677         Applying a patch from Michal Moskal <malekith@nemerle.org>.
20679         * reflection.c (get_default_param_value_blobs): Handle generic types
20680         and generic methods.
20682 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
20684         * class.c: Fixed error reporting (method/class were inversed) for 
20685         inheritance demands.
20686         * security-manager.c|h: Added the AppDomain when calling the managed
20687         System.Security.SecurityManager.InheritanceDemand method.
20689 2005-09-01  Raja R Harinath  <rharinath@novell.com>
20691         * reflection.c (encode_marshal_blob): 'marshaltype' and
20692         'marshaltyperef' are alternate sources for the custom marshaler
20693         name.
20695 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
20697         * class.c: fix creation of array classes with rank == 1
20698         (patch by Ankit Jain <jankit@novell.com>).
20700 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
20702         * object.c: fix check for creating the bound data for arrays vs
20703         szarrays.
20705 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20707         * object.c: configuration file name is now based on the executable name,
20708         not the image name. Fixes bug #75931.
20710 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
20712         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
20713         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
20715 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
20717         * rand.c: Use wincrypt.h instead of WinCrypt.h.
20719 2005-08-24  Ankit Jain  <jankit@novell.com>
20720             Raja R Harinath  <rharinath@novell.com>
20722         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
20723           called by it recursively.
20724           (mono_class_init): Remove special case in pending_init handling, since it's
20725           superseded by the fix to mono_class_from_typeref.
20727 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
20729         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
20730         BROKEN_THREAD_START stuff.
20732 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
20734         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
20735         trampoline.
20737         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
20738         
20739         * object.c (mono_delegate_ctor): Replace the original function address with
20740         a delegate trampoline.
20742 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
20744         * icall.c: add boolean argument to base64_to_byte_array and 
20745         InternalFromBase64String to control whether a whitespace-only string
20746         is allowed (or should casue a FormatException to be thrown). We need
20747         this as the behavior has changed between MS.NET 1.x and 2.0, and we
20748         to match the MS behaviour in both profiles.
20749         * appdomain.c: Bump corlib version.
20751 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
20753         This patch implements a big portion of publisher policy
20754         support, used to bind assembly versions and redirect
20755         one assembly from version A to version B.
20757         * assembly.c:
20758         New GSList loaded_assembly_bindings, for storing the cached
20759         assembly bindings.
20760         (assembly_binding_maps_name): New static function for checking if a 
20761         assembly binding information maps an assembly name.
20762         (mono_assembly_binding_info_free): New function for freeing
20763         assembly binding information resources.
20764         (get_publisher_policy_info): New static function for retrieving 
20765         assembly binding information from a MonoImage.
20766         (compare_versions): New static function for comparing an assembly
20767         binding information data and the version of an assembly name.
20768         (check_policy_versions): New static function for checking if an
20769         assembly binding info mapping an assembly name is valid for it.
20770         (mono_assembly_load_publisher_policy): New static function for
20771         loading the 'policy.major.minor.MyAssembly' image for an assembly
20772         with an assembly name 'aname'.
20773         (mono_assembly_bind_version): New static function for updating
20774         assembly redirection.
20775         (mono_assembly_apply_binding): New static function for applying
20776         assembly binding.
20777         (search_binding_loaded): New static function for searching 
20778         loaded assembly binding infos in the cache domain.
20779         (mono_assembly_load_full): Don't apply assembly binding for
20780         reflection only assemblies.
20782         * metadata-internals.h: Add MonoAssemblyBindingInfo,
20783         which contains information about assembly binding. Also
20784         declare signature for mono_config_parse_publisher_policy ()
20785         function, used to retrieve pub policy info.
20786         
20787         * mono-config.c:
20788         (publisher_policy_start): New static function used to parse publisher 
20789         policy config files.
20790         (publisher_policy_parser): New static MonoParseHandler containing 
20791         the functions used when parsing config files.
20792         (mono_config_parse_publisher_policy): New function for parsing
20793         publisher policy files.
20794         
20795 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
20797         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
20799         * marshal.c (mono_delegate_free_ftnptr): Ditto.
20801         * object.c (mono_get_addr_from_ftnptr): New helper function.
20803         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
20805         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20807 2005-08-19  Dick Porter  <dick@ximian.com>
20809         * threads.c, threads.h, appdomain.c, appdomain.h,
20810         profiler-private.h, monitor.c, object.c, object-internals.h,
20811         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
20812         store the thread ID, so it can hold a 64 bit value if needed.
20814 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
20816         * reflection.c (mono_reflection_create_dynamic_method): Store the
20817         handle class into the method references as well so ldtoken works in
20818         dynamic methods.
20820         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
20821         types.
20823 2005-08-19  Ankit Jain <jankit@novell.com>
20825         Fix #75847.
20826         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
20827           here rather than using the method signature of a arbitrary function
20828           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
20829           two arguments.
20830           Hack done with Harinath.
20832 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20834         * threadpool.c: disable printing stack traces when we get a exception
20835         in a threadpool thread. I need to do more testing to figure out which
20836         cases actually print this. Fixes bug #75828.
20838 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20840         * icall.c: there might be ignored whitespace after the last '='. This
20841         fixes length computation and bug #75840.
20843 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
20845         * assembly.c (mono_assembly_load_full): Consider .exe extension as
20846         well. Fixes #75809.
20848         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
20849         #75784.
20850         
20851         * reflection.c (create_custom_attr_data): Ditto.
20853 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
20855         * locales.c, culture-info.h : removed RegionLCIDMap.
20856         * culture-info-tables.h : regenerated.
20858 2005-08-16  Martin Baulig  <martin@ximian.com>
20860         * class.c (mono_type_get_name_recurse): Small fix.
20862 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
20864         * locales.c : indentation fixie.
20866 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
20868         * object-internals.h,
20869           locales.h,
20870           locales.c,
20871           culture-info.h,
20872           icall.c : added RegionInfo table support.
20873         * culture-info-table.h : regenerated for region support.
20875 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
20877         * reflection.c (resolve_object): handle all kinds of MonoMethod
20878         including generic ones
20880 2005-08-12  Ankit Jain <jankit@novell.com>
20882         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
20883           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
20885 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
20887         * process.c: Don't close a thread handle when it's NULL. This is a
20888         workaround for bug #75733.
20890 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
20892         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
20894 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
20896         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
20898 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20900         * threadpool.c: if a work item in the thread pool has a callback that
20901         catches a exception, don't propagate it after invoking the callback.
20902         Fixes bug #75336.
20904 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
20906         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
20908         * class-internals.h (MonoCachedClassInfo): Add some new fields.
20910         * class.c (mono_class_init): Load field info lazily in the AOT case.    
20912         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
20914 2005-08-03  Ankit Jain  <jankit@novell.com>
20916         Fix #75683.
20917         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
20918           PInvoke calling convention is 0.
20920 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
20922         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
20923         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
20925 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
20927         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
20928         to handle threads not started by the GC (patch by Michael Meeks
20929         <michael.meeks@novell.com>).
20931 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
20933         * reflection.c: Make buffer used in emitting types larger for some
20934         big generic types (patch by Michal Moskal).
20936 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
20938         * mono-debug.c: Fix some (not all) alignment problems.
20940 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
20942         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
20943         Invoke mono_image_load_from_data_full passing the refonly
20944         parameter.
20946         * assembly.c
20947         (mono_assembly_open_from_bundle): Add the refonly argument, 
20948         in order to pass it to other methods it calls to.
20949         (do_mono_assembly_open): Add the refonly argument, in order 
20950         to pass it to other methods it calls to.
20951         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
20952         the refonly parameter to it.
20954         * image.c: Add loaded_images_refonly_hash and
20955         loaded_images_refonly_guid_hash to cache the reflection
20956         only loaded images.
20957         (mono_images_init): Initialize the hash tables used for
20958         caching the reflection only images.
20959         (load_modules): Invoke mono_image_open_full passing the refonly
20960         parameter to load the modules the correct way.
20961         (build_guid_table): Add the refonly argument, to re-build the 
20962         correct hash table.
20963         (do_mono_image_open): Added the refonly argument, in order to
20964         define it for the loaded image.
20965         (mono_image_loaded_full): New function, which receives an
20966         additional parameter to look for the image in the refonly or
20967         non-refonly section.
20968         (mono_image_loaded): Updated, using mono_image_loaded_full.
20969         (mono_image_loaded_by_guid_full): The same case that happens
20970         with mono_image_loaded_full.
20971         (mono_image_loaded_by_guid): Likewise.
20972         (register_image): Use the ref_only variable inside MonoImage
20973         to decide in which hash table store the current image.
20974         (mono_image_open_from_data_full): Rename
20975         mono_image_open_from_data to mono_image_open_from_data_full,
20976         adding the refonly argument, to define the ref_only variable 
20977         inside MonoImage.
20978         (mono_image_open_from_data): Return 
20979         mono_image_open_from_data_full.
20980         (mono_image_open_full): Rename mono_image_open to
20981         mono_image_open_full, receiving the new refonly argument,
20982         to pass it to inner methods.
20983         (mono_pe_file_open): Update this function, to open
20984         a MonoImage as a non-refonly image.
20985         (mono_image_close): Use the refonly variable inside
20986         MonoImage to remove the image from the correct caches.
20988         * image.h: Add the signatures of mono_image_open_full,
20989         mono_image_open_from_data_full, mono_image_loaded_full,
20990         mono_image_loaded_by_guid_full.
20992         * metadata-internals.h: Add the ref_only field to 
20993         MonoImage.
20994         
20995 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
20997         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
20998         Fix the last behavior, which used to load the assemblies and
20999         extract MonoReflectionAssemblyName information, instead of
21000         extract it from the metadata tables. Needed for Reflection
21001         Only assemblies.
21002         
21003 2005-07-29  Martin Baulig  <martin@ximian.com>
21005         * mono-debug-debugger.c
21006         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
21007         not initialized.
21009         * mono-debug.c
21010         (mono_debug_address_from_il_offset): Check whether we have
21011         debugging support before attempting to take the lock.
21012         (mono_debug_source_location_from_address): Likewise.
21013         (mono_debug_source_location_from_il_offset): Likewise.
21014         (mono_debug_il_offset_from_address): Likewise.
21015         (mono_debug_address_from_il_offset): Likewise.
21017 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
21019         * class.c (mono_class_from_name_case): Add support for dynamic images.
21020         Fixes #75650.
21022         * object.c (mono_class_compute_gc_descriptor): Add a workaround
21023         for #75479.
21025 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
21026         
21027         * reflection.c (mono_method_get_object): Fix warning.
21029 2005-07-28  Martin Baulig  <martin@ximian.com>
21031         * mono-debug.c
21032         (mono_debug_add_wrapper): Also write the wrapper type.
21034 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
21036         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
21037         
21038         * class.c (mono_class_init): Avoid reading nested classes if the AOT
21039         data indicates the class has none.
21041 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
21043         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
21044         loader lock with the debugger lock. Prevents deadlocks for beagle.
21046         Beagle can now run on an smp box for a weekend without any
21047         issues. Woohoo!
21049 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
21051         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
21052         in a module. Fixes #75629.
21054 2005-07-26  Martin Baulig  <martin@ximian.com>
21056         * mono-debug.c (mono_debug_add_wrapper): New static method.
21057         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
21058         interncall or a wrapper.
21060         * mono-debug.h (MonoDebugWrapperData): New public typedef.
21061         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
21062         (MONO_DEBUGGER_VERSION): Bump to 51.
21064         * mono-debug-debugger.c
21065         (mono_debugger_add_type): Removed this empty function.
21066         (mono_debugger_add_method): Likewise.
21068 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
21070         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
21071         before accessing method->slot.
21073 2005-07-21  Jb Evain  <jbevain@gmail.com>
21075         * reflection.c (method_encode_clauses/class): Handle filters clauses.
21076         Fixes #75010.
21078 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
21080         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
21081         #75587.
21083 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
21085         * image.h image.c: Add mono_image_get_guid () API function.
21087 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
21089         There were issues when multiple threads tried to load
21090         assemblies. A deadlock was created between assemblies_mutex and
21091         mono_domain_assemblies_lock. This fixes the issue by making the
21092         assembly ref counting be lock free. See bug 75586.
21093         
21094         * image.c (mono_image_close): The add ref function here was using
21095         Interlocked operations while the unref was using a mutex and a
21096         --. I don't think this was ever a bug that would be exposed in a
21097         non-pendantic way (ie, by an embedder doing a ref on one thread
21098         and an unref on another), but for the sake of correctness, this is
21099         now Interlocked.
21101         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
21102         (mono_assembly_load_reference): Call mono_assembly_addref rather
21103         than touching the refcount ourselves.
21104         (mono_assembly_close): Use InterlockedDecrement to unref the
21105         assembly. Don't acquire the lock unless it is actually needed.
21107 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
21109         * class.c (mono_class_layout_fields): Fix calculation of has_references
21110         for generic types.
21112 2005-07-12  Martin Baulig  <martin@ximian.com>
21114         Applying a patch from Michal Moskal <malekith@nemerle.org>.
21116         * metadata.c
21117         (mono_type_hash): Provide better hashing for generic instances.
21118         (mono_generic_inst_hash): Improve hashing.
21119         (mono_generic_class_hash): Likewise.
21121         * reflection.c (mymono_metadata_type_hash): Improve hashing for
21122         generic instances.
21124 2005-07-12  Martin Baulig  <martin@ximian.com>
21126         * reflection.c (mono_reflection_create_runtime_class): Remove the
21127         hack for generic type definitions and non-`Run' assemblies.
21128         (mono_reflection_bind_generic_parameters): Also use
21129         `klass->wastypebuilder' to check for TypeBuilders.
21131 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
21133         * class.c (mono_class_layout_fields): Fix calculation of has_references
21134         for generic types.
21136         * class.c (inflate_generic_class): Fix a leak.
21137         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
21138         for generic types.
21140 2005-07-11  Martin Baulig  <martin@ximian.com>
21142         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
21143         on error.
21145 2005-07-11  Martin Baulig  <martin@ximian.com>
21147         * loader.c (find_method): Also lookup in
21148         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
21150 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
21152         * appdomain.c (mono_domain_unload): Don't free the error message
21153         before passing it to mono_get_exception_...
21155         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
21156         
21157 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
21159         * threads.c: try to better guess an available RT signal (bug #75387).
21161 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
21163         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
21164         and CACHE_OBJECT.
21166 2005-07-07  Martin Baulig  <martin@ximian.com>
21168         * class.c (mono_type_get_name_full): Return NULL for
21169         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
21170         fixes #75408.
21172 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
21174         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
21175         exit the appdomain as well being aborted.
21177         * threadpool.c: Create all threadpool threads inside the root appdomain, and
21178         change back to the root domain after calling managed code. This enables
21179         appdomains using threadpools to be unloaded.
21181 2005-07-07  Martin Baulig  <martin@ximian.com>
21183         * class-internals.h
21184         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
21185         into `MonoDynamicGenericClass' since we only need it for dynamic
21186         types.
21188         * reflection.c (mono_class_bind_generic_parameters): We don't need
21189         to compute the `parent' here.
21191 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
21193         * culture-info-table.h : regenerated.
21195 2005-07-06  Martin Baulig  <martin@ximian.com>
21197         * icall.c
21198         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
21200         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
21202 2005-07-06  Martin Baulig  <martin@ximian.com>
21204         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
21205         we're doing a signature-only comparision; fixes #74945.
21207 2005-07-06  Martin Baulig  <martin@ximian.com>
21209         * class-internals.h (MonoGenericClass): Moved some things out into
21210         a new `MonoInflatedGenericClass' type.  
21211         (MonoInflatedGenericClass): New type; the `klass' of a
21212         `MonoGenericClass' is now computed lazyly in
21213         mono_get_inflated_generic_class().      
21215         * class.c (mono_get_inflated_generic_class): New public function.
21216         (mono_class_inflate_generic_method): Removed the unused
21217         `MonoClass *' argument.
21218         (setup_generic_vtable): Don't call mono_get_inflated_method() on
21219         all the methods.
21220         (mono_class_create_generic): Make this static and merge it with
21221         mono_class_create_generic_2(); we're now called automatically from
21222         mono_get_inflated_generic_class().
21224         * loader.c (mono_method_signature): Call
21225         mono_get_inflated_method() here.
21227 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
21229         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
21230         type of fields with RVA.
21232         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
21233         for this pseudo class.
21234         (my_mono_class_from_generic_parameter): Likewise.
21235         (mono_class_init): Allow interfaces to have cctors.
21237 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
21239         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
21240         lazily for AOT methods.
21242 2005-07-05  Martin Baulig  <martin@ximian.com>
21244         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
21245         returns FALSE for a successful match, not TRUE.
21247 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
21249         * loader.c (mono_method_get_index): Optimize this a bit.
21251 2005-07-04  Martin Baulig  <martin@ximian.com>
21253         * class.c
21254         (class_compute_field_layout): Move the check for generic type
21255         definitions into mono_class_layout_fields().  Fixes #74684.
21256         (mono_class_from_generic_parameter): Correctly compute
21257         `klass->parent'; fixes #75457.
21259         * reflection.c (register_assembly, register_module): Make sure
21260         `domain->rejobject_hash' is already created.
21262 2005-07-02  Martin Baulig  <martin@ximian.com>
21264         * class-internals.h
21265         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
21266         `MonoDynamicGenericClass'.      
21268 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
21270         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
21271         returned by a field getter is null, since null is a valid value.
21273 2005-07-01  Martin Baulig  <martin@ximian.com>
21275         * reflection.c (mono_reflection_generic_class_initialize): Update
21276         the `dgclass->fields [i].parent' to the correct class.
21277         (mono_image_get_fieldref_token): Use the declaring type, not the
21278         reflected type.
21280 2005-07-01  Martin Baulig  <martin@ximian.com>
21282         * loader.c (find_method): Also look in the interfaces; fixes #75429.
21284 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
21286         * threads.c (thread_cleanup): assert that thread != NULL
21287         (wait_for_tids_or_state_change): We were using the wrong variable
21288         when accessing wait->threads. `i' was always out of the bounds of
21289         the array.
21291 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21293         * loader.c: map user32 and kernel32 to libMonoSupportW
21295 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
21297         * appdomain.c (unload_thread_main): Mark this as WINAPI.
21299 2005-06-28  Martin Baulig  <martin@ximian.com>
21301         * loader.c (method_from_methodspec): Fix #75334.
21303 2005-06-28  Martin Baulig  <martin@ximian.com>
21305         Fix #74953 - Arrays now implement the generic IList<T> interface
21306         on the 2.0 platform.
21308         * class-internals.h (MonoDefaults): Added `generic_array_class'.
21310         * reflection.c (mono_class_bind_generic_parameters): New public
21311         function; similar to mono_reflection_bind_generic_parameters(),
21312         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
21314         * domain.c (mono_init_internal): Try to initialize.
21315         `mono_defaults.generic_array_class' here; this'll only succeed if
21316         we're using the 2.0 corlib.
21318         * icall.c
21319         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
21320         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
21321         (mono_lookup_internal_call): Added support for nested classes.
21323         * loader.c
21324         (mono_get_method_from_token): Set `result->signature->pinvoke' if
21325         we're an interncall and have generic arguments.
21327         * class.c
21328         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
21329         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
21330         instance of System.Array.InternalArray<T> for arrays, so they
21331         implement the generic IList<T> interface.
21333 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
21335         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
21336         (chastamar@yahoo.com). Fixes #75374.    
21338 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
21340         * culture-info-table.h: regenerated.
21342 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21344         * icall.c: handle spaces correctly for base64 strings.
21346 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
21348         * *.c: Kill some warnings.
21350 2005-06-23  Duncan Mak  <duncan@novell.com>
21352         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
21353         that this builds on Solaris 10 (x86).
21355 2005-06-23  Martin Baulig  <martin@ximian.com>
21357         * class.c
21358         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
21359         generic type definitions.
21361 2005-06-23  Martin Baulig  <martin@ximian.com>
21363         Fix #75331.
21365         * metadata.c (mono_class_get_overrides): Renamed to
21366         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
21367         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
21368         pass it to mono_get_method_full().
21370 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
21372         * reflection.c (mono_reflection_create_runtime_class): take the
21373         mono_domain_lock in this method. Prevents deadlocks
21375 2005-06-22  Martin Baulig  <martin@ximian.com>
21377         * loader.c (method_from_methodspec): Fix #75330.
21379 2005-06-22  Martin Baulig  <martin@ximian.com>
21381         * reflection.c (type_get_qualified_name): Use
21382         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
21383         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
21384         argument; use it if we don't have an assembly name.
21386 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
21388         * object.c: In mono_message_init, set "copy out" flag for in
21389         parameters with the [Out] flag.
21391 2005-06-21  Martin Baulig  <martin@ximian.com>
21393         * class.c
21394         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
21395         and MONO_TYPE_PTR.
21397 2005-06-21  Martin Baulig  <martin@ximian.com>
21399         * class.c (mono_class_init): Don't initialize `class->fields' for
21400         generic instances since they're initialized again in
21401         compute_field_layout(). 
21402         (compute_field_layout): Set the field's `generic_info' here; fix
21403         #75320. 
21405 2005-06-21  Martin Baulig  <martin@ximian.com>
21407         * class-internals.h
21408         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
21410         * metadata.c (mono_metadata_generic_method_equal): Also
21411         distinguish the `generic_class'; fixes #75334.
21413 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21415         * domain.c:
21416         * appdomain.c:
21417         * domain-internals.h:
21418         * reflection.c: 'domain_assemblies' field is now protected by its own
21419         lock. Don't call into managed code to run the AssemblyLoad event if we
21420         now there are no registered delegates for it.
21422 2005-06-20  Martin Baulig  <martin@ximian.com>
21424         * class.c (mono_class_is_assignable_from): Use a custom version of
21425         mono_class_has_parent() to make things work for generic instances;
21426         fix #75300.
21428 2005-06-20  Martin Baulig  <martin@ximian.com>
21430         * loader.c (method_from_methodspec): Apply a patch from
21431         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
21433 2005-06-20  Martin Baulig  <martin@ximian.com>
21435         * class.c (mono_class_init): Reverted Zoltan's last change; it
21436         breaks generics.
21438 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
21440         * threads.c (wait_for_tids_or_state_change): Add missing locking.
21442 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21444         * socket-io.c: fix the index in the socket array for writable/error
21445         sockets. Fixes bug #75306.
21447 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
21449         * class.c (mono_class_init): Allow interfaces to have static ctors.
21451 2005-06-17  Martin Baulig  <martin@ximian.com>
21453         * loader.c (method_from_methodspec): Use `context->container' when
21454         parsing the `gmethod->inst'.
21456 2005-06-17  Martin Baulig  <martin@ximian.com>
21458         * class.c (mono_type_get_name_recurse): Don't add the assembly
21459         name for type arguments.
21461 2005-06-15  Martin Baulig  <martin@ximian.com>
21463         * reflection.c (mono_image_get_inflated_method_token): Encode
21464         correct klass; fixes #75260.
21466 2005-06-13 Michal Moskal <malekith@nemerle.org>
21468         * icall.c: Make GetCorrespondingMethod/Constructor take
21469         MonoReflectionMethod method not MonoMethod. Removed
21470         MonoType.GetCorrespondingField, and make
21471         MonoGenericType.GetCorrespondingField take name not
21472         MonoClassField.
21474 2005-06-13  Michal Moskal <malekith@nemerle.org>
21476         * reflection.c (field_encode_signature, encode_locals):
21477          Make sizes of buffers for types larger (for big generic types).
21478          (create_generic_typespec,
21479          mono_reflection_sighelper_get_signature_local,
21480          mono_reflection_sighelper_get_signature_field):
21481          Add asserts for too small buffers.
21483 2005-06-15  Martin Baulig  <martin@ximian.com>
21485         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
21486         if our parent is not a dynamic type.
21488 2005-06-15  Martin Baulig  <martin@ximian.com>
21490         * class-internals.h (MonoTypeNameFormat): New enum.
21492         * class.c
21493         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
21494         (mono_type_get_full_name): Removed.
21495         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
21496         argument instead of the boolean's.
21498         * icall.c (ves_icall_System_MonoType_getFullName):
21499         Added `gboolean assembly_qualified'.    
21501         * reflection.h
21502         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
21504         * reflection.c (mono_reflection_parse_type): Parse the new type
21505         name format.
21507 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21509         * icall.c: no need to convert from utf16 to utf8 and then back again
21510         after the call to GetLogicalDrives.
21512 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21514         * icall.c: frombase64. Fix problems exposed by new tests.
21516 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21518         * icall.c: added internal calls for converting char [] and strings in
21519         base64 into byte [].
21521 2005-06-10  Martin Baulig  <martin@ximian.com>
21523         * class.c (mono_class_create_generic_2): Read the nested classes
21524         from the metadata rather than from `gklass->nested_classes' since
21525         `gklass' might not be initialized yet.
21527 2005-06-09  Duncan Mak  <duncan@novell.com>
21529         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
21530         all public headers. Fixes #74919.
21532 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
21534         * domain.c: The key for proxy_vtable_hash is now a pointer
21535         array. Added new GHashFunc and GCompareFunc functions for this.
21537         * class.h: The list of interfaces in MonoRemoteClass is known in
21538         advance and can't grow (we create a new MonoRemoteClass if needed),
21539         so now the interface array can be allocated together with
21540         MonoRemoteClass.
21541         
21542         * object.c: Added a new method create_remote_class_key.
21543         Fixed mono_remote_class so it does not depend on
21544         mono_upgrade_remote_class.
21545         Removed extend_interface_array.
21546         Added new method clone_remote_class(), which makes a copy of a remote
21547         class and adds a new interface or class to it.
21548         mono_upgrade_remote_class() now creates a new remote class (or gets
21549         it from the cache) if an vtable upgrade is needed. In this way
21550         we make sure that other objects sharing the same remote class
21551         don't get the new vtable with unwanted interfaces.
21552         
21553         * object-internals.h:
21554         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
21555         
21556         * marshal.c: Track changes in mono_upgrade_remote_class().
21558 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
21559         * icall.c: Add runtime methods for obtaining members of inflated
21560         class, which were created from supplied non-inflated members. It
21561         is used in internal Get{Method,Constructor,Field} methods in
21562         System.Type
21564 2005-06-09  Martin Baulig  <martin@ximian.com>
21566         * reflection.c
21567         (mono_reflection_bind_generic_method_parameters): Fix #75169.
21569 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
21570         * reflection.c (mono_image_basic_init): Define
21571         Version in MonoDynamicAssembly. 
21572         
21573 2005-06-08  Martin Baulig  <martin@ximian.com>
21575         Fix #75136.
21577         * loader.c
21578         (mono_method_signature_full): New public method; takes a
21579         `MonoGenericContext *'.
21580         (find_method): Use mono_method_signature_full() and pass the
21581         klass'es context to it.
21583         * class.c (mono_class_is_inflated_method): Use
21584         mono_method_signature_full() and pass the context to it.
21586 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
21588         * object.c: add proper locking in mono_remote_class_vtable(),
21589         fixes possible memory corruption.
21591 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
21593         * marshal.c (mono_remoting_marshal_init): set
21594         initialized after initialization.
21596 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
21598         * locales.c : hush.
21600 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
21602         * object.c (extend_interface_array): fix really silly
21603         memory corrupting / comparison bug.
21605 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
21607         * reflection.c: Functions added to support the creation
21608         of CustomAttributeData, which includes Attribute data
21609         used by ReflectionOnly methods.
21611         * reflection.h:  mono_reflection_get_custom_attrs_data and
21612          mono_custom_attrs_data_construct added (functions exposed).
21614          * icall.c: Added mono_reflection_get_custom_attrs_data
21615          as icall.
21616         
21617 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
21619         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
21620         lupus's request.
21622 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
21624         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
21626         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
21627         dynamic DllImportAttribute.
21629         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
21630         dynamic DllImportAttribute.
21632         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
21633         Fixes #75162.
21635 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21637         * threads.c: avoid segfault when an unstarted thread is aborted.
21639 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
21641         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
21642         Returns the name and version of the runtime for reporting.
21644 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21646         * appdomain.c: bump corlib version.
21647         * object-internals.h: new field in MonoReflectionAssembly.
21649 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21651         * object-internals.h: Carlos forgot to add this field.
21653 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
21655         * icall.c: Added create_version to create instances
21656         of Version of MonoReflectionAssemblyName. This change helps
21657         the AssemblyName tests to keep running fine.
21658         
21659 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
21660   
21661         * object.c (mono_method_return_message_restore): A somehow less
21662         intrusive fix for #75138.
21664 2005-06-03  Raja R Harinath  <rharinath@novell.com>
21666         * object.c (mono_method_return_message_restore): Fix computation
21667         of expected number of out args.
21669 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
21671         * reflection.c (mono_image_get_method_info): Fix the case when the
21672         charset is empty.
21674 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
21676         * object.c: Added missing null check in
21677           mono_method_return_message_restore.
21679 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
21681         * reflection.c (mono_image_get_method_info): Handle the case when
21682         dllentry is empty.
21684 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
21686         * object.c: When creating the vtable for a proxy, take into account
21687         all inherited interfaces, not only the ones registered in
21688         iclass->interfaces. This fixs bug #74996.
21689         Also, in mono_method_return_message_restore, verify that the array
21690         of out args has the expected lengh.
21692 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21694         * socket-io.c: update the timeout in Poll when the call is interrupte.
21696 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21698         * socket-io.c: support abort/suspend in Select_internal after last
21699         change.
21701 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21703         * threadpool.c: remove warning.
21705 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21707         * icall.c:
21708         * socket-io.[ch]: Select_internal uses poll() now when available, thus
21709         removing the 1024 limit from select(). Runtime part of the fix for
21710         bug #71203.
21712 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21714         * socket-io.c: when resolving the addresses for the same
21715         host returned by gethostname(), get the local IPs from the interface
21716         list. Loopback addresses are discarded if the are interfaces up with
21717         non-loopback ones. Fixes bug #63265.
21719 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
21721         * appdomain.c, verify.c, object-internals.h, reflection.c:
21722         bumped corlib number to 36, and added new extra_flags field
21723         to ReflectionMethodBuilder and friends.  Fixes #75060.
21725 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
21727         * gc.c: register a new weak link only if the object is non-null
21728         (fixes bug#75047).
21730 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
21732         * culture-info.h : short time pattern too.
21734 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
21736         * culture-info.h : expand long time pattern string length.
21738 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
21740         * culture-info-table.h : update (more French date format; #72788).
21742 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
21744         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
21745         the method is static. Fixes #75029.
21747 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
21749         * reflection.c: Update the table_idx field of method builders after
21750         saving the module, since it can change. This is a workaround for
21751         bug #74914. 
21753 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
21755         * culture-info-table.h : update (additional French date format).
21757 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
21759         * icall.c (ves_icall_type_Equals): Revert last change.
21760         
21761         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
21763         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
21765 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
21767         * class-internals.h: Added executioncontext_class field to 
21768         MonoDefaults structure.
21769         * domain.c: Cache System.Threading.ExecutionContext class in 
21770         mono_defaults.
21771         * object.c: Capture the ExecutionContext for asynchroneous calls in
21772          mono_async_result_new.
21773         * object-internals.h: Added execution_context and original_context 
21774         fields to MonoAsyncResult. Added execution_context to MonoThread.
21775         * security-manager.c|.h: Added mono_get_context_capture_method to 
21776         return the capture method (if required by the security manager or by
21777         the framework version used).
21778         * threadpool.c: Apply capture (if present) ExecutionContext in 
21779         mono_async_invoke and revert to original context after it completes.
21781 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
21783         * culture-info-table.h : updated (real hacky solution for zh-CHT).
21785 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
21787         * culture-info-table.h : zh-CHT related workaround.
21789 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
21791         * marshal.c (emit_marshal_custom): Add some error checking and call the
21792         methods in the ICustomMarshaler interface. Fixes #74875.
21793         
21794         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
21795         native->managed wrappers.
21797 2005-05-12  Martin Baulig  <martin@ximian.com>
21799         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
21800         here and use the loader lock.
21802         * mono-debug.c: Properly lock when the debugger is not attached.
21803         (mono_debug_init): Release the initial lock if we're not running
21804         in the debugger.
21806 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
21808         * marshal.c (emit_marshal_custom): Pass through NULL values without
21809         calling the custom marshalling routines.
21811         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
21812         conversion in structures. Fixes #74882.
21814 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
21816         * culture-info-table.h : zh-* cultures were missing.
21818 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
21820         * threads.c: Added a new event background_change_event which is signaled
21821         when a thread changes its background mode.
21822         Moved here several checks previously done in managed code. The checks
21823         require the thread lock, and using the thread lock in managed code
21824         can result in deadlocks.
21825         Merged Start_internal and Thread_internal into a single method. Now 
21826         Thread_internal does all work of creating and starting a thread.
21827         Added icalls for setting and getting the state of the object. Moved from
21828         managed code to avoid locking there.
21829         Added wait_for_tids_or_state_change() which is called instad of
21830         wait_for_tids when waiting for non-backround threads to end. This method
21831         will return if one of the threads ends or the background_change_event
21832         is signaled.
21833         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
21834         the background mode. This method signals the background_change_event
21835         event.
21836         * icall.c:
21837         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
21838         removed Start_internal.
21839         
21840 2005-05-11  Martin Baulig  <martin@ximian.com>
21842         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
21843         to order of some fields to get proper alignment on 64-bit machines.
21845 2005-05-11  Martin Baulig  <martin@ximian.com>
21847         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
21848         changes as they're broken and completely fuck up the debugger.
21850         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
21852 2005-05-10  Martin Baulig  <martin@ximian.com>
21854         * reflection.c (mono_reflection_generic_class_initialize): Don't
21855         call mono_class_setup_parent() here.
21857 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21859         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
21860         send/receive timeout use an integer in milliseconds. We were using a
21861         struct timeval.
21863 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21865         * locales.c:
21866         (internal_get_cultures): reserve the first slot of the array for the
21867         InvariantCulture, which will be filled in managed code.
21869 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
21871         * reflection.c (mono_image_fill_module_table): Initialize the
21872         GENERATION field as well.
21874 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21876         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
21877         Monitor.Enter on the object.
21879 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
21881         * threads.c: Enable the wait for running threads when exiting.
21882         * icall.c: Suspend all threads before exiting.
21884 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
21886         * assembly.c (mono_assembly_load_reference): Fix warning.
21888 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21890         * threadpool.c: changed the default number of threads per cpu. From now
21891         on, the default will be 20 + (5 * number of cpus) instead of 50.
21893 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
21895         * loader.c (mono_method_get_signature_full): Add locking here.
21897 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
21899         * appdomain.c: Moved methods for parsing and freeing assembly
21900         names to assembly.c.
21901         * assembly.c, domain-internals.h: Created public methods for parsing
21902         assembly names. Fixed mono_assembly_load_with_partial_name:
21903         it now finds the best match, taking into account the version,
21904         token and culture specified in the partial name. Also return
21905         the latest version if no version information is specified.
21907 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
21909         * threadpool.c: replace check for SocketAsyncCall class.
21911 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21913         * threadpool-internals.h:
21914         * Makefile.am: added threadpool-internals.h
21916         * threadpool.c: call mono_unhandled_exception on exceptions not handled
21917         that happen in threadpool threads (tested on MS).
21918         (mono_thread_pool_remove_socket): new function that dispatch any pending
21919         AIO call on a socket that is closing. By now only epoll really needs it,
21920         as select/poll wake up when the socket closes.
21923         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
21925 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
21927         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
21929 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
21931         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
21933 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
21935         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
21936         has an abort request, convert it into a suspend request.
21938 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
21940         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
21941         warning for the usage of `UnmanagedFunctionPointerAttribute' which
21942         is not supported yet.
21944 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21946         * image.c: register assemblies loaded from data (bundles) in the loaded
21947         assemblies hash. Fixes bug #74772.
21949 2005-04-29  Martin Baulig  <martin@ximian.com>
21951         * class.c (mono_type_get_name_recurse): Update to the new naming
21952         schema from the latest .NET 2.x beta2.
21953         (mono_class_setup_vtable_general): If we're a generic instance,
21954         copy the vtable from our generic type definition and inflate all
21955         the methods in it.
21957         * loader.c (find_method): Update to the new naming schema from the
21958         latest .NET 2.x beta2.
21960 2005-04-29  Raja R Harinath  <harinath@gmail.com>
21962         * class.c (mono_class_init): Add a mono_loader_unlock to the
21963         #74734 fix.
21965 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
21967         * icall.c (ves_icall_System_Environment_Exit): Remove the 
21968         suspend_all_other_threads () call for the time being, since it can hang.
21970         * threads.c (mono_thread_manage): Similarly, disable the waiting for
21971         the background threads to exit, since it can also hang.
21973         * class.c (mono_class_init): Applied patch from Ankit Jain 
21974         (radical@gmail.com). Avoid pending init errors when a field refers
21975         to a nested class using a typeref. Fixes #74734.
21977         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
21978         this for dynamic modules.
21980 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21982         * threads.c: don't wait for threads that are in the process of aborting
21983         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
21984         and waiting for background threads to finish. This makes xsp and
21985         mod-mono-server exit without random length delays and/or hangs.
21987 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21989         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
21991 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
21993         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
21994         dynamic types to prevent infinite loops. Fixes #74727.
21996         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
21997         ..._is_assignable_to.
21999 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
22001         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
22003 2005-04-25  Martin Baulig  <martin@ximian.com>
22005         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
22007         * domain.c
22008         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
22010         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
22012         * reflection.c (build_compressed_metadata): Set metadata header
22013         version to 2.0.
22015 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
22017         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
22018         number into an integral and a decimal part. Fixes #70473.
22020         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
22022 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
22024         * culture-info-table.h : reflected the latest locale-builder output.
22026 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22028         * threadpool.c: check for SuspendRequested too when deciding if
22029         mono_thread_interruption_checkpoint should be called.
22031 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22033         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
22034         * threads.c: remove interruption_mutex and use Interlocked instead. When
22035         suspending all the threads, wait for all the suspended events at once.
22036         If we're shutting down and get an APC that is going to be queued,
22037         call mono_thread_execute_interruption immediately, as the thread might
22038         be sleeping on a pthread condition or mutex.
22040         * icall.c: call mono_runtime_set_shutting_down before suspending the
22041         threads.
22043         Fixes bug #74693. And now xsp is happier when exiting.
22045 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
22047         * loader.c (mono_stack_walk): Fix #74690.
22049 2005-04-22  Martin Baulig  <martin@ximian.com>
22051         * mono-debug.h (MonoDebugMethodJitInfo): Added
22052         `MonoDebugMethodJitInfo *jit'.
22054         * mono-debug.c (mono_debug_read_method): Cache the
22055         MonoDebugMethodJitInfo in `address->jit'.
22056         (mono_debug_free_method_jit_info): New public method.
22058 2005-04-22  Martin Baulig  <martin@ximian.com>
22060         * class.c (mono_class_is_assignable_from): Disallow
22061         type parameter -> interface.
22063 2005-04-21  Dick Porter  <dick@ximian.com>
22065         * threads.c (mono_thread_create): Turn an assertion into an error.
22067 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
22069         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
22070         
22071         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
22072         Fix some gcc 4.0 warnings.
22074 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
22076         * file-io.c: fix alt dir separator char on unix systems
22077         and cleanup (fixes bug #71214).
22079 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
22081         * marshal.c: Use CALLVIRT instead of CALL when dispatching
22082         a call to a remote domain, since the method may be an
22083         interface method in the client domain. This fixes bug #74192.
22085 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22087         * threadpool.c: recv/send are now performed before going back to managed
22088         code to save one transition.
22090 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22092         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
22094         * metadata/threadpool.c: removed hack to workaround the bug above.
22096         Fixes bug #74618.
22098 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
22100         * reflection.c reflection.h: Fix handling of parameter defaults in
22101         dynamic methods. Also fixes handling of parameter attributes.
22102         Fixes #74609.
22104         * mono-debug.c (mono_debug_close_image): Fix warning.
22106 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22108         * socket-io.h: replaced old unused field with new 'blocking'.
22109         * threadpool.c: restore socket blocking state on windows(tm).
22111 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
22113         * icall.c: don't return the codebase in the AssemblyName[] returned by
22114         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
22115         * object-internals.h: Removed FIXME (fields were presents) and fixed
22116         versioncompat declaration.
22118 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22120         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
22121         not closed, so don't cleanup when it happens.
22123 2005-04-13  Chris Toshok  <toshok@ximian.com>
22125         * mono-debug-debugger.h: change prototype for
22126         mono_debugger_lookup_type.
22128         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
22129         this function, although it should probably be named
22130         mono_debugger_init_type.
22132 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22134         * threadpool.c: fix non-AIO case.
22136 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
22138         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
22139         the built-in profiler to measure just JIT compilation times.
22141 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22143         * threadpool.c: the epollfd might be closed by another thread at
22144         any time, so ignore EBADF at treat it as a "we're closing" sign.
22146 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22148         * threadpool.c: release the semaphores with a count equals to the number
22149         of working threads in both IO and regular pools. Fixed typo that messed
22150         up the count of IO pool threads. Don't initialize the pipe handles if
22151         we're using epoll.
22153 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22155         * threadpool.c: some systems don't like a NULL when deleting the socket
22156         from epoll.
22158 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22160         * threadpool.c: fix semaphore allocation.
22162 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22164         * threadpool.c: added epoll() based implementation for asynchronous IO
22165         that is used instead of the default poll() when available.
22166         It can be disabled by setting MONO_DISABLE_AIO.
22168 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22170         * threadpool.c: windows needs 'closesocket' and instead of returning
22171         0 when the stream is closed while in select, it returns -1. Fixes bug
22172         #74573.
22174 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
22176         * class.c (class_compute_field_layout): Fix the regression caused by
22177         the previous try.
22179 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22181         * threadpool.c: separate pool for socket async. IO.
22182         * threadpool.h: mono_max_worker_threads is not a global any more.
22184 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
22186         * class.c (class_compute_field_layout): Fix #74549.
22188 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22190         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
22191         use 2 connected sockets instead.
22193 2005-04-08  Miguel de Icaza  <miguel@novell.com>
22195         * mono-config.c: Add new entry point for mkbundle
22196         mono_config_parse_memory. 
22198 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22200         * threadpool.c: removed another unused function.
22202 2005-04-08  Ankit Jain  <radical@corewars.org>
22204         * reflection.c (get_default_param_value_blobs): Add 'types'
22205         parameter to get the types encoded in the constant table.
22206         (mono_param_get_objects): Use the type from the constant table,
22207         not the type of the parameter, when creating default values.
22208         Handle null default values correctly.
22210 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22212         * file-io.c:
22213         * file-io.h:
22214         * threadpool.c:
22215         * threadpool.h:
22216         * icall.c:
22217         * socket-io.c: removed dead code for async IO.
22219 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22221         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
22223         * threadpool.c: intercept socket async. calls and pass them to a thread
22224         that is polling and dispatching the job items to the threadpool as
22225         socket become ready. Fixes bugs #71217, #71933.
22227         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
22228         between char and short/ushort arrays.
22230         * socket-io.c: remove dead code.
22232 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
22234         * locales.c,
22235           icall.c : removed InternalToUpper_Comp() and
22236           InternalToLower_Comp().
22238 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
22240         * char-conversions.h : The tables were incorrectly generated. Should
22241           be generated against invariant culture.
22243 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
22245         * object.c (mono_runtime_invoke_array): Fix return value when 
22246         passing pre-created valuetype objects to ctors.
22248         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
22249         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
22250         Fixes #74338.
22252 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
22254         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
22255         only used with --security and hides the wrong corlib version error.
22257 2005-03-30  Joshua Tauberer  <tauberer@for.net>
22259         * class.c: Changed mono_class_name_from_token so that types
22260         outside of a namespace don't have an initial period.  Improved
22261         the g_warning message used in _mono_class_get when loading
22262         fails.
22263         * assembly.c: In mono_assembly_load_reference, when an assembly
22264         can't be found, "No such file or directory" is misleading and
22265         unhelpful because a few paths were checked for the presence of
22266         the assembly.  When that happens (ENOENT), display a nicer
22267         message indicating the directories that were searched.  In all
22268         cases, the warning is made easier to read for non-hackers.
22270 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
22272         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
22273         project/solution.
22274         * appdomain.h|domain.c: Removed inline from functions.
22275         * appdomain.c: Reduced warnings when compiling on windows.
22276         * icall.c: Fixed output_debug declaration to gunichar2*.
22277         * mono-config.c: Reduced warnings when compiling on windows.
22278         * rand.c: Added missing "windows.h". Added missing return value.
22279         * rawbuffer.c: Added missing winsock2.h for windows.
22280         * sysmath.h: Added mono-compiler.h header to allow/ease 
22281         compilation with non-GCC compilers.
22282         * threads.c: Fixed declarations to compile with VS.NET C compiler.
22283         Removed cast warnings.
22285         Adapted from the work of J Lothian (for VC6).
22287 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
22289         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
22290         from default_path.
22292 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
22294         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
22295         the 2.0 profile.
22297 2005-03-27  Raja R Harinath  <harinath@gmail.com>
22299         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
22300         has to be in $(exec_prefix).  $(prefix) is for arch-independent
22301         stuff, and it would probably use $(prefix)/share rather than
22302         $(prefix)/lib.
22304 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22306         * console-io.c: added 2 includes that might be missing.
22308 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
22310         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
22311         profile.
22313         * reflection.c (create_custom_attr): Allocate the params array using
22314         alloca so it gets GC tracking.
22316 2005-03-23  Chris Toshok  <toshok@ximian.com>
22318         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
22319         out some spew.
22321 2005-03-24  Raja R Harinath  <rharinath@novell.com>
22323         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
22324         changes to pick up any changes in prefix, etc.
22326 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
22328         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
22329         
22330         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
22331         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
22333 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
22335         * class-internals.h object-internals.h class.c reflection.c: Extend the
22336         mono_lookup_dynamic_token () function to return the class of the
22337         token as well. 
22339         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
22340         well. Fixes #73848.
22342 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
22344         * security-manager.c: Skip inheritance checks for intra-corlib
22345         class inheritance and method overrides. This skips a lot of checks
22346         and (anyway) permissions cannot work until corlib is loaded.
22348 2005-03-23  Martin Baulig  <martin@ximian.com>
22350         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
22351         MONO_TYPE_GENERICINST.  
22353 2005-03-23  Martin Baulig  <martin@ximian.com>
22355         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
22357 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
22359         * class.c: added locking comments to some functions.
22360         Cache the interface offsets arrays (saves about 20 KB
22361         of runtime memory in a typical app).
22362         Reduce the time overhead in mono_class_setup_supertypes ().
22364 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
22366         * icall.c: speedup and fix leaks in GetMethodsByName and
22367         GetPropertiesByName.
22369 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
22371         * reflection.c: some locking fixes.
22373 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
22375         * metadata.c: added missing break in case statement.
22377 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
22379         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
22380         typedbyref return values. Fixes #73941.
22382 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
22384         * security-manager.c|h: Added demandunmanaged method and 
22385         suppressunmanagedcodesecurity class to MonoSecurityManager.
22386         Renamed aptc class to allowpartiallytrustedcallers.
22388 2005-03-17  Martin Baulig  <martin@ximian.com>
22390         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
22392 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22394         * file-io.c: disabled file async. IO using aio_*. It uses the
22395         threadpool now. Workaround for bug #73718.
22397 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22399         * assembly.h, mono-config.c: added code to deal with bundled configs
22400         for bundled assemblies.
22402 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
22404         * *.c, private.h: cleanup, removing old private.h header file.
22406 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
22408         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
22409         and throw_on_unmappable_char attributes.
22411 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
22413         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
22414         _ProcessName_internal.
22416 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
22418         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
22419         #73631.
22421         * icall.c threads.c threads-types.h: Remove slothash icalls as they
22422         are no longer used.
22424 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
22426         * object.c (compute_class_bitmap): Add support for generics. Fixes
22427         #73527.
22429 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
22431         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
22433 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22435         * filewatcher.c: commented out the code for windows watcher, as we don't
22436         use it (we use the managed implementation instead).
22438 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
22440         * object-internals.h (MonoThread): Remove 'unused1' field.
22442         * appdomain.c: Bump corlib version.
22444         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
22446         * reflection.c (mono_reflection_create_runtime_class): Remove the
22447         AssemblyBuilder.Save optimization since it causes too many problems.
22449 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
22451         * exception.c|h: Added mono_get_exception_reflection_type_load to
22452         create a ReflectionTypeLoadException object.
22453         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
22454         to return NULL is a InheritanceDemand fails during reflection. Updated
22455         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
22456         ReflectionTypeLoadException if an InheritanceDemand fails during 
22457         reflection. Added icall mapping for GetLinkDemandSecurity.
22458         * security-manager.c|h: Added ves_icall_System_Security_
22459         SecurityManager_GetLinkDemandSecurity internal call to return the
22460         class and methods permissions set for a LinkDemand. Removed unused
22461         fields in MonoSecurityManager.
22463 2005-03-10  Martin Baulig  <martin@ximian.com>
22465         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
22466         it's a generic instance.
22468 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
22470         * reflection.c (mono_get_object_from_blob): Applied patch from
22471         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
22473         * class.c (mono_class_is_assignable_from): Another try at fixing 
22474         #73469 without breaking anything.
22476 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
22478         * class.c: (mono_class_is_assignable_from): Revert the last changes
22479         since they don't work with generics.
22480         
22481         * class.c (mono_class_is_assignable_from): Fix build bustage.
22483         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
22484         the managed IsAssignableFrom method. Fixes #73469.
22486         * reflection.c (mono_reflection_call_is_assignable_from): New helper
22487         function.
22489 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
22491         * object.c (mono_load_remote_field_new): Fix returning uninitialized
22492         memory when the remoting callback does not sets the out arguments.
22493         Fixes #73007.
22495         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
22496         by mistake.
22498         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
22500         * object-internals.h (MonoStackFrame): Sync with managed object layout.
22502         * appdomain.c: Bump corlib version.
22504 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
22506         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
22507         function.
22509         * threads.c (mono_thread_attach): Detect threads which are not started
22510         by the GC pthread wrappers.
22512 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
22514         * icall.c: Added new icall for RNG.
22515         * rand.c|h: Added new icall to open the RNG. This allows to share a 
22516         single handle on Linux to access /dev/urandom and fix #73183.
22518 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
22520         * object.c: setting the new vtable in a transparent proxy object must
22521         not change the GC descriptor.
22523 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22525         * object.c: fixed compilation without GCJ support.
22526         * reflection.c: for runtime-created types ensure klass->has_references
22527         is correct (bug #73215).
22529 2005-03-02  Martin Baulig  <martin@ximian.com>
22531         * class.c (mono_class_is_assignable_from): Make this work if
22532         `oklass' is a generic instance; fixes #72831.
22534 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
22536         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
22537         with hasthis set.
22538         
22539         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
22541         * marshal.c: Reorganize native->managed marshalling code to also use
22542         the emit_marshal_... functions.
22544 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
22546         * object.c: typed allocs have issues with bitmap sizes > 30,
22547         so check for max_set >= 30.
22549 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
22551         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
22552         managed code. Fixes #73012.
22554         * metadata.h (MonoMarshalSpec): Add elem_mult field.
22556         * metadata.c reflection.c: Load/Emit elem_mult as well.
22557         
22558         * metadata.h (MonoMarshalSpec): Add comment.
22560         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
22562         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
22563         num_elem to -1 if not given.
22565         * object-internals.h (MonoReflectionMarshal): Add has_size field.
22567         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
22568         given values.
22570 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
22572         * null-gc.c (mono_gc_free_fixed): Was not compilable.
22574 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
22576         * reflection.c (encode_marshal_blob): Encode param_num field as well.
22578         * object-internals.h (MonoReflectionMarshal): Add param_num field.
22580 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
22582         * object.c: generalized the reference bitmap creation
22583         and added hooks for the new GC.
22584         * class-internals.c: removed the gc_bitmap field from MonoClass.
22586 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22588         * domain.c: help the compiler to produce better code
22589         in mono_jit_info_table_find ().
22591 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
22593         * object.c: make all allocations look typed.
22595 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22597         * socket-io.c: load Mono.Posix if it's not loaded already
22598         (fixes bug#73033).
22600 2005-02-24  Martin Baulig  <martin@ximian.com>
22602         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
22603         * reflection.c (dup_type): Likewise.
22605 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
22607         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
22608         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
22610 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
22612         * domain.c, threads.c, object-internals.h: make the critical thread
22613         local vars use the fast access mode (even when we're compiled in
22614         a lib). Provide accessors to be used by the jit during codegen.
22616 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
22618         * appdomain.c: Changed hook functios behavior to include
22619         support for the reflection only assemblies. Some icalls were changed
22620         to support the mentioned assemblies too. Signatures of static methods
22621         try_assembly_resolve and real_load now have an additional parameter:
22622         refonly.
22624         * assembly.c: General changes to mono_assembly_ methods to support
22625         reflection only api. Functions mono_assembly_open, mono_assembly_load,
22626         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
22627         suffix, to support an additional gbool parameter to specify whether
22628         the assembli is reflection only or not. Created some new hook functions 
22629         to add support for reflection only assemblies. Signatures of static 
22630         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
22631         have now an additional parameter: refonly.
22633         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
22634         indicating whether the assembly is reflection only or not.
22636         * exception.c: Add mono_get_exception_invalid_operation.
22638         * icall.c: Throw an InvalidOperationException when trying to invoke
22639         a property/method/event, or trying to set/get the value of a field.
22640         Also add an icall to retrieve the ref_only flag to the
22641         MonoReflectionAssembly.
22643 2005-02-23  Chris Toshok  <toshok@ximian.com>
22645         Part of fix for #72827.
22646         * mono-debug.c (mono_debug_add_method): add lexical block data to
22647         the info we write.  Kind of a hack at the moment - we copy the
22648         lexical block info from the MonoDebugMethodInfo to the
22649         MonoDebugMethodJitInfo here, before writing it.
22650         (mono_debug_read_method): read the lexical block info.
22652         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
22654         * debug-mono-symfile.h: add lexical block support.
22656         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
22657         support.
22659 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
22661         * loader.c (mono_lookup_pinvoke_call): Fix warning.
22663         * object.c (mono_runtime_free_method): Call mono_free_method () and
22664         put the TODOs there.
22666         * loader.c (mono_free_method): Free up most memory allocated for 
22667         dynamic methods.
22669 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
22671         * reflection.c: properly flag a Type argument to a
22672         named custom attr value (bug #72248).
22674 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
22676         * reflection.c: reduce code duplication in named custom
22677         attribute encoding.
22679 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
22681         * reflection.c: properly encode custom attrs of type object
22682         (bug #72649).
22684 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
22686         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
22688 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
22690         * socket-io.c: load System.dll if it's not loaded already
22691         (bug #72850 and #70477).
22693 2005-02-21  Martin Baulig  <martin@ximian.com>
22695         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
22696         generic instances.
22698 2005-02-21  Martin Baulig  <martin@ximian.com>
22700         * reflection.c (mono_image_build_metadata): We also need to
22701         "fixup" the MethodImpl table after we computed the final method
22702         indices.  Call fixup_methodimpl() to do that.
22703         (fixup_methodimpl): New private method.
22705 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
22707         * assembly.c: special case mscorlib.dll (bug#72536),
22708         patch from Carlos Alberto Cortez.
22710 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
22712         * threads-types.h threads.c: Fix build bustage.
22714         * threads.c: Use a union for long<->double conversions.
22716         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
22717         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
22719         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
22720         containing the checkpoint call with NOT_TAKEN.
22721         
22722         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
22723         checkpoint before pushing the arguments, so they won't have to be
22724         spilled to stack.
22726 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22728         * domain.c, assembly.c, domain-internals.h: make some data
22729         const and relocation-free.
22731 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
22733         * object.c, appdomain.c, class-internals.h: introduce the
22734         MonoClassRuntimeInfo structure to hold the info needed to
22735         use a class at runtime. Made mono_class_vtable() lock-free
22736         for all the appdomains.
22738 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
22740         * metadata-internals.h, image.c: introduce a per-image mempool to
22741         be used for memory that has the same lifetime as the image.
22743 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
22745         * domain.c: In mono_init_internal(), instead of selecting the first
22746         runtime version supported by an executable, get a list of all
22747         supported versions and select the one for which an mscorlib exists
22748         (since even if the runtime supports a given version, it doesn't mean
22749         that the framework for that version is installed).
22750         Modified get_runtimes_from_exe to support this behavior.
22751         In supported_runtimes, added information about additional system
22752         assembly versions.
22753         
22754         * assembly.c: Added support for more than one system assembly version
22755         per runtime version. Updated the assembly list.
22756         In mono_assembly_remap_version, removed the initial version check,
22757         since we don't know to which version we need to compare until we
22758         get the version set on which the assembly is based.
22759         Moved the code for loading corlib into the new method
22760         mono_assembly_load_corlib(), so it can be used by the initialization
22761         code.
22762         
22763         * domain-internals.h: Updated data structures and added declaration
22764         for mono_assembly_load_corlib.
22766 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
22768         * reflection.c (resolve_object): Fix the creation of the signature in 
22769         the SignatureHelper case.
22771         * assembly.c (mono_assembly_remap_version): Fix binary search.
22772         
22773 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
22775         * class.c: Added inheritance check when a method is overloaded (from a
22776         virtual method or when implementing an interface) and when a class is
22777         inherited. Added functions to set a failure for a class and to 
22778         retreive the exception from a failure.
22779         * class-internals.h: Added fields to MonoClass to keep the exception
22780         information status for inheritance (or other exceptions) to be thrown
22781         later (i.e. not at load time).
22782         * object.c: Throw the inheritance SecurityException when a type is to 
22783         be created with either class or method inheritance violations.
22784         * reflection.c|h: Fix when getting declsec from a class. Removed 
22785         unrequired code for class. Improved sanity in parameter naming.
22786         * security-manager.c|h: Added functions to check for class and method
22787         inheritance.
22789 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
22791         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
22792         and has_finalize in dynamic types as well.
22794 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
22796         * culture-info-table.h : fixed currency format for en-GB (and so on).
22798 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
22800         * gc.c: ensure the GC handles never have 0 as a value.
22802 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
22804         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
22805         a pointer to a struct to unmanaged code. Fixes #72625.
22807 2005-02-16  Martin Baulig  <martin@ximian.com>
22809         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
22811 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
22813         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
22815 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
22817         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
22819         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
22820         UnmanagedFunctionPointerAttribute, use it for determining calling convention
22821         etc. Fixes #71471.
22823         * reflection.c (mono_custom_attrs_get_attr): New helper function.
22825         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
22827 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
22829         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
22830         changes to make the current context a field in MonoThread.
22832 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
22834         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
22835         the last change.
22836         
22837         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
22838         extracted from mono_marshal_get_native_wrapper.
22840         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
22841         to create wrappers around native functions.
22843         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
22844         delegates for arbitrary function pointers. Fixes #71472.
22846 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
22848         * threads.c: cleaned up the code a little.
22850 2005-02-15  Martin Baulig  <martin@ximian.com>
22852         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
22853         the data table.
22855         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
22856         allocate larger chunks if needed.
22858 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
22860         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
22861         in by mistake.
22863 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
22865         * domain.c: keep the domains in an array and ensure the domain ids
22866         are kept small, so they can be used as indexes to domain-specific data
22867         with a small memory overhead.
22869 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
22871         * icall.c: Handle byref types in Type icalls. Fixes #72544.
22873 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
22875         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
22877 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
22879         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
22881         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
22882         values.
22884         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
22885         
22886 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
22888         * domain-internals.h: add the hashtable here.
22890         * class-internals.h: Remove `info' from MonoMethod
22892         * domain.c: Add a new hashtable, jit_trampoline_hash
22894 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
22896         * object.c: don't set the value of static fields
22897         (fixes bug#72494).
22899 2005-02-11  Martin Baulig  <martin@ximian.com>
22901         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
22902         (mono_debug_add_method): Silently ignore the method if it's too big.
22903         (mono_debug_add_type): Likewise.
22905 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
22907         * threads.c, appdomain.c: remove #ifdefs from the code.
22909 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
22911         * metadata-internals.h: Added flags to MonoAssembly to cache the most
22912         common security informations. This allows us to stay in unmanaged code
22913         when doing LinkDemand and it's special cases (except for the first 
22914         time for initialization). The flags a very much used with --security.
22915         * reflection.c|h: Added code to get declarative security attributes 
22916         for LinkDemand and InheritanceDemand. This required to refactor the
22917         existing code for Demand.
22918         * security-manager.c|h: Added new method fields for the special cases
22919         of LinkDemand.
22921 2005-02-10  Martin Baulig  <martin@ximian.com>
22923         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
22924         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
22926 2005-02-10  Martin Baulig  <martin@ximian.com>
22928         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
22929         debugging code; this is almost a complete rewrite.
22931         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
22933 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
22935         * domain.c, object.h: expose mono_string_equal () and 
22936         mono_string_hash ().
22937         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
22938         it's implemented in managed code.
22940 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22942         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
22943         lo leak objects between appdomains.
22945 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22947         * assembly.c: old compilers compilation fix from 
22948         robertj@gmx.net (Robert Jordan).
22950 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
22952         * class-internals.h: Little reminder for the future.
22954         * debug-helpers.c: Fix up wrapper_type_names
22956 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
22958         * image.c, metadata-internals.h: when loading an image from a file,
22959         mmap all of it and use the same codepaths as when using a
22960         in-memory image: the code is simpler and we use less memory
22961         (both writable and readonly).
22963 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
22965         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
22966         API to alloc runtime data structures that need to be tracked by the
22967         GC and contain pointers.
22968         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
22969         make the code more readable and eventually use a different GC.
22971 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
22973         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
22974         for out arguments.
22975         
22976 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
22978         * object.c: In release_type_locks(), don't release the cctor lock
22979         if it has already been released. This fixes a crash in the
22980         thread5 test.
22982 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22984         * gc.c, marshal.c, icall.c: register a delegate for finalization
22985         only when the native function pointer has been allocated for it.
22987 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
22989         * object.c: cleaned up some code, allocate objects that are
22990         pointer free with the atomic malloc variant. Allocate memory
22991         for static data from the mempool if it's pointer-free.
22992         Allocate the bounds array at the end of the array data, when needed.
22993         * object-internals.h, object.h: move a private function in a private
22994         header.
22995         * class.c: handle missing case in tracking references in fields.
22997 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
22999         * class.c, class-internals.h: keep track if a type has
23000         reference fields in either the instance or static fields.
23002 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
23004         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
23005         and renamed to MonoRuntimeInfo. Added fields to store the expected
23006         framework assembly version. Changed mono_get_framework_version and
23007         mono_get_runtime_version for a single mono_get_runtime_info method.
23008         
23009         * assembly.c: Added method to remap system assembly versions to the
23010         current executing runtime version. Removed old mapping code.
23011         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
23012         
23013         * icall.c, reflection.c: Track api changes.
23015 2005-02-06  Miguel de Icaza  <miguel@novell.com>
23017         * loader.c (method_from_memberref): Improve error reporting,
23018         produce the class name instead of the typeref/typedef index. 
23020 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
23022         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
23024 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
23026         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
23027         stdcall and charset name mangling.  Reorganize the code and add
23028         some tracing stuff.
23030 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
23032         * monodiet.c: More iters!
23034         * marshal.c: Iter usage.
23036         * icall.c: Iter usage.
23038         * object.c: Use iters.
23040         * debug-helpers.c: More iters
23042 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
23044         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
23045         under win32.
23047 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
23049         * mono-debug-debugger.c: use iters
23051         * class.c, class-internals.h: mono_class_setup_events is static
23052         now
23054         * All callers: use iters
23056 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
23058         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
23059         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
23061 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
23063         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
23065         * marshal.h: Add prototypes for ldfld/stfld_remote.
23067         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
23068         this is called during startup.
23069         
23070 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
23072         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
23073         MonoThreadsSync struct private in monitor.c. Changed the way
23074         MonoThreadsSync is allocated so it's faster and there is no
23075         need to keep track of it with a finalizer and it uses less memory.
23076         This also finally allows us to allocate mono objects as ptrfree when
23077         there are no reference fields.
23079 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
23081         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
23082         disappearing link to the GC interface and use them to simplify
23083         the gchandles code.
23085 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
23087         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
23088         stfld_remote which call mono_load/store_field_new. This allows methods
23089         calling ldfld/stfld wrappers to be AOTed.
23091         * console-io.c: Include sys/filio.h under solaris.
23092         
23093         * console-io.c: Include curses.h if needed correctly.
23095 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
23096         
23097         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
23098         method->klass as well.
23100         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
23102         * class.c (mono_class_init): Switch on lazy initialization of 
23103         methods.
23105         * class.c (mono_class_get_finalizer): Handle the case when the 
23106         finalizer is inherited.
23108 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23110         * console-io.c: <curses.h> is needed by term.h on solaris.
23112 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
23114         * icall.c, class-internals.h, monodiet.c, class.c: Remove
23115         mono_class_setup_properties where possible. Remove this ftn from
23116         the header file, and make it static.
23118 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
23120         * loader.c: Add missing setup_... call.
23122         * class.c: Add missing setup_... calls.
23124         * class.c (mono_class_init): Switch on lazy initialization of 
23125         the generic vtable.
23126         
23127         * class.c (mono_class_init): Fix generics broken by the recent changes.
23129         * monodiet.c (handle_type): Add missing setup_... calls.
23131         * class.c: Back out garbage in previous patch.
23132         
23133         * class.c: Add missing setup_... calls.
23135         * class.c (mono_class_get_method_from_name_flags): Avoid calling
23136         mono_class_setup_methods () if possible.
23138         * class-internals.h (MonoClass): Add 'has_cctor' flag.
23140         * class-internals.h (MonoCachedClassInfo): New structure.
23142         * class.c: Initialize properties and events fields of MonoClass lazily.
23144         * class.c: Add infrastructure for lazily initializing the methods and
23145         vtable fields of MonoClass. Not yet used.
23147         * class.c (mono_class_get_finalizer): New helper function.
23149         * class.c: Add infrastructure for loading some class related data from
23150         an AOT file.
23152         * object.c: Add infrastructure for initializing the vtable from data
23153         in the AOT file.
23155         * gc.c (run_finalize): Use mono_class_get_finalizer ().
23157         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
23158         appropriate initialization function before accessing parts of the
23159         MonoClass structure.
23161         * marshal.c: Fix warnings.
23162         
23163         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
23165         * mono-debug-debugger.c (get_exception_message): Use 
23166         mono_class_get_method_from_name_flags ().
23168 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
23170         * reflection.c, appdomain.c: Replace a few manual searches that
23171         Zoltan missed. (Paolo approved this part of my initial patch).
23173 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
23175         * profiler.c: disable recording statistical events at report time.
23177 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
23179         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
23180         to byteswap arrays of enum values, too (bug #72080).
23182 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
23184         * appdomain.c (set_domain_search_path): Allow this to be called if
23185         domain->setup is not yet set.
23187         * loader.c (mono_method_get_index): New helper function.
23189         * loader.c reflection.c: Use mono_method_get_index ().
23191         * class.c (mono_class_get_method_from_name_flags): New helper method.
23193         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
23194         this.
23196         * class.c (mono_class_get_cctor): New helper method.
23198         * string-icalls.c object.c class.c marshal.c reflection.c: Use
23199         mono_class_get_method () to look up methods.
23201 2005-02-01  Miguel de Icaza  <miguel@novell.com>
23203         * console-io.c: Fix the build, this should work on Windows.
23205 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
23207         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
23208         be set to null to keep things valid
23210 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23212         * icall.c: added Console 2.0 icalls.
23213         * Makefile.am: added console-io.[ch]
23214         * console-io.[ch]: internal calls for Console 2.0 API.
23216 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
23218         * class.c: make sure we consider all the interfaces
23219         when calculating max_interface_id (bug found by
23220         Jeroen Frijters running ikvm).
23222 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
23224         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
23225         valuetype fields to null.
23227         * object.c (set_value): Ditto. Fixes #71669.    
23229 2005-01-31  Martin Baulig  <martin@ximian.com>
23231         * metadata.c (mono_metadata_has_generic_params): New public
23232         function; checks whether something is a generic method.
23234 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
23236         * appdomain.c: fix infinite recursion when adding assemblies.
23238 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
23240         * object.c: Fix small typo to return all items for Environment.
23241         GetCommandLineArgs.
23243 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
23245         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
23246         reflection.c: more domain and assembly-unload related fixes
23247         and memory leaks plugs.
23249 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
23251         * 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.
23253 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
23255         * loader.c (mono_method_signature): Make this method lazy
23256         (mono_get_method_from_token): Don't computate the signature here.
23258         Doing this saves quite a bit of memory. I got 90 kb on starting up
23259         monodoc. It should also save some disk reads on startup.
23261         * *: MonoMethod->signature might be NULL now. You *MUST* use
23262         mono_method_signature.
23264 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
23266         * object.c (mono_runtime_get_main_args): Return an array from the
23267         current domain here. Fixes #71938.
23269 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
23271         * monitor.c: formatting changes to comply with the
23272         mono coding style and remove #ifdefs from the code.
23274 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
23276         * metadata.c, private.h: remove some unneeded data
23277         and use a more compact representation for table schemas.
23279 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
23281         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
23282         to get a better distribution in hash tables.
23283         * *.c: use mono_aligned_addr_hash() where appropriate.
23284         * assembly.c: make var static.
23286 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
23288         * domain-internals.h: Put MonoJitInfo on a diet.
23290         * domain.c: Fix a warning.
23292 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
23294         * gc.c: rework the gc handles code to reuse handles
23295         when freed.
23297 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
23299         * domain.c: fixed long standing bug in mono_string_equal() which
23300         was brought to light with the ldstr changes.
23302 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
23304         * reflection.c: Remove warning by adding missing include for marshal.h
23306 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
23308         * domain.c, object.c: change the ldstr_table to hold
23309         MonoString* as keys: makes the runtime isinterned lookup
23310         faster and simplifies memory management.
23312 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
23314         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
23315         possible to add imperative security checks before calling the icall.
23316         * reflection.c: Return security attributes on the original MonoMethod
23317         (and not the wrapped one). This fix permissions on icalls.
23319 2005-01-25  Dick Porter  <dick@ximian.com>
23321         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
23322         the check for mktime() support actually test the mktime() return
23323         value.  "Fixes" bug 71682, though the output is still different to
23324         MS.
23326 2005-01-25  Martin Baulig  <martin@ximian.com>
23328         * class.c (mono_class_is_assignable_from): Make this work for
23329         generic instances.
23331 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
23333         * marshal.c (mono_string_utf8_to_builder)
23334         (mono_string_builder_to_utf16): We might not have ownership of the
23335         string. In thise case, we need to create a new buffer.
23337         * object-internals.h (mono_stringbuilder_capacity): sb->str might
23338         be null, in which case, use the default capacity.
23340 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
23342         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
23343         GC events to the profiler.
23345 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
23347         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
23348         if you don't want the GC to run.
23350 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
23352         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
23353         start providing a GC API and keeping different implementations in
23354         their own file.
23355         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
23357 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
23359         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
23360         mmap rather than allocating a huge buffer.
23361         (mono_debug_close_mono_symbol_file): Free the buffer allocated
23362         above.
23364 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
23366         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
23367         and CheckExecutionRights.
23368         * reflection.c|h: Keep the index of the declarative security to be 
23369         used, instead of the pointer, when AOT compiler is used. Also add 
23370         class initialization when requesting demands.
23371         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
23372         CheckExecutionRights. Both properties are now FALSE by default, and
23373         unmodifiable, unless the --security option is used.
23375 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
23377         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
23378         reflection.c: properly refcount images and assemblies, many leaks fixed.
23380 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23382         * threadpool.c: increase the timeout for threads in the thread pool to
23383         10s.  Fixes bug #67159.
23385 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
23387         * class-internals.h: Sun's compiler insists on explicit
23388         signed on bit fields to handle then correctly.
23390 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
23392         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
23393         Make the size of the array fit only the number of invalid path
23394         chars that we have.
23396         * class.c (_mono_class_get): Improve the error reporting when a
23397         class referenced is not found, to assist debugging. 
23399 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
23401         * threads.c: fix off-by-one error.
23402         * domain.c: free data allocated in the domain.
23404 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
23406         * reflection.c (mono_method_body_get_object): Fill out exception info
23407         as well.
23409         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
23410         structure.
23411         
23412 2005-01-19  Martin Baulig  <martin@ximian.com>
23414         * loader.c (mono_get_method_constrained): Make this work again.
23416 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
23418         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
23419         guint16 to match the managed side.
23421         * reflection.c (mono_reflection_body_get_object): Fill out local
23422         variables array.
23424         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
23425         as well.
23427         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
23428         'local_var_sig_token'.
23430 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
23432         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
23433         System.Drawing.
23435         * reflection.c (mono_method_body_get_object): Handle abstract and
23436         runtime methods.
23438 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
23440         * marshal.c, loader.c, class-internals.h, reflection.c:
23441         store the emthod data for a wrapper in an array instead of a list.
23443 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
23445         * marshal.c: change the code to allocate memory more
23446         conservatively for method wrappers.
23448 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
23450         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
23451         fields from MonoClass to the marshal info structure where they belong.
23453 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
23455         * class.c, object.c, class-internals.h, marshal.c: rearrange
23456         some fields and tweak some types to lower memory usage.
23458 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
23460         * threads.c (signal_thread_state_change): Handle the case when the
23461         target thread is the current thread.
23463         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
23465         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
23466         emit_ptr_to_object_conv. 
23468         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
23469         marshalling. Fixes #71352.
23471 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
23473         * metadata.h, blob.h: move table enum to blob.h so it can be included
23474         in any header.
23475         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
23476         cut the size of MonoImage/MonoDynamicImage.
23478 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
23480         * profiler.c (mono_profiler_install_simple): Fix default arguments.
23482 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
23484         * reflection.c, reflection.h, icall.c: add a function to check
23485         if an attribute type is defined for a metadata object.
23487 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
23489         * object-internals.h: Added some needed fields from StringBuilder class.
23490         * marshal.c: Set the maxCapacity when creating a StringBuilder.
23492 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
23494         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
23495         threads before shutting down the runtime.
23497         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
23499 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
23501         * object-internal.h, threads.c: implement stacksize and 
23502         parameterized thread start functionality (requires
23503         matching corlib). Marked broken code for later removal.
23505 2005-01-12  Martin Baulig  <martin@ximian.com>
23507         * class-internals.h (MonoGenericClass): Moved the `initialized'
23508         flag to MonoDynamicGenericClass, removed `init_pending'.
23509         (MonoGenericInst): Added `is_reference' flag.
23511 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
23513         * reflection.c (mono_image_create_pefile): Only set the pe_offset
23514         inside the MSDOS header. Fixes #71201.
23516         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
23517         gc thread.
23518         (mono_domain_finalize): Ditto.
23520 2005-01-12  Martin Baulig  <martin@ximian.com>
23522         * class.c (mono_get_shared_generic_class): Use the cache for
23523         non-dynamic generic classes.
23525         * class-internals.h (mono_class_create_generic_2): Removed
23526         function prototype, this function is now static inside class.c.
23528         * class.c (mono_class_create_generic_2): Made this static, only
23529         call it from mono_class_init() and mono_class_setup_parent().
23530         (collect_implemented_interfaces_aux): Call mono_class_init() on
23531         the interfaces we collect.
23532         (mono_class_setup_vtable): Call mono_class_init (class->parent).
23534 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
23536         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
23537         it a real thread handle.
23539         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
23540         MonoJitExceptionInfo, since each catch clause needs its own variable.
23541         
23542 2005-01-11  Dick Porter  <dick@ximian.com>
23544         * image.c (mono_pe_file_open): New variant on mono_image_open()
23545         that does not set up the CLI metadata; used for FileVersionInfo so
23546         it can get the data for windows binaries too.
23547         
23548         * process.c (process_read_string_block): Don't read off the end of
23549         the StringTable block.
23551         These both fix bug 70766.
23553 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
23555         * gc.c: set some fields to NULL at GC cleanup time.
23556         * threads.c: if we quit the main thread, call exit ().
23558 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
23560         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
23562 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
23564         * threads.h, threads.c, object.c: added accessor and settor for
23565         main_thread. Handle it specially when exiting from it: wait
23566         for other foreground threads to exit.
23568 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
23570         * process.c, verify.c: remove some bloat.
23572 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
23574         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
23575         the calling convention to cdecl under win32.
23577 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
23579         * object.c (mono_object_get_size): New function to get the size of
23580         an object instance.
23582         * profiler.c (simple_allocation): Use above.
23584 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
23586         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
23587         ves_icall_System_AppDomain_getRootDomain (as it's not required to
23588         get an appdomain by it's id and we can't assume the root's id is 0).
23589         * domain-internals.h: Change the function prototype to match.
23590         * icall.c: Change the icall table for AppDomain.
23592 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
23594         * locales.c (string_invariant_compare_char): Only compute
23595         GUnicodeTypes in the case where we need them.  Test for ordinality
23596         first and return if so.
23598         From the commit:
23600                 /*
23601                  * FIXME: here we must use the information from c1type and c2type
23602                  * to find out the proper collation, even on the InvariantCulture, the
23603                  * sorting is not done by computing the unicode values, but their
23604                  * actual sort order.
23605                  */
23607 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
23609         * loader.c: for P/Invoke methods, allow the "Internal" shared
23610         library name to refer to the calling process symbol namespace.
23612 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
23614         * Makefile.am: Add the security manager to the build.
23615         * security-manager.c|h: New. Initialization of the security manager.
23617 2005-01-07  Dick Porter  <dick@ximian.com>
23619         * threads.c: 
23620         * monitor.c: Update thread state during Monitor and WaitHandle
23621         waits.  Fixes bug 71031.
23623 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
23625         * reflection.c (property_encode_signature): Correctly handle when the
23626         property has no methods.
23628 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
23630         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
23631         
23632         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
23633         fields from mb, not rmb. Fixes #71017.
23635         * marshal.c (emit_ptr_to_str_conv): Add support for 
23636         ByValTStr -> string conversion. Fixes #71015.
23638         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
23640         * mempool.c (mono_mempool_contains_addr): New helper function.
23642 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
23644         * metadata.c (mono_metadata_compute_size): Fix size calculation of
23645         HasSematics encoded fields.
23646         
23647         * metadata.c (mono_type_to_unmanaged): Improve error message for 
23648         invalid string marshalling.
23650         * metadata.c: Fix warnings.
23651         
23652 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
23654         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
23655         profiler support.
23657 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
23659         * domain.c object.c domain-internals.h: Revert part of r38077 since the
23660         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
23661         tests.
23663 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
23665         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
23666         so methods containing these can be AOTed.
23668 2005-01-03  Martin Baulig  <martin@ximian.com>
23670         * loader.c (find_method): Removed the hack for generic instances.
23671         (method_from_memberref): If our parent is a generic instance, pass
23672         its generic type definition to find_method() and then inflate the
23673         method.
23674         (mono_get_method_constrained): Pass the generic type definition to
23675         find_method() and inflate the method later.
23677         * class-internals.h (MonoStats): Added `generic_class_count'.
23679         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
23680         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
23682         * reflection.c (mono_custom_attrs_from_params): Don't ignore
23683         generic type definitions.
23685 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
23687         * loader.c icall.c: Fix warnings.
23689 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
23691         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
23692         blittable types. Fixes #70864.
23694 2004-12-29  Martin Baulig  <martin@ximian.com>
23696         * icall.c
23697         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
23699         * reflection.c (mono_method_get_object): Create a
23700         "System.Reflection.MonoGenericMethod" for inflated methods; don't
23701         call mono_get_inflated_method().
23703         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
23705 2004-12-27  Martin Baulig  <martin@ximian.com>
23707         * class-internals.h (MonoMethod): Added `is_inflated' flag.
23708         (MonoMethodInflated): Added `inflated' field.
23710         * class.c (mono_class_inflate_generic_method): Don't really
23711         inflate the method here; just set the `is_inflated' flag in the
23712         MonoMethod.
23713         (mono_class_get_inflated_method): Actually inflate the method here
23714         if it's not already inflated; we use the MonoMethodInflated's new
23715         `inflated' field as a cache.
23717 2004-12-26  Martin Baulig  <martin@ximian.com>
23719         * class.c
23720         (inflate_generic_class): Moved some code out of inflate_generic_type().
23721         (mono_class_inflate_generic_method): If we're already inflated,
23722         inflate the context and use the declaring method; ie. make sure
23723         the declaring method of an inflated method is always the generic
23724         method definition.
23725         (mono_class_create_from_typedef): Create
23726         `class->generic_container->context->gclass'.
23728 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
23730         * metadata-internals.h, marshal.c, reflection.c: More
23731         MonoGHashTable->GHashTable.
23733         * domain-internals.h, class.c: Change MonoGHashTable's into
23734         GHashTables for some cases where no gc stuff is used
23736         All users: update apis
23738 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
23740         * metadata.c (builtin_types): Make this `const'. Makes this get
23741         put into the shareable section.
23742         (mono_metadata_init): Casts to make gcc happy.
23744 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
23746         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
23748 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
23750         * icall.c: Added an internal call to retrieve the position and length
23751         of assembly-level declarative security attributes (RequestMinimum, 
23752         RequestOptional and RequestRefuse). This is used by the Assembly class
23753         to re-create the corresponding permission sets.
23755 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
23757         * marshal.c: fix the stelemref wrapper to be type correct
23758         (and faster).
23760 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
23762         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
23763         to do key & 0x7fffffff. Hashtable already does this. It just
23764         results in longer code.
23766 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
23768         * appdomain.c: Bump corlib version.
23769         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
23770         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
23771         * reflection.c|h: Add functions to get declarative security infos
23772         (blob position and length) for assemblies, classes and methods.
23774 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
23776         * reflection.c: sort the constant table (bug #70693).
23778 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
23780         * object-internals.h, threads.c, domain.c: add accessors for
23781         the MonoThread and MonoDomain tls keys.
23783 2004-12-18  Martin Baulig  <martin@ximian.com>
23785         * class.c (inflate_generic_type): If we're inflating a generic
23786         instance, set `ngclass->context->container = context->container';
23787         ie. the container we inflated into.
23789         * metadata.c (mono_metadata_parse_generic_param): Reflect above
23790         inflate_generic_type() changes.
23792 2004-12-17  Martin Baulig  <martin@ximian.com>
23794         * class-internals.h
23795         (MonoGenericClass): Replaced `MonoType *generic_type' with
23796         `MonoClass *generic_class'.  Removed `dynamic_info'; if
23797         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
23798         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
23800 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
23802         * exception.c (mono_exception_from_token): New helper function.
23804 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
23806         * assembly.c (mono_assembly_load_with_partial_name): Call 
23807         mono_assembly_loaded before invoking the preload hooks. Fixes
23808         #70564.
23810         * object-internals.h (MonoThread): Change culture_info and 
23811         ui_culture_info into an array.
23813         * threads.c: Cache culture info objects from more than one appdomain.
23815         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
23816         current UI culture.
23818 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
23820         * threads.h threads.c appdomain.c: Clear the culture_info field of
23821         all threads during unloading if they point to an object in the dying
23822         appdomain.
23824 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
23826         * culture-info.h (TextInfoEntry): New struct
23827         * object-internals.h: sync with managed
23828         * locales.c: fill the `text_info_data' field
23829         * culture-info-tables.h: update
23831 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
23833         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
23834         collector.
23836 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
23838         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
23839         (ves_icall_ModuleBuilder_getMethodToken): Ditto
23841 2004-12-12  Martin Baulig  <martin@ximian.com>
23843         * mono-debug-debugger.c (write_type): If we're an enum and the
23844         builtin types have already been initialized, call mono_class_init().
23846 2004-12-11  Martin Baulig  <martin@ximian.com>
23848         * metadata.c (mono_metadata_load_generic_params): Added
23849         `MonoGenericContainer *parent_container' argument; automatically
23850         compute `container->is_method'; pass the correct owner to
23851         get_constraints().      
23853         * reflection.c (compare_genericparam): Sort the GenericParam table
23854         according to increasing owners. 
23856 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
23858         * profiler.c: allow disabling the default profiler.
23860 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
23862         * decimal.c, icall.c: allow disabling System.Decimal support.
23864 2004-12-09  Marek Safar <marek.safar@seznam.cz>
23866         * reflection.c: Add support for null attribute arguments.
23868 2004-12-09  Martin Baulig  <martin@ximian.com>
23870         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
23871         names to get rid of compiler warnings.
23873 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
23875         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
23876         mono_marshal_load_type_info (). Fixes #69625.
23877         (mono_marshal_get_ptr_to_struct): Likewise.
23879 2004-12-08  Martin Baulig  <martin@ximian.com>
23881         * mono-debug.h: Bumped version number to 47.
23883         * mono-debug-debugger.c
23884         (mono_debugger_event_handler, mono_debugger_event): Take two
23885         guint64 arguments insteed of a gpointer and a guint32.  
23887 2004-12-08  Martin Baulig  <martin@ximian.com>
23889         * debug-mono-symfile.h
23890         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
23891         `address' to `native_offset'.
23893 2004-12-08  Martin Baulig  <martin@ximian.com>
23895         * class.c (mono_class_create_from_typespec): Only inflate if we
23896         either have `context->gclass' or `context->gmethod'.
23898 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
23900         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
23902         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
23904         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
23906         * reflection.c (mono_assembly_get_object): Remove the workaround put
23907         in for the release.
23908         
23909         * appdomain.c: Use the corlib_internal field from MonoAssembly.
23911         * appdomain.c: Bump corlib version.
23913         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
23914         be visible in other appdomains.
23916 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
23918         * threads.c: Interlocked inc and dec for longs were messed up,
23919         use a KISS based impl for this. Fixes 70234
23921 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
23923         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
23925 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
23927         * icall.c: fix to follow policy not to allow struct
23928         arguments in icalls.
23930 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23932         * process.c: make the patch that handles spaces in file paths work
23933         on mono/windows too.
23935 2004-12-06  Martin Baulig  <martin@ximian.com>
23937         * class.c (mono_class_create_generic): Call
23938         mono_class_setup_supertypes() if we're dynamic.
23939         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
23941 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
23943         * object-internals.h: Add new fields to MonoThread.
23945         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23947         * icall.c threads-types.h threads.c: Add new icalls.
23949         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
23951         * object-internals.h (MonoReflectionAssembly): Sync object layout with
23952         managed side.
23954         * appdomain.c: Bump corlib version.
23956         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
23957         internal assemblies. Fixes #69181.
23959 2004-12-05  Martin Baulig  <martin@ximian.com>
23961         * class.c (mono_class_inflate_generic_signature): Make this a
23962         no-op if `context' is NULL or we don't have any type parameters;
23963         also copy `sentinelpos'.        
23965 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
23967         * image.c: Add unbox_wrapper_cache.
23969         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
23971         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
23972         function generator.
23973         
23974         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
23975         Fixes #70173.
23977         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
23978         
23979 2004-12-04  Martin Baulig  <martin@ximian.com>
23981         * loader.c (mono_method_get_signature_full): New public function;
23982         like mono_method_get_signature(), but with an additional
23983         `MonoGenericContext *' argument.
23985         * class.c (mono_class_inflate_generic_signature): Formerly known
23986         as inflate_generic_signature(); make this public.
23988 2004-12-04  Martin Baulig  <martin@ximian.com>
23990         * metadata.c
23991         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
23992         instead of a `MonoGenericContainer *'.  
23993         (mono_metadata_parse_array_full): Likewise.
23994         (mono_metadata_parse_signature_full): Likewise.
23995         (mono_metadata_parse_method_signature_full): Likewise.
23996         (mono_metadata_parse_generic_inst): Likewise.
23997         (mono_metadata_parse_generic_param): Likewise.
23998         (mono_metadata_parse_mh_full): Likewise.
23999         (mono_type_create_from_typespec_full): Likewise.
24001 2004-12-03  Martin Baulig  <martin@ximian.com>
24003         * class-internals.h (MonoGenericContainer): Replaced the
24004         `MonoGenericContext * pointer with a `MonoGenericContext'
24005         structure and made it the first element.
24007 2004-12-03  Martin Baulig  <martin@ximian.com>
24009         * class.c
24010         (inflate_generic_type): Set the `context->container' when creating
24011         a new MonoGenericContext.
24012         (mono_class_inflate_generic_method): Likewise.
24013         (mono_class_create_from_typespec): Just use `context->container'
24014         to get the container.
24016         * loader.c (method_from_methodspec): Set `context->parent' from
24017         `context->container' - and if that's a method container, use its
24018         parent.  Also set the `context->container' when creating a new
24019         MonoGenericContext.
24020         (mono_get_method_from_token): Use just `context->container' to get
24021         the container.
24023         * metadata.c (do_mono_metadata_parse_generic_class): Also set
24024         `gclass->context->container'.
24026         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
24027         the `context->container' when creating a new MonoGenericContext.
24029 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
24031         * reflection.c (compare_genericparam): Sort params with identical
24032         owner by their number. Fixes gen-111 on sparc.
24034 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
24036         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
24037         around the domain changes.
24039         * appdomain.c (mono_domain_unload): Handle the case when the thread
24040         calling Unload is itself being aborted during unloading. Fixes #70022.
24042         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
24044         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
24045         checkpoint_func as an icall so it gets a wrapper.
24046         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
24047         in the cross-appdomain wrappers too.
24049         * threads.c (mono_thread_has_appdomain_ref): Make this public.
24051         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
24053         * reflection.c: Fix some memory leaks.
24054         
24055 2004-12-02  Martin Baulig  <martin@ximian.com>
24057         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
24059         * metadata.c (generic_class_cache): New static hashtable.
24060         (mono_metadata_lookup_generic_class): New public method.
24062 2004-12-02  Martin Baulig  <martin@ximian.com>
24064         * class.c (mono_class_create_from_typedef): Call
24065         mono_class_setup_parent() and mono_class_create_mono_type() before
24066         parsing the interfaces.
24068 2004-12-02  Martin Baulig  <martin@ximian.com>
24070         * metadata.c (generic_inst_cache): New static hashtable.
24071         (mono_metadata_lookup_generic_inst): New public function.
24072         (mono_metadata_inflate_generic_inst): New public function.
24073         (mono_metadata_parse_generic_inst): New public function.
24074         (do_mono_metadata_parse_generic_class): Use the new
24075         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
24076         since this'll also use the cache.
24078         * reflection.c (mono_reflection_bind_generic_method_parameters):
24079         Use mono_metadata_lookup_generic_inst() to use the new cache.
24081         * class.c (inflate_mono_type): Use
24082         mono_metadata_inflate_generic_inst() to inflate a generic
24083         instance; this'll also use the new cache.
24085         * loader.c (method_from_methodspec): Use
24086         mono_metadata_parse_generic_inst() and
24087         mono_metadata_inflate_generic_inst() rather than parsing it
24088         manually, so we can use the new cache.
24090 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
24092         * threads.c (wait_for_tids): Do not incorrectly free threads when 
24093         the wait times out.
24095 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
24097         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
24098         iter->args based on whether parameters are passed in registers (i.e.
24099         MONO_ARCH_REGPARMS is defined)
24101 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
24103         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
24104         the exception message. Fixes #70070.
24105         (method_from_methodspec): Fix warnings.
24107 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24109         * process.c: (complete_path) return the path quoted
24111 2004-12-01  Martin Baulig  <martin@ximian.com>
24113         * class-internals.h (MonoGenericInst): New structure.
24114         (MonoGenericClass): Replaced `type_argc', `type_argv' and
24115         `is_open' with `MonoGenericInst *inst'.
24116         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
24117         `is_open' with `MonoGenericInst *inst'.
24119 2004-11-30  Martin Baulig  <martin@ximian.com>
24121         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
24123         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
24124         to `generic_class_cache'.
24126         * metadata.c
24127         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
24128         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
24129         (mono_generic_inst_is_valuetype): Renamed to
24130         mono_generic_class_is_valuetype().
24132         * class-internals.h
24133         (MonoGenericInst): Renamed to MonoGenericClass.
24134         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
24135         (MonoClass): Renamed `generic_inst' to `generic_class'.
24136         (MonoGenericContext): Renamed `ginst' to `gclass'.
24138         * object-internals.h
24139         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
24141         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
24142         mono_reflection_generic_class_initialize().
24144         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
24145         now known as "System.Reflection.MonoGenericClass".
24146         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
24148 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
24150         * class-internals.h: Added a flag field to MonoClass to cache the
24151         declarative security attributes actions associated with the class.
24152         * domain-internals.h: Added booleans to MonoJitInfo to cache the
24153         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
24154         applicable to the JITted method.
24155         * reflection.c|h: Added functions to extract (as flags) which security
24156         actions are available (declaratively) for a method, class or assembly.
24157         * metadata.c|h: Added functions to search the declarative security
24158         table in the metadata.
24159         
24160 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
24162         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
24163         EXPORTEDTYPES are already in the class name cache, so there is no
24164         need to add extra code here to look at them. Just removes a bit of
24165         cruft.
24167         (ves_icall_System_Environment_get_TickCount): No need for #if
24168         WINDOWS. We already have the code in io-layer.
24170 2004-11-28  Martin Baulig  <martin@ximian.com>
24172         * loader.c
24173         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
24174         Fixes gen-112.cs.
24176 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
24178         * assembly.c (do_mono_assembly_open): Instead of having a
24179         conditional WITH_BUNDLE, incorporate support for bundles here, by
24180         having a global `bundles' variable holding a pointer to the actual
24181         bundles. 
24183         (mono_register_bundled_assemblies): New API call used by the
24184         bundle code. 
24186         See mkbundle.1 for details.
24187         
24188 2004-11-27  Martin Baulig  <martin@ximian.com>
24190         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
24191         the vtable for generic methods.
24193 2004-11-26  Martin Baulig  <martin@ximian.com>
24195         * metadata.c
24196         (mono_metadata_generic_method_hash): New public function.
24197         (mono_metadata_generic_method_equal): Likewise.
24199         * class-internals.h
24200         (MonoGenericContainer): Added `GHashTable *method_hash'.
24202         * reflection.c (ReflectionMethodBuilder): Added
24203         `MonoGenericContainer *generic_container'.
24204         (reflection_methodbuilder_to_mono_method): Don't create a new
24205         MonoGenericContainer each time we're called.
24206         (mono_reflection_bind_generic_method_parameters): Use
24207         `container->method_hash' to cache the results so we don't create a
24208         different method if we're called several times with the same
24209         arguments.
24211         * loader.c (method_from_methodspec): Use the new
24212         `container->method_hash' here, too.
24214 2004-11-26  Martin Baulig  <martin@ximian.com>
24216         * class.c (inflate_generic_signature): Correctly compute
24217         `res->has_type_parameters'.
24218         (mono_class_vtable): Use the `has_type_parameters' flag to
24219         determine whether we're a generic method.
24221         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
24223 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
24225         * object.c (mono_runtime_run_main): Fix a small memory leak.
24227 2004-11-25  Martin Baulig  <martin@ximian.com>
24229         * class.c (set_generic_param_owner): Fixed the loop.
24231 2004-11-25  Martin Baulig  <martin@ximian.com>
24233         * object.c (mono_class_vtable): Don't create any JIT wrappers for
24234         generic methods.
24236 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
24238         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
24239         names. Fixes #69787.
24241 2004-11-24  Martin Baulig  <martin@ximian.com>
24243         * class.c (mono_class_create_generic_2): If we don't have a
24244         `ginst->parent', inflate `gklass->parent' to get our parent.
24246 2004-11-24  Martin Baulig  <martin@ximian.com>
24248         * reflection.c (compare_genericparam): Correctly sort the
24249         GenericParam table; fixes #69779.
24251 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
24253         * reflection.c: When writing a PE file, don't create a huge
24254         buffer in memory. Just write the arrays we have to the file.
24255         This reduces memory usage.
24257         * metadata-internals.h: MonoDynamicStream pefile is no longer used
24258         globally.
24260 2004-11-17  Martin Baulig  <martin@ximian.com>
24262         * class.c (mono_class_init): Don't setup `class->parent' for
24263         dynamic instances; moved this to mono_class_generic_2().
24264         (mono_class_create_generic): Also set `klass->inited' for dynamic
24265         generic instances.
24266         (mono_class_create_generic_2): Don't do anything for dynamic
24267         generic instances.  Set `klass->parent' here and also call
24268         mono_class_setup_parent() here. 
24270         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
24271         `MonoType *parent' argument; set `ginst->parent' before calling
24272         mono_class_create_generic_2(), so we set the correct parent.
24274 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
24276         * reflection.c: allow getting attributes from ModuleBuilder
24277         (used by ikvm).
24279 2004-11-17  Martin Baulig  <martin@ximian.com>
24281         * class.c (mono_class_create_from_typedef): If a type parameter is
24282         inherited from an outer class, set its owner to that class.
24284 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
24286         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
24287           for (int*) written size. This fixes bug #69592.
24289 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
24291         * icall.c: Added IsAuthenticodePresnet internal call.
24292         * image.c|h: New function that check a MonoImage for an Authenticode
24293         signature in the certificate PE data directory.
24294         * security.c|h: New internal call to ask the runtime if an 
24295         Authenticode signature seems referenced in the PE header.
24297 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
24299         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
24301         * reflection.c (mono_image_create_pefile): Free the assembly streams
24302         after writing out the assembly file.
24304         * object.c (mono_runtime_run_main): Fix small memory leak.
24306         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
24307         property access modifiers. Fixes #69389.
24309 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
24311         * domain.c, object.c, object-internals.h, domain-internals.h,
24312         object.h, marshal.c: keep dynamic code info per domain.
24314 2004-11-15  Martin Baulig  <martin@ximian.com>
24316         * class.c (mono_type_get_name_recurse): Put type arguments in
24317         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
24318         see bug #68387.
24320 2004-11-15  Martin Baulig  <martin@ximian.com>
24322         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
24323         (mono_class_setup_vtable): When computing `the_cname' for a
24324         generic instance, don't include the namespace since we'd otherwise
24325         add it twice.
24327 2004-11-15  Martin Baulig  <martin@ximian.com>
24329         * class.c (mono_class_create_generic): Changed return type to void.
24330         (mono_class_create_generic_2): New public function; setup
24331         `class->method', `class->field' and `class->interfaces' here
24332         instead of in mono_class_init().
24334         * class.h (mono_class_create_generic): Moved to class-internals.h.
24336 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
24338         * reflection.c (mono_image_create_pefile): take a file HANDLE.
24339         rather than writing to memory, write to this file. Right now,
24340         we are just writting into a buffer, and copying that. However
24341         we can avoid the buffer later.
24343         (mono_dynamic_stream_reset): new function
24345         * icall.c, object-internals.h: update for the above.
24347 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
24349         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
24350         have been using gc'd memory. First it is slower, unlikely
24351         the comment in the source code said, secondly, it increases
24352         our footprint to do it in the gc.
24354         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
24355         the method so that it does not have to copy to managed code.
24357 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
24359         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
24361 2004-11-12  Martin Baulig  <martin@localhost>
24363         * reflection.c (mono_image_create_token): Allow generic method
24364         definitions here, since they may appear in an `.override'; see
24365         gen-98/gen-99 for an example.
24367 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
24369         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
24370         #69365.
24372         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
24373         descriptive.
24375 2004-11-11  Martin Baulig  <martin@ximian.com>
24377         * class.c (mono_class_setup_vtable): In an explicit interface
24378         implementation, the method name now includes the arity.
24380 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
24382         * object.c (mono_array_full_copy): Fix warning.
24384 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
24386         * appdomain.c: Removed look_for_method_by_name(). Use the new method
24387         mono_class_get_method_from_name() instead.
24388         
24389         * class-internals.h: Added two new types of wrappers. 
24390         Added MonoRemotingTarget enum. Added new trampoline function type, which
24391         takes an additional MonoRemotingTarget value as parameter, so it is
24392         possible to request a trampoline for a specific target.
24393         
24394         * class.c: Added new mono_class_get_method_from_name() method.
24395         
24396         * class.h: In MonoRemoteClass, we can have now to vtables, one for
24397         general remoting sinks and one specific for cross domain calls.
24398         
24399         * debug-helpers.c: Added new wrapper names.
24400         
24401         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
24402         of a remote class.
24403         
24404         * image.c: Porperly delete value objects form the remoting invoke hashtable.
24405         
24406         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
24407         with several other methods (mono_marshal_get_xappdomain_dispatch,
24408         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
24409         and others) can generate a fast remoting wrapper for cross domain calls.
24410         More information can be found in docs/remoting.
24411         Other changes: Removed mono_find_method_by_name, and used
24412         mono_class_get_method_from_name instead.
24413         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
24414         is stored in the remoting invoke hashtable.
24415         
24416         * marshal.h: published the new method for getting the xdomain wrapper,
24417         and also added a method for getting the adequate wrapper for a given
24418         method and target.
24419         
24420         * object-internals.h, object.c: Added a couple of methods for capying and
24421         cloning arrays.
24422         Modified mono_install_remoting_trampoline, which takes the new remoting
24423         trampoline that has a remoting target as parameter.
24424         mono_class_proxy_vtable now also takes a remoting target as parameter, and
24425         will return the most suitable vtable for the target.
24426         Added mono_remote_class_vtable, which returns the vtable of a remote class
24427         (which can be the normal remoting vtable or the xdomain vtable).
24428         
24429         * threads.c: the xdomain invoke and dispatch wrappers must also be
24430         protected against interruptions.
24432 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24434         * icall.c: use memmove in BlockCopyInternal when the source and
24435         destination arrays are the same.
24437 2004-11-09  Martin Baulig  <martin@ximian.com>
24439         * class-internals.h (MonoGenericContainer): Removed `method' and
24440         `signature', replaced them with `is_method' and `is_signature'
24441         flags.  Added `context'.
24443         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
24444         instead of a `MonoGenericContainer *'.
24446         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
24447         for dynamic type parameters.
24448         (mono_metadata_load_generic_params): Setup `container->context'.
24450         * reflection.c (mono_reflection_setup_generic_class): Setup
24451         `tb->generic_container->context'.
24452         (do_mono_reflection_bind_generic_parameters): Use
24453         mono_class_inflate_generic_type() to correctly inflate types,
24454         rather than using our own hack just for MONO_TYPE_VAR.
24456 2004-11-09  Martin Baulig  <martin@ximian.com>
24458         * class.c (mono_class_inflate_generic_method): Small fix; don't
24459         crash here.
24461         * icall.c
24462         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
24463         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
24464         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
24465         (ves_icall_Type_BindGenericParameters): Likewise.
24466         (ves_icall_Type_get_IsGenericInstance): Likewise.
24467         (ves_icall_Type_GetGenericParameterPosition): Likewise.
24468         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
24469         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
24470         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
24472 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
24474         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
24475         assembly versions and public key tokens. Fixes #69113.
24477 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
24479         * metadata.c: fix bug introduced with the type cache changes
24480         on 2004-11-06.
24482 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
24484         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
24485         the MonoClass pointer instead of the token in exception clauses.
24486         * reflection.c: updates for the above and make the code not depend
24487         on the structure of MonoExceptionClause.
24489 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
24491         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
24492         Add support for dynamic assemblies. Fixes #69114.
24494         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
24496 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
24498         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
24499         since most only those methods use it. the code member of
24500         MonoMethodPInvoke was dead, so that can be removed too. Also,
24501         remove inline_count (again, not used), and move slot so that it
24502         can share bits with some other flags. This saves 8 bytes in the
24503         structure and gives us about 50 kb back for mcs helloworld.cs
24505         * *.[ch]: Do naming changes for the above.
24507         * loader.c (mono_method_get_header): Lazily init the header
24508         on first access.
24509         (mono_get_method_from_token): don't init the header here
24510         (mono_free_method): the header may never be allocated
24512         Overall, this saves 150 kb of unmanaged allocations
24513         for mcs helloworld.cs. That accounts for 10% of the unmanaged
24514         memory at runtime.
24515         
24516         * loader.c, loader.h (mono_method_get_header): new accessor.
24518         * *.[ch]: use the above method. Prepares us to lazily load
24519         the header.
24521         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
24522         three warnings, which are actual bugs (see 69206).
24524         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
24525         unused. Saves a cool 4 bytes / method.
24527 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
24529         * metadata.c (builtin_types): Add types for System.Object here.
24530         (mono_metadata_parse_type_full): Cache MonoType*'s that are
24531         for a class or valuetype from klass->this_arg or klass->byval_arg.
24533         On mcs for a hello world, this gets us down from 21836 MonoType's
24534         to 14560.
24536         (mono_metadata_free_type): Account for the above change.
24538 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
24540         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
24541         exception instead of asserting if name is null.
24542         (ves_icall_System_AppDomain_GetData): Ditto.
24544 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
24546         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
24547         EnumBuilder.
24549         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
24550         Return NULL when the domain does not have entry_assembly set.
24552         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
24553         Add a 'resource_modules' argument.
24554         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
24556         * reflection.c (mono_reflection_create_runtime_class): Move setting
24557         of wastypebuilder here, so mono_get_type_object () returns a MonoType
24558         for enums too.
24560         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
24561         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
24562         Throw an ArgumentNullException if 'ptr' is null.
24564         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
24565         assemblies here. Fixes #69020.
24567 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
24569         * reflection.c (build_compressed_metadata): Fix the previous patch for
24570         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
24571         the stack.
24573 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
24575         * assembly.c (mono_assembly_names_equal): Allow a match if one of
24576         the cultures is false. Fixes #69090.
24578         * reflection.c (build_compressed_metadata): Fix invalid memory read 
24579         detected by valgrind.
24580         
24581         * reflection.c (mono_reflection_get_type): Avoid triggering a 
24582         TypeResolve multiple times for the same type. Fixes #65577.
24584 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
24586         * marshal.c: Avoid using ldftn to call managed functions. It is
24587         much slower than just a call.
24589         * reflection.c (mono_module_get_object): free the basename we
24590         allocate here from glib.
24591         
24592         * reflection.c (ensure_runtime_vtable): make sure to free
24593         overrides.  Also, we were allocating an array of MonoMethod not an
24594         array of MonoMethod*.
24596         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
24598         * image.c (mono_image_close): free image->guid here.
24600 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
24602         * reflection.c: Fix some spec conformance issues with the PE file
24603         structures so mcs compiled apps run on the Net 2.0 beta.
24605 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
24607         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
24608         Implement this. Fixes #67264.
24610         * debug-helpers.h debug-helpers.c marshal.c: Move 
24611         mono_find_method_by_name to debug-helpers.c.
24613 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
24615         * object.c (mono_release_type_locks): type_initialization_hash is
24616         a GHashTable.
24618         * reflection.c object.c object-internals.h: Fix warnings.
24620         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
24621         without accessors. Fixes #61561.
24623         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
24624         application base from the root domain if not set. Fixes #65641.
24625         (mono_runtime_init): Fix warning.
24627 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24629         * appdomain.c: call mono_thread_pool_init.
24630         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
24631         of worker threads based on the number of CPUs and the environment
24632         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
24633         for non-windows (windows) systems.
24635 2004-10-27  Chris Toshok  <toshok@ximian.com>
24637         * mono-debug-debugger.c (write_class): don't call mono_class_init
24638         here, as even with the check for (!klass->init_pending), we get
24639         into a situation where we're hitting cycles in class
24640         initialization.  Fixes #68816.
24642 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
24644         * image.c: Avoid overwriting values in the loaded_images_hash when an
24645         assembly is loaded multiple times. Fixes #61152.
24647         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
24648         so multiple satellite assemblies for the same name can be loaded.
24649         Fixes #68259.
24651         * mono_domain_assembly_preload: Actually return the loaded assembly, 
24652         not NULL.
24654         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
24655         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
24657         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
24658         pending finalizers are not invoked after the appdomain has been 
24659         unloaded. Fixes #67862.
24661 2004-10-22  Martin Baulig  <martin@ximian.com>
24663         * mono-debug-debugger.c
24664         (mono_debugger_runtime_invoke): Don't box valuetypes.
24666 2004-10-22  Chris Toshok  <toshok@ximian.com>
24668         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
24669         don't hide private methods.
24671 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
24673         * icall.c: Allows the runtime to "share" (when known) the public key
24674         token of an assembly. This avoid the need to recalculate the token 
24675         (from the public key) in managed code.
24677 2004-10-21  Chris Toshok  <toshok@ximian.com>
24679         * debug-helpers.c (append_class_name): argh, revert last patch.
24680         
24681 2004-10-21  Chris Toshok  <toshok@ximian.com>
24683         * debug-helpers.c (append_class_name): use '+' as the delimiter,
24684         not '/', so that it matches what the debugger uses to look up
24685         methods.
24687 2004-10-21  Martin Baulig  <martin@ximian.com>
24689         * mono-debug-debugger.c (mono_debugger_throw_exception): New
24690         public method; this is called each time an exception is thrown and
24691         allows the debugger to use exception catch points.
24693 2004-10-21  Martin Baulig  <martin@ximian.com>
24695         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
24696         the stack pointer and the exception object in some struct and pass
24697         that to the debugger.
24699 2004-10-21  Chris Toshok  <toshok@ximian.com>
24701         * mono-debug-debugger.c (do_write_class): add instance/static
24702         event support.  We don't expose "raise" or "other" yet.
24703         (event_is_static): new method.
24705 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
24707         * mono-debug-debugger.c
24708         (mono_debugger_handle_exception): Remove
24709         bogus return value for fussy compilers.
24711 2004-10-20  Martin Baulig  <martin@ximian.com>
24713         * mono-debug-debugger.c
24714         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
24715         (mono_debugger_handled_exception): Likewise.
24717 2004-10-20  Martin Baulig  <martin@ximian.com>
24719         * mono-debug-debugger.h (MonoDebuggerEvent): Added
24720         MONO_DEBUGGER_EVENT_EXCEPTION.
24722         * mono-debug-debugger.c (mono_debugger_handle_exception): New
24723         public function to send the debugger a notification for an
24724         exception and inform it about a catch/finally clause.
24726 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
24728         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
24729         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
24730         fix 2.95 build. 
24732         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
24734 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
24736         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
24737         marshalled as [In,Out]. Fixes #58325.
24739 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
24741         * reflection.c (mono_method_body_get_object): Implement some fields.
24743 2004-10-12  Martin Baulig  <martin@ximian.com>
24745         * reflection.c (mono_reflection_bind_generic_parameters): Small
24746         fix, correctly retrieve our parent from a generic instance.
24748 2004-10-12  Martin Baulig  <martin@ximian.com>
24750         * metadata.c (mono_metadata_generic_param_equal): We always have
24751         an owner.
24753         * class.c
24754         (mono_class_from_generic_parameter): We need to have an owner.
24755         (my_mono_class_from_generic_parameter): Likewise.
24757         * reflection.c (mono_reflection_setup_generic_class): Renamed to
24758         mono_reflection_create_generic_class() and added a new
24759         mono_reflection_setup_generic_class().  
24760         (mono_reflection_initialize_generic_param): If we're a nested
24761         generic type and inherited from the containing class, set our
24762         owner to the outer class.
24764 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
24766         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
24768         * reflection.c (mono_method_body_get_object): New function to create
24769         a MethodBody object.
24771         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
24773 2004-10-11  Martin Baulig  <martin@ximian.com>
24775         * metadata.c (_mono_metadata_type_equal): Renamed to
24776         do_mono_metadata_type_equal() and made static.
24778 2004-10-11  Martin Baulig  <martin@ximian.com>
24780         * appdomain.c: Bump corlib version number to 28.
24782 2004-10-10  Martin Baulig  <martin@ximian.com>
24784         * class-internals.h
24785         (MonoGenericInst): Added `MonoGenericContainer *container'.
24786         (MonoGenericMethod): Likewise.
24787         (MonoGenericContext): Likewise.
24788         (MonoGenericParam): Added `MonoGenericContainer *owner'.
24790         * metadata.c
24791         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
24792         (do_mono_metadata_parse_generic_inst): Likewise.
24793         (mono_metadata_parse_type_full): New public method.  This is the actual
24794         mono_metadata_parse_type() implementation - with an additional
24795         `MonoGenericContainer *' argument.
24796         (mono_metadata_parse_array_full): Likewise.
24797         (mono_metadata_parse_signature_full): Likewise.
24798         (mono_metadata_parse_method_signature_full): Likewise.
24799         (mono_metadata_parse_mh_full): Likewise.
24800         (mono_type_create_from_typespec): Likewise.
24801         (mono_metadata_interfaces_from_typedef_full): New public method;
24802         this is similar to the other _full() methods, but we take a
24803         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
24804         (mono_metadata_parse_generic_param): Take an additional
24805         `MonoGenericContainer *' argument and lookup the MonoGenericParam
24806         from that container.
24807         (mono_metadata_generic_param_equal): New static method to compare
24808         two type parameters.
24809         (_mono_metadata_type_equal): New static method; takes an
24810         additional `gboolean signature_only' argument - if true, we don't
24811         compare the owners of generic parameters.
24812         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
24813         with a TRUE argument - do a signature-only comparision.
24815         * loader.c: Use the new _full() methods and pass the
24816         MonoGenericContainer to them.
24818         * object-internals.h (MonoReflectionTypeBuilder): Added
24819         `MonoGenericContainer *generic_container' field.
24820         (MonoReflectionMethodBuilder): Likewise.
24822 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
24824         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
24825         case initial images of dynamic assemblies.
24827         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
24829         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
24831         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
24832         length of event->other array.
24833         (typebuilder_setup_events): Ditto.
24835         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
24836         'assembly_by_name' and add an 'assemblies' list.
24838         * assembly.h assembly.c: Add a new search hook for determining whenever
24839         an assembly is already loaded. Use this instead of searching in the
24840         loaded_assemblies list.
24842         * domain.c appdomain.c: Implement the new search hook so loaded 
24843         assemblies are now scoped by appdomain. Fixes #67727.
24845 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
24847         * threads.c (mono_thread_attach): Initialize synch_lock field so
24848         mono_thread_detach works again.
24850         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
24851         'lib' too. Fixes #63130.
24853 2004-10-06  Jackson Harper  <jackson@ximian.com>
24855         * culture-info-tables.h: regenerated.
24857 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
24859         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
24860         implemented by other interfaces in the result. Fixes #65764.
24861         
24862         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
24863         Handle unloadable modules without crashing.
24865         * image.c (load_modules): Revert the previous patch since modules must
24866         have a fixed index inside the array.
24867         
24868         * image.c (load_modules): Don't include native modules in the modules
24869         array.
24871 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
24873         * reflection.h: Add param_defaults field.
24875         * reflection.c: Add support for parameter defaults in dynamic methods.
24876         Fixes #64595.
24878         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
24879         an empty string when a type has no namespace. Fixes #64230.
24881 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
24883         * tabledefs.h: Added "internal" security actions to support non-CAS
24884         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
24885         Note: they do not seems to be used anymore in 2.0 (new metadata format)
24887 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
24889         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
24890         constructor of abstract class. Fixes #61689.
24892 2004-10-04  Martin Baulig  <martin@ximian.com>
24894         * class-internals.h (MonoGenericContainer): New type.
24895         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
24896         `MonoGenericContainer *generic_container'.
24897         (MonoClass): Replaced `gen_params' and `num_gen_params' with
24898         `MonoGenericContainer *generic_container'.
24900         * metadata.c (mono_metadata_load_generic_params): Return a
24901         `MonoGenericContainer *' instead of a `MonoGenericParam *';
24902         removed the `num' argument.
24904 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
24906         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
24907         for dynamic images.
24909         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
24910         machine fields.
24912         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
24914         * reflection.c: Save pe_kind and machine values into the generated
24915         image file.
24917         * appdomain.c: Bump corlib version number.
24919         * object-internals.h: Reorganize layout of LocalBuilder.
24921         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
24922         New helper function.
24924         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
24925         created MonoType for dynamic types. Fixes #66180.
24927 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
24929         * threadpool.c: the ares hashtable needs a critical section around it.
24930         this prevents some nasty segfaults
24932 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
24934         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
24935         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
24936         bug 67324).
24937         
24938 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
24940         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
24941         
24942 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
24944         * image.c: Always canonicalize image file names, to avoid loading
24945         the same assembly twice when referenced using a relative path.
24947 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
24949         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
24951         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
24953         * marshal.c: Fix warnings.
24955 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
24957         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
24958         attempting to marshal the delegate_trampoline as the method_addr.
24959         This patch has a static hashtable of marshalled delegates so that 
24960         we can map delegate_trampoline addresses back to delegates.  This
24961         allows a delegate passed to managed code to be passed back into native
24962         code.  Fixes #67039
24964 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
24966         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
24968         * reflection.c (method_encode_code): Align method headers properly.
24969         Fixes #66025.
24971 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
24973         * marshal.c: In the runtime invoke wrapper, reset the abort
24974         exception if it is cached. This avoids the automatic rethrowal of 
24975         the exception after the catch of the wrapper. Also check for pending
24976         interruptions before calling the managed method. This is done using
24977         the new method emit_thread_force_interrupt_checkpoint, since the
24978         normal checkpoint method is ignored when running the invoke wrapper.
24979         * object.c: If the abort exception is rethrown, set the abort_exc
24980         field of the thread, so it will be rethrown aftere every catch.
24981         * threadpool.c: Only run an interruption checkpoint if what has been
24982         requested is a stop of the thread (aborts will be ignored).
24983         * threads.c: By default, a thread will now never be interrumped while
24984         running the runtime invoke wrapper (this ensures that runtime_invoke
24985         will always return to the caller if an exception pointer is provided).
24986         There is a new special method mono_thread_force_interruption_checkpoint()
24987         to force an interruption checkpoint even if running a protected
24988         wrapper, which is used by the same runtime invoke wrapper to do a check
24989         at a safe point.
24991 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
24993         * object.c, object-internals.h: Implemented mono_release_type_locks,
24994         which releases the cctor locks held by a thread.
24995         * threads.c, threads.h: In thread_cleanup, release cctor locks held
24996         by a thread. Added mono_thread_exit() method to be used to safely stop
24997         a thread.
24999 2004-09-28  Raja R Harinath  <rharinath@novell.com>
25001         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
25002         Move null check before dereference.  Avoid indexing beyond the end
25003         of the 'modules' array.
25005 2004-09-28  Raja R Harinath  <rharinath@novell.com>
25007         * metadata-internals.h (MonoImage): Add module_count field.
25008         * image.c (load_modules): Set image->module_count.
25009         (mono_image_load_file_for_image): Use image->module_count.
25010         * reflection.c (mono_image_load_module): Append to image->modules array 
25011         of dynamic assembly.
25012         (mono_module_get_object): Fix loop to actually increment index.
25013         Use image->module_count.
25014         * assembly.c (mono_assembly_load_references): Use image->module_count.
25015         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
25016         Likewise.
25018 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
25020         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
25021         Avoid assert on generic types.
25023 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
25025         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
25027         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
25029         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
25030         function to convert a MarshalSpec structure to its managed counterpart.
25032         * reflection.c: Fix warnings.
25033         
25034         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
25035         field.
25037         * icall.c (mono_create_icall_signature): Fix build.
25039 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
25041         * icall.c: Add MakePointType icall.
25043         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
25044         warnings.
25046 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25048         * threadpool.c: reuse allocated slots in the queue.
25050 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
25052         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
25054         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
25056         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
25057         previous change.
25059         * tabledefs.h: Add constants for pinvoke attributes BestFit and
25060         ThrowOnUnmappableChar.
25062         * icall.c (ves_icall_Type_GetPacking): New icall.
25064 2004-09-24  Martin Baulig  <martin@ximian.com>
25066         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
25068 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25070         * appdomain.c:
25071         (mono_domain_set): allow setting a domain that is being unloaded.
25072         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
25073         being unloaded.
25075 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
25077         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
25078         the GetCustomAttributes icall.
25080 2004-09-23  Martin Baulig  <martin@ximian.com>
25082         * object-internals.h (MonoReflectionGenericParam): Replaced
25083         'has_ctor_constraint', `has_reference_type' and `has_value_type'
25084         with `guint32 attrs'.
25086 2004-09-23  Martin Baulig  <martin@ximian.com>
25088         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
25090 2004-09-23  Martin Baulig  <martin@ximian.com>
25092         * object-internals.h (GenericParameterAttributes): New enum.
25094 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
25096         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
25097         
25098         * class.c (init_events): Fill out event->other field.
25100         * class.c: Fix warnings.
25102         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
25104 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
25106         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
25107         walk which doesn't supply the IL offset.
25109 2004-09-22  Martin Baulig  <martin@ximian.com>
25111         * reflection.c (mono_reflection_setup_internal_class): If we're
25112         System.ValueType, System.Object or System.Enum, set
25113         `klass->instance_size' and create the vtable.
25114         (mono_reflection_create_internal_class): If we're an enum type,
25115         get the base class from our current corlib.
25117 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
25119         * reflection.h (MonoResolveTokenError): New type.
25121         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
25122         icall.
25124         * icall.c: Add an 'error' argument to the ResolveToken icalls.
25126 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
25128         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
25129         Support also calling constructors, but only for already allocated objects.
25131 2004-09-17  Geoff Norton <gnorton@customerdna.com>
25133         * reflection.c (type_get_qualified_name): If the klass is null
25134         return the typename to avoid a NullRefEx.
25135         (encode_cattr_value): Get the qualified name of the boxed type,
25136         not the underlying enumtype.  Fixes #62984.
25138 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
25140         * marshal.c: Fix problems with previous checkin.
25142 2004-09-21    <vargaz@freemail.hu>
25144         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
25145         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
25147         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
25149 2004-09-21  Geoff Norton <gnorton@customerdna.com>
25151         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
25152         should only return a type for pointers, arrays, and passbyref types.
25153         Fixes bug #63841.
25155 2004-09-21  Martin Baulig  <martin@ximian.com>
25157         * domain.c (mono_debugger_check_runtime_version): New public
25158         function.
25160         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
25162 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
25164         * reflection.c: Added missing sort to the declarative security 
25165         attributes table. MS implementation stops seeing the attributes if the
25166         token number regress in the table (as shown by ildasm and permview).
25168 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
25170         * object-internals.h (MonoReflectionModule): Add 'token' field.
25171         
25172         * reflection.c (mono_reflection_get_token): Add support for Module
25173         and Assembly.
25174         (mono_module_get_object): Set 'token' field.
25175         (mono_module_file_get_object): Set 'token' field.
25177         * icall.c: Add new Assembly and Module icalls.
25179         * appdomain.c: Bump corlib version.
25181 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
25183         * loader.h loader.c class.h class.c: Add helper functions for obtaining
25184         tokens of metadata objects.
25186         * reflection.h reflection.c (mono_reflection_get_token): New function
25187         to obtain the token of a metadata object.
25189         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
25191 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
25193         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
25194         
25195         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
25197 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
25199         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
25200         * object-internals.h: Added 3 MonoArray* members to MonoReflection
25201         AssemblyBuilder to access the permissions set in the class lib.
25202         * reflection.c: Added security attributes encoding step in 
25203         mono_image_build_metadata.
25204         * tabledefs.h: Added new security actions defined in 2.0:
25205         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
25207 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
25209         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
25210         macro parameter.
25212 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
25214         * locales.c: nullify the ICU_collator member of CompareInfo when it is
25215           finalized. There where random SIGSEVs at program termination, when
25216           an object being finalized was trying to do a string comparison and
25217           the current culture was already finalized.
25219 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25221         * threads.c: call thread_cleanup before finishing the thread if we get
25222         there.
25224 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
25226         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
25227         assemblies from the parent. Fixes #65665.
25229 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
25231         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
25232         modifiers.
25234 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
25236         * reflection.h: add prototype for mono_get_dbnull_object
25237         * reflection.c: add prototypes for get_default_param_value_blobs 
25238         and mono_get_object_from_blob for fussier compilers
25240 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
25242         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
25243         false deadlock checks in class initialization.
25245 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
25247         * image.c (mono_image_addref): Fix comment.
25249         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
25250         possible.
25252 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
25254         * reflection.c (mono_param_get_objects): Modified to return
25255         ParameterInfo.DefaultValue object.
25257         (get_default_param_value_blobs):
25258         (mono_get_object_from_blob):
25259         (mono_get_dbnull_object): New helper routines. 
25261         * object.c (mono_get_constant_value_from_blob): New helper routine
25262         carved out from get_default_field_value ()
25264         * object-internals.h (mono_get_constant_value_from_blob): Added
25265         function declaration.
25267 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
25269         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
25270         referenced assemblies. Fixes #62135.
25272         * exception.h exception.c (mono_get_exception_file_not_found2): New
25273         helper function.
25275 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
25277         * class.h class.c: Add mono_type_get_underlying_type ().
25279 2004-09-09  Geoff Norton <gnorton@customerndna.com>
25281         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
25282         Fix GetTypes() to support dynamically created assemblies.
25284 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
25286         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
25287         
25288         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
25289         previous patch.
25291         * reflection.h reflection.c loader.c: Allow dynamic construction of
25292         pinvoke methods. Fixes #65571.
25293         
25294         * reflection.c (mono_reflection_get_type): Revert previous change since
25295         it causes regressions.
25297 2004-09-08  Martin Baulig  <martin@ximian.com>
25299         * class.c (class_compute_field_layout): Don't call
25300         mono_class_layout_fields() for open generic instances.
25302 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
25303         * threads.c appdomain.c: fix typo in GC macro
25305 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25307         * threads.c: don't call mono_thread_detach() in start_wrapper(),
25308         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
25310 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
25312         * image.c (mono_image_close): Applied patch from 
25313         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
25314         assembly is loaded multiple times from data.
25315         
25316         * image.c (mono_image_open): Fix warning.
25318 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
25320         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
25321         once. Fixes #58334.
25322         
25323         * reflection.c (mono_reflection_create_runtime_class): Initialize
25324         klass->nested_classes. Fixes #61224.
25326 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
25328         * threads.c: sched_yield() on exit, to allow threads to quit.
25330 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
25332         * object.c (mono_unhandled_exception): Remove leftover debug code.
25334 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
25336         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
25338 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
25340         * marshal.c (emit_marshal_array): Really null terminate string arrays.
25341         
25342         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
25344 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
25346         * marshal.c (emit_marshal_array): Null terminate string arrays.
25347         
25348         * marshal.c (raise_auto_layout_exception): Fix warning.
25350         * reflection.c (mono_param_get_objects): Initialize the default value
25351         with DBNull.Value, not null. Fixes #62123.
25353 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
25355         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
25356         throw an exception with a cute explanation.
25358 2004-09-06  Dick Porter  <dick@ximian.com>
25360         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
25361         Close the new process's thread handle, as we don't use it.  The
25362         handle stays around forever otherwise.
25364 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
25366         * object.c (arith_overflow): Fix warning.
25368         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
25369         calling conventions in method refs. Fixes #65352.
25371         * reflection.c: Fix warnings.
25373 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
25375         * icall.c: Add a new icall for Array.Clear
25377 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
25379         * object.c: When allocating an array, we have to throw
25380         an overflow exception if any of the lengths are < 0.
25382 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
25384         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
25385         properly. Also move implementation of string array marshalling to 
25386         managed code. Fixes #42316.
25388 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25390         * assembly.c: provide more information when loading an assembly fails.
25392 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25394         * filewatcher.c: don't expect the development fam package to be
25395         installed.
25397 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
25399         * marshal.c: Make a copy of the signature cookie since it will be
25400         freed by the caller.
25401         
25402         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
25404         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
25406         * metadata.c (mono_metadata_free_marshal_spec): New function to free
25407         marshal specs.
25409         * marshal.c: More refactoring.
25410         
25411         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
25412         smaller functions.
25414 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
25416         * object.c: In mono_message_invoke, fill the output parameter array after
25417           calling the managed method (it was done before the call). This fixes
25418           bug #59299.
25420 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
25422         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
25423         as well.
25425 2004-09-02  Martin Baulig  <martin@ximian.com>
25427         * class.c (mono_class_instance_size): Don't allow generic type
25428         definitions or open generic instances.
25429         (mono_class_array_element_size): If we're a value type, call
25430         mono_class_instance_size() on the original class.
25432         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
25433         handle generic instances.
25435         * mono-debug-debugger.c (write_type): Handle generic instances
25436         like classes.
25438 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
25440         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
25441         the allocation request fails. Fixes #65089.
25443         * object.c (mono_runtime_free_method): Do not call mono_free_method.
25444         
25445         * object.c (mono_runtime_free_method): New function to free a dynamic
25446         method.
25448         * marshal.c (mono_delegate_free_ftnptr): New function to free the
25449         delegate trampoline.
25451         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
25452         with hasthis as dynamic,
25454         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
25456         * domain.c (mono_jit_info_table_remove): New function to remove an
25457         entry from the jit info table.
25459         * class-internals.h (MonoMethod): Add 'dynamic' field.
25461         * loader.c: Fix warnings.
25463 2004-09-01  Martin Baulig  <martin@ximian.com>
25465         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
25466         instead of mono_debugger_lock() because the latter one is a no-op
25467         unless running in the debugger.
25469 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
25471         * class.c (class_compute_field_layout): Classes with auto-layout or
25472         reference fields are not blittable.
25473         
25474 2004-09-01  Dick Porter  <dick@ximian.com>
25476         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
25477         mono_image_get_filename() to get the assembly location.
25479         * icall.c:
25480         * metadata.h: Fix compile warnings
25482 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
25484         * class.c (class_compute_field_layout): System.Object is blittable.
25486         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
25487         as in/out. Fixes #59909.
25489 2004-09-01  Martin Baulig  <martin@ximian.com>
25491         * metadata.h (MONO_TYPE_ISREFERENCE): Call
25492         mono_metadata_generic_inst_is_valuetype() if we're a generic
25493         instance to check whether our underlying type is a reference type.
25495 2004-09-01  Martin Baulig  <martin@ximian.com>
25497         * metadata.c (mono_type_size): If we're a generic instance, call
25498         mono_class_value_size() for value types.
25500 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
25502         * marshal.c: Implement more custom marshalling functionality. Fixes
25503         #64915.
25505 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
25507         * mono-debug.c, debug-mono-symfile.c: add some locking love.
25509 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
25511         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
25513         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
25515         * icall.c: Fix some warnings.
25517         * threads.c (abort_appdomain_thread): Fix unref errors.
25518         (mono_thread_current): Fix THREAD_DEBUG define.
25520 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
25522         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
25524         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
25526 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
25528         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
25529         string arrays.
25531 2004-08-28  Martin Baulig  <martin@ximian.com>
25533         * metadata.c
25534         (mono_metadata_generic_inst_is_valuetype): New public function.
25536         * metadata.h (MONO_TYPE_ISSTRUCT): Call
25537         mono_metadata_generic_inst_is_valuetype() if we're a generic
25538         instance to check whether our underlying type is a valuetype.
25540 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
25542         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
25543         #63768.
25545 2004-08-25  Martin Baulig  <martin@ximian.com>
25547         * loader.c (mono_get_method_from_token): Abstract methods can also
25548         be generic and thus have type parameters.
25550         * metadata-internals.h
25551         (MonoDynamicImage): Added `GPtrArray *gen_params'.
25553         * reflection.c (mono_image_get_generic_param_info): Don't create a
25554         metadata row, just add an entry to the `gen_params' array.
25555         (build_compressed_metadata): Sort the `gen_params' array and then
25556         actually create the metadata.
25558 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25560         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
25562 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
25564         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
25566 2004-08-24  Martin Baulig  <martin@ximian.com>
25568         * class.cs (mono_class_is_subclass_of): Like an interface, a
25569         generic instance also derives from System.Object.
25571 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
25573         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
25574         custom modifiers to be in any order. Fixes #61990.
25576 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
25578         * object.c: Register mono_object_new_fast icall.
25579         
25580         * object.c (mono_class_get_allocation_ftn): Return to calling
25581         mono_object_new_fast, since it seems faster to compute the object 
25582         size in unmanaged code than passing it as a parameter.
25584         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
25586         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
25587         this function with Boehm as the oom handler, so we don't have to check
25588         the result of GC_malloc.
25590         * object.c: Remove checks for oom.
25592         * object.h object.c (mono_class_get_allocation_ftn): New function to
25593         return the icall which can be used to allocate an instance of a given
25594         class. 
25596         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
25598         * class-internals.h: Add 'enabled' field.
25600 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
25602         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
25604 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
25605         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
25606         value 0x0010.
25608 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
25610         * appdomain.c: use the Tls function for appdomain too,
25611         at Zoltan's request. Actually return in mono_context_get
25613         * appdomain.c, profiler.c, threads.c: use __thread
25615 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
25617         * appdomain.c threads.c: Call GC_CreateThread on windows.
25619         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
25620         multiple libraries since this don't work on windows.
25622 2004-08-18  Martin Baulig  <martin@ximian.com>
25624         * class-internals.h
25625         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
25626         MonoMethodHeader.
25628         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
25629         MonoMethodNormal since we also need it for abstract and interface
25630         methods.
25632         * reflection.c
25633         (build_compressed_metadata): Sort the GenericParam table.
25634         (mono_image_create_token): Added `gboolean create_methodspec'
25635         argument; this is false when generating a MethodImpl token.
25636         (reflection_methodbuilder_to_mono_method): Abstract and interface
25637         methods may also have generic parameters.
25639 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
25641         * appdomain.c: thread local alloc
25643 2004-08-17  Martin Baulig  <martin@ximian.com>
25645         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
25647         * icall.c
25648         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
25649         argument.
25651         * class.c (mono_type_get_full_name): New public function.
25652         (mono_type_get_name): Don't include the type arguments.
25654 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
25656         * Makefile.am: Build static versions of libmetadata and libmonoruntime
25657         for inclusion into the mono executable.
25659 2004-08-16  Martin Baulig  <martin@ximian.com>
25661         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
25662         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
25664 2004-08-14  Martin Baulig  <martin@ximian.com>
25666         * class.c (dup_type): Also copy the `byref' field.
25668 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
25670         * reflection.c (create_dynamic_mono_image): Revert the last change 
25671         since it breaks bootstrap.
25673 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
25675         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
25677         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
25678         not free them with g_free.
25680 2004-08-11  Martin Baulig  <martin@ximian.com>
25682         * reflection.c (mono_reflection_setup_internal_class): Also call
25683         mono_class_setup_mono_type() if we already have a `tb->type.type'.
25685 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
25687         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
25688         called during default (first) AppDomain creation. Keep track of
25689         Evidence when loading assemblies.
25691 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
25693         * opcodes.c, opcodes.h: reduce runtime relocations.
25695 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
25697         * culture-info.h, locales.c: fixes and chages to sue the new
25698         optimized format of the locale data.
25699         * culture-info-tables.h: regenerated.
25701 2004-08-06  Geoff Norton <gnorton@customerdna.com>
25702         
25703         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
25705 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
25707         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
25708         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
25709         * domain-internals.h: icall declaration.
25710         * icall.c: icall registration.
25711         * object-internals.h: New fields in MonoAssembly for CAS.
25713 2004-08-05  Duncan Mak  <duncan@ximian.com>
25715         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
25716         CEE_LDELEM_ANY.
25718 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
25720         * reflection.c: fix to deal with object[] arrays in custom ctors
25721         (bug #62550).
25723 2004-08-05  Martin Baulig  <martin@ximian.com>
25725         * class.c (mono_class_array_element_size): Added support for
25726         generic instances and correctly handle "recursive" types.
25728 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
25730         * assembly.c: Fix warnings.
25732 2004-08-04  Martin Baulig  <martin@ximian.com>
25734         * class.c
25735         (mono_type_get_name_recurse): Added `gboolean include_arity'
25736         argument specifying whether or not we should include the generic
25737         arity in the type name.
25738         (_mono_type_get_name): New static function.
25739         (mono_class_setup_vtable): If we're a generic instance, don't
25740         include the generic arity in the names of explicit method
25741         implementations.        
25743 2004-08-03  Martin Baulig  <martin@ximian.com>
25745         * class.c (mono_type_get_name_recurse): Enclose the generic type
25746         arguments in `<', '>'.
25748 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
25750         * gc.c: make GC warning messages use the trace API, they are just
25751         noise to most of the users.
25753 2004-08-03  Martin Baulig  <martin@ximian.com>
25755         * debug-mono-symfile.c (read_string): Correctly read the string.
25757 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
25759         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
25760         
25761         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
25762         icalls.
25763         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
25765 2004-07-30  Martin Baulig  <martin@ximian.com>
25767         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
25768         Reflect latest symbol writer changes.   
25770 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
25772         * object.c: always create an object if null is passed
25773         to Invoke() where a valuetype is expected.
25775 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
25777         * marshal.c (mono_marshal_init): make managed
25778         signatures match native ones better for 64bits.
25780 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25782         * appdomain.c: hack to build correctly the private bin path on windows.
25783         Fixes bug #61991.
25785 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
25787         * assembly.c: Load mscorlib from the correct framework directory
25788           (mono/<version>/mscorlib.dll).
25789         * appdomain.h: Added prototypes for new functions.
25790         * internals.h: Added some prototypes.
25791         * domain.c: When initializing the runtime, get from the executable and
25792           the configuration files the runtime version that the app supports.
25793           Added support methods for reading app.exe.config. Added list of versions
25794           supported by the JIT. Added two new methods: mono_init_from_assembly,
25795           which initializes the runtime and determines the required version from
25796           the provided exe file, and mono_init_version, which initializes
25797           the runtime using the provided version.
25798         * icall.c: Get machine.config from version-specific directory.
25799         * reflection.c: When generating an image, embed the version number
25800           of the current runtime.
25802 2004-07-28  Dick Porter  <dick@ximian.com>
25804         * socket-io.c
25805         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
25806         returned sockaddr size before creating the remote address object.
25807         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
25808         61608.
25810 2004-07-28  Dick Porter  <dick@ximian.com>
25812         * locales.c (string_invariant_compare_char): Fix invariant char
25813         compares between upper and lower cases.  Fixes bug 61458.
25815 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
25816         
25817         * marshal.c: actually cache stelem.ref wrappers.
25818         
25819 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
25821         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
25822         sections and remove the mono_cli_rva_map () function.
25824 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
25826         * debug-mono-symfile.c: fix one more endianess issue, from a patch
25827         by Geoff Norton (<gnorton@customerdna.com>).
25829 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
25831         * class.c: fix class loads for pointer types (typeof(int) !=
25832         typeof(int*)).
25834 2004-07-27  Martin Baulig  <martin@ximian.com>
25836         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
25837         reading the debugging information from an external ".mdb" file.
25839 2004-07-24  Martin Baulig  <martin@ximian.com>
25841         * reflection.c (mono_image_get_type_info): Only write a class
25842         layout entry if we actually have a size or a packing size.
25844 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
25846         * reflection.c (type_get_fully_qualified_name): 
25847         insert cast to get type checking of ?: with non-gcc compilers
25849 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
25851         * rand.c: use g_getenv for both lookups of
25852         MONO_EGD_SOCKET
25854 2004-07-17  Martin Baulig  <martin@ximian.com>
25856         * reflection.c (mono_reflection_bind_generic_method_parameters):
25857         Set `gmethod->reflection_info'.
25859 2004-07-17  Martin Baulig  <martin@ximian.com>
25861         * class.c (mono_class_create_from_typedef): Insert the newly
25862         created class into the hash table before computing the interfaces
25863         since we could be called recursively.
25865 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
25867         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
25868         function to implement stelem.ref in managed code
25869         * class-internals.h, debug-helpers.c: a new wrapper type
25870         for the above.
25872 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
25874         * gc.c: allow GC handles to work even when no GC is compiled in.
25875         Fix part of bug #61134 (GetAddrOfPinnedObject).
25877 2004-07-13  Peter Williams  <peter@newton.cx>
25879         * process.c (complete_path): Make sure we don't attempt to execute
25880         directories.
25882 2004-07-12  Geoff Norton <gnorton@customerdna.com>
25884         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
25885           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
25886           and will add/subtract the hour if needed
25888 2004-07-12  Martin Baulig  <martin@ximian.com>
25890         * reflection.c (mono_field_get_object): If we have
25891         `field->generic_info', take the attributes from
25892         `field->generic_info->generic_type'.    
25894 2004-07-12  Martin Baulig  <martin@ximian.com>
25896         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
25897         This function must be called before initializing the runtime.
25898         (mono_debug_init_1): New function; call this after initializing
25899         the runtime, but before loading the assembly.  It tells the
25900         debugger to load corlib and the builtin types.
25902         * mono-debug-debugger.c: Did some larger changes in the debugging
25903         code; support recursive class declarations, make sure we actually
25904         add all classes.
25906 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25908         * debug-helpers.c: undo my previous patch and fixed the real issue in
25909         ../mini/exceptions-x86.c
25911 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25913         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
25914         when no HOME env. variable was set and a NullRef was thrown in a .cctor
25915         called from other .cctors.
25917 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
25919         * loader.c: Removed the mono_loader_wine_init hack now that we are
25920         doing a managed version of Windows.Forms.
25922 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
25924         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
25925         threadpool.c, threads.c: remove static data from rootset.
25927 2004-07-09  Dick Porter  <dick@ximian.com>
25929         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
25930         Don't do any more processing if the matched length was 0.  It was
25931         increasing the size of the string before.  Fixes bug 61167.
25933 2004-07-09  Dick Porter  <dick@ximian.com>
25935         * socket-io.h:
25936         * socket-io.c
25937         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
25938         Add support for SO_PEERCRED if its available.
25940 2004-07-09  Peter Bartok <pbartok@novell.com>
25941         * loader.c: winelib.exe.so error message is now only displayed if
25942         MONO_DEBUG is set. To help us avoid questions when people are trying
25943         out the new Managed.Windows.Forms.
25945 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
25947         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
25948         for isinst and castclass wrappers.
25950         * class-internals.h icall.c: Move registration and lookup of JIT icalls
25951         to libmetadata from the JIT, so they could be used by the marshalling
25952         code and the interpreter.
25954         * marshal.c: Register marshalling related JIT icalls here instead of
25955         in mini.c. Use CEE_MONO_ICALL instead of the family of 
25956         CEE_MONO_PROC<x> opcodes to call marshalling functions.
25958         * metadata.h: Remove unneeded marshalling conversions.
25960         * opcodes.c: Update for new opcodes.
25961         
25962 2004-07-08  Martin Baulig  <martin@ximian.com>
25964         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
25965         (mono_debug_get_domain_data): Make this function static.
25967 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
25969         * gc.c, object.h: add nice GC handle API for embedders.
25971 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
25973         * reflection.c: more changes for the new api
25975         * object.c: When we reflect on a field w/ a constant value, it
25976         will not have a memory location, so we must access metadata. Also,
25977         allow easier reading of strings so that we can read them from
25978         the constant data.
25980         * class.c (mono_class_layout_fields): no need for literal fields here.
25982         * class-internals.h: api changes for const fields
25984         * icall.c (ves_icall_get_enum_info): use new apis for const fields
25986 2004-07-06  Martin Baulig  <martin@ximian.com>
25988         * mono-debug.h: Increment version number to 44.
25990         * mono-debug.c (mono_debug_add_wrapper): The second argument is
25991         now a gpointer, rewrote this whole method.
25993         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
25994         function.  Add information about the wrapper in a new "misc table".
25996         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
25997         for the new misc table.
25999 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
26001         * metadata-internals.h image.c: Add a cache for helper signatures.
26003         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
26005 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
26007         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
26008         delegates from a delegate. Fixes #61033.
26009         
26010         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
26011         marshalling of stringbuilder arrays. Fixes #59900.
26013 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
26015         * icall.c: Add EnumBuilder:setup_enum_type icall.
26017 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
26019         * icall.c: Added a new icall for the property version of
26020         OffsetOfStringData.
26022 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
26024         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
26025         it has a constant size across platforms.
26027         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
26028         stack trace.
26030 2004-06-29  Martin Baulig  <martin@ximian.com>
26032         * mono-debug.c (mono_debug_add_method): Protect the whole function
26033         in mono_debugger_lock(), not just parts of it.
26035 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
26037         * reflection.c: make sure padding bytes in heaps are zeroed.
26039 2004-06-24  David Waite  <mass@akuma.org>
26041         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
26042         image.c, loader.c, locales.c, marshal.c, metadata.c,
26043         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
26044         string-icalls.c, threads.c: change to C90-style comments from C99 /
26045         C++ -style
26047 2004-06-24  Dick Porter  <dick@ximian.com>
26049         * threads.c
26050         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
26051         return createdNew.  Fixes bug 60412.
26053         * threads-types.h: 
26054         * icall.c: Add createdNew parameter to CreateMutex icall
26056 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
26058         * reflection.c, object-internals.h: save default value in params.
26060 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26062         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
26063         no need to build a new path combining that with the application base.
26064         Fixes bug #60442.
26066 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
26068         * reflection.c: fixed minor standard compliance issues.
26070 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
26072         * reflection.c: fixed issue with encoding some custom attributes
26073         (arrays in properties and fields, bug #60411).
26075 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26077         * reflection.c: fix start address when copying the public key token.
26079 2004-06-23  Martin Baulig  <martin@ximian.com>
26081         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
26082         the `exc' object in a static object to put it into the GC's root set.
26084 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
26086         * reflection.c: make mono_reflection_setup_internal_class ()
26087         callable a second time to setup a new parent class.
26089 2004-06-23  Dick Porter  <dick@ximian.com>
26091         * threads.c: Check for WAIT_IO_COMPLETION return values.
26093 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
26095         * appdomain.c: Removed the g_free on the public key token. Now copy 
26096         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
26097         * assembly.c: Added public key token string value when loading 
26098         assemblies. Fix bug #60439.
26099         * icall.c: Added missing informations (like public key) in 
26100         GetReferencedAssemblies. Fix #60519.
26101         * image.h: Changed definition for public key token from const char*
26102         public_tok_value to guchar public_key_token [17];
26103         * reflection.c: Updated for changes to public key token.
26105 2004-06-22  Lluis Sanchez Gual
26107         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
26108         for the field in base classes.
26110 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
26112         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
26113         mark headers as not supported, they are installed only for use by the
26114         debugger.
26116 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
26118         * *.c, *.h: avoid namespace pollution in public headers.
26120 2004-06-21  Martin Baulig  <martin@ximian.com>
26122         * exception.c (mono_get_exception_security): It's in
26123         "System.Security", not in "System".
26125         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
26126         the exception classes.
26128 2004-06-21  Martin Baulig  <martin@ximian.com>
26130         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
26131         Protect the exception object from being finalized.
26133 2004-06-21  Martin Baulig  <martin@ximian.com>
26135         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
26136         public function.
26138 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
26140         * reflection.c: Load the assembly in mono_reflection_type_from_name,
26141         if it was not loaded before. Fix parts of #60439.
26143 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
26145         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
26146         code that was broken since Ben's change: wrappers are now
26147         dependent on the method signature only again.
26149 2004-06-21  Martin Baulig  <martin@ximian.com>
26151         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
26152         added interface support.
26154 2004-06-21  Martin Baulig  <martin@ximian.com>
26156         * class.c (mono_vtable_get_static_field_data): New public method.
26158 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
26160         * filewatcher.c : Windows build fix to be compliant with API changes.
26162 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
26164         * class.h, class.c: more accessors.
26165         * metadata.h, metadata.c: prepare for hiding MonoType and
26166         MonoMethodSignature: people should use the accessors from now on
26167         outside of the tree.
26169 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
26171         * *.c, *.h: more API cleanups.
26173 2004-06-18  Jackson Harper  <jackson@ximian.com>
26175         * assembly.c: Trace loading assemblies.
26176         * loader.c: Trace loading native libraries.
26177         * mono-config.c: Trace loading config files.
26178         
26179 2004-06-18  Dick Porter  <dick@ximian.com>
26181         * locales.c: Tell ICU the lengths of strings, it can cope with
26182         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
26184 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
26186         * image.c: swapped name/filename;
26188 2004-06-18  Martin Baulig  <martin@ximian.com>
26190         * mono-debug-debugger.c (write_class): Write the parent class at
26191         the end of the header.
26193 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
26195         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
26197 2004-06-17  Raja R Harinath  <rharinath@novell.com>
26199         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
26200         (bundle_obj): New conditional define.
26201         (BUILT_SOURCES): Remove.
26202         ($(bundle_srcs)): Make parallel-make safe.
26203         (libmonoruntime_la_LIBADD): Make unconditional.
26204         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
26205         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
26207 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
26209         * culture-info-tables.h: It was inconsistent with the latest
26210           supp info files.
26212 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
26214         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
26215         be loaded.
26217         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
26218         with gcc 2.95.
26220 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
26222         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
26223         cleaned up public header threads.h.
26225 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
26227         * Makefile.am, *.c, *.h: more API cleanups.
26229 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
26231         * Makefile.am: removed monosn from compilation.
26232         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
26233         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
26234         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
26235         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
26236         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
26237         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
26239 2004-06-15  Jackson Harper  <jackson@ximian.com>
26241         * assembly.c: Make locales lower case when searching the GAC for
26242         assemblies. gacutil will always make locales lowercase when
26243         installing so this effectively makes them case insensitive.
26244         
26245 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
26247         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
26248         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
26249           parameter which allows to choose whether the wait can be interrupted or 
26250           not. Also added the method mono_monitor_enter(), which locks the monitor
26251           using an infinite wait and without allowing interruption.
26252           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
26253           interrupted.
26254         * object.h: Added new fields in MonoThread. suspend_event holds the event
26255           used to susped/resume the thread. synch_lock is the lock object to use for
26256           modifying the thread state.
26257         * threads.c: Use the new synch_lock object for locking, instead of "this",
26258           which can generate deadlocks.
26259           Moved thread state change in Thread.Sleep and Thread.Join from managed
26260           to unmanaged code. This avoids a deadlock when the thread was suspended
26261           just after acquiring the thread lock.
26262           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
26263           Implemented Thread.Suspend using an event instead of ThreadSuspend,
26264           which is not fully implemented in the io-layer.
26265         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
26267 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
26269         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
26270         threads-types.h: more API cleanups.
26272 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
26274         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
26275         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
26276         threadpool.c, threads.c: first pass at the exported API cleanup.
26278 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
26280         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
26282 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26284         * icall.c: added internalGetHome.
26286 2004-06-14  Dick Porter  <dick@ximian.com>
26288         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
26289         possible to return successfully when '.' or '..' were the only
26290         entries in a directory, but were skipped.  The MonoIOStat was not
26291         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
26292         Fixes bug 59574.
26294 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
26296         * reflection.c: make binaries run on .Net 1.1 by default.
26298 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
26300         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
26302 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
26304         * marshal.c: keep track of struct size with explicit layout
26305         (bug #59979).
26307 2004-06-12  Martin Baulig  <martin@ximian.com>
26309         * mono-debug-debugger.c: Comment out a debugging g_message().
26311 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
26313         * reflection.c, reflection.h: do not free custom attrs that are cached.
26314         * icall.c: use braces to make code clearer.
26316 2004-06-11  Martin Baulig  <martin@ximian.com>
26318         * class.h (MonoInflatedField): New type.
26319         (MonoClassField): Replaced `MonoType *generic_type' with
26320         `MonoInflatedField *generic_info'.
26322         * icall.c
26323         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
26325 2004-06-11  Martin Baulig  <martin@ximian.com>
26327         * reflection.c (mono_image_create_method_token): Correctly encode
26328         varargs methods.
26330 2004-06-11  Martin Baulig  <martin@ximian.com>
26332         * metadata.c (mono_metadata_parse_method_signature): When parsing
26333         a MethodDef which has VarArgs, also set sentinelpos if we don't
26334         have any parameters.
26336 2004-06-11  Martin Baulig  <martin@ximian.com>
26338         * verify.c (mono_method_verify): In CEE_CALL, use
26339         mono_method_get_signature() to get the method's signature, unless
26340         we're a PInvoke method.
26342 2004-06-10  Jackson Harper  <jackson@ximian.com>
26344         * assembly.c: Use <path>/lib/mono/gac for the extra paths
26345         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
26346         logical name as the supplied path is just a prefix to the gac not
26347         the direct path to it.
26348         
26349 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
26351         * reflection.c: make the token for a created method match
26352         the token of the MethodBuilder it was created from
26353         (IKVM requires this behaviour now).
26355 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
26357         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
26358         reflection.c, socket-io.c: leak fixes.
26360 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
26362         * icall.c: handle sentinel pos in vararg methods in position different
26363         from 0.
26365 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26367         * culture-info-tables.h: freshly generated.
26369 2004-06-09  Martin Baulig  <martin@ximian.com>
26371         * loader.c (mono_get_method_constrained): Call `mono_class_init
26372         (constrained_class)'.   
26374 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
26376         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
26377         any methods. Fixes #59629.
26379 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
26381         * culture-info-tables.h: reflecting locale-builder updates.
26383 2004-06-08  Dick Porter  <dick@ximian.com>
26385         * object.h:
26386         * locales.c: Fixed compile warnings, including a real bug in
26387         CompareInfo_internal_compare.
26388         
26389 2004-06-08  Dick Porter  <dick@ximian.com>
26391         * locales.c
26392         (ves_icall_System_Globalization_CompareInfo_internal_index):
26393         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
26394         Double-check the resuls of usearches, because ICU currently
26395         ignores most of the collator settings here.  Fixes bug 59720.
26396         
26397 2004-06-08  Dick Porter  <dick@ximian.com>
26399         * locales.c
26400         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
26401         Fix memory leak and segfault-causing typo.  No idea how this one
26402         lasted so long without being noticed.
26404 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
26406         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
26407         any methods. Fixes #59629.
26409 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26411         * assembly.c:
26412         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
26413         own the critical section before). Removed dead code (that's done
26414         in the preload hook).
26416         (mono_assembly_load_with_partial_name): call the preload hook.
26418 2004-06-08  Martin Baulig  <martin@ximian.com>
26420         * metadata.c (mono_metadata_signature_alloc): Default
26421         `sentinelpos' to -1.
26423         * reflection.c (mono_image_get_array_token): Likewise.
26425 2004-06-08  Martin Baulig  <martin@ximian.com>
26427         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
26429         * metadata.c (mono_metadata_parse_method_signature): When parsing
26430         a MethodDef which has VarArgs, set sentinelpos.
26432         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
26433         `gint16' since we're using -1 for non-varargs methods.
26435         * reflection.c
26436         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
26437         (method_encode_signature): Added varargs support.
26438         (method_builder_encode_signature): Likewise.
26439         (mono_image_get_varargs_method_token): New static method.
26440         (mono_image_create_method_token): New public method; this is
26441         called via an icall instead of mono_image_create_token() when
26442         calling a varargs method.       
26444 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
26446         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
26448 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
26450         * culture-info-tables.h : Reflecting the latest locale-builder that
26451           fixed empty array representation ({} to {0}).
26453 2004-06-07  Jackson Harper  <jackson@ximian.com>
26455         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
26456         looking up extra gac paths. This allows MONO_GAC_PATH to act
26457         exactly like a prefix.
26458         
26459 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
26461         * reflection.c (mono_reflection_type_from_name): Make a copy of the
26462         type name before modifying it. Fixes #59405.
26464 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
26466         * culture-info.h: added fields for "all datetime patterns".
26467         * locales.c: (  ves_icall_System_Globalization_CultureInfo
26468           _construct_datetime_format ()): fill xxx_patterns fields.
26469         * object.h: added fields for "all datetime patterns" to
26470           MonoDateTimeFormatInfo.
26471         * culture-info-tables.h: reflecting locale-builder updates.
26473 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
26475         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
26476         the event has no add and remove methods. Fixes #59629.
26478 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
26480         * object.c: Fixed possible integer overflow when allocating large
26481         strings.
26483 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
26485         * culture-info-tables.h: reflecting locale-builder updates.
26487 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
26489         * culture-info-tables.h: reflecting locale-builder updates.
26491 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
26493         * culture-info-tables.h: reflecting locale-builder updates.
26495 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
26497         * threads.c: Made Thread.Sleep abortable.
26499 2004-06-02  Martin Baulig  <martin@ximian.com>
26501         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
26503         * debug-mono-symfile.h: Bumped symbol file version number to 37.
26505 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
26507         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
26509 2004-05-30  Jackson Harper  <jackson@ximian.com>
26511         * reflection.c: Do not hardcode assembly versions or public key
26512         tokens anymore. All of this except the corlib section was dead
26513         code anyways.
26514         
26515 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
26517         * object.c (mono_runtime_invoke_array): Automatically create boxed
26518         objects for byref valuetypes if needed. Fixes #59300.
26519         
26520         * object.c (mono_method_return_message_restore): Handle 
26521         MONO_TYPE_OBJECT as well.
26523 2004-05-28  Jackson Harper  <jackson@ximian.com>
26525         * reflection.c: The modified type encoding was causing build
26526         problems. Reverted for now.
26527         
26528 2004-05-28  Jackson Harper  <jackson@ximian.com>
26530         * reflection.c/h: Take an assembly ref so that we dont create
26531         fully qualified names when encoding types in the same assembly as
26532         the custom attribute being emitted.
26533         * appdomain.c: Increment version number.
26534         
26535 2004-05-26  Duncan Mak  <duncan@ximian.com>
26537         * icall.c
26538         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
26539         Set the full version number (major, minor, build, revision).
26541 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
26543         * marshal.c (emit_struct_conv): increment src/dst after blit
26544         (mono_marshal_get_managed_wrapper,
26545         mono_marshal_get_native_wrapper): make sure we have marshalling
26546         info before marshalling params (info computation affects
26547         blittable)
26549         * class.c (class_compute_field_layout): correctly deal with
26550         blittable
26551         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
26552         value types (as per what windows dows by default)
26553         (mono_class_setup_mono_type): System.ValueType is blittable
26554         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
26555         blittable
26557         * marshal.c (mono_marshal_load_type_info): flag types  as
26558         non-blittable if the native layout doesn't match the managed
26559         layout
26561 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26563         * appdomain.c: don't add stuff in the private search path that is
26564         above the application base. If application base is not set, there's
26565         no private search path.
26567 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
26569         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
26570         byref struct arguments in native->managed marshalling.
26572 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
26574         * marshal.c (mono_marshal_get_runtime_invoke): correctly
26575         cache methods using signature (special case for methods
26576         that are value type or string class)
26577         
26578         * image.c (mono_image_close): clean up allocated GSList's
26579         in runtime_invoke_cache.
26581 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26583         * mono-config.c: set the correct path for mono_cfg_dir on windows when
26584         there's no MONO_CFG_DIR environment variable defined.
26586 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26588         * threads.c: windows version must be >= 0x0500 to include OpenThread.
26590 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
26592         * threadpool.c: Really wait for 500ms after the async call, even if the wait
26593           is interrumped.
26594         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
26595           before waiting for it, and call CloseHandle after the wait to unref it.
26596           This will make sure that handles are not disposed too early.
26598 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26600         * appdomain.c:
26601         * appdomain.h:
26602         * icall.c: removed
26603         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
26604         needed now.
26606         * object.c: se the application_base only for the domain that runs
26607         Main. Fixes bug #59216,
26609 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26611         * appdomain.c:
26612         * object.c: only the domain in which Main is run have
26613         SetupInformation.ConfigurationFile set, so moved a few lines from
26614         appdomain.c to object.c.
26616 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26618         * appdomain.c: we tried to load [name].(dll|exe), but according
26619         to bug #57710, we must also try [culture]/[name].(dll|exe) and
26620         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
26621         There's a test case attached to bug #58922.
26623 2004-05-27  Dick Porter  <dick@ximian.com>
26625         * icall.c:
26626         * file-io.c: Implemented icalls for locking and unlocking regions
26627         in a file.
26628         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
26629         FALSE on error (fixes both compiler warning and real bug.)
26631 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
26633         * culture-info-tables.h: reflecting locale-builder updates.
26635           (Added missing ChangeLog entry for 05/26)
26637 2004-05-27  Jackson Harper  <jackson@ximian.com>
26639         * locales.c: Fix some cut and paste errors.
26640         
26641 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26643         * mono-config.c: set the correct path for config. directory on windows.
26645 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
26647         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
26648           on win32.
26650 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
26652         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
26653         from pinvoke functions.
26654         
26655         * marshal.c (mono_ftnptr_to_delegate): Implement this.
26657 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
26659         * culture-info-tables.h: reflecting locale-builder updates.
26661 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
26663         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
26664         #59086.
26666 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
26668         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
26669         * icall.c: Modified icalls for RNG.
26670         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
26671         Windows (CryptoAPI).
26673 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
26675         * locales.c: Fix build.
26677 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
26679         * culture-info-tables.h: reflecting locale-builder updates.
26681 2004-05-25  Jackson Harper  <jackson@ximian.com>
26683         * locales.c: When creating the current culture use the $LANGs
26684         specific culture. So DateTimeFormat and NumberFormat entries are created.
26685         
26686 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
26688         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
26689         a char array as parameter.
26691 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
26693         * image.c: In mono_image_open(), always use an absolute path name to
26694           look for already loaded images.
26696 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
26698         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
26699         missing in the windows build (like older cygwin include files).
26701 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
26703         * icall.c: Fixed check for possible integer overflow in Buffer_
26704         BlockCopy icall. Replaced comments style // by /* */.
26706 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
26708         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
26709         
26710         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
26711         check after MONO_VTADDR. Fixes pinvoke2.exe.
26713         * marshal.h marshal.c metadata.h: Add beginnings of support for
26714         ftnptr -> delegate marshalling.
26716 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
26718         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
26719         * threads.c: Fix warnings.
26721 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
26723         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
26724         * icall.c: Registered icalls for Suspend and Resume.
26725         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
26726           Thread.Abort.
26727         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
26728         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
26729         * process.c: Use WaitForSingleObjectEx.
26730         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
26731           checkpoints.
26732         * threads.c, threads.h: Make use of new Ex wait methods. Improved
26733           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
26734           for Suspend and Resume. Added new mono_thread_stop, used for stoping
26735           background threads. Added basic support for Abort in Windows.
26736           Start new threads using a managed delegate invoke wrapper. This wrapper
26737           has an interruption checkpoint that is needed since an interruption
26738           can be requested before the thread leaves the unmanaged code that starts 
26739           the thread.
26740         * marshal.c: Added interruption checkpoint after every native call, and
26741           also before managed calls for wrappers called from unmanaged code to
26742           go into managed code.
26743         * object.h: Added new field in MonoThread to keep track of interruption
26744           requests.
26746 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
26748         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
26749         calls.
26751 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26753         * appdomain.c:
26754         * assembly.c:
26755         * gc.c:
26756         * locales.c:
26757         * mono-config.c:
26758         * rand.c: getenv -> g_getenv (windows!)
26760         * process.c: complete_path is also used on non-windows platforms.
26762 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26764         * icall.c: new signature for Process_Start.
26766         * process.[ch]: new signature for Process_Start. If we're on windows
26767         and UseShellExecute is false, we have to search for the program by
26768         ourselves if we don't get a full path.
26770 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
26772         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
26773         marshalling and call CleanUpNativeData if needed. Fixes #58646.
26775 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26777         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
26778         Fixes bug #58373.
26780 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26782         * process.c: use double quotes to quote program name and arguments on
26783         windows. Fixes bug #58575.
26785 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26787         * file-io.c: don't return "." and ".." when using windows Find*File.
26789 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
26791         * marshal.c: Don't pass wrappers to message init because method 
26792         addressed used to lookup metadata. part of remoting[2|3] fix.
26794 2004-05-15  Jackson Harper  <jackson@ximian.com>
26796         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
26797         path is essentially the same as MONO_PATH except that it points to
26798         GACs instead of lib directories.
26799         * loader.h: The user gac is gone so we dont need function to
26800         enable/disable it.
26801         * mono-config.c: user gac option is now gone.
26802         
26803 2004-05-15  Jackson Harper  <jackson@ximian.com>
26805         * culture-info.h: Make defines more consistent, add calendar data
26806         to the culture info table.
26807         * culture-info-tables.h: Add basic calendar data. Basically
26808         everyone gets default gregorian until all the data is
26809         updated.
26810         * locales.c: Use the new consistent defines. Set calendar data for
26811         culture info objects.
26812         * object.h: add a field for calendar data to CultureInfo
26813         
26814 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
26816         * image.c: image->runtime_invoke_cache is keyed on signatures now.
26817         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
26818         a signature.
26819         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
26820         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
26821         an extra param that is the pointer of the method to invoke. The IL for
26822         the invoke method is no longer specific to the method, but to the
26823         signature of the method. Thus, we can share the same code for multiple
26824         methods. This reduces the number of methods that have to be compiled.
26826 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
26828         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
26830         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26832         * icall.c: Optimize Buffer.BlockCopy.
26834 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26836         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
26837         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
26838         quote). Changed them to "MMMM yyyy".
26840 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
26842         * rand.c
26843         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
26845 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
26847         * reflection.h: Updated after changes to managed structures.
26849         * appdomain.c: Bump corlib version.
26851 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26853         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
26854         windows.
26856 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26858         * Makefile.am: link to ../os/libmonoos.la on windows.
26860         * assembly.c:
26861                 -If MONO_DEBUG, warn about non-existing directories in
26862                 MONO_PATH.
26863                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
26864                 compile time variable.
26865                 -Removed init_default_path and call mono_set_rootdir from
26866                 libmonoos.a instead (windows only).
26868         * assembly.h: declare mono_assembly_getrootdir().
26870         * domain.c:
26871         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
26873         * loader.c: s/getenv/g_getenv/
26875 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
26877         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
26879         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
26881         * metadata.h: Add new marshalling conversions.
26883         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
26884         function.
26886         * reflection.c (mono_reflection_get_type): Lookup the type in all
26887         modules of a multi-module assembly. Fixes #58291.
26889 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
26891         * threads.c: Before aborting a background, set the StopRequested
26892         state.  This avoids throwing the Abort exception.
26893         In mono_thread_manage, don't continue with the shutdown until all
26894         aborted threads have actually stopped.
26896 2004-05-10  Jackson Harper  <jackson@ximian.com>
26898         * locales.c: Remove the modifier from culture names.
26899         
26900 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26902         * Makefile.am: monosn is not installed any more. It has been deprecated
26903         in favor of sn.
26905 2004-05-07  Jackson Harper  <jackson@ximian.com>
26907         * locales.c
26908         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
26909         Fix array construction, add bailout if the length is 0.
26911 2004-05-07  Dick Porter  <dick@ximian.com>
26913         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
26914         machine doesn't have a DNS entry.  Patch by Urs Muff
26915         (umuff@quark.com), fixes bug 57928.
26917 2004-05-06  Jackson Harper  <jackson@ximian.com>
26919         * reflection.c: Handle null PublicTokens properly. alloc mem for
26920         assembly names culture so we dont crash when freeing it.
26921         
26922 2004-05-06  Jackson Harper  <jackson@ximian.com>
26924         * assembly.c: Check the usergac when loading with partial names.
26925         
26926 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
26928         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
26929         does nothing for now (not required for Linux/Windows) but the class
26930         library can call it (and a newer or modified runtime could need it).
26931         * icall.c: Registred icall.
26933 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26935         * loader.c: prints a message on module loading error we set MONO_DEBUG
26936         environment variable.
26938 2004-05-05  Jackson Harper  <jackson@ximian.com>
26940         * appdomain.c: Handle PublicKeyToken=null properly.
26941         
26942 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
26944         * environment.c|h: Added icall ves_icall_System_Environment_
26945         GetOSVersionString to get the current OS version as a string.
26946         * icall.c: Registred icall.
26948 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
26950         * object.c: in mono_object_get_virtual_method(), take into account that
26951         non-virtual methods don't have a slot in the vtable. Check needed when
26952         the object is a proxy.
26954 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
26956         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
26957         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
26959         * object.c (mono_class_compute_gc_descriptor): Fix warning.
26961         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
26962         passed when a valuetype is expected.
26964         * object.c (mono_unhandled_exception): Only set the exit code if the
26965         exception happens in the main thread. Fixes thread5.exe.
26967         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
26968         invalid names. Fixes #58047.
26970 2004-05-03  Jackson Harper  <jackson@ximian.com>
26972         * assembly.c: This line was committed accidently and is unneeded.
26973         
26974 2004-05-03  Jackson Harper  <jackson@ximian.com>
26976         * icall.c: Add new icall for Assembly::LoadWithPartialName
26977         * assembly.c/.h: new function that probes the GAC to load partial
26978         assembly names by Paolo Molaro.
26979         
26980 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26982         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
26983         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
26984         (type_get_fully_qualified_name): Added PublicKeyToken when building a
26985         full type name.
26987 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26989         * appdomain.c: fixed check for 'neutral' culture and removed warning.
26990         * reflection.c: fix bug when parsing a full type name and Version is not
26991         the last thing in the string.
26993 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
26995         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
26996         crashes when it is freed.
26998 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27000         * assembly.c: print the compat warning to stderr.
27002 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
27004         * assembly.c (mono_assembly_load_references): Add a compatibility
27005         hack to run old applications that might be still referencing the
27006         3300-based assemblies, only do this for System.xxx.
27008 2004-05-01  Jackson Harper  <jackson@ximian.com>
27010         * appdomain.c: If the culture is neutral we set it to "".
27011         
27012 2004-04-29  Jackson Harper  <jackson@ximian.com>
27014         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
27016 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
27018         * string-icalls.c: added low overhead function for copying chars
27019         * icall.c: added needed icall for the above function
27021 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27023         * icall.c: fix return value of get_global_assembly_cache.  Implemented
27024         Environment.GetLogicalDrives.
27026 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
27028         * rand.c: try and talk to egd or prngd
27029         for random bytes if opening devices fail.
27031 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
27033         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
27034         alignment for the type using the native alignment of its members 
27035         instead of using klass->min_align.
27037         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
27039 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27041         * file-io.c:
27042         * socket-io.c: added check for sys/aio.h.
27044 2004-04-28  Dick Porter  <dick@ximian.com>
27046         * threads.c: Don't abort a thread thats already aborting, when
27047         terminating everything.
27049 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27051         * icall.c: added 2 new async calls for Socket.
27053         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
27054         IO on *nix systems.
27056         * threadpool.c: removed unused variable.
27058 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
27060         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
27062 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
27064         * locales.c: put back string_invariant_tolower () and
27065         string_invariant_toupper ().
27067 2004-04-26 David Waite <mass@akuma.org>
27069         * file-io.h:
27070         * socket-io.h:
27071         * threads.h:
27072         * unicode.h: remove comma from end of enumeration declarations
27074 2004-04-26 David Waite <mass@akuma.org>
27076         * debug-mono-symfile.h:
27077         * decimal.c:
27078         * mono_debug.h:
27079         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
27082 2004-04-26  Jackson Harper  <jackson@ximian.com>
27084         * appdomain.c: Increment version number.
27085         
27086 2004-04-26  Jackson Harper  <jackson@ximian.com>
27088         * appdomain.c: Set assembly references public token value when
27089         PublicKeyToken is specified, not the hash_value. Free public token
27090         values when free assembly name data. Previously the public key
27091         token was hex decoded, however we are using hex encoded public key
27092         tokens, so this is not neccasary.
27093         * assembly.c: Lookup assemblies in the gac if their public token
27094         value is set. Add function to allow enabling user gac
27095         lookups. Specify whether or not the assembly was loaded from the
27096         GAC. Compare full assembly names when checking the cache for
27097         assemblies (Temporarily disabled see comment in code). Remove
27098         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
27099         specifies trace-loader they get extra info to stdout on the
27100         loading of assemblies.
27101         * image.h: Add a field for an assembly references public token
27102         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
27103         whether an assembly has been loaded from the GAC.
27104         * image.c: Remove a corlib -> mscorlib name mapping.
27105         * loader.h: Add function to enable/disable the user gac.
27106         * mono-config.c: Check if the usergac is enabled in the config
27107         file.
27108         * icall.c: New icall to determine whether or not an assembly has
27109         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
27110         * tabldefs.h: Add constant for assemblyref flag that specifies a
27111         full public key is used instead of a public token.
27112         * reflection.c: Remove mscorlib -> corlib mappings. Set
27113         PublicTokenValue instead of hash value. This value is a hex
27114         string so it does not need to be expanded.
27116 2004-04-26  Martin Baulig  <martin@ximian.com>
27118         * mono-debug-debugger.c (mono_debugger_initialize): Set
27119         `mono_debugger_initialized' before calling mono_debug_lock().
27121 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
27123         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
27124           InternalToUpper/InternalToLower.
27125         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
27126           removed invariant culture shortcut.  This is now done in managed code.
27127         * locales.c: (string_invariant_toupper/tolower) removed.
27129 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27131         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
27132         Added Poll internal call.
27134         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
27135         call for Poll. Select was too heavy for polling a single socket.
27137         * threadpool.[ch]: added mono_threadpool_cleanup.
27138         * threads.c: use it. Don't use Thread_Abort on windows.
27140 2004-04-23  Martin Baulig  <martin@ximian.com>
27142         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
27144 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
27146         * icall.c: Registred new icalls for key pair protection and added an
27147         icall for Environment.GetFolderPath on Windows.
27148         * security.c|h: Added new icalls for key pair protection.
27150 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27152         * socket-io.c: don't display the non-supported family warning for known
27153         families. Now this is not displayed on windows when checking support
27154         for IPv4/IPv6.
27156 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27158         * class.c: don't display the layout warning for static fields.
27160 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
27162         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
27163         * locales.c, locales.h: Added new icalls for culture-specific
27164         Char.ToLower and Char.ToUpper.
27166 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27168         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
27169         by David Waite.
27171 2004-04-20  Martin Baulig  <martin@ximian.com>
27173         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
27174         of the type name before passing it to mono_reflection_type_from_name().
27176 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
27178         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
27179         encodings here. Fixes #56965.
27181 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
27183         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
27184         fix test on strstr result not that I can see anything that
27185         relies on the result.
27187 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
27189         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
27190         Fixes #57081.
27192         * marshal.c (mono_marshal_get_string_encoding): New helper function.
27194         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
27195         function to determine which marshalling to use for strings. Fixes
27196         #56965.
27198         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
27200         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
27202 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
27204         * icall.c: #include mono-config.h
27206 2004-04-15  Jackson Harper  <jackson@ximian.com>
27208         * culture-info-tables.h: Fix date formats for en-US culture.
27209         
27210 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
27212         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
27213         ThreadPool.SetMinThreads.
27214         * threadpool.c: Implemented ThreadPool.GetMinThreads and
27215         ThreadPool.SetMinThreads.
27217 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
27219         * mono-config.c: also load the .config file in the directory
27220         where the assembly was found.
27222 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
27224         * assembly.c: load per-assembly config files.
27225         * icall.c: decrapified code to get the config dir and moved to
27226         mono-config.c.
27227         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
27228         per-assembly config files. When doing a dll map lookup give precedence
27229         to the per-assembly data.
27231 2004-04-14  Martin Baulig  <martin@ximian.com>
27233         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
27234         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
27235         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
27237         * mono-debugger-debugger.c: While the debugger is locked, remember
27238         whether the symbol tables have changes and send one single
27239         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
27241 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
27243         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
27245         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
27246         function.
27248         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
27249         account when marshalling string arrays. Fixes #56965.
27251 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
27253         * icall.c: Add new icalls mapping for security.
27254         * security.c|h: Add internal calls for WindowsIdentity,
27255         WindowsImpersonationContext and WindowsPrincipal.
27257 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
27259         * class.c: Added comment to ensure the System.MonoDummy class
27260         is removed when no longer necessary
27262 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
27264         * appdomain.c: Pass arguments to the bootstraping exceptions to
27265         minimize JITed methods at boot
27267         * metadata.c (mono_exception_from_name_two_strings): Allow for the
27268         second string to be null.
27270         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
27271         Change the protocol to minimize the JIT methods at startup.  Now
27272         it Returns the internal codepage, if the value of "int_code_page"
27273         is 1 at entry, and we can not compute a suitable code page
27274         number, returns the code page as a string.
27276 2004-04-13  Jackson Harper  <jackson@ximian.com>
27278         * culture-info-tables.h: Fix number of decimal digits for all
27279         english locales.
27281 2004-04-13  Jackson Harper  <jackson@ximian.com>
27283         * icall.c: Clairfy out of sync error message. It is not always
27284         your corlib that is out of sync.
27286 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
27288         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
27289         properties when only the set accessor is overriden. Fixes #55874.
27291 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
27293         * assembly.c (mono_assembly_load_references): Make this thread safe.
27294         Fixes #56327.
27296 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
27298         * monosn.c: Add missing initialization calls.
27300 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
27302         * locales.c:
27303         ves_icall_System_Globalization_CultureInfo_construct_number_format
27304         Fix g_assert so it compiles on fussier compilers re int/ptr
27305         mismatch
27307 2004-04-08  Dick Porter  <dick@ximian.com>
27309         * socket-io.h:
27310         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
27311         53992.  Also rearrange the code so that the internal calls return
27312         an error value and exceptions are thrown from managed code.
27314         * icall.c: Add type info to the socket icalls.
27316 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27318         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
27319         owes me a beer.
27321 2004-04-07  Martin Baulig  <martin@ximian.com>
27323         * class.c (mono_class_from_generic_parameter): Don't default
27324         `klass->parent' to `mono_defaults.object_type'.
27326 2004-04-07  Martin Baulig  <martin@ximian.com>
27328         * reflection.c (mono_reflection_initialize_generic_parameter): Set
27329         `param->pklass->reflection_info'.       
27331 2004-04-07  Jackson Harper  <jackson@ximian.com>
27333         * culture-info-tables.h: Fix date separator symbol.
27334         
27335 2004-04-07  Martin Baulig  <martin@ximian.com>
27337         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
27338         from System.Type to System.MonoType.
27340 2004-04-07  Martin Baulig  <martin@ximian.com>
27342         * reflection.h
27343         (MonoReflectionGenericParam): Added `has_reference_type' and
27344         `has_value_type' fields.
27346         * reflection.c (mono_image_get_generic_param_info): Encode the
27347         correct flags if we have the `class' or `struct' constraint.
27349 2004-04-07  Martin Baulig  <martin@ximian.com>
27351         * reflection.h
27352         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
27354 2004-04-07  Jackson Harper  <jackson@ximian.com>
27356         * appdomain.c: Revert extra patches, just wanted to bump the
27357         version number.
27358         
27359 2004-04-07  Jackson Harper  <jackson@ximian.com>
27361         * Makefile.am: Add culture-info private headers.
27362         * icall.c: Add new icalls for contructing locales.
27363         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
27364         * locales.h: Declare new culture info construction methods.
27365         * object.h: Add new fields used to avoid the CultureMap to
27366         MonoCultureInfo.
27367         * culture-info.h: Definition of structs used in the culture info
27368         tables.
27369         * culture-info-tables.h: Autogenerated tables that contain culture
27370         info data. This file was generated with the locale-builder tool.
27371         * appdomain.c: Incement corlib version number.
27372         
27373 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
27375         * appdomain.c: (mono_runtime_init) move mono_thread_init
27376         to before mono_object_new calls so critical sections
27377         are initialized before use.
27379 2004-04-07  Martin Baulig  <martin@ximian.com>
27381         * icall.c
27382         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
27383         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
27384         (ves_icall_MonoGenericParam_initialize): Removed.
27385         (monogenericparam_icalls): Removed.
27386         (generictypeparambuilder_icalls): Added new table for
27387         System.Reflection.Emit.GenericTypeParameterBuilder.
27389         * reflection.c
27390         (mono_reflection_define_generic_parameter): Removed.
27391         (mono_reflection_initialize_generic_parameter): This is now called
27392         from GenericTypeParameterBuilder's .ctor.
27394 2004-04-06  Martin Baulig  <martin@ximian.com>
27396         * class.c (mono_class_init): Don't inflate nested classes in a
27397         generic instance.
27398         (mono_type_get_name_recurse): Include the generic arguments for
27399         generic instances and generic type declarations.
27400         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
27401         (_mono_class_get_instantiation_name): Removed.
27402         (mono_class_create_generic): Always use `gklass->name' as our name.
27404         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
27406         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
27407         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
27408         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
27409         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
27410         closed generic methods here.
27412         * reflection.c
27413         (mono_reflection_generic_inst_get_nested_types): Removed.
27414         (inflate_mono_method): Copy the generic parameters from the
27415         MonoMethodHeader into out MonoGenericMethod.
27417 2004-04-06  Martin Baulig  <martin@ximian.com>
27419         * row-indexes.h
27420         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
27422         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
27424         * reflection.c (build_compressed_metadata): If we have any entries
27425         in the GenericParam, MethodSpec or GenericParamConstraint tables,
27426         set the header version to 1.1.
27428 2004-04-06  Martin Baulig  <martin@ximian.com>
27430         * class.c (mono_class_init): If we're a generic instance,
27431         initialize our nested classes, too.
27432         (_mono_class_get_instantiation_name): Deal with the new `!%d'
27433         suffix. 
27435 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27437         * process.c: quote the argument passed to the shell on windows.
27439 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
27441         * threads.c (mono_alloc_special_static_data): Allow this to be
27442         called during startup.
27444 2004-04-02  Martin Baulig  <martin@ximian.com>
27446         * icall.c
27447         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
27449 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
27451         * icall.c: Fix build.
27453 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
27455         * Makefile.am: Added security.c|h.
27456         * icall.c: Added icall for get_UserName;
27457         * security.c: New file for security related icalls. Added function
27458         get_UserName for System.Environment (fix #56144).
27459         * security.h: New. Header file for security.c
27461 2004-04-02  Dick Porter  <dick@ximian.com>
27463         * icall.c: Deleted the icalls that were obsoleted some time ago
27464         by the ICU string code, and which were mixed into the icall
27465         rearranging.  Fixes bug 55969.
27467         * string-icalls.h: 
27468         * string-icalls.c: Deleted the code that those icalls reference.
27470 2004-04-01  Martin Baulig  <martin@ximian.com>
27472         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
27474         * class.c (mono_class_from_generic_parameter): Don't set 
27475         TYPE_ATTRIBUTE_INTERFACE.
27476         (my_mono_class_from_generic_parameter): Likewise.
27478 2004-04-01  Martin Baulig  <martin@ximian.com>
27480         * loader.c (find_method): Added an optional `MonoClass *ic'
27481         argument to search in a specific interface.
27482         (mono_get_method_constrained): New public function.
27484 2004-04-01  Martin Baulig  <martin@ximian.com>
27486         * reflection.c (mono_image_get_generic_field_token): Use the
27487         `handleref' cache here.
27489 2004-04-01  Martin Baulig  <martin@ximian.com>
27491         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
27493         * reflection.c (create_generic_typespec): Use the `typespec' hash
27494         here, not the `typeref' one.    
27496 2004-04-01  Martin Baulig  <martin@ximian.com>
27498         * class.c (mono_class_inflate_generic_type): Moved the
27499         functionality into a new static inflate_generic_type() which
27500         returns NULL if it didn't do anything.  Only increment the
27501         `mono_stats.inflated_type_count' if we actually inflated
27502         something.
27503         (mono_class_get_full): Check the classes type to see whether we
27504         need to inflate it; also inflate MONO_TYPE_(M)VAR.
27506 2004-04-01  Jackson Harper  <jackson@ximian.com>
27508         * reflection.c: Set culture for assembly references.
27509         
27510 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
27512         * reflection.[ch], icall.[ch], Fix support for pinning variables.
27514 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27516         * assembly.c:
27517         (do_mono_assembly_open): the critical section also covers
27518         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
27520 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27522         * threads.c:
27523         (mono_manage_threads): abort the background threads when finishing.
27524         Fixes bug #47232.
27526 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27528         * gc.c: only close the done_event handle if there was no timeout.
27529         C-ified comments.
27531 2004-03-30  Martin Baulig  <martin@ximian.com>
27533         * icall.c (icall_entries): It's called "System.Activator", not
27534         "System.Activation".    
27536 2004-03-30  Martin Baulig  <martin@ximian.com>
27538         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
27539         (mono_class_create_from_typespec): Likewise.
27541 2004-03-30  Martin Baulig  <martin@ximian.com>
27543         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
27544         `has_ctor_constraint' and `initialized'.
27546 2004-03-30  Martin Baulig  <martin@ximian.com>
27548         * reflection.c (encode_new_constraint): New static function to add
27549         the constructor constraint attribute to a type parameter.
27550         (encode_constraints): Call encode_new_constraint() if necessary.
27552         * reflection.h
27553         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
27555         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
27556         
27557 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
27559         * reflection.c, icall.c: add support for pinning variables. 
27561 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
27563         * marshal.c (mono_marshal_get_managed_wrapper):
27564         init bool local with zero rather than null.
27566 2004-03-29  Martin Baulig  <martin@ximian.com>
27568         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
27569         the "official" behavior here.
27570         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
27572 2004-03-29  Martin Baulig  <martin@ximian.com>
27574         * icall.c: Reflect latest API changes.
27576 2004-03-29  Martin Baulig  <martin@ximian.com>
27578         * loader.c (mono_get_method_from_token): Also call
27579         mono_metadata_load_generic_params () for abstract and interface
27580         methods; replace the type arguments in the method signature with
27581         the ones which are loaded from the metadata.
27583 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
27585         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
27586         of the lock is not the current thread. MS.NET don't do it, in spite of
27587         what the documentation says. See bug #56157.
27589 2004-03-28  Martin Baulig  <martin@ximian.com>
27591         * class.c (mono_class_init): Don't call init_properties() and
27592         init_events() for generic instances; set `prop->parent' when
27593         inflating properties.
27595         * reflection.c (mono_generic_inst_get_object): Call
27596         `mono_class_init (ginst->klass)'.
27597         (mono_type_get_object): Only create a MonoGenericInst if your
27598         generic type is a TypeBuilder.
27599         (do_mono_reflection_bind_generic_parameters): Only set
27600         `ginst->is_dynamic' if our generic type is a TypeBuilder.
27602 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
27604         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
27605         Fixes #56091.
27607 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27609         * icall.c: added Kill_internal icall.
27610         * process.[ch]: added Kill_internal icall.
27612 2004-03-25  Martin Baulig  <martin@ximian.com>
27614         * class.h (MonoStats): Added `generic_instance_count',
27615         `inflated_method_count', `inflated_type_count' and
27616         `generics_metadata_size'.       
27618 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27620         * reflection.c: no warnings now.
27622 2004-03-25  Martin Baulig  <martin@ximian.com>
27624         * class.c (mono_class_get_full): New public function; does a
27625         mono_class_get(), but also takes a `MonoGenericContext *'.
27627         * loader.c (mono_field_from_memberref): Renamed to
27628         `field_from_memberref', made static and added `MonoGenericContext *'
27629         argument.
27630         (mono_field_from_token): Added `MonoGenericInst *' argument.
27631         (method_from_memberef): Likewise.
27632         (mono_get_method_from_token): Likewise.
27633         (mono_get_method_full): New public function; does a
27634         mono_get_method(), but also takes a `MonoGenericContext *'.
27636         * verify.c (mono_method_verify): Get the method's generic context
27637         and pass it to mono_field_from_token(), mono_get_method_full() and
27638         mono_class_get_full().
27640 2004-03-25  Martin Baulig  <martin@ximian.com>
27642         * class.c (mono_class_inflate_generic_type): Take a
27643         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
27644         `MonoGenericMethod *'.
27646 2004-03-25  Martin Baulig  <martin@ximian.com>
27648         * loader.h (MonoMethodInflated): Store the MonoGenericContext
27649         instead of the MonoGenericMethod here.
27651 2004-03-25  Martin Baulig  <martin@ximian.com>
27653         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
27654         each time we create a new MonoGenericInst, we also create a new
27655         context which points back to us.
27657         * class.c (inflate_method): Use `ginst->context' instead of
27658         creating a new context.
27660         * loader.c (method_from_memberref): Use
27661         `klass->generic_inst->context' instead of creating a new context.
27663 2004-03-25  Martin Baulig  <martin@ximian.com>
27665         * class.h (MonoGenericContext): New struct.
27666         (MonoGenericMethod): Removed `generic_inst'.
27668         * class.c (mono_class_inflate_generic_method): Take a
27669         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
27671 2004-03-25  Martin Baulig  <martin@ximian.com>
27673         * loader.h (MonoMethodInflated): New typedef.
27675         * metadata.h (MonoMethodSignature): Removed `gen_method', make
27676         `generic_param_count' consume just 30 bits, added `is_inflated'
27677         and `has_type_parameters' flags (one bit each).
27679         * class.c (mono_class_inflate_generic_method): Create a
27680         MonoMethodInflated instead of a MonoMethodNormal and set
27681         `is_inflated' in the method signature.
27683         * class.h (MonoGenericMethod): Removed `generic_method'.
27685 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
27687         * image.c: Make sure the name of a MonoImage is always an absolute path.
27688           This fixes bug #54415.
27690 2004-03-24  Martin Baulig  <martin@ximian.com>
27692         * class.c (mono_class_setup_vtable): If we're a generic instance,
27693         use our generic type's vtable size.
27695 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
27697         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
27698         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
27699         problems.
27701 2004-03-23  Martin Baulig  <martin@ximian.com>
27703         * class.h (MonoDynamicGenericInst): Added `int count_events' and
27704         `MonoEvent *events'.
27706         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
27707         (typebuilder_icalls): Added "get_event_info"; calls
27708         mono_reflection_event_builder_get_event_info(). 
27710         * reflection.c (mono_reflection_generic_inst_initialize): Added
27711         `MonoArray *events'.
27712         (mono_reflection_event_builder_get_event_info): New function.
27714 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
27716         * object.h: add mono_type_initialization_init
27718         * object.c (mono_runtime_class_init): 
27719         implement class constructor synchronization rules
27720         to cope with threading issues.  
27721         add mono_type_initialization_init
27723         * appdomain.c (mono_runtime_init): call 
27724         mono_type_initialization_init
27726         * class.h: removing initializing field from MonoVTable
27728 2004-03-23  Martin Baulig  <martin@ximian.com>
27730         * class.c (my_mono_class_from_generic_parameter): Use
27731         `param->name' if it's not NULL. 
27733 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
27735         * class.c: do not insert non-virtual methods in the vtable.
27736         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
27737         that means the method is non-virtual. This never would have
27738         happened before.
27740 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
27742         * profiler.c: Added lock for accessing coverage_hash.
27744 2004-03-22  Martin Baulig  <martin@ximian.com>
27746         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
27747         `method->method->signature->generic_param_count != 0' to make it
27748         work for interface methods.
27750 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27752         * process.c: quote the string passed to the shell using g_shell_quote.
27754 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27756         * threads.c:
27757         (mono_threads_manage): don't remove the finalizer thread and self
27758         from the threads hash table so that mono_thread_manage can be called
27759         more than once.
27761 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27763         * process.c: quote the arguments when UseShellExecute is true. Fixes
27764         bug #55790.
27766 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27768         * threads.c: set mono_thread_detach as a cleanup routine for every
27769         thread. This way it's always executed upon thread termination, either
27770         aborted or finished normally. No more xsp hangs!
27772 2004-03-17  Martin Baulig  <martin@ximian.com>
27774         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
27775         `int count_nested' and a `MonoType **nested'.
27777         * reflection.c (mono_reflection_bind_generic_parameters): Moved
27778         most of the functionality into a new static
27779         do_mono_reflection_bind_generic_parameters() and don't take a
27780         `MonoType *nested_in' argument any more.  Don't compute nested
27781         types here.
27782         (mono_reflection_generic_inst_get_nested_types): New public method
27783         to get nested types.
27785         * class.c (mono_class_create_generic): Set `klass->nested_in' if
27786         we're a nested class.
27788         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
27789         mono_reflection_generic_inst_get_nested_types() to compute the
27790         nested types.
27792 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
27794         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
27795         descriptive error message under windows.
27796         
27797 2004-03-17  Martin Baulig  <martin@ximian.com>
27799         * class.c (dup_type): Added `const MonoType *original' argument;
27800         copy the attrs from the original type.
27802 2004-03-17  Martin Baulig  <martin@ximian.com>
27804         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
27805         `m->generic_inst_cache' here.
27807 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
27809         * exception.h exception.c: Add stack_overflow_exception.
27811 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27813         * threadpool.c:
27814         (overlapped_callback): call SetEvent *after* invoking the callback.
27815         No need to call CloseHandle.
27817 2004-03-16  Martin Baulig  <martin@ximian.com>
27819         * reflection.c (mono_image_get_fieldref_token): Take a
27820         `MonoReflectionField *' instead of a `MonoClassField *' and a
27821         `MonoClass *'; store the `MonoReflectionField *' in the hash.
27823 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27825         * appdomain.c: don't add the culture to the filename we're looking for
27826         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
27828 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27830         * locales.c: don't ignore symbols when doing case insensitive compares.
27831         Thanks Dick! Fixes bug #54046.
27833         * threads.c: surround 'threads' usage with enter/leave in
27834         mono_thread_manage.
27836 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
27838         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
27839         implicitly marshalled as [Out]. Fixes #55450.
27841         (mono_marshal_get_runtime_invoke): Zero out the result if there is
27842         an exception.
27844 2004-03-16  Martin Baulig  <martin@ximian.com>
27846         * class.c (mono_class_from_generic_parameter): Use the actual
27847         parameter name. 
27849 2004-03-16  Martin Baulig  <martin@ximian.com>
27851         * reflection.c (type_get_signature_size): New static function.
27852         Compues the size of the type in a method signature.
27853         (method_get_signature_size): New static function; calls
27854         type_get_signature_size() to compute the actual size of the
27855         method's signature.
27856         (method_encode_signature): Use method_get_signature_size() to get
27857         the signature's size rather than using `nparams * 10'.
27859 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27861         * file-io.h: define here WapiOverlapped on windows. I don't want the
27862         regular OVERLAPPED one.
27864         * file-io.c:
27865         * threadpool.c: somehow, BindIoCompletionCallback is not found.
27866         Disabling AIO on windows.
27868 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27870         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
27871         bug #55385.
27873 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27875         * appdomain.c: upgraded corlib version.
27877         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
27878         and BeginWrite. Allow opening files for asynchrnous operations.
27880         * file-io.h: new struct that maps FileStreamAsyncResult.
27881         * icall.c: added new icalls.
27882         * process.[ch]: support setting child process environment variables
27883         and use the SHELL or COMSPEC when UseShellExecute is true.
27885         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
27886         callback for async. IO is here and also BindHandle.
27888         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
27889         from here.
27891 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
27893         * reflection.c (create_custom_attr): Allow len == 0.
27895         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
27896         computation on big-endian machines.
27898 2004-03-13  Martin Baulig  <martin@ximian.com>
27900         * class.h (MonoGenericInst): Added `int count_ifaces'.
27902         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
27903         `ginst->count_ifaces' instead `klass->interface_count' since we
27904         may get called before the vtable is created.
27906         * loader.c (mono_method_get_param_names): If we're a generic
27907         instance, return and don't initialize the class.
27909         * reflection.c (mono_reflection_setup_generic_class): Don't call
27910         ensure_runtime_vtable().
27911         (mono_reflection_bind_generic_parameters): Set
27912         `ginst->count_ifaces'.
27914 2004-03-11  Jackson Harper <jackson@ximian.com>
27916         * icall.c:
27917         * unicode.c:
27918         * unicode.h: Remove unused System.Char icalls.
27919         
27920 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
27922         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
27923         code when we P/Invoke the first library in Windows.Forms, instead
27924         of when we first open the assembly.
27926         * assembly.c: Drop the lookup from here.
27928 2004-03-10  Martin Baulig  <martin@ximian.com>
27930         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
27931         class for properties, fields and events.  Finally fixes #54945.
27933 2004-03-10  Martin Baulig  <martin@ximian.com>
27935         * metadata.c (mono_metadata_class_equal): New static function;
27936         checks whether two generic instances or two generic parameters are
27937         equal.
27938         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
27939         compare classes.        
27941 2004-03-10  Martin Baulig  <martin@ximian.com>
27943         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
27945         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
27946         argument and write it into the `reflection_info' field.
27948         * icall.c
27949         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
27950         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
27952 2004-03-09  Jackson Harper  <jackson@ximian.com>
27954         * char-conversions.h: use 8 bits for numeric data its all we need
27955         * icall.c: numeric data is only 8 bits now.
27957 2004-03-09  Martin Baulig  <martin@ximian.com>
27959         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
27961         * class.c (init_properties, init_events): Initialize the new
27962         `parent' field.
27964         * reflection.c (typebuilder_setup_properties): Likewise.
27965         (typebuilder_setup_events): Likewise.
27967         * reflection.h (MonoEventInfo): Replaced `parent with
27968         `declaring_type' and `reflected_type'.
27970         * icall.c (ves_icall_get_property_info): Distinguish between
27971         declaring and reflected type.
27972         (ves_icall_get_event_info): Likewise.
27974 2004-03-09  Martin Baulig  <martin@ximian.com>
27976         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
27977         (ves_icall_Type_GetField): Correctly set field->klass.
27979 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
27981         * loader.h: Fix warning.
27983 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
27985         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
27986         library routine if present.  Notice that it will still continue
27987         executing even if its missing, for those working on the Gtk#
27988         edition of Windows.Forms.
27990         * assembly.c (do_mono_assembly_open): If loading the
27991         System.Windows.Forms call mono_loader_wini_init.
27993 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
27995         * class.h: Added MonoRemoteClass struct.
27996         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
27997         function for MonoStrings.
27998         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
27999         Added internal call for getting the proxy type.
28000         * marshal.c: Get the type of transparent proxies from its remote_class.
28001         Added methods that generate the IL for type checks and casts:
28002         mono_marshal_get_isinst, mono_marshal_get_castclass, 
28003         mono_marshal_get_proxy_cancast.
28004         * marshal.h: Declaration of the previous new methods.
28005         * object.c: Added new moethods for creating and updating MonoRemoteClass
28006         instances: mono_remote_class, mono_upgrade_remote_class, 
28007         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
28008         * verify.c: FIx transparent_proxy_fields layout.
28009         * appdomain.c: Bump corlib version.
28011 2004-03-04  Jackson Harper  <jackson@ximian.com>
28013         * icall.c: Add icall to access char conversion tables.
28014         * char-conversions.h: Character conversion tables.
28015         * Makefile.am: Add char-conversions.h private header file.
28016         
28017 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
28019         * appdomain.c (unload_thread_main): Increase unloading timeout to
28020         10 sec as a temporary workaround for Nant problems.
28022 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
28024         * gc.c: Add checks for GC_enable and GC_disable.
28026         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
28027         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
28028         (bug #54988).
28029         
28030 2004-02-27  Martin Baulig  <martin@ximian.com>
28032         * reflection.c (mono_reflection_bind_generic_parameters): Take a
28033         `MonoReflectionType *' instead of a `MonoType *'.
28035 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
28037         * gc.c (run_finalize): Avoid finalizing the object representing the
28038         finalizer thread.
28039         (finalizer_thread): Fix warning.
28041 2004-02-25  Martin Baulig  <martin@ximian.com>
28043         * class.c (_mono_class_get_instantiation_name): Added `int offset'
28044         argument for nested types.
28045         (mono_class_create_generic): Added support for nested generictypes.
28047         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
28048         `GList *nested'.
28050         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
28052         * reflection.c (method_encode_signature): Increase the minimum
28053         value of `size' from 10 to 11.
28054         (mono_reflection_bind_generic_parameters): Take `int type_argc'
28055         and `MonoType **types' arguments instead of the `MonoArray
28056         *types'; added `MonoType *nested_in'.  Recursively instantiate
28057         nested classes. 
28059 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
28061         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
28062         stack_overflow_ex members which are used by exception handling.
28064         * appdomain.c (mono_runtime_init): Initialize the new members.
28066         * gc.c (mono_gc_enable): New helper function.
28067         * gc.c (mono_gc_disable): New helper function.
28069 2004-02-23  Martin Baulig  <martin@ximian.com>
28071         * icall.c: I must have been really stupid - make it actually work
28072         this time ;-)
28074 2004-02-23  Martin Baulig  <martin@ximian.com>
28076         * loader.c (method_from_memberref): Only inflate the method if
28077         it's in another klass.
28079 2004-02-23  Martin Baulig  <martin@ximian.com>
28081         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
28082         (mono_class_init): If we're a generic instance and an interface,
28083         compute `class->interface_id'; also create `class->interfaces'
28084         here and inflate them.
28086         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
28087         `ginst->is_open'.
28088         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
28090         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
28092 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
28094         * reflection.c (method_encode_code): Improved the error message
28095         generated by the exception.
28097 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28099         * icall.c: Martin did not do what he said in the ChangeLog for
28100         2004-02-18, but put back the changes for properties and events.
28101         Commenting those changes out again and adding comment to bug #54518.
28102         
28103         * process.c: removed warning.
28105 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
28107         * marshal.c (emit_struct_conv): Print an error message instead of
28108         asserting when a type does not have the StructLayout attribute.
28110 2004-02-20  Martin Baulig  <martin@ximian.com>
28112         * reflection.c (mono_type_get_object): Also use the cache for
28113         generic instances.
28114         (mono_reflection_bind_generic_parameters): Always compute
28115         `ginst->ifaces'.        
28117 2004-02-20  Martin Baulig  <martin@ximian.com>
28119         * class.h (MonoGenericMethod): Removed `klass'.
28121         * class.c (mono_class_inflate_generic_method): Added `MonoClass
28122         *klass' argument.
28124 2004-02-20  Martin Baulig  <martin@ximian.com>
28126         * reflection.c (method_encode_methodspec): Actually use the
28127         uninflated signature for the memberref.
28129 2004-02-20  Martin Baulig  <martin@ximian.com>
28131         * class.h (MonoGenericMethod): Removed `declaring'.
28133         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
28134         is NULL, compute it here.
28136 2004-02-20  Martin Baulig  <martin@ximian.com>
28138         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
28140         * metadata.c (mono_metadata_generic_inst_hash): New method.
28141         (mono_metadata_generic_inst_equal): New method.
28143         * reflection.c (mono_reflection_bind_generic_parameters): Use the
28144         `klass->image->generic_inst_cache' cache to avoid creating
28145         duplicate MonoGenericInst's.
28147         * class.c (mono_class_inflate_generic_type): Use the cache.
28149 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
28151         * object.c: fixed gc descriptor calculation for embedded valuetypes.
28153 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28155         * icall.c: added Socket.WSAIoctl icall.
28157         * socket-io.[ch]: implemented
28158         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
28160 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
28162         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
28164 2004-02-18  Urs C Muff  <umuff@quark.com>
28166         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
28167         this work on PPC and other big-endian architectures.
28169         * debug-mono-symfile.h: Prepended the names of all the `guint32'
28170         fields with an underscore to make sure they're only accessed by
28171         the read32() macro.
28173 2004-02-18  Martin Baulig  <martin@ximian.com>
28175         * icall.c: Put the klass->refclass changes back for methods and
28176         fields, but not for properties and events.  We're currently not
28177         distinguishing between DeclaringType and ReflectedType for
28178         properties and events, that's what caused the regressions.
28180 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28182         * object.c:
28183         (mono_async_result_new): the handle can be NULL.
28185         * threadpool.c: Use an event instead of a semaphore, don't initialize
28186         it until needed. This saves quite a few semaphores from being created
28187         when using the threadpool.
28189 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
28191         * object.c (mono_string_is_interned_lookup): Fix interning of long
28192         strings. Fixes #54473.
28194         * domain.c (ldstr_equal): Optimize if the two strings are equal.
28196         * icall.c: Revert the klass->refclass changes since they introduce
28197         regressions (bug #54518).
28199 2004-02-18  Martin Baulig  <martin@ximian.com>
28201         * class.c (mono_class_init): If we're a generic instance and don't
28202         come from a TypeBuilder, inflate our members here.
28203         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
28204         (mono_class_create_generic): New public method.
28205         (mono_class_initialize_generic): Removed.
28206         (get_instantiation_name): Renamed to
28207         _mono_class_get_instantiation_name() and made it public.
28209 2004-02-18  Martin Baulig  <martin@ximian.com>
28211         * class.c (mono_class_inflate_generic_type): Clear the new
28212         instance's `nginst->klass' when inflating a generic instance.
28213         (mono_class_is_subclass_of): Added (basic) support for generic
28214         instances.
28216 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
28218         * appdomain.h, domain.c: use a MonoCodeManager instead of a
28219         MonoMempool to hold compiled native code.
28221 2004-02-17  Martin Baulig  <martin@ximian.com>
28223         * class.h (MonoDynamicGenericInst): Added `count_properties' and
28224         `properties'.
28226         * reflection.c (mono_reflection_generic_inst_initialize): Added
28227         `MonoArray *properties' argument.
28229         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
28231 2004-02-17  Martin Baulig  <martin@ximian.com>
28233         * icall.c (ves_icall_Type_GetFields): Renamed to
28234         ves_icall_Type_GetFields_internal() and added a
28235         `MonoReflectionType *rtype' argument; pass it to
28236         mono_field_get_object() to set the field's "reflected" type.
28237         (ves_icall_Type_GetConstructors): Likewise.
28238         (ves_icall_Type_GetEvents): Likewise.
28239         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
28240         argument; pass it to mono_method_get_object() to set the method's
28241         "reflected" type.       
28243 2004-02-17  Martin Baulig  <martin@ximian.com>
28245         * class.h (MonoDynamicGenericInst): New type.
28246         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
28248         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
28249         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
28250         (ves_icall_MonoGenericInst_GetFields): New interncall.
28252         * class.c (mono_class_from_generic): Don't call
28253         mono_class_initialize_generic() if this is a dynamic instance;
28254         ie. it's being created from a TypeBuilder.
28255         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
28256         `class->byval_arg.type'.
28258         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
28259         to `inflate_method' and made static.
28260         (mono_reflection_inflate_field): Removed.
28261         (mono_reflection_generic_inst_initialize): New public method.
28263         * reflection.h (MonoReflectionGenericInst): Removed `methods',
28264         `ctors' and `fields'; added `initialized'.
28266 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
28268         * debug-helpers.c (mono_method_full_name): Fix output for empty
28269         namespaces.
28271 2004-02-12  Martin Baulig  <martin@ximian.com>
28273         * class.h (MonoClassField): Added `MonoType *generic_type'.
28275         * reflection.c (mono_image_get_fieldref_token): Added support for
28276         instantiated generic types.
28277         (field_encode_inflated_field): Removed.
28278         (mono_image_get_inflated_field_token): Removed.
28279         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
28281         * reflection.h (MonoReflectionInflatedField): Removed.
28283 2004-02-12  Martin Baulig  <martin@ximian.com>
28285         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
28286         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
28288         * reflection.c (mono_image_get_methodspec_token): Take a
28289         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
28290         (mono_image_create_token): Check whether we have a
28291         `method->signature->gen_method' and call
28292         mono_image_get_methodspec_token() if appropriate.
28293         (inflated_method_get_object): Removed.
28294         (mono_reflection_bind_generic_method_parameters): Return a
28295         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
28296         (mono_reflection_inflate_method_or_ctor): Likewise.
28298         * reflection.h (MonoReflectionInflatedMethod): Removed.
28300 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
28302         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
28303         for custom valuetype marshalling.
28305         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
28307 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28309         * icall.c: fixed WSAGetLastError_internal name.
28311 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
28313         * threads.c (mono_thread_attach): Allow this to be called multiple
28314         times for a thread.
28315         
28316         * threads.c (build_wait_tids): Do not wait for ourselves.
28318         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
28319         appdomain list is empty.
28321         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
28322         memory returned by mono_string_builder_to_utf16, since it points into
28323         managed memory. Thanks to Bernie Solomon for noticing this.
28325         * icall.c: Add AppDomainSetup icalls.
28327         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
28329         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
28330         types.
28332         * reflection.c (reflection_methodbuilder_to_mono_method): Save
28333         custom attributes to the method_aux struct. Also fix array indexes etc.
28335         * loader.c (mono_method_get_param_names): Make dynamic case work again.
28336         
28337 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
28339         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
28340         (both static and runtime) and reduce startup time.
28342 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
28344         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
28345         AsAny marshalling conversion instead of crashing.
28347         * marshal.c: Fix warnings.
28349 2004-02-09  Martin Baulig  <martin@ximian.com>
28351         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
28353         * reflection.h (MonoReflectionInflatedMethod): Removed the
28354         `declaring' field, it's now in the unmanaged MonoGenericMethod.
28356         * reflection.c (method_encode_methodspec): Removed the `method'
28357         argument; we get it from `gmethod->declaring'.
28358         (inflated_method_get_object): Removed the `declaring' argument.
28360 2004-02-09  Martin Baulig  <martin@ximian.com>
28362         * class.h (MonoGenericMethod): New type.
28363         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
28364         `generic_method'.
28366         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
28367         a `MonoGenericMethod *gen_method' one.
28369         * class.c (mono_class_inflate_generic_type): Take an additional
28370         `MonoGenericMethod * argument.  This is only non-NULL if we're
28371         inflating types for a generic method.   
28372         (mono_class_inflate_generic_signature): Renamed to
28373         inflate_generic_signature() and made static; take a
28374         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
28375         (inflate_generic_header): Take a `MonoGenericMethod *' argument
28376         instead of a `MonoGenericInst *' one.
28377         (mono_class_inflate_generic_method): Likewise.
28379         * reflection.c (encode_generic_method_sig): Take a
28380         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
28381         (method_encode_methodspec): Likewise.
28382         (inflated_method_get_object): Likewise. 
28384         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
28385         field with a `MonoGenericMethod *gmethod' one.  
28387 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
28389         * class.h (mono_class_has_parent): add parens to expansion
28390         so you can ! this.
28392 2004-02-08  Martin Baulig  <martin@ximian.com>
28394         * image.h (MonoImage): Removed `generics_cache'.
28396         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
28397         instead of a `MonoType *' argument; removed the `inflate_methods'
28398         argument.  Don't inflate methods here.
28400         * loader.c (find_method): If it's a generic instance, call
28401         mono_class_init() on the `sclass->generic_inst->generic_type'.
28403         * metadata.c (mono_type_size): Make this work on uninitialized
28404         generic instances; call it on the `ginst->generic_type's class.
28406         * reflection.c (mono_reflection_bind_generic_parameters): Call
28407         mono_class_from_generic() to create the `ginst->klass'.
28409 2004-02-08  Martin Baulig  <martin@ximian.com>
28411         * class.h (MonoClass): Changed type of `generic_inst' from
28412         `MonoType *' to `MonoGenericInst *'.
28414 2004-02-08  Martin Baulig  <martin@ximian.com>
28416         * icall.c (ves_icall_Type_BindGenericParameters): Just call
28417         mono_type_get_object(), this is now creating a `MonoGenericInst'
28418         for MONO_TYPE_GENERICINST.
28419         (ves_icall_MonoGenericInst_GetParentType): Likewise.
28420         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
28422         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
28423         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
28424         (inflated_method_get_object): Added `MonoClass *refclass' argument.
28425         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
28426         and reflected type.
28428         * reflection.h (MonoReflectionInflatedMethod): Removed
28429         `declaring_type' and `reflected_type'.
28431 2004-02-08  Martin Baulig  <martin@ximian.com>
28433         * class.h (MonoGenericInst): Added `MonoType *parent' and
28434         `MonoType **ifaces'.
28436         * reflection.h (MonoReflectionGenericInst): Removed `klass',
28437         `parent' and `interfaces'.
28439         * reflection.c (mono_reflection_bind_generic_parameters): Take a
28440         `MonoType *' argument and return a `MonoType *'.
28442         * icall.c
28443         (ves_icall_MonoGenericInst_GetParentType): New interncall.
28444         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
28446 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
28448         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
28449         valuetype marshalling.
28451 2004-02-06  Martin Baulig  <martin@ximian.com>
28453         * class.c
28454         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
28455         (my_mono_class_from_generic_parameter): Likewise.
28457 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
28459         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
28460         contents of the symbol files lazily.
28462         * object.h (MonoThread): Add 'name' and 'name_len' fields.
28464         * threads.h threads.c icall.c: New icalls for getting and setting the
28465         threads name.
28467 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
28469         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
28470         Raise an exception when the domain is not found.
28472 2004-02-03  Martin Baulig  <martin@ximian.com>
28474         * reflection.c (mono_image_get_methodspec_token): Use the
28475         uninflated signature; fixes gen-33.
28477 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
28479         * gc.c threads.c: Make the finalizer thread a normal managed thread so
28480         the finalizer code can use thread functionality.
28482         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
28483         the finalizer thread.
28485         * threads.c: Make some functions more robust.
28487         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
28489         * metadata.h: Add new marshalling conventions.
28491         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
28492         stringbuilder marshalling. Fixes #53700.
28494         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
28496         * reflection.c (mono_image_get_type_info): Save declarative security
28497         info.
28499         * reflection.c (mono_image_get_field_info): Handle uninitialized 
28500         unmanaged fields as well.
28502         * appdomain.c: Bump corlib version.
28504 2004-02-01  Martin Baulig  <martin@ximian.com>
28506         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
28507         method type arguments.  
28509 2004-01-30  Duncan Mak  <duncan@ximian.com>
28511         * marshal.h: Add prototype for
28512         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
28513         and
28514         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
28515         fix the build.
28517 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
28519         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
28520         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
28522 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
28524         * marshal.c (mono_marshal_get_native_wrapper): Add support for
28525         custom marshalling of valuetypes.
28527         * marshal.c: Fix some warnings.
28529 2004-01-29  Martin Baulig  <martin@ximian.com>
28531         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
28532         for generic method parameters.
28534         * reflection.c (method_encode_methodspec): Write the uninflated
28535         signature into the methodspec table.
28536         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
28537         is always the uninflated method.
28538         (reflection_methodbuilder_to_mono_method): Copy the generic
28539         parameters from the MethodBuilder into `header->gen_params'.
28541 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
28543         * class.c (mono_class_from_generic_parameter): Fix warning.
28545 2004-01-27  Martin Baulig  <martin@ximian.com>
28547         * class.c (mono_class_from_generic_parameter): Don't create
28548         `klass->methods' here.  
28550 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
28552         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
28553         extension since it does not work with libraries named lib<FOO>.dll.so.
28555 2004-01-25  Martin Baulig  <martin@ximian.com>
28557         * class.c (mono_class_inflate_generic_type): Added support for
28558         MONO_TYPE_GENERICINST.
28560         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
28561         inflate methods on open constructed types.      
28563 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28565         * object.c: fire ProcessExit event in the root AppDomain after running
28566         Main. Fixes bug #53299.
28568 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
28570         * socket-io.c: include the new socket-wrappers.h header.
28571         Use the wrappers instead of the unix socket functions to make the code
28572         more clear.
28574 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
28576         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
28578         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
28579         Fixes #22532.
28581 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
28583         * reflection.c (mono_image_create_pefile): Handle the case when the
28584         entry point is not a MethodBuilder.
28586         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
28587         field to ReflectionMethod since it is not allways a builder.
28589         * reflection.c (type_get_fully_qualified_name): New helper function to
28590         return the fully qualified name of a type.
28592         * reflection.c (encode_marshal_blob): Always emit the fully qualified
28593         type name for custom marshallers.
28595         * reflection.c (mono_marshal_spec_from_builder): Ditto.
28597         * class.c (mono_class_setup_vtable): If a parent class already 
28598         implements an interface, use the implementing methods from that class.
28599         Fixes #53148.
28601 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28603         * threadpool.c: just return instead of ExitThread to allow for thread
28604         clean up earlier.
28606 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
28608         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
28609         when closing resource modules.
28611         * reflection.c (mono_image_create_pefile): Handle the case when the
28612         entry point is not a MethodBuilder.
28614         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
28615         field to ReflectionMethod since it is not allways a builder.
28617 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
28619         * marshal.c (mono_marshal_get_managed_wrapper): 
28620         mono_marshal_alloc takes native int so CONV_I
28621         the arg for 64bits.
28623 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
28625         * reflection.c (fixup_cattrs): New function to fixup the methoddef
28626         tokens in the cattr table. Fixes #53108.
28628 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28630         * loader.c: don't trim ".dll" before looking up in the config file.
28631         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
28633 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
28635         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
28636         Return the module which contains the resource as well.
28637         (ves_icall_System_Reflection_Module_Close): New icall.
28639         * appdomain.c: Bump corlib version number.
28641         * image.c (mono_image_addref): New public function.
28643         * assembly.c: Call mono_image_addref.
28645         * reflection.c (mono_module_get_object): Increase reference count of 
28646         the image.
28648         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
28649         Fixes #22532.
28651         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
28652         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
28653         proper exceptions on DllImport problems.
28655 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
28657         * class.c, metadata.c: eliminate CSIZE macro.
28659 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
28661         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
28662         * object.h: Added async_callback field in MonoAsyncResult.
28663         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
28664         * verify.c: Added async_callback in MonoAsyncResult layout.
28666 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
28668         * reflection.c (mono_reflection_get_custom_attrs): Add support
28669         for Modules.
28671 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
28673         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
28674         marshalling.
28675         (mono_marshal_method_from_wrapper): Add null pointer check.
28677 2004-01-16  Martin Baulig  <martin@ximian.com>
28679         * debug-mono-symfile.h: Set version number to 36 and reflect
28680         latest symbol writer changes.
28682 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
28684         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
28685         multi-dimensional arrays.
28686         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
28687         (mono_class_from_mono_type): Use bounded_array_class_get.
28688         
28689         * class.c (mono_bounded_array_class_get): New function which takes
28690         a 'bounded' bool argument to distinguish vectors from one dimensional
28691         arrays.
28693         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
28694         bounded_array_class_get if the array has bounds.
28696         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
28697         Search modules loaded using AssemblyBuilder:AddModule as well.
28699 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28701         * appdomain.c: increased corlib version.
28702         * filewatcher.c: removed g_print.
28703         * icall.c:
28704         (get_property_info): only allocate what is actually requested.
28705         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
28707 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28709         * Makefile.am: added filewatcher.[ch]
28710         * filewatcher.[ch]: FileSystemWatcher runtime support.
28711         * icall.c: added new FSW icalls.
28713 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
28715         * string-icalls.c: fix stringbuilder regression as suggested by
28716         Iain McCoy <iain@mccoy.id.au>.
28718 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
28720         * process.c (process_read_stringtable_block): Recognize '007f' as
28721         a language neutral stringtable block.
28723 2004-01-12  Patrik Torstensson
28725         * object.h (MonoStringBuilder) : Changed layout to support our
28726         new stringbuilder class.
28727         * marshal.c: Change marshalling to support the new layout of 
28728         string builder.
28729         * appdomain.c: increased version number because new layout of
28730         string builder.
28732 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
28734         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
28735         assembly name as an string instead of an AssemblyName, since it is
28736         easier to extract info from it.
28738         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
28739         the culture subdirectories too. Fixes #52231.
28741 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28743         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
28744         It takes 2 new parameters with an optional name for the method to look
28745         for and case ignoring info.
28747         * threadpool.c: removed unused variable.
28749 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28751         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
28752         It takes 2 new parameters with an optional name for the property to look
28753         for and case ignoring info.
28754         Fixes bug #52753.
28756 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
28758         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
28759         Fix #52451.
28761 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28763         * appdomain.c:
28764         * assembly.c: escape the uri before passing it to g_filename_from_uri.
28765         Fixes bug #52630.
28767 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
28769         * reflection.c: Add support for more than one unmanaged resource.
28771         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
28772         in field->def_value, as done in all other cases.
28774         * reflection.c (mono_reflection_get_custom_attrs): Add support for
28775         TypeBuilders.
28777         * reflection.c (mono_reflection_create_runtime_class): Remove 
28778         errorneous assignment to klass->element_class, since it is already
28779         done in mono_reflection_setup_internal_class.
28781 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28783         * gc.c: added missing LeaveCriticalSection.
28784         * icall.c: indented a couple of lines.
28785         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
28786         if we call EndInvoke inside a callback. Fixes bug #52601.
28788 2004-01-07  Martin Baulig  <martin@ximian.com>
28790         * mono-debug-debugger.h
28791         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
28793 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
28795         * appdomain.c: Use messages in NotImplementedException.
28797         * exception.c (mono_get_exception_not_implemented): Now this takes
28798         a message argument.
28800         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
28801         exception instead of g_asserting an aborting when something is not
28802         implemented.
28804         Add some inline docs.
28806 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
28808         * reflection.h: Update after changes to object layout.
28810         * reflection.c: Implement saving of unmanaged aka win32 resources.
28812         * appdomain.c: Bump version number.
28814         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
28815         Handle missing domains gracefully.
28817 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
28819         * file-io.c : On Windows, there are much more invalid_path_chars.
28821 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
28823         * class.h, object.c: prepare for GetType () speedup.
28825 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
28827         * profiler.c: workaround for --profile null reference exception on
28828           cygwin. Patch by Patrik Torstensson.
28830 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
28832         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
28833         make work for unaligned access.
28835 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
28837         * class.c: small cleanup (class->fields [i] -> field).
28838         * image.c: check address of metadata is valid.
28840 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
28842         * assembly.h assembly.c (mono_assembly_loaded): New public function to
28843         search the list of loaded assemblies.
28845         * reflection.c (mono_reflection_type_from_name): Use 
28846         mono_assembly_loaded instead of mono_image_loaded.
28848         * reflection.c: Fix warnings.
28850 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
28852         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
28853         is dynamic. This is needed since an assembly can contain both dynamic and
28854         non-dynamic images.
28856         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
28857         assembly->dynamic.
28859         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
28861         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
28862         to store modules loaded using AddModule.
28864         * reflection.c (mono_image_fill_file_table): Generalize this so it works
28865         on Modules.
28867         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
28869         * reflection.c (mono_image_fill_export_table_from_module): New function to
28870         fill out the EXPORTEDTYPES table from a module.
28872         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
28873         into a separate function. Also handle loaded non-dynamic modules.
28875         * reflection.c (mono_image_basic_init): Fix memory allocation.
28877         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
28879         * assembly.c (mono_assembly_load_references): Make this public.
28881 2003-12-19  Martin Baulig  <martin@ximian.com>
28883         * class.c (mono_class_initialize_generic): Made this static, take
28884         a `MonoGenericInst *' instead of a `MonoClass *'.
28885         (mono_class_from_generic): Call mono_class_initialize_generic()
28886         unless we're already initialized or being called from
28887         do_mono_metadata_parse_generic_inst().
28889         * class.h (MonoGenericInst): Added `initialized' and
28890         `init_pending' flags.
28892         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
28893         `mono_class_init (gklass)' or mono_class_initialize_generic()
28894         here; set `generic_inst->init_pending' while parsing the
28895         `type_argv'.
28897 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
28899         * locales.c: include string.h for memxxx prototypes
28901 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
28903         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
28904         constructor when accessing literal fields.
28906 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
28908         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
28910         * reflection.c (assembly_add_resource_manifest): New function to fill
28911         the MANIFESTRESOURCE table.
28913         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
28915         * reflection.h: Update to changes in class layout.
28917         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
28918         Reenable call to mono_runtime_is_shutting_down ().
28920         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
28921         determine if the runtime is shutting down.
28923 2003-12-16  Jackson Harper <jackson@ximian.com>
28925         * icall.c: comment out call to mono_runtime_is_shutting_down to
28926         fix build.
28927         
28928 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
28930         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
28931         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
28933 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
28935         * reflection.c: move definition of swap_with_size
28936         to before its first call
28938 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
28940         * appdomain.c (mono_runtime_is_shutting_down): New public function.
28942         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
28943         icall.
28945         * object.c: Fix warnings.
28947         * icall.c (ves_icall_Type_Get...): Only consider inherited static
28948         members if FlattenHierarchy is set.
28950         * reflection.c (mono_image_add_decl_security): New function to emit
28951         declarative security.
28953         * reflection.h reflection.c: Add support for declarative security.
28955         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
28956         
28957 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
28959         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
28960         
28961         * appdomain.c verify.c: Moved corlib version checking into its own
28962         function in appdomain.c since it needs to create vtables etc.
28964 2003-12-13  Patrik Torstensson <p@rxc.se>
28966         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
28967         instead of unwrapped server.
28969 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
28971         * verify.c (check_corlib): Fix field index.
28973 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
28975         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
28976         GetGacPath icall.
28978 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
28980         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
28981         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
28982         cope with sizeof(size_t) != sizeof(guint32).
28984 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28986         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
28987         in case of failure.
28989 2003-12-10  Mark Crichton <crichton@gimp.org>
28991         * icall.c: removed the GetNonZeroBytes.  We now handle this case
28992         in managed code.
28994         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
28996 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
28998         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
28999         marked as deleted.
29001 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
29003         * verify.c (check_corlib): Handle the case when the version field is 
29004         initialized by a static constructor.
29006 2003-12-08  Patrik Torstensson  <p@rxc.se>
29008     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
29010 2003-12-08  Martin Baulig  <martin@ximian.com>
29012         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
29013         a MonoReflectionGenericParameter, also take the parameter index
29014         and name as arguments.
29015         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
29016         (ves_icall_MonoGenericParam_initialize): New interncall.
29017         (ves_icall_Type_make_byref_type): New interncall.
29019         * reflection.h (MonoReflectionGenericParam): Derive from
29020         MonoReflectionType, not just from MonoObject.  Added `refobj' and
29021         `index' fields.
29023         * reflection.c (mono_reflection_define_generic_parameter): Create
29024         and return a new MonoReflectionGenericParam; don't initialize the
29025         constraints here.
29026         (mono_reflection_initialize_generic_parameter): New public method;
29027         initializes the constraints and creates the `param->pklass'.
29029 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
29031         * reflection.h reflection.c: Use the new fields 'num_types', 
29032         'num_fields' and 'num_methods' to track the number of types etc.
29034         * verify.c (check_corlib): Check corlib version number.
29036 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
29038         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
29039         function works on all methods.
29041 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
29043         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
29044         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
29045         the custom_type_info flag of the transparent proxy.
29046         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
29047         objects that supports IRemotingTypeInfo.
29048         * object.h: Added custom_type_info field in transparent proxy.
29050 2003-12-06  Martin Baulig  <martin@ximian.com>
29052         * class.c (mono_class_create_from_generic): Removed.
29053         (mono_class_from_generic): Check `ginst->klass' before doing
29054         anything else.  This is important to fully support "recursive"
29055         generic types.
29057         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
29058         empty `generic_inst->klass' before doing anything else.
29060 2003-12-06  Dick Porter  <dick@ximian.com>
29062         * verify.c: 
29063         * object.h:
29064         * icall.c:
29065         * locales.c: Use C structs to access class fields.  Don't do a
29066         conversion between MonoString and UChar because both are
29067         platform-endian UTF-16.  Compare now takes startindex and count
29068         parameters.  Add a char overload for IndexOf.  Speed up the
29069         invariant string IndexOf.
29071 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
29073         * Makefile.am (monosn_LDADD): Fix parallel build.
29075 2003-12-04  Martin Baulig  <martin@ximian.com>
29077         * icall.c
29078         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
29079         (ves_icall_Type_make_array_type): New interncall.       
29081 2003-12-04  Martin Baulig  <martin@ximian.com>
29083         * locales.c: also change it in the !HAVE_ICU case.
29085 2003-12-04  Dick Porter  <dick@ximian.com>
29087         * icall.c:
29088         * locales.c: construct_compareinfo is now in CompareInfo, not
29089         CultureInfo.
29091 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
29093         * image.c (mono_image_load_file_for_image): Cache loaded images in the
29094         image->files array.
29096         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
29097         table as well.
29099         * assembly.c (mono_assembly_load_references): Only load references
29100         once.
29102         * class.c (mono_class_from_name): Avoid linear search of the 
29103         EXPORTEDTYPE table.
29105         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
29107 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
29109         * image.h (MonoImage): Add 'field_cache' field.
29111         * loader.c (mono_field_from_token): Cache field lookups.
29112         
29113         * reflection.c (mono_module_get_object): Fix name property.
29115         * icall.c (ves_icall_get_enum_info): Update after changes to 
29116         mono_metadata_get_constant_index ().
29118         * icall.c: Get rid of get_type_info icall, use a separate icall for
29119         each type property to avoid needless memory allocations. Fixes #51514.
29121         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
29122         to avoid needless binary searches.
29124         * class.c (class_compute_field_layout): Move the initialization of
29125         field->def_value to mono_class_vtable ().
29127         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
29128         non-corlib types.
29130         * object.c (mono_object_allocate): Make it inline.
29132         * object.c (mono_object_allocate_spec): Make it inline.
29133         
29134 2003-12-02  Dick Porter  <dick@ximian.com>
29136         * locales.c (create_NumberFormat): NumberFormatInfo construction.
29137         Patch by Mohammad DAMT (mdamt@cdl2000.com).
29139 2003-12-01  Dick Porter  <dick@ximian.com>
29141         * threads.c: Fix signature and call in CreateMutex and
29142         CreateEvent.
29144 2003-12-01  Dick Porter  <dick@ximian.com>
29146         * icall.c: 
29147         * locales.c: Implement string compares and searching
29149         * object.h: Add extra Thread field
29151 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
29153         * reflection.c (fixup_method): Add support for MonoCMethod.
29155 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
29157         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
29159         * reflection.c (assembly_name_to_aname): Allow extra characters in
29160         assembly names. Fixes #51468.
29162 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
29164         * exception.c (mono_exception_from_name_domain): New helper function.
29166         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
29167         exception object in the correct domain.
29169         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
29170         formatting + make a copy a the input data.
29172         * loader.c (mono_get_method_from_token): Methods which contain
29173         native code do not have entries in the ImplMap.
29175         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
29176         Thanks to Gonzalo for spotting this.
29177         
29178         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
29179         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
29181         * assembly.h (mono_assembly_load_from): Split the second part of 
29182         assembly loading into a new public function.
29184         * exception.h (mono_get_exception_bad_image_format): New function.
29186 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
29188         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
29189         Enumerate all modules inside a dynamic assembly. Fixes #51293.
29190         
29191         * icall.c: Add new icall for creating dynamic methods.
29193         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
29195         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
29197         * reflection.c (mono_reflection_create_dynamic_method): New icall to
29198         create a dynamic method.
29200         * reflection.c (resolve_object): New helper function.
29202         * reflection.c: Generalize ReflectionMethodBuilder and the functions
29203         which manipulate it so they can also work on dynamic methods.
29205         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
29206         creating the MonoReflectionMethodAux structure if it is not needed.
29207         
29208         * reflection.h verify.c: Update after changes to object layout.
29210         * reflection.c (method_builder_encode_signature): Fix compilation on
29211         gcc 2.95.x.
29213 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
29215         * appdomain.h: Added support for context static fields. Added static_data
29216           field to MonoAppContext and renamed thread_static_fields to a more
29217           generic special_static_fields in MonoAppDomain, since it can now contain
29218           context static fields.
29219         * domain.c: Updated hashtable name.
29220         * object.c: Replaced field_is_thread_static() for a more generic
29221           field_is_special_static() which also checks for context static attribute.
29222           In mono_class_vtable(), added support for static context fields.
29223         * threads.c: Changed methods that manage thread static fields to more
29224           generic methods so they can be reused both for thread and context static
29225           data.
29226         * threads.h: Declared some new methods.
29228 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
29230         * reflection.h: Update after changes to the managed types.
29232         * reflection.c (encode_custom_modifiers): New helper function.
29234         * reflection.c (method_encode_signature): Emit custom modifiers.
29236         * reflection.c (field_encode_signature): Emit custom modifiers.
29238 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
29240         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
29242         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
29243         implementation.
29245         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
29246         icall.
29248         * object.c (mono_field_get_value_object): New function.
29250         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
29251         specific.
29253 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
29255         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
29256         return a preallocated out-of-memory exception instance.
29258         * object.c (out_of_memory): Use the new function.
29260         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
29261         flag is before the custom modifiers. Fixes #49802.
29263 2003-11-16  Martin Baulig  <martin@ximian.com>
29265         * class.c (mono_class_is_open_constructed_type): Implemented the
29266         MONO_TYPE_GENERICINST case.
29268 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
29270         * assembly.c (mono_assembly_fill_assembly_name): New function to
29271         fill out the MonoAssemblyName structure.
29272         (mono_assembly_open): Use the new function.
29274         * icall.c (fill_reflection_assembly_name): New helper function.
29276         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
29277         new function.
29279         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
29281 2003-11-15  Martin Baulig  <martin@ximian.com>
29283         * class.c (mono_class_is_open_constructed_type): New public
29284         function; checks whether a type is an open constructed type,
29285         ie. whether it still contains type parameters.
29286         (mono_class_inflate_generic_type): If we're a type parameter and
29287         the inflated type is also a MONO_TYPE_(M)VAR, return the original
29288         type.
29290         * class.h (MonoGenericInst): Added `guint32 is_open'.
29292         * loader.c (method_from_methodspec): Check whether we're an open
29293         or closed constructed type and set `ginst->is_open'.
29295         * reflection.c (mono_reflection_bind_generic_parameters): Check
29296         whether we're an open or closed constructed type and set
29297         `ginst->is_open'.
29298         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
29299         from open constructed types.
29301 2003-11-15  Martin Baulig  <martin@ximian.com>
29303         * reflection.c (mono_reflection_bind_generic_parameters): If we're
29304         a generic instance (instead of a generic type declaration) with
29305         unbound generic parameters, bind them to our actual types.
29307 2003-11-14  Martin Baulig  <martin@ximian.com>
29309         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
29311         * reflection.c (mono_reflection_bind_generic_parameters): If we're
29312         an interface type, populate `res->interfaces' with instantiated
29313         versions of all the interfaces we inherit.
29315 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
29317         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
29318         when MONO_PATH is set but doesn't contain the install dir.
29320 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29322         * icall.c:
29323         (ves_icall_Type_GetInterfaces): don't return an interface twice when
29324         it's also implemented in base classes. Fixes bug #50927.
29326 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
29328         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
29329         if this method is called from a finalizer. Fixes #50913.
29331 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
29333         * threads.c: Implement VolatileRead/VolatileWrite
29335         * icall.c: Add new icalls for VolatileRead/VolatileWrite
29337 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
29339         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
29340         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
29341         2.95.3.
29343         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
29344         from Peter Ross (pro@missioncriticalit.com).
29345         
29346 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
29348         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
29350 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
29352         * assembly.c (mono_assembly_load_references): Disable check because it
29353         triggers on older corlibs which lots of people have.
29355 2003-11-12  Jackson Harper  <jackson@ximian.com>
29357         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
29358         load corlib.dll if mscorlib.dll is not found.
29359         * assembly.h: Remove corlib name define.
29360         * class.c:
29361         * domain.c:
29362         * image.c: Change corlib name to mscorlib.
29363         
29364 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
29366         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
29368 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
29370         * appdomain.h: Added loader_optimization here to sync with the C#
29371         code, and add disallow_binding_redirects field.
29373 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
29375         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
29377         * reflection.c (mono_image_build_metadata): Fix crash on modules
29378         with no types.
29380         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
29382         * icall.c (ves_icall_get_method_info): Return callingConvention as
29383         well.
29385         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
29386         namespaces from the EXPORTEDTYPE table as well.
29388         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
29389         from all modules inside the assembly.
29390         
29391 2003-11-11  Martin Baulig  <martin@ximian.com>
29393         * reflection.c (mono_reflection_bind_generic_parameters): Make
29394         this work for interfaces.
29396 2003-11-11  Martin Baulig  <martin@ximian.com>
29398         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
29400 2003-11-11  Martin Baulig  <martin@ximian.com>
29402         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
29403         "MonoInflatedMethod" and "MonoInflatedCtor".
29405 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
29407         * reflection.c (resolution_scope_from_image): Use the assembly table
29408         from the manifest module, since other modules don't have it.
29410         * debug-helpers.c (mono_type_full_name): New helper function.
29412         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
29414         * image.c (mono_image_load_file_for_image): New public function which
29415         is a replacement for the load_file_for_image in class.c.
29417         * assembly.c (mono_assembly_load_module): A wrapper for the function
29418         above which does assembly association and reference loading too.
29420         * class.c (mono_class_from_name): Call mono_assembly_load_module.
29422 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29424         * appdomain.c: not all of the attributes for the full assembly name
29425         are required and the order doesn't matter. Fixes bug #50787.
29427 2003-11-10  Dick Porter  <dick@ximian.com>
29429         * locales.c: Use platform-endian UTF16
29431 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
29433         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
29434         
29435 2003-11-10  Martin Baulig  <martin@ximian.com>
29437         * metadata.c
29438         (mono_metadata_load_generic_params): Make this actually work.
29440         * reflection.c (mono_reflection_bind_generic_parameters): If our
29441         parent is a generic instance, pass all the `types' to it, no
29442         matter whether it has the same number of type parameters or not.
29444 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
29446         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
29448         * assembly.c (mono_assembly_load_references): Move the image<->assembly
29449         assignment code to this function so it gets called recursively for all
29450         modules.
29452         * image.c (load_modules): Remove the assembly assignment since it is
29453         now done by mono_assembly_load_references.
29454         
29455         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
29456         Add 'module' argument.
29457         (mono_module_get_types): New helper function.
29458         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
29460 2003-11-08  Martin Baulig  <martin@ximian.com>
29462         * class.c (mono_class_inflate_generic_method): Interface method
29463         don't have a header.
29465         * reflection.c (mono_image_get_methodspec_token): Take an
29466         additional `MonoGenericInst *' argument instead of reading it from
29467         the header; this is necessary to support interfaces.
29468         (mono_image_create_token): Pass the `MonoGenericInst *' from the
29469         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
29470         (inflated_method_get_object): Take an additional `MonoGenericInst *'
29471         argument.
29473         * reflection.h (MonoReflectionInflatedMethod): Added
29474         `MonoGenericInst *ginst'.
29476 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
29478         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
29480 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
29482         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
29484 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
29486         * reflection.c 
29487         (reflection_methodbuilder_from_method_builder):
29488         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
29489         initialize a ReflectionMethodBuilder structure.
29490         (mono_image_get_methodbuilder_token):
29491         (mono_image_get_ctorbuilder_token): New functions to emit memberref
29492         tokens which point to types in another module inside the same assembly.
29494         * reflection.c: Use the new helper functions.
29495         
29496         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
29498         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
29499         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
29501         * reflection.c (resolution_scope_from_image): Emit a moduleref if
29502         neccesary.
29504         * reflection.c (mono_image_build_metadata): Emit metadata only for the
29505         current module. Emit the manifest only for the main module.
29507         * reflection.c (mono_image_create_token): Add assertion when a 
29508         memberref needs to be created.
29510         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
29512         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
29513         larger buffer for the custom attribute blob. Fixes #50637.
29514         
29515 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29517         * threadpool.c: notify listener on async processing handles after
29518         invoking the async callback. Thanks to Zoltan.
29520 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
29522         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
29523         avoid code duplication.
29525         * reflection.h (MonoDynamicImage): New type which is currently unused,
29526         but will be used through the ref.emit code in place of 
29527         MonoDynamicAssembly.
29529         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
29530         object layout.
29532         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
29533         a MonoDynamicImage instead of just a MonoImage.
29534         
29535         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
29536         icalls to ModuleBuilder but keep their semantics, so they will work
29537         with moduleb->assemblyb. This will change later.
29538         
29539 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
29541         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
29542         object layout.
29544         * reflection.c (mono_image_build_metadata): Avoid creation of a default
29545         main module, since it is now done by the managed code.
29547 2003-11-03  Martin Baulig  <martin@ximian.com>
29549         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
29550         `ginst->klass' here.
29551         (method_encode_methodspec): Don't use the `ginst->generic_method's
29552         klass if it's a generic instance, use `ginst->klass' in this case.
29554 2003-11-03  Martin Baulig  <martin@ximian.com>
29556         * reflection.c (mono_image_get_generic_method_param_info):
29557         Removed, use mono_image_get_generic_param_info() instead.
29558         (mono_image_get_type_info): Write the GenericParam table before
29559         the Method table.  This is neccessary because in the GenericParam
29560         table, type parameters of the class (ie. '!0' etc.) must come
29561         before the ones from its generic methods (ie. '!!0' etc).
29563 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
29565         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
29567 2003-11-02  Martin Baulig  <martin@ximian.com>
29569         * reflection.c (create_generic_typespec): Take a
29570         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
29571         the generic parameters from it.
29573 2003-11-02  Martin Baulig  <martin@ximian.com>
29575         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
29576         instead of a `MonoClassField *' since we just need the type.
29577         (create_generic_typespec): New static function.  Creates a
29578         TypeSpec token for a generic type declaration.
29579         (mono_image_get_generic_field_token): New static function.
29580         (mono_image_create_token): If we're a FieldBuilder in a generic
29581         type declaration, call mono_image_get_generic_field_token() to get
29582         the token.
29584 2003-11-02  Martin Baulig  <martin@ximian.com>
29586         * reflection.h
29587         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
29588         `MonoReflectionGenericInst *declaring_type' and
29589         `MonoReflectionGenericInst *reflected_type' fields.
29591         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
29592         `MonoReflectionGenericInst *declaring_type' and a
29593         `MonoReflectionGenericInst *reflected_type' argument instead of a
29594         single `MonoReflectionGenericInst *type' one.  Set
29595         `res->declaring_type' and `res->reflected_type' from them.
29596         (mono_reflection_inflate_field): Likewise.      
29598 2003-11-02  Martin Baulig  <martin@ximian.com>
29600         * class.c (mono_class_setup_vtable): Don't store generic methods
29601         in the vtable.  
29603 2003-11-02  Martin Baulig  <martin@ximian.com>
29605         * reflection.h (MonoReflectionGenericInst): Added
29606         `MonoReflectionType *declaring_type'.
29608         * reflection.c (mono_reflection_bind_generic_parameters): Use
29609         `if (tb->parent)' instead of `klass->parent'.
29611 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
29613         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
29614         with an empty ASSEMBLY table.
29616         * reflection.c (mono_image_build_metadata): Avoid using the same loop
29617         variable in the inner and outer loops.
29619 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
29621         * metadata.h (mono_metadata_make_token): Put parentheses around macro
29622         argument.
29624         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
29625         
29626         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
29627         icalls. Instead, do everything in managed code. This is needed since
29628         it is hard to restore the original domain etc. in unmanaged code in the
29629         presence of undeniable exceptions.
29631         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
29632         New icalls to push and pop appdomain refs.
29634 2003-10-31  Martin Baulig  <martin@ximian.com>
29636         * class.c (inflate_generic_type): Renamed to
29637         mono_class_inflate_generic_type() and made it public.
29639         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
29640         New interncall.
29642         * loader.c (mono_field_from_memberref): Also set the retklass for
29643         typespecs.
29645         * fielder.c (mono_image_get_inflated_field_token): New static
29646         method; creates a metadata token for an inflated field.
29647         (mono_image_create_token, fixup_method): Added support for
29648         "MonoInflatedField".
29649         (fieldbuilder_to_mono_class_field): New static function.
29650         (mono_reflection_inflate_field): New public function.
29652         * reflection.h
29653         (MonoReflectionGenericInst): Added `MonoArray *fields'.
29654         (MonoReflectionInflatedField): New typedef.     
29656 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
29658         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
29659         for Solaris and other platforms without s6_addr16
29661 2003-10-30  Martin Baulig  <martin@ximian.com>
29663         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
29664         argument instead of two.
29665         (mono_class_inflate_generic_signature): Likewise.
29666         (inflate_generic_header): Likewise.
29667         (mono_class_inflate_generic_method): Likewise.  In addition, if
29668         `ginst->klass' is set, it becomes the new `method->klass'.
29670         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
29671         field.
29673         * reflection.c (encode_generic_method_sig): Write a 0xa as the
29674         first byte. [FIXME]
29675         (method_encode_methodspec): If we have generic parameters, create
29676         a MethodSpec instead of a MethodRef.
29677         (fixup_method): Added support for "MonoInflatedMethod" and
29678         "MonoInflatedCtor".
29679         (mono_image_create_token): Added support for "MonoInflatedMethod"
29680         and "MonoInflatedCtor".
29681         (inflated_method_get_object): New static function; returns a
29682         managed "System.Reflection.MonoInflatedMethod" object.
29683         (mono_reflection_bind_generic_method_parameters): Return a
29684         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
29685         (mono_reflection_inflate_method_or_ctor): Likewise.
29686         (mono_image_get_generic_method_param_info): Initialize unused
29687         fields to zero.
29688         (mono_image_get_generic_param_info): Likewise.
29690         * reflection.h (MonoReflectionInflatedMethod): New public
29691         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
29692         "S.R.MonoInflatedCtor" classes.
29694         * loader.c (method_from_memberref): If we're a TypeSpec and it
29695         resolves to a generic instance, inflate the method.
29697 2003-10-28  Dick Porter  <dick@ximian.com>
29699         * object.c (mono_runtime_run_main): Convert command-line arguments
29700         into utf8, falling back to the user's locale encoding to do so.
29702 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
29704         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
29705         at this time.
29707         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
29709         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
29710         up icalls at method definition time. Partially fixes #33569.
29712 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
29714         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
29715         marshalling of arrays. Fixes #50116.
29717         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
29719         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
29720         points to a vtable in the dying appdomain.
29722         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
29723         listeners into unmanaged code inside the lock.
29725         * object.c (mono_class_vtable): Turn off typed allocation in non-root
29726         domains and add some comments.
29728 2003-10-25  Martin Baulig  <martin@ximian.com>
29730         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
29732         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
29734         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
29735         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
29736         currently parsing.  Create the generic class and store it in
29737         `generic_inst->klass' before parsing the type arguments.  This is
29738         required to support "recursive" definitions; see mcs/tests/gen-23.cs
29739         for an example.
29740         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
29741         to support recursive typespec entries.
29743         * class.c (mono_class_setup_parent): If our parent is a generic
29744         instance, we may get called before it has its name set.
29745         (mono_class_from_generic): Splitted into
29746         mono_class_create_from_generic() and mono_class_initialize_generic().
29748 2003-10-25  Martin Baulig  <martin@ximian.com>
29750         * icall.c (ves_icall_Type_BindGenericParameters): Return a
29751         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
29752         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
29753         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
29755         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
29756         (create_typespec): Likewise.
29757         (mono_reflection_bind_generic_parameters): Return a
29758         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
29759         (mono_reflection_inflate_method_or_ctor): New public function.
29761         * reflection.h (MonoReflectionGenericInst): New typedef.        
29763 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
29765         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
29766         inside the domain lock. Fixes #49993.
29767         
29768         * object.c (mono_class_vtable): When typed allocation is used, 
29769         allocate vtables in the GC heap instead of in the mempool, since the
29770         vtables contain GC descriptors which are used by the collector even
29771         after the domain owning the mempool is unloaded.
29773         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
29775         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
29776         reflect what it does. Also invalidate mempools instead of freeing
29777         them if a define is set.
29779         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
29780         of the appdomain.
29781         
29782         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
29783         hold the finalizable objects in this domain.
29785         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
29786         appdomain.
29788         * appdomain.c (mono_domain_set): New function to set the current
29789         appdomain, but only if it is not being unloaded.
29791         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
29792         appdomain which is being unloaded.
29793         
29794         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
29795         unloading of the root appdomain.
29797         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
29798         icall to execute a method in another appdomain. Intended as a 
29799         replacement for InternalSetDomain, which can confuse the code 
29800         generation in the JIT.
29802         * appdomain.c (mono_domain_is_unloading): New function to determine
29803         whenever an appdomain is unloading.
29805         * appdomain.c (mono_domain_unload): New function to correctly unload
29806         an appdomain.
29808         * assembly.c (mono_assembly_load_references): Check that an assembly
29809         does not references itself.
29811         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
29812         domain manually, it asks the finalizer thread to do it, then waits for
29813         the result. Also added a timeout.
29815         * icall.c: Register the new icalls.
29817         * threads.h threads.c: Export the mono_gc_stop_world and 
29818         mono_gc_start_world functions.
29819         
29820         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
29821         function to fill out the mempool with 0x2a.
29823 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
29825         * reflection.h (MonoReflectionMethodAux): New structure to store
29826         information which is rarely used, thus is not in the MonoMethod
29827         structure.
29829         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
29830         store the aux info.
29832         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
29833         and marshalling info into the aux structure.
29835         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
29836         from the aux structure.
29838         * loader.c (mono_method_get_param_names): Retrieve the param names from
29839         the aux structure.
29840         
29841 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
29843         * exception.h exception.c: Add AppDomainUnloadedException && fix 
29844         warning.
29846 2003-10-21  Dick Porter  <dick@ximian.com>
29848         * socket-io.c
29849         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
29850         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
29852 2003-10-21  Martin Baulig  <martin@ximian.com>
29854         * reflection.c (mono_reflection_bind_generic_parameters):
29855         `klass->parent' is NULL for interfaces.
29857 2003-10-21  Martin Baulig  <martin@ximian.com>
29859         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
29861 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
29863         * exception.c (mono_exception_from_name_msg): New helper function for
29864         creating exceptions and initializing their message field.
29866         * exception.c: Simplify functions using the new helper.
29868         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
29869         New function.
29871         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
29872         mono_raise_exception, since otherwise gcc doesn't generate the function
29873         epilog for raise_exception, confusing the stack unwinding in the JIT.
29874         Fixes #45043.
29876         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
29877         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
29878         Fixes #49499.
29880 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29882         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
29883         utf8.
29885 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
29887         * icall.c: Removed GetUninitializedObject method because
29888           AllocateUninitializedClassInstance does the same.
29890 2003-10-18  Martin Baulig  <martin@ximian.com>
29892         * class.c (inflate_generic_signature): Renamed to
29893         mono_class_inflate_generic_signature() and made it public.
29894         (my_mono_class_from_generic_parameter): New static function; if we
29895         don't already have the generic parameter's MonoClass, create a
29896         very simple one which is just used internally in the runtime and
29897         not passed back to managed code.
29899         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
29901         * metadata.h (MonoMethodSignature): Moved the
29902         `MonoGenericParam *gen_params' to the MonoMethodHeader.
29903         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
29905         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
29906         ves_icall_MonoMethod_GetGenericArguments(); this is now an
29907         interncall on the MonoMethod class, not on MethodInfo.
29908         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
29909         calling mono_reflection_bind_generic_method_parameters() directly.
29911         * loader.c (mono_method_get_signature): If this is a MethodSpec;
29912         return the already computed `method->signature'.
29913         (method_from_methodspec): New static function to load a method
29914         from a MethodSpec entry.
29915         (mono_get_method_from_token): Call the new method_from_methodspec()
29916         for MethodSpec tokens.  
29917         (mono_get_method_from_token): If we're a generic method, load the
29918         type parameters.
29920         * reflection.c (mono_image_get_memberref_token): Allow
29921         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
29922         table.
29923         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
29924         (mono_image_create_token): First check whether it's a generic
29925         method (so we'd need to create a MethodSpec), then do the other
29926         two alternatives.
29927         (mono_reflection_bind_generic_method_parameters): Return a
29928         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
29929         called directly from the interncall.
29931 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
29933         * reflection.c (load_public_key): Move loading of the public key
29934         into managed code.
29936         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
29938         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
29939         fields.
29941         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
29942         culture, hash_alg and public_key. Fixes #49555.
29944 2003-10-17  Martin Baulig  <martin@ximian.com>
29946         * class.h (MonoGenericInst): Moved this declaration here and added
29947         `MonoMethod *generic_method'.
29949         * icall.c
29950         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
29951         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
29953         * metadata.c (mono_metadata_type_equal): Two types of
29954         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
29955         index; ie. don't compare the address of the `MonoGenericParam'
29956         structure.
29957         (mono_metadata_load_generic_params): Removed the `MonoMethod
29958         *method' argument.
29960         * metadata.h (MonoGenericInst): Moved declaration to class.h.
29961         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
29963         * reflection.c (method_encode_signature): Encode the number of
29964         generic parameters.
29965         (encode_generic_method_sig): New static function.
29966         (method_encode_methodspec): New static function; creates an entry
29967         in the MethodSpec table for a generic method.
29968         (mono_image_get_methodspec_token): New static function.
29969         (mono_image_create_token): Call mono_image_get_methodspec_token()
29970         for generic methods.
29971         (mono_reflection_bind_generic_method_parameters): New public
29972         function.  Instantiates a generic method.
29974 2003-10-16  Martin Baulig  <martin@ximian.com>
29976         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
29977         *gen_params' here from MonoMethodHeader.
29979         * metadata.c (mono_metadata_parse_method_signature): If we have
29980         generic parameters, initialize `method->gen_params' and then set
29981         the correct `type->data.generic_param' in all the parameters.
29983 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
29985         * threads.c (mono_threads_get_default_stacksize): New function to 
29986         return the default stacksize.
29988         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
29989         termination of the finalizer thread, since the previous method had
29990         race conditions. Fixes #49628.
29992         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
29993         as for the other managed threads.
29995 2003-10-16  Martin Baulig  <martin@ximian.com>
29997         * class.c (inflate_generic_signature): Copy `generic_param_count'
29998         and `gen_params'.
30000         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
30001         New interncall.
30003         * metadata.c (mono_metadata_parse_method_signature): Actually set
30004         the `method->generic_param_count' here.
30005         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
30007 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
30009         * object.h: Add a new field to TypedRef to simplify the implementation
30010         of the REFANY opcodes in the JIT.
30012         * icall.c: Make use of the new field.
30014         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
30015         dynamically.
30017 2003-10-15  Martin Baulig  <martin@ximian.com>
30019         * class.c (mono_class_from_gen_param): Renamed to
30020         mono_class_from_generic_parameter() and moved most of the
30021         functionality from mono_reflection_define_generic_parameter()
30022         here; ie. we create a "real" class here.
30023         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
30024         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
30025         previously been called.
30027         * class.h (MonoGenericParam): Moved the declaration of this struct
30028         here from metadata.h and added `MonoMethod *method'.
30030         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
30031         interncall.
30033         * loader.c (mono_get_method_from_token): If we have any generic
30034         parameters, call mono_metadata_load_generic_params() to read them
30035         from the MONO_TABLE_GENERICPAR.
30037         * metadata.c (mono_metadata_load_generic_params): Added
30038         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
30040         * metadata.h (MonoMethodSignature): Replaced
30041         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
30042         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
30044         * reflection.c (mono_reflection_define_generic_parameter): Moved
30045         most of the functionality into the new
30046         mono_class_from_generic_parameter(); set the `method' field if
30047         we're a method parameter.       
30049 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
30051         * marshal.c (emit_struct_conv): if native size is 0
30052         emit no code.
30054 2003-10-14  Martin Baulig  <martin@ximian.com>
30056         * icall.c: The generics API has changed in the spec since it was
30057         added to System.Type; these modifications make it match the spec
30058         again.
30059         (ves_icall_Type_GetGenericParameters): Renamed to
30060         `ves_icall_Type_GetGenericArguments'.
30061         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
30062         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
30063         `ves_icall_MonoType_get_HasGenericArguments'.
30064         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
30065         `ves_icall_MonoType_get_IsGenericParameter'.
30066         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
30067         this is no interncall anymore.
30068         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
30069         `ves_icall_TypeBuilder_get_IsGenericParameter'.
30071 2003-10-14  Martin Baulig  <martin@ximian.com>
30073         * reflection.c (mono_reflection_bind_generic_parameters): Also
30074         inflate generic methods if we're reading the class from IL.
30076 2003-10-13  Martin Baulig  <martin@ximian.com>
30078         * reflection.c (mono_reflection_define_generic_parameter): This
30079         method isn't called directly from the icall anymore; take a
30080         `MonoReflectionAssemblyBuilder *' so we can use this for type and
30081         method generic parameters.
30082         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
30083         (method_builder_encode_signature): Encode generic parameters.
30084         (mono_image_get_method_info): Write generic params to the
30085         MONO_TABLE_GENERICPARAM table.
30087         * reflection.h (MonoReflectionMethodBuilder): Added
30088         `MonoArray *generic_params'.
30090         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
30092         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
30093         wrapper for mono_reflection_define_generic_parameter().
30094         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
30096 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
30098         * marshal.h: Add missing function to fix build.
30100         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
30101         the SetLastError pinvoke attribute.
30103         * marshal.c (mono_marshal_set_last_error): New helper function called
30104         by the generated code.
30105         
30106         * marshal.c (mono_mb_emit_branch): New helper function.
30108         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
30110         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
30111         classes as parameters and return values of delegates. Fixes #29256. 
30113 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
30115         * locales.c: use gint32 in non HAVE_ICU case
30117 2003-10-11  Martin Baulig  <martin@ximian.com>
30119         * mono-debug.c (mono_debug_add_method): Added a workaround for
30120         bug #48591.
30122 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
30124         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
30125         delegates passed to native code must use the STDCALL calling 
30126         convention. Fixes #35987.
30128 2003-10-10  Martin Baulig  <martin@ximian.com>
30130         * class.c (inflate_generic_type): If we're inflating for a generic
30131         type instance (and not for a generic method), return
30132         MONO_TYPE_MVAR unchanged.
30134 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30136         * string-icalls.c: Join ignores null strings in the source array.
30137         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
30138         * threads.c: GetAvailableTheads is slightly more accurate.
30140 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
30142         * threads.h threads.c : add mono_threads_set_default_stacksize
30143         and pass default to CreateThread calls.
30145 2003-10-09  Dick Porter  <dick@ximian.com>
30147         * icall.c:
30148         * locales.h:
30149         * locales.c: Internal calls for constructing CultureInfo and
30150         related objects from libicu (if its available.)
30152 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
30154         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
30156 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30158         * threadpool.c: added an argument to async_invoke_thread that is the
30159         item to process, pass the MonoAsyncResult to the thread start function
30160         when creating a new thread. This way we don't need to acquire any lock
30161         when we're creating a new thread. Readded a semaphore for faster
30162         response times (instead of that Sleep i added).
30164 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
30166         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
30167         get daylight change dates better on Windows, fix handling
30168         of platforms without tm_gmtoff.
30170 2003-10-06  Martin Baulig  <martin@ximian.com>
30172         * class.c (inflate_generic_method): Renamed to
30173         mono_class_inflate_generic_method() and made public.
30174         (mono_class_init): Don't inflate the generic methods here.
30175         (mono_class_from_generic): Added `gboolean inflate_methods'
30176         argument.  Inflate the methods here.
30178         * loader.c (mono_method_get_param_names): Ignore instances of
30179         generic types for the moment.
30181         * reflection.c (fixup_method): Added support for inflated methods.
30182         (mono_image_create_token): Use mono_image_get_methodref_token()
30183         for inflated methods.
30184         (mono_custom_attrs_from_param): Ignore instances of generic types
30185         for the moment.
30186         (mono_reflection_bind_generic_parameters): New public function.
30187         Moved all the functionality from
30188         ves_icall_Type_BindGenericParameters() here and added support for
30189         dynamic types.
30190         (mono_reflection_define_generic_parameter): Initialize
30191         `klass->methods' here.
30193         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
30194         functionality into mono_reflection_define_generic_parameter().
30195         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
30196         TypeBuilder, return that TypeBuilder.
30198 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30200         * appdomain.c: removed mono_delegate_semaphore.
30202         * threadpool.c:
30203         (mono_thread_pool_add): moved hash table creation inside and the thread 
30204         creation outside of the critical region.
30205         (mono_thread_pool_finish): removed obsolete code.
30206         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
30207         continue or exit the thread depending on the queue.
30209 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
30211         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
30212         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
30213         handle more bool marshalling options
30215 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
30217         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
30218         arrays of structs. Also add a more descriptive error message when
30219         a structure member is marshalled as LPArray.
30221 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
30223         * marshal.c (mono_marshal_get_native_wrapper): Add support for
30224         marshalling arrays of complex types. Fixes #29098. Also remove an
30225         usused and incomplete function.
30227 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
30229         * gc.c: report heap_size - free_bytes as total memory allocated
30230         (bug#49362).
30232 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
30234         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
30235         fix timezone handling problems on Windows.
30236         
30237         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
30238         asserts when the year is outside the range handled by ms the functions.
30240         * class.c (setup_interface_offsets): If the class is an interface,
30241         fill out its interface_offsets slot.
30243 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30245         * threadpool.c: mark threadpool threads as background.
30247 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
30249         * decimal.c - define DECINLINE to nothing if not using GCC
30251 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
30253         * assembly.c: More refcount fixes.
30255 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30257         * string-icalls.c: if we're not trimming, return the same string.
30258         When not splitting, don't create a new string.
30260 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30262         * image.c:
30263         (mono_image_open): increment the ref_count inside the critical section.
30265 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
30267         * image.c (mono_image_open): Fix reference counting bug.
30269 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
30271         * marshal.c (mono_marshal_type_size) struct alignment changed for 
30272         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
30273         64bits. Avoid leak in mono_marshal_get_native_wrapper when
30274         mono_lookup_pinvoke_call throws.        
30276 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
30278         * reflection.c (mono_reflection_parse_type): Fix #49114.
30280         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
30281         temporary workaround for cygwin header problem.
30283         * object.c (mono_object_isinst): Synchronize this with the code
30284         generated by the JIT for casts.
30286 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
30288         * reflection.c (encode_type): Fix #38332.
30290 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
30292         * marshal.c (mono_marshal_method_from_wrapper): New function to return
30293         the original method from the wrapper method.
30295 2003-09-25  Martin Baulig  <martin@ximian.com>
30297         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
30298         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
30299         (ves_icall_Type_get_IsGenericInstance): New interncall.
30301 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
30303         * object.c: fix cast warning in big endian code.
30305 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
30307         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
30308         
30309 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30311         * assembly.c: don't call check_env from mono_assembly_load. It's
30312         already done once in mono_assemblies_init and may cause headaches when
30313         multiple threads are loading assemblies.
30315 2003-09-19  Martin Baulig  <martin@ximian.com>
30317         * reflection.c (mono_reflection_define_generic_parameter): Don't
30318         allocate `klass->methods', set `klass->flags' to
30319         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
30321 2003-09-18  Martin Baulig  <martin@ximian.com>
30323         * class.c (mono_class_init): Don't create `class->methods' if it's
30324         already initialized.
30326         * metadata.c (mono_metadata_load_generic_params): Make this
30327         actually work.
30329         * reflection.c (mono_reflection_define_generic_parameter): Set
30330         parent class and interfaces from the constraints.
30332         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
30333         to keep this struct in sync with the declaration in TypeBuilder.cs.
30335 2003-09-17  Martin Baulig  <martin@ximian.com>
30337         * metadata.h (MonoType): Replaced the data's `int type_param'
30338         field with `MonoGenericParam *generic_param'.
30339         (MonoGenericParam): Added `MonoClass *klass'.
30341         * class.c (mono_class_from_gen_param): Removed the
30342         `MonoImage *image' and `int type_num' arguments.
30344         * metadata.c (mono_metadata_parse_generic_param): New static
30345         method; creates a MonoGenericParam which just contains the index.
30346         (do_mono_metadata_parse_type): Call
30347         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
30348         MONO_TYPE_MVAR.
30350         * reflection.c (mono_image_typedef_or_ref): Generic type
30351         parameters may be in the same assembly, but never use a typedef
30352         for them.
30353         (mono_reflection_define_generic_parameter): We're now creating a
30354         "real" class for the type parameter; it's now safe to call
30355         mono_class_from_mono_type() on the class'es type, it'll do the
30356         right thing.
30358 2003-09-16  Martin Baulig  <martin@ximian.com>
30360         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
30361         `symfile->range_entry_size' and `symfile->class_entry_size' here;
30362         the `symfile' data structure must be fully initialized before it
30363         gets added to the table.
30365 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
30367         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
30369         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
30370         class init trampolines.
30372 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
30374         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
30375         to the built-in profiler to turn off time and allocation profiling
30376         respectively.
30378 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
30380         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
30381         g_direct_equal.
30383         * debug-helpers.c (mono_method_full_name): Print the wrapper type
30384         in human readable form.
30386 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
30388         * reflection.c icall.c: Fixed warnings.
30390         * image.c (load_class_names): Use a temporary hash table to hold the
30391         namespaces in order to avoid doing many string comparisons.
30393         * image.h: Fix typo.
30395         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
30396         Pass NULL instead of g_direct_equal to the GHashTable constructor 
30397         since the NULL case is short-circuited inside g_hash_table_lookup, 
30398         leading to better performance.  
30400         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
30401         obtain the first custom attribute for a given index. Depends on the
30402         CustomAttribute table being sorted by the parent field.
30404         * reflection.c (mono_custom_attrs_from_index): Use the new function 
30405         for better performance.
30407 2003-09-07  Martin Baulig  <martin@ximian.com>
30409         * class.c (mono_class_init): If we're a generic instance, inflate
30410         all our methods instead of loading them from the image.
30411         (mono_class_from_generic): Set `class->methods = gklass->methods'.
30413 2003-09-07  Martin Baulig  <martin@ximian.com>
30415         * mono-debug-debugger.c: Added support for constructors.
30417 2003-09-06  Martin Baulig  <martin@ximian.com>
30419         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
30420         New interncall.
30422         * reflection.c (mono_reflection_setup_generic_class): Call
30423         ensure_runtime_vtable() to create the vtable.
30425 2003-09-05  Martin Baulig  <martin@ximian.com>
30427         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
30428         MONO_TYPE_MVAR.
30430 2003-09-04  Martin Baulig  <martin@ximian.com>
30432         * reflection.c (mono_reflection_define_generic_parameter): Generic
30433         parameters start with zero.
30435 2003-09-04  Martin Baulig  <martin@ximian.com>
30437         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
30439         * reflection.h (MonoReflectionGenericParam): New typedef.
30440         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
30441         the generic parameters from the managed TypeBuilder.
30443         * reflection.c (mono_reflection_define_generic_parameter): New function.
30444         (mono_reflection_create_runtime_class): Encode generic parameters.
30445         (mono_reflection_setup_generic_class): New function; this is
30446         called after adding adding all generic params to the TypeBuilder.
30447         (encode_type): Added MONO_TYPE_VAR.
30449 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
30451         * class.h class.c (mono_class_needs_cctor_run): Moved this method
30452         here from the JIT.
30454         * assembly.h assembly.c: Moved the AOT loading code into an assembly
30455         load hook.
30457 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
30459         * reflection.h reflection.c class.h class.c: Delete duplicate 
30460         definition of mono_type_get_name () from reflection.c and export the
30461         one in class.c.
30463         * class.c: Class loading fixes from Bernie Solomon 
30464         (bernard@ugsolutions.com).
30466         * reflection.c: Endianness fixes from Bernie Solomon 
30467         (bernard@ugsolutions.com).
30468         
30469 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
30471         * assembly.h assembly.c: Define a file format version for AOT
30472         libraries.
30473         
30474         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
30476         * appdomain.h (MonoJitInfo): New field to determine whenever the
30477         code is domain neutral.
30478         
30479 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
30481         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
30483 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
30485         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
30486         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
30487         Avoid caching the result since strings must be domain specific. Fixes
30488         #48050.
30490 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
30492         * marshal.c (mono_marshal_init): Make this callable multiple times
30493         since it is hard to find a correct place to call it.
30495         * object.c (mono_runtime_class_init): Execute static constructors in
30496         the correct appdomain.
30498         * image.c (build_guid_table): Handle the case when multiple images have
30499         the same GUID.
30501 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30503         * icall.c: added a couple of icalls for System.Web.
30505 2003-08-28  Martin Baulig  <martin@ximian.com>
30507         * icall.c (ves_icall_Type_BindGenericParameters): Use
30508         `klass->generic_inst' instead of `&klass->byval_arg' in the
30509         mono_type_get_object() call.  The returned type must be
30510         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
30512 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
30514         * NOTES: New file.
30516         * object.c (mono_class_proxy_vtable): Make it thread safe.
30518         * pedump.c: Fix warning.
30520         * object.c appdomain.h: Get rid of metadata_section. 
30521         It is no longer needed and it was causing deadlocks with domain->lock.
30523         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
30525 2003-08-26  Martin Baulig  <martin@ximian.com>
30527         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
30529 2003-08-26  Martin Baulig  <martin@ximian.com>
30531         * pedump.c (main): Call mono_metadata_init(),
30532         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
30533         and mono_loader_init().
30535 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
30537         * loader.h: Add missing include to fix build.
30539         * image.h: mono_image_load_references is no more.
30541         * assembly.c: Reworked assembly loading to make it really thread safe.
30542         After these changes, the assembly returned by mono_assembly_open is
30543         fully initialized, i.e. all its references assemblies are loaded.
30545         * assembly.c (mono_image_load_references): Renamed to 
30546         mono_assembly_load_references, and made private, since clients no
30547         longer need to call it.
30549         * class.c: Removed calls to mono_assembly_load_references, since it was
30550         a source of deadlocks.
30552         * loader.h loader.c class.h class.c: Protect data structures using a 
30553         new lock, the loader lock.
30555         * class.c (mono_class_setup_vtable): Create temporary hash tables and
30556         GPtrArrays only when needed.
30558         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
30559         into empty structures by mcs. Fixes pinvoke7.cs.
30560         
30561         * domain.c (mono_init): Call a new initialization function.
30563         * appdomain.c (mono_runtime_init): Call the new initializer function
30564         of the marshal module.
30566         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
30567         inserted into empty structures by mcs. Fixes pinvoke7.cs.
30569         * marshal.h marshal.c: Added locks around the wrapper caches to make
30570         this module thread safe.
30572         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
30573         this argument. Fixes pinvoke1.exe.
30575 2003-08-25  Lluis Sanchez <lluis@ximian.com>
30577         * object.h: Added call_type field to MonoMethodMessage and the corresponding
30578         enumeration of values. Removed fields to store remote call output values in
30579         MonoAsyncResult. Not needed any more.
30580         * object.c: Initialize call_type and async_result fields in mono_message_init.
30581         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
30582         dispatching the message.
30583         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
30584         async call to finish. To do it use a message with EndInvoke call type.
30586 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
30588         * loader.h loader.c (mono_method_hash_marhal_info): New function which
30589         determines whenever a method has marshalling info.
30591 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30593         * assembly.c: fix the build on windows.
30595 2003-08-22 Lluis Sanchez <lluis@ximian.com>
30597         * object.cs: Fixed bug #47785.
30599 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
30601         * string-icalls.c (StringReplace): If their are no occurances of
30602         the old string found return a reference to the supplied
30603         string. This saves some memory and matches MS behavoir.
30604         
30605 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30607         * socket-io.c: fixed compilation for systems that define AF_INET6
30608         and don't define SOL_IP/SOL_IPV6.
30610 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
30612         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
30613         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
30615         * rawbuffer.c rawbuffer.h: Make this module thread safe.
30617         * domain.c: Make this module thread safe.
30619         * domain.c (mono_init): Call new initialization function.
30621         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
30622         reference types too. Fixes #38812.
30624         * image.c (mono_image_init): Fixed warnings.
30626         * class.c (mono_class_from_typeref): Handle assembly load failure
30627         correctly.
30629         * appdomain.c (add_assemblies_to_domain): Handle the case when
30630         the references of an assembly are not yet loaded.
30632         * metadata.c image.c assembly.c: Moved initialization of global
30633         variables to a separate function called at startup since lazy 
30634         initialization of these variables is not thread safe.
30635         
30636         * image.c assembly.c: Made this module thread safe by adding locks in 
30637         the appropriate places.
30639         * domain.c (mono_init): Call the new initialization functions of the
30640         three modules.
30642 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
30644         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
30645           make a direct call. It is proxy's work to make the call asynchronous.
30646           mono_delegate_end_invoke(): If the targe is a proxy, just collect
30647           the return values.
30648         * object.cs: mono_method_call_message_new(): read AsyncResult and
30649           state object from parameters list, if this info is requested.
30650         * object.h: Added fields to store remote call output values in
30651           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
30653 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
30655         * object.h: add needed fields to MonoThread.
30656         * threads.c, threads.h: allow registering a function to cleanup data
30657         allocated per thread by the JIT.
30659 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
30661         * loader.h: portability fix by Bernie Solomon
30662         * <bernard@ugsolutions.com>.
30664 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
30666         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
30667         return a MonoArray. This simplifies the code and also ensures that
30668         the cache allways contains an object reference as a value.
30670         * icall.c (ves_icall_get_parameter_info): Simplified using the new
30671         function.
30673 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30675         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
30676         fixes a problem with byte ordering when getting the address family for
30677         a socket.
30679 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
30681         * .cvsignore: Added monosn.
30683         * reflection.h reflection.c loader.c: Added support for parameter
30684         marshalling to dynamically created types. Fixes #47295.
30686 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
30688         * rand.c: remove useless warnings.
30690 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
30692         * class.c: implemented ldtoken for methods and fieldrefs.
30694 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30696         * threadpool.c: when mono_async_invoke was called, no one took care of
30697         monitoring the queue. So if the method invoked took some time and we
30698         got new async invoke requests after 500 ms (the thread created waited
30699         that long in WaitForSingleObject), the new async invoke was not called
30700         until the previous one finished.
30702         This is fixed now. Thanks to Totte for helping with it.
30704 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30706         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
30708 2003-08-11  Martin Baulig  <martin@ximian.com>
30710         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
30712 2003-08-06  Martin Baulig  <martin@ximian.com>
30714         * mono-debug-debugger.c: Added support for static fields,
30715         properties and methods.
30717 2003-08-06  Martin Baulig  <martin@ximian.com>
30719         * mono-debug-debugger.c: Don't store the MonoString's vtable to
30720         make this work for applications with multiple application domains.
30722 2003-08-04  Martin Baulig  <martin@ximian.com>
30724         * mono-debug-debugger.c: Completely reworked the type support; the
30725         most important thing is that we're now just using one single
30726         `MonoType' instance per type.
30728 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
30730         * mono-endian.h, mono-endian.c, icall.c: Added icall
30731         ves_icall_System_Double_AssertEndianity to assert double word endianity
30732         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
30734 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30736         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
30737         support, icalls and fixes.
30739 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
30741         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
30742         classes that are a punctuation character in .NET is not the same a
30743         g_unichar_ispunct.
30745 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
30747         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
30749 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
30751         * icall.c: Add new MemCopy internalcall.
30752         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
30753         Simplified code; It is not necessary to handle all the cases here,
30754         as the C# code takes care of it.  Only handle the case of the name
30755         resource embedded into the assembly.
30757         Changed signature to return the data pointer and the size of the
30758         data. 
30760 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
30762         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
30763         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
30765 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
30767         * socket-io.c: ignore EINTR error in select.
30769 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
30771         * class.h, class.c: removed unused subclasses field in MonoClass.
30773 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
30775         * icall.c: improve fix of get_base_definition(). If the parent class
30776           doesn't have the mehod, look at the parent of the parent.
30777         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
30778           to check if a parameter is an in or out parameter
30779           (PARAM_ATTRIBUTE_IN is not set by default).
30780           mono_method_return_message_restore(): Use mono_class_value_size to
30781           get the size of a value type. mono_type_stack_size (parameterType)
30782           does not return the correct value if parameterType is byRef.
30783           mono_load_remote_field(), mono_load_remote_field_new(),
30784           mono_store_remote_field(), mono_store_remote_field_new():
30785           raise exception if the remote call returns an exception.
30787 2003-07-28  Martin Baulig  <martin@ximian.com>
30789         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
30790         method.  This is a wrapper around mono_runtime_invoke() which
30791         boxes the instance object if neccessary.
30793 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30795         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
30796         metadata.h, row-indexes.h, verify.c: first cut of generics support.
30798 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30800         * icall.c: disable mcs bug workaround.
30802 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
30804         * object.c (mono_runtime_class_init): Take the metadata_section
30805         mutex before obtaining the domain mutex.
30807         * appdomain.h: Added definition of metadata_section mutex here. 
30809         * object.c: define metadata_mutex here.
30811 2003-07-24  Ravi Pratap  <ravi@ximian.com>
30813         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
30814         fixed.
30816 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
30818         * reflection.c: Fix bug #46669
30820 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30822         * exception.c:
30823         * exception.h:
30824         * icall.c:
30825         * object.h: fill in the type name for TypeLoadException.
30827 2003-07-23  Ravi Pratap  <ravi@ximian.com>
30829         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
30830         relationship between TypeBuilders while compiling corlib) and bug
30831         45993 (Array types returned from the runtime while compiling
30832         corlib were from the loaded corlib).
30834 2003-07-22  Martin Baulig  <martin@ximian.com>
30836         * mono-debug-debugger.c: Reworked the type support a bit more;
30837         distinguish between types and classes.
30839 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
30841         * icall.c: add IsArrayImpl icall.
30843 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
30845         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
30846         initializing real_size only once. Also fix bug #46602.
30848 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
30850         * object.c: Renamed mono_metadata_section to metadata_section.
30852 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
30854         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
30855           empty array if the type is an array. Fixed.
30856           ves_icall_MonoMethod_get_base_definition: if the base method
30857           is abstract, get the MethodInfo from the list of methods of
30858           the class.
30859         * reflection.c: ParameterInfo.PositionImpl should be zero-based
30860           and it was 1-based. Fixed in mono_param_get_objects.
30862 2003-07-20  Martin Baulig  <martin@ximian.com>
30864         * mono-debug.h: Set version number to 31.
30865         (mono_debug_init): Added `MonoDomain *' argument.
30867         * mono-debug-debugger.c: Reworked the type support; explicitly
30868         tell the debugger about builtin types; pass the `klass' address to
30869         the debugger.
30871 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
30873         * image.c: Allow new metadata tables to be loaded without a
30874         warning. Also update the warning message to give the new constant value.
30875                 
30876 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
30878         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
30879         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
30880         array type representation changes.
30882 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
30884         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
30885         on Environment.Exit () call.
30887 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
30889         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
30890         requires a matching corlib.
30892 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
30894         * Changelog: My editor decided to add a CR to each line. Sorry about that.
30895           Committed again without the CRs.
30896         
30897 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
30899         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
30900           getting it from the "this" socket instance. Did not work
30901           if the socket is a subclass of Socket.
30902           Also fixed bug #35371.
30904 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
30906         * metadata.c: fixed size for TypedByRef.
30907         * loader.c: when searching for a method, consider the vararg amrker.
30908         * unicode.c, decimal.c: constify some arrays.
30910 2003-07-15  Dick Porter  <dick@ximian.com>
30912         * socket-io.c: Fixed compilation for gcc < 3.2.
30914         Fixed compilation for machines that don't have AF_INET6 (thanks to
30915         Bernie Solomon <bernard@ugsolutions.com> for that part.)
30917         Fixed compile warnings.
30918         
30919         Fixed formatting and line endings.
30921 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
30923         * socket-io.h:
30924         * socket-io.c: Added IPv6 support.
30926 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
30928         * class.c (mono_class_is_assignable_from): New function to implement
30929         the is_assignable_from logic. Used by mono_object_isinst, 
30930         Type::IsAssignableFrom () and the interpreter.
30932         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
30933         Object, even interfaces.
30934         
30935         * object.c (mono_object_isinst): Implement in terms of 
30936         is_assignable_from.
30938         * icall.c (ves_icall_type_is_assignable_from): New icall.
30940 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
30942         * domain.c (foreach_domain): fix compiler warning.
30944 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
30946         * image.c (load_metadata_ptrs): use g_strndup because strndup is
30947         not available on all plattforms
30949 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
30951         * image.h image.c: Store the metadata version string in MonoImage.
30952         * icall.c: New icall to retrieve the image version.
30953         * reflection.c (create_dynamic_image): Fill in the image version field
30954         * reflection.c (build_compressed_metadata): Use the image version
30955         from the image structure.
30957 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30959         * appdomain.c: modified comment.
30960         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
30961         That will be its last iteration when mono_gc_cleanup is called from
30962         mono_runtime_cleanup and before the domain is unloaded.
30964         Fixes bug #45962.
30966 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
30968         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
30969         attributes.
30971 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30973         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
30974         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
30975         Bernie Solomon <bernard@ugsolutions.com>.
30977 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
30979         * object.c, object.h: provide mono_object_new_fast() for faster
30980         allocation in some special cases.
30982 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
30984         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
30985         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
30987 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
30989         * threadpool.c: fix leaks.
30991 2003-07-01  Dick Porter  <dick@ximian.com>
30993         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
30994         using MonoGHashTables.  Fixes threadpool bug posted to list.
30996 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
30998         * image.h, image.c: added support to load an assembly from a byte array.
30999         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
31000         assembly bundle support.
31002 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
31004         * threadpool.c (mono_thread_pool_add): keep a reference to the
31005         AsyncResult to prevent GC
31007 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
31009         * class.c: leak fix.
31011 2003-06-25  Dick Porter  <dick@ximian.com>
31013         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
31014         for the async object, the WaitHandle object will close the handle.
31015         Fixes bug 45321.
31017 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
31019         * class.c: in mono_array_class_get (), lookup from the hash with the
31020         same type we insert: this works around a bug in
31021         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
31022         lluis. The real fix will have to wait for after the release.
31024 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
31026         * icall.c: fix memory leak when getting type members.
31028 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
31030         * reflection.c: added more pubtoken special cases.
31032 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
31034         * class.c: handle field offset correctly when class size
31035         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
31037 2003-06-20  Martin Baulig  <martin@ximian.com>
31039         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
31040         *image' field.
31042 2003-06-20  Martin Baulig  <martin@ximian.com>
31044         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
31046 2003-06-20  Martin Baulig  <martin@ximian.com>
31048         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
31049         just distinguish between variables in registers and variables at
31050         an offset relative to a register.
31052 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31054         * icall.c: #ifdef out latest changes until mcs is fixed.
31056 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
31058         * icall.c: return members in metadata order.
31060 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
31062         * icall.c: avoid infinite loop in GetTimeZoneData.
31064 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
31066         * icall.c: added Marshal.Prelink/All icalls.
31068 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
31070         * object.c, object.h: fix warnings and do some overflow checking
31071         when creating arrays.
31073 2003-06-17  Dick Porter  <dick@ximian.com>
31075         * file-io.h:
31076         * file-io.c: File attributes need to be tweaked slightly when
31077         passed from the managed to the w32 world.
31079 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
31080         * profiler.h profiler-private.h profiler.c: Rework last patch
31081         based on suggestion by Paolo.
31082         
31083 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
31085         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
31086         instruction level coverage data collection.
31087         * profiler.h profiler.c (: Added new callback function which can be
31088         used by the profiler to limit which functions should have coverage
31089         instrumentation.
31090         * profiler.c (mono_profiler_load): Call g_module_build_path to
31091         generate the file name of the profiler library.
31093 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
31095         * profiler.c, profiler.h, profiler-private.h: added basic block 
31096         coverage profiling API.
31098 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
31100         * reflection.c (mono_reflection_create_runtime_class): Add support
31101         for events in dynamically generated code.
31103         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
31104         not allocated.
31106 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
31108         * icall.c: when getting timezone info, return reasonable values if we
31109         can't get the actual data.
31111 2003-06-14  Dick Porter  <dick@ximian.com>
31113         * threads.c (start_wrapper): Remove the reference to the thread
31114         object in the TLS data, so the thread object can be finalized.
31115         This won't be reached if the thread threw an uncaught exception,
31116         so those thread handles will stay referenced :-( (This is due to
31117         missing support for scanning thread-specific data in the Boehm GC
31118         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
31120 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
31122         * reflection.c: ensure streams and tables are first allocated with
31123         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
31125 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
31127         * icall.c: fixed GetElementType for byrefs (bug# 44792).
31129 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
31131         * reflection.c (mono_reflection_create_runtime_class): Add support for
31132         properties to dynamically created classes.
31133         * reflection.c: Fix a few places where non-MonoObjects were inserted
31134         into the tokens hashtable.
31136 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31138         * object.c: some support to handle out of memory exceptions.
31140 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
31142         * marshal.c (mono_marshal_get_native_wrapper): support reference
31143         return types
31145 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
31147         * object.h, object.c: more portability stuff from Bernie Solomon.
31148         Unexport mono_object_allocate(). Added mono_object_unbox ().
31149         Set exitcode when an unhandled exception is thrown.
31151 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
31153         * marshal.c (mono_marshal_get_native_wrapper): use custom
31154         marshaler for return types.
31156 2003-06-10  Dick Porter  <dick@ximian.com>
31158         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
31159         ip_mreq is available
31161 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
31163         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
31164         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
31165         by Bernie Solomon <bernard@ugsolutions.com>.
31167 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
31169         * gc.c (mono_gc_init): Avoid error message on shutdown when
31170         GC_DONT_GC=1 is used.
31172         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
31173         New icall to return the GUID of a module.
31175 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
31177         * class.c: ensure instance size always includes the parent's size
31178         even whem class size is set explicitly (fixes bug#44294).
31180 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
31182         * profiler.h, profiler.c: made the simple profiler thread-safe,
31183         get more accurate timing info. Allow the loading of an
31184         externally-developed profiler module.
31186 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
31188         * marshal.c (mono_marshal_get_native_wrapper): improved
31189         class/byref arguments.
31190         (mono_marshal_get_native_wrapper): better string marshaling support.
31192 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
31194         * class.c: ensure .pack and .size are handled correctly and
31195         simplified layout of static fields.
31197 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
31199         * appdomain.c
31200         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
31202         * loader.c (mono_lookup_pinvoke_call): look for modules in the
31203         current directory (fix bug 44008)
31205 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
31207         * marshal.c (mono_marshal_get_native_wrapper): started support for
31208         custom marshalers.
31209         (mono_delegate_to_ftnptr): consider marshalling specifications
31211 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
31213         * reflection.c, reflection.h: emit custom marshal info.
31215 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31217         * object.c: free the GError.
31218         * icall.c: added CloseEvent_internal.
31219         * threads.[ch]:
31220         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
31221         call.
31223 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
31225         * loader.c (mono_method_get_signature): Add support for dynamic
31226         assemblies.
31228 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
31230         * reflection.c: fixed bug #43905.
31232 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
31234         * class.c, domain.c, icall.c, metadata.h, object.h: support for
31235         handling TypedReference and ArgIterator.
31236         * loader.c, loader.h: added function to get signature at call site.
31238 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31240         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
31241         data readonly. Buglets and warning fixes. Some MethodSpec support.
31243 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
31245         * class.h, class.c, object.c: remove relative numbering support.
31247 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
31249         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
31250         free the string, until we get a chance to fix Gtk#
31252 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31254         * marshal.c: revert last patch.
31256 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
31258         * icall.c: updates for new mono_class_vtable() not calling
31259         the type constructor anymore.
31261 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
31263         * object.h, object.c: separate vtable creation from type
31264         initialization. Make running the .cctor thread safe.
31266 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
31268         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
31270 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
31272         * loader.c (mono_get_method): consider calling convention
31274 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
31276         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
31277         to return the invisible global type for a module.
31279         * reflection.c (mono_image_build_metadata): Emit global fields too.
31281 2003-05-20  Peter Williams  <peterw@ximian.com>
31283         * loader.c (mono_lookup_internal_call): Add a few newlines.
31285 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
31287         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
31288         literal strings.
31290         * appdomain.c (set_domain_search_path): Recalculate search path when
31291         AppDomainSetup.PrivateBinPath changes.
31293         * object.c (mono_class_compute_gc_descriptor): It turns out some
31294         parts of the class libs (like System.Thread) holds pointers to
31295         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
31296         to treat native int a pointer type here.
31297         
31298 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
31300         * appdomain.h, domain.c: add hashtable for jump target resolution.
31302 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
31304         * reflection.h reflection.c icall.c: Added new icalls 
31305         GetManifestResourceInfoInternal, GetModulesInternal and support
31306         infrastructure.
31308 2003-05-16  Dick Porter  <dick@ximian.com>
31310         * icall.c:
31311         * file-io.h:
31312         * file-io.c: Implement System.IO.MonoIO::GetTempPath
31314 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
31316         * object.c: mono_store_remote_field: little fix to previous patch.
31318 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
31320         * class.c: add constructors to array classes.
31321         * icall.c: special case array construction for InternalInvoke (),
31323 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
31325         * class.h class.c reflection.c object.c: Added support for field
31326         defaults in dynamically generated classes.
31328 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
31330         * reflection.c: properly encode charset for ddlimport.
31332 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
31334         * threads.c: allow compiling without GC.
31336 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
31338         * appdomain.h, object.c, object.h, threads.c, threads.h: added
31339         handling of thread static data.
31341 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
31343         * reflection.h, reflection.c: added mono_custom_attrs_free ().
31345 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
31347         * class.c (mono_array_class_get): always set the serializable flags
31348         (mono_array_class_get): always set the SEALED attribute for array types
31350 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
31352         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
31353         attributes (fix for bug 42021).
31355 2003-05-12  Dick Porter  <dick@ximian.com>
31357         * gc.c: Don't run finalizers when the finalizer thread is
31358         finishing up, because the default domain has already been
31359         destroyed.
31361 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
31363         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
31364         value is null, we should throw an exception.   This is slightly
31365         different than the other conventions used for the constructor.
31367 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31369         * socket-io.c: fixed windows build.
31371 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31373         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
31375 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
31377         * object.c (mono_string_new_wrapper): Compatibility fix for MS
31378         compilers.
31380 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
31382         * class.c (mono_class_layout_fields): Add experimental GC aware
31383         auto layout facility. Requires class library changes to work correctly.
31385         (mono_class_setup_vtable): Avoid overriding explicit interface
31386         method implementations. Fixes iface3.exe test.
31388         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
31389         object reference.
31390         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
31391         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
31393         * metadata.h: Add new type classification macro which determines
31394         whenever the type holds an object reference.
31396 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
31398         * marshal.c (mono_marshal_get_native_wrapper): cleanups
31400 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
31402         * gc.c (finalizer_thread): Work around a GC bug.
31404 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
31406         * marshal.c (emit_struct_conv): allow unions
31408         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
31410 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
31412         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
31414 2003-05-06  Martin Baulig  <martin@ximian.com>
31416         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
31418 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31420         * socket-io.c:
31421         (Select_internal): allow NULLs, don't create arrays if not needed.
31422         Coupled with Socket.cs changes.
31424         * threadpool.c:
31425         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
31426         register a finalizer for it that will close the semaphore handle. This
31427         fixes the leak and make Lupus' test run with > 4080 loops.
31429 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
31431         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
31432         Jerome Laban (bug #42287)
31434 2003-05-02  Martin Baulig  <martin@ximian.com>
31436         * debug-mono-symfile.h
31437         (MonoSymbolFile): Moved declaration into mono-debug.h.
31438         (MonoDebugMethodJitInfo): Likewise.
31439         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
31440         argument.
31441         (_mono_debug_address_from_il_offset): Take a
31442         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
31444         * mono-debug.h
31445         (MonoDebugDomainData): New struct.
31446         (mono_debug_get_domain_data): New function.
31447         (mono_debug_add_method): Take an additional `MonoDomain *'
31448         argument.
31449         (mono_debug_source_location_from_address): Likewise.
31450         (mono_debug_il_offset_from_address): Likewise.
31451         (mono_debug_address_from_il_offset): Likewise.
31453 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
31455         * reflection.c: one more check for null type in custom attrs.
31457 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31459         * reflection.c: avoid warning (comparison is always false due to limited
31460         range of data type).
31462 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31464         * icall.c: throw an exception in Type.GetField if the argument 'name'
31465         is NULL.
31467 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
31469         * reflection.c: fixed handling of enums in named arguments to custom
31470         attributes (bug #42123).
31472 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
31474         * reflection.c: use the right array element type and handle
31475         a null for a Type argument, too.
31477 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
31479         * reflection.c: handle arrays as arguments to custom attributes.
31481 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
31483         * reflection.c: handle a string value in a custom attr
31484         ctor that takes an object.
31486 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
31488         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
31489         (fix bug #42063)
31491 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
31493         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
31495 2003-04-27  Martin Baulig  <martin@ximian.com>
31497         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
31498         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
31499         MONO_DEBUGGER_EVENT_BREAKPOINT.
31500         (mono_breakpoint_trampoline_code): Removed.
31501         (mono_debugger_event_handler): The last argument is now a
31502         `guint32'.
31503         (mono_debugger_insert_breakpoint_full): Removed the
31504         `use_trampoline' argument.
31505         (mono_debugger_method_has_breakpoint): Likewise.
31506         (mono_debugger_trampoline_breakpoint_callback): Renamed to
31507         mono_debugger_breakpoint_callback(); take the method and
31508         breakpoint number as arguments.
31510 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
31512         * metadata.c: fix off by one when loading parameters attributes.
31514 2003-04-24  Martin Baulig  <martin@ximian.com>
31516         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
31518 2003-04-24  Martin Baulig  <martin@ximian.com>
31520         * mono-debug-debugger.c: Moved all code which interacts with the
31521         Mono Debugger here.
31523         * debug-mono-symfile.c: This code now just deals with the symbol
31524         file itself, the debugger code is now in mono-debug-debugger.c.
31526 2003-04-23  Martin Baulig  <martin@ximian.com>
31528         * mono-debug.c (mono_debug_source_location_from_il_offset):
31529         New method; like mono_debug_source_location_from_address(), but
31530         takes an IL offset instead of a machine address.
31532 2003-04-23  Martin Baulig  <martin@ximian.com>
31534         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
31535         `line' field; this is now computed by the debugger.
31537 2003-04-23  Martin Baulig  <martin@ximian.com>
31539         * mono-debug.[ch]: New files.  This is the new debugging interface.
31541         * mono-debug-debugger.[ch]: New files.  Moved all code which
31542         interacts with the Mono Debugger here.
31544 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
31546         * domain.c (mono_init): initialize mono_defaults.monitor_class
31548 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
31550         * reflection.c (method_encode_code): Add a spicy exception to help
31551         future compiler authors.
31553 2003-04-21  Martin Baulig  <martin@ximian.com>
31555         * icall.c
31556         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
31557         Make this work with relative pathnames; g_filename_to_uri() needs
31558         an absolute filename.
31560 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
31562         * icall.c: Track name changes in Object and ValueType.
31564 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
31566         * metadata.c (mono_type_stack_size): size should be a multiple of
31567         sizeof (gpointer)
31569 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31571         * gc.c:
31572         (internal_domain_finalize): moved into mono_domain_finalize. No need
31573         to create another thread because the finalizers will be run in the
31574         finalizer thread.
31575         
31576         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
31577         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
31578         to be run (MS does this too).
31580 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
31582         * object.c (mono_class_compute_gc_descriptor): Update comment.
31584         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
31586         * image.h: Add synchronized wrapper cache.
31588         * image.c (do_mono_image_open): Initialize cache.
31590         * reflection.c (create_dynamic_mono_image): Initialize cache.
31592 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31594         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
31595         ves_icall_System_Buffer_ByteLengthInternal.
31597 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31599         * reflection.c: setup klass->nested_in earlier. Allow
31600         a dash in the assembly name.
31602 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
31604         * metadata.c (mono_type_to_unmanaged): dont access
31605         type->data.klass for MONO_TYPE_OBJECT
31606         (mono_type_to_unmanaged): consider System.Delegate class
31608 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
31610         * class.c: just setup supertypes in the proper place instead of
31611         initializing the full element class for arrays.
31613 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
31615         * class.c: ensure the element class of arrays is initialized.
31616         Setup the supertype info for array classes, too.
31618 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
31620         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
31622 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31624         * Makefile.am: re-added -m option when running cygpath. This way,
31625         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
31626         separator.
31627         * mono-config.c: same codepath for locating mono config file for WIN32
31628         and the rest.
31629         * assembly.c: if mono_assembly_setrootdir is called, don't override
31630         the value set.
31632 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31634         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
31635         MONO_ASSEMBLIES variable.
31637 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
31639         * icall.c: added Assembly::GetNamespaces() icall.
31641 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31643         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
31645 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
31647         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
31648         * object.c: fixed bug in the construction of vtable for proxies
31650 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
31652         * object.c (mono_array_new): Mark mono_array_new as an icall.
31654 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31656         * class.c: fixed test for public method when overriding interfaces.
31657         Closes bug #40970.
31659 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
31661         * appdomain.h, domain.c: added mono_domain_foreach() to
31662         be able to access the currently loaded appdomains.
31663         * object.c: make string interning work across sppdomains.
31664         Mark some functions for use as icalls.
31666 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
31668         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
31670         * reflection.h reflection.c: Allocate long living data using 
31671         GC_MALLOC_ATOMIC so the collector does not need to scan it.
31673         * reflection.c: Double the allocation size in streams instead of
31674         increasing it, to prevent unneccesary copying on large assemblies.
31675         
31676         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
31677         creation if the assembly does not have the Run flag set.
31679 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
31681         * class.h: avoid the C++ keywords in header files (Jerome Laban
31682         spotted and fixed this).
31684 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31686         * object.c:
31687         (mono_unhandled_exception): fill in the arguments for the
31688         UnhandledException event. Only trigger that event for the default
31689         domain (as MS does).
31691 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
31693         * object.c: Improve typed allocation stuff based on suggestions from
31694         Paolo. Also turn it on if the GC library supports it.
31696 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
31698         * object.c object.h class.h: Added experimental typed allocation
31699         facility using the interfaces in gc_gcj.h.
31701         * os/gc_wrapper.h: Added new include files.
31702         
31703 2003-04-03  Martin Baulig  <martin@ximian.com>
31705         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
31706         which is not yet enabled by default.
31708         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
31709         functions.
31710         (mono_gc_lock, mono_gc_unlock): New static functions.
31712         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
31713         functions; stop/start the world for the garbage collector.  This
31714         is using the windows API; we need to complete the SuspendThread()/
31715         ResumeThread() implementation in the io-layer to make this work on Unix.
31716         (mono_gc_push_all_stacks): New public function; tells the garbage
31717         collector about the stack pointers from all managed threads.
31719 2003-04-03  Martin Baulig  <martin@ximian.com>
31721         * object.h (MonoThread): Added `gpointer stack_ptr'.
31723         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
31725 2003-04-03  Martin Baulig  <martin@ximian.com>
31727         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
31729 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
31731         * reflection.c (typebuilder_setup_fields): Initialize field.first and
31732         field.last.
31734 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
31736         * loader.c (mono_lookup_internal_call): Report the corlib that is
31737         out of sync.
31739 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
31741         * icall.c (ves_icall_type_GetTypeCode): fixed check for
31742         System.DBNull (it's class not valuetype).
31744 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
31746         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
31747         if the array method was already assigned a token (fixes bug#40646).
31749 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
31751         * reflection.c (mono_reflection_get_type): Attempt type resolve even
31752         if no assembly is given.
31754 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
31756         * metadata.h: Added the new tables.
31758         * row-indexes.h: Added definitions for new tables.
31760         * metadata.c: Add schemas for new tables, and add support for
31761         computing the sizes of them.
31763         * class.c: Update for handling the new type cases.
31765 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
31767         * metadata.h (MONO_TYPE_IS_VOID): new macro
31769 2003-03-31  Martin Baulig  <martin@ximian.com>
31771         * threads.h (MonoThreadCallbacks): Added `thread_created'.
31773         * threads.c (mono_thread_new_init): Call `thread_created' in the
31774         mono_thread_callbacks.
31776 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
31778         * loader.h: added marshalbyrefobject_class to mono_defaults
31779         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
31780         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
31781           generation of output parameters.
31782           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
31783         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
31784           contextbound and the target object belongs to the context of the caller.
31785         * object.h: added context and unwrapped_server variables in MonoRealProxy.
31786         * object.c: Implemented support for interfaces and abstract classes
31787           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
31788           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
31790 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
31792         * class.h class.c (mono_class_is_subclass_of): New function.
31793         
31794         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
31795         routines for most common case (calls from ArrayList::ToArray).
31797         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
31798         routine so programs which call Environment::Exit() can be profiled.
31800         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
31801         Added MONO_ARCH_SAVE_REGS.
31803         * icall.c (ves_icall_type_is_subtype_of): Use new function.
31805 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
31807         * blob.h: Add a couple of new MonoType types definitions.
31809         * tabledefs.h: Add a couple of new call convs.
31811 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
31813         * reflection.h (MonoReflectionDynamicAssembly): track changes in
31814         the layout of the class.
31816         * reflection.c (alloc_table): double the size on overflow to avoid
31817         unnecessary copying.
31819         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
31820         avoid filling out metadata tables and blobs. Also set mb->ilgen to
31821         null so it can be garbage collected.
31822         
31823 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
31825         * reflection.c (mono_reflection_get_type): Return the resolved type
31826         only if it is in the assembly we searched.
31828         * reflection.c (ensure_runtime_vtable): Initialize method slots.
31830         * class.c (mono_class_setup_vtable): Set the slot of the overriding
31831         method.
31833 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31835         * appdomain.c:
31836         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
31837         the right one is 'file:///blah', but MS allows it.
31838         * assembly.c:
31839         (mono_assembly_open): allow 'file://blah'
31841         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
31843 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
31845         * socket-io.c: fixes bug #40310.
31847 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
31849         * reflection.c (mono_reflection_parse_type): handle deeply nested
31850         types correctly.
31852         * reflection.c (mono_image_create_token): Use unique token values
31853         since they will be put into a hash table.
31855         * class.c (mono_class_setup_vtable): If a method occurs in more than
31856         one place in the vtable, and it gets overriden, then change the
31857         other occurances too.
31859         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
31860         object as return type.
31862 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
31864         * icall.c: Deleted "ToString" implementation for double and float
31865         because they are full implemented in managed code.
31867 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
31869         * reflection.c, reflection.h: implemented and exported functions
31870         to retrieve info about custom attributes.
31872 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31874         * appdomain.c: moved Uri handling to assembly.c
31875         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
31876         work when using a file Uri in *nix and windows.
31878         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
31879         GetReferencedAssemblies.
31881 2003-03-18  Dick Porter  <dick@ximian.com>
31883         * icall.c: Rename a couple of internal calls
31885         * threads.c: Set the thread state to Stopped when a thread exits.
31886         Fixes bug 39377.
31888 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
31890         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
31891         New icall.
31893         * object.c (mono_class_vtable): fix warning.
31895 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
31897         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
31899         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
31900         memory.
31901         (method_encode_clauses): Create exception info structures in the right
31902         order.
31903         (mono_reflection_setup_internal_class): Initialize supertypes field.
31905         * class.c object.c: Handle interfaces which implement other interfaces 
31906         correctly.
31908         * class.h class.c: Move the supertypes array initialization code into 
31909         a separate function so it can be used for dynamic types too. Also call
31910         it earlier, in mono_class_init(), since it can be used before the
31911         type is initialized.
31913 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31915         * Makefile.am:
31916         * assembly.c:
31917         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
31919         * appdomain.c:
31920         * appdomain.h:
31921         * marshal.c:
31922         * object.c: remove warnings.
31924 2003-03-13  Martin Baulig  <martin@ximian.com>
31926         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
31927         (MonoDebugLexicalBlockEntry): New types.
31929         * debug-mono-symfile.c
31930         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
31932 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31934         * process.c: ret can be any non-zero value accroding to MS doc.
31936 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
31938         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
31939         fixing a warning for a miss-used prototype, would have cause
31940         random memory corruption.
31942 2003-03-07  Martin Baulig  <martin@ximian.com>
31944         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
31945         getting really annoying ....
31947 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
31949         * reflection.c (fixup_method): added support for array methods.
31951 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
31953         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
31954         (pointed out by Michael Adams).
31956 2003-03-04  Dick Porter  <dick@ximian.com>
31958         * icall.c: Temporarily reverted the Double and Single ToString()
31959         change, because it broke nunit.
31961 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
31963         * object.h, threads.h: make include files compatible with C++
31964         (patch by Jerome Laban <jlaban@wanadoo.fr>).
31966 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
31968         * icall.c: Erased ToString helper functions for Double and Single.
31969         Now, that implementations ar all in managed code (Double and Single
31970         Formatters).
31972 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
31974         * appdomain.c: Added method for initializing the default context of
31975         a domain. Added internal call for getting the default context.
31976         * appdomain.h: Added context variable in MonoDomain struct.
31977         * domain.c: mono_domain_set also sets the default context of the domain
31978         * icall.c: Mapped internal method InternalGetDefaultContext.
31979         * object.c: mono_object_get_virtual_method returns always a remoting
31980         wrapper if the object is a transparent proxy.
31981         mono_runtime_invoke_array: when creating an object by calling the
31982         constructor, if the created object is a proxy, then the constructor should
31983         be called using the a remoting wrapper.
31985 2003-03-03  Dick Porter  <dick@ximian.com>
31987         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
31988         variable so it compiles on solaris.  Problem spotted by
31989         Christopher Taylor <ct@cs.clemson.edu>
31991 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31993         * appdomain.c:
31994         (get_info_from_assembly_name): don't leak value.
31996         * icall.c:
31997         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
31998         result.
32000 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
32002         * assembly.c: export mono_image_load_references ().
32003         * class.c: handle function pointers. mono_class_from_name() now
32004         supports nested type names directly.
32006 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
32008         * reflection.h reflection.c: Encode already created dynamic methods 
32009         and fields correctly as a DEF instead of a REF.
32011         * reflection.c: Get rid of the force_ref argument to 
32012         mono_image_typedef_or_ref since it was wrong in the first place.
32014         * string-icalls.c: add error checking to string constructors according
32015         to the MSDN docs.
32017         * reflection.c: Emit types in the order their TypeBuilders were 
32018         created. Previously, a new table index was assigned to each type before
32019         the tables were emitted. This was wrong because the signature blob
32020         might already refer to a type by its original table index.
32022 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
32024         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
32025         change.
32026         
32027 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32029         * Makefile.am: make assemblies dir have \ instead of / on windows.
32031 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
32033         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
32034         iterate over the NESTEDCLASS table using a linear search since the
32035         table is not guaranteed to be sorted by the secondary key.
32037         * class.c (mono_class_create_from_typedef): fixed up call to
32038         mono_metadata_nesting_typedef.
32039         
32040 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
32042         * marshal.c (mono_string_to_byvalstr): clear the memory as
32043         suggested by Jerome Laban <jlaban@wanadoo.fr>
32045 2003-02-26  Dick Porter  <dick@ximian.com>
32047         * process.c: Cope with padding in .rsrc blocks
32049 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
32051         * metadata.h: reverted the filter_len change, it breaks reflection
32052         
32053 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
32055         * metadata.h: added a new field to store the filter_len
32056         
32058 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
32060         * reflection.c: handle custom attributes for types and members
32061         created with Reflection.Emit (bug#38422).
32063 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
32065         * reflection.c: define RTSpecialName automatically for constructors for
32066         compatibility with MS.NET.
32068         * reflection.c (mono_reflection_create_runtime_class): initialize
32069         nested_in field of dynamically created classes.
32071 2003-02-22  Martin Baulig  <martin@ximian.com>
32073         * debug-mono-symfile.h: Incremented version number.
32075 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
32077         * object.h icall.c process.c: fix warnings.
32079 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
32081         * appdomain.h appdomain.c:
32082         (mono_domain_try_type_resolve): split the 
32083         name_or_tb argument into a name and a tb argument.
32084         (mono_domain_has_type_resolve): new function to check whenever the
32085         application has registered a TypeResolve event handler.
32086         
32087         * icall.c reflection.h reflection.c: move the type resolve logic into
32088         mono_reflection_get_type () so it will be invoked when 
32089         Assembly::GetType () is called.
32091         * reflection.c:
32092         (mono_reflection_get_type): renamed to get_type_internal.
32093         (mono_reflection_get_type): fixed type name generation so it works 
32094         for nested types too.
32095         (mono_reflection_get_type): call has_type_resolve () to avoid the 
32096         costly type name generation if there is no resolve event handler.
32098 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
32100         * class.c, image.c: load exported types from file references.
32102 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
32104         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
32105           used to cache the managed methods used to create proxies and make 
32106           remote invocation of methods.
32107         * class.h: Added in MonoVTable a flag to indicate that a class needs 
32108           to be remotely created.
32109         * object.c: Modified the method mono_class_vtable(). It now initializes 
32110           the remote flag of the vtable. Modified mono_object_new_specific(), 
32111           so now it checks the remote flag.
32112         * icall.c: Added a couple of internal methods, one for enabling instance 
32113           creation interception for a type, and one for creating objects bypassing
32114           the remote check.
32116 2003-02-18  Martin Baulig  <martin@ximian.com>
32118         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
32119         New interncall to get a method's metadata token.
32121         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
32122         New interncall for the debugger.
32124 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
32126         * class.c (mono_class_setup_vtable): allocate supertype array
32128 2003-02-18  Martin Baulig  <martin@ximian.com>
32130         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
32132 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32134         * reflection.c:
32135         (assembly_name_to_aname): jump over unknown properties (i've found
32136         something like: 'type, assembly, version=xxx, custom=null, public...',
32137         so now will ignore custom=null and still get the rest of the values).
32139 2003-02-17  Dick Porter  <dick@ximian.com>
32141         * threads.c: Have Thread.Start() wait for a semaphore to signal
32142         that the thread has set up all its local data.  This fixes bug
32143         34323, where Abort() raced the new thread's TLS data.
32145         Also removes the handle_store() call from start_wrapper, because
32146         threads are now always created suspended and there is no longer a
32147         race between the parent and child threads to store the info.
32149 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
32151         * image.c: explain the #- heap issue in a message, hopefully
32152         avoiding FAQs on mono-list.
32154 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32156         * icall.c:
32157         (GetEntryAssembly): if the domain has not invoked
32158         AppDomain.ExecuteAssembly yet, return the assembly of the default
32159         AppDomain.
32161 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
32163         * class.c (mono_ldtoken): make it work in dynamic assemblies.
32165 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
32167         * metadata.c, reflection.c: simple speedup to type hash
32168         and equals code.
32170 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
32172         * image.c, image.h, class.c, assembly.c: move module loading
32173         to MonoImage. When loading metadata, consider alignemnet from
32174         the start of metadata, not from the metadata address in memory.
32176 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
32178         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
32179         AssemblyBuilder objects. Factored out custom attribute creation into
32180         a separate function.
32181         (create_custom_attr): new function to create custom attributes.
32183 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
32185         * Makefile.am: Got tired of typing the full pathname to pedump.
32186         Until there is another option, am installing this.
32188 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
32190         * class.c (class_compute_field_layout): always set field->parent 
32191         (mono_ldtoken): use mono_defaults.fieldhandle_class;
32193 2003-02-11  Dick Porter  <dick@ximian.com>
32195         * threads-types.h:
32196         * monitor.c: Rewrote Monitor, making lock much faster and
32197         Pulse/Wait work as specified.  Also uses much fewer handles, and only
32198         creates them as needed.
32200         * exception.c: Added SynchronizationLockException
32202         * threads.c: Deleted old Monitor implementation.  The new one is
32203         in a new file.
32205 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
32207         * class.c: handled TypedReference type code. Set the correct size for
32208         class data. Setup interface_offsets for interface classes, too.
32210 2003-02-09  Martin Baulig  <martin@ximian.com>
32212         * debug-mono-symfile.h: Reflect latest symbol writer changes.
32214 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
32216         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
32217         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
32218         * object.c: fixed mono_object_get_virtual_method () for interfaces.
32219         * verify.c: check for code that runs after the end of the method.
32221 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
32223         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
32224         "System.Math::Round2".
32225         * sysmath.h: Added Floor, Round and Round2 definitions.
32226         * sysmath.c: Modified certain functions that were not 100% compliant
32227         with MS.NET (math precision) and added the implementation of Floor,
32228         Round and Round2.
32230 2003-02-07  Martin Baulig  <martin@ximian.com>
32232         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
32234 2003-02-07  Martin Baulig  <martin@ximian.com>
32236         * debug-mono-symfile.c: Reflected latest symwriter changes.
32237         (mono_debug_create_mono_symbol_file): Removed.
32238         (mono_debug_open_mono_symbol_file): Take an argument which
32239         specifies whether to create a dynamic symbol file.
32241 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
32243         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
32245 2003-02-05  Martin Baulig  <martin@ximian.com>
32247         * reflection.c (mono_image_build_metadata): Make this public,
32248         protect it against being called multiple times, don't create
32249         resources and don't build the compressed metadata here.
32250         (mono_image_create_pefile): Do this here.
32252         * icall.c
32253         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
32255 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32257         * socket-io.c: fixed bug #36322.
32259 2003-02-06  Piers Haken <piersh@friskit.com>
32261         * appdomain.[ch]:
32262         * class.h:
32263         * debug-mono-symfile.c:
32264         * icall.c:
32265         * loader.c:
32266         * mono-config.c:
32267         * monosn.c:
32268         * reflection.c:
32269         * socket-io.c: warning cleanups
32271 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
32273         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
32274         function. works like remoting invoke, but does a check for the Proxy first.
32276 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
32278         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
32280 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
32282         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
32283         array of pointers.
32284         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
32285         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
32287         * object.c (mono_store_remote_field_new): used by the new jit
32288         instead of mono_store_remote_field
32289         (mono_load_remote_field_new): used by the new jit
32290         instead of mono_load_remote_field
32292 2003-02-05  Patrik Torstensson
32294         * appdomain.c: changed unload to take the domain id instead
32295         of domain
32296         
32297         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
32300 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32302         * appdomain.c: don't look for assemblies in ApplicationBase if
32303         PrivateBinPathProbe is set.
32305 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32307         * object.c: make the first argument in main_args contain the absolute
32308         path to the assembly. Fixes bug #37511.
32310 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32312         * icall.c: get correct UTC offset for countries not using daylight
32313         time saving. Fixes bug #30030.
32315 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32317         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
32318         and 1 are the family).
32320 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
32322         * icall.c (ves_icall_InternalExecute): removed wrong assertion
32324         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
32326 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
32328         * reflection.c: added support for SignatureHelper tokens, which is
32329         needed by the Calli opcode.
32331         * reflection.h: track changes to SignatureHelper class.
32333         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
32335 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32337         * appdomain.c: fixed loading assemblies from PrivateBinPath.
32339 2003-02-03  Patrik Torstensson
32340         * appdomain.[c|h], domain.c : 
32341          - Added support for getting a domain via domain id
32342          - Support for setting and getting domain from System.AppDomain 
32343            (used in cross appdomain channel)
32344          - Added support for get/set for a MonoAppContext on a thread 
32345            (Context class in System.Runtime.Remoting.Contexts),
32346          - Removed hack in Get/SetData and ExecuteAssembly.
32347         
32348         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
32349         the managed world to get control when a proxy is created.
32351         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
32352         
32353 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
32355         * icall.c
32356         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
32357         Populate the codebase field as well.
32359 2003-02-02  Martin Baulig  <martin@ximian.com>
32361         * debug-mono-symfile.c
32362         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
32363         (mono_debug_symfile_add_method): Allow interncalls.
32365 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32367         * icall.c: throw parse exception if strtod fails or the string is empty.
32369 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
32371         * marshal.c: handle object type separately from defined
32372         class types.
32374 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
32376         * marshal.c: handle NATIVE_LPSTR for strings when it's
32377         explicitly specified.
32379 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
32381         * reflection.c, reflection.h, icall.c: setup the reflection
32382         handle cache for ModuleBuilders and AssemblyBuilders.
32384 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
32386         * reflection.c (reflection_methodbuilder_to_mono_method): set
32387         pinvoke flag
32389 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32391         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
32393 2003-01-29  Dick Porter  <dick@ximian.com>
32395         * threads.c: No need for the fake_thread kludge now that Thread
32396         doesn't run a class constructor
32397         
32398 2003-01-29  Dick Porter  <dick@ximian.com>
32400         * threads.c: Use g_direct_hash instead of the rather bogus
32401         g_int_hash
32403 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
32405         * marshal.c (mono_marshal_get_native_wrapper): add check for null
32406         (fix pinvoke12.exe)
32407         (mono_marshal_get_struct_to_ptr): generate valid IL code
32408         (mono_marshal_get_ptr_to_struct): generate valid IL code
32409         (*): correctly set sig->pinvoke, we need to memdup the signature
32410         to do that
32412 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
32414         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
32415         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
32417 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
32419         * profiler.c: provide more callers information.
32421 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
32423         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
32425         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
32427         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
32429 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
32431         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
32432         exception instead of going into an infinite loop on dates which it 
32433         can't yet handle.
32435         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
32436         out-of-range exception if needed.
32438         * class.c (mono_class_setup_vtable): allow a virtual method to provide
32439         an implementation for an interface method and to override an inherited
32440         method at the same time. 
32441         Imagine a scenario when a virtual method is used to override a
32442         virtual abstract method in a parent class, and this same method 
32443         provides an implementation for an method inherited from an interface. 
32444         In this case, the interface resolution code will set im->slot, which 
32445         means that the virtual method override pass will skip this method 
32446         which means a pointer to the abstract method inherited from the parent
32447         will remain in the vtable of this non-abstract class.
32449         * class.c: (mono_class_setup_vtable): continue search for a real 
32450         method if only an abstract method is found.     
32452 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
32454         * reflection.c: add size to encoding for ByValStr and ByValArray
32455         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
32457 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
32459         * class.c (mono_class_setup_vtable): pass the override info as an
32460         argument.
32462         * class.c (mono_class_setup_vtable): set the slot of overriding methods
32463         correctly.
32464         
32465         * reflection.c (ensure_runtime_vtable); add support for method 
32466         overrides.
32467         
32468 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
32470         * reflection.c (resolution_scope_from_image): Hack to work to work with
32471         dynamic assemblies.
32473         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
32474         added a 'force_ref' argument to force this function to allways return 
32475         a TypeRef. This is needed by mono_image_get_memberref_token ().
32476         
32477 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
32479         * reflection.c (mono_image_get_type_info): interfaces really don't have
32480         a parent.
32482         * reflection.c (mono_image_basic_init): fill out missing fields of
32483         image structure.
32485         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
32486         dynamic assemblies. This is required so dynamic assemblies show up in
32487         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
32488         Type::GetType() etc. This is consistent with MS behaviour.
32490         * image.c image.h reflection.c: add newly created classes to the name 
32491         cache so mono_class_get () will find them.      
32493 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
32495         First part of changes to get IKVM.NET running under mono.
32496         
32497         * appdomain.h, appdomain.c: added new function 
32498         mono_domain_try_type_resolve() which will emit TypeResolve events. 
32499         This function will call AppDomain::DoTypeResolve to do the actual work.
32501         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
32502         moved existing code dealing with dynamic tokens to a new function 
32503         called mono_reflection_lookup_dynamic_token (). This function will 
32504         raise TypeResolve events when appropriate. Since reflection.c is not 
32505         part of libmetadata, a new hook function called 
32506         mono_lookup_dynamic_token() is added to class.c which will call this.
32508         * assembly.h assembly.c: make the invoke_load_hook function public,
32509         so it can be called for dynamic assemblies.
32511         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
32513         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
32514         type isn't found.
32516         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
32517         MonoGHashTable, since it contains pointers to objects which the GC 
32518         needs to track.
32520         * assembly.c (search_loaded): remove unused variable.
32521         
32522 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
32524         * object.c: fixed issue exposed by gcc-generated IL programs
32525         that use RVA data for pointers.
32527 2003-01-25  Martin Baulig  <martin@ximian.com>
32529         * threads.c (start_wrapper): Moved the initialization of
32530         `start_func' above the mono_new_thread_init() call to which we
32531         pass it as argument.
32533 2003-01-24  Martin Baulig  <martin@ximian.com>
32535         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
32536         the MonoThread pointer.
32538 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
32540         * icall.c: Rename `PowImpl' to Pow.
32542 2003-01-23  Dick Porter  <dick@ximian.com>
32544         * threads.c (start_wrapper): Create a Thread object if needed, so
32545         the Main() thread can do the class initialisation in a subthread
32546         that has been set up to allow managed code execution.
32548         Pass the thread ID instead of the MonoThread pointer to the thread
32549         start and attach callbacks.  This change is required, because the
32550         jit thread start callback must be called _before_ the Thread
32551         object can be created.
32552         
32553         (mono_thread_init): Removed much object creation code that is no
32554         longer needed.  No managed code is called from here now.
32556         * object.c (mono_runtime_exec_managed_code): Create a subthread
32557         for Main, and call back to the runtime to use it.
32558         Set the exit code when Main exits.
32560         * gc.c: Make sure domain finalisation happens in a subthread.
32561         Re-enable threaded GC, fixing bug 31333 (again).
32563         * environment.c: System.Environment internall calls (so far just
32564         ExitCode is here, the others are still in icall.c)
32566         * appdomain.c (mono_runtime_cleanup): All threads running managed
32567         code should have finished before mono_runtime_cleanup() is
32568         reached, so no need to clean up threads.
32570 2003-01-22  Martin Baulig  <martin@ximian.com>
32572         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
32573         `gpointer func' arguments.      
32574         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
32575         but added `MonoThread *thread' argument.
32576         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
32578         * threads.c (mono_new_thread_init): Added `gpointer func' argument
32579         and pass it to the mono_thread_start_cb callback.
32580         (mono_install_thread_callbacks): New public function to install a
32581         set of callbacks which are set by the debugger.
32582         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
32584 2003-01-22  Martin Baulig  <martin@ximian.com>
32586         * Makefile.am: Install debug-mono-symfile.h.
32588 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
32590         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
32592 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
32594         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
32595         * class.c (mono_ptr_class_get): correctly set access levels of pointers
32596         (mono_array_class_get): correctly set access levels of arrays
32598 2003-01-20      Patrik Torstensson
32599         * image.h (MonoAssemblyName): changed major, minor, build, revision
32600         from signed to unsigned.
32602 2003-01-20  sean kasun <skasun@azstarnet.com>
32604         * reflection.c (load_cattr_value): Now this handles
32605         MONO_TYPE_SZARRAY.  Fixes bug #35629
32607 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
32609         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
32610         integer value
32612 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32614         * decimal.c: fixed bug #26056.
32616 2003-01-17  Martin Baulig  <martin@ximian.com>
32618         * gc.c: Raise an ExecutionEngineException instead of using g_error().
32620 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32622         * exception.[ch]:
32623         (mono_get_exception_type_initialization): new function.
32625         * object.c: throw a TypeInitializationException when an exception is
32626         thrown invoking the class constructor.
32628 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32630         * reflection.c: fixed attribute reading.
32632 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32634         * icall.c:
32635         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
32636         provided, look for the type in the calling assembly and then in
32637         mscorlib; if the assembly name is provided, only try that one.
32639 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
32641         * object.c: register the vtable before there is a chance it's
32642         queried again recursively.
32644 2003-01-13  Duncan Mak  <duncan@ximian.com>
32646         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
32647         gc-internal.h. 
32648         
32649 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
32651         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
32653 2003-01-11  Martin Baulig  <martin@ximian.com>
32655         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
32656         this to 20 for the release.
32658 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
32660         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
32662         * loader.c (mono_method_get_marshal_info): bug fix
32664         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
32665         structures with explicit layout
32667 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
32669         * profiler.c: made the output more readable (and sorted). 
32670         Added caller information for the allocation profiler.
32672 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
32674         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
32676 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32678         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
32679         to get value types.
32680         
32681 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
32683         * object.c, profiler.h, profiler.c, profiler-private.h:
32684         Added object allocation profiler.
32686 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
32688         * reflection.h, reflection.c: handle global methods.
32689         Compress blob entries.
32691 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
32693         * marshal.c: fix compilation.
32695 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
32697         * loader.c (mono_method_get_marshal_info): impl.
32699         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
32701 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32703         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
32704         for reference types.
32706 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
32708         * loader.c: fixed off by one error in loaded parameter names.
32710 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
32712         * marshal.c (mono_marshal_get_icall_wrapper): like
32713         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
32714         instead of a MonoMethod.
32716 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32718         * decimal.c: fixed bug #36537.
32720 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
32722         * marshal.c: throw a missing method exception if a
32723         P/Invoke method is not found.
32725 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
32727         * icall.c: allow a null this for constructors.
32729 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
32731         * icall.c: raise the proper exceptions if the arguments to the
32732         internal Invoke are incorrect.
32734 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
32736         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
32738 2003-01-03  Martin Baulig  <martin@ximian.com>
32740         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
32742 2002-12-31  Martin Baulig  <martin@ximian.com>
32744         * debug-mono-symfile.c: Completely rewrote the type section.
32745         Instead of using individual malloc()ed fields, we use one big
32746         continuous memory area and offsets into this area.
32747         See the comments in the source code for details.
32749 2002-12-30  Martin Baulig  <martin@ximian.com>
32751         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
32753 2002-12-30  Martin Baulig  <martin@ximian.com>
32755         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
32756         line number table in this data blob instead of using an external
32757         pointer.
32759 2002-12-28  Martin Baulig  <martin@ximian.com>
32761         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
32763 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
32765         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
32766         as a boxed return type.
32768 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
32770         * appdomain.c
32771         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
32772         g_build_filename to properly get separators on the filename created.
32774         * object.h: Small change, introduce MonoMarshalByRefObject to
32775         track the layout of that structure in the C# universe as we make
32776         changes there.
32778 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
32780         * object.c: removed assert to allow static fields on interfaces.
32781         * loader.c: a TypeSpec may be used for any type, not just arrays.
32783 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32785         * class.c, class.h: added mono_class_array_element_size ().
32786         Ignore static methods in interfaces.
32788 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32790         * threads.c: fixed the build under cygwin.
32792 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
32794         * reflection.c: handle nullref constants. Allocate keys for
32795         reflection handles with the GC.
32797 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32799         * threads.c, threads.h: added mono_thread_get_abort_signal()
32800         to get a suitable signal for thread abort.
32802 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32804         * metadata.c: fix handling of ExportedType table.
32806 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32808         * icall.c: added WriteWindowsDebugString internal call.
32810 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32812         * reflection.h: added fields to match C# implementation.
32814 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32816         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
32818 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
32820         * gc.h, gc-internal.h: Rename header for GC internal calls to
32821         gc-internal.h from gc.h as to not clash with Boehm GC having its
32822         header installed as <gc.h> in outside include paths.
32823         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
32824         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
32826 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32828         * icall.c: assign minor, build and revision in FillName.
32830 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
32832         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
32833         Added support for running code generated by Reflection.Emit.
32835 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32837         * appdomain.c: check for NULL argument in LoadFrom.
32839 2002-12-10  Dick Porter  <dick@ximian.com>
32841         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
32843 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32845         * appdomain.c: fix buglet when building exe file name.  Handle full
32846         assembly name (needed after latest changes to AssemblyName).
32847         * image.c:
32848         (mono_image_close): free some hashtables.
32850 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
32852         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
32853         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
32854         on some systems (redhat 7.3) 
32856 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
32858         * threads.c: delete the critical section of a sync block,
32859         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
32861 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
32863         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
32865 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32867         * appdomain.[ch]: handle the assembly preload event to try loading the
32868         assemblies using the paths we have in the current domain.
32870         * assembly.[ch]: created an assembly preload hook that is called to try
32871         loading the assembly by other means that the ones provided here.
32873         * domain.c: initialize the domain search path.
32875         From now on, assemblies (TODO: except corlib and System) are loaded
32876         according to these rules when using mono_assembly_load ():
32878                 1. It tries to load the assembly from the ApplicationBase
32879                 of the current domain appending .dll and .exe (TODO: have to
32880                 try loading from name/name.dll and name/name.exe).
32882                 2. It tries the search path specified in PrivateBinPath for the
32883                 current domain (if any).
32885                 3. Previous behavior.
32887 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
32889         * icall.c: implemented GetInterfaceMap() related icall.
32890         * domain.c, loader.h: load MethodInfo in mono_defaults.
32892 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32894         * gc.c: disable the finalizer thread for now, untill all the issues
32895         with it are resolved.
32897 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32899         * string-icalls.c: handle embedded nulls in string ctor when the
32900         length is specified.
32902 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32904         * class.c: look for explicit interface implementation in parent
32905         classes, too.
32907 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
32909         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
32911 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
32913         * gc.c: protect handles with a critical section.
32915 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32917         * icall.c:
32918         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
32919         parameters. If no assembly specified, try getting the type from all
32920         the assemblies in the current domain, else, load the assembly and get
32921         the type from it.
32923 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32925         * marshal.c: applied patch from Aleksey Demakov that fixes
32926         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
32928 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32930         * icall.c: fixed get_location.
32932 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
32934         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
32935         declarations to make it work with older gcc. 
32937         * loader.c (mono_get_method): set signature->pinvoke for native calls
32939 2002-11-20  Dick Porter  <dick@ximian.com>
32941         * threads.c (mono_thread_init): Set the main thread's handle
32943 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
32945         * gc.c: allow compilation without GC support. Changed to match the
32946         mono coding style.
32948 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32950         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
32952 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
32954         * reflection.c: set a public key token on the core assemblies.
32956 2002-11-18  Dick Porter  <dick@ximian.com>
32958         * threads.c: Split out some thread initialisation so that other
32959         files can set the start callback function.
32961         * gc.c: Run finalisers in a separate thread, to avoid stack
32962         overflow.  Fixes bug 31333.
32964         * appdomain.c: Set up GC finalisation thread.
32966         * reflection.c: 
32967         * object.c: 
32968         * domain.c: Use gc.h macros for GC_malloc
32969         
32970 2002-11-15  Dick Porter  <dick@ximian.com>
32972         * threadpool.c: 
32973         * threads.c:
32974         * appdomain.c: Removed mono_runtime_init_with_attach(),
32975         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
32976         merging the extra parameter with the existing function.  Removed
32977         unneeded code in mono_thread_attach().
32979 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
32981         * image.c (mono_image_loaded_by_guid): a method to get loaded
32982         images by guid. 
32983         (load_metadata_ptrs): we store the guid as string.
32985 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
32987         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
32989         * metadata.c (mono_guid_to_string): imported method form Zoltan
32990         Varga (slightly modified)
32992         * assembly.c (mono_assembly_open): load precompiled code
32994         * loader.h (MonoMethod): we store the method token for use in the
32995         aot compiler. 
32997 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
32999         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
33000         the hook function called when an assembly is loaded.
33001         
33002         * domain.c: Modified file.
33003         (mono_domain_assembly_load): removed hash table insertion of assemblies.
33005         Fixes bug #33196.
33007 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
33009         * reflection.c: Map PEFileKind to the value expected by the WinNT
33010         image loader. 
33012 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33014         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
33015         Read until the buffer is filled completely.
33017 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33019         * icall.c: implemented MonoType.InternalGetEvent ().
33021 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33023         * appdomain.c: implemented InitAppDomainSetup. Delayed
33024         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
33025         the entry_assembly.
33027         * assembly.c: base_dir is now an absolute path ending with
33028         G_DIR_SEPARATOR.
33030         * icall.c: modified get_location according to the above changes.
33032         * object.c: init AppDomain.SetupInformation for the default domain after
33033         we have the entry assembly.
33035         * domain.c: when unloading a domain, setup = NULL.
33037 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
33039         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
33041 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
33043         * object.h, object.c: introduced mono_object_get_virtual_method ()
33044         to lookup the method invoked on an object when a callvirt is done on
33045         a method.
33046         * icall.c: make MethodInfo::Invoke() always do a virtual call.
33048 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33050         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
33051         current domain when loaded an assembly and failed to load it.
33053         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
33055 2002-10-31  Dick Porter  <dick@ximian.com>
33057         * icall.c: 
33058         * file-io.h: 
33059         * file-io.c: Return the error status in a parameter, as the
33060         GetLastError() value has long since been blown away if we try and
33061         look it up in a subsequent internal call invocation.  Delete the
33062         GetLastError() internal call, because it's useless.
33064 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
33066         * class.[ch]: added cast_class to fix bug 29517
33068 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
33070         * marshal.c: create valid IL code in the filter clause:
33071         the new JIT is less forgiving:-)
33073 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33075         * icall.c: removed get_property internal call.
33077 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
33079         * appdomain.h domain.c: Added an ID to appdomains.
33080         
33081         * threads.c threads.h icall.c: Implement icall
33082         Thread:GetDomainID(), and remove unused icall 
33083         CurrentThreadDomain_internal.
33085 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33087         * icall.c: Don't recurse through the base types in GetConstructor.
33088         Fixes bug #32063. 
33090 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
33092         * mempool.h, mempool.c: added mono_mempool_empty() and
33093         mono_mempool_stats().
33095 2002-10-23  Dick Porter  <dick@ximian.com>
33097         * file-io.c: 
33098         * file-io.h: 
33099         * icall.c: Added MonoIO.GetFileType internal call
33101 2002-10-17  Dick Porter  <dick@ximian.com>
33103         * appdomain.c (mono_runtime_cleanup): Don't signal the async
33104         delegate semaphore before waiting for all threads to finish,
33105         because new threads can also call async delegates.  Fixes bug
33106         32004.
33108         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
33109         of 3 seconds, in case another async job is queued.  (This part is
33110         needed because the bug fix reintroduced the 3s exit lag.)  This
33111         makes the mono_runtime_shutdown flag superfluous.
33113 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
33115         * reflection.c: include ehader size in method section headers.
33116         Really check for suplicated modules entries.
33118 2002-10-17  Martin Baulig  <martin@gnome.org>
33120         * debug-mono-symfile.c: Added back support for locals.
33122 2002-10-14  Martin Baulig  <martin@gnome.org>
33124         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
33125         MONO_TYPE_VOID.
33127 2002-10-14  Martin Baulig  <martin@gnome.org>
33129         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
33130         mono_class_get() instead of looking in the class cache. 
33132 2002-10-13  Martin Baulig  <martin@gnome.org>
33134         * debug-mono-symfile.c: Set version number to 28, include the
33135         signature in method names.
33137 2002-10-13  Martin Baulig  <martin@gnome.org>
33139         * debug-mono-symfile.h: Set version number to 27.
33141 2002-10-11  Martin Baulig  <martin@gnome.org>
33143         * gc.c: Don't register/unregister NULL pointers as disappearing links.
33145 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
33147         * metadata.c, metadata.h: added helper function to allocate signatures.
33149 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33151         * icall.c: added internal call to get the location of machine.config.
33153 2002-10-08  Martin Baulig  <martin@gnome.org>
33155         * debug-mono-symfile.c: Ignore classes with a pending init for the
33156         moment.
33158 2002-10-03  Dick Porter  <dick@ximian.com>
33160         * threads.c: Freebsd pthread_t is a pointer
33162 2002-10-03  Dick Porter  <dick@ximian.com>
33164         * socket-io.c: Implemented GetHostName_internal
33166 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33168         * mono-config.c:
33169         (mono_config_parse_file): don't leak the text.
33171 2002-10-02  Martin Baulig  <martin@gnome.org>
33173         * debug-mono-symfile.c: Added support for methods.
33175 2002-10-01  Martin Baulig  <martin@gnome.org>
33177         * debug-mono-symfile.c: Don't emit methods and line numbers for
33178         the dynamic symbol file, just write the type table.  We can easily
33179         have an external helper program which creates a symbol file for an
33180         IL file.        
33182 2002-10-01  Dick Porter  <dick@ximian.com>
33184         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
33185         Only add the handle to the cleanup array when we're about to
33186         launch the thread.  Bug 31425 deadlocked when the test was run on
33187         mono under w32.
33189 2002-10-01  Martin Baulig  <martin@gnome.org>
33191         * debug-mono-symfile.c: Added support for properties.
33193 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
33195         * reflection.c: unaligned store fix from Mark Crichton
33196         <crichton@gimp.org>.
33198 2002-09-27  Martin Baulig  <martin@gnome.org>
33200         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
33201         New interncall.
33203 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
33205         * assembly.h, assembly.c: use a sane API to hook into the assembly
33206         loading process instead of a useless special-purpouse hack
33207         (ngen needs a hook, too, for example).
33209 2002-09-27  Dick Porter  <dick@ximian.com>
33211         * threads.c (mono_thread_init): Call GetCurrentProcess() so
33212         io-layer can set up some process handle info.  Not needed on w32,
33213         but doesn't hurt either.
33215         * process.c: Pass the program name in the second parameter to
33216         CreateProcess, so the path is searched.  Include the working
33217         directory. Implemented process name, process enumeration, and some
33218         process detail internal calls.
33219         
33220         * icall.c: Added internal calls for process lookup, and some
33221         process details
33223 2002-09-26  Martin Baulig  <martin@gnome.org>
33225         * assembly.c (mono_install_open_assembly_hook): New global
33226         function to install a function to be invoked each time a new
33227         assembly is loaded.
33228         (mono_assembly_open): Run this callback function if set.
33230         * debug-mono-symfile.c: Put back line numbers for the dynamic
33231         symbol file and also record the .il file as source file.  This
33232         allows us to install the temporary symbol file as `file.dbg' just
33233         like a compiler-generated one.
33235 2002-09-26  Nick Zigarovich <nick@chemlab.org>
33237         * Corrected typo in gc.c (BOHEM vs BOEHM).
33239 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33241         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
33242         GetProperties. Also avoid calling g_slist_length in GetProperties and
33243         GetMethods.
33245 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
33247         * reflection.c: avoid unaligned stores (bug spotted by
33248         Mark Crichton  <crichton@gimp.org>).
33250 2002-09-25  Martin Baulig  <martin@gnome.org>
33252         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
33253         instead of guint64 for addresses and added prologue/epilogue info.
33255 2002-09-25  Martin Baulig  <martin@gnome.org>
33257         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
33258         store line number info.  For the dynamic symbol file, we only need
33259         to provide the JIT generated dynamic line number info for the dynamic
33260         symbol file.
33262 2002-09-25  Martin Baulig  <martin@gnome.org>
33264         * debug-mono-symfile.h: Incremented version number.
33266 2002-09-24  Martin Baulig  <martin@gnome.org>
33268         * class.c (mono_debugger_class_init_func): New global function
33269         pointer variable.
33270         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
33271         call it.
33273         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
33274         function.  This is called via the mono_debugger_class_init_func
33275         hook to add all types to the dynamic type table.
33276         (ves_icall_MonoDebugger_GetType): New interncall to get a class
33277         from its metadata token.
33279         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
33280         New interncall for the debugger.
33282 2002-09-24  Nick Drochak <ndrochak@gol.com>
33284         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
33285         before using it in case it is null.
33286         
33287 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
33289         * metadata.c: allow custom modifiers in local var signatures
33290         (bug spotted by Zoltan Varga).
33292 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
33294         * class.c: deal with the <Module> class that may have a NULL vtable.
33295         Eliminate warnings.
33297 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33299         * image.c, image.h: more strong name helpers.
33300         * monosn.c: more work: convert pem keys to cryptoapi format.
33302 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
33304         * string-icalls.c: speedup IndexOf.
33306 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33308         * icall.c: updates from Zoltan.2.Varga@nokia.com.
33310 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33312         * icall.c: cleanup: use mono_object_domain ().
33314 2002-09-23  Martin Baulig  <martin@gnome.org>
33316         * debug-mono-symfile.c: Improved type support.
33318 2002-09-22  Martin Baulig  <martin@gnome.org>
33320         * debug-mono-symfile.c: Added support for reference types and strings.
33322 2002-09-22  Martin Baulig  <martin@gnome.org>
33324         * debug-mono-symfile.c: Started to work on the type table.
33326 2002-09-21  Martin Baulig  <martin@gnome.org>
33328         * debug-mono-symfile.c: Largely reworked the symbol table format.
33329         The symbol table is now incrementally updated each time a new
33330         method is added.  We're now also using our own magic and version
33331         so that you don't need to recompile all your classes if the
33332         dynamic table changes.
33333         (mono_debug_update_mono_symbol_file): Removed.
33334         (mono_debug_symfile_add_method): New function to add a method.
33336 2002-09-21  Martin Baulig  <martin@gnome.org>
33338         * icall.c
33339         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
33340         New interncall.
33342         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
33343         New interncall to get a method from its metadata token.
33345 2002-09-21  Martin Baulig  <martin@gnome.org>
33347         * debug-mono-symfile.c: Create type table.
33349 2002-09-20  Martin Baulig  <martin@gnome.org>
33351         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
33353 2002-09-20  Martin Baulig  <martin@gnome.org>
33355         * debug-mono-symfile.c: Provide information about params and locals.
33357 2002-09-20  Martin Baulig  <martin@gnome.org>
33359         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
33360         New interncall.
33362         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
33363         interncall to get a method from its metadata token.
33365 2002-09-20  Martin Baulig  <martin@gnome.org>
33367         * debug-mono-symfile.c: Added a few checks for method->header
33368         being non-NULL.  This should never happen, but for the moment
33369         let's use a g_warning() rather than a g_assert().
33371 2002-09-19  Mark Crichton  <crichton@gimp.org>
33373         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
33374         even if support for it isn't present.  Added an #ifdef to fix this.
33376         * socket-io.c: Added checks back for Solaris support.
33378 2002-09-19  Martin Baulig  <martin@gnome.org>
33380         * debug-mono-symfile.c (read_string, write_string): Reflect latest
33381         changes in the symbol file format.
33383 2002-09-18  Martin Baulig  <martin@gnome.org>
33385         * debug-mono-symfile.c: Set version number to 21.
33387 2002-09-18  Dick Porter  <dick@ximian.com>
33389         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
33390         on netbsd.  Fixes bug 30051.
33392 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33394         * reflection.c:
33395         (set_version_from_string): little fix.
33397 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33399         * monosn.c, Makefile.am: added strong name utility.
33400         * reflection.h, reflection.c: implemented delayed signing,
33401         locale, version and hash id assembly attributes.
33403 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
33405         * loader.c, metadata.c: load param attributes in signatures.
33407 2002-09-16  Martin Baulig  <martin@gnome.org>
33409         * debug-mono-symfile.c: Added string table with all method names.
33411 2002-09-14  Martin Baulig  <martin@gnome.org>
33413         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
33414         fast method lookup.
33416 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
33418         * reflection.c: record the public key token of referenced assemblies.
33420 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
33422         * image.c, image.h: added functions to get the strong name and the
33423         public key of an assembly.
33424         * pedump.c: use them.
33426 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
33428         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
33430 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
33432         * marshal.c (mono_marshal_get_managed_wrapper): Added
33433         MONO_TYPE_BOOLEAN 
33435 2002-09-11  Martin Baulig  <martin@gnome.org>
33437         * gc.c: Call GC_unregister_disappearing_link() on all links when
33438         finalizing them, this is necessary to aviod a crash in boehm's
33439         finalize handler.
33441 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33443         * gc.c: handle GetTarget for finalized objects spotted and fixed by
33444         nick@chemlab.org.
33446 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
33448         * icall.c: implemented MonoType::Module.
33449         * reflection.c, reflection.h: mono_module_get_object () from
33450         Tomi Pakarinen <tomi.pakarinen@welho.com>.
33452 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
33454         * icall.c: ignore overridden methods in GetMethods ().
33455         Fix for FieldInfo::SetValue().
33456         * object.c: handle float/double in runtime invoke.
33458 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
33460         * object.c: allow a constructor to be called again on an object.
33462 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33464         * class.h, class.c: move field layout code to it's own function and
33465         export it. Get an interface id earlier. Move fields in MonoClass
33466         so they are more cache friendly and align the bitfields.
33467         * loader.c: temporary handle get_param_names() for a runtime method.
33468         * reflection.c, reflection.h: more code to handle runtime creation of
33469         types.
33471 2002-09-09  Martin Baulig  <martin@gnome.org>
33473         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
33474         signature with the pinvoke field being set for the actual call.
33476 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
33478         * icall.c: removed some unused icalls. Start of map of glib charsets
33479         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
33481 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
33483         * debug-helpers.c: break infinite loop (found and fixed by
33484         Holger Arnold <harnold@gmx.de>).
33486 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
33488         * icall.c: target may be null in create_delegate.
33490 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33492         * marshal.c: handle a boolean return type.
33494 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33496         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
33498 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
33500         * gc.c: fix weakreferences.
33502 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
33504         * icall.c: added icall to get default codepage.
33506 2002-09-03  Dick Porter  <dick@ximian.com>
33508         * threads.h: 
33509         * threads.c: Use MonoThread instead of MonoObject where
33510         apropriate.
33512         Store running thread objects in a hash table, so that we have all
33513         the info to hand when waiting for them to finish
33514         (means we don't need OpenThread() any more, so mingw builds should
33515         be fully functional again.)
33517         * verify.c:
33518         * object.h: Added thread ID to MonoThread
33520 2002-09-03  Martin Baulig  <martin@gnome.org>
33522         * icall.c (System.Reflection.Assembly::get_location): New interncall.
33524 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33526         * icall.c: fixed leak in get_temp_path. Thanks lupus.
33528 2002-09-03  Martin Baulig  <martin@gnome.org>
33530         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
33531         argument to store the end address of the disassembled instruction.
33533         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
33534         here from debug-symfile.h.
33535         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
33536         JIT into this struct.
33537         (MonoSymbolFile): Added `char *image_file' field.
33538         (MonoDebugGetMethodFunc): Removed.
33539         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
33540         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
33541         (mono_debug_find_method): New method.
33543         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
33544         create a full symbol file.
33545         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
33546         and static symbol files.
33547         (mono_debug_find_method): The symbol file keeps an internal method hash,
33548         call this to get a MonoDebugMethodInfo from a MonoMethod.
33550         * debug-symfile.[ch]: Removed.
33552 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
33554         * image.c (do_mono_image_open): Remove linker version check.
33556 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
33558         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
33559         wrappers for instance methods.
33560         
33561 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33563         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
33565 2002-08-28  Dick Porter  <dick@ximian.com>
33567         * Makefile.am: Export HOST_CC for w32 builds
33569 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
33571         * file-io.c process.c: MonoString are null terminated, no
33572         need for mono_string_to_utf16() anymore.
33574 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33576         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
33578 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
33580         * icall.c, reflection.h: speedup System.MonoType.
33582 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
33584         * reflection.c: allow null as the value of a string argument in
33585         custom attributes constructors.
33587 2002-08-27  Martin Baulig  <martin@gnome.org>
33589         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
33590         `trampoline_address' field.
33592 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
33594         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
33595         check (fixes bug #29486) 
33597 2002-08-27  Martin Baulig  <martin@gnome.org>
33599         * debug-mono-symfile.c: Changed the file format in a way that allows us
33600         open it read-only and to use a specially malloced area for all the
33601         dynamic data.  We can now also generate a symbol file on-the-fly if we're
33602         debugging IL code and there is no MCS generated symbol file for it.
33604 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
33606         * object.c: added a define for a good string and array
33607         creation speedup (not enabled by default because we need to deal with
33608         the synch stuff).
33610 2002-08-26  Martin Baulig  <martin@gnome.org>
33612         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
33613         function to create a dynamic symbol file.  This is used by the
33614         debugger to create a symbol file for IL code on-the-fly.
33616 2002-08-26  Martin Baulig  <martin@gnome.org>
33618         * loader.c (mono_lookup_pinvoke_call): Include the error message
33619         from g_module_error() in the error message.
33621 2002-08-24  Martin Baulig  <martin@gnome.org>
33623         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
33624         function to update the symbol file.  The symbol file is mmap()ed
33625         writable, but private.  This allows us to install the symbol file
33626         together with the assembly.
33628 2002-08-24  Martin Baulig  <martin@gnome.org>
33630         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
33631         but they can read the new symbol file format which mcs is now creating.
33633         * debug-symfile.c (mono_debug_find_source_location): Moved to
33634         debug-mono-symfile.c; this is now operating on the new symbol file.
33636 2002-08-23  Martin Baulig  <martin@gnome.org>
33638         * debug-helpers.c (mono_method_desc_from_method): New function to get
33639         a MonoMethodDesc from a MonoMethod.
33641 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
33643         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
33644         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
33646 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
33648         * string-icalls.[ch]: make helper methods static.
33650 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33652         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
33653         types to it and to SetValueInternal.
33655         * object.c: Moved handle_enum label to its proper place. This was the
33656         f... bug! ;-)
33658         This time i compiled mcs and gtk-sharp and they both work.
33660 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33662         * icall.c: reverted partially my previous patch until 
33663         object.c:set_value handles enums correcly.
33665 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33667         * icall.c:
33668         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
33669         (ves_icall_System_Environment_get_MachineName): removed warning when
33670         compiling under cygwin.
33672 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
33674         * object.c: fixed field_get_value() for reference types.
33676 2002-08-22  Dick Porter  <dick@ximian.com>
33678         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
33679         Don't free a buffer while it's still needed.  Patch from Jonathan
33680         Liger <Jonathan.liger@wanadoo.fr>
33682 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
33684         * icall.c (ves_icall_System_Environment_get_Platform): Add new
33685         internal call.
33687 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
33689         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
33690         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
33692         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
33693         we call unmanaged code which throws exceptions.
33695 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33697         * appdomain.h: added per-domain entry_assembly.
33698         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
33699         arguments.
33700         * icall.c: Assembly::GetEntryAssembly icall.
33701         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
33702         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
33704 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33706         * appdomain.h, gc.c: added mono_domain_finalize ().
33708 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33710         * object.c:
33711         (mono_print_unhandled_exception): changed g_warning by g_printerr
33712         because g_log has a 1024 characters limit (yeah, i got a big stack
33713         trace). Don't print exception name, that should be in ToString 
33714         returned string.
33716 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33718         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
33719         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
33721 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33723         * object.c:
33724         (mono_print_unhandled_exception): after previous commit, i realized
33725         that MS calls ToString on the exception. I changed this function to
33726         do that. This way we get stack_trace for free.
33728 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33730         * object.c:
33731         (mono_print_unhandled_exception): invoke Message property instead of
33732         getting 'message' field from Exception. Don't allocate memory for
33733         'trace' and 'message' if not needed.
33735 2002-08-18  Dick Porter  <dick@ximian.com>
33737         * unicode.c: Fix asserts to match Encoder.cs checks
33739 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33741         * marshal.c: fix unaligned store issue and a few wrong
33742         opcode argument types.
33744 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33746         * icall.c: added GetUninitializedObjectInternal internal call.
33748 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
33750         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
33751         to the right domain.
33753 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
33755         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
33757         * class.c (class_compute_field_layout): set blittable to false for Strings
33759         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
33761 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33763         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
33764         first chunk of code to create types at runtime. Code to
33765         handle ReflectedType/DeclaringType. Make reflection handles
33766         domain specific.
33768 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
33770         * class.c: set correct name in arrays.
33772 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
33774         * appdomain.c (mono_domain_transfer_object): make it work with
33775         valuetypes. bug fixes.
33777 2002-08-12  Dick Porter  <dick@ximian.com>
33779         * object.h: Rename some parameters to avoid c++ keywords (Patch
33780         from Joseph Wenninger <kde@jowenn.at>)
33782 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
33784         * icall.c: added icall to implement Assembly.GetFile*.
33786 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33788         * reflection.h, reflection.c: code to embed managed resources.
33790 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
33792         * class.c: move all the type size stuff into
33793         class_compute_field_layout().
33795 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33797         * class.c: ensure enums have always the correct instance size.
33798         * unicode.c: remove wrong assert.
33800 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
33802         * assembly.c: fix mem corruption issue.
33803         * image.h, image.c: added mono_image_get_resource () to access
33804         managed resources.
33805         * icall.c: implemented Assembly.EntryPoint property and some
33806         Managed Resources related internalcalls.
33809 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
33811         * image.c, image.h: impemented mono_image_get_entry_point ().
33812         * appdomain.c: use mono_image_get_entry_point.
33814 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33816         * reflection.c: support the object type argument when loading
33817         custom attributes.
33819 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
33821         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
33822         String as return type.
33824 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
33826         * reflection.c: fix encoding of named args for custom attrs to match
33827         the ms implementation. Read them back when instantiating custom
33828         attributes.
33830 2002-08-02  Radek Doulik  <rodo@ximian.com>
33832         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
33833         by Dietmar as quick fix
33834         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
33835         16 as stack size, used on more places as quick fix before Dietmar
33836         will fix it properly
33838 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33840         * object.h, object.c: added accessors for fields and properties.
33842 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33844         * class.c, class.h: made mono_class_get_field_from_name ()
33845         loop on parent types.
33846         Added mono_class_get_property_from_name ().
33848 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
33850         * class.c, class.h: move the code to setup the type vtable in its own
33851         function so that it can be reused also for types created at runtime.
33852         Eliminate the "class" identifier from the header file.
33853         * reflection.c: setup the vtable for enums so that we can create
33854         objects for use in SetConstant ().
33856 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
33858         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
33859         instead of the delegate itself as this pointer (bug #28383)
33861 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
33863         * marshal.c (mono_marshal_get_managed_wrapper): added return type
33864         conversions.
33866 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
33868         * loader.c: don't set the pinvoke bit on icalls.
33870 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
33872         * debug-helpers.c (mono_method_full_name): only print a number to
33873         indicate wrapper type (so that the output is more readable in traces).
33875 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
33877         * class.c (mono_class_init): include method override patch from Paolo
33879 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
33881         * icall.c: fixed GetTypeCode().
33883 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
33885         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
33886         use real delegate invoke function to make it work with multicast
33887         delegates (fix bug# 28291).
33889 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
33891         * object.c: load constant strings.
33893 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
33895         * reflection.c: no magic numbers.
33896         * tabledefs.h: security action enum.
33898 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
33900         * assembly.c: fix possible memory corruption.
33902 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
33904         * reflection.h, reflection.c: added support for linking resources.
33905         * verify.c: check we have an updated corlib.
33907 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
33909         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
33910         string arrays.
33911         (mono_marshal_string_array): null terminate unmanaged string arrays.
33912         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
33914 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
33916         * icall.c: Type.GetType () can now return also types from the
33917         calling assembly.
33919 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
33921         * loader.h, loader.c: stack walking support.
33922         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
33923         GetCallingAssembly.
33925 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
33927         * marshal.c: added optimisations for blittable types 
33929         * class.c (mono_array_class_get): do not set blittable attribute on arrays
33930         (mono_class_setup_mono_type): set blittable attribute for single
33931         and double.
33933         * marshal.c (mono_string_utf8_to_builder): impl.
33934         (mono_string_builder_to_utf8): impl.
33935         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
33937 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
33939         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
33940         (mono_marshal_get_managed_wrapper): impl. byref types
33942 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
33944         * icall.c:
33945         (search_method): don't display debug message. 
33947 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
33949         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
33951 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
33953         * appdomain.c: set the missing filename when throwing exception.
33955 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
33957         * metadata.c (mono_type_size): code cleanup
33958         (mono_type_stack_size): removed some test code
33960 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
33962         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
33963         mono_get_exception_file_not_found now.
33965         * exception.c (mono_exception_from_name_two_strings): New version
33966         that will call a constructor with two string arguments. 
33967         (mono_get_exception_file_not_found): New helper routine, used to
33968         report file-not-found errors.
33970 2002-07-20  Dick Porter  <dick@ximian.com>
33972         * process.h:
33973         * process.c: Pass file handles to CreateProcess
33974         
33975         * icall.c:
33976         * file-io.h:
33977         * file-io.c: Implemented CreatePipe
33979 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
33981         * metadata.c (mono_get_param_info): set alignment for value types
33983 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33985         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
33986         Constify mono_domain_assembly_open().
33987         * loader.c: handle null namespace in icalls.
33989 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
33991         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
33992         (emit_str_to_ptr_conv): marshal object as structs
33994         * metadata.c (mono_type_to_unmanaged): marshal object as structs
33996         * marshal.c (mono_marshal_get_runtime_invoke): support value types
33998 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
34000         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
34001         (mono_marshal_get_native_wrapper): we an now return value types
34003 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34005         * verify.c: more checks implemented.
34007 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
34009         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
34010         (fix bug #27695)
34011         (mono_marshal_get_native_wrapper): allow byref arguments
34012         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
34013         impl. PtrToStringXXX methods
34014         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
34015         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
34016         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
34017         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
34018         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
34020 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
34022         * reflection.c: fix buglet in parsing an assembly name.
34024 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
34026         * marshal.c (emit_ptr_to_str_conv): first impl.
34028 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
34030         * object.c, class.h: cache the vtable in the class as suggested by
34031         vargaz@freemail.hu (Zoltan Varga).
34033 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
34035         * class.h, loader.c: added mono_field_from_token().
34036         * verify.c: first cut of type checking code.
34038 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
34040         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
34042 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
34044         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
34045         (fix bug #27782)
34046         (mono_marshal_get_remoting_invoke): impl.
34047         (mono_delegate_begin_invoke): impl.
34048         (mono_mb_emit_save_args): impl.
34049         (mono_delegate_end_invoke): impl.
34050         (mono_marshal_get_delegate_begin_invoke):
34051         (mono_marshal_get_delegate_end_invoke):
34052         (mono_marshal_get_delegate_invoke): generate a special name for
34053         those methods (including the signature) and associate them whith
34054         the delegate class. 
34056 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
34058         * reflection.[ch]: 
34059         (mono_reflection_type_from_name): now it has a MonoImage parameter
34060         which is used as the default image to search the type in. If the image
34061         is NULL or getting the type from it fails, it defaults to corlib.
34063         * icall.c: changed 1 call to mono_reflection_type_from_name to match
34064         new parameter.
34066 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34068         * reflection.c: update the parameter table index.
34070 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
34072         * domain.c: don't include the mark byte in the string hash.
34074 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
34076         * icall.cs: icall for Type.GetTypeCode ().
34077         * verify: a couple of fixes and disabled local initialization checks.
34079 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
34081         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
34083         * debug-helpers.c (mono_method_full_name): print the type of the
34084         runtime wrapper
34086         * metadata.c (mono_signature_hash): a hash function for signatures
34087         (mono_signature_hash): better hash algorithm
34089         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
34091         * debug-helpers.c (mono_method_full_name): this can now generate
34092         method names with signatures
34094         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
34095         method dont have this pointers.
34097 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
34099         * reflection.c: fixup typebuilder tokens.
34100         * image.c: fix buglet.
34101         * marshal.h: remove whitespace.
34102         * metadata.h, metadata.c: reinstate code that was removed.
34103         * verify.c: handle catch directives and fix another couple of bugs.
34105 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
34107         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
34108         (mono_marshal_get_native_wrapper): make it comp. with the old code
34109         (mono_marshal_get_native_wrapper): support boolean
34110         (mono_marshal_get_managed_wrapper): support more types
34112 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
34114         * class.c (class_compute_field_layout): compute class->blittable attribute.
34116 2002-07-09  Dick Porter  <dick@ximian.com>
34118         * threads.c: Make the thread cleaning up cope with threads that
34119         call ExitThread()
34121 2002-07-08  Radek Doulik  <rodo@ximian.com>
34123         * reflection.c (method_encode_code): use non-translated values to
34124         compute finally_start, this fixes exception handling on ppc, yay!
34126         * decimal.h (struct signscale): fix endianess
34128 2002-07-07  Radek Doulik  <rodo@ximian.com>
34130         * reflection.c: swap box_val and not val
34132 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
34134         * reflection.c, reflection.h: handle full assembly info in type name.
34135         Handle Type arguments when loading custom attributes.
34136         * icall.c: updated to use new mono_reflection_type_from_name () method.
34138 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
34140         * loader.c:
34141         (method_from_memberref): also print assembly name when method not found.
34143 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
34145         * icall.c:
34146         (ves_icall_TypeGetProperties): fixed bug #27473. 
34148 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
34150         * reflection.c: display image name and token when cannot find the
34151         .ctor for an attribute.
34153 2002-07-05  Martin Baulig  <martin@gnome.org>
34155         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
34157 2002-07-04  Dick Porter  <dick@ximian.com>
34159         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
34160         compile on mingw.  This will cause mingw builds to not wait for
34161         subthreads to terminate after the main thread does.  I've lodged a
34162         bug with the mingw developers for them to wrap OpenThread().
34164 2002-07-03  Dick Porter  <dick@ximian.com>
34166         * threads.c: Store thread IDs instead of handles, because
34167         GetCurrentThread() returns a pseudohandle and therefore stores
34168         useless values.  mono_thread_cleanup() continues checking the
34169         array of threads until it is empty, to cope with subthreads
34170         spawning new threads after the main thread has finished.
34172         * profiler.h:
34173         * profiler.c:
34174         * profiler-private.h: Pass the thread ID to thread profiler
34175         functions, instead of a handle
34177 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34179         * verify.c: fixes to make it more usable.
34180         * pedump.c: added --verify code to verify IL code in an assembly.
34182 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34184         * reflection.c: turn errors into warnings to allow compiling corlib.
34186 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
34188         * reflection.c: add special cases to compile corlib.
34190 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
34192         * reflection.c: handle properties with only a set method.
34194 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34196         * opcodes.h: add enum with opcodes in opval order.
34198 2002-07-01  Dick Porter  <dick@ximian.com>
34199         
34200         * object.h:
34201         * object.c (mono_runtime_run_main): Removed unneeded argument
34203 2002-06-28  Martin Baulig  <martin@gnome.org>
34205         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
34207 2002-06-27  Dick Porter  <dick@ximian.com>
34209         * threads.c: Store the handle in both the parent thread and in the
34210         subthread, to minimise the time between starting a new thread and
34211         storing its ID.
34213 2002-06-26  Dick Porter  <dick@ximian.com>
34215         * appdomain.c (mono_runtime_cleanup): Close the socket library
34216         after all the threads have finished, not before
34218 2002-06-26  Martin Baulig  <martin@gnome.org>
34220         * debug-symfile.c (mono_debug_find_source_location): Added
34221         `guint32 *line_number' argument.  If it's not NULL, store the line number
34222         there and return the file name without the line number.
34224 2002-06-25  Dick Porter  <dick@ximian.com>
34226         * icall.c:
34227         * process.h:
34228         * process.c: Process forking and other support functions
34230 2002-06-25  Dick Porter  <dick@ximian.com>
34232         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
34233         things dont happen when the image is closed.
34234         (mono_image_lookup_resource): Walk the resource section looking
34235         for a particular entry
34237         * cil-coff.h: PE resource section decoding
34239 2002-06-25  Dick Porter  <dick@ximian.com>
34240         
34241         * assembly.h:
34242         * assembly.c: 
34243         (mono_assembly_foreach): Accessor functions to walk the list of
34244         loaded assemblies
34245         (mono_assembly_set_main):
34246         (mono_assembly_get_main): Process methods need to know which
34247         assembly is the "main" one
34249         * object.c (mono_runtime_run_main): Record the main assembly
34251         * debug-helpers.c: Fix typo
34253 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
34255         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
34256         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
34258 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34260         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
34262 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
34264         * image.c (do_mono_image_open): Initialize reference count,
34265         otherwise we leak the MonoImage.
34267 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
34269         * reflection.c: small tweak to handle self-hosting.
34271 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
34273         * reflection.c: fix type name parse code.
34275 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
34277         * reflection.c: break out of the loop.
34278         * image.c: special case corlib.
34280 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34282         * reflection.c: add all the custom attrs at the end to ensure the
34283         ctors have been properly initialized when the attributes are defined
34284         in the current assembly.
34286 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
34288         * reflection.c: handle correctly multiple-nested types.
34290 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
34292         * row-indexes.h: fix typos.
34293         * reflection.c: adjust for typos and fix method_def_or_ref
34294         encoding in MethodImpl table.
34296 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34298         * reflection.c: fix entry point patching (thanks Serge!).
34300 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
34302         * verify.c: add check for System.Exception
34304 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
34306         * image.c, class.c: minifix for code just c&p'ed.
34307         * reflection.c: warning fix.
34308         * object.h, loader.h, domain.c: load also StringBuilder.
34310 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
34312         * marshal.h, marshal.c: some support code to handle complex marshaling.
34314 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34316         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
34317         Better signatures with vtable error dump.
34319 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
34321         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
34323 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
34325         * icall.c (ves_icall_Type_GetField): impl.
34327 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34329         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
34330         to retrieve a marshal description blob for a field or param.
34332 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
34334         * reflection.h, reflection.c: change order of nested type emission
34335         to avoid table corruption. The NestedTypes table is sorted.
34336         * icall.c: change order of GetConstructor results to workaround mcs bug.
34338 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34340         * reflection.h, reflection.c: handle field and param marshal
34341         information.
34343 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
34345         * icall.c, marshal.c marshal.h: more Marshal class implementation.
34347 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34349         * reflection.c: fix call convention.
34351 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34353         * reflection.h, reflection.c: mono_image_get_memberref_token()
34354         takes a type instead of a class, now. Added
34355         mono_image_get_array_token() to create tokens for the special
34356         multi-dim array methods.
34358 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
34360         * assembly.c: handle modules (no assembly table). Split
34361         loading references in its own function.
34362         * class.c: handle moduleref resolution scope.
34363         * image.c, image.h: cache module name in image.
34365 2002-06-07  Martin Baulig  <martin@gnome.org>
34367         * reflection.c (mono_image_get_type_info): Only add a class layout entry
34368         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
34370 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34372         * icall.c: more signature fixes that used uint instead of int.
34374 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34376         * reflection.c: fixed signature of field refs.
34378 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34380         * class.c, reflection.c: handle typerefs of nested types
34381         (both on read and when writing files).
34383 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
34385         * icall.c: fix method signatures that tried to workaround the previous
34386         typo, d'oh!
34388 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
34390         * debug-helpers.c: fix typo.
34392 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
34394         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
34395         rewrote the PE/COFF writing code (our programs are understood by the
34396         ms runtime, now).
34398 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
34400         * gc.c, gc.h, icall.c: weakreference support.
34402 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34404         * Makefile.am, mono-config.c: use $(sysconfdir).
34406 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
34408         * icall.c: changed default precision of Double.ToString() to 15.
34409         Fixed memory leak. Unified with Single.ToString.
34411 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
34413         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
34415 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
34417         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
34418         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
34419         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
34420         and myself.
34422 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34424         * debug-symfile.c, sysmath.c: yet more compilation fixes.
34426 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34428         * reflection.c, socket-io.c: more compilation fixes.
34430 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34432         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
34433         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
34434         unicode.c: warning and compiler compatibility fixes.
34436 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34438         * class.h, metadata.c: fixed warnings/compilation errors.
34440 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34442         * Makefile.am, mono-config.c, mono-config.h: configuration file
34443         support routines.
34444         * loader.c, loader.h: make Dll mapping configurable at runtime in the
34445         config file. Export methods to insert and lookup mappings.
34447 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
34449         * reflection.c: handle types and boxed objects in custom attr
34450         constructors.
34452 2002-05-30  Martin Baulig  <martin@gnome.org>
34454         * debug-symfile.c
34455         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
34457 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
34459         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
34460         to lookup the implmap row for a P/Invoke method.
34461         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
34462         P/Invoke method from the runtime on an as needed basis.
34464 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
34466         * metadata.c (mono_metadata_parse_signature): impl.
34468 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34470         * class.c: handle .pack directive.
34472 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
34474         * object.c: initialize static fields with RVA data.
34476 2002-05-25  Martin Baulig  <martin@gnome.org>
34478         * debug-symfile.c
34479         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
34481 2002-05-24  Martin Baulig  <martin@gnome.org>
34483         * debug-symfile.c
34484         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
34485         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
34486         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
34488 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
34490         * object.c: special case string ctros in invoke.
34491         * gc.c: silly whitespace changes.
34493 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
34495         * threadpool.[ch]: impl. a threadpool that can
34496         be used by mint and mono.
34498 2002-05-22  Martin Baulig  <martin@gnome.org>
34500         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
34501         The first argument is now a `MonoReflectionModuleBuilder *', the return
34502         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
34503         `methods' field to get the method builder.  The `token' argument is the
34504         unfixed token.
34506         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
34507         invalid characters instead of g_assert_not_reached()ing.  This seems
34508         to be the behaviour of mscorlib.
34510 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
34512         * object.c (mono_runtime_invoke_array): applied patch from Rachel
34513         Hestilow to fix bug #25104
34515 2002-05-21  Martin Baulig  <martin@gnome.org>
34517         * debug-symfile.c (mono_debug_find_source_location): New function.
34518         Looks up an IL offset in the line number table and returns the source
34519         location as a string.
34521 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
34523         * icall.c:
34524         (mono_double_ToStringImpl): changed %f by %g until we have something
34525         better.
34527 2002-05-21  Nick Drochak  <ndrochak@gol.com>
34529         * icall.c : Use different name for Math.Pow's icall.  Needed to check
34530         parameters first in C#.
34532 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34534         * icall.c, reflection.h: added icall to get info about an event.
34536 2002-05-20  Radek Doulik  <rodo@ximian.com>
34538         * object.c (mono_value_box): don't use memcpy for boxing on BIG
34539         endian
34540         (mono_value_box): don't use memcpy for small sizes on
34541         architectures with unaligned access
34543 2002-05-20  Martin Baulig  <martin@gnome.org>
34545         * reflection.c (mono_reflection_setup_internal_class): Don't crash
34546         if `tb->parent == NULL'.
34547         (mono_reflection_create_internal_class): New function.  This is
34548         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
34549         for enum types.
34551         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
34552         New interncall.
34554 2002-05-19  Martin Baulig  <martin@gnome.org>
34556         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
34557         argument to get the length, don't default to the array length.
34559 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
34561         * assembly.c (mono_assembly_setrootdir): New function used to
34562         override the MONO_ASSEMBLIES directory.
34564 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34566         * icall.c: ValueType_GetHashCode() initialize local var.
34568 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34570         * reflection.c: sort custom attributes table.
34572 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
34574         * reflection.c: support named args in custom attributes (write support).
34576 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
34578         * reflection.c: fix finally position calculation.
34580 2002-05-15  Radek Doulik  <rodo@ximian.com>
34582         * reflection.c: fixed endianess at many places
34584         * icall.c (ves_icall_InitializeArray): comment out debug msg
34586 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
34588         * object.c (mono_unhandled_exception): new function to handle
34589         unhandled exceptions.
34590         (mono_unhandled_exception): call the UnhandledException event.
34591         (mono_runtime_delegate_invoke): impl.
34593 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
34595         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
34596         returns the RVA, not the direct pointer to the data. Handle the case
34597         when the class size is fixed.
34599 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
34601         * reflection.c: fix some endianess issues.
34603 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
34605         * object.c (mono_runtime_invoke): is now able to catch exceptions.
34607         * threads.c (mono_thread_init): added a callback which is invoked
34608         at thread start.
34610 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
34611         
34612         * icall.c: make GetHashCode return non-negative values.
34614 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
34616         * object.c, icall.c, gc.c: revert to address-based hashcode.
34618 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
34620         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
34622 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34624         * icall.c, class.c: special case <Module>.
34626 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
34628         * icall.c: fix bug in GetNow().
34630 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
34632         * object.c (mono_runtime_class_init): make sure that we call all
34633         static class constructors.
34635 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
34637         * reflection.c: sort methodsemantics table.
34639 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
34641         * reflection.h, reflection.c: honour init locals setting.
34643 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
34645         * icall.c: copied Double ToStringImpl for Single ToStringImpl
34647 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
34649         * reflection.c: support ContructorBuilders in attribute blob creation.
34651 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34653         * reflection.c: some changes to build a binary that can be run
34654         directly in windows.
34656 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
34658         * loader.c: print a big message when an icall can't be found.
34660 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
34662         * string-icalls.c: fix bug 24248.
34664 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
34666         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
34667         icall.c, reflection.h: separate assembly loading by pathname and by
34668         assembly name. Use the MONO_PATH env var to search for assemblies.
34670 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34672         * assembly.c, image.h: add some support for assemblies
34673         with multiple modules.
34674         * class.c, class.h: export mono_class_from_typeref().
34675         * loader.c: remove duplicated code and use mono_class_from_typeref(),
34676         instead.
34678 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34680         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
34681         documentation says (the ECMA one is correct).
34683 2002-05-02  Dick Porter  <dick@ximian.com>
34685         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
34686         Don't name the synchronisation mutex.
34688 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
34690         * rand.c
34691         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
34692         Make the prototypes match.
34693         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
34694         Same.
34696         * icall.c
34697         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
34698         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
34699         all systems have tm.tm_zone, so use strftime() with %Z to print
34700         the timezone abreviation into a temp string.
34702         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
34703         rather than mono_array_addr() on a MonoString on Big Endian
34704         machines.
34706 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
34708         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
34709         fix bug 24041
34711 2002-04-30  Dick Porter  <dick@ximian.com>
34713         * socket-io.c: Cope with SOCKET being an integer rather than a
34714         pointer now.
34716         * threads.c: Added Thread_free_internal, to deal with thread
34717         handle cleanup.  Moved calls to handle_store() and handle_remove()
34718         to start_wrapper(), so each can only be called once.  Allocate
34719         synchronisation blocks with GC_malloc(), and use GC finalisation
34720         to close the handles.
34722         * icall.c: added System.Threading.Thread::Thread_free_internal
34724 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
34726         * icall.c: support Environment.Exit, CommandLineArgs().
34728 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
34730         * object.c, object.h: added mono_runtime_run_main () and
34731         mono_runtime_get_main_args () for use in System.Environment.
34733 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34735         * gc.c: fix thinko, enable actual finalization since the jit is now
34736         fixed.
34738 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34740         * gc.c, object.c: take into account that an object may be offset wrt the address
34741         returned by GC_malloc().
34743 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
34745         * image.c: handle files without entries in the assembly table (modules).
34747 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
34749         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
34750         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
34751         allowed to be null when it's System.Object class setup.
34753 2002-04-27  Martin Baulig  <martin@gnome.org>
34755         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
34756         if `tb->parent == NULL' rather than crashing.
34758 2002-04-28  Nick Drochak  <ndrochak@gol.com>
34760         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
34761         calling acos() where asin() should have been called.
34763 2002-04-26  Martin Baulig  <martin@gnome.org>
34765         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
34766         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
34767         there's a subdirectory called `System', but we don't want to read that
34768         subdirectory as an assembly.
34770 2002-04-25  Martin Baulig  <martin@gnome.org>
34772         * debug-symfile.c: Reflect latest MonoString changes.
34774 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
34776         * rand.c, rand.h: instance method icalls need to have an explicit
34777         this pointer as first argument in the C implementation.
34779 2002-04-25  Nick Drochak <ndrochak@gol.com>
34781         * icall.c: Fix typo in map for GetNonZeroBytes
34783 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
34785         * string-icalls.c : String does now passes unit tests without any 
34786         errors, the following changes has been made:
34787         
34788         Implemented replace methods.
34789         Renaming of methods to (try) follow the standard.
34790         Fixed compare ordinal
34791         Made all memory allocated directly to function instead of via icall function.
34792         Small performance fix in is_in_array function
34793                         
34794  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
34796         c (mono_string_Internal_ctor_charp_int_int):
34797         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
34798         sindex < 0, throw ArgumentOutOfRangeException instead of
34799         ArgumentNullException.
34801         Added new check for length == 0, however
34802         I need to make it return String.Empty from the C code.
34803         
34804         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
34805         that calculate the length for us here.
34806         
34807         (mono_string_Internal_ctor_sbytep_int_int): Replaced
34808         mono_string_new_utf16 with mono_string_new, since value is utf8.
34810 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34812         * object.c: register the object for finalization if needed.
34813         Allocate one more char in the string for the terminating 0 char.
34815 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
34817         * class.c, class.h, image.c: check if a type implemenst a destructor.
34818         Use the proper key for array class lookups.
34819         * icall.c: register the icalls in the System.GC class.
34820         * gc.c, gc.h: GC-related functions and icalls.
34822 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
34824         * icall.c:
34825         * socket-io.c:
34826         * unicode.c: free some strings gotten from mono_string_to_utf8 and
34827         changed a couple of free () by g_free ().
34829         * decimal.c: one-liner in the comments for decimal2string ().
34831 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
34833         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
34835 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
34837         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
34838         * object.c (mono_runtime_invoke_array) : handle null in params
34840 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
34842         * string-icalls.c: fixed bug in split (one off bug)
34844 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
34846         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
34847         * icalls.c: added String::Equals as internal method
34849 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
34851         * threads.c: fixed bug in the double interlocked functions
34853 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
34855         * threads.c: implemented all of the new interlocked icalls.
34856         * string-icalls.c: fix a bug in insert.
34857         * icalls.c: added the icalls for interlocked, removed old string functions.
34858         
34859 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
34861         * loader.c: fix off-by-one error when reading argument names.
34863 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34865         * profiler.c: win32 counter implementation (untested).
34866         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
34867         (the latter needs testing and more complete impl. from win32 folks).
34869 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
34871         * object.c: mono_array_new_full workaround mono_array_class_get
34872         problem.
34874 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
34876         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
34877         * object.h (mono_string_chars): Changed casting type.
34879 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
34881         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
34882                            method signatures to use gunichar2 instead of gint16.
34884 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
34886         * object.h, object.c: domain-specific versions of mono_object_new and
34887         mono_array_new.
34889 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
34891         * object.c: changed String layout
34893         * string-icalls.c (mono_string_Internal_ctor_chara): added
34894         internal string constructors.
34896 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
34898         * threads.c: pass 'this' to the thread start routine.
34900 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
34902         * string-icalls.c: fix IndexOf and LastIndexOf. Now
34903         InternalCompareStr don't call twice mono_string_cmp_char for the last
34904         character. Improved performance in mono_string_cmp_char.
34906 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
34908         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
34909         code into its own library: libmonoruntime.
34911 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
34913         * object.h, object.c: changed array format so that szarrays do not
34914         require a bounds structure.
34915         * icall.c, appdomain.c: support for new szarray format.
34917 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
34919         * metadata.c: compare also the retuns type when comparing signatures:
34920         we didn't do this as an optimization since really overloaded methods
34921         must differ also in the arguments, but this doesn't work with
34922         low-level IL code (or when using explicit conversion operators: see
34923         bug#23498 for an example).
34925 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34927         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
34929 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
34931         * icall.c: make MonoType::GetElementType its own icall.
34933 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34935         * icall.c: remove MonoMethod_get_Name().
34936         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
34937         object.
34939 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
34941         * string-icalls.c: optimized a few methods.
34943 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
34945         * icall.c: added all new string internal calls
34946         * string-icalls.c: added, new string internal call implementation.
34947         * object.c: added mono_string_new_size for allocating a string a size
34949 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
34951         * object.c (mono_object_isinst): use the same code as in the
34952         optimized x86 version.
34954 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34956         * profiler.c: TSC-based timer code (faster and more accurate).
34957         Not hooked up in configure, yet (set USE_X86TSC to 1).
34959 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
34961         * profiler.c, profiler.h: track time spent compiling methods.
34962         * threads.c: track thread creation/destruction.
34964 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
34966         * profiler.c, profiler.h, profiler-private.h: profiling interface
34967         and sample implementation. Moved here so that it can be used also by
34968         the jit.
34970 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
34972         * reflection.c, reflection.h: keep types and other handles separate in
34973         the hash tables for referred tokens. Add guid for modules.
34975 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
34977         * assembly.c: fix bugs found with valgrind.
34978         * metadata.h, metadata.c: added mono_metadata_guid_heap().
34980 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
34982         * threads: added icall support for getting current domain for
34983                    the thread.
34985 2002-04-13  Martin Baulig  <martin@gnome.org>
34987         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
34988         (MonoDebugVarInfo): Added `index' field for register based addresses.
34989         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
34990         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
34991         `MonoDebugVarInfo *params' and `guint32 this_offset' with
34992         `MonoDebugVarInfo *this_var'.
34994         * debug-symfile.c (relocate_variable): New static function to write
34995         a location description for a local variable or method parameter.
34997 2002-04-12  Martin Baulig  <martin@gnome.org>
34999         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
35000         stack offset and begin/end scope address of a local variable.
35001         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
35002         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
35003         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
35005         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
35006         Added new relocation types for start/end scope of a local variable.
35008 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
35010         * object.h: add mono_object_domain() macro.
35011         * reflection.c: handle typespecs.
35012         * icall.c: MonoMethod::get_Name() implementation.
35014 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
35016         * icall.c: String::GetHashCode() icall implementation.
35018 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
35020         * icall.c: String::IndexOfAny icall.
35021         * object.c, object.h: make array->max_length more useful.
35022         Intrduced mono_object_class() and mono_string_length() macros.
35024 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
35026         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
35027         instead of g_unichar_isdigit.
35029 2002-04-11  Nick Drochak  <ndrochak@gol.com>
35031         * icall.c: Implement a simple Double.ToString().
35033 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
35035         * appdomain.h: only io-layer.h is supposed to be included.
35036         * icall.c: explicitly import environ. Fix warning.
35038 2002-04-10  Nick Drochak  <ndrochak@gol.com>
35040         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
35041                 return true even if it's not Daylight Savings time.
35042                 Only return false for the case where the function isn't
35043                 implemented for a plaform (read Windows).
35045 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
35047         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
35048         data with a mutex.
35050 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
35052         * mempool.c (mono_mempool_alloc): only use g_malloc when
35053         absolutely necessary.
35055 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
35057         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
35059         * class.c (mono_class_vtable): use domain mempool to allocate vtable
35060         (mono_class_proxy_vtable): use domain mempool
35062 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
35064         * appdomain.h, appdomain.c: split initialization that requires the
35065         execution engine support into mono_runtime_init().
35067 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
35069         * class.c (mono_class_init): don't include vtable inside MonoClass
35070         to save some memory, gather some statistics.
35071         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
35073 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
35075         * icall.c: internalcall implementation for ValueType.Equals().
35077 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
35079         * object.c (mono_message_init): moved 
35080         (mono_runtime_exec_main): new arch. independent impl.
35081         (mono_runtime_invoke_array): new method - like
35082         mono_runtime_invoke, but you can pass an array of objects.
35083         (mono_remoting_invoke): new arch. independent impl.
35084         (mono_message_invoke): new arch. independent impl.
35085         (mono_runtime_class_init): new arch. independent impl.
35086         (mono_runtime_object_init): new arch. independent impl.
35088 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
35090         * metadata.c, object.c, reflection.c: documented the exported
35091         functions.
35093 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
35095         * icall.c: simpler code to pass the assembly builder data to corlib.
35096         Implement GetNestedTypes() internalcall.
35098 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
35100         * class.c: warn if a type can't be loaded.
35102 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
35104         * image.h: typedef MonoImageOpenStatus
35105         * types.h: removed unused file
35106         
35107 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
35109         * icall.c: Enum_ToObject accepts enum value arguments.
35111 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
35113         * class.c: move initialization of properties, events and nested
35114         classes, so that they happen for interfaces, too.
35116 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
35118         * icall.c: cleanup some ugly casts in Array_SetValue*.
35120 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
35122         * icall.c: the values array fro enums is of the correct type, now.
35123         Implement (correctly) getFullName instead of assQualifiedName for
35124         MonoType.
35125         * reflection.h, reflection.c: added mono_type_get_name ().
35127 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
35129         * assembly.c, image.h: for each MonoImage, record from wich assembly
35130         it was loaded.
35131         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
35132         Make Type.Assembly work.
35134 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
35136         * debug-symfile.h: use char* instead of gpointer to avoid
35137         unnecessary casts.
35139         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
35141         * icall.c (ves_icall_InternalExecute): impl. FielSetter
35142         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
35144 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
35146         * icall.c (mono_message_init): impl. (code cleanup)
35147         (ves_icall_InternalExecute): impl. FieldGetter
35149         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
35150         defined we call all (non-static)methods through the vtable. 
35152 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
35154         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
35155         finalizer even though the memory is still referenced (and the chunk of
35156         memory is not freed).
35158 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
35160         * assembly.c: fix brokeness.
35162 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
35164         * class.c: kill some warnings. Check explicit interface method
35165         implementation also without considering the namespace.
35166         Load also literal strings in static class data.
35168 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
35170         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
35171         (default_assembly_name_resolver): Make the resolver take the
35172         "base" directory where the assembly was originally defined, so we
35173         can load DLLs that are in the same directory as the assembly that
35174         is being referenced.
35176 2002-03-28  Dick Porter  <dick@ximian.com>
35178         * file-io.h: 
35179         * file-io.c:
35180         * socket-io.c: 
35181         * unicode.h: 
35182         * unicode.c: Warning cleanups
35184 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
35186         * object.h, reflection.h: use the correct type instead of MonoObject.
35188 2002-03-28  Martin Baulig  <martin@gnome.org>
35190         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
35191         (mono_debug_update_symbol_file): Initialize classes if necessary.
35193 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
35195         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
35196         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
35198 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
35200         * assembly.h: fix function prototype.
35201         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
35202         * mono-endian.h: use const cast.
35204 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
35206         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
35208 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
35210         * loader.c: don't assert when a typeref can't be loaded, give
35211         a chance to the runtime to trow an exception instead.
35212         * loader.h: fix warning.
35214 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
35216         * class.c (mono_class_proxy_vtable): added proxy support
35218 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
35220         * icall.c: removed last of PAL calls, added System.Environment
35221         * file-io.h, file-io.c: MonoIO implementation
35222         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
35224 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
35226         * appdomain.c: do not use the byte marker in ldstr table lookup.
35227         * debug-helpers.c: allow two ':' to separate class and method name.
35228         * object.c: allocate arrays bounds with the GC, too.
35229         * verify: add a few more checks.
35231 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
35233         * reflection.c: output also literal strings. Allocate parameter data
35234         with GC_malloc() (thanks, Martin, for catching this!).
35236 2002-03-26  Martin Baulig  <martin@gnome.org>
35238         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
35239         include the `this' offset in the `param_offsets'.
35241 2002-03-25  Martin Baulig  <martin@gnome.org>
35243         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
35244         mono_debug_get_class() function to get the classes. Added new
35245         relocation types for arrays and strings.
35246         (mono_debug_get_class): New static function to search in all
35247         referenced assemblies for a metadata token.
35249         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
35251 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
35253         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
35254         hold gc-allocated objects. Make the string heap a stream like the
35255         others. Removed duplicated code when writing stream info.
35256         Added asserts to catch possible buffer overflows. Set the sorted map
35257         for tables that need sorting. Added some documentation.
35259 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
35261         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
35262         for interned strings and vtables.
35264 2002-03-24  Martin Baulig  <martin@gnome.org>
35266         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
35267         it in the array since it was created with g_slist_prepend().
35269 2002-03-24  Martin Baulig  <martin@gnome.org>
35271         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
35272         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
35273         (mono_debug_method_from_token): Renamed to
35274         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
35275         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
35277         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
35278         relocation types.
35280         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
35282 2002-03-24  Martin Baulig  <martin@gnome.org>
35284         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
35285         (mono_debug_method_from_token): New func.
35287         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
35288         New interncall, calls mono_debug_local_type_from_signature().
35289         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
35290         calls mono_debug_method_from_token().
35292 2002-03-23  Martin Baulig  <martin@gnome.org>
35294         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
35295         specifies the number of bytes to be converted, not the array size.
35296         Return the number of chars, not the number of bytes.
35297         (ves_icall_iconv_get_chars): The `byteCount' argument
35298         specifies the number of bytes to be converted, not the array size.
35300 2002-03-23  Martin Baulig  <martin@gnome.org>
35302         * reflection.h (MonoReflectionSigHelper): New type.
35304         * reflection.c (mono_reflection_sighelper_get_signature_local),
35305         (mono_reflection_sighelper_get_signature_local): New functions.
35307         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
35308         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
35309         interncalls.
35311 2002-03-23  Martin Baulig  <martin@gnome.org>
35313         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
35314         is_writeable is set.
35315         (mono_raw_buffer_update): New function to write the modified map
35316         back to disk.
35318         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
35320         * debug-symfile.c (mono_debug_update_symbol_file): Call
35321         mono_raw_buffer_update() when done writing.
35323 2002-03-23  Martin Baulig  <martin@gnome.org>
35325         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
35327         * debug-symfile.c: Added support for arguments and local variables.
35329 2002-03-23  Dick Porter  <dick@ximian.com>
35331         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
35332         protected by ifdefs, hence breaking the w32 build.
35334 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35336         * object.c: implement is_interned() the right way.
35338 2002-03-21  Martin Baulig  <martin@gnome.org>
35340         * debug-symfile.[ch]: New files to handle debugging information
35341         files. There's also support to dynamically update these symbol
35342         files to include machine dependent information.
35344 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
35346         * threads.c (mono_thread_create): new function to create thread
35347         from C
35349 2002-03-20  Martin Baulig  <martin@gnome.org>
35351         * icall.c (ves_icall_InternalInvoke): Create a new object if the
35352         method is a constructor.
35353         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
35354         points to ves_icall_InternalInvoke().
35356 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
35358         * file-io.c: Flush shouldn't throw exceptions.
35360 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
35362         * file-io.c: FileStream flush support; FileSetLength now
35363         restores file pointer.
35365 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
35367         * class.c: set image for pointer classes.
35369 2002/03/19  Nick Drochak <ndrochak@gol.com>
35371         * sysmath.c: Forgot one.
35373 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
35375         * sysmath.c: Avoid redefining existing names.
35377 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
35379         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
35380         handled by runtime as icall rather than dllimport from libm.so
35381         * file-io.c, file-io.h: fixed handle argument type.
35383 2002-03-18  Dick Porter  <dick@ximian.com>
35385         * reflection.c (mono_image_get_type_info): rename interface to
35386         iface, because of "#define interface struct" on windows.
35388 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
35390         * class.c, class.h: rename and export mono_ptr_class_get().
35391         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
35392         * reflection.c, reflection.h, icall.c: better/saner type name
35393         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
35394         method signatures.
35396 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
35398         * class.c (mono_class_init): removed hardcoded GHC_SLOT
35400         * icall.c (ves_icall_InternalInvoke): impl.
35402 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
35404         * reflection.c: output the interface map table, too.
35406 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
35408         * class.c (class_compute_field_layout): separate computation of 
35409         static field layout
35411 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
35413         * icall.c: added System.Buffer support.
35414         * file-io.c: moved file icalls from PAL to FileStream.
35416 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
35418         * icall.c (ves_icall_System_Object_GetHashCode): impl.
35420 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
35422         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
35424 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35426         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
35428 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
35430         * debug-helpers.{c,h}: moved here from monograph some useful functions
35431         to locate a method by name/signature in a class or image. Included
35432         also a small and flexible IL disassembler.
35434 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35436         * reflection.c: fixup tokens in methods with small header size, too.
35438 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
35440         * object.c (mono_string_to_utf8): remove assert(!error), instead
35441         print a warning. 
35443 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
35445         * icall.c: update to the new mono_Array_class_get interface.
35447 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
35449         * appdomain.c, object.c: Boehm-GC enable.
35450         * icall.c: make get_data_chunk() support split data requests.
35451         Ensure a class is initialized in more cases. Return only the first
35452         property found in GetProperties() or the compiler gets confused. 
35453         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
35454         * reflection.h, reflection.c: add fixup mechanism for field and method
35455         tokens. Initialize assembly->typeref in a single place. Output
35456         properties after events. Support custom attributes for events, too.
35457         Typo fix for paramter custom attrs.
35459 2002-03-07  Martin Baulig  <martin@gnome.org>
35461         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
35463 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
35465         * class.c (mono_array_class_get): fix. for multi. dim. arrays
35467 2002-03-06  Martin Baulig  <martin@gnome.org>
35469         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
35470         non-zero lower bounds. See testcases #F10-#F13.
35472 2002-03-05  Martin Baulig  <martin@gnome.org>
35474         * exception.c (mono_get_exception_argument_out_of_range): New exception.
35476         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
35477         ves_icall_System_Array_GetValue(), only calculate the absolute array position
35478         here.
35479         (ves_icall_System_Array_SetValue): Likewise.
35480         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
35481         as argument and does the actual work. This function is used when copying a
35482         multi-dimensional array.
35483         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
35484         now do all the widening conversions of value types.
35485         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
35487 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35489         * class.c: remove some magic numbers and use the smbolic names,
35490         instead. Added init_events() to load event info at class init time.
35491         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
35492         and mono_metadata_methods_from_event().
35493         * reflection.h, reflection.c: added support for writing out the evnets
35494         related information.
35496 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
35498         * reflection.h, icall.c: use a different method (GetInterfaces)
35499         to gather interface info and add isbyref, isprimitive and
35500         ispointer to the ves_icall_get_type_info() return value.
35502 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
35504         * class.h: stared adding support for events.
35505         * icall.c: split find_members implementation. Added debug icall to get
35506         the address of an object.
35507         * reflection.c: handle TypeBuilders in mono_type_get_object().
35509 2002-03-01  Martin Baulig  <martin@gnome.org>
35511         * icall.c (ves_icall_System_Array_GetLength): This must throw an
35512         ArgumentOutOfRangeException(), not an ArgumentException().
35513         (ves_icall_System_Array_GetLowerBound): Likewise.
35514         (ves_icall_System_Array_GetValue): Improved argument checking.
35515         (ves_icall_System_Array_SetValue): Improved argument checking.
35517 2002-03-01  Martin Baulig  <martin@gnome.org>
35519         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
35520         called with invalid arguments rather than just dying with g_assert().
35521         (ves_icall_System_Array_SetValue): Likewise.
35522         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
35523         raise a NotImplementedException instead.
35524         (ves_icall_System_Array_GetLength): Added argument checking.
35525         (ves_icall_System_Array_GetLowerBound): Added argument checking.
35527 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
35529         * object.h (mono_assert): new macros mono_assert and
35530         mono_assert_not_reached
35532 2002-02-28  Martin Baulig  <martin@gnome.org>
35534         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
35535         and "System::String::IsInterned" to "System::String::_IsInterned".
35537 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
35539         * icall.c: remove hacks for typebuilder. Added icall to create a
35540         modified type from a tybebuilder.
35541         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
35542         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
35543         to create a backing MonoClass for a TypeBuilder.
35545 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35547         * class.c, class.h: more refactoring of class init.
35548         Export mono_class_setup_mono_type() and mono_class_setup_parent().
35550 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
35552         * marshal.c, marshal.h: start of marshaling interface.
35554 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
35556         * icall.c: fix order in assembly qualified name icall.
35558 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
35560         * class.c: do not free str, since we store it in the hash table.
35561         * reflection.h: add label field to MonoILExceptionInfo.
35562         * reflection.c: handle references to more than one assembly. Handle
35563         case when there isn't a module created in the assembly.
35565 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
35567         * class.c: Fix typo. Start refactoring of class init code.
35569 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
35571         * appdomain.c: exit with 1 on error.
35572         * class.c: we already have the name in MonoClassField.
35573         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
35574         MonoStreamHeader instead of an offset of image->raw_metadata.
35576 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
35578         * appdomain.c (mono_init): Be even more descriptive about the error.
35580 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
35582         * appdomain.c: give the user an informative message when corlib can't
35583         be loaded.
35585 2002-02-26  Martin Baulig  <martin@gnome.org>
35587         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
35588         New icall to get the time zone data.
35590 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35592         * reflection.c: set virtual and raw size of section correctly.
35593         * threads.c: transfer domain information to newly created threads.
35595 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
35597         * class.c: when instancing a class in a domain, load the default
35598         vaules for static fields from the constant table. Fix System.Enum to
35599         not be an enum.
35600         * icall.c: implement Object::GetType() internalcall. Implemented
35601         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
35602         Fixed checking of binding flags in find_members().
35603         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
35604         * reflection.c: handle enumerations when writing to the constant
35605         table. Use a different object cache for types.
35608 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
35610         * object.c (mono_object_isinst): fix for arrays
35612         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
35614 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
35616         * object.c: don't use mprotect ()  and fix intern pool hash table
35617         lookup for big endian systems.
35619 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35621         * icall.c: change type_is_subtype_of () signature.
35623 2002-02-21  Mark Crichton  <crichton@gimp.org>
35625         * rand.c, rand.h: Added random number generator for
35626         System.Security.Cryptography classes.
35628         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
35630         * icall.c: Added System.Security.Cryptography calls.
35632 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
35634         * class.c, icall.c, metadata.c: better support for pointer types.
35635         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
35636         * reflection.c: Add support for getting custom attrs for properties
35637         and simplify some code.
35639 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35641         * icall.c: change getToken () and add custom attribute GetBlob()helper
35642         method.
35643         * reflection.h: add custom attrs array to the reflection builder structures.
35644         * reflection.c: encode and emit custom attributes for all the relevant
35645         reflection objects. Cache fieldref and methodref tokens. Change
35646         mono_image_create_token() interface to take a MonoDynamicAssembly.
35647         More complete custom attributes decoder. Load custom attributes for
35648         Assembly, Field, Method and Constructor objects, too. Make the
35649         returned array an Attribute[] one, not object[]. Added
35650         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
35651         custom attribute constructor.
35653 2002-02-20  Dick Porter  <dick@ximian.com>
35655         * icall.c:
35656         * rawbuffer.c:
35657         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
35658         problem code out for now).
35660 2002-02-19  Radek Doulik  <rodo@ximian.com>
35662         * object.c (mono_ldstr): use hash table to avoid multiple swapping
35664 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
35666         * icall.c: register the GetCustomAttributes method.
35667         * object.c, object.h: add mono_string_new_len ().
35668         * reflection.h, reflection.c: added mono_runtime_invoke(),
35669         mono_install_runtime_invoke(). Added
35670         mono_reflection_get_custom_attrs () to load custom attributes and
35671         create the attribute objects.
35673 2002-02-19  Dick Porter  <dick@ximian.com>
35674         * threads-dummy-types.c:
35675         * threads-dummy-types.h:
35676         * threads-dummy.c:
35677         * threads-dummy.h:
35678         * threads-pthread-types.c:
35679         * threads-pthread-types.h:
35680         * threads-pthread.c:
35681         * threads-pthread.h:  Deleted obsolete files
35683 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
35685         * class.c (mono_class_vtable): runtime init the class when we
35686         allocate static class data.
35688         * icall.c (ves_icall_System_Array_SetValue): check for null values.
35690         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
35691         and String - but we will need generic marshalling support in the
35692         future. 
35693         (mono_init): set the domain name in a ms compatible way
35695         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
35696         String[].
35698 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
35700         * object.c (mono_array_clone): use alloca() instead of g_malloc  
35701         for sizes
35703         * appdomain.c (mono_domain_unload): impl.
35705 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
35707         * appdomain.c, object.c: fix intern pool implementation.
35708         * class.c: fix alignment code.
35710 2002-02-16  Radek Doulik  <rodo@ximian.com>
35712         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
35713         and s2 > s1, just copy lower bytes to be compatible with little
35714         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
35715         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
35717         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
35718         force big_endian to be 1 for big endian machines 
35719         (ves_icall_iconv_new_decoder): ditto
35721 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
35723         * socket-io.c (convert_sockopt_level_and_name): If the system
35724         doesn't define SOL_IP or SOL_TCP, get them by hand using
35725         getprotobyname() and caching the values (because this could be a
35726         slow operation).
35727         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
35728         Use the appropriate struct when the system does support it. Ie,
35729         not all systems have struct ip_mreqn so use struct ip_mreq when
35730         appropriate.
35732 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
35734         * reflection.c: handle finally clauses.
35736 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
35738         * socket-io.c: use g_snprintf() instead of snprintf.
35740 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
35742         * reflection.c (mono_param_get_objects): Cast second argument to
35743         mono_method_get_param_names to a const char** to silence the
35744         compiler warning.
35746         * appdomain.c (mono_domain_assembly_open): Put parens around the
35747         truth statement in the for-loop.
35749         * unicode.c (iconv_convert): Got rid of a compiler warning about
35750         int i being unused when the system has a new iconv.
35751         (iconv_get_length): Same.
35753         * image.c (load_class_names): Cast the second argument to
35754         g_hash_table_insert() to char* to hush compiler warnings about the
35755         arg being a const.
35756         (mono_image_open): Same here.
35758         * socket-io.c: Don't conditionally include sys/filio.h or
35759         sys/sockio.h here anymore since we now get them from
35760         io-layer/io-layer.h
35761         (inet_pton): If the system doesn't support inet_aton, implement
35762         using inet_addr and also #define INADDR_NONE if it isn't defined
35763         by the system.
35765 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
35767         * metadata.c, metadata.h: added function to get packing and size info
35768         of a typedef.
35769         * reflection.h, reflection.c: handle field RVA data. Save info about
35770         the table layout if needed. Assign typedef indexes to all the types
35771         before dumping the info about them to avoid forward reference problems.
35773 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
35775         * socket-io.c (convert_sockopt_level_and_name): ifdef
35776         SO_ACCEPTCONN because it is not defined on my system (old debian)
35778 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
35780         * opcode.c: use stddef.h to get NULL.
35782 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
35784         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
35785         for FIONBIO, FIONREAD and SIOCATMARK.
35786         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
35787         define INADDR_NONE and besides, inet_addr() is deprecated and
35788         should not be used. Use inet_pton() instead - it also has the
35789         added bonus that it can easily handle IPv6 addresses as well.
35790         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
35792 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
35794         * decimal.c: remove _MSC_VER conditional.
35796 2002-02-13  Dick Porter  <dick@ximian.com>
35798         * socket-io.c: 
35799         * icall.c: Internal calls for Blocking, Select, Shutdown,
35800         GetSocketOption and SetSocketOption
35802 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35804         * assembly.cs: better resolver: use it instead of some kludgy
35805         code.
35807 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
35809         * reflection.c: the best way to speed-up the compiler is to avoid
35810         infinite loops.
35812 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
35814         * class.c (mono_class_vtable): changed the object layout
35815         (obj->vtable->class). 
35816         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
35818 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35820         * assembly.c: look for assemblies in the assembly dir, too.
35822 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35824         * class.c: fix thinko in mono_class_from_type().
35826 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35828         * exception.h, exception.c: added TypeLoadException.
35829         * object.h, object.c: added mono_array_clone ().
35830         * icall.c: handle throwOnError in AssemblyGetType().
35831         Added Array.Clone().
35832         * opcode.h, opcode.c: use a single value for the opcode val.
35833         Compile fix for non-gcc compilers.
35835 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
35837         * opcodes.c, opcodes.h: export interesting info about opcodes.
35839 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
35841         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
35842         icalls. 
35844         * class.c (class_compute_field_layout): set element_class for enums
35845         (mono_class_create_from_typedef): set element_class for normal classes
35847         * icall.c (ves_icall_System_Enum_get_value): impl.
35849         * class.c (mono_class_create_from_typedef): do not set valuetype
35850         flag for System.ValueType and System.Enum
35852 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
35854         * unicode.c (iconv_convert): fix big endian problem.
35856 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
35858         * class.c: add asserts if we are ever going to scribble over memory.
35859         * socket-io.c: not all systems have AF_IRDA defined.
35861 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
35863         * class.c (class_compute_field_layout): do not consider static
35864         fields to compute alignment
35866 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
35868         * appdomain.c (mono_appdomain_get): impl.
35869         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
35871 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
35873         * icall.c: ignore "file://" prefix when loading an assembly.
35875 2002-01-23  Dick Porter  <dick@ximian.com>
35877         * socket-io.c:
35878         * icall.c:
35879         * Makefile.am: Added socket support
35881 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
35883         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
35884         code back.  This should return the assemblies that are loaded by
35885         the runtime on behalf of an application domain. 
35887         The current implementation is still broken, it just returns every
35888         assembly loaded, but until we get real applications domain this
35889         will do.
35891 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
35893         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
35894         AppDomain object.
35896 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
35898         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
35899         the mono_class_from_name lookup.
35900         (ves_icall_get_parameter_info): ditto.
35901         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
35902         method.
35903         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
35905 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
35907         * class.c: load also nested classes on class init.
35908         System.ValueType instance methods gets passed boxed
35909         values, unless methods in derived classed that get a pointer to the
35910         data.
35911         * icall.c: use better name parsing code in GetType().
35912         * image.c, image.h: add mono_image_loaded ().
35913         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
35914         * reflection.c, reflection.h: added mono_reflection_parse_type().
35916 2002-01-22  Veronica De Santis <veron78@interfree.it>
35918         * icall.c : Added mapping of internal calls for Manual and Auto reset events
35919         * threads.c : Added the implementation of internal calls for events
35920         * threads.h : Added prototypes of internal calls for events
35921         
35922 2002-01-21  Radek Doulik  <rodo@ximian.com>
35924         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
35926 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
35928         * class.c (mono_class_init): set min_align to 1 (instead of 0)
35929         (mono_class_value_size): use min_align
35931 2002-01-20  Dick Porter  <dick@ximian.com>
35933         * threads.h:
35934         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
35935         so it compiles on w32.
35937 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
35939         * metadata.c (mono_type_stack_size): impl.
35941         * class.c (mono_class_get_field): impl. memberref token
35943 2002-01-16 Veronica De Santis <veron78@@interfree.it>
35945         * icall.h : Added the internal calls mapping for CreateMutex_internal
35946                     and ReleaseMutex_internal.
35947         * threads.h : Added the prototype of mutexes internal calls.
35948         * threads.c : Added the implementations of mutexes internal calls.
35950 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
35952         * metaparse.h: removed unused file.
35953         * reflection.c, reflection.h: added stream_data_align () function 
35954         to align data in streams and keep stream aligned. Add support for
35955         exception support in method headers.
35957 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
35959         * unicode.c: make iconv_convert () return the number of bytess written
35960         in the output buffer.
35962 2002-01-15  Dick Porter  <dick@ximian.com>
35963         * threads.c: Make the runtime's idea of infinite timeouts coincide
35964         with the class library's
35966         Fix a particularly egregious bug in mono_thread_cleanup(). That
35967         code was so utterly bogus it must have been written on a Monday.
35969 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
35971         * reflection.h: add subtypes field to TypeBuilder.
35972         * reflection.c: encode constants for literal fields.
35973         Handle subtypes. Fix user string token (and add a zero byte)
35974         at the end.
35975         
35976 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
35978         * class.c (mono_class_init): bug fix: assign slot numbers for
35979         abstract methods.
35981 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35983         * reflection.c: don't try to output a code RVA for abstract methods.
35984         Small fixes for method header format. Output parameter info to the
35985         ParamDef table. Save method overriding info to MethodImpl table.
35986         Fix property support. Allow typedef.extends to be a type in the
35987         building assembly.
35988         * verify.c: fix off-by-one error.
35990 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
35992         * class.c: fix mono_class_from_mono_type () for szarray types.
35993         Remove unused cache check in mono_class_from_type_spec().
35994         * icall.c: *type_from_name () functions handle simple arrays and byref.
35995         * reflection.c: handle byref and szarray types. Handle methods without
35996         body (gets P/Invoke compilation working). Handle types and fields in
35997         get_token ().
35998         * reflection.h: add rank to MonoTypeInfo.
36000 2002-01-10  Dick Porter  <dick@ximian.com>
36002         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
36003         internal calls
36005 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
36007         * icall.c: initialize class in type_from_handle ().
36008         Loop also in parent classes for get_method ().
36009         * reflection.c: properly encode class and valuetype types.
36010         Start on encoding TypeBuilder types. Handle fieldrefs.
36011         Use correct length when registering a user string.
36012         Handle ConstructorBuilder and MonoMethod in get_token ().
36013         Make mono_type_get_object () aware of cached types.
36014         * object.c: back out change to mono_string_new ().
36016 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
36017         * object.c: mono_string_new should return a NULL when the string 
36018         passed in is NULL -- not try to deference it.
36019         
36020 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
36022         * icall.c: hack to make IsSubType work for TypeBuilders.
36023         * reflection.c: emit constructors before methods.
36024         Retrieve param names in mono_param_get_objects().
36026 2002/01/05  Nick Drochak  <ndrochak@gol.com>
36028         * Makefile.am: fix list of headers and sources so automake 1.5
36029         doesn't complain. Removed \# at end of list.
36031 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
36033         * reflection.c: get token for a method ref. Set return type of
36034         constructor to void.
36035         * loader.c: debug message.
36036         * class.c: typo fix.
36038 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
36040         * icall.c: fix array init with rank > 1. FindMembers
36041         loops in parent class as well.
36042         * image.c: do not insert nested types in name cache.
36043         * reflection.c: warning fix.
36044         * reflection.h: add override method (for interface impl).
36046 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
36048         * metadata.c: fix customattr decoding.
36050 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
36052         * rawbuffer.cs: Added native Win32 implementation, avoids using
36053         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
36055 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
36057         * class.c: make the low-level routines handle the cache.
36059 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
36061         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
36063 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
36065         * class.c: fix mono_array_element_size() for objects.
36066         * class.h, class.c: add properties to MonoClass and load them
36067         at init time.
36068         * icall.c: check with isinst() when assigning a value to an array
36069         instead of requiring the classes to match exactly.
36070         Implemented icall for System.Type::GetType().
36071         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
36072         enums. Handle bindingflags when looking for methods and fields.
36073         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
36074         and mono_metadata_methods_from_property().
36075         * reflection.h, reflection.c: added structures for propreties,
36076         parameters and enums. Implemented mono_property_get_object() and
36077         mono_param_get_objects().
36079 2001-12-18  Dick Porter  <dick@ximian.com>
36081         * file-io.c: Use mono_string_to_utf16() instead of
36082         mono_string_chars()
36084         * object.c: Added mono_string_to_utf16(), which copies the non
36085         NULL-terminated MonoString into a new double-null-terminated
36086         buffer.
36088 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
36090         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
36092 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
36094         * file-io.c: raise exceptions if handle is invalid.
36096 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
36098         * assembly.c: yet another check for mscorlib.
36099         * class.c, class.h: load nesting info for classes.
36100         * icall.c: many new functions to support the Reflection classes.
36101         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
36102         * reflection.h, reflection.c: mono_image_create_token(),
36103         mono_assembly_get_object(), mono_type_get_object(),
36104         mono_method_get_object(), mono_field_get_object(): methods to return
36105         objects that parallel the C representation of assemblies, types,
36106         methods, fields.
36108 2001-12-11  Dick Porter  <dick@ximian.com>
36110         * icall.c:
36111         * file-io.c: Internal calls for file IO.
36113 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
36115         * tabledefs.h: missing FileAttributes.
36116         * verify.h, verify.c: use is_valid_string () to simplify and check for
36117         valid strings more correctly. Fix warnings and speeling.
36118         Check more tables: Filed, File, ModuleRef, StandAloneSig.
36119         Check code: branches, maxstack, method calls.
36121 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
36123         * object.c (mono_object_allocate): removed static, so that the jit
36124         can allocate value types.
36126         * icall.c (ves_icall_System_DateTime_GetNow): impl.
36128 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
36130         * class.c: init enum types right away and register the
36131         token->MonoClass map in mono_class_create_from_typedef ().
36132         * verify.h, verify.c: first cut of the verifier.
36133         * pedump.c: add --verify switch to verify metadata tables.
36134         * tabledefs.h: add some missing enums.
36136 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
36138         * class.c (mono_install_runtime_class_init): impl.
36139         (mono_class_init): renamed mono_class_metadata_init to
36140         mono_class_init, also removed the metadata_inited flag
36142         * object.c (mono_object_isinst): use faster algorithm
36144 2001-11-30  Radek Doulik  <rodo@ximian.com>
36146         * mono-endian.h: reverted last change
36147         added function prototypes
36149         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
36150         add mono-endian.c back
36152         * mono-endian.c: returned back, as Paolo pointed out, it's needed
36153         for unaligned access, I've mistaked it with endianess. I am
36154         sorry.
36155         (mono_read16): fix reverted endianess
36156         (mono_read64): ditto
36157         (mono_read32): ditto
36159 2001-11-30  Dick Porter  <dick@ximian.com>
36161         * exception.c: Implement mono_exception_from_name()
36163 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
36165         * metadata.h, metadata.c: remove params_size and locals_size and their
36166         calculation from the metadata code: they are only usefult to the
36167         interp.
36169 2001-11-29  Radek Doulik  <rodo@ximian.com>
36171         * object.c (mono_ldstr): swap bytes here, it's probably not the
36172         best place, but works for me now, I'll redo it once I know mono
36173         better, also note that I add PROT_WRITE and don't reset back, also
36174         note that it's only affects big endians, so x86 should be OK
36176         * mono-endian.h (read16): use just glib macros for both endians
36178         * mono-endian.c: removed as glib macros are used in in
36179         mono-endian.h so we don't need to care about endianess for read
36180         macros as glib does that for us already
36182 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
36184         * class.h, class.h: take minimum alignment into consideration so
36185         that the fields of a class remain aligned also when in an array.
36187 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
36189         * loader.h, loader.c: add mono_method_get_param_names().
36190         * class.c: 0-init class fields.
36192 2001-11-26  Dick Porter  <dick@ximian.com>
36194         * icall.c:
36195         * threads-types.h:
36196         * threads.c: New file that handles System.Threading on all platforms
36198         * object.c: 
36199         * object.h: Remove the synchronisation struct from MonoObject,
36200         replace it with a pointer that gets initialised on demand
36202         * Makefile.am: Replace all the system-specific threading code with
36203         a single file that uses the new wrapper library
36205 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
36207         * class.c, class.h: add mono_install_trampoline() so that the runtime
36208         can register a function to create a trampoline: removes the ugly
36209         requirement that a runtime needed to export arch_create_jit_trampoline.
36210         * object.h, object.c: added mono_install_handler() so that the runtime
36211         can install an handler for exceptions generated in C code (with
36212         mono_raise_exception()). Added C struct for System.Delegate.
36213         * pedump.c: removed arch_create_jit_trampoline.
36214         * reflection.c: some cleanups to allow registering user strings and
36215         later getting a token for methodrefs and fieldrefs before the assembly
36216         is built.
36217         * row-indexes.h: updates and fixes from the new ECMA specs.
36219 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
36221         * class.h, class.c: add enum_basetype field to MonoClass.
36222         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
36223         to get index in the constant table reated to a field, param or
36224         property.
36225         * reflection.h, reflection.c: handle constructors. Set public-key and
36226         version number of the built assembly to 0.
36227         * row-indexes.h: update from new ECMA spec.
36229 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
36231         * class.h, class.c: add a max_interface_id to MonoClass.
36232         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
36233         since it's used to do that. Added mono_type_type_from_obj().
36234         Make GetType() return NULL instead of segfaulting if the type was not
36235         found. Handle simple arrays in assQualifiedName.
36236         * object.h: add a struct to represent an Exception.
36237         * reflection.c: output call convention in method signature.
36238         Add code to support P/Invoke methods and fixed offsets for fields.
36240 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
36242         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
36243         the value.
36244         * icall.c: use mono_array_addr instead of array->vector: fixes the
36245         reflection image writing.
36246         * reflection.c: init call convention byte to 0 in method signature.
36247         Encode the property signature. Don't output property-related methods
36248         twice. Really process the properties for a type (don't cast a field to
36249         a property, my mom always told me that).
36250         Fix 64 bit issues in pointer alignment in a different and more
36251         readable way.
36253 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
36255         * loader.h: Removed type class from MonoDefaults, added monotype
36257         * loader.c: Loaded MonoType, removed loading of Type
36259         * icall.c (my_mono_new_object): Now returns a System.MonoType,
36260         and fills in System.Type._impl with a RuntimeTypeHandle rather
36261         than the actual MonoClass *
36263         (ves_icall_type_from_handle): change from type_class to
36264         monotype_class
36266         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
36267         implemented
36269         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
36270         implemented
36272         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
36274         (ves_icall_System_Reflection_Assembly_GetType): implemented
36276         (ves_icall_System_MonoType_assQualifiedName): implemented
36278         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
36280 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
36282         * assembly.c (mono_assembly_open): Implement a cache for the
36283         assemblies. 
36285         (mono_assembly_close): only destroy the assembly when the last
36286         reference is gone.
36287         
36288 2001-11-09  Dick Porter  <dick@ximian.com>
36290         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
36292 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
36294         * class.c (mono_class_metadata_init): bug fix: compute the right slot
36296 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
36298         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
36299         from Martin Weindel.
36300         * object.h: add mono_string_chars ().
36302 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
36304         * reflection.c (build_compressed_metadata): Eliminates warnings
36305         and uses 64-bit clean code.
36307         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
36308         (mono_type_equal): Change signature to eliminate warnings.
36310 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
36312         * icall.c, loader.c: remove the internalcall array constructors.
36313         Changes to match the new MonoArray structure.
36314         * object.h, object.c: an array object doesn't allocate an extra
36315         vector. Add mono_array_new_full () to create jagged arrays easily.
36317 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
36319         * metadata.h, metadata.c: add mono_metadata_field_info () to
36320         retreive all the info about a field from vairous tables.
36321         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
36322         * class.h, class.c: augment MonoClassField with more info.
36323         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
36324         policy and load a field's RVA if needed.
36326 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
36328         * class.c (mono_class_metadata_init): create a trampoline for all
36329         virtual functions instead of actually compiling them.
36331 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
36333         * class.h, class.c: include name in MonoClassField.
36334         * class.c: fix fundamental type of System.Object and System.String.
36335         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
36336         tokens in ldtoken.
36337         * icall.c: remove internalcalls for the Reflection stuff that is now
36338         done in C# code.
36339         * loader.c: mono_field_from_memberref () implementation.
36340         * mono-endian.c: thinko (s/struct/union/g).
36341         * object.c, object.h: make the mono_string_* prototypes actually use
36342         MonoString instead of MonoObject.
36343         * reflection.c, reflection.h: updates for changes in the reflection
36344         code in corlib: we use C structures that map to the actual C# classes.
36345         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
36346         fat method header if needed and use the info from the ILGenerator for
36347         methods. Handle fields in types. Misc fixes.
36349 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
36351         * class.c (mono_class_metadata_init): bug fix: always allocate
36352         space for static class data
36354 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
36356         * class.c (mono_compute_relative_numbering): use relative
36357         numbering to support fast runtime type checks.
36359 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
36361         * class.c (mono_class_create_from_typeref): added debugging output
36362         to print class name when MonoDummy is returned instead of real class
36364 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
36366         * class.c (mono_class_metadata_init): interface offset table now
36367         contains pointers into the vtable - this is more efficient for the jit
36369 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
36371         * class.c (mono_class_metadata_init): use a temporary vtable (the
36372         old algorithm only worked for the interpreter, but not for the jit)
36374 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
36376         * loader.c (method_from_memberref): use mono_class_get to get the
36377         class of an array instead of using System.Array directly.
36378         (mono_get_method): also add MEMBERREF methods to the method cache
36379         which usefull for arrays.
36381 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
36383         * pedump.c (arch_compile_method): added to compute vtable entry
36385         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
36386         number of interfaces.
36387         
36388         * class.h: merged MonoArrayClass into MonoClass
36390         * class.c (mono_class_create_from_typedef): compute the vtable size and
36391         allocate space to include the vtable inside MonoClass
36392         (mono_class_metadata_init): initialize the vtable
36394 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
36396         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
36397         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
36398         * image.c: endian fixes by Laurent Rioux.
36399         * object.h, object.c: rename MonoStringObject to MonoString and
36400         MonoArrayObject to MonoArray. Change some function names to conform to
36401         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
36402         guint16* as first argument, so don't use char*.
36403         Provide macros to do the interesting things on arrays in a portable way.
36404         * threads-pthread.c: updates for the API changes and #include <sched.h>
36405         (required for sched_yield()).
36406         * icall.c: updates for the API changes above.
36407         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
36408         platforms that need them.
36410 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
36412         * class.c: set the correct type for all the fundamental
36413         type when loading the class.
36415 2001-10-05  Dick Porter  <dick@ximian.com>
36417         * threads-pthread.c (pthread_mutex_timedlock): Simple
36418         compatibility version for C libraries that lack this call.
36420 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36422         * class.c: MonoTypes stored in MonoClass are stored as
36423         fundamental MonoTypes when the class represents a
36424         fundamental type (System.Int32, ...).
36425         The TypeHandle return by ldtoken is a MonoType*.
36426         * icall.c: ves_icall_get_data_chunk () write out all the
36427         PE/COFF stuff. Implement ves_icall_define_method (),
36428         ves_icall_set_method_body (), ves_icall_type_from_handle ().
36429         * image.c: properly skip unknown streams.
36430         * loader.h, loader.c: add type_class to mono_defaults.
36431         * metadata.c, metadata.h: export compute_size () as
36432         mono_metadata_compute_size () with a better interface.
36433         Typo and C&P fixes.
36434         * pedump.c: don't try to print the entry point RVA if there is no entry point.
36435         * reflection.c, reflection.h: many cleanups, fixes, output method
36436         signatures and headers, typedef and typeref info, compress the metadata
36437         tables, output all the heap streams, cli header etc.
36438         * row-indexes.h: typo fixes.
36440 2001-10-04  Dick Porter  <dick@ximian.com>
36442         * object.h: Add a synchronisation mutex struct to MonoObject
36444         * object.c (mono_new_object): Initialise the object
36445         synchronisation mutexes
36447         * icall.c: System.Threading.Monitor internal calls
36448         
36449         * threads-pthread.h:
36450         * threads-pthread.c: System.Threading.Monitor internal calls
36452         * threads-types.h: New file, includes the system-specific thread
36453         structures
36454         
36455         * threads-pthread-types.h:
36456         * threads-pthread-types.c: New files, handle pthread-specific
36457         synchronisation types
36459         * threads-dummy-types.h: 
36460         * threads-dummy-types.c: New files of dummy support for
36461         thread-specific types
36463         * metadata.c:
36464         * image.c:
36465         * pedump.c: include mono-endian.h not endian.h
36466         
36467         * Makefile.am: More threads files.
36468         Name mono-endian.h not endian.h
36470 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
36472         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
36473         stuff and implement a few more bits.
36474         * icall.c: a field needs to be dereferenced twice. Do not use the same
36475         name for two variables in the same scope.
36476         * image.c, image.h: cleanups.
36478 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
36480         * class.c (mono_class_metadata_init): bug fix: compute the right size
36482 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
36484         * icall.c: implemented some of the Reflection internalcalls.
36485         * image.c, image.h: start writing out the PE/COFF image.
36486         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
36487         that does the reverse than decode_blob_size ().
36488         * object.c: use mono_metadata_encode_value (). Move here
36489         temporary implementation of mono_string_to_utf8 ().
36490         * rawbuffer.c: make malloc_map static.
36492 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36494         * metadata.c: fix type comparison for arrays.
36495         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
36496         Added a couple of new classes to monodefaults.
36497         * icall.c: added a couple of Reflection-related internalcalls.
36498         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
36499         Added a byval_arg MonoType to MonoClass.
36501 2001-09-28  Dick Porter  <dick@ximian.com>
36503         * icall.c:
36504         * threads-pthread.h: 
36505         * threads-pthread.c: Implemented internal calls for
36506         LocalDataStoreSlot operations.  Applied mutexes around all shared
36507         data.  Reworked the thread creation and Start() operations to
36508         avoid a race condition.
36509         
36510         * threads-dummy.h:
36511         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
36513 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
36515         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
36517 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
36519         * class.c, loader.c: warn and return NULL instead of erroring out.
36520         * icall.c: added System.AppDomain::getCurDomain().
36521         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
36523 2001-09-25  Dick Porter  <dick@ximian.com>
36525         * threads-pthread.h:
36526         * threads-pthread.c: Implemented timed thread joining and added
36527         System.Threading.Thread::Join_internal internal call
36529         * icall.c: Added System.Threading.Thread::Join_internal internal call
36531         * threads-dummy.h:
36532         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
36534 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
36536         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
36537         mono_string_intern () to implement the semantics of the ldstr opcode
36538         and the interning of System.Strings.
36539         * icall.c: provide hooks to make String::IsIntern and String::Intern
36540         internalcalls.
36542 2001-09-23  Dick Porter  <dick@ximian.com>
36544         * threads-dummy.c: 
36545         * threads-dummy.h: New files of dummy threading routines
36547         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
36548         support code based on system specifics
36550         Rename PTHREAD_LIBS to THREAD_LIBS
36551         
36552 2001-09-23  Dick Porter  <dick@ximian.com>
36554         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
36555         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
36556         internal calls.
36557         (mono_thread_init): Set up a Thread object instance to return when
36558         the main thread calls Thread.CurrentThread
36559         (mono_thread_cleanup): Wait for all subthreads to exit
36561         * icall.c: New internal calls for System.Threading.Thread::Sleep
36562         (including Schedule) and CurrentThread
36564         * threads.h: New file, to insulate thread-specific stuff from the
36565         rest of the code
36567 2001-09-21  Dick Porter  <dick@ximian.com>
36569         * threads-pthread.h: 
36570         * threads-pthread.c: New file, for handling pthreads-style
36571         threading support.  Start() now starts a new thread and executes
36572         the ThreadStart delegate instance.
36574         * icall.c: Added the internalcall for
36575         System.Threading.Thread::Start_internal
36577         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
36579 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
36581         * loader.c: work around the different signatures for delegates
36582         constructors csc generates in compiled code vs the ones compiled in mscorlib.
36584 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
36586         * class.h, class.c: add mono_class_get_field_from_name ().
36587         * *: Fix C comments and other ANSI C issues.
36589 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
36591         * endian.h, assembly.c: fix some endianness issues.
36593 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
36595         * loader.h, load.c: add delegate_class to mono_defaults.
36596         Handle runtime provided methods in mono_get_method ().
36598 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
36600         * loader.c (mono_get_method): use pinvoke for internal call
36602         * icall.c: use pinvoke for internal call
36604         * loader.c (method_from_memberref): set the method name
36606 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
36608         * metadata.c: help the compiler generate better code for
36609         mono_class_from_mono_type ().
36611 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
36613         * class.c (mono_class_metadata_init): delayed computing of the
36614         class size to mono_class_metadata_init ()
36616 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
36618         * class.c, class.h: add an interfaces member to MonoClass.
36619         * image.c, image.h: add assembly_name field to MonoImage
36620         from the assembly table.
36621         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
36623 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
36625         * class.c: Handle Array in mono_class_from_mono_type ().
36626         * metadata.c, pedump.c: some endian fixes.
36628 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
36630         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
36631         * metadata.c: fix small problem introduced with the latest commit.
36633 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
36635         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
36636         We don't need a MonoMetadata pointer anymore to compare signatures in
36637         mono_metadata_signature_equal (), update callers.
36638         Reduced memory usage an number of allocations for MonoMethodHeader and
36639         MonoMethodSignature.
36641 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
36643         * metadata.c: added compare for szarray.
36645 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
36647         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
36648         and add a couple more types to it and mono_defaults. Give an hint on
36649         classes that need implementing in our corlib and are referenced
36650         in mscorlib.
36652 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
36654         * class.h, class.c: keep track if a class is also an Enum.
36655         * loader.c: Implement a couple more types for use in libffi
36656         marshalling. Gives better diagnostics when failing to dlopen
36657         a library. Set method->klass for P/Invoke methods, too.
36659 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
36661         * class.c, class.h: add a MonoType this_arg to MonoClass that
36662         represents a pointer to an object of the class' type that
36663         can be used by the interpreter and later the type cache.
36664         Add best guess alignment info for valuetype objects.
36666 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
36668         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
36669         into MonoType: one less level of indirection and allocation and
36670         simplifies quite a bit of code. Added cache for MonoTypes that are
36671         used frequently, so that we don't need to allocate them all the time.
36673 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
36675         * class.c (mono_class_create_from_typedef): System.Enum is also a
36676         value type, although it does not derive from System.ValueType
36677         (maybe a bug in the ms compiler?)
36679         * metadata.c (mono_type_size): return the right size for value types
36681         * loader.c (mono_get_method): only initialize method header if not abstract
36683         * class.c (mono_class_from_mono_type): use mono_default values. 
36685 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
36687         * *: use MonoClass pointers instead of <type_tokens>
36688         
36689         * class.h: new flag: metadata_inited.
36691         * class.c (mono_class_metadata_init): impl.
36692         (mono_class_instance_size): impl.
36693         (mono_class_data_size): impl.
36695 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36697         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
36698         MonoClass now has the name and name_space fields. 
36699         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
36700         mono_get_method () takes and optional MonoClass as argument.
36701         Removed mono_typedef_from_name() and added mono_class_token_from_name()
36702         instead that takes advantage of a map from class names to typedef
36703         tokens in MonoImage.
36705 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
36707         * metadata.c: zero is not a valid alignment boundary.
36708         Merge MONO_TYPE_VOID in default decoding code.
36710 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
36712         * image.h: merged MonoMetadata into MonoImage
36714         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
36715         identify the type of elements.
36717 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
36719         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
36720         * cil-coff.h: split MonoMSDOSHeader and add size info.
36721         * image.c: add some consistency checks.
36722         * metadata.c: fix row size computation: one programmer
36723         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
36724         add explanation for the locator routine.
36725         Fix decoding of size in method header.
36726         
36727 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
36729         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
36730         (g_concat_dir_and_file): Bring g_concat_dir_and_file
36731         function from gnome-libs.  This uses the right path separator
36732         based on the OS, and also works around a bug in some systems where
36733         a double slash is not allowed. 
36734         (default_assembly_name_resolver): Use g_concat_dir_and_file
36735         (mono_assembly_open): ditto.
36737 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
36739         * metadata.c (mono_metadata_signature_equal): impl.
36741         * *: void is now a realy MonoType (instead of using NULL)
36742         
36743         * metadata.c (do_mono_metadata_parse_type): use
36744         mono_metadata_parse_type to parse void value.
36746 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
36748         * metadata.c, metadata.h: in the signature and method header store
36749         only the space required for holding the loca vars and incoming arguments.
36751 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
36753         * metadata.c (do_mono_metadata_parse_type): treat void like any
36754         other type (instead of assigning NULL);
36756 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
36758         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
36760 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
36762         * image.c (do_mono_image_open): added a cache for arrays.
36764 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
36766         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
36767         decode a single column from a row in a metadata table and changes
36768         to take advantage of it in the typedef locator (gives a nice speed up).
36769         Store offset info for function params.
36771 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
36773         * image.h (MONO_IMAGE_IS_CORLIB): removed 
36775 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
36777         * assembly.c: how could mono_assembly_close () had ever worked?
36778         * metadata.c, metadata.h: provide offset info for local vars.
36779         Implement mono_type_size () to take care of alignment as well
36780         as size (it was mono_field_type_size in cli/class.c before).
36782 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
36784         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
36786         * assembly.h (CORLIB_NAME): set to corlib.dll
36788         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
36790 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
36792         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
36793         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
36794         tokentype.h: massive namespace cleanup.
36796 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
36798         * metadata.h, metadata.c: decode exception clauses when parsing method header.
36800 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
36802         * metadata.c (mono_metadata_free_type): added check for type !=
36803         NULL (void) before calling mono_metadata_free_type()
36805 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
36807         * metadata.h, row_indexes.h: added header with enumerations to use
36808         to index in the columns from tables in metadata and to decode coded
36809         tokens: we should start using this instead of embedding magic numbers
36810         all over the code.
36812 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
36814         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
36815         Move metadata_t info from cli_image_info_t to MonoImage, where
36816         it's easily accessible. Changed all the uses accordingly.
36817         Added the method and class caches to MonoImage.
36818         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
36819         and mono_metadata_decode_value () signature to be more consistent
36820         with the other parse functions (and simplify code). Taken advantage
36821         of zero-length array allocation with GCC. Removed reduntant (and
36822         wrong) MonoFieldType struct and use MonoParam instead. Changed
36823         mono_metadata_parse_field_type () to use common code for parsing.
36824         Added mono_metadata_typedef_from_field () and
36825         mono_metadata_typedef_from_method () to lookup a typedef index from a
36826         field or method token.
36827         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
36829 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
36831         * metadata.c (mono_metadata_parse_field_type): Implement. 
36832         (do_mono_metadata_parse_type): Split engine from
36833         mono_metadata_parse_type, so that we can create smaller structures
36834         for things that just have one pointer to the MonoType (look at
36835         the MonoFieldType)
36837 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
36839         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
36840         as Jan Gray found out, it is incorrect. 
36842 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
36844         * assembly.c: Implement asssembly loading.  This loads an image
36845         and loads all the referenced assemblies.  Come to think of it, we
36846         could always do lazy loading of the assemblies. 
36848         * image.c (mono_image_open): Keep loaded images in a hashtable.
36850         * image.h (MonoImage): Add reference count.
36852 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
36854         * assembly.c (mono_assembly_open): Keep track of the file name in
36855         case the assembly has no ASSEMBLY table.
36857         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
36858         from get.c here.
36860 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
36862         * metadata.c, metadata.h: decode local vars in method header
36863         parse function. Change callers accordingly.
36865 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
36867         * metadata.h, cil-coff.h: protect against multiple inclusion.
36868         Added some new structures to hold information decoded from metadata:
36869         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
36870         and relevant decoding/free functions.
36871         * metadata.c: implement decoding functions. Add warning for out of bounds
36872         index in mono_metadata_locate(). Implement mono_get_method () to retreive
36873         all the info about a method signature and invocation. Remove check on
36874         uninitialized local var in parse_mh() and fix memory leak.
36876 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
36878         * metadata.h: More macros.
36880         * tokentype.h: New file.
36882 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
36884         * assembly.c: added a consistency check and initialize
36885         some structures with g_new0().
36886         * metadata.c: fixed a couple more bugs in table size computation
36887         and add other checks for out-of bound access to metadata.
36889 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
36891         * metatada.c: fix bugs computing table sizes. Spew a
36892         warning when index in string heap is out of bounds.
36894 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
36896         * metadata.h: Add a couple of macros to manipulate tokens. 
36898 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
36900         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
36901         cli_section_tables).
36903 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
36905         * metadata.c (mono_metadata_user_string): New function, provides
36906         access to the UserString heap. 
36908 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
36910         * metadata.c: Add inline documentation.
36912 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
36914         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
36915         files. 
36917 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
36919         * typeattr.h: New file, TypeAttribute flags. 
36921 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
36923         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
36924         mono_assembly_ensure_section): Section loading code.
36925         (load_section_tables): Load the sections.
36927         * mono/metadata/metadata.c (mono_metadata_locate_token,
36928         mono_metadata_locate): Functions to locate the information
36929         definition given a token or a table and an index.
36930         (mono_metadata_compute_table_bases): New.
36931         (compute_size): New function to compute the sizes of the various
36932         tables.
36934         * mono/metadata/metadata.h: Finish listing the different index
36935         types. 
36937         * mono/metadata/pedump.c: Improve to dump new information.
36939 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
36941         * mono/metadata/metadata.c: Entered all the tables matching
36942         Beta2. 
36944         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2